configure.ac
author deba
Wed, 14 Mar 2007 18:58:33 +0000
changeset 2411 5820c6cec654
parent 2386 81b47fc5c444
child 2412 086fc76d591d
permissions -rw-r--r--
Bug fix
ladanyi@542
     1
dnl Process this file with autoconf to produce a configure script.
ladanyi@2012
     2
AC_PREREQ([2.59])
alpar@2237
     3
AC_INIT([LEMON], [svnhead], [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
alpar@2390
    20
  CXXFLAGS="$CXXFLAGS -Wall -W -Wall -W -Wunused -Wformat=2 -Wctor-dtor-privacy -Wnon-virtual-dtor -Wno-char-subscripts -Wwrite-strings -Wno-char-subscripts -Wreturn-type -Wcast-qual -Wcast-align -Wsign-promo -Woverloaded-virtual -Woverloaded-virtual -ansi -fno-strict-aliasing -Wold-style-cast -Wno-unknown-pragmas"
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
deba@2315
    28
LX_CHECK_SOPLEX
ladanyi@542
    29
ladanyi@1863
    30
dnl Enable/disable installing the documentation
ladanyi@1863
    31
AC_ARG_ENABLE([doc],
ladanyi@1863
    32
AS_HELP_STRING([--enable-doc@<:@=yes|no|full@:>@], [build the documentation (full enables internal documentation too) @<:@default=yes@:>@])
ladanyi@1863
    33
AS_HELP_STRING([--disable-doc], [do not build the documentation]),
ladanyi@1863
    34
              [], [enable_doc=yes])
ladanyi@1863
    35
ladanyi@1863
    36
AC_MSG_CHECKING([whether to build the documention])
ladanyi@1863
    37
case "$enable_doc" in
ladanyi@1863
    38
  yes)
ladanyi@1863
    39
    DOXYGEN_INTERNAL_DOCS=NO
ladanyi@1863
    40
    AC_MSG_RESULT([yes])
ladanyi@1863
    41
    ;;
ladanyi@1863
    42
  full)
ladanyi@1863
    43
    DOXYGEN_INTERNAL_DOCS=YES
ladanyi@1863
    44
    AC_MSG_RESULT([full])
ladanyi@1863
    45
    ;;
ladanyi@1863
    46
  no)
ladanyi@1863
    47
    DOXYGEN_INTERNAL_DOCS=NO
ladanyi@1863
    48
    AC_MSG_RESULT([no])
ladanyi@1863
    49
    ;;
ladanyi@1863
    50
  *)
ladanyi@1863
    51
    AC_MSG_ERROR([bad value $enable_doc for option --enable-doc])
ladanyi@1863
    52
    ;;
ladanyi@1863
    53
esac
ladanyi@1863
    54
AC_SUBST(DOXYGEN_INTERNAL_DOCS)
ladanyi@1863
    55
AM_CONDITIONAL([WANT_DOC], [test x"$enable_doc" != x"no"])
ladanyi@1863
    56
ladanyi@1863
    57
dnl Disable/enable building the demo programs
ladanyi@1863
    58
AC_ARG_ENABLE([demo],
ladanyi@1863
    59
AS_HELP_STRING([--enable-demo], [build the demo programs])
ladanyi@1863
    60
AS_HELP_STRING([--disable-demo], [do not build the demo programs @<:@default@:>@]),
ladanyi@1863
    61
              [], [enable_demo=no])
ladanyi@1863
    62
AC_MSG_CHECKING([whether to build the demo programs])
ladanyi@1863
    63
if test x"$enable_demo" != x"no"; then
ladanyi@1863
    64
  AC_MSG_RESULT([yes])
ladanyi@1863
    65
else
ladanyi@1863
    66
  AC_MSG_RESULT([no])
ladanyi@1863
    67
fi
ladanyi@1863
    68
AM_CONDITIONAL([WANT_DEMO], [test x"$enable_demo" != x"no"])
ladanyi@1863
    69
alpar@2390
    70
dnl Disable/enable building the binary tools
alpar@2390
    71
AC_ARG_ENABLE([tools],
alpar@2390
    72
AS_HELP_STRING([--enable-tools], [build additional tools @<:@default@:>@])
alpar@2390
    73
AS_HELP_STRING([--disable-tools], [do not build additional tools]),
alpar@2390
    74
              [], [enable_tools=yes])
alpar@2390
    75
