COIN-OR::LEMON - Graph Library

source: lemon-1.2/configure.ac @ 287:bb40b6db0a58

Last change on this file since 287:bb40b6db0a58 was 273:5d12d5c80ac9, checked in by Alpar Juttner <alpar@…>, 16 years ago

Better versioning (#144)

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