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