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