ladanyi@1: dnl Process this file with autoconf to produce a configure script. ladanyi@1: ladanyi@1: dnl Version information. alpar@273: m4_define([lemon_version_number], alpar@273: [m4_normalize(esyscmd([echo ${LEMON_VERSION}]))]) alpar@273: dnl m4_define([lemon_version_number], []) alpar@273: m4_define([lemon_hg_path], [m4_normalize(esyscmd([./scripts/chg-len.py]))]) alpar@19: m4_define([lemon_hg_revision], [m4_normalize(esyscmd([hg id -i]))]) alpar@273: m4_define([lemon_version], [ifelse(lemon_version_number(), alpar@273: [], alpar@273: [lemon_hg_path().lemon_hg_revision()], alpar@273: [lemon_version_number()])]) ladanyi@1: ladanyi@1: AC_PREREQ([2.59]) ladanyi@236: AC_INIT([LEMON], [lemon_version()], [lemon-user@lemon.cs.elte.hu], [lemon]) ladanyi@1: AC_CONFIG_AUX_DIR([build-aux]) ladanyi@1: AC_CONFIG_MACRO_DIR([m4]) ladanyi@64: AM_INIT_AUTOMAKE([-Wall -Werror foreign subdir-objects nostdinc]) ladanyi@1: AC_CONFIG_SRCDIR([lemon/list_graph.h]) ladanyi@1: AC_CONFIG_HEADERS([config.h lemon/config.h]) ladanyi@1: ladanyi@680: AC_DEFINE([LEMON_VERSION], [lemon_version()], [The version string]) ladanyi@680: ladanyi@296: dnl Do compilation tests using the C++ compiler. ladanyi@296: AC_LANG([C++]) ladanyi@296: alpar@496: dnl Check the existence of long long type. alpar@496: AC_CHECK_TYPE(long long, [long_long_found=yes], [long_long_found=no]) alpar@496: if test x"$long_long_found" = x"yes"; then ladanyi@621: AC_DEFINE([LEMON_HAVE_LONG_LONG], [1], [Define to 1 if you have long long.]) alpar@496: fi alpar@496: ladanyi@1: dnl Checks for programs. ladanyi@1: AC_PROG_CXX ladanyi@1: AC_PROG_CXXCPP ladanyi@1: AC_PROG_INSTALL ladanyi@1: AC_DISABLE_SHARED ladanyi@1: AC_PROG_LIBTOOL ladanyi@1: ladanyi@60: AC_CHECK_PROG([doxygen_found],[doxygen],[yes],[no]) ladanyi@153: AC_CHECK_PROG([gs_found],[gs],[yes],[no]) ladanyi@60: ladanyi@296: dnl Detect Intel compiler. ladanyi@296: AC_MSG_CHECKING([whether we are using the Intel C++ compiler]) ladanyi@296: AC_COMPILE_IFELSE([#ifndef __INTEL_COMPILER ladanyi@296: choke me ladanyi@296: #endif], [ICC=[yes]], [ICC=[no]]) ladanyi@296: if test x"$ICC" = x"yes"; then ladanyi@296: AC_MSG_RESULT([yes]) ladanyi@296: else ladanyi@296: AC_MSG_RESULT([no]) ladanyi@296: fi ladanyi@296: alpar@225: dnl Set custom compiler flags when using g++. ladanyi@363: if test "$GXX" = yes -a "$ICC" = no; then ladanyi@363: 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" ladanyi@1: fi ladanyi@363: AC_SUBST([WARNINGCXXFLAGS]) ladanyi@1: ladanyi@1: dnl Checks for libraries. deba@458: LX_CHECK_GLPK deba@458: LX_CHECK_CPLEX deba@458: LX_CHECK_SOPLEX ladanyi@560: LX_CHECK_COIN ladanyi@1: alpar@457: AM_CONDITIONAL([HAVE_LP], [test x"$lx_lp_found" = x"yes"]) alpar@457: AM_CONDITIONAL([HAVE_MIP], [test x"$lx_mip_found" = x"yes"]) ladanyi@1: alpar@225: dnl Disable/enable building the binary tools. ladanyi@1: AC_ARG_ENABLE([tools], ladanyi@1: AS_HELP_STRING([--enable-tools], [build additional tools @<:@default@:>@]) ladanyi@1: AS_HELP_STRING([--disable-tools], [do not build additional tools]), ladanyi@1: [], [enable_tools=yes]) ladanyi@1: AC_MSG_CHECKING([whether to build the additional tools]) ladanyi@1: if test x"$enable_tools" != x"no"; then ladanyi@1: AC_MSG_RESULT([yes]) ladanyi@1: else ladanyi@1: AC_MSG_RESULT([no]) ladanyi@1: fi ladanyi@1: AM_CONDITIONAL([WANT_TOOLS], [test x"$enable_tools" != x"no"]) ladanyi@1: ladanyi@1: dnl Checks for header files. ladanyi@1: AC_CHECK_HEADERS(limits.h sys/time.h sys/times.h unistd.h) ladanyi@1: ladanyi@1: dnl Checks for typedefs, structures, and compiler characteristics. ladanyi@1: AC_C_CONST ladanyi@1: AC_C_INLINE ladanyi@1: AC_TYPE_SIZE_T ladanyi@1: AC_HEADER_TIME ladanyi@1: AC_STRUCT_TM ladanyi@1: ladanyi@1: dnl Checks for library functions. ladanyi@1: AC_HEADER_STDC ladanyi@1: AC_CHECK_FUNCS(gettimeofday times ctime_r) ladanyi@1: alpar@219: dnl Add dependencies on files generated by configure. alpar@219: AC_SUBST([CONFIG_STATUS_DEPENDENCIES], alpar@480: ['$(top_srcdir)/doc/Doxyfile.in $(top_srcdir)/lemon/lemon.pc.in $(top_srcdir)/cmake/version.cmake.in']) alpar@219: ladanyi@1: AC_CONFIG_FILES([ ladanyi@1: Makefile ladanyi@556: demo/Makefile alpar@480: cmake/version.cmake ladanyi@1: doc/Doxyfile ladanyi@1: lemon/lemon.pc ladanyi@1: ]) ladanyi@1: ladanyi@1: AC_OUTPUT ladanyi@1: ladanyi@1: echo ladanyi@1: echo '****************************** SUMMARY ******************************' ladanyi@1: echo ladanyi@1: echo Package version............... : $PACKAGE-$VERSION ladanyi@1: echo ladanyi@1: echo C++ compiler.................. : $CXX ladanyi@363: echo C++ compiles flags............ : $WARNINGCXXFLAGS $CXXFLAGS ladanyi@1: echo alpar@496: echo Compiler supports long long... : $long_long_found alpar@496: echo deba@458: echo GLPK support.................. : $lx_glpk_found deba@458: echo CPLEX support................. : $lx_cplex_found deba@458: echo SOPLEX support................ : $lx_soplex_found deba@459: echo CLP support................... : $lx_clp_found deba@559: echo CBC support................... : $lx_cbc_found deba@458: echo alpar@55: echo Build additional tools........ : $enable_tools ladanyi@1: echo ladanyi@1: echo The packace will be installed in ladanyi@1: echo -n ' ' ladanyi@1: echo $prefix. ladanyi@1: echo ladanyi@1: echo '*********************************************************************' ladanyi@1: ladanyi@1: echo alpar@55: echo Configure complete, now type \'make\' and then \'make install\'. ladanyi@1: echo