source: trunk/Clp/configure.ac @ 1564

Last change on this file since 1564 was 1564, checked in by lou, 10 years ago

Tweaks to use PROJECTDIR_INIT to define CLP_VERSION.

  • Property svn:keywords set to Id
File size: 6.1 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 1564 2010-06-15 17:42:36Z lou $
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(Clp)
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 = trunk])
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 $LAPACK_LIBS $BLAS_LIBS"
74
75AC_COIN_HAS_MODULE(Osi,      [osi],            [required=0], [../Osi])
76AC_COIN_HAS_MODULE(OsiTests, [osi-unittests],  [required=0], [../Osi])
77AC_COIN_HAS_MODULE(Sample,   [coindatasample], [required=0], [../Data/Sample])
78AC_COIN_HAS_MODULE(Netlib,   [coindatanetlib], [required=0], [../Data/Netlib])
79
80#############################################################################
81#                        Third party linear solvers                         #
82#############################################################################
83
84# WSMP
85AC_ARG_WITH([wsmp],
86            AC_HELP_STRING([--with-wsmp],
87                           [specify WSMP library]),
88            [use_wsmp=$withval], [use_wsmp=no])
89
90if test "$use_wsmp" != "no"; then
91  LIBS="$use_wsmp $LIBS"
92  ADDLIBS="$use_wsmp $ADDLIBS"
93
94  defval=
95  AC_MSG_CHECKING([whether user-supplied WSMP library \"$use_wsmp\" works (symbol wssmp_)])
96  AC_TRY_LINK([],[wssmp_()],
97              [AC_MSG_RESULT(yes)
98               defval=2],
99              [AC_MSG_RESULT(no)])
100  if test "$defval" = ""; then
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=3],
105                [AC_MSG_RESULT(no)])
106  fi
107  if test "$defval" = ""; then
108    AC_MSG_ERROR([WSMP library $use_wsmp does not seem to work])
109  fi
110
111  AC_DEFINE_UNQUOTED([WSSMP_BARRIER], [$defval],
112                     [Define to 2 if wssmp_ is available, and to 3 if wssmp is available])
113fi
114
115#############################################################################
116#                             Other dependencies                            #
117#############################################################################
118
119AC_COIN_CHECK_GNU_READLINE
120
121##############################################################################
122#                   VPATH links for example input files                      #
123##############################################################################
124
125# In case this is a VPATH configuration we need to make sure that the
126# input files for the examples are available in the VPATH directory.
127
128AC_COIN_VPATH_LINK(examples/hello.mps)
129AC_COIN_VPATH_LINK(examples/input.130)
130
131##############################################################################
132#                   Finishing up by writing all the output                   #
133##############################################################################
134
135# Here list all the files that configure should create (except for the
136# configuration header file)
137AC_CONFIG_FILES([Makefile
138                 examples/Makefile
139                 src/Makefile
140                 src/OsiClp/Makefile
141                 test/Makefile
142                 clp.pc
143                 clp-uninstalled.pc])
144                 
145if test $coin_has_osi = yes ; then
146  AC_CONFIG_FILES([src/OsiClp/osi-clp.pc
147                   osi-clp-uninstalled.pc:src/OsiClp/osi-clp-uninstalled.pc.in])
148fi
149
150# Here put the location and name of the configuration header file
151AC_CONFIG_HEADER([inc/config_clp.h])
152
153# Finally, we let configure write all the output...
154AC_COIN_FINALIZE
Note: See TracBrowser for help on using the repository browser.