COIN-OR::LEMON - Graph Library

source: lemon/configure.ac @ 481:7afc121e0689

Last change on this file since 481:7afc121e0689 was 481:7afc121e0689, checked in by Balazs Dezso <deba@…>, 15 years ago

Port LP and MIP solvers from SVN -r3509 (#44)

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