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