COIN-OR::LEMON - Graph Library

source: lemon-1.2/configure.ac @ 907:d3b041452dd8

Last change on this file since 907:d3b041452dd8 was 907:d3b041452dd8, checked in by Alpar Juttner <alpar@…>, 8 years ago

Remove doc header (show version number on the main page) (#404)

File size: 4.4 KB
RevLine 
[1]1dnl Process this file with autoconf to produce a configure script.
2
3dnl Version information.
[273]4m4_define([lemon_version_number],
[680]5          [m4_normalize(esyscmd([echo ${LEMON_VERSION}]))])
[273]6dnl m4_define([lemon_version_number], [])
7m4_define([lemon_hg_path], [m4_normalize(esyscmd([./scripts/chg-len.py]))])
[680]8m4_define([lemon_hg_revision], [m4_normalize(esyscmd([hg id -i 2> /dev/null]))])
[273]9m4_define([lemon_version], [ifelse(lemon_version_number(),
[680]10                           [],
11                           [ifelse(lemon_hg_revision(),
12                           [],
13                           [hg-tip],
14                           [lemon_hg_path().lemon_hg_revision()])],
15                           [lemon_version_number()])])
[1]16
17AC_PREREQ([2.59])
[236]18AC_INIT([LEMON], [lemon_version()], [lemon-user@lemon.cs.elte.hu], [lemon])
[1]19AC_CONFIG_AUX_DIR([build-aux])
20AC_CONFIG_MACRO_DIR([m4])
[64]21AM_INIT_AUTOMAKE([-Wall -Werror foreign subdir-objects nostdinc])
[1]22AC_CONFIG_SRCDIR([lemon/list_graph.h])
23AC_CONFIG_HEADERS([config.h lemon/config.h])
24
[678]25AC_DEFINE([LEMON_VERSION], [lemon_version()], [The version string])
26
[296]27dnl Do compilation tests using the C++ compiler.
28AC_LANG([C++])
29
[485]30dnl Check the existence of long long type.
31AC_CHECK_TYPE(long long, [long_long_found=yes], [long_long_found=no])
32if test x"$long_long_found" = x"yes"; then
[500]33  AC_DEFINE([LEMON_HAVE_LONG_LONG], [1], [Define to 1 if you have long long.])
[485]34fi
35
[1]36dnl Checks for programs.
37AC_PROG_CXX
38AC_PROG_CXXCPP
39AC_PROG_INSTALL
40AC_DISABLE_SHARED
41AC_PROG_LIBTOOL
42
[60]43AC_CHECK_PROG([doxygen_found],[doxygen],[yes],[no])
[153]44AC_CHECK_PROG([gs_found],[gs],[yes],[no])
[60]45
[296]46dnl Detect Intel compiler.
47AC_MSG_CHECKING([whether we are using the Intel C++ compiler])
48AC_COMPILE_IFELSE([#ifndef __INTEL_COMPILER
49choke me
50#endif], [ICC=[yes]], [ICC=[no]])
51if test x"$ICC" = x"yes"; then
52  AC_MSG_RESULT([yes])
53else
54  AC_MSG_RESULT([no])
55fi
56
[225]57dnl Set custom compiler flags when using g++.
[363]58if test "$GXX" = yes -a "$ICC" = no; then
59  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]60fi
[363]61AC_SUBST([WARNINGCXXFLAGS])
[1]62
63dnl Checks for libraries.
[458]64LX_CHECK_GLPK
65LX_CHECK_CPLEX
66LX_CHECK_SOPLEX
[568]67LX_CHECK_COIN
[1]68
[457]69AM_CONDITIONAL([HAVE_LP], [test x"$lx_lp_found" = x"yes"])
70AM_CONDITIONAL([HAVE_MIP], [test x"$lx_mip_found" = x"yes"])
[1]71
[225]72dnl Disable/enable building the binary tools.
[1]73AC_ARG_ENABLE([tools],
74AS_HELP_STRING([--enable-tools], [build additional tools @<:@default@:>@])
75AS_HELP_STRING([--disable-tools], [do not build additional tools]),
76              [], [enable_tools=yes])
77AC_MSG_CHECKING([whether to build the additional tools])
78if test x"$enable_tools" != x"no"; then
79  AC_MSG_RESULT([yes])
80else
81  AC_MSG_RESULT([no])
82fi
83AM_CONDITIONAL([WANT_TOOLS], [test x"$enable_tools" != x"no"])
84
85dnl Checks for header files.
86AC_CHECK_HEADERS(limits.h sys/time.h sys/times.h unistd.h)
87
88dnl Checks for typedefs, structures, and compiler characteristics.
89AC_C_CONST
90AC_C_INLINE
91AC_TYPE_SIZE_T
92AC_HEADER_TIME
93AC_STRUCT_TM
94
95dnl Checks for library functions.
96AC_HEADER_STDC
97AC_CHECK_FUNCS(gettimeofday times ctime_r)
98
[219]99dnl Add dependencies on files generated by configure.
100AC_SUBST([CONFIG_STATUS_DEPENDENCIES],
[907]101  ['$(top_srcdir)/doc/Doxyfile.in $(top_srcdir)/doc/mainpage.dox.in $(top_srcdir)/lemon/lemon.pc.in $(top_srcdir)/cmake/version.cmake.in'])
[219]102
[1]103AC_CONFIG_FILES([
104Makefile
[564]105demo/Makefile
[478]106cmake/version.cmake
[1]107doc/Doxyfile
[907]108doc/mainpage.dox
[1]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
[485]122echo Compiler supports long long... : $long_long_found
123echo
[458]124echo GLPK support.................. : $lx_glpk_found
125echo CPLEX support................. : $lx_cplex_found
126echo SOPLEX support................ : $lx_soplex_found
[459]127echo CLP support................... : $lx_clp_found
[567]128echo CBC support................... : $lx_cbc_found
[458]129echo
[55]130echo Build additional tools........ : $enable_tools
[1]131echo
132echo The packace will be installed in
133echo -n '  '
134echo $prefix.
135echo
136echo '*********************************************************************'
137
138echo
[55]139echo Configure complete, now type \'make\' and then \'make install\'.
[1]140echo
Note: See TracBrowser for help on using the repository browser.