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,9 +22,17 @@ AC_CONFIG_SRCDIR([lemon/list_graph.h]) AC_CONFIG_HEADERS([config.h lemon/config.h]) +AC_DEFINE([LEMON_VERSION], [lemon_version()], [The version string]) + dnl Do compilation tests using the C++ compiler. AC_LANG([C++]) +dnl Check the existence of long long type. +AC_CHECK_TYPE(long long, [long_long_found=yes], [long_long_found=no]) +if test x"$long_long_found" = x"yes"; then + AC_DEFINE([LEMON_HAVE_LONG_LONG], [1], [Define to 1 if you have long long.]) +fi + dnl Checks for programs. AC_PROG_CXX AC_PROG_CXXCPP @@ -30,6 +41,7 @@ AC_PROG_LIBTOOL AC_CHECK_PROG([doxygen_found],[doxygen],[yes],[no]) +AC_CHECK_PROG([python_found],[python],[yes],[no]) AC_CHECK_PROG([gs_found],[gs],[yes],[no]) dnl Detect Intel compiler. @@ -53,24 +65,11 @@ LX_CHECK_GLPK LX_CHECK_CPLEX LX_CHECK_SOPLEX -LX_CHECK_CLP +LX_CHECK_COIN 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 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"]) - dnl Disable/enable building the binary tools. AC_ARG_ENABLE([tools], AS_HELP_STRING([--enable-tools], [build additional tools @<:@default@:>@]) @@ -100,10 +99,12 @@ dnl Add dependencies on files generated by configure. AC_SUBST([CONFIG_STATUS_DEPENDENCIES], - ['$(top_srcdir)/doc/Doxyfile.in $(top_srcdir)/lemon/lemon.pc.in']) + ['$(top_srcdir)/doc/Doxyfile.in $(top_srcdir)/lemon/lemon.pc.in $(top_srcdir)/cmake/version.cmake.in']) AC_CONFIG_FILES([ Makefile +demo/Makefile +cmake/version.cmake doc/Doxyfile lemon/lemon.pc ]) @@ -118,12 +119,14 @@ echo C++ compiler.................. : $CXX 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 CLP support................... : $lx_clp_found +echo CBC support................... : $lx_cbc_found echo -echo Build demo programs........... : $enable_demo echo Build additional tools........ : $enable_tools echo echo The packace will be installed in