source: stable/BSPsplit/Clp/configure.ac @ 1465

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

use new pkg-config based macros to search for required and optional packages

  • Property svn:keywords set to Author Date Id Revision
File size: 5.3 KB
Line 
1# Copyright (C) 2006, 2009 International Business Machines.
2# All Rights Reserved.
3# This file is distributed under the Common Public License.
4
5## $Id: configure.ac 1465 2009-11-29 17:49:43Z 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],[1.10.0],[coin-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/ClpCholeskyBase.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 components                              #
57#############################################################################
58
59#AC_COIN_HAS_MODULE_BLAS
60#AC_COIN_HAS_MODULE_LAPACK
61AC_COIN_HAS_MODULE(CoinUtils,  [coinutils = 2.5BSPsplit])
62AC_COIN_HAS_MODULE(Sample,     [sample], [required=0])
63AC_COIN_HAS_MODULE(Netlib,     [netlib], [required=0])
64
65if test "$coin_has_coinutils" != yes ; then
66  AC_COIN_HAS_PROJECT(CoinUtils)
67  if test $coin_has_coinutils = yes ; then
68    COINUTILS_CFLAGS="-I${COINUTILSSRCDIR}/src -I${COINUTILSOBJDIR}/inc"
69    COINUTILS_LIBS="${COINUTILSOBJDIR}/src/libCoinUtils.la"
70  else
71    AC_MSG_ERROR("Required package CoinUtils unavailable.")
72  fi
73else
74  #for configure
75  AM_CONDITIONAL([COIN_HAS_COINUTILS_PREINSTALLED], [test 0 = 1])
76fi
77
78#############################################################################
79#                        Third party linear solvers                         #
80#############################################################################
81
82# WSMP
83AC_ARG_WITH([wsmp],
84            AC_HELP_STRING([--with-wsmp],
85                           [specify WSMP library]),
86            [use_wsmp=$withval], [use_wsmp=no])
87
88if test "$use_wsmp" != "no"; then
89  LIBS="$use_wsmp $LIBS"
90  ADDLIBS="$use_wsmp $ADDLIBS"
91
92  defval=
93  AC_MSG_CHECKING([whether user-supplied WSMP library \"$use_wsmp\" works (symbol wssmp_)])
94  AC_TRY_LINK([],[wssmp_()],
95              [AC_MSG_RESULT(yes)
96               defval=2],
97              [AC_MSG_RESULT(no)])
98  if test "$defval" = ""; then
99    AC_MSG_CHECKING([whether user-supplied WSMP library \"$use_wsmp\" works (symbol wssmp)])
100    AC_TRY_LINK([],[wssmp()],
101                [AC_MSG_RESULT(yes)
102                 defval=3],
103                [AC_MSG_RESULT(no)])
104  fi
105  if test "$defval" = ""; then
106    AC_MSG_ERROR([WSMP library $use_wsmp does not seem to work])
107  fi
108
109  AC_DEFINE_UNQUOTED([WSSMP_BARRIER], [$defval],
110                     [Define to 2 if wssmp_ is available, and to 3 if wssmp is available])
111fi
112
113#############################################################################
114#                             Other dependencies                            #
115#############################################################################
116
117AC_COIN_CHECK_GNU_READLINE
118
119##############################################################################
120#                   VPATH links for example input files                      #
121##############################################################################
122
123# In case this is a VPATH configuration we need to make sure that the
124# input files for the examples are available in the VPATH directory.
125
126AC_COIN_VPATH_LINK(examples/hello.mps)
127AC_COIN_VPATH_LINK(examples/input.130)
128
129##############################################################################
130#                   Finishing up by writing all the output                   #
131##############################################################################
132
133# Here list all the files that configure should create (except for the
134# configuration header file)
135AC_CONFIG_FILES([Makefile
136                 examples/Makefile
137                 src/Makefile
138                 test/Makefile
139                 clp_addlibs.txt
140                 clp.pc
141                 clp-uninstalled.pc])
142
143# Here put the location and name of the configuration header file
144AC_CONFIG_HEADER([inc/config_clp.h])
145
146# Finally, we let configure write all the output...
147AC_COIN_FINALIZE
Note: See TracBrowser for help on using the repository browser.