configure.ac
author Alpar Juttner <alpar@cs.elte.hu>
Tue, 17 Jun 2008 12:28:49 +0100
changeset 174 2ec3c1bbc687
parent 91 e28fc773f3c0
child 175 4eb8900a865c
permissions -rw-r--r--
Merge
ladanyi@1
     1
dnl Process this file with autoconf to produce a configure script.
ladanyi@1
     2
ladanyi@1
     3
dnl Version information.
ladanyi@1
     4
m4_define([lemon_version_major], [0])
alpar@52
     5
m4_define([lemon_version_minor], [99])
alpar@52
     6
m4_define([lemon_version_micro], [])
ladanyi@1
     7
m4_define([lemon_version_nano], [])
ladanyi@1
     8
m4_define([lemon_version_tag], [hg])
alpar@19
     9
m4_define([lemon_hg_revision], [m4_normalize(esyscmd([hg id -i]))])
alpar@17
    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(), [hg], [[_]lemon_version_tag()[_]lemon_hg_revision()], [[_]lemon_version_tag()])])
ladanyi@1
    11
ladanyi@1
    12
AC_PREREQ([2.59])
alpar@91
    13
AC_INIT([LEMON], [lemon_version()], [lemon-devel@lemon.cs.elte.hu], [lemon])
ladanyi@1
    14
AC_CONFIG_AUX_DIR([build-aux])
ladanyi@1
    15
AC_CONFIG_MACRO_DIR([m4])
ladanyi@64
    16
AM_INIT_AUTOMAKE([-Wall -Werror foreign subdir-objects nostdinc])
ladanyi@1
    17
AC_CONFIG_SRCDIR([lemon/list_graph.h])
ladanyi@1
    18
AC_CONFIG_HEADERS([config.h lemon/config.h])
ladanyi@1
    19
ladanyi@1
    20
lx_cmdline_cxxflags_set=${CXXFLAGS+set}
ladanyi@1
    21
ladanyi@1
    22
dnl Checks for programs.
ladanyi@1
    23
AC_PROG_CXX
ladanyi@1
    24
AC_PROG_CXXCPP
ladanyi@1
    25
AC_PROG_INSTALL
ladanyi@1
    26
AC_DISABLE_SHARED
ladanyi@1
    27
AC_PROG_LIBTOOL
ladanyi@1
    28
ladanyi@60
    29
AC_CHECK_PROG([doxygen_found],[doxygen],[yes],[no])
ladanyi@153
    30
AC_CHECK_PROG([gs_found],[gs],[yes],[no])
ladanyi@60
    31
ladanyi@1
    32
if test x"$lx_cmdline_cxxflags_set" != x"set" -a "$GXX" = yes; then
ladanyi@1
    33
  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@1
    34
fi
ladanyi@1
    35
ladanyi@1
    36
dnl Checks for libraries.
ladanyi@1
    37
LX_CHECK_GLPK
ladanyi@1
    38
LX_CHECK_CPLEX
ladanyi@1
    39
LX_CHECK_SOPLEX
ladanyi@1
    40
ladanyi@1
    41
dnl Disable/enable building the demo programs
ladanyi@1
    42
AC_ARG_ENABLE([demo],
ladanyi@1
    43
AS_HELP_STRING([--enable-demo], [build the demo programs])
ladanyi@1
    44
AS_HELP_STRING([--disable-demo], [do not build the demo programs @<:@default@:>@]),
ladanyi@1
    45
              [], [enable_demo=no])
ladanyi@1
    46
AC_MSG_CHECKING([whether to build the demo programs])
ladanyi@1
    47
if test x"$enable_demo" != x"no"; then
ladanyi@1
    48
  AC_MSG_RESULT([yes])
ladanyi@1
    49
else
ladanyi@1
    50
  AC_MSG_RESULT([no])
ladanyi@1
    51
fi
ladanyi@1
    52
AM_CONDITIONAL([WANT_DEMO], [test x"$enable_demo" != x"no"])
ladanyi@1
    53
ladanyi@1
    54
dnl Disable/enable building the binary tools
ladanyi@1
    55
AC_ARG_ENABLE([tools],
ladanyi@1
    56
AS_HELP_STRING([--enable-tools], [build additional tools @<:@default@:>@])
ladanyi@1
    57
AS_HELP_STRING([--disable-tools], [do not build additional tools]),
ladanyi@1
    58
              [], [enable_tools=yes])
