1.1 --- a/configure.ac Fri Oct 16 10:21:37 2009 +0200
1.2 +++ b/configure.ac Thu Nov 05 15:50:01 2009 +0100
1.3 @@ -2,14 +2,17 @@
1.4
1.5 dnl Version information.
1.6 m4_define([lemon_version_number],
1.7 - [m4_normalize(esyscmd([echo ${LEMON_VERSION}]))])
1.8 + [m4_normalize(esyscmd([echo ${LEMON_VERSION}]))])
1.9 dnl m4_define([lemon_version_number], [])
1.10 m4_define([lemon_hg_path], [m4_normalize(esyscmd([./scripts/chg-len.py]))])
1.11 -m4_define([lemon_hg_revision], [m4_normalize(esyscmd([hg id -i]))])
1.12 +m4_define([lemon_hg_revision], [m4_normalize(esyscmd([hg id -i 2> /dev/null]))])
1.13 m4_define([lemon_version], [ifelse(lemon_version_number(),
1.14 - [],
1.15 - [lemon_hg_path().lemon_hg_revision()],
1.16 - [lemon_version_number()])])
1.17 + [],
1.18 + [ifelse(lemon_hg_revision(),
1.19 + [],
1.20 + [hg-tip],
1.21 + [lemon_hg_path().lemon_hg_revision()])],
1.22 + [lemon_version_number()])])
1.23
1.24 AC_PREREQ([2.59])
1.25 AC_INIT([LEMON], [lemon_version()], [lemon-user@lemon.cs.elte.hu], [lemon])
1.26 @@ -19,7 +22,7 @@
1.27 AC_CONFIG_SRCDIR([lemon/list_graph.h])
1.28 AC_CONFIG_HEADERS([config.h lemon/config.h])
1.29
1.30 -lx_cmdline_cxxflags_set=${CXXFLAGS+set}
1.31 +AC_DEFINE([LEMON_VERSION], [lemon_version()], [The version string])
1.32
1.33 dnl Do compilation tests using the C++ compiler.
1.34 AC_LANG([C++])
1.35 @@ -38,6 +41,7 @@
1.36 AC_PROG_LIBTOOL
1.37
1.38 AC_CHECK_PROG([doxygen_found],[doxygen],[yes],[no])
1.39 +AC_CHECK_PROG([python_found],[python],[yes],[no])
1.40 AC_CHECK_PROG([gs_found],[gs],[yes],[no])
1.41
1.42 dnl Detect Intel compiler.
1.43 @@ -52,27 +56,19 @@
1.44 fi
1.45
1.46 dnl Set custom compiler flags when using g++.
1.47 -if test x"$lx_cmdline_cxxflags_set" != x"set" -a "$GXX" = yes -a "$ICC" = no; then
1.48 - 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"
1.49 +if test "$GXX" = yes -a "$ICC" = no; then
1.50 + WARNINGCXXFLAGS="-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 -ansi -fno-strict-aliasing -Wold-style-cast -Wno-unknown-pragmas"
1.51 fi
1.52 +AC_SUBST([WARNINGCXXFLAGS])
1.53
1.54 dnl Checks for libraries.
1.55 -#LX_CHECK_GLPK
1.56 -#LX_CHECK_CPLEX
1.57 -#LX_CHECK_SOPLEX
1.58 +LX_CHECK_GLPK
1.59 +LX_CHECK_CPLEX
1.60 +LX_CHECK_SOPLEX
1.61 +LX_CHECK_COIN
1.62
1.63 -dnl Disable/enable building the demo programs.
1.64 -AC_ARG_ENABLE([demo],
1.65 -AS_HELP_STRING([--enable-demo], [build the demo programs])
1.66 -AS_HELP_STRING([--disable-demo], [do not build the demo programs @<:@default@:>@]),
1.67 - [], [enable_demo=no])
1.68 -AC_MSG_CHECKING([whether to build the demo programs])
1.69 -if test x"$enable_demo" != x"no"; then
1.70 - AC_MSG_RESULT([yes])
1.71 -else
1.72 - AC_MSG_RESULT([no])
1.73 -fi
1.74 -AM_CONDITIONAL([WANT_DEMO], [test x"$enable_demo" != x"no"])
1.75 +AM_CONDITIONAL([HAVE_LP], [test x"$lx_lp_found" = x"yes"])
1.76 +AM_CONDITIONAL([HAVE_MIP], [test x"$lx_mip_found" = x"yes"])
1.77
1.78 dnl Disable/enable building the binary tools.
1.79 AC_ARG_ENABLE([tools],
1.80 @@ -107,6 +103,7 @@
1.81
1.82 AC_CONFIG_FILES([
1.83 Makefile
1.84 +demo/Makefile
1.85 cmake/version.cmake
1.86 doc/Doxyfile
1.87 lemon/lemon.pc
1.88 @@ -120,15 +117,16 @@
1.89 echo Package version............... : $PACKAGE-$VERSION
1.90 echo
1.91 echo C++ compiler.................. : $CXX
1.92 -echo C++ compiles flags............ : $CXXFLAGS
1.93 +echo C++ compiles flags............ : $WARNINGCXXFLAGS $CXXFLAGS
1.94 echo
1.95 echo Compiler supports long long... : $long_long_found
1.96 echo
1.97 -#echo GLPK support.................. : $lx_glpk_found
1.98 -#echo CPLEX support................. : $lx_cplex_found
1.99 -#echo SOPLEX support................ : $lx_soplex_found
1.100 -#echo
1.101 -echo Build demo programs........... : $enable_demo
1.102 +echo GLPK support.................. : $lx_glpk_found
1.103 +echo CPLEX support................. : $lx_cplex_found
1.104 +echo SOPLEX support................ : $lx_soplex_found
1.105 +echo CLP support................... : $lx_clp_found
1.106 +echo CBC support................... : $lx_cbc_found
1.107 +echo
1.108 echo Build additional tools........ : $enable_tools
1.109 echo
1.110 echo The packace will be installed in