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