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

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

add OsiClp? including OsiClp? unittest

  • Property svn:keywords set to Id
File size: 5.9 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 1527 2010-02-27 18:41:40Z 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 components                              #
57#############################################################################
58
59AC_COIN_HAS_MODULE(CoinUtils,  [coinutils = split])
60AC_COIN_HAS_MODULE(Osi,        [osi],            [required=0])
61AC_COIN_HAS_MODULE(OsiTests,   [osi-unittests],  [required=0])
62AC_COIN_HAS_MODULE(Sample,     [coindatasample], [required=0])
63AC_COIN_HAS_MODULE(Netlib,     [coindatanetlib], [required=0])
64
65# fallback if no pkg-config is available
66if test "$coin_has_coinutils" != yes ; then
67  AC_COIN_HAS_PROJECT(CoinUtils)
68  if test $coin_has_coinutils != notGiven && test $coin_has_coinutils != skipping ; then
69    COINUTILS_CFLAGS="-I`${CYGPATH_W} ${COINUTILSSRCDIR}/src` -I`${CYGPATH_W} ${COINUTILSOBJDIR}/inc`"
70    COINUTILS_LIBS="${COINUTILSOBJDIR}/src/libCoinUtils.la `cat ${COINUTILSOBJDIR}/coinutils_addlibs.txt`"
71  else
72    AC_MSG_ERROR("Required package CoinUtils unavailable.")
73  fi
74fi
75
76#############################################################################
77#                        Third party linear solvers                         #
78#############################################################################
79
80# WSMP
81AC_ARG_WITH([wsmp],
82            AC_HELP_STRING([--with-wsmp],
83                           [specify WSMP library]),
84            [use_wsmp=$withval], [use_wsmp=no])
85
86if test "$use_wsmp" != "no"; then
87  LIBS="$use_wsmp $LIBS"
88  ADDLIBS="$use_wsmp $ADDLIBS"
89
90  defval=
91  AC_MSG_CHECKING([whether user-supplied WSMP library \"$use_wsmp\" works (symbol wssmp_)])
92  AC_TRY_LINK([],[wssmp_()],
93              [AC_MSG_RESULT(yes)
94               defval=2],
95              [AC_MSG_RESULT(no)])
96  if test "$defval" = ""; then
97    AC_MSG_CHECKING([whether user-supplied WSMP library \"$use_wsmp\" works (symbol wssmp)])
98    AC_TRY_LINK([],[wssmp()],
99                [AC_MSG_RESULT(yes)
100                 defval=3],
101                [AC_MSG_RESULT(no)])
102  fi
103  if test "$defval" = ""; then
104    AC_MSG_ERROR([WSMP library $use_wsmp does not seem to work])
105  fi
106
107  AC_DEFINE_UNQUOTED([WSSMP_BARRIER], [$defval],
108                     [Define to 2 if wssmp_ is available, and to 3 if wssmp is available])
109fi
110
111#############################################################################
112#                           CLP version number                              #
113#############################################################################
114
115AC_DEFINE_UNQUOTED(CLPVERSION, "$PACKAGE_VERSION", "Version of Clp")
116
117#############################################################################
118#                             Other dependencies                            #
119#############################################################################
120
121AC_COIN_CHECK_GNU_READLINE
122
123##############################################################################
124#                   VPATH links for example input files                      #
125##############################################################################
126
127# In case this is a VPATH configuration we need to make sure that the
128# input files for the examples are available in the VPATH directory.
129
130AC_COIN_VPATH_LINK(examples/hello.mps)
131AC_COIN_VPATH_LINK(examples/input.130)
132
133##############################################################################
134#                   Finishing up by writing all the output                   #
135##############################################################################
136
137# Here list all the files that configure should create (except for the
138# configuration header file)
139AC_CONFIG_FILES([Makefile
140                 examples/Makefile
141                 src/Makefile
142                 src/OsiClp/Makefile
143                 test/Makefile
144                 clp_addlibs.txt
145                 clp.pc
146                 clp-uninstalled.pc])
147                 
148if test $coin_has_osi = yes ; then
149  AC_CONFIG_FILES([src/OsiClp/osi-clp.pc
150                   osi-clp-uninstalled.pc:src/OsiClp/osi-clp-uninstalled.pc.in])
151fi
152
153# Here put the location and name of the configuration header file
154AC_CONFIG_HEADER([inc/config_clp.h])
155
156# Finally, we let configure write all the output...
157AC_COIN_FINALIZE
Note: See TracBrowser for help on using the repository browser.