source: branches/split/Clp/configure.ac @ 1544

Last change on this file since 1544 was 1544, checked in by stefan, 10 years ago

remove redundant if

  • Property svn:keywords set to Id
File size: 6.8 KB
Line 
1# Copyright (C) 2006 International Business Machines.
2# All Rights Reserved.
3# This file is distributed under the Common Public License.
4
5## $Id: configure.ac 1544 2010-04-24 17:50:15Z stefan $
6
7# Author:  Andreas Waechter            IBM    2006-04-13
8
9#############################################################################
10#                       Names and other basic things                        #
11#############################################################################
12
13AC_PREREQ(2.59)
14
15AC_INIT([Clp],[trunk],[clp@list.coin-or.org])
16
17AC_COPYRIGHT([
18Copyright 2006 International Business Machines and others.
19All Rights Reserved.
20This file is part of the open source package Coin which is distributed
21under the Common Public License.])
22
23# List one file in the package so that the configure script can test
24# whether the package is actually there
25AC_CONFIG_SRCDIR(src/ClpSimplex.cpp)
26
27# Where should everything be installed by default?  Here, we want it
28# to be installed directly in 'bin', 'lib', 'include' subdirectories
29# of the directory where configure is run.  The default would be
30# /usr/local.
31AC_PREFIX_DEFAULT([`pwd`])
32
33#############################################################################
34#                         Standard build tool stuff                         #
35#############################################################################
36
37# Get the system type
38AC_CANONICAL_BUILD
39
40# If this project depends on external projects, the Externals file in
41# the source root directory contains definition of where to find those
42# externals.  The following macro ensures that those externals are
43# retrieved by svn if they are not there yet.
44AC_COIN_PROJECTDIR_INIT
45
46# Check if user wants to produce debugging code
47AC_COIN_DEBUG_COMPILE(Clp)
48
49# Get the name of the C++ compiler and appropriate compiler options
50AC_COIN_PROG_CXX
51
52# Initialize automake and libtool
53AC_COIN_INIT_AUTO_TOOLS
54
55#############################################################################
56#                              COIN-OR components                           #
57#############################################################################
58
59AC_COIN_HAS_MODULE(CoinUtils,          [coinutils = split])
60if test $coin_has_coinutils != yes ; then
61  #if we have to use the fallback routines, then obviously it will not find CoinUtils dependencies
62  #thus, we check whether ThirdParty/Blas and ThirdParty/Lapack have been setup and
63  #assume that if present then they are dependencies of CoinUtils
64  AC_COIN_HAS_MODULE_FALLBACK(Blas,   [coinblas],   [../ThirdParty/Blas],   [required=0 dodefine=0 doconditional=0])
65  AC_COIN_HAS_MODULE_FALLBACK(Lapack, [coinlapack], [../ThirdParty/Lapack], [required=0 dodefine=0 doconditional=0])
66fi
67AC_COIN_HAS_MODULE_FALLBACK(CoinUtils, [coinutils], [../CoinUtils])
68if test $coin_has_coinutils != yes ; then
69  AC_MSG_ERROR([Required package CoinUtils not available.])
70fi
71#so if we had to do find Blas and Lapack separately, then add their linker flags to the CoinUtils flags
72#actually the libs may already be included in libCoinUtils, but we may still need the fortran library flags
73COINUTILS_LIBS="$COINUTILS_LIBS $BLAS_LIBS $LAPACK_LIBS"
74
75AC_COIN_HAS_MODULE(Osi,               [osi],                     [required=0])
76AC_COIN_HAS_MODULE_FALLBACK(Osi,      [osi],           [../Osi], [required=0])
77AC_COIN_HAS_MODULE(OsiTests,          [osi-unittests],           [required=0])
78AC_COIN_HAS_MODULE_FALLBACK(OsiTests, [osi-unittests], [../Osi], [required=0])
79
80AC_COIN_HAS_MODULE(Sample,          [coindatasample],                   [required=0])
81AC_COIN_HAS_MODULE_FALLBACK(Sample, [coindatasample], [../Data/Sample], [required=0])
82
83AC_COIN_HAS_MODULE(Netlib,          [coindatanetlib],                   [required=0])
84AC_COIN_HAS_MODULE_FALLBACK(Netlib, [coindatanetlib], [../Data/Netlib], [required=0])
85
86#############################################################################
87#                        Third party linear solvers                         #
88#############################################################################
89
90# WSMP
91AC_ARG_WITH([wsmp],
92            AC_HELP_STRING([--with-wsmp],
93                           [specify WSMP library]),
94            [use_wsmp=$withval], [use_wsmp=no])
95
96if test "$use_wsmp" != "no"; then
97  LIBS="$use_wsmp $LIBS"
98  ADDLIBS="$use_wsmp $ADDLIBS"
99
100  defval=
101  AC_MSG_CHECKING([whether user-supplied WSMP library \"$use_wsmp\" works (symbol wssmp_)])
102  AC_TRY_LINK([],[wssmp_()],
103              [AC_MSG_RESULT(yes)
104               defval=2],
105              [AC_MSG_RESULT(no)])
106  if test "$defval" = ""; then
107    AC_MSG_CHECKING([whether user-supplied WSMP library \"$use_wsmp\" works (symbol wssmp)])
108    AC_TRY_LINK([],[wssmp()],
109                [AC_MSG_RESULT(yes)
110                 defval=3],
111                [AC_MSG_RESULT(no)])
112  fi
113  if test "$defval" = ""; then
114    AC_MSG_ERROR([WSMP library $use_wsmp does not seem to work])
115  fi
116
117  AC_DEFINE_UNQUOTED([WSSMP_BARRIER], [$defval],
118                     [Define to 2 if wssmp_ is available, and to 3 if wssmp is available])
119fi
120
121#############################################################################
122#                           CLP version number                              #
123#############################################################################
124
125AC_DEFINE_UNQUOTED(CLPVERSION, "$PACKAGE_VERSION", "Version of Clp")
126
127#############################################################################
128#                             Other dependencies                            #
129#############################################################################
130
131AC_COIN_CHECK_GNU_READLINE
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_VPATH_LINK(examples/hello.mps)
141AC_COIN_VPATH_LINK(examples/input.130)
142
143##############################################################################
144#                   Finishing up by writing all the output                   #
145##############################################################################
146
147# Here list all the files that configure should create (except for the
148# configuration header file)
149AC_CONFIG_FILES([Makefile
150                 examples/Makefile
151                 src/Makefile
152                 src/OsiClp/Makefile
153                 test/Makefile
154                 clp_addlibs.txt
155                 clp.pc
156                 clp-uninstalled.pc])
157                 
158if test $coin_has_osi = yes ; then
159  AC_CONFIG_FILES([src/OsiClp/osi-clp.pc
160                   osi-clp-uninstalled.pc:src/OsiClp/osi-clp-uninstalled.pc.in])
161fi
162
163# Here put the location and name of the configuration header file
164AC_CONFIG_HEADER([inc/config_clp.h])
165
166# Finally, we let configure write all the output...
167AC_COIN_FINALIZE
Note: See TracBrowser for help on using the repository browser.