AC_MSG_CHECKING([whether to build the additional tools])
alpar@2390
    76
if test x"$enable_tools" != x"no"; then
alpar@2390
    77
  AC_MSG_RESULT([yes])
alpar@2390
    78
else
alpar@2390
    79
  AC_MSG_RESULT([no])
alpar@2390
    80
fi
alpar@2390
    81
AM_CONDITIONAL([WANT_TOOLS], [test x"$enable_tools" != x"no"])
alpar@2390
    82
ladanyi@1863
    83
dnl Disable/enable building the benchmarks
ladanyi@1863
    84
AC_ARG_ENABLE([benchmark],
ladanyi@1863
    85
AS_HELP_STRING([--enable-benchmark], [build the benchmarks])
ladanyi@1863
    86
AS_HELP_STRING([--disable-benchmark], [do not build the benchmarks @<:@default@:>@]),
ladanyi@1863
    87
              [], [enable_benchmark=no])
ladanyi@1863
    88
AC_MSG_CHECKING([whether to build the benchmarks])
ladanyi@1863
    89
if test x"$enable_benchmark" != x"no"; then
ladanyi@1863
    90
  AC_MSG_RESULT([yes])
ladanyi@1863
    91
else
ladanyi@1863
    92
  AC_MSG_RESULT([no])
ladanyi@1863
    93
fi
ladanyi@1863
    94
AM_CONDITIONAL([WANT_BENCHMARK], [test x"$enable_benchmark" != x"no"])
ladanyi@1863
    95
ladanyi@1863
    96
dnl Checks for header files.
ladanyi@1863
    97
AC_CHECK_HEADERS(limits.h sys/time.h sys/times.h unistd.h)
ladanyi@1370
    98
ladanyi@542
    99
dnl Checks for typedefs, structures, and compiler characteristics.
ladanyi@542
   100
AC_C_CONST
ladanyi@542
   101
AC_C_INLINE
ladanyi@542
   102
AC_TYPE_SIZE_T
ladanyi@542
   103
AC_HEADER_TIME
ladanyi@542
   104
AC_STRUCT_TM
ladanyi@542
   105
ladanyi@542
   106
dnl Checks for library functions.
ladanyi@542
   107
AC_HEADER_STDC
alpar@1108
   108
AC_CHECK_FUNCS(gettimeofday times ctime_r)
ladanyi@542
   109
ladanyi@1304
   110
AC_CONFIG_FILES([
ladanyi@1304
   111
Makefile
ladanyi@1483
   112
lemon.spec
ladanyi@1304
   113
autopackage/default.apspec
ladanyi@1304
   114
doc/Doxyfile
ladanyi@1435
   115
lemon/lemon.pc
ladanyi@1304
   116
])
ladanyi@1349
   117
ladanyi@542
   118
AC_OUTPUT
alpar@1372
   119
alpar@1372
   120
echo
alpar@1372
   121
echo '****************************** SUMMARY ******************************'
alpar@1372
   122
echo
alpar@1372
   123
echo Package version............... : $PACKAGE-$VERSION
alpar@1372
   124
echo
alpar@1372
   125
echo C++ compiler.................. : $CXX
alpar@1372
   126
echo C++ compiles flags............ : $CXXFLAGS
alpar@1372
   127
echo
alpar@1373
   128
echo GLPK support.................. : $lx_glpk_found
ladanyi@1380
   129
echo CPLEX support................. : $lx_cplex_found
deba@2315
   130
echo SOPLEX support................ : $lx_soplex_found
alpar@1372
   131
echo
ladanyi@1863
   132
echo build benchmarks.............. : $enable_benchmark
ladanyi@1863
   133
echo build demo programs........... : $enable_demo
alpar@2390
   134
echo build additional tools........ : $enable_tools
ladanyi@1404
   135
echo
alpar@1372
   136
echo The packace will be installed in
alpar@1372
   137
echo -n '  '
alpar@1372
   138
echo $prefix.
alpar@1372
   139
echo
alpar@1372
   140
echo The documentation will be installed in
alpar@1372
   141
echo -n '  '
ladanyi@1671
   142
eval echo ${datadir}/doc/$PACKAGE.
alpar@1372
   143
echo
alpar@1372
   144
echo '*********************************************************************'
alpar@1372
   145
alpar@1372
   146
echo
alpar@1572
   147
echo configure complete, now type \'make\' and then \'make install\'.
alpar@1372
   148
echo