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