source: trunk/configure.ac @ 2634

Last change on this file since 2634 was 2634, checked in by stefan, 12 months ago

eliminate root directory

  • move Clp/* into root
  • 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 2634 2020-01-31 15:43:49Z stefan $
6
7# Author:  Andreas Waechter            IBM    2006-04-13
8
9#############################################################################
10#                       Names and other basic things                        #
11#############################################################################
12
13AC_INIT([Clp],[trunk],[clp@list.coin-or.org],[coin-or-clp],
14        [https://projects.coin-or.org/Clp])
15
16AC_COPYRIGHT([
17Copyright 2006 International Business Machines and others.
18All Rights Reserved.
19This file is part of the open source package Clp which is distributed
20under 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
25AC_CONFIG_SRCDIR(src/ClpSimplex.cpp)
26
27# Do some initialization work (version numbers, change prefix default, ...)
28
29AC_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
37AC_COIN_PROG_CXX
38
39# This is a C++ package, set the language accordingly.
40
41AC_LANG_PUSH(C++)
42
43# Initialize libtool
44
45AC_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)
50AC_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
58AC_COIN_CHECK_MATH_HDRS
59
60#############################################################################
61#                              COIN-OR components                           #
62#############################################################################
63
64AC_COIN_CHK_PKG(CoinUtils,[ClpLib])
65if test $coin_has_coinutils != yes ; then
66  AC_MSG_ERROR([Required package CoinUtils not available.])
67fi
68AC_COIN_CHK_PKG(Osi,[OsiClpLib])
69AC_COIN_CHK_PKG(OsiTests,[OsiClpUnitTest],[osi-unittests])
70AC_COIN_CHK_PKG(Sample,,[coindatasample],[],dataonly)
71AC_COIN_CHK_PKG(Netlib,,[coindatanetlib],[],dataonly)
72
73#############################################################################
74#                                    Aboca                                  #
75#############################################################################
76
77AC_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
88AC_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
95AC_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
102AC_COIN_CHK_PKG(MUMPS,[ClpLib],[coinmumps])
103if test $coin_has_mumps = no ; then
104  AC_COIN_CHK_LIB(MUMPS,[ClpLib],[-ldmumps],[-I/usr/include/MUMPS],[],[dmumps_c])
105fi
106if test $coin_has_mumps = yes ; then
107  AC_DEFINE(CLP_HAS_MUMPS,[1],[Define to 1 if the MUMPS package is available.])
108fi
109
110# WSMP (Watson Sparse Matrix Package from IBM T.J. Watson)
111
112AC_ARG_WITH([wsmp],
113            AC_HELP_STRING([--with-wsmp],[specify WSMP library]),
114            [have_wsmp=yes; wsmp_lflags=$withval],
115            [have_wsmp=no])
116
117if 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.])])
124fi
125
126AM_CONDITIONAL([COIN_HAS_WSMP],[test $have_wsmp = yes])
127
128#############################################################################
129#                             Other dependencies                            #
130#############################################################################
131
132AC_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
141AC_COIN_EXAMPLE_FILES([examples/hello.mps examples/input.130])
142AC_COIN_EXAMPLE_FILES([examples/g.tiny examples/gparm.tiny])
143
144#############################################################################
145#                  Check for doxygen                                        #
146#############################################################################
147
148AC_COIN_DOXYGEN([CoinUtils Osi])
149
150##############################################################################
151#                   Finishing up by writing all the output                   #
152##############################################################################
153
154# Finalize libs and cflags.
155AC_COIN_FINALIZE_FLAGS([ClpLib OsiClpLib OsiClpUnitTest])
156AC_COIN_CHK_HERE([ClpLib],[OsiClpLib],[clp])
157
158# Here list all the files that configure should create (except for the
159# configuration header file)
160AC_CONFIG_FILES([Makefile
161                 examples/Makefile
162                 src/Makefile
163                 src/OsiClp/Makefile
164                 test/Makefile
165                 clp.pc])
166
167if test $coin_has_osi = yes ; then
168  AC_CONFIG_FILES([osi-clp.pc:src/OsiClp/osi-clp.pc.in])
169fi
170
171AC_CONFIG_FILES([doxydoc/doxygen.conf])
172
173# Here put the location and name of the configuration header file
174AC_CONFIG_HEADER([src/config.h src/config_clp.h])
175
176if test $coin_has_osi = yes ; then
177  AC_CONFIG_HEADER([src/OsiClp/config_osiclp.h])
178fi
179
180# Finally, we let configure write all the output...
181AC_COIN_FINALIZE
Note: See TracBrowser for help on using the repository browser.