COIN-OR::LEMON - Graph Library

source: lemon-main/configure.ac @ 886:1aa7eba26af5

Last change on this file since 886:1aa7eba26af5 was 511:8a144437db7d, checked in by Akos Ladanyi <ladanyi@…>, 16 years ago

Prefix macro names with LEMON_ in lemon/config.h (#275)

File size: 4.4 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 Do compilation tests using the C++ compiler.
25AC_LANG([C++])
26
27dnl Check the existence of long long type.
28AC_CHECK_TYPE(long long, [long_long_found=yes], [long_long_found=no])
29if test x"$long_long_found" = x"yes"; then
30  AC_DEFINE([LEMON_HAVE_LONG_LONG], [1], [Define to 1 if you have long long.])
31fi
32
33dnl Checks for programs.
34AC_PROG_CXX
35AC_PROG_CXXCPP
36AC_PROG_INSTALL
37AC_DISABLE_SHARED
38AC_PROG_LIBTOOL
39
40AC_CHECK_PROG([doxygen_found],[doxygen],[yes],[no])
41AC_CHECK_PROG([gs_found],[gs],[yes],[no])
42
43dnl Detect Intel compiler.
44AC_MSG_CHECKING([whether we are using the Intel C++ compiler])
45AC_COMPILE_IFELSE([#ifndef __INTEL_COMPILER
46choke me
47#endif], [ICC=[yes]], [ICC=[no]])
48if test x"$ICC" = x"yes"; then
49  AC_MSG_RESULT([yes])
50else
51  AC_MSG_RESULT([no])
52fi
53
54dnl Set custom compiler flags when using g++.
55if test x"$lx_cmdline_cxxflags_set" != x"set" -a "$GXX" = yes -a "$ICC" = no; then
56  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"
57fi
58
59dnl Checks for libraries.
60#LX_CHECK_GLPK
61#LX_CHECK_CPLEX
62#LX_CHECK_SOPLEX
63
64dnl Disable/enable building the demo programs.
65AC_ARG_ENABLE([demo],
66AS_HELP_STRING([--enable-demo], [build the demo programs])
67AS_HELP_STRING([--disable-demo], [do not build the demo programs @<:@default@:>@]),
68              [], [enable_demo=no])
69AC_MSG_CHECKING([whether to build the demo programs])
70if test x"$enable_demo" != x"no"; then
71  AC_MSG_RESULT([yes])
72else
73  AC_MSG_RESULT([no])
74fi
75AM_CONDITIONAL([WANT_DEMO], [test x"$enable_demo" != x"no"])
76
77dnl Disable/enable building the binary tools.
78AC_ARG_ENABLE([tools],
79AS_HELP_STRING([--enable-tools], [build additional tools @<:@default@:>@])
80AS_HELP_STRING([--disable-tools], [do not build additional tools]),
81              [], [enable_tools=yes])
82AC_MSG_CHECKING([whether to build the additional tools])
83if test x"$enable_tools" != x"no"; then
84  AC_MSG_RESULT([yes])
85else
86  AC_MSG_RESULT([no])
87fi
88AM_CONDITIONAL([WANT_TOOLS], [test x"$enable_tools" != x"no"])
89
90dnl Checks for header files.
91AC_CHECK_HEADERS(limits.h sys/time.h sys/times.h unistd.h)
92
93dnl Checks for typedefs, structures, and compiler characteristics.
94AC_C_CONST
95AC_C_INLINE
96AC_TYPE_SIZE_T
97AC_HEADER_TIME
98AC_STRUCT_TM
99
100dnl Checks for library functions.
101AC_HEADER_STDC
102AC_CHECK_FUNCS(gettimeofday times ctime_r)
103
104dnl Add dependencies on files generated by configure.
105AC_SUBST([CONFIG_STATUS_DEPENDENCIES],
106  ['$(top_srcdir)/doc/Doxyfile.in $(top_srcdir)/lemon/lemon.pc.in $(top_srcdir)/cmake/version.cmake.in'])
107
108AC_CONFIG_FILES([
109Makefile
110cmake/version.cmake
111doc/Doxyfile
112lemon/lemon.pc
113])
114
115AC_OUTPUT
116
117echo
118echo '****************************** SUMMARY ******************************'
119echo
120echo Package version............... : $PACKAGE-$VERSION
121echo
122echo C++ compiler.................. : $CXX
123echo C++ compiles flags............ : $CXXFLAGS
124echo
125echo Compiler supports long long... : $long_long_found
126echo
127#echo GLPK support.................. : $lx_glpk_found
128#echo CPLEX support................. : $lx_cplex_found
129#echo SOPLEX support................ : $lx_soplex_found
130#echo
131echo Build demo programs........... : $enable_demo
132echo Build additional tools........ : $enable_tools
133echo
134echo The packace will be installed in
135echo -n '  '
136echo $prefix.
137echo
138echo '*********************************************************************'
139
140echo
141echo Configure complete, now type \'make\' and then \'make install\'.
142echo
Note: See TracBrowser for help on using the repository browser.