1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/configure.ac Tue Dec 18 10:56:09 2007 +0100
1.3 @@ -0,0 +1,156 @@
1.4 +dnl Process this file with autoconf to produce a configure script.
1.5 +
1.6 +dnl Version information.
1.7 +m4_define([lemon_version_major], [0])
1.8 +m4_define([lemon_version_minor], [6])
1.9 +m4_define([lemon_version_micro], [90])
1.10 +m4_define([lemon_version_nano], [])
1.11 +m4_define([lemon_version_tag], [hg])
1.12 +m4_define([lemon_hg_revision], [m4_normalize(esyscmd([hg tip |grep ^changeset |cut -d ':' -f 3]))])
1.13 +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()])])
1.14 +
1.15 +AC_PREREQ([2.59])
1.16 +AC_INIT([LEMON], [lemon_version()], [etik-ol@cs.elte.hu], [lemon])
1.17 +AC_CONFIG_AUX_DIR([build-aux])
1.18 +AC_CONFIG_MACRO_DIR([m4])
1.19 +AM_INIT_AUTOMAKE([-Wall -Werror foreign subdir-objects])
1.20 +AC_CONFIG_SRCDIR([lemon/list_graph.h])
1.21 +AC_CONFIG_HEADERS([config.h lemon/config.h])
1.22 +
1.23 +lx_cmdline_cxxflags_set=${CXXFLAGS+set}
1.24 +
1.25 +dnl Checks for programs.
1.26 +AC_PROG_CXX
1.27 +AC_PROG_CXXCPP
1.28 +AC_PROG_INSTALL
1.29 +AC_DISABLE_SHARED
1.30 +AC_PROG_LIBTOOL
1.31 +
1.32 +if test x"$lx_cmdline_cxxflags_set" != x"set" -a "$GXX" = yes; then
1.33 + 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.34 +fi
1.35 +
1.36 +AC_CHECK_PROG([doxygen_found],[doxygen],[yes],[no])
1.37 +
1.38 +dnl Checks for libraries.
1.39 +LX_CHECK_GLPK
1.40 +LX_CHECK_CPLEX
1.41 +LX_CHECK_SOPLEX
1.42 +
1.43 +dnl Enable/disable installing the documentation
1.44 +AC_ARG_ENABLE([doc],
1.45 +AS_HELP_STRING([--enable-doc@<:@=yes|no|full@:>@], [build the documentation (full enables internal documentation too) @<:@default=yes@:>@])
1.46 +AS_HELP_STRING([--disable-doc], [do not build the documentation]),
1.47 + [], [enable_doc=yes])
1.48 +
1.49 +AC_MSG_CHECKING([whether to build the documention])
1.50 +case "$enable_doc" in
1.51 + yes)
1.52 + DOXYGEN_INTERNAL_DOCS=NO
1.53 + AC_MSG_RESULT([yes])
1.54 + ;;
1.55 + full)
1.56 + DOXYGEN_INTERNAL_DOCS=YES
1.57 + AC_MSG_RESULT([full])
1.58 + ;;
1.59 + no)
1.60 + DOXYGEN_INTERNAL_DOCS=NO
1.61 + AC_MSG_RESULT([no])
1.62 + ;;
1.63 + *)
1.64 + AC_MSG_ERROR([bad value $enable_doc for option --enable-doc])
1.65 + ;;
1.66 +esac
1.67 +AC_SUBST(DOXYGEN_INTERNAL_DOCS)
1.68 +AM_CONDITIONAL([WANT_DOC], [test x"$enable_doc" != x"no"])
1.69 +
1.70 +dnl Disable/enable building the demo programs
1.71 +AC_ARG_ENABLE([demo],
1.72 +AS_HELP_STRING([--enable-demo], [build the demo programs])
1.73 +AS_HELP_STRING([--disable-demo], [do not build the demo programs @<:@default@:>@]),
1.74 + [], [enable_demo=no])
1.75 +AC_MSG_CHECKING([whether to build the demo programs])
1.76 +if test x"$enable_demo" != x"no"; then
1.77 + AC_MSG_RESULT([yes])
1.78 +else
1.79 + AC_MSG_RESULT([no])
1.80 +fi
1.81 +AM_CONDITIONAL([WANT_DEMO], [test x"$enable_demo" != x"no"])
1.82 +
1.83 +dnl Disable/enable building the binary tools
1.84 +AC_ARG_ENABLE([tools],
1.85 +AS_HELP_STRING([--enable-tools], [build additional tools @<:@default@:>@])
1.86 +AS_HELP_STRING([--disable-tools], [do not build additional tools]),
1.87 + [], [enable_tools=yes])
1.88 +AC_MSG_CHECKING([whether to build the additional tools])
1.89 +if test x"$enable_tools" != x"no"; then
1.90 + AC_MSG_RESULT([yes])
1.91 +else
1.92 + AC_MSG_RESULT([no])
1.93 +fi
1.94 +AM_CONDITIONAL([WANT_TOOLS], [test x"$enable_tools" != x"no"])
1.95 +
1.96 +dnl Disable/enable building the benchmarks
1.97 +AC_ARG_ENABLE([benchmark],
1.98 +AS_HELP_STRING([--enable-benchmark], [build the benchmarks])
1.99 +AS_HELP_STRING([--disable-benchmark], [do not build the benchmarks @<:@default@:>@]),
1.100 + [], [enable_benchmark=no])
1.101 +AC_MSG_CHECKING([whether to build the benchmarks])
1.102 +if test x"$enable_benchmark" != x"no"; then
1.103 + AC_MSG_RESULT([yes])
1.104 +else
1.105 + AC_MSG_RESULT([no])
1.106 +fi
1.107 +AM_CONDITIONAL([WANT_BENCHMARK], [test x"$enable_benchmark" != x"no"])
1.108 +
1.109 +dnl Checks for header files.
1.110 +AC_CHECK_HEADERS(limits.h sys/time.h sys/times.h unistd.h)
1.111 +
1.112 +dnl Checks for typedefs, structures, and compiler characteristics.
1.113 +AC_C_CONST
1.114 +AC_C_INLINE
1.115 +AC_TYPE_SIZE_T
1.116 +AC_HEADER_TIME
1.117 +AC_STRUCT_TM
1.118 +
1.119 +dnl Checks for library functions.
1.120 +AC_HEADER_STDC
1.121 +AC_CHECK_FUNCS(gettimeofday times ctime_r)
1.122 +
1.123 +AC_CONFIG_FILES([
1.124 +Makefile
1.125 +doc/Doxyfile
1.126 +lemon/lemon.pc
1.127 +])
1.128 +
1.129 +AC_OUTPUT
1.130 +
1.131 +echo
1.132 +echo '****************************** SUMMARY ******************************'
1.133 +echo
1.134 +echo Package version............... : $PACKAGE-$VERSION
1.135 +echo
1.136 +echo C++ compiler.................. : $CXX
1.137 +echo C++ compiles flags............ : $CXXFLAGS
1.138 +echo
1.139 +echo GLPK support.................. : $lx_glpk_found
1.140 +echo CPLEX support................. : $lx_cplex_found
1.141 +echo SOPLEX support................ : $lx_soplex_found
1.142 +echo
1.143 +echo build benchmarks.............. : $enable_benchmark
1.144 +echo build demo programs........... : $enable_demo
1.145 +echo build additional tools........ : $enable_tools
1.146 +echo
1.147 +echo The packace will be installed in
1.148 +echo -n ' '
1.149 +echo $prefix.
1.150 +echo
1.151 +echo The documentation will be installed in
1.152 +echo -n ' '
1.153 +eval echo ${datadir}/doc/$PACKAGE.
1.154 +echo
1.155 +echo '*********************************************************************'
1.156 +
1.157 +echo
1.158 +echo configure complete, now type \'make\' and then \'make install\'.
1.159 +echo