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 1421 2009-08-13 13:02:09Z stefan $ |
---|
6 | |
---|
7 | # Author: Andreas Waechter IBM 2006-04-13 |
---|
8 | |
---|
9 | ############################################################################# |
---|
10 | # Names and other basic things # |
---|
11 | ############################################################################# |
---|
12 | |
---|
13 | AC_PREREQ(2.59) |
---|
14 | |
---|
15 | AC_INIT([Clp],[trunk],[coin-clp@list.coin-or.org]) |
---|
16 | |
---|
17 | AC_COPYRIGHT([ |
---|
18 | Copyright 2006 International Business Machines and others. |
---|
19 | All Rights Reserved. |
---|
20 | This file is part of the open source package Coin which is distributed |
---|
21 | under 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 |
---|
25 | AC_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. |
---|
31 | AC_PREFIX_DEFAULT([`pwd`]) |
---|
32 | |
---|
33 | ############################################################################# |
---|
34 | # Standard build tool stuff # |
---|
35 | ############################################################################# |
---|
36 | |
---|
37 | # Get the system type |
---|
38 | AC_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. |
---|
44 | AC_COIN_PROJECTDIR_INIT |
---|
45 | |
---|
46 | # Check if user wants to produce debugging code |
---|
47 | AC_COIN_DEBUG_COMPILE(Clp) |
---|
48 | |
---|
49 | # Get the name of the C++ compiler and appropriate compiler options |
---|
50 | AC_COIN_PROG_CXX |
---|
51 | |
---|
52 | # Initialize automake and libtool |
---|
53 | AC_COIN_INIT_AUTO_TOOLS |
---|
54 | |
---|
55 | ############################################################################# |
---|
56 | # COIN components # |
---|
57 | ############################################################################# |
---|
58 | |
---|
59 | AC_COIN_HAS_PROJECT(CoinUtils) |
---|
60 | AC_COIN_HAS_PROJECT(Clp) |
---|
61 | |
---|
62 | ############################################################################# |
---|
63 | # Third party linear solvers # |
---|
64 | ############################################################################# |
---|
65 | |
---|
66 | # WSMP |
---|
67 | AC_ARG_WITH([wsmp], |
---|
68 | AC_HELP_STRING([--with-wsmp], |
---|
69 | [specify WSMP library]), |
---|
70 | [use_wsmp=$withval], [use_wsmp=no]) |
---|
71 | |
---|
72 | if test "$use_wsmp" != "no"; then |
---|
73 | LIBS="$use_wsmp $LIBS" |
---|
74 | ADDLIBS="$use_wsmp $ADDLIBS" |
---|
75 | |
---|
76 | defval= |
---|
77 | AC_MSG_CHECKING([whether user-supplied WSMP library \"$use_wsmp\" works (symbol wssmp_)]) |
---|
78 | AC_TRY_LINK([],[wssmp_()], |
---|
79 | [AC_MSG_RESULT(yes) |
---|
80 | defval=2], |
---|
81 | [AC_MSG_RESULT(no)]) |
---|
82 | if test "$defval" = ""; then |
---|
83 | AC_MSG_CHECKING([whether user-supplied WSMP library \"$use_wsmp\" works (symbol wssmp)]) |
---|
84 | AC_TRY_LINK([],[wssmp()], |
---|
85 | [AC_MSG_RESULT(yes) |
---|
86 | defval=3], |
---|
87 | [AC_MSG_RESULT(no)]) |
---|
88 | fi |
---|
89 | if test "$defval" = ""; then |
---|
90 | AC_MSG_ERROR([WSMP library $use_wsmp does not seem to work]) |
---|
91 | fi |
---|
92 | |
---|
93 | AC_DEFINE_UNQUOTED([WSSMP_BARRIER], [$defval], |
---|
94 | [Define to 2 if wssmp_ is available, and to 3 if wssmp is available]) |
---|
95 | fi |
---|
96 | |
---|
97 | ############################################################################# |
---|
98 | # CLP version number # |
---|
99 | ############################################################################# |
---|
100 | |
---|
101 | AC_DEFINE_UNQUOTED(CLPVERSION, "$PACKAGE_VERSION", "Version of Clp") |
---|
102 | |
---|
103 | ############################################################################# |
---|
104 | # Other dependencies # |
---|
105 | ############################################################################# |
---|
106 | |
---|
107 | AC_COIN_CHECK_GNU_READLINE |
---|
108 | |
---|
109 | ############################################################################## |
---|
110 | # VPATH links for example input files # |
---|
111 | ############################################################################## |
---|
112 | |
---|
113 | # In case this is a VPATH configuration we need to make sure that the |
---|
114 | # input files for the examples are available in the VPATH directory. |
---|
115 | |
---|
116 | AC_COIN_VPATH_LINK(examples/hello.mps) |
---|
117 | AC_COIN_VPATH_LINK(examples/input.130) |
---|
118 | |
---|
119 | ############################################################################## |
---|
120 | # Finishing up by writing all the output # |
---|
121 | ############################################################################## |
---|
122 | |
---|
123 | # Here list all the files that configure should create (except for the |
---|
124 | # configuration header file) |
---|
125 | AC_CONFIG_FILES([Makefile |
---|
126 | examples/Makefile |
---|
127 | src/Makefile |
---|
128 | test/Makefile |
---|
129 | clp_addlibs.txt]) |
---|
130 | |
---|
131 | # Here put the location and name of the configuration header file |
---|
132 | AC_CONFIG_HEADER([inc/config_clp.h]) |
---|
133 | |
---|
134 | # Finally, we let configure write all the output... |
---|
135 | AC_COIN_FINALIZE |
---|