configure.ac
changeset 802 994c7df296c9
parent 678 d1e1cd94bf49
child 744 f8c468367dab
child 929 d3b041452dd8
     1.1 --- a/configure.ac	Fri Nov 13 12:33:33 2009 +0100
     1.2 +++ b/configure.ac	Thu Dec 10 17:05:35 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 @@ -52,27 +55,19 @@
    1.36  fi
    1.37  
    1.38  dnl Set custom compiler flags when using g++.
    1.39 -if test x"$lx_cmdline_cxxflags_set" != x"set" -a "$GXX" = yes -a "$ICC" = no; then
    1.40 -  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.41 +if test "$GXX" = yes -a "$ICC" = no; then
    1.42 +  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.43  fi
    1.44 +AC_SUBST([WARNINGCXXFLAGS])
    1.45  
    1.46  dnl Checks for libraries.
    1.47 -#LX_CHECK_GLPK
    1.48 -#LX_CHECK_CPLEX
    1.49 -#LX_CHECK_SOPLEX
    1.50 +LX_CHECK_GLPK
    1.51 +LX_CHECK_CPLEX
    1.52 +LX_CHECK_SOPLEX
    1.53 +LX_CHECK_COIN
    1.54  
    1.55 -dnl Disable/enable building the demo programs.
    1.56 -AC_ARG_ENABLE([demo],
    1.57 -AS_HELP_STRING([--enable-demo], [build the demo programs])
    1.58 -AS_HELP_STRING([--disable-demo], [do not build the demo programs @<:@default@:>@]),
    1.59 -              [], [enable_demo=no])
    1.60 -AC_MSG_CHECKING([whether to build the demo programs])
    1.61 -if test x"$enable_demo" != x"no"; then
    1.62 -  AC_MSG_RESULT([yes])
    1.63 -else
    1.64 -  AC_MSG_RESULT([no])
    1.65 -fi
    1.66 -AM_CONDITIONAL([WANT_DEMO], [test x"$enable_demo" != x"no"])
    1.67 +AM_CONDITIONAL([HAVE_LP], [test x"$lx_lp_found" = x"yes"])
    1.68 +AM_CONDITIONAL([HAVE_MIP], [test x"$lx_mip_found" = x"yes"])
    1.69  
    1.70  dnl Disable/enable building the binary tools.
    1.71  AC_ARG_ENABLE([tools],
    1.72 @@ -107,6 +102,7 @@
    1.73  
    1.74  AC_CONFIG_FILES([
    1.75  Makefile
    1.76 +demo/Makefile
    1.77  cmake/version.cmake
    1.78  doc/Doxyfile
    1.79  lemon/lemon.pc
    1.80 @@ -120,15 +116,16 @@
    1.81  echo Package version............... : $PACKAGE-$VERSION
    1.82  echo
    1.83  echo C++ compiler.................. : $CXX
    1.84 -echo C++ compiles flags............ : $CXXFLAGS
    1.85 +echo C++ compiles flags............ : $WARNINGCXXFLAGS $CXXFLAGS
    1.86  echo
    1.87  echo Compiler supports long long... : $long_long_found
    1.88  echo
    1.89 -#echo GLPK support.................. : $lx_glpk_found
    1.90 -#echo CPLEX support................. : $lx_cplex_found
    1.91 -#echo SOPLEX support................ : $lx_soplex_found
    1.92 -#echo
    1.93 -echo Build demo programs........... : $enable_demo
    1.94 +echo GLPK support.................. : $lx_glpk_found
    1.95 +echo CPLEX support................. : $lx_cplex_found
    1.96 +echo SOPLEX support................ : $lx_soplex_found
    1.97 +echo CLP support................... : $lx_clp_found
    1.98 +echo CBC support................... : $lx_cbc_found
    1.99 +echo
   1.100  echo Build additional tools........ : $enable_tools
   1.101  echo
   1.102  echo The packace will be installed in