diff --git a/configure.ac b/configure.ac --- a/configure.ac +++ b/configure.ac @@ -2,14 +2,17 @@ dnl Version information. m4_define([lemon_version_number], - [m4_normalize(esyscmd([echo ${LEMON_VERSION}]))]) + [m4_normalize(esyscmd([echo ${LEMON_VERSION}]))]) dnl m4_define([lemon_version_number], []) m4_define([lemon_hg_path], [m4_normalize(esyscmd([./scripts/chg-len.py]))]) -m4_define([lemon_hg_revision], [m4_normalize(esyscmd([hg id -i]))]) +m4_define([lemon_hg_revision], [m4_normalize(esyscmd([hg id -i 2> /dev/null]))]) m4_define([lemon_version], [ifelse(lemon_version_number(), - [], - [lemon_hg_path().lemon_hg_revision()], - [lemon_version_number()])]) + [], + [ifelse(lemon_hg_revision(), + [], + [hg-tip], + [lemon_hg_path().lemon_hg_revision()])], + [lemon_version_number()])]) AC_PREREQ([2.59]) AC_INIT([LEMON], [lemon_version()], [lemon-user@lemon.cs.elte.hu], [lemon]) @@ -19,7 +22,7 @@ AC_CONFIG_SRCDIR([lemon/list_graph.h]) AC_CONFIG_HEADERS([config.h lemon/config.h]) -lx_cmdline_cxxflags_set=${CXXFLAGS+set} +AC_DEFINE([LEMON_VERSION], [lemon_version()], [The version string]) dnl Do compilation tests using the C++ compiler. AC_LANG([C++]) @@ -52,27 +55,19 @@ fi dnl Set custom compiler flags when using g++. -if test x"$lx_cmdline_cxxflags_set" != x"set" -a "$GXX" = yes -a "$ICC" = no; then - 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" +if test "$GXX" = yes -a "$ICC" = no; then + 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" fi +AC_SUBST([WARNINGCXXFLAGS]) dnl Checks for libraries. -#LX_CHECK_GLPK -#LX_CHECK_CPLEX -#LX_CHECK_SOPLEX +LX_CHECK_GLPK +LX_CHECK_CPLEX +LX_CHECK_SOPLEX +LX_CHECK_COIN -dnl Disable/enable building the demo programs. -AC_ARG_ENABLE([demo], -AS_HELP_STRING([--enable-demo], [build the demo programs]) -AS_HELP_STRING([--disable-demo], [do not build the demo programs @<:@default@:>@]), - [], [enable_demo=no]) -AC_MSG_CHECKING([whether to build the demo programs]) -if test x"$enable_demo" != x"no"; then - AC_MSG_RESULT([yes]) -else - AC_MSG_RESULT([no]) -fi -AM_CONDITIONAL([WANT_DEMO], [test x"$enable_demo" != x"no"]) +AM_CONDITIONAL([HAVE_LP], [test x"$lx_lp_found" = x"yes"]) +AM_CONDITIONAL([HAVE_MIP], [test x"$lx_mip_found" = x"yes"]) dnl Disable/enable building the binary tools. AC_ARG_ENABLE([tools], @@ -107,6 +102,7 @@ AC_CONFIG_FILES([ Makefile +demo/Makefile cmake/version.cmake doc/Doxyfile lemon/lemon.pc @@ -120,15 +116,16 @@ echo Package version............... : $PACKAGE-$VERSION echo echo C++ compiler.................. : $CXX -echo C++ compiles flags............ : $CXXFLAGS +echo C++ compiles flags............ : $WARNINGCXXFLAGS $CXXFLAGS echo echo Compiler supports long long... : $long_long_found echo -#echo GLPK support.................. : $lx_glpk_found -#echo CPLEX support................. : $lx_cplex_found -#echo SOPLEX support................ : $lx_soplex_found -#echo -echo Build demo programs........... : $enable_demo +echo GLPK support.................. : $lx_glpk_found +echo CPLEX support................. : $lx_cplex_found +echo SOPLEX support................ : $lx_soplex_found +echo CLP support................... : $lx_clp_found +echo CBC support................... : $lx_cbc_found +echo echo Build additional tools........ : $enable_tools echo echo The packace will be installed in