configure.ac
author deba
Thu, 07 Sep 2006 14:04:31 +0000
changeset 2210 25aab9493dd2
parent 2103 a979fcdda073
child 2237 5674a5983e1e
permissions -rw-r--r--
Add missing header sentry
ladanyi@542
     1
dnl Process this file with autoconf to produce a configure script.
ladanyi@2012
     2
AC_PREREQ([2.59])
alpar@1941
     3
AC_INIT([LEMON], [svn-head], [etik-ol@cs.elte.hu], [lemon])
ladanyi@2012
     4
AC_CONFIG_AUX_DIR([build-aux])
ladanyi@2012
     5
AC_CONFIG_MACRO_DIR([m4])
ladanyi@2108
     6
AM_INIT_AUTOMAKE([-Wall -Werror foreign subdir-objects])
klao@1994
     7
AC_CONFIG_SRCDIR([lemon/list_graph.h])
ladanyi@1435
     8
AC_CONFIG_HEADERS([config.h lemon/config.h])
ladanyi@542
     9
ladanyi@1905
    10
lx_cmdline_cxxflags_set=${CXXFLAGS+set}
ladanyi@1905
    11
ladanyi@542
    12
dnl Checks for programs.
ladanyi@542
    13
AC_PROG_CXX
ladanyi@1350
    14
AC_PROG_CXXCPP
ladanyi@1304
    15
AC_PROG_INSTALL
alpar@1327
    16
AC_DISABLE_SHARED
ladanyi@1304
    17
AC_PROG_LIBTOOL
ladanyi@542
    18
ladanyi@1905
    19
if test x"$lx_cmdline_cxxflags_set" != x"set" -a "$GXX" = yes; then
ladanyi@1349
    20
  CXXFLAGS="$CXXFLAGS -Wall -W"
ladanyi@1348
    21
fi
alpar@716
    22
alpar@1400
    23
AC_CHECK_PROG([doxygen_found],[doxygen],[yes],[no])
alpar@1400
    24
ladanyi@542
    25
dnl Checks for libraries.
ladanyi@1349
    26
LX_CHECK_GLPK
ladanyi@1380
    27
LX_CHECK_CPLEX
ladanyi@542
    28
ladanyi@1863
    29
dnl Enable/disable installing the documentation
ladanyi@1863
    30
AC_ARG_ENABLE([doc],
ladanyi@1863
    31
AS_HELP_STRING([--enable-doc@<:@=yes|no|full@:>@], [build the documentation (full enables internal documentation too) @<:@default=yes@:>@])
ladanyi@1863
    32
AS_HELP_STRING([--disable-doc], [do not build the documentation]),
ladanyi@1863
    33
              [], [enable_doc=yes])
ladanyi@1863
    34
ladanyi@1863
    35
AC_MSG_CHECKING([whether to build the documention])
ladanyi@1863
    36
case "$enable_doc" in
ladanyi@1863
    37
  yes)
ladanyi@1863
    38
    DOXYGEN_INTERNAL_DOCS=NO
ladanyi@1863
    39
    AC_MSG_RESULT([yes])
ladanyi@1863
    40
    ;;
ladanyi@1863
    41
  full)
ladanyi@1863
    42
    DOXYGEN_INTERNAL_DOCS=YES
ladanyi@1863
    43
    AC_MSG_RESULT([full])
ladanyi@1863
    44
    ;;
ladanyi@1863
    45
  no)
ladanyi@1863
    46
    DOXYGEN_INTERNAL_DOCS=NO
ladanyi@1863
    47
    AC_MSG_RESULT([no])
ladanyi@1863
    48
    ;;
ladanyi@1863
    49
  *)
ladanyi@1863
    50
    AC_MSG_ERROR([bad value $enable_doc for option --enable-doc])
ladanyi@1863
    51
    ;;
ladanyi@1863
    52
esac
ladanyi@1863
    53
AC_SUBST(DOXYGEN_INTERNAL_DOCS)
ladanyi@1863
    54
AM_CONDITIONAL([WANT_DOC], [test x"$enable_doc" != x"no"])
ladanyi@1863
    55
ladanyi@1863
    56
dnl Disable/enable building the demo programs
ladanyi@1863
    57
AC_ARG_ENABLE([demo],
ladanyi@1863
    58
AS_HELP_STRING([--enable-demo], [build the demo programs])
ladanyi@1863
    59
AS_HELP_STRING([--disable-demo], [do not build the demo programs @<:@default@:>@]),
ladanyi@1863
    60
              [], [enable_demo=no])
