ladanyi@1: dnl Process this file with autoconf to produce a configure script. ladanyi@1: ladanyi@1: dnl Version information. ladanyi@1: m4_define([lemon_version_major], [0]) ladanyi@1: m4_define([lemon_version_minor], [6]) ladanyi@1: m4_define([lemon_version_micro], [90]) ladanyi@1: m4_define([lemon_version_nano], []) ladanyi@1: m4_define([lemon_version_tag], [hg]) alpar@18: m4_define([lemon_hg_revision], [m4_normalize(esyscmd([hg id]))]) alpar@17: m4_define([lemon_version], [lemon_version_major().lemon_version_minor()ifelse(lemon_version_micro(), [], [], [.lemon_version_micro()])ifelse(lemon_version_nano(), [], [], [.lemon_version_nano()])ifelse(lemon_version_tag(), [], [], lemon_version_tag(), [hg], [[_]lemon_version_tag()[_]lemon_hg_revision()], [[_]lemon_version_tag()])]) ladanyi@1: ladanyi@1: AC_PREREQ([2.59]) ladanyi@1: AC_INIT([LEMON], [lemon_version()], [etik-ol@cs.elte.hu], [lemon]) ladanyi@1: AC_CONFIG_AUX_DIR([build-aux]) ladanyi@1: AC_CONFIG_MACRO_DIR([m4]) ladanyi@1: AM_INIT_AUTOMAKE([-Wall -Werror foreign subdir-objects]) ladanyi@1: AC_CONFIG_SRCDIR([lemon/list_graph.h]) ladanyi@1: AC_CONFIG_HEADERS([config.h lemon/config.h]) ladanyi@1: ladanyi@1: lx_cmdline_cxxflags_set=${CXXFLAGS+set} ladanyi@1: 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@1: if test x"$lx_cmdline_cxxflags_set" != x"set" -a "$GXX" = yes; then ladanyi@1: 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" ladanyi@1: fi ladanyi@1: ladanyi@1: AC_CHECK_PROG([doxygen_found],[doxygen],[yes],[no]) ladanyi@1: ladanyi@1: dnl Checks for libraries. ladanyi@1: LX_CHECK_GLPK ladanyi@1: LX_CHECK_CPLEX ladanyi@1: LX_CHECK_SOPLEX ladanyi@1: ladanyi@1: dnl Enable/disable installing the documentation ladanyi@1: AC_ARG_ENABLE([doc], ladanyi@1: AS_HELP_STRING([--enable-doc@<:@=yes|no|full@:>@], [build the documentation (full enables internal documentation too) @<:@default=yes@:>@]) ladanyi@1: AS_HELP_STRING([--disable-doc], [do not build the documentation]), ladanyi@1: [], [enable_doc=yes]) ladanyi@1: ladanyi@1: AC_MSG_CHECKING([whether to build the documention]) ladanyi@1: case "$enable_doc" in ladanyi@1: yes) ladanyi@1: DOXYGEN_INTERNAL_DOCS=NO ladanyi@1: AC_MSG_RESULT([yes]) ladanyi@1: ;; ladanyi@1: full) ladanyi@1: DOXYGEN_INTERNAL_DOCS=YES ladanyi@1: AC_MSG_RESULT([full]) ladanyi@1: ;; ladanyi@1: no) ladanyi@1: DOXYGEN_INTERNAL_DOCS=NO ladanyi@1: AC_MSG_RESULT([no]) ladanyi@1: ;; ladanyi@1: *) ladanyi@1: AC_MSG_ERROR([bad value $enable_doc for option --enable-doc]) ladanyi@1: ;; ladanyi@1: esac ladanyi@1: AC_SUBST(DOXYGEN_INTERNAL_DOCS) ladanyi@1: AM_CONDITIONAL([WANT_DOC], [test x"$enable_doc" != x"no"]) ladanyi@1: ladanyi@1: dnl Disable/enable building the demo programs ladanyi@1: AC_ARG_ENABLE([demo], ladanyi@1: AS_HELP_STRING([--enable-demo], [build the demo programs]) ladanyi@1: AS_HELP_STRING([--disable-demo], [do not build the demo programs @<:@default@:>@]), ladanyi@1: [], [enable_demo=no]) ladanyi@1: AC_MSG_CHECKING([whether to build the demo programs]) ladanyi@1: if test x"$enable_demo" != 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_DEMO], [test x"$enable_demo" != x"no"]) ladanyi@1: ladanyi@1: 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 Disable/enable building the benchmarks ladanyi@1: AC_ARG_ENABLE([benchmark], ladanyi@1: AS_HELP_STRING([--enable-benchmark], [build the benchmarks]) ladanyi@1: AS_HELP_STRING([--disable-benchmark], [do not build the benchmarks @<:@default@:>@]), ladanyi@1: [], [enable_benchmark=no]) ladanyi@1: AC_MSG_CHECKING([whether to build the benchmarks]) ladanyi@1: if test x"$enable_benchmark" != 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_BENCHMARK], [test x"$enable_benchmark" != 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: ladanyi@1: AC_CONFIG_FILES([ ladanyi@1: Makefile 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@1: echo C++ compiles flags............ : $CXXFLAGS ladanyi@1: echo ladanyi@1: echo GLPK support.................. : $lx_glpk_found ladanyi@1: echo CPLEX support................. : $lx_cplex_found ladanyi@1: echo SOPLEX support................ : $lx_soplex_found ladanyi@1: echo ladanyi@1: echo build benchmarks.............. : $enable_benchmark ladanyi@1: echo build demo programs........... : $enable_demo ladanyi@1: 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 The documentation will be installed in ladanyi@1: echo -n ' ' ladanyi@1: eval echo ${datadir}/doc/$PACKAGE. ladanyi@1: echo ladanyi@1: echo '*********************************************************************' ladanyi@1: ladanyi@1: echo ladanyi@1: echo configure complete, now type \'make\' and then \'make install\'. ladanyi@1: echo