COIN-OR::LEMON - Graph Library

source: lemon-0.x/configure.ac @ 2568:046c055217f6

Last change on this file since 2568:046c055217f6 was 2568:046c055217f6, checked in by Alpar Juttner, 12 years ago

Math constants + configure bugfix backported
from hg a315a588a20d and 761622e5ed4c

File size: 5.0 KB
Line 
1dnl Process this file with autoconf to produce a configure script.
2
3dnl Version information.
4m4_define([lemon_version_major], [0])
5m4_define([lemon_version_minor], [6])
6m4_define([lemon_version_micro], [90])
7m4_define([lemon_version_nano], [])
8m4_define([lemon_version_tag], [svn])
9m4_define([lemon_svn_revision], [m4_normalize(esyscmd([svn info |grep ^Revision |cut -d ' ' -f 2]))])
10m4_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(), [svn], [[_]lemon_version_tag()[]lemon_svn_revision()], [[_]lemon_version_tag()])])
11
12AC_PREREQ([2.59])
13AC_INIT([LEMON], [lemon_version()], [etik-ol@cs.elte.hu], [lemon])
14AC_CONFIG_AUX_DIR([build-aux])
15AC_CONFIG_MACRO_DIR([m4])
16AM_INIT_AUTOMAKE([-Wall -Werror foreign subdir-objects nostdinc])
17AC_CONFIG_SRCDIR([lemon/list_graph.h])
18AC_CONFIG_HEADERS([config.h lemon/config.h])
19
20lx_cmdline_cxxflags_set=${CXXFLAGS+set}
21
22dnl Checks for programs.
23AC_PROG_CXX
24AC_PROG_CXXCPP
25AC_PROG_INSTALL
26AC_DISABLE_SHARED
27AC_PROG_LIBTOOL
28
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
33AC_CHECK_PROG([doxygen_found],[doxygen],[yes],[no])
34
35dnl Checks for libraries.
36LX_CHECK_GLPK
37LX_CHECK_CPLEX
38LX_CHECK_SOPLEX
39
40dnl Enable/disable installing the documentation
41AC_ARG_ENABLE([doc],
42AS_HELP_STRING([--enable-doc@<:@=yes|no|full@:>@], [build the documentation (full enables internal documentation too) @<:@default=yes@:>@])
43AS_HELP_STRING([--disable-doc], [do not build the documentation]),
44              [], [enable_doc=yes])
45
46AC_MSG_CHECKING([whether to build the documention])
47case "$enable_doc" in
48  yes)
49    DOXYGEN_INTERNAL_DOCS=NO
50    AC_MSG_RESULT([yes])
51    ;;
52  full)
53    DOXYGEN_INTERNAL_DOCS=YES
54    AC_MSG_RESULT([full])
55    ;;
56  no)
57    DOXYGEN_INTERNAL_DOCS=NO
58    AC_MSG_RESULT([no])
59    ;;
60  *)
61    AC_MSG_ERROR([bad value $enable_doc for option --enable-doc])
62    ;;
63esac
64AC_SUBST(DOXYGEN_INTERNAL_DOCS)
65AM_CONDITIONAL([WANT_DOC], [test x"$enable_doc" != x"no"])
66
67dnl Disable/enable building the demo programs
68AC_ARG_ENABLE([demo],
69AS_HELP_STRING([--enable-demo], [build the demo programs])
70AS_HELP_STRING([--disable-demo], [do not build the demo programs @<:@default@:>@]),
71              [], [enable_demo=no])
72AC_MSG_CHECKING([whether to build the demo programs])
73if test x"$enable_demo" != x"no"; then
74  AC_MSG_RESULT([yes])
75else
76  AC_MSG_RESULT([no])
77fi
78AM_CONDITIONAL([WANT_DEMO], [test x"$enable_demo" != x"no"])
79
80dnl Disable/enable building the binary tools
81AC_ARG_ENABLE([tools],
82AS_HELP_STRING([--enable-tools], [build additional tools @<:@default@:>@])
83AS_HELP_STRING([--disable-tools], [do not build additional tools]),
84              [], [enable_tools=yes])
85AC_MSG_CHECKING([whether to build the additional tools])
86if test x"$enable_tools" != x"no"; then
87  AC_MSG_RESULT([yes])
88else
89  AC_MSG_RESULT([no])
90fi
91AM_CONDITIONAL([WANT_TOOLS], [test x"$enable_tools" != x"no"])
92
93dnl Disable/enable building the benchmarks
94AC_ARG_ENABLE([benchmark],
95AS_HELP_STRING([--enable-benchmark], [build the benchmarks])
96AS_HELP_STRING([--disable-benchmark], [do not build the benchmarks @<:@default@:>@]),
97              [], [enable_benchmark=no])
98AC_MSG_CHECKING([whether to build the benchmarks])
99if test x"$enable_benchmark" != x"no"; then
100  AC_MSG_RESULT([yes])
101else
102  AC_MSG_RESULT([no])
103fi
104AM_CONDITIONAL([WANT_BENCHMARK], [test x"$enable_benchmark" != x"no"])
105
106dnl Checks for header files.
107AC_CHECK_HEADERS(limits.h sys/time.h sys/times.h unistd.h)
108
109dnl Checks for typedefs, structures, and compiler characteristics.
110AC_C_CONST
111AC_C_INLINE
112AC_TYPE_SIZE_T
113AC_HEADER_TIME
114AC_STRUCT_TM
115
116dnl Checks for library functions.
117AC_HEADER_STDC
118AC_CHECK_FUNCS(gettimeofday times ctime_r)
119
120AC_CONFIG_FILES([
121Makefile
122lemon.spec
123autopackage/default.apspec
124doc/Doxyfile
125lemon/lemon.pc
126])
127
128AC_OUTPUT
129
130echo
131echo '****************************** SUMMARY ******************************'
132echo
133echo Package version............... : $PACKAGE-$VERSION
134echo
135echo C++ compiler.................. : $CXX
136echo C++ compiles flags............ : $CXXFLAGS
137echo
138echo GLPK support.................. : $lx_glpk_found
139echo CPLEX support................. : $lx_cplex_found
140echo SOPLEX support................ : $lx_soplex_found
141echo
142echo build benchmarks.............. : $enable_benchmark
143echo build demo programs........... : $enable_demo
144echo build additional tools........ : $enable_tools
145echo
146echo The packace will be installed in
147echo -n '  '
148echo $prefix.
149echo
150echo The documentation will be installed in
151echo -n '  '
152eval echo ${datadir}/doc/$PACKAGE.
153echo
154echo '*********************************************************************'
155
156echo
157echo configure complete, now type \'make\' and then \'make install\'.
158echo
Note: See TracBrowser for help on using the repository browser.