ladanyi@1863
    61
AC_MSG_CHECKING([whether to build the demo programs])
ladanyi@1863
    62
if test x"$enable_demo" != x"no"; then
ladanyi@1863
    63
  AC_MSG_RESULT([yes])
ladanyi@1863
    64
else
ladanyi@1863
    65
  AC_MSG_RESULT([no])
ladanyi@1863
    66
fi
ladanyi@1863
    67
AM_CONDITIONAL([WANT_DEMO], [test x"$enable_demo" != x"no"])
ladanyi@1863
    68
ladanyi@1863
    69
dnl Disable/enable building the benchmarks
ladanyi@1863
    70
AC_ARG_ENABLE([benchmark],
ladanyi@1863
    71
AS_HELP_STRING([--enable-benchmark], [build the benchmarks])
ladanyi@1863
    72
AS_HELP_STRING([--disable-benchmark], [do not build the benchmarks @<:@default@:>@]),
ladanyi@1863
    73
              [], [enable_benchmark=no])
ladanyi@1863
    74
AC_MSG_CHECKING([whether to build the benchmarks])
ladanyi@1863
    75
if test x"$enable_benchmark" != x"no"; then
ladanyi@1863
    76
  AC_MSG_RESULT([yes])
ladanyi@1863
    77
else
ladanyi@1863
    78
  AC_MSG_RESULT([no])
ladanyi@1863
    79
fi
ladanyi@1863
    80
AM_CONDITIONAL([WANT_BENCHMARK], [test x"$enable_benchmark" != x"no"])
ladanyi@1863
    81
ladanyi@1863
    82
dnl Checks for header files.
ladanyi@1863
    83
AC_CHECK_HEADERS(limits.h sys/time.h sys/times.h unistd.h)
ladanyi@1370
    84
ladanyi@542
    85
dnl Checks for typedefs, structures, and compiler characteristics.
ladanyi@542
    86
AC_C_CONST
ladanyi@542
    87
AC_C_INLINE
ladanyi@542
    88
AC_TYPE_SIZE_T
ladanyi@542
    89
AC_HEADER_TIME
ladanyi@542
    90
AC_STRUCT_TM
ladanyi@542
    91
ladanyi@542
    92
dnl Checks for library functions.
ladanyi@542
    93
AC_HEADER_STDC
alpar@1108
    94
AC_CHECK_FUNCS(gettimeofday times ctime_r)
ladanyi@542
    95
ladanyi@1304
    96
AC_CONFIG_FILES([
ladanyi@1304
    97
Makefile
ladanyi@1483
    98
lemon.spec
ladanyi@1304
    99
autopackage/default.apspec
ladanyi@1304
   100
doc/Doxyfile
ladanyi@1435
   101
lemon/lemon.pc
ladanyi@1304
   102
])
ladanyi@1349
   103
ladanyi@542
   104
AC_OUTPUT
alpar@1372
   105
alpar@1372
   106
echo
alpar@1372
   107
echo '****************************** SUMMARY ******************************'
alpar@1372
   108
echo
alpar@1372
   109
echo Package version............... : $PACKAGE-$VERSION
alpar@1372
   110
echo
alpar@1372
   111
echo C++ compiler.................. : $CXX
alpar@1372
   112
echo C++ compiles flags............ : $CXXFLAGS
alpar@1372
   113
echo
alpar@1373
   114
echo GLPK support.................. : $lx_glpk_found
ladanyi@1380
   115
echo CPLEX support................. : $lx_cplex_found
alpar@1372
   116
echo
ladanyi@1863
   117
echo build benchmarks.............. : $enable_benchmark
ladanyi@1863
   118
echo build demo programs........... : $enable_demo
ladanyi@1404
   119
echo
alpar@1372
   120
echo The packace will be installed in
alpar@1372
   121
echo -n '  '
alpar@1372
   122
echo $prefix.
alpar@1372
   123
echo
alpar@1372
   124
echo The documentation will be installed in
alpar@1372
   125
echo -n '  '
ladanyi@1671
   126
eval echo ${datadir}/doc/$PACKAGE.
alpar@1372
   127
echo
alpar@1372
   128
echo '*********************************************************************'
alpar@1372
   129
alpar@1372
   130
echo
alpar@1572
   131
echo configure complete, now type \'make\' and then \'make install\'.
alpar@1372
   132
echo