File: configure.ac

package info (click to toggle)
flamerobin 0.9.3~%2B20160512.c75f8618-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 6,452 kB
  • sloc: cpp: 54,785; sh: 10,497; makefile: 32
file content (113 lines) | stat: -rw-r--r-- 2,838 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
AC_PREREQ(2.69)
AC_INIT(aclocal.m4)
AC_CANONICAL_SYSTEM
AC_DEFINE([FR_INSTALL_PREFIX], [], [Description])

AC_CONFIG_MACRO_DIR([m4])
AC_PROG_LIBTOOL

AM_OPTIONS_WXCONFIG
AC_PROG_CXX

AC_ARG_ENABLE(debug,
              [  --enable-debug          Enable debugging information],
              USE_DEBUG="$enableval", USE_DEBUG="no")

if test $USE_DEBUG = yes ; then 
  DEBUG=1
  FINAL=0
  dnl Bakefile doesn't touch {C,CPP,CXX,LD}FLAGS in autoconf format, we
  dnl have to do it ourselves. (Incorrectly) assuming GCC here:
  CFLAGS="$CFLAGS -g"
else
  DEBUG=0
  FINAL=1
fi

# Check for wxWidgets
AM_PATH_WXCONFIG([3.0.0], [], [
        AC_MSG_ERROR([
           wxWidgets must be installed on your system
           but wx-config script couldn't be found.
     
           Please check that wx-config is in path, the directory
           where wxWidgets libraries are installed (returned by
           'wx-config --libs' command) is in LD_LIBRARY_PATH or
           equivalent variable and wxWidgets version is 2.8.0 or above.
        ])], [aui,stc,std])

AC_LANG_PUSH([C++])

# Check for Boost headers and libraries
BOOST_REQUIRE

BOOST_BIND
BOOST_FUNCTION
BOOST_SMART_PTR
BOOST_THREADS


# Link to Firebird client library
case "${host}" in
    *-*-cygwin* | *-*-mingw32* )
        dnl Windows builds dynamically link to the Firebird client library
    ;;

    *-*-darwin* )
        dnl Mac OS X uses the Firebird framework
        LIBS="$LIBS -framework Firebird"
    ;;

    * )
        AC_SEARCH_LIBS([isc_attach_database], [fbclient fbembed], [],
          [AC_MSG_ERROR([
           Firebird client library not found
           Install Firebird server development files.
           In Debian/Ubuntu 'sudo apt-get install firebird2.5-dev'
          ])])
  esac


CPPFLAGS="$CPPFLAGS $WX_CXXFLAGS $BOOST_CPPFLAGS"
LDFLAGS="$LDFLAGS $WX_LDFLAGS $WX_LIBS $BOOST_THREAD_LDFLAGS $BOOST_THREAD_LIBS"

AC_BAKEFILE([m4_include(autoconf_inc.m4)])

if test $GCC_PCH = 1 ; then
   CPPFLAGS="$CPPFLAGS -DWX_PRECOMP"
fi

dnl -----------------------------------------------------------------------
dnl install prefix
dnl -----------------------------------------------------------------------

if test "x$prefix" != "xNONE"; then
    FR_PREFIX=$prefix
else
    FR_PREFIX=$ac_default_prefix
fi

AC_DEFINE_UNQUOTED(FR_INSTALL_PREFIX, "$FR_PREFIX")

dnl -----------------------------------------------------------------------
dnl wxWidgets include directories to find wx.rc
dnl -----------------------------------------------------------------------

WX_INCLUDES=""
for opt in $WX_CPPFLAGS
do
    case "$opt" in
        -I*)
            WX_INCLUDES="$WX_INCLUDES --include-dir `echo "$opt" | sed 's/^-I//'`" 
            ;;
    esac
done
AC_SUBST(WX_INCLUDES)



AC_CONFIG_HEADERS([ frconfig.h:frconfig.h.in ])
AC_CONFIG_FILES([ Makefile ])

AC_OUTPUT