configure.ac
author kpeter
Wed, 15 Oct 2008 12:04:11 +0000
changeset 2625 c51b320bc51c
parent 2568 046c055217f6
permissions -rw-r--r--
Major improvement in the cost scaling algorithm

- Add a new variant that use the partial augment-relabel method.
- Use this method instead of push-relabel by default.
- Use the "Early Termination" heuristic instead of "Price Refinement".

Using the new method and heuristic the algorithm proved to be
2-2.5 times faster on all input files.
ladanyi@542
     1
dnl Process this file with autoconf to produce a configure script.
ladanyi@2412
     2
ladanyi@2412
     3
dnl Version information.
ladanyi@2412
     4
m4_define([lemon_version_major], [0])
alpar@2614
     5
m4_define([lemon_version_minor], [7])
ladanyi@2412
     6
m4_define([lemon_version_micro], [90])
ladanyi@2412
     7
m4_define([lemon_version_nano], [])
ladanyi@2412
     8
m4_define([lemon_version_tag], [svn])
ladanyi@2412
     9
m4_define([lemon_svn_revision], [m4_normalize(esyscmd([svn info |grep ^Revision |cut -d ' ' -f 2]))])
ladanyi@2412
    10
m4_define([lemon_version], [lemon_version_major().lemon_version_minor()ifelse(lemon_version_micro(), [], [], [.lemon_version_micro()])ifelse(lemon_version_nano(), [], [], [.lemon_version_nano()])ifelse(lemon_version_tag(), [], [], lemon_version_tag(), [svn], [[_]lemon_version_tag()[]lemon_svn_revision()], [[_]lemon_version_tag()])])
ladanyi@2412
    11
ladanyi@2012
    12
AC_PREREQ([2.59])
ladanyi@2412
    13
AC_INIT([LEMON], [lemon_version()], [etik-ol@cs.elte.hu], [lemon])
ladanyi@2012
    14
AC_CONFIG_AUX_DIR([build-aux])
ladanyi@2012
    15
AC_CONFIG_MACRO_DIR([m4])
alpar@2568
    16
AM_INIT_AUTOMAKE([-Wall -Werror foreign subdir-objects nostdinc])
klao@1994
    17
AC_CONFIG_SRCDIR([lemon/list_graph.h])
ladanyi@1435
    18
AC_CONFIG_HEADERS([config.h lemon/config.h])
ladanyi@542
    19
ladanyi@1905
    20
lx_cmdline_cxxflags_set=${CXXFLAGS+set}
ladanyi@1905
    21
ladanyi@542
    22
dnl Checks for programs.
ladanyi@542
    23
AC_PROG_CXX
ladanyi@1350
    24
AC_PROG_CXXCPP
ladanyi@1304
    25
AC_PROG_INSTALL
alpar@1327
    26
AC_DISABLE_SHARED
ladanyi@1304
    27
AC_PROG_LIBTOOL
ladanyi@542
    28
ladanyi@1905
    29
if test x"$lx_cmdline_cxxflags_set" != x"set" -a "$GXX" = yes; then
alpar@2390
    30
  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
    31
fi
alpar@716
    32
alpar@1400
    33
AC_CHECK_PROG([doxygen_found],[doxygen],[yes],[no])
alpar@1400
    34
ladanyi@542
    35
dnl Checks for libraries.
ladanyi@1349
    36
LX_CHECK_GLPK
ladanyi@1380
    37
LX_CHECK_CPLEX
deba@2315
    38
LX_CHECK_SOPLEX
ladanyi@542
    39
ladanyi@1863
    40
dnl Enable/disable installing the documentation
ladanyi@1863
    41
AC_ARG_ENABLE([doc],
ladanyi@1863
    42
AS_HELP_STRING([--enable-doc@<:@=yes|no|full@:>@], [build the documentation (full enables internal documentation too) @<:@default=yes@:>@])
ladanyi@1863
    43
AS_HELP_STRING([--disable-doc], [do not build the documentation]),
ladanyi@1863
    44
              [], [enable_doc=yes])
ladanyi@1863
    45
ladanyi@1863
    46
AC_MSG_CHECKING([whether to build the documention])
ladanyi@1863
    47
case "$enable_doc" in
ladanyi@1863
    48
  yes)
ladanyi@1863
    49
    DOXYGEN_INTERNAL_DOCS=NO
ladanyi@1863
    50
    AC_MSG_RESULT([yes])
ladanyi@1863
    51
    ;;
ladanyi@1863
    52
  full)
ladanyi@1863
    53
    DOXYGEN_INTERNAL_DOCS=YES
ladanyi@1863
    54
    AC_MSG_RESULT([full])
ladanyi@1863
    55
    ;;
ladanyi@1863
    56
  no)
ladanyi@1863
    57
    DOXYGEN_INTERNAL_DOCS=NO
ladanyi@1863
    58
    AC_MSG_RESULT([no])
ladanyi@1863
    59
    ;;
ladanyi@1863
    60
  *)
ladanyi@1863
    61
    AC_MSG_ERROR([bad value $enable_doc for option --enable-doc])
ladanyi@1863
    62
    ;;
ladanyi@1863
    63
esac
ladanyi@1863
    64
AC_SUBST(DOXYGEN_INTERNAL_DOCS)
ladanyi@1863
    65
AM_CONDITIONAL([WANT_DOC], [test x"$enable_doc" != x"no"])
ladanyi@1863
    66
ladanyi@1863
    67
dnl Disable/enable building the demo programs
ladanyi@1863
    68
