1 | # Copyright (C) 2006 International Business Machines. |
---|
2 | # All Rights Reserved. |
---|
3 | # This file is distributed under the Eclipse Public License. |
---|
4 | |
---|
5 | ## $Id: configure.ac 2615 2020-01-16 10:11:17Z stefan $ |
---|
6 | |
---|
7 | # Author: Andreas Waechter IBM 2006-04-13 |
---|
8 | |
---|
9 | ############################################################################# |
---|
10 | # Names and other basic things # |
---|
11 | ############################################################################# |
---|
12 | |
---|
13 | AC_INIT([Clp],[trunk],[clp@list.coin-or.org],[coin-or-clp], |
---|
14 | [https://projects.coin-or.org/Clp]) |
---|
15 | |
---|
16 | AC_COPYRIGHT([ |
---|
17 | Copyright 2006 International Business Machines and others. |
---|
18 | All Rights Reserved. |
---|
19 | This file is part of the open source package Clp which is distributed |
---|
20 | under the Eclipse Public License.]) |
---|
21 | |
---|
22 | # List one file in the package so that the configure script can test |
---|
23 | # whether the package is actually there. |
---|
24 | |
---|
25 | AC_CONFIG_SRCDIR(src/ClpSimplex.cpp) |
---|
26 | |
---|
27 | # Do some initialization work (version numbers, change prefix default, ...) |
---|
28 | |
---|
29 | AC_COIN_INITIALIZE(Clp) |
---|
30 | |
---|
31 | ############################################################################# |
---|
32 | # Standard build tool stuff # |
---|
33 | ############################################################################# |
---|
34 | |
---|
35 | # Get the name of the C++ compiler and appropriate compiler options. |
---|
36 | |
---|
37 | AC_COIN_PROG_CXX |
---|
38 | |
---|
39 | # This is a C++ package, set the language accordingly. |
---|
40 | |
---|
41 | AC_LANG_PUSH(C++) |
---|
42 | |
---|
43 | # Initialize libtool |
---|
44 | |
---|
45 | AC_COIN_PROG_LIBTOOL |
---|
46 | |
---|
47 | # set RPATH_FLAGS to the compiler link flags required to hardcode location |
---|
48 | # of the shared objects (expanded_libdir is set somewhere in configure before) |
---|
49 | # (use in examples Makefile) |
---|
50 | AC_COIN_RPATH_FLAGS([$expanded_libdir]) |
---|
51 | |
---|
52 | ############################################################################# |
---|
53 | # Math headers # |
---|
54 | ############################################################################# |
---|
55 | |
---|
56 | # Check for cmath/math.h, cfloat/float.h, cieeefp/ieeefp.h |
---|
57 | |
---|
58 | AC_COIN_CHECK_MATH_HDRS |
---|
59 | |
---|
60 | ############################################################################# |
---|
61 | # COIN-OR components # |
---|
62 | ############################################################################# |
---|
63 | |
---|
64 | AC_COIN_CHK_PKG(CoinUtils,[ClpLib]) |
---|
65 | if test $coin_has_coinutils != yes ; then |
---|
66 | AC_MSG_ERROR([Required package CoinUtils not available.]) |
---|
67 | fi |
---|
68 | AC_COIN_CHK_PKG(Osi,[OsiClpLib]) |
---|
69 | AC_COIN_CHK_PKG(OsiTests,[OsiClpUnitTest],[osi-unittests]) |
---|
70 | AC_COIN_CHK_PKG(Sample,,[coindatasample],[],dataonly) |
---|
71 | AC_COIN_CHK_PKG(Netlib,,[coindatanetlib],[],dataonly) |
---|
72 | |
---|
73 | ############################################################################# |
---|
74 | # Aboca # |
---|
75 | ############################################################################# |
---|
76 | |
---|
77 | AC_CLP_ABOCA(1) |
---|
78 | |
---|
79 | ############################################################################# |
---|
80 | # Third party linear solvers # |
---|
81 | ############################################################################# |
---|
82 | |
---|
83 | # AMD and CHOLMOD from UFL. Glpk is an alternative source for amd. CHOLMOD |
---|
84 | # doc'n claims it requires METIS, but apparently that's not necessary for the |
---|
85 | # version distributed with Fedora. |
---|
86 | |
---|
87 | # amd.h |
---|
88 | AC_COIN_CHK_LIB(AMD,[ClpLib],[-lamd],[-I/usr/include/suitesparse],[], |
---|
89 | [amd_defaults]) |
---|
90 | |
---|
91 | # CHOLMOD from UFL |
---|
92 | # Requires AMD, but apparently not for a link check with dynamic libraries. |
---|
93 | # cholmod.h |
---|
94 | |
---|
95 | AC_COIN_CHK_LIB(CHOLMOD,[ClpLib],[-lcholmod],[-I/usr/include/suitesparse],[],[cholmod_start]) |
---|
96 | |
---|
97 | # MUMPS. Check first for ThirdParty/MUMPS, on the assumption that if the user |
---|
98 | # bothered to build it, we should use it. If it's not present, try for a |
---|
99 | # system installation. If we find it, define CLP_HAS_MUMPS for export to code |
---|
100 | # using clp. |
---|
101 | |
---|
102 | AC_COIN_CHK_PKG(MUMPS,[ClpLib],[coinmumps]) |
---|
103 | if test $coin_has_mumps = no ; then |
---|
104 | AC_COIN_CHK_LIB(MUMPS,[ClpLib],[-ldmumps],[-I/usr/include/MUMPS],[],[dmumps_c]) |
---|
105 | fi |
---|
106 | if test $coin_has_mumps = yes ; then |
---|
107 | AC_DEFINE(CLP_HAS_MUMPS,[1],[Define to 1 if the MUMPS package is available.]) |
---|
108 | fi |
---|
109 | |
---|
110 | # WSMP (Watson Sparse Matrix Package from IBM T.J. Watson) |
---|
111 | |
---|
112 | AC_ARG_WITH([wsmp], |
---|
113 | AC_HELP_STRING([--with-wsmp],[specify WSMP library]), |
---|
114 | [have_wsmp=yes; wsmp_lflags=$withval], |
---|
115 | [have_wsmp=no]) |
---|
116 | |
---|
117 | if test "$have_wsmp" = "yes"; then |
---|
118 | AC_COIN_TRY_LINK([wssmp],[$wsmp_lflags],[], |
---|
119 | [AC_COIN_DEFINENAMEMANGLING([WSMP],[$wssmp_namemangling]) |
---|
120 | CLPLIB_LFLAGS="$wsmp_lflags $CLPLIB_LFLAGS" |
---|
121 | AC_DEFINE(COIN_HAS_WSMP,1,[Define to 1 if WSMP is available]) |
---|
122 | ], |
---|
123 | [AC_MSG_ERROR([Symbol wssmp not found with WSMP flags $wsmp_lflags.])]) |
---|
124 | fi |
---|
125 | |
---|
126 | AM_CONDITIONAL([COIN_HAS_WSMP],[test $have_wsmp = yes]) |
---|
127 | |
---|
128 | ############################################################################# |
---|
129 | # Other dependencies # |
---|
130 | ############################################################################# |
---|
131 | |
---|
132 | AC_COIN_CHK_GNU_READLINE([ClpLib]) |
---|
133 | |
---|
134 | ############################################################################## |
---|
135 | # VPATH links for example input files # |
---|
136 | ############################################################################## |
---|
137 | |
---|
138 | # In case this is a VPATH configuration we need to make sure that the |
---|
139 | # input files for the examples are available in the VPATH directory. |
---|
140 | |
---|
141 | AC_COIN_EXAMPLE_FILES([examples/hello.mps examples/input.130]) |
---|
142 | AC_COIN_EXAMPLE_FILES([examples/g.tiny examples/gparm.tiny]) |
---|
143 | |
---|
144 | ############################################################################# |
---|
145 | # Check for doxygen # |
---|
146 | ############################################################################# |
---|
147 | |
---|
148 | AC_COIN_DOXYGEN([CoinUtils Osi]) |
---|
149 | |
---|
150 | ############################################################################## |
---|
151 | # Finishing up by writing all the output # |
---|
152 | ############################################################################## |
---|
153 | |
---|
154 | # Finalize libs and cflags. |
---|
155 | AC_COIN_FINALIZE_FLAGS([ClpLib OsiClpLib OsiClpUnitTest]) |
---|
156 | AC_COIN_CHK_HERE([ClpLib],[OsiClpLib],[clp]) |
---|
157 | |
---|
158 | # Here list all the files that configure should create (except for the |
---|
159 | # configuration header file) |
---|
160 | AC_CONFIG_FILES([Makefile |
---|
161 | examples/Makefile |
---|
162 | src/Makefile |
---|
163 | src/OsiClp/Makefile |
---|
164 | test/Makefile |
---|
165 | clp.pc]) |
---|
166 | |
---|
167 | if test $coin_has_osi = yes ; then |
---|
168 | AC_CONFIG_FILES([osi-clp.pc:src/OsiClp/osi-clp.pc.in]) |
---|
169 | fi |
---|
170 | |
---|
171 | AC_CONFIG_FILES([doxydoc/doxygen.conf]) |
---|
172 | |
---|
173 | # Here put the location and name of the configuration header file |
---|
174 | AC_CONFIG_HEADER([src/config.h src/config_clp.h]) |
---|
175 | |
---|
176 | if test $coin_has_osi = yes ; then |
---|
177 | AC_CONFIG_HEADER([src/OsiClp/config_osiclp.h]) |
---|
178 | fi |
---|
179 | |
---|
180 | # Finally, we let configure write all the output... |
---|
181 | AC_COIN_FINALIZE |
---|