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 1603 2010-09-13 07:39:27Z forrest $ |
---|
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],[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/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. |
---|
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(Clp) |
---|
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-OR components # |
---|
57 | ############################################################################# |
---|
58 | |
---|
59 | AC_COIN_HAS_PACKAGE(CoinUtils, [coinutils = trunk], [ClpLib]) |
---|
60 | AC_COIN_HAS_PACKAGE(Osi, [osi], [OsiClpLib]) |
---|
61 | AC_COIN_HAS_PACKAGE(OsiTests, [osi-unittests]) |
---|
62 | AC_COIN_HAS_PACKAGE(Sample, [coindatasample]) |
---|
63 | AC_COIN_HAS_PACKAGE(Netlib, [coindatanetlib]) |
---|
64 | |
---|
65 | ############################################################################# |
---|
66 | # Third party linear solvers # |
---|
67 | ############################################################################# |
---|
68 | |
---|
69 | # WSMP |
---|
70 | AC_ARG_WITH([wsmp], |
---|
71 | AC_HELP_STRING([--with-wsmp], |
---|
72 | [specify WSMP library]), |
---|
73 | [use_wsmp=$withval], [use_wsmp=no]) |
---|
74 | |
---|
75 | if test "$use_wsmp" != "no"; then |
---|
76 | CLPLIB_LIBS="$use_wsmp $CLPLIB_LIBS" |
---|
77 | CLPLIB_PCLIBS="$use_wsmp $CLPLIB_PCLIBS" |
---|
78 | |
---|
79 | defval= |
---|
80 | AC_MSG_CHECKING([whether user-supplied WSMP library \"$use_wsmp\" works (symbol wssmp_)]) |
---|
81 | AC_TRY_LINK([],[wssmp_()], |
---|
82 | [AC_MSG_RESULT(yes) |
---|
83 | defval=2], |
---|
84 | [AC_MSG_RESULT(no)]) |
---|
85 | if test "$defval" = ""; then |
---|
86 | AC_MSG_CHECKING([whether user-supplied WSMP library \"$use_wsmp\" works (symbol wssmp)]) |
---|
87 | AC_TRY_LINK([],[wssmp()], |
---|
88 | [AC_MSG_RESULT(yes) |
---|
89 | defval=3], |
---|
90 | [AC_MSG_RESULT(no)]) |
---|
91 | fi |
---|
92 | if test "x$defval" = "x"; then |
---|
93 | AC_MSG_ERROR([WSMP library $use_wsmp does not seem to work]) |
---|
94 | fi |
---|
95 | |
---|
96 | AC_DEFINE_UNQUOTED([WSSMP_BARRIER], [$defval], |
---|
97 | [Define to 2 if wssmp_ is available, and to 3 if wssmp is available]) |
---|
98 | fi |
---|
99 | |
---|
100 | ############################################################################# |
---|
101 | # Other dependencies # |
---|
102 | ############################################################################# |
---|
103 | |
---|
104 | AC_COIN_CHECK_GNU_READLINE(ClpLib) |
---|
105 | |
---|
106 | ############################################################################## |
---|
107 | # VPATH links for example input files # |
---|
108 | ############################################################################## |
---|
109 | |
---|
110 | # In case this is a VPATH configuration we need to make sure that the |
---|
111 | # input files for the examples are available in the VPATH directory. |
---|
112 | |
---|
113 | AC_COIN_VPATH_LINK(examples/hello.mps) |
---|
114 | AC_COIN_VPATH_LINK(examples/input.130) |
---|
115 | |
---|
116 | ############################################################################# |
---|
117 | # Check for doxygen # |
---|
118 | ############################################################################# |
---|
119 | |
---|
120 | AC_COIN_DOXYGEN(CoinUtils Osi) |
---|
121 | |
---|
122 | ############################################################################## |
---|
123 | # Finishing up by writing all the output # |
---|
124 | ############################################################################## |
---|
125 | |
---|
126 | # Here list all the files that configure should create (except for the |
---|
127 | # configuration header file) |
---|
128 | AC_CONFIG_FILES([Makefile |
---|
129 | examples/Makefile |
---|
130 | src/Makefile |
---|
131 | src/OsiClp/Makefile |
---|
132 | test/Makefile |
---|
133 | clp.pc |
---|
134 | clp-uninstalled.pc]) |
---|
135 | |
---|
136 | if test $coin_has_osi = yes ; then |
---|
137 | AC_CONFIG_FILES([src/OsiClp/osi-clp.pc |
---|
138 | osi-clp-uninstalled.pc:src/OsiClp/osi-clp-uninstalled.pc.in]) |
---|
139 | fi |
---|
140 | |
---|
141 | AC_CONFIG_FILES([doxydoc/doxygen.conf]) |
---|
142 | |
---|
143 | # Here put the location and name of the configuration header file |
---|
144 | AC_CONFIG_HEADER([inc/config_clp.h]) |
---|
145 | |
---|
146 | # Finally, we let configure write all the output... |
---|
147 | AC_COIN_FINALIZE |
---|