[542] | 1 | dnl Process this file with autoconf to produce a configure script. |
---|
[1941] | 2 | AC_INIT([LEMON], [svn-head], [etik-ol@cs.elte.hu], [lemon]) |
---|
[542] | 3 | AC_CONFIG_AUX_DIR([config]) |
---|
[1482] | 4 | AM_INIT_AUTOMAKE([1.7]) |
---|
[1435] | 5 | AC_CONFIG_SRCDIR([lemon/invalid.h]) |
---|
| 6 | AC_CONFIG_HEADERS([config.h lemon/config.h]) |
---|
[1482] | 7 | AC_PREREQ([2.59]) |
---|
[542] | 8 | |
---|
[1905] | 9 | lx_cmdline_cxxflags_set=${CXXFLAGS+set} |
---|
| 10 | |
---|
[542] | 11 | dnl Checks for programs. |
---|
| 12 | AC_PROG_CXX |
---|
[1350] | 13 | AC_PROG_CXXCPP |
---|
[1304] | 14 | AC_PROG_INSTALL |
---|
[1327] | 15 | AC_DISABLE_SHARED |
---|
[1304] | 16 | AC_PROG_LIBTOOL |
---|
[542] | 17 | |
---|
[1905] | 18 | if test x"$lx_cmdline_cxxflags_set" != x"set" -a "$GXX" = yes; then |
---|
[1349] | 19 | CXXFLAGS="$CXXFLAGS -Wall -W" |
---|
[1348] | 20 | fi |
---|
[716] | 21 | |
---|
[1400] | 22 | AC_CHECK_PROG([doxygen_found],[doxygen],[yes],[no]) |
---|
| 23 | |
---|
[542] | 24 | dnl Checks for libraries. |
---|
[1349] | 25 | LX_CHECK_GLPK |
---|
[1380] | 26 | LX_CHECK_CPLEX |
---|
[542] | 27 | |
---|
[1863] | 28 | dnl Enable/disable installing the documentation |
---|
| 29 | AC_ARG_ENABLE([doc], |
---|
| 30 | AS_HELP_STRING([--enable-doc@<:@=yes|no|full@:>@], [build the documentation (full enables internal documentation too) @<:@default=yes@:>@]) |
---|
| 31 | AS_HELP_STRING([--disable-doc], [do not build the documentation]), |
---|
| 32 | [], [enable_doc=yes]) |
---|
| 33 | |
---|
| 34 | AC_MSG_CHECKING([whether to build the documention]) |
---|
| 35 | case "$enable_doc" in |
---|
| 36 | yes) |
---|
| 37 | DOXYGEN_INTERNAL_DOCS=NO |
---|
| 38 | AC_MSG_RESULT([yes]) |
---|
| 39 | ;; |
---|
| 40 | full) |
---|
| 41 | DOXYGEN_INTERNAL_DOCS=YES |
---|
| 42 | AC_MSG_RESULT([full]) |
---|
| 43 | ;; |
---|
| 44 | no) |
---|
| 45 | DOXYGEN_INTERNAL_DOCS=NO |
---|
| 46 | AC_MSG_RESULT([no]) |
---|
| 47 | ;; |
---|
| 48 | *) |
---|
| 49 | AC_MSG_ERROR([bad value $enable_doc for option --enable-doc]) |
---|
| 50 | ;; |
---|
| 51 | esac |
---|
| 52 | AC_SUBST(DOXYGEN_INTERNAL_DOCS) |
---|
| 53 | AM_CONDITIONAL([WANT_DOC], [test x"$enable_doc" != x"no"]) |
---|
| 54 | |
---|
| 55 | dnl Disable/enable building the GUI |
---|
| 56 | AC_ARG_ENABLE([gui], |
---|
| 57 | AS_HELP_STRING([--enable-gui], [build the GUI]) |
---|
| 58 | AS_HELP_STRING([--disable-gui], [do not build the GUI @<:@default@:>@]), |
---|
| 59 | [], [enable_gui=no]) |
---|
| 60 | AC_MSG_CHECKING([whether to build the GUI]) |
---|
| 61 | if test x"$enable_gui" != x"no"; then |
---|
| 62 | AC_MSG_RESULT([yes]) |
---|
| 63 | else |
---|
| 64 | AC_MSG_RESULT([no]) |
---|
| 65 | fi |
---|
| 66 | if test x"$enable_gui" != x"no"; then |
---|
| 67 | PKG_CHECK_MODULES([GTK], [libgnomecanvasmm-2.6 >= 2.6.0]) |
---|
| 68 | fi |
---|
| 69 | AM_CONDITIONAL([WANT_GUI], [test x"$enable_gui" != x"no"]) |
---|
| 70 | |
---|
| 71 | dnl Disable/enable building the demo programs |
---|
| 72 | AC_ARG_ENABLE([demo], |
---|
| 73 | AS_HELP_STRING([--enable-demo], [build the demo programs]) |
---|
| 74 | AS_HELP_STRING([--disable-demo], [do not build the demo programs @<:@default@:>@]), |
---|
| 75 | [], [enable_demo=no]) |
---|
| 76 | AC_MSG_CHECKING([whether to build the demo programs]) |
---|
| 77 | if test x"$enable_demo" != x"no"; then |
---|
| 78 | AC_MSG_RESULT([yes]) |
---|
| 79 | else |
---|
| 80 | AC_MSG_RESULT([no]) |
---|
| 81 | fi |
---|
| 82 | AM_CONDITIONAL([WANT_DEMO], [test x"$enable_demo" != x"no"]) |
---|
| 83 | |
---|
| 84 | dnl Disable/enable building the benchmarks |
---|
| 85 | AC_ARG_ENABLE([benchmark], |
---|
| 86 | AS_HELP_STRING([--enable-benchmark], [build the benchmarks]) |
---|
| 87 | AS_HELP_STRING([--disable-benchmark], [do not build the benchmarks @<:@default@:>@]), |
---|
| 88 | [], [enable_benchmark=no]) |
---|
| 89 | AC_MSG_CHECKING([whether to build the benchmarks]) |
---|
| 90 | if test x"$enable_benchmark" != x"no"; then |
---|
| 91 | AC_MSG_RESULT([yes]) |
---|
| 92 | else |
---|
| 93 | AC_MSG_RESULT([no]) |
---|
| 94 | fi |
---|
| 95 | AM_CONDITIONAL([WANT_BENCHMARK], [test x"$enable_benchmark" != x"no"]) |
---|
| 96 | |
---|
| 97 | dnl Checks for header files. |
---|
| 98 | AC_CHECK_HEADERS(limits.h sys/time.h sys/times.h unistd.h) |
---|
[1370] | 99 | |
---|
[542] | 100 | dnl Checks for header files. |
---|
[774] | 101 | AC_CHECK_HEADERS(limits.h sys/time.h sys/times.h unistd.h) |
---|
[542] | 102 | |
---|
| 103 | dnl Checks for typedefs, structures, and compiler characteristics. |
---|
| 104 | AC_C_CONST |
---|
| 105 | AC_C_INLINE |
---|
| 106 | AC_TYPE_SIZE_T |
---|
| 107 | AC_HEADER_TIME |
---|
| 108 | AC_STRUCT_TM |
---|
| 109 | |
---|
| 110 | dnl Checks for library functions. |
---|
| 111 | AC_HEADER_STDC |
---|
[1108] | 112 | AC_CHECK_FUNCS(gettimeofday times ctime_r) |
---|
[542] | 113 | |
---|
[1304] | 114 | AC_CONFIG_FILES([ |
---|
| 115 | Makefile |
---|
[1483] | 116 | lemon.spec |
---|
[1304] | 117 | autopackage/default.apspec |
---|
| 118 | doc/Makefile |
---|
| 119 | doc/Doxyfile |
---|
[1435] | 120 | lemon/Makefile |
---|
| 121 | lemon/lemon.pc |
---|
| 122 | benchmark/Makefile |
---|
| 123 | demo/Makefile |
---|
| 124 | test/Makefile |
---|
| 125 | gui/Makefile |
---|
[1304] | 126 | ]) |
---|
[1349] | 127 | |
---|
[542] | 128 | AC_OUTPUT |
---|
[1372] | 129 | |
---|
| 130 | echo |
---|
| 131 | echo '****************************** SUMMARY ******************************' |
---|
| 132 | echo |
---|
| 133 | echo Package version............... : $PACKAGE-$VERSION |
---|
| 134 | echo |
---|
| 135 | echo C++ compiler.................. : $CXX |
---|
| 136 | echo C++ compiles flags............ : $CXXFLAGS |
---|
| 137 | echo |
---|
[1373] | 138 | echo GLPK support.................. : $lx_glpk_found |
---|
[1380] | 139 | echo CPLEX support................. : $lx_cplex_found |
---|
[1372] | 140 | echo |
---|
[1863] | 141 | echo build benchmarks.............. : $enable_benchmark |
---|
| 142 | echo build demo programs........... : $enable_demo |
---|
[1404] | 143 | echo build GUI..................... : $enable_gui |
---|
| 144 | echo |
---|
[1372] | 145 | echo The packace will be installed in |
---|
| 146 | echo -n ' ' |
---|
| 147 | echo $prefix. |
---|
| 148 | echo |
---|
| 149 | echo The documentation will be installed in |
---|
| 150 | echo -n ' ' |
---|
[1671] | 151 | eval echo ${datadir}/doc/$PACKAGE. |
---|
[1372] | 152 | echo |
---|
| 153 | echo '*********************************************************************' |
---|
| 154 | |
---|
| 155 | echo |
---|
[1572] | 156 | echo configure complete, now type \'make\' and then \'make install\'. |
---|
[1372] | 157 | echo |
---|