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