configure.ac
author deba
Wed, 25 Jan 2006 14:58:04 +0000
changeset 1904 a64e4735bda6
parent 1671 3c82a0d9e0e7
child 1905 b0b3fa857d72
permissions -rw-r--r--
Bug fix for empty intervall sorting
     1 dnl Process this file with autoconf to produce a configure script.
     2 AC_INIT([LEMON], [0.5], [etik-ol@cs.elte.hu], [lemon])
     3 AC_CONFIG_AUX_DIR([config])
     4 AM_INIT_AUTOMAKE([1.7])
     5 AC_CONFIG_SRCDIR([lemon/invalid.h])
     6 AC_CONFIG_HEADERS([config.h lemon/config.h])
     7 AC_PREREQ([2.59])
     8 
     9 dnl Checks for programs.
    10 AC_PROG_CXX
    11 AC_PROG_CXXCPP
    12 AC_PROG_INSTALL
    13 AC_DISABLE_SHARED
    14 AC_PROG_LIBTOOL
    15 
    16 if test $CXX != icc -a $CXX != icpc; then
    17   CXXFLAGS="$CXXFLAGS -Wall -W"
    18 fi
    19 
    20 AC_CHECK_PROG([doxygen_found],[doxygen],[yes],[no])
    21 
    22 dnl Checks for libraries.
    23 LX_CHECK_GLPK
    24 LX_CHECK_CPLEX
    25 
    26 dnl Enable/disable installing the documentation
    27 AC_ARG_ENABLE([doc],
    28 AS_HELP_STRING([--enable-doc@<:@=yes|no|full@:>@], [build the documentation (full enables internal documentation too) @<:@default=yes@:>@])
    29 AS_HELP_STRING([--disable-doc], [do not build the documentation]),
    30               [], [enable_doc=yes])
    31 
    32 AC_MSG_CHECKING([whether to build the documention])
    33 case "$enable_doc" in
    34   yes)
    35     DOXYGEN_INTERNAL_DOCS=NO
    36     AC_MSG_RESULT([yes])
    37     ;;
    38   full)
    39     DOXYGEN_INTERNAL_DOCS=YES
    40     AC_MSG_RESULT([full])
    41     ;;
    42   no)
    43     DOXYGEN_INTERNAL_DOCS=NO
    44     AC_MSG_RESULT([no])
    45     ;;
    46   *)
    47     AC_MSG_ERROR([bad value $enable_doc for option --enable-doc])
    48     ;;
    49 esac
    50 AC_SUBST(DOXYGEN_INTERNAL_DOCS)
    51 AM_CONDITIONAL([WANT_DOC], [test x"$enable_doc" != x"no"])
    52 
    53 dnl Disable/enable building the GUI
    54 AC_ARG_ENABLE([gui],
    55 AS_HELP_STRING([--enable-gui], [build the GUI])
    56 AS_HELP_STRING([--disable-gui], [do not build the GUI @<:@default@:>@]),
    57               [], [enable_gui=no])
    58 AC_MSG_CHECKING([whether to build the GUI])
    59 if test x"$enable_gui" != x"no"; then
    60   AC_MSG_RESULT([yes])
    61 else
    62   AC_MSG_RESULT([no])
    63 fi
    64 if test x"$enable_gui" != x"no"; then
    65   PKG_CHECK_MODULES([GTK], [libgnomecanvasmm-2.6 >= 2.6.0])
    66 fi
    67 AM_CONDITIONAL([WANT_GUI], [test x"$enable_gui" != x"no"])
    68 
    69 dnl Disable/enable building the demo programs
    70 AC_ARG_ENABLE([demo],
    71 AS_HELP_STRING([--enable-demo], [build the demo programs])
    72 AS_HELP_STRING([--disable-demo], [do not build the demo programs @<:@default@:>@]),
    73               [], [enable_demo=no])
    74 AC_MSG_CHECKING([whether to build the demo programs])
    75 if test x"$enable_demo" != x"no"; then
    76   AC_MSG_RESULT([yes])
    77 else
    78   AC_MSG_RESULT([no])
    79 fi
    80 AM_CONDITIONAL([WANT_DEMO], [test x"$enable_demo" != x"no"])
    81 
    82 dnl Disable/enable building the benchmarks
    83 AC_ARG_ENABLE([benchmark],
    84 AS_HELP_STRING([--enable-benchmark], [build the benchmarks])
    85 AS_HELP_STRING([--disable-benchmark], [do not build the benchmarks @<:@default@:>@]),
    86               [], [enable_benchmark=no])
    87 AC_MSG_CHECKING([whether to build the benchmarks])
    88 if test x"$enable_benchmark" != x"no"; then
    89   AC_MSG_RESULT([yes])
    90 else
    91   AC_MSG_RESULT([no])
    92 fi
    93 AM_CONDITIONAL([WANT_BENCHMARK], [test x"$enable_benchmark" != x"no"])
    94 
    95 dnl Checks for header files.
    96 AC_CHECK_HEADERS(limits.h sys/time.h sys/times.h unistd.h)
    97 
    98 dnl Checks for header files.
    99 AC_CHECK_HEADERS(limits.h sys/time.h sys/times.h unistd.h)
   100 
   101 dnl Checks for typedefs, structures, and compiler characteristics.
   102 AC_C_CONST
   103 AC_C_INLINE
   104 AC_TYPE_SIZE_T
   105 AC_HEADER_TIME
   106 AC_STRUCT_TM
   107 
   108 dnl Checks for library functions.
   109 AC_HEADER_STDC
   110 AC_CHECK_FUNCS(gettimeofday times ctime_r)
   111 
   112 AC_CONFIG_FILES([
   113 Makefile
   114 lemon.spec
   115 autopackage/default.apspec
   116 doc/Makefile
   117 doc/Doxyfile
   118 lemon/Makefile
   119 lemon/lemon.pc
   120 benchmark/Makefile
   121 demo/Makefile
   122 test/Makefile
   123 gui/Makefile
   124 ])
   125 
   126 AC_OUTPUT
   127 
   128 echo
   129 echo '****************************** SUMMARY ******************************'
   130 echo
   131 echo Package version............... : $PACKAGE-$VERSION
   132 echo
   133 echo C++ compiler.................. : $CXX
   134 echo C++ compiles flags............ : $CXXFLAGS
   135 echo
   136 echo GLPK support.................. : $lx_glpk_found
   137 echo CPLEX support................. : $lx_cplex_found
   138 echo
   139 echo build benchmarks.............. : $enable_benchmark
   140 echo build demo programs........... : $enable_demo
   141 echo build GUI..................... : $enable_gui
   142 echo
   143 echo The packace will be installed in
   144 echo -n '  '
   145 echo $prefix.
   146 echo
   147 echo The documentation will be installed in
   148 echo -n '  '
   149 eval echo ${datadir}/doc/$PACKAGE.
   150 echo
   151 echo '*********************************************************************'
   152 
   153 echo
   154 echo configure complete, now type \'make\' and then \'make install\'.
   155 echo