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