source: trunk/configure.ac

Last change on this file was 2639, checked in by stefan, 3 weeks ago

update url

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