ladanyi@1
    59
AC_MSG_CHECKING([whether to build the additional tools])
ladanyi@1
    60
if test x"$enable_tools" != x"no"; then
ladanyi@1
    61
  AC_MSG_RESULT([yes])
ladanyi@1
    62
else
ladanyi@1
    63
  AC_MSG_RESULT([no])
ladanyi@1
    64
fi
ladanyi@1
    65
AM_CONDITIONAL([WANT_TOOLS], [test x"$enable_tools" != x"no"])
ladanyi@1
    66
ladanyi@1
    67
dnl Disable/enable building the benchmarks
ladanyi@1
    68
AC_ARG_ENABLE([benchmark],
ladanyi@1
    69
AS_HELP_STRING([--enable-benchmark], [build the benchmarks])
ladanyi@1
    70
AS_HELP_STRING([--disable-benchmark], [do not build the benchmarks @<:@default@:>@]),
ladanyi@1
    71
              [], [enable_benchmark=no])
ladanyi@1
    72
AC_MSG_CHECKING([whether to build the benchmarks])
ladanyi@1
    73
if test x"$enable_benchmark" != x"no"; then
ladanyi@1
    74
  AC_MSG_RESULT([yes])
ladanyi@1
    75
else
ladanyi@1
    76
  AC_MSG_RESULT([no])
ladanyi@1
    77
fi
ladanyi@1
    78
AM_CONDITIONAL([WANT_BENCHMARK], [test x"$enable_benchmark" != x"no"])
ladanyi@1
    79
ladanyi@1
    80
dnl Checks for header files.
ladanyi@1
    81
AC_CHECK_HEADERS(limits.h sys/time.h sys/times.h unistd.h)
ladanyi@1
    82
ladanyi@1
    83
dnl Checks for typedefs, structures, and compiler characteristics.
ladanyi@1
    84
AC_C_CONST
ladanyi@1
    85
AC_C_INLINE
ladanyi@1
    86
AC_TYPE_SIZE_T
ladanyi@1
    87
AC_HEADER_TIME
ladanyi@1
    88
AC_STRUCT_TM
ladanyi@1
    89
ladanyi@1
    90
dnl Checks for library functions.
ladanyi@1
    91
AC_HEADER_STDC
ladanyi@1
    92
AC_CHECK_FUNCS(gettimeofday times ctime_r)
ladanyi@1
    93
ladanyi@1
    94
AC_CONFIG_FILES([
ladanyi@1
    95
Makefile
ladanyi@1
    96
doc/Doxyfile
ladanyi@1
    97
lemon/lemon.pc
ladanyi@1
    98
])
ladanyi@1
    99
ladanyi@1
   100
AC_OUTPUT
ladanyi@1
   101
ladanyi@1
   102
echo
ladanyi@1
   103
echo '****************************** SUMMARY ******************************'
ladanyi@1
   104
echo
ladanyi@1
   105
echo Package version............... : $PACKAGE-$VERSION
ladanyi@1
   106
echo
ladanyi@1
   107
echo C++ compiler.................. : $CXX
ladanyi@1
   108
echo C++ compiles flags............ : $CXXFLAGS
ladanyi@1
   109
echo
ladanyi@1
   110
echo GLPK support.................. : $lx_glpk_found
ladanyi@1
   111
echo CPLEX support................. : $lx_cplex_found
ladanyi@1
   112
echo SOPLEX support................ : $lx_soplex_found
ladanyi@1
   113
echo
alpar@55
   114
echo Build benchmarks.............. : $enable_benchmark
alpar@55
   115
echo Build demo programs........... : $enable_demo
alpar@55
   116
echo Build additional tools........ : $enable_tools
ladanyi@1
   117
echo
ladanyi@1
   118
echo The packace will be installed in
ladanyi@1
   119
echo -n '  '
ladanyi@1
   120
echo $prefix.
ladanyi@1
   121
echo
ladanyi@1
   122
echo '*********************************************************************'
ladanyi@1
   123
ladanyi@1
   124
echo
alpar@55
   125
echo Configure complete, now type \'make\' and then \'make install\'.
ladanyi@1
   126
echo