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