source: branches/autotools-update/Clp/configure.ac @ 2334

Last change on this file since 2334 was 2334, checked in by lou, 8 months ago

Install .pc files. Fix collateral damage from BuildTools? r3848.

  • 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 2334 2018-10-10 18:23:54Z lou $
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# Sort out what we need to do to link to Fortran libraries. Check if there's a
44# Fortran compiler and call the appropriate macro based on the result. If
45# there's no Fortran compiler, it's necessary to specify a library and
46# function to use when attempting a link. For Clp, libblas (-lblas) and
47# DAXPY are appropriate choices.
48# Yes, we should be able to leverage this and avoid the check for BLAS below,
49# but I haven't quite figured it out yet.
50
51AC_COIN_PROG_F77
52if test "$F77" != "unavailable" ; then
53  AC_COIN_F77_SETUP
54else
55  AC_COIN_F77_WRAPPERS(blas,DAXPY)
56fi
57
58# Initialize libtool
59
60AC_COIN_PROG_LIBTOOL
61
62#############################################################################
63#                   Math headers                                            #
64#############################################################################
65
66# Check for cmath/math.h, cfloat/float.h, cieeefp/ieeefp.h
67
68AC_COIN_CHECK_MATH_HDRS
69
70#############################################################################
71#                              COIN-OR components                           #
72#############################################################################
73
74AC_COIN_CHK_PKG(CoinUtils,[ClpLib])
75if test $coin_has_coinutils != yes ; then
76  AC_MSG_ERROR([Required package CoinUtils not available.])
77fi
78AC_COIN_CHK_PKG(Osi,[OsiClpLib])
79AC_COIN_CHK_PKG(OsiTests,[OsiClpUnitTest],[osi-unittests])
80AC_COIN_CHK_PKG(Sample,,[coindatasample],[],dataonly)
81AC_COIN_CHK_PKG(Netlib,,[coindatanetlib],[],dataonly)
82
83#############################################################################
84#                                    Aboca                                  #
85#############################################################################
86
87AC_CLP_ABOCA(1)
88
89#############################################################################
90#                        Third party linear solvers                         #
91#############################################################################
92
93# AMD from UFL
94# [amd.h] [amd_defaults]
95
96AC_COIN_CHK_LIB(AMD,[ClpLib],[-lamd],[-I/usr/include/suitesparse])
97
98# CHOLMOD from UFL (requires AMD).
99# [cholmod.h] [cholmod_start]
100
101AC_COIN_CHK_LIB(CHOLMOD,[ClpLib],[-lcholmod],[-I/usr/include/suitesparse])
102
103# Glpk also brings AMD
104
105if test $coin_has_cholmod = no -a $coin_has_amd = no ; then
106  AC_COIN_CHK_PKG(Glpk,[ClpLib],[coinglpk])
107  if test $coin_has_glpk = yes ; then
108    AC_MSG_NOTICE([using AMD from GLPK package])
109    AC_DEFINE(COIN_HAS_AMD,[1],[Define to 1 if the AMD package is available])
110  fi
111else
112  # for configure
113  AM_CONDITIONAL(COIN_HAS_GLPK, [test 0 = 1])
114fi
115
116# MUMPS
117AC_COIN_CHK_PKG(Mumps,[ClpLib],[coinmumps])
118
119# WSMP (Watson Sparse Matrix Package from IBM T.J. Watson)
120
121AC_COIN_CHK_LIB(WSMP,[ClpLib],[],[],[],no)
122
123if test "$use_wsmp" = yes ; then
124  # AC_COIN_CHK_PKG_BLAS(ClpLib)
125  use_wsmp=
126  AC_COIN_CHK_PKG_FLINK([use_wsmp],wssmp,[$wsmp_libs])
127  if test -n "$use_wsmp" ; then
128    wsmp_libs=$use_wsmp
129    AC_DEFINE_UNQUOTED([COIN_HAS_WSMP],[1],
130        [Define to 1 if the WSMP package is available])
131    CLPLIB_LIBS="$use_wsmp $CLPLIB_LIBS"
132  else
133    AC_MSG_WARN([WSMP failed to link with $wsmp_libs])
134  fi
135else
136  # to please configure
137  # AM_CONDITIONAL(COIN_HAS_BLAS, [test 0 = 1])
138  :
139fi
140AM_CONDITIONAL(COIN_HAS_WSMP, [test "$use_wsmp" = yes])
141
142#############################################################################
143#                             Other dependencies                            #
144#############################################################################
145
146# AMPL solver library
147
148AC_COIN_CHK_PKG(ASL,[ClpLib],[coinasl])
149
150AC_COIN_CHK_GNU_READLINE([ClpLib])
151
152##############################################################################
153#                   VPATH links for example input files                      #
154##############################################################################
155
156# In case this is a VPATH configuration we need to make sure that the
157# input files for the examples are available in the VPATH directory.
158
159AC_COIN_EXAMPLE_FILES([examples/hello.mps examples/input.130])
160AC_COIN_EXAMPLE_FILES([examples/g.tiny examples/gparm.tiny])
161
162#############################################################################
163#                  Check for doxygen                                        #
164#############################################################################
165
166AC_COIN_DOXYGEN([CoinUtils Osi])
167
168##############################################################################
169#                   Finishing up by writing all the output                   #
170##############################################################################
171
172# Temporary hacks to shut down these two. This needs to be fixed.
173
174AM_CONDITIONAL(COIN_CXX_IS_CL,[test 0 = 1])
175
176# Finalize libs and cflags.
177AC_COIN_FINALIZE_FLAGS([ClpLib OsiClpLib OsiClpUnitTest])
178AC_COIN_CHK_HERE([ClpLib],[OsiClpLib],[clp])
179
180# Here list all the files that configure should create (except for the
181# configuration header file)
182AC_CONFIG_FILES([Makefile
183                 examples/Makefile
184                 src/Makefile
185                 src/OsiClp/Makefile
186                 test/Makefile
187                 clp.pc])
188
189if test $coin_has_osi = yes ; then
190  AC_CONFIG_FILES([osi-clp.pc:src/OsiClp/osi-clp.pc.in])
191fi
192
193AC_CONFIG_FILES([doxydoc/doxygen.conf])
194
195# Here put the location and name of the configuration header file
196AC_CONFIG_HEADER([src/config.h src/config_clp.h])
197
198# Finally, we let configure write all the output...
199AC_COIN_FINALIZE
200
Note: See TracBrowser for help on using the repository browser.