ladanyi@2647: dnl Process this file with autoconf to produce a configure script. ladanyi@2647: AC_PREREQ([2.59]) ladanyi@2647: AC_INIT([LEMON], [svn-head], [etik-ol@cs.elte.hu], [lemon]) ladanyi@2647: AC_CONFIG_AUX_DIR([build-aux]) ladanyi@2647: AC_CONFIG_MACRO_DIR([m4]) ladanyi@2647: AM_INIT_AUTOMAKE([-Wall -Werror foreign subdir-objects]) ladanyi@2647: dnl AC_CONFIG_SRCDIR([lemon/list_graph.h]) ladanyi@2647: AC_CONFIG_HEADERS([config.h lemon/config.h]) ladanyi@2647: ladanyi@2647: lx_cmdline_cxxflags_set=${CXXFLAGS+set} ladanyi@2647: ladanyi@2647: dnl Checks for programs. ladanyi@2647: AC_PROG_CXX ladanyi@2647: AC_PROG_CXXCPP ladanyi@2647: AC_PROG_INSTALL ladanyi@2647: AC_DISABLE_SHARED ladanyi@2647: AC_PROG_LIBTOOL ladanyi@2647: ladanyi@2647: if test x"$lx_cmdline_cxxflags_set" != x"set" -a "$GXX" = yes; then ladanyi@2647: CXXFLAGS="$CXXFLAGS -Wall -W" ladanyi@2647: fi ladanyi@2647: ladanyi@2647: AC_CHECK_PROG([doxygen_found],[doxygen],[yes],[no]) ladanyi@2647: ladanyi@2647: dnl Checks for libraries. ladanyi@2647: LX_CHECK_GLPK ladanyi@2647: LX_CHECK_CPLEX ladanyi@2647: ladanyi@2647: dnl Enable/disable installing the documentation ladanyi@2647: AC_ARG_ENABLE([doc], ladanyi@2647: AS_HELP_STRING([--enable-doc@<:@=yes|no|full@:>@], [build the documentation (full enables internal documentation too) @<:@default=yes@:>@]) ladanyi@2647: AS_HELP_STRING([--disable-doc], [do not build the documentation]), ladanyi@2647: [], [enable_doc=yes]) ladanyi@2647: ladanyi@2647: AC_MSG_CHECKING([whether to build the documention]) ladanyi@2647: case "$enable_doc" in ladanyi@2647: yes) ladanyi@2647: DOXYGEN_INTERNAL_DOCS=NO ladanyi@2647: AC_MSG_RESULT([yes]) ladanyi@2647: ;; ladanyi@2647: full) ladanyi@2647: DOXYGEN_INTERNAL_DOCS=YES ladanyi@2647: AC_MSG_RESULT([full]) ladanyi@2647: ;; ladanyi@2647: no) ladanyi@2647: DOXYGEN_INTERNAL_DOCS=NO ladanyi@2647: AC_MSG_RESULT([no]) ladanyi@2647: ;; ladanyi@2647: *) ladanyi@2647: AC_MSG_ERROR([bad value $enable_doc for option --enable-doc]) ladanyi@2647: ;; ladanyi@2647: esac ladanyi@2647: AC_SUBST(DOXYGEN_INTERNAL_DOCS) ladanyi@2647: AM_CONDITIONAL([WANT_DOC], [test x"$enable_doc" != x"no"]) ladanyi@2647: ladanyi@2647: dnl Disable/enable building the demo programs ladanyi@2647: AC_ARG_ENABLE([demo], ladanyi@2647: AS_HELP_STRING([--enable-demo], [build the demo programs]) ladanyi@2647: AS_HELP_STRING([--disable-demo], [do not build the demo programs @<:@default@:>@]), ladanyi@2647: [], [enable_demo=no]) ladanyi@2647: AC_MSG_CHECKING([whether to build the demo programs]) ladanyi@2647: if test x"$enable_demo" != x"no"; then ladanyi@2647: AC_MSG_RESULT([yes]) ladanyi@2647: else ladanyi@2647: AC_MSG_RESULT([no]) ladanyi@2647: fi ladanyi@2647: AM_CONDITIONAL([WANT_DEMO], [test x"$enable_demo" != x"no"]) ladanyi@2647: ladanyi@2647: dnl Disable/enable building the benchmarks ladanyi@2647: AC_ARG_ENABLE([benchmark], ladanyi@2647: AS_HELP_STRING([--enable-benchmark], [build the benchmarks]) ladanyi@2647: AS_HELP_STRING([--disable-benchmark], [do not build the benchmarks @<:@default@:>@]), ladanyi@2647: [], [enable_benchmark=no]) ladanyi@2647: AC_MSG_CHECKING([whether to build the benchmarks]) ladanyi@2647: if test x"$enable_benchmark" != x"no"; then ladanyi@2647: AC_MSG_RESULT([yes]) ladanyi@2647: else ladanyi@2647: AC_MSG_RESULT([no]) ladanyi@2647: fi ladanyi@2647: AM_CONDITIONAL([WANT_BENCHMARK], [test x"$enable_benchmark" != x"no"]) ladanyi@2647: ladanyi@2647: dnl Checks for header files. ladanyi@2647: AC_CHECK_HEADERS(limits.h sys/time.h sys/times.h unistd.h) ladanyi@2647: ladanyi@2647: dnl Checks for typedefs, structures, and compiler characteristics. ladanyi@2647: AC_C_CONST ladanyi@2647: AC_C_INLINE ladanyi@2647: AC_TYPE_SIZE_T ladanyi@2647: AC_HEADER_TIME ladanyi@2647: AC_STRUCT_TM ladanyi@2647: ladanyi@2647: dnl Checks for library functions. ladanyi@2647: AC_HEADER_STDC ladanyi@2647: AC_CHECK_FUNCS(gettimeofday times ctime_r) ladanyi@2647: ladanyi@2647: AC_CONFIG_FILES([ ladanyi@2647: Makefile ladanyi@2647: doc/Doxyfile ladanyi@2647: lemon/lemon.pc ladanyi@2647: ]) ladanyi@2647: dnl lemon.spec ladanyi@2647: dnl autopackage/default.apspec ladanyi@2647: ladanyi@2647: AC_OUTPUT ladanyi@2647: ladanyi@2647: echo ladanyi@2647: echo '****************************** SUMMARY ******************************' ladanyi@2647: echo ladanyi@2647: echo Package version............... : $PACKAGE-$VERSION ladanyi@2647: echo ladanyi@2647: echo C++ compiler.................. : $CXX ladanyi@2647: echo C++ compiles flags............ : $CXXFLAGS ladanyi@2647: echo ladanyi@2647: echo GLPK support.................. : $lx_glpk_found ladanyi@2647: echo CPLEX support................. : $lx_cplex_found ladanyi@2647: echo ladanyi@2647: echo build benchmarks.............. : $enable_benchmark ladanyi@2647: echo build demo programs........... : $enable_demo ladanyi@2647: echo ladanyi@2647: echo The packace will be installed in ladanyi@2647: echo -n ' ' ladanyi@2647: echo $prefix. ladanyi@2647: echo ladanyi@2647: echo The documentation will be installed in ladanyi@2647: echo -n ' ' ladanyi@2647: eval echo ${datadir}/doc/$PACKAGE. ladanyi@2647: echo ladanyi@2647: echo '*********************************************************************' ladanyi@2647: ladanyi@2647: echo ladanyi@2647: echo configure complete, now type \'make\' and then \'make install\'. ladanyi@2647: echo