[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 |
---|
[2390] | 20 | CXXFLAGS="$CXXFLAGS -Wall -W -Wall -W -Wunused -Wformat=2 -Wctor-dtor-privacy -Wnon-virtual-dtor -Wno-char-subscripts -Wwrite-strings -Wno-char-subscripts -Wreturn-type -Wcast-qual -Wcast-align -Wsign-promo -Woverloaded-virtual -Woverloaded-virtual -ansi -fno-strict-aliasing -Wold-style-cast -Wno-unknown-pragmas" |
---|
[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 |
---|
[2315] | 28 | LX_CHECK_SOPLEX |
---|
[542] | 29 | |
---|
[1863] | 30 | dnl Enable/disable installing the documentation |
---|
| 31 | AC_ARG_ENABLE([doc], |
---|
| 32 | AS_HELP_STRING([--enable-doc@<:@=yes|no|full@:>@], [build the documentation (full enables internal documentation too) @<:@default=yes@:>@]) |
---|
| 33 | AS_HELP_STRING([--disable-doc], [do not build the documentation]), |
---|
| 34 | [], [enable_doc=yes]) |
---|
| 35 | |
---|
| 36 | AC_MSG_CHECKING([whether to build the documention]) |
---|
| 37 | case "$enable_doc" in |
---|
| 38 | yes) |
---|
| 39 | DOXYGEN_INTERNAL_DOCS=NO |
---|
| 40 | AC_MSG_RESULT([yes]) |
---|
| 41 | ;; |
---|
| 42 | full) |
---|
| 43 | DOXYGEN_INTERNAL_DOCS=YES |
---|
| 44 | AC_MSG_RESULT([full]) |
---|
| 45 | ;; |
---|
| 46 | no) |
---|
| 47 | DOXYGEN_INTERNAL_DOCS=NO |
---|
| 48 | AC_MSG_RESULT([no]) |
---|
| 49 | ;; |
---|
| 50 | *) |
---|
| 51 | AC_MSG_ERROR([bad value $enable_doc for option --enable-doc]) |
---|
| 52 | ;; |
---|
| 53 | esac |
---|
| 54 | AC_SUBST(DOXYGEN_INTERNAL_DOCS) |
---|
| 55 | AM_CONDITIONAL([WANT_DOC], [test x"$enable_doc" != x"no"]) |
---|
| 56 | |
---|
| 57 | dnl Disable/enable building the demo programs |
---|
| 58 | AC_ARG_ENABLE([demo], |
---|
| 59 | AS_HELP_STRING([--enable-demo], [build the demo programs]) |
---|
| 60 | AS_HELP_STRING([--disable-demo], [do not build the demo programs @<:@default@:>@]), |
---|
| 61 | [], [enable_demo=no]) |
---|
| 62 | AC_MSG_CHECKING([whether to build the demo programs]) |
---|
| 63 | if test x"$enable_demo" != x"no"; then |
---|
| 64 | AC_MSG_RESULT([yes]) |
---|
| 65 | else |
---|
| 66 | AC_MSG_RESULT([no]) |
---|
| 67 | fi |
---|
| 68 | AM_CONDITIONAL([WANT_DEMO], [test x"$enable_demo" != x"no"]) |
---|
| 69 | |
---|
[2390] | 70 | dnl Disable/enable building the binary tools |
---|
| 71 | AC_ARG_ENABLE([tools], |
---|
| 72 | AS_HELP_STRING([--enable-tools], [build additional tools @<:@default@:>@]) |
---|
| 73 | AS_HELP_STRING([--disable-tools], [do not build additional tools]), |
---|
| 74 | [], [enable_tools=yes]) |
---|
| 75 | AC_MSG_CHECKING([whether to build the additional tools]) |
---|
| 76 | if test x"$enable_tools" != x"no"; then |
---|
| 77 | AC_MSG_RESULT([yes]) |
---|
| 78 | else |
---|
| 79 | AC_MSG_RESULT([no]) |
---|
| 80 | fi |
---|
| 81 | AM_CONDITIONAL([WANT_TOOLS], [test x"$enable_tools" != x"no"]) |
---|
| 82 | |
---|
[1863] | 83 | dnl Disable/enable building the benchmarks |
---|
| 84 | AC_ARG_ENABLE([benchmark], |
---|
| 85 | AS_HELP_STRING([--enable-benchmark], [build the benchmarks]) |
---|
| 86 | AS_HELP_STRING([--disable-benchmark], [do not build the benchmarks @<:@default@:>@]), |
---|
| 87 | [], [enable_benchmark=no]) |
---|
| 88 | AC_MSG_CHECKING([whether to build the benchmarks]) |
---|
| 89 | if test x"$enable_benchmark" != x"no"; then |
---|
| 90 | AC_MSG_RESULT([yes]) |
---|
| 91 | else |
---|
| 92 | AC_MSG_RESULT([no]) |
---|
| 93 | fi |
---|
| 94 | AM_CONDITIONAL([WANT_BENCHMARK], [test x"$enable_benchmark" != x"no"]) |
---|
| 95 | |
---|
| 96 | dnl Checks for header files. |
---|
| 97 | AC_CHECK_HEADERS(limits.h sys/time.h sys/times.h unistd.h) |
---|
[1370] | 98 | |
---|
[542] | 99 | dnl Checks for typedefs, structures, and compiler characteristics. |
---|
| 100 | AC_C_CONST |
---|
| 101 | AC_C_INLINE |
---|
| 102 | AC_TYPE_SIZE_T |
---|
| 103 | AC_HEADER_TIME |
---|
| 104 | AC_STRUCT_TM |
---|
| 105 | |
---|
| 106 | dnl Checks for library functions. |
---|
| 107 | AC_HEADER_STDC |
---|
[1108] | 108 | AC_CHECK_FUNCS(gettimeofday times ctime_r) |
---|
[542] | 109 | |
---|
[1304] | 110 | AC_CONFIG_FILES([ |
---|
| 111 | Makefile |
---|
[1483] | 112 | lemon.spec |
---|
[1304] | 113 | autopackage/default.apspec |
---|
| 114 | doc/Doxyfile |
---|
[1435] | 115 | lemon/lemon.pc |
---|
[1304] | 116 | ]) |
---|
[1349] | 117 | |
---|
[542] | 118 | AC_OUTPUT |
---|
[1372] | 119 | |
---|
| 120 | echo |
---|
| 121 | echo '****************************** SUMMARY ******************************' |
---|
| 122 | echo |
---|
| 123 | echo Package version............... : $PACKAGE-$VERSION |
---|
| 124 | echo |
---|
| 125 | echo C++ compiler.................. : $CXX |
---|
| 126 | echo C++ compiles flags............ : $CXXFLAGS |
---|
| 127 | echo |
---|
[1373] | 128 | echo GLPK support.................. : $lx_glpk_found |
---|
[1380] | 129 | echo CPLEX support................. : $lx_cplex_found |
---|
[2315] | 130 | echo SOPLEX support................ : $lx_soplex_found |
---|
[1372] | 131 | echo |
---|
[1863] | 132 | echo build benchmarks.............. : $enable_benchmark |
---|
| 133 | echo build demo programs........... : $enable_demo |
---|
[2390] | 134 | echo build additional tools........ : $enable_tools |
---|
[1404] | 135 | echo |
---|
[1372] | 136 | echo The packace will be installed in |
---|
| 137 | echo -n ' ' |
---|
| 138 | echo $prefix. |
---|
| 139 | echo |
---|
| 140 | echo The documentation will be installed in |
---|
| 141 | echo -n ' ' |
---|
[1671] | 142 | eval echo ${datadir}/doc/$PACKAGE. |
---|
[1372] | 143 | echo |
---|
| 144 | echo '*********************************************************************' |
---|
| 145 | |
---|
| 146 | echo |
---|
[1572] | 147 | echo configure complete, now type \'make\' and then \'make install\'. |
---|
[1372] | 148 | echo |
---|