COIN-OR::LEMON - Graph Library

source: lemon-0.x/configure.ac @ 1902:e9af75c90c28

Last change on this file since 1902:e9af75c90c28 was 1863:12e0db6b7d0e, checked in by Akos Ladanyi, 18 years ago

Demos and benchmarks are not built by default now. They can be enabled with the --enable-demo and --enable-benchmark configure flags.

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