AC_ARG_ENABLE([demo],
ladanyi@1863
    69
AS_HELP_STRING([--enable-demo], [build the demo programs])
ladanyi@1863
    70
AS_HELP_STRING([--disable-demo], [do not build the demo programs @<:@default@:>@]),
ladanyi@1863
    71
              [], [enable_demo=no])
ladanyi@1863
    72
AC_MSG_CHECKING([whether to build the demo programs])
ladanyi@1863
    73
if test x"$enable_demo" != x"no"; then
ladanyi@1863
    74
  AC_MSG_RESULT([yes])
ladanyi@1863
    75
else
ladanyi@1863
    76
  AC_MSG_RESULT([no])
ladanyi@1863
    77
fi
ladanyi@1863
    78
AM_CONDITIONAL([WANT_DEMO], [test x"$enable_demo" != x"no"])
ladanyi@1863
    79
alpar@2390
    80
dnl Disable/enable building the binary tools
alpar@2390
    81
AC_ARG_ENABLE([tools],
alpar@2390
    82
AS_HELP_STRING([--enable-tools], [build additional tools @<:@default@:>@])
alpar@2390
    83
AS_HELP_STRING([--disable-tools], [do not build additional tools]),
alpar@2390
    84
              [], [enable_tools=yes])
alpar@2390
    85
AC_MSG_CHECKING([whether to build the additional tools])
alpar@2390
    86
if test x"$enable_tools" != x"no"; then
alpar@2390
    87
  AC_MSG_RESULT([yes])
alpar@2390
    88
else
alpar@2390
    89
  AC_MSG_RESULT([no])
alpar@2390
    90
fi
alpar@2390
    91
AM_CONDITIONAL([WANT_TOOLS], [test x"$enable_tools" != x"no"])
alpar@2390
    92
ladanyi@1863
    93
dnl Disable/enable building the benchmarks
ladanyi@1863
    94
AC_ARG_ENABLE([benchmark],
ladanyi@1863
    95
AS_HELP_STRING([--enable-benchmark], [build the benchmarks])
ladanyi@1863
    96
AS_HELP_STRING([--disable-benchmark], [do not build the benchmarks @<:@default@:>@]),
ladanyi@1863
    97
              [], [enable_benchmark=no])
ladanyi@1863
    98
AC_MSG_CHECKING([whether to build the benchmarks])
ladanyi@1863
    99
if test x"$enable_benchmark" != x"no"; then
ladanyi@1863
   100
  AC_MSG_RESULT([yes])
ladanyi@1863
   101
else
ladanyi@1863
   102
  AC_MSG_RESULT([no])
ladanyi@1863
   103
fi
ladanyi@1863
   104
AM_CONDITIONAL([WANT_BENCHMARK], [test x"$enable_benchmark" != x"no"])
ladanyi@1863
   105
ladanyi@1863
   106
dnl Checks for header files.
ladanyi@1863
   107
AC_CHECK_HEADERS(limits.h sys/time.h sys/times.h unistd.h)
ladanyi@1370
   108
ladanyi@542
   109
dnl Checks for typedefs, structures, and compiler characteristics.
ladanyi@542
   110
AC_C_CONST
ladanyi@542
   111
AC_C_INLINE
ladanyi@542
   112
AC_TYPE_SIZE_T
ladanyi@542
   113
AC_HEADER_TIME
ladanyi@542
   114
AC_STRUCT_TM
ladanyi@542
   115
ladanyi@542
   116
dnl Checks for library functions.
ladanyi@542
   117
AC_HEADER_STDC
alpar@1108
   118
AC_CHECK_FUNCS(gettimeofday times ctime_r)
ladanyi@542
   119
ladanyi@1304
   120
AC_CONFIG_FILES([
ladanyi@1304
   121
Makefile
ladanyi@1483
   122
lemon.spec
ladanyi@1304
   123
autopackage/default.apspec
ladanyi@1304
   124
doc/Doxyfile
ladanyi@1435
   125
lemon/lemon.pc
ladanyi@1304
   126
])
ladanyi@1349
   127
ladanyi@542
   128
AC_OUTPUT
alpar@1372
   129
alpar@1372
   130
echo
alpar@1372
   131
echo '****************************** SUMMARY ******************************'
alpar@1372
   132
echo
alpar@1372
   133
echo Package version............... : $PACKAGE-$VERSION
alpar@1372
   134
echo
alpar@1372
   135
echo C++ compiler.................. : $CXX
alpar@1372
   136
echo C++ compiles flags............ : $CXXFLAGS
alpar@1372
   137
echo
alpar@1373
   138
echo GLPK support.................. : $lx_glpk_found
ladanyi@1380
   139
echo CPLEX support................. : $lx_cplex_found
deba@2315
   140
echo SOPLEX support................ : $lx_soplex_found
alpar@1372
   141
echo
ladanyi@1863
   142
echo build benchmarks.............. : $enable_benchmark
ladanyi@1863
   143
echo build demo programs........... : $enable_demo
alpar@2390
   144
echo build additional tools........ : $enable_tools
ladanyi@1404
   145
echo
alpar@1372
   146
echo The packace will be installed in
alpar@1372
   147
echo -n '  '
alpar@1372
   148
echo $prefix.
alpar@1372
   149
echo
alpar@1372
   150
echo The documentation will be installed in
alpar@1372
   151
echo -n '  '
ladanyi@1671
   152
eval echo ${datadir}/doc/$PACKAGE.
alpar@1372
   153
echo
alpar@1372
   154
echo '*********************************************************************'
alpar@1372
   155
alpar@1372
   156
echo
alpar@1572
   157
echo configure complete, now type \'make\' and then \'make install\'.
alpar@1372
   158
echo