COIN-OR::LEMON - Graph Library

source: lemon/configure.ac @ 225:c5a40fc54f1a

Last change on this file since 225:c5a40fc54f1a was 225:c5a40fc54f1a, checked in by Alpar Juttner <alpar@…>, 16 years ago

CMake improvements.

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