COIN-OR::LEMON - Graph Library

source: lemon-main/configure.ac @ 481:861a9d5ff283

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

Merge (manually add cmake/FindGLPK.cmake to Makefile.am)

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