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