source: trunk/coin.m4 @ 3848

Last change on this file since 3848 was 3848, checked in by lou, 12 months ago

Introduce CHK_HERE, {_CFLAGS,_LFLAGS}_NOPC for use in .pc files and remove
_PUB variables, rename a few variables, and generally clean up accumulation
of compiler and linker flags.

  • Property svn:keywords set to Author Date Id Revision
File size: 60.6 KB
Line 
1# Copyright (C) 2013-2016
2# All Rights Reserved.
3# This file is distributed under the Eclipse Public License.
4#
5# This file defines the common autoconf macros for COIN-OR
6#
7
8# Check requirements
9AC_PREREQ(2.69)
10
11###########################################################################
12#                           COIN_CHECK_VPATH                              #
13###########################################################################
14
15# This macro sets the variable coin_vpath_config to true if this is a VPATH
16# configuration, otherwise it sets it to false. `VPATH' just means we're
17# following best practices and not building in the source directory.
18
19AC_DEFUN([AC_COIN_CHECK_VPATH],
20[
21  AC_MSG_CHECKING(whether this is a VPATH configuration)
22  if test `cd $srcdir ; pwd` != `pwd`; then
23    coin_vpath_config=yes
24  else
25    coin_vpath_config=no
26  fi
27  AC_MSG_RESULT($coin_vpath_config)
28]) # AC_COIN_CHECK_VPATH
29
30
31###########################################################################
32#                          COIN_PROJECTVERSION                            #
33###########################################################################
34
35# This macro is used by COIN_INITIALIZE and sets up variables related to
36# versioning numbers of the project.
37#   COIN_PROJECTVERSION([project],[libtool_version_string])
38
39AC_DEFUN([AC_COIN_PROJECTVERSION],
40[
41  m4_ifvaln([$1],
42    [AC_DEFINE_UNQUOTED(m4_toupper($1_VERSION),
43       ["$PACKAGE_VERSION"],[Version number of project])
44
45# Parse package version, assuming major.minor.release. PACKAGE_VERSION is set
46# by AC_INIT. Force components to 9999 if they're empty; this deals with
47# things like `trunk' and other nonstandard forms.
48 
49  [coin_majorver=`echo $PACKAGE_VERSION | sed -n -e 's/^\([0-9]*\).*/\1/gp'`]
50  [coin_minorver=`echo $PACKAGE_VERSION | sed -n -e 's/^[0-9]*\.\([0-9]*\).*/\1/gp'`]
51  [coin_releasever=`echo $PACKAGE_VERSION | sed -n -e 's/^[0-9]*\.[0-9]*\.\([0-9]*\).*/\1/gp'`]
52  test -z "$coin_majorver"   && coin_majorver=9999
53  test -z "$coin_minorver"   && coin_minorver=9999
54  test -z "$coin_releasever" && coin_releasever=9999
55  AC_DEFINE_UNQUOTED(m4_toupper($1_VERSION_MAJOR),
56    [$coin_majorver],[Major version number of project.])
57  AC_DEFINE_UNQUOTED(m4_toupper($1_VERSION_MINOR),
58    [$coin_minorver],[Minor version number of project.])
59  AC_DEFINE_UNQUOTED(m4_toupper($1_VERSION_RELEASE),
60    [$coin_releasever],[Release version number of project.])
61
62# Create a variable set to the upper case version of the project name
63
64  COIN_PRJCT=m4_toupper($1)
65
66# Set the project's SVN revision number. The complicated sed expression
67# (made worse by quadrigraphs) ensures that things like 4123:4168MS end up
68# as a single number.
69
70  AC_CHECK_PROG([have_svnversion],[svnversion],[yes],[no])
71  if test "x$have_svnversion" = xyes; then
72    AC_SUBST(m4_toupper($1_SVN_REV))
73    svn_rev_tmp=`LANG=en_EN svnversion $srcdir 2>/dev/null`
74    if test "x$svn_rev_tmp" != xexported -a "x$svn_rev_tmp" != x -a "x$svn_rev_tmp" != "xUnversioned directory"; then
75      m4_toupper($1_SVN_REV)=`echo $svn_rev_tmp | sed -n -e 's/^@<:@0-9@:>@*://' -e 's/\(@<:@0-9@:>@\)@<:@^0-9@:>@*$/\1/p'`
76      AC_DEFINE_UNQUOTED(m4_toupper($1_SVN_REV),
77        $m4_toupper($1_SVN_REV),[SVN revision number of project])
78    fi
79  fi
80 ])
81 
82# Capture the libtool library version, if given.
83
84  m4_ifvaln([$2],[coin_libversion=$2],[])
85])
86
87
88###########################################################################
89#                          COIN_ENABLE_MSVC                               #
90###########################################################################
91
92# This macro is invoked by any PROG_compiler macro to establish the
93# --enable-msvc option.
94
95AC_DEFUN([AC_COIN_ENABLE_MSVC],
96[
97  AC_ARG_ENABLE([msvc],
98    [AC_HELP_STRING([--enable-msvc],
99       [Allow only Intel/Microsoft compilers on MinGW/MSys/Cygwin.])],
100    [enable_msvc=$enableval],
101    [enable_msvc=no])
102])
103
104
105###########################################################################
106#                      COIN_DEPENDENCY_LINKING                            #
107###########################################################################
108
109# Control whether all dependencies are linked into shared libraries. `Yes' is
110# the recommended best practice now-a-days. This can be overridden on the
111# configure command line.
112
113# In BuildTools/stable, dependency linking is disabled for cl and icl on
114# cygwin and mingw, enabled for everything else. That may need to be
115# reintroduced. --lh, 180228 --
116
117AC_DEFUN([AC_COIN_DEPENDENCY_LINKING],
118[
119  AC_ARG_ENABLE([dependency-linking],
120    [AC_HELP_STRING([--enable-dependency-linking],
121       [Link all library dependencies into shared libraries at
122        creation (default=yes)])],
123    [dependency_linking="$enableval"],
124    [dependency_linking=yes])
125
126# AC_SUBST([LT_LDFLAGS])
127# if test "$dependency_linking" = yes ; then
128#   LT_LDFLAGS="$LT_LDFLAGS -no-undefined"
129# fi
130
131  AM_CONDITIONAL(DEPENDENCY_LINKING, [test "$dependency_linking" = yes])
132])
133
134###########################################################################
135#                        COIN_COMPFLAGS_DEFAULTS                          #
136###########################################################################
137
138AC_DEFUN([AC_COIN_COMPFLAGS_DEFAULTS],
139[
140# We want --enable-msvc setup and checked
141
142  AC_REQUIRE([AC_COIN_ENABLE_MSVC])
143
144# This macro should run before the compiler checks (doesn't seem to be
145# sufficient for CFLAGS)
146
147  AC_BEFORE([$0],[AC_PROG_CXX])
148  AC_BEFORE([$0],[AC_PROG_CC])
149  AC_BEFORE([$0],[AC_PROG_F77])
150  AC_BEFORE([$0],[AC_PROG_FC])
151
152# change default compiler flags (TODO bring back --enable-debug)
153# - disable debugging (remove -g, set -DNDEBUG)
154# - enable exceptions for (i)cl
155
156  if test "$enable_msvc" = yes ; then
157    : ${FFLAGS:=""}
158    : ${FCFLAGS:=""}
159    : ${CFLAGS:="-DNDEBUG -nologo"}
160    : ${CXXFLAGS:="-DNDEBUG -EHsc -nologo"}
161    : ${AR:="lib"}
162    : ${AR_FLAGS:="-nologo -out:"}
163  else
164    : ${FFLAGS:=""}
165    : ${FCFLAGS:=""}
166    : ${CFLAGS:="-DNDEBUG"}
167    : ${CXXFLAGS:="-DNDEBUG"}
168  fi
169])
170
171###########################################################################
172#                            COIN_INITIALIZE                               #
173###########################################################################
174
175# AC_COIN_INITIALIZE(name,version)
176
177# This macro does everything that is required in the early part of the
178# configure script, such as defining a few variables.
179#   name: project name
180#   version (optional): the libtool library version (important for releases,
181#     less so for stable or trunk).
182
183AC_DEFUN([AC_COIN_INITIALIZE],
184[
185# Enforce the required autoconf version
186
187  AC_PREREQ(2.69)
188
189# Set the project's version numbers
190
191  AC_COIN_PROJECTVERSION($1, $2)
192
193# A useful makefile conditional that is always false
194
195  AM_CONDITIONAL(ALWAYS_FALSE, false)
196
197# Where should everything be installed by default?  The COIN default is to
198# install directly into subdirectories of the directory where configure is
199# run. The default would be to install under /usr/local.
200
201  AC_PREFIX_DEFAULT([`pwd`])
202
203# Change the default compiler flags. This needs to run before
204# AC_CANONICAL_BUILD.
205
206  AC_REQUIRE([AC_COIN_COMPFLAGS_DEFAULTS])
207
208# Get the build and host types
209
210  AC_CANONICAL_BUILD
211  AC_CANONICAL_HOST
212
213# libtool has some magic for host_os=mingw, but doesn't know about msys
214
215  if test $host_os = msys ; then
216    host_os=mingw
217    host=`echo $host | sed -e 's/msys/mingw/'`
218  fi
219
220# Make silent build rules the default (https://www.gnu.org/software/automake/
221# manual/html_node/Automake-Silent-Rules.html). Run before AM_INIT_AUTOMAKE,
222# which will AC_REQUIRE it anyway.
223
224  AM_SILENT_RULES([yes])
225
226# Initialize automake
227# - don't AC_DEFINE PACKAGE or VERSION (but there're still defined as shell
228#   variables in configure, and as make variables).
229# - disable dist target
230# - enable all automake warnings
231
232  AM_INIT_AUTOMAKE([no-define no-dist -Wall])
233
234# Disable automatic rebuild of configure/Makefile. Use run_autotools.
235
236  AM_MAINTAINER_MODE
237])
238
239###########################################################################
240#                           COIN_PROG_LIBTOOL                             #
241###########################################################################
242
243# Set up libtool parameters
244# (https://www.gnu.org/software/libtool/manual/html_node/LT_005fINIT.html)
245
246AC_DEFUN([AC_COIN_PROG_LIBTOOL],
247[
248# On Windows, shared C++ libraries do not work with the current libtool (it
249# handles only exports for C functions, not C++). On all other systems, build
250# only shared libraries.
251
252# (lh, 180302) Sadly, we can't use the obvious libtool macros
253# (AC_{ENABLE,DISABLE}_{SHARED,STATIC}, nor parameters to LT_INIT,
254# precisely because these macros record the default behaviour by defining
255# a macro, _LT_ENABLE_{SHARED,STATIC}_DEFAULT. No shell code involved, hence
256# any shell conditional has no effect. Either we trust libtool or we need
257# something more inventive. The relevant libtool macros are in ltoptions.m4,
258# _LT_ENABLE_SHARED and _LT_ENABLE_STATIC.
259
260# case $host_os in
261#   cygwin* | mingw* | msys* )
262#     AC_DISABLE_SHARED
263#     ;;
264#   *)
265#     AC_DISABLE_STATIC
266#     ;;
267# esac
268
269# Create libtool.
270
271  LT_INIT
272
273# Patch libtool to eliminate a trailing space after AR_FLAGS. This needs to be
274# run after config.status has created libtool. Apparently necessary on
275# Windows when lib.exe is the archive tool.
276
277  case "$AR" in
278    *lib* | *LIB* )
279      AC_CONFIG_COMMANDS([libtoolpatch],
280        [sed -e 's|AR_FLAGS |AR_FLAGS|g' libtool > libtool.tmp
281         mv libtool.tmp libtool
282         chmod 755 libtool])
283      ;;
284  esac
285
286# Set up LT_LDFLAGS. Add the library version string to LT_LDFLAGS, if one
287# is supplied.
288
289  AC_SUBST([LT_LDFLAGS])
290  AC_MSG_CHECKING([if the library version is set])
291  if test x"$coin_libversion" != x ; then
292    LT_LDFLAGS="$LT_LDFLAGS -version-info $coin_libversion"
293    AC_MSG_RESULT([$coin_libversion])
294  else
295    AC_MSG_RESULT([no])
296  fi
297
298# Check if dependency linking is enabled or disabled.
299
300  AC_COIN_DEPENDENCY_LINKING
301
302])
303
304###########################################################################
305#                    COIN_PROG_CC   COIN_PROG_CXX                         #
306###########################################################################
307
308# Macros to find C and C++ compilers according to specified lists of compiler
309# names. For Fortran compilers, see coin_fortran.m4.
310
311# Note that automake redefines AC_PROG_CC to invoke _AM_PROG_CC_C_O (an
312# equivalent to AC_PROG_CC_C_O, plus wrap CC in the compile script if needed)
313# and _AM_DEPENDENCIES (`dependency style'). Look in aclocal.m4 to see this.
314
315AC_DEFUN_ONCE([AC_COIN_PROG_CC],
316[
317  AC_REQUIRE([AC_COIN_ENABLE_MSVC])
318
319# Setting up libtool with LT_INIT will AC_REQUIRE AC_PROG_CC, but we want
320# to invoke it from this macro first so that we can supply a parameter.
321
322  AC_BEFORE([$0],[LT_INIT])
323
324# If enable-msvc, then test only for MS and Intel (on Windows) C compiler
325# otherwise, test a long list of C compilers that comes into our mind
326
327  if test $enable_msvc = yes ; then
328    comps="icl cl"
329  else
330    # TODO old buildtools was doing some $build specific logic here, do we
331    # still need this?
332    comps="gcc clang cc icc icl cl cc xlc xlc_r pgcc" 
333  fi
334  AC_PROG_CC([$comps])
335])
336
337# Note that automake redefines AC_PROG_CXX to invoke _AM_DEPENDENCIES
338# (`dependency style') but does not add an equivalent for AC_PROG_CXX_C_O,
339# hence we need an explicit call.
340
341AC_DEFUN_ONCE([AC_COIN_PROG_CXX],
342[
343  AC_REQUIRE([AC_COIN_ENABLE_MSVC])
344  AC_REQUIRE([AC_COIN_PROG_CC])
345
346# If enable-msvc, then test only for MS and Intel (on Windows) C++ compiler
347# otherwise, test a long list of C++ compilers that comes into our mind
348
349  if test $enable_msvc = yes ; then
350    comps="cl icl"
351  else
352    # TODO old buildtools was doing some $build specific logic here, do we
353    # still need this?
354    comps="g++ clang++ c++ pgCC icpc gpp cxx cc++ cl icl FCC KCC RCC xlC_r aCC CC"
355  fi
356  AC_PROG_CXX([$comps])
357
358# If the compiler does not support -c -o, then wrap the compile script around
359# it.
360
361  AC_PROG_CXX_C_O
362  if test $ac_cv_prog_cxx_c_o = no ; then
363    CXX="$am_aux_dir/compile $CXX"
364  fi
365])
366
367
368###########################################################################
369#                           COIN_HAS_PKGCONFIG                            #
370###########################################################################
371
372# Check whether a suitable pkg-config tool is available.  If so, then the
373# variable PKGCONFIG is set to its path, otherwise it is set to "".  Further,
374# the AM_CONDITIONAL COIN_HAS_PKGCONFIG is set and PKGCONFIG is AC_SUBST'ed.
375# Finally, the search path for .pc files is assembled from the value of
376# $prefix and $PKG_CONFIG_PATH in a variable COIN_PKG_CONFIG_PATH, which is
377# also AC_SUBST'ed.
378# The default minimal version number is 0.16.0 because COIN-OR .pc files
379# include a URL field which breaks pkg-config version <= 0.15. A more recent
380# minimum version can be specified as a parameter.
381# Portions of the macro body are derived from macros in pkg.m4.
382
383AC_DEFUN([AC_COIN_HAS_PKGCONFIG],
384[
385  AC_ARG_VAR([PKG_CONFIG],[path to pkg-config utility])
386
387# pkgconf is the up-and-coming thing, replacing pkg-config, so prefer it.
388# The next stanza is a modified version of PKG_PROG_PKG_CONFIG from pkg.m4.
389
390  if test -z "$PKG_CONFIG" ; then
391   AC_CHECK_TOOLS([PKG_CONFIG],[pkgconf pkg-config])
392  fi
393  if test -n "$PKG_CONFIG" ; then
394    pkg_min_version=m4_default([$1],[0.16.0])
395    AC_MSG_CHECKING([$PKG_CONFIG is at least version $pkg_min_version])
396    if $PKG_CONFIG --atleast-pkgconfig-version $pkg_min_version ; then
397      pkg_version=`$PKG_CONFIG --version`
398      AC_MSG_RESULT([yes: $pkg_version])
399    else
400     AC_MSG_RESULT([no])
401     PKG_CONFIG=""
402   fi
403  fi
404
405# Check if PKG_CONFIG supports the short-errors flag. The next stanza is a
406# modified version of _PKG_SHORT_ERRORS_SUPPORTED from pkg.m4.
407
408  if test -n "$PKG_CONFIG" &&
409     $PKG_CONFIG --atleast-pkgconfig-version 0.20 ; then
410    pkg_short_errors=" --short-errors "
411  else
412    pkg_short_errors=""
413  fi
414
415# Create a makefile variable and conditional.
416
417  AM_CONDITIONAL([COIN_HAS_PKGCONFIG], [test -n "$PKG_CONFIG"])
418  AC_SUBST(PKG_CONFIG)
419
420# Assemble a PKG_CONFIG search path that will include the installation
421# directory for .pc files for COIN packages.  Coin .pc files are installed in
422# ${libdir}/pkgconfig. But autoconf sets $libdir to '${exec_prefix}/lib', and
423# $exec_prefix to '${prefix}'.  COIN_INITIALIZE will set ac_default_prefix
424# correctly. Unless the user specifies --prefix, prefix is set to
425# NONE until the end of configuration, at which point it will be set to
426# $ac_default_prefix. Unless the user specifies --exec-prefix, exec-prefix
427# is set to NONE until the end of configuration, at which point it's set to
428# '${prefix}'. Sheesh.  So do the expansion, then back it out. Of course,
429# this whole house of cards balances on the shaky assumption that the user is
430# sane and has installed all packages in the same place and does not change
431# that place when make executes. If not, well, it's their responsibility to
432# augment PKG_CONFIG_PATH in the environment.
433
434  COIN_PKG_CONFIG_PATH="${PKG_CONFIG_PATH}"
435  AC_SUBST(COIN_PKG_CONFIG_PATH)
436
437  save_prefix=$prefix
438  save_exec_prefix=$exec_prefix
439  if test "x$prefix" = xNONE ; then
440    prefix=$ac_default_prefix
441  fi
442  if test "x$exec_prefix" = xNONE ; then
443    exec_prefix=$prefix
444  fi
445  expanded_libdir=$libdir
446  while expr "$expanded_libdir" : '.*$.*' >/dev/null 2>&1 ; do
447    eval expanded_libdir=$expanded_libdir
448  done
449  prefix=$save_prefix
450  exec_prefix=$save_exec_prefix
451  COIN_PKG_CONFIG_PATH="${expanded_libdir}/pkgconfig:${COIN_PKG_CONFIG_PATH}"
452  AC_MSG_NOTICE([$PKG_CONFIG path is "$COIN_PKG_CONFIG_PATH"])
453
454])  # COIN_HAS_PKGCONFIG
455
456
457###########################################################################
458#                      COIN_CHK_MOD_EXISTS                                #
459###########################################################################
460
461# COIN_CHK_MOD_EXISTS(MODULE, PACKAGES,
462#                     [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
463
464# Check to see whether a particular module (set of packages) exists. Derived
465# from PKG_CHECK_MODULES() from pkg.m4, but set only the variables $1_VERSIONS
466# and $1_PKG_ERRORS. PACKAGES ($2) is a space-separated list of .pc file names
467# (without the .pc suffix). Note that variable values will have one line per
468# package (embedded newlines) if more than one package is given in PACKAGES.
469
470AC_DEFUN([AC_COIN_CHK_MOD_EXISTS],
471[
472  AC_REQUIRE([AC_COIN_HAS_PKGCONFIG])
473
474  if test -n "$PKG_CONFIG" ; then
475    if PKG_CONFIG_PATH="$COIN_PKG_CONFIG_PATH" $PKG_CONFIG --exists "$2" ; then
476      m4_toupper($1)_VERSIONS=`PKG_CONFIG_PATH="$COIN_PKG_CONFIG_PATH" $PKG_CONFIG --modversion "$2" 2>/dev/null | tr '\n' ' '`
477      $3
478    else
479      m4_toupper($1)_PKG_ERRORS=`PKG_CONFIG_PATH="$COIN_PKG_CONFIG_PATH" $PKG_CONFIG $pkg_short_errors --errors-to-stdout --print-errors "$2"`
480      $4
481    fi
482  else
483    AC_MSG_ERROR("Cannot check for existence of module $1 without pkgconf")
484  fi
485])
486
487###########################################################################
488#                          COIN_INIT_LIBVARS                              #
489###########################################################################
490
491# COIN_INIT_LIBVARS(lib,lflags,cflags,pcfiles,data)
492
493# This macro sets up the public variables for lib, PROJ_LFLAGS_PUB,
494# PROJ_CFLAGS_PUB, PROJ_PCFILES_PUB, and PROJ_DATA. These variables correspond
495# to Libs, Cflags, Requires, and datadir in the .pc.in file for a project.
496# More generally, this macro is useful when a project builds libraries that
497# are used by other libraries during the project build. For example, Osi
498# builds OsiLib, which is used by OsiCommonTest and the various OsiXxxLib
499# interfaces to third-party solvers.
500
501# PROJ_PCFILES_PUB should be used rarely, if ever. We're exposing public
502# information from lower level libraries at the level of this library, which is
503# not usually necessary.
504
505# The datadir variable is a COIN extension in the .pc file. It defaults
506# to @datadir@/@PACKAGE_TARNAME@ in accordance with Gnu standards.
507
508AC_DEFUN([AC_COIN_INIT_LIBVARS],
509[
510  AC_SUBST(m4_toupper($1_LFLAGS_PUB),["$2"])
511  AC_SUBST(m4_toupper($1_CFLAGS_PUB),["$3"])
512  AC_SUBST(m4_toupper($1_PCFILES_PUB),["$4"])
513  AC_SUBST(m4_toupper($1_DATA),["$5"])
514])
515 
516
517###########################################################################
518#                          COIN_CHK_HERE                                  #
519###########################################################################
520
521# COIN_CHK_HERE([prim],[client packages],[pcfile])
522
523# Augment the _LFLAGS, _CFLAGS, and _PCFILES variables of the client
524# packages with the values from PRIM_LFLAGS_PUB, PRIM_CFLAGS_PUB, and
525# PRIM_PCFILES_PUB. This macro is intended for the case where a single project
526# builds several objects and one object includes another. For example,
527# the various OsiXxxLib solvers, which depend on OsiLib. We can't consult
528# osi.pc (it's not installed yet) but the relevant variables are ready at
529# hand. The name of prim is often different from the name of the .pc file
530# ($3), hence the separate parameter.
531
532# This macro should be called after FINALIZE_FLAGS is invoked for the
533# client packages, for two reasons: First, COIN packages tend to use
534# .pc files, so we're probably adding a package to _PCFILES that isn't yet
535# installed. Also, FINALIZE_FLAGS will have accessed the .pc files already
536# in _PCFILES and expanded them into _LIBS and _CFLAGS, saving the original
537# _LIBS and _CFLAGS in _LIBS_NOPC and _CFLAGS_NOPC.
538
539AC_DEFUN([AC_COIN_CHK_HERE],
540[
541
542# Make sure the necessary variables exist for each client package.
543
544  m4_foreach_w([myvar],[$2],
545    [AC_SUBST(m4_toupper(myvar)_LFLAGS)
546     AC_SUBST(m4_toupper(myvar)_CFLAGS)
547     AC_SUBST(m4_toupper(myvar)_PCFILES)])
548
549# Add the .pc file and augment LFLAGS and CFLAGS.
550
551    m4_foreach_w([myvar],[$2],
552      [m4_toupper(myvar)_PCFILES="$m4_toupper(myvar)_PCFILES $3"
553       m4_toupper(myvar)_LFLAGS="$m4_toupper(myvar)_LFLAGS $m4_toupper($1)_LFLAGS"
554       m4_toupper(myvar)_CFLAGS="$m4_toupper(myvar)_CFLAGS $m4_toupper($1)_CFLAGS"
555
556# Change the test to enable / disable debugging output
557
558       if test 1 = 1 ; then
559         AC_MSG_NOTICE([CHK_HERE adding $1 to myvar:])
560         AC_MSG_NOTICE([m4_toupper(myvar)_PCFILES: "${m4_toupper(myvar)_PCFILES}"])
561         AC_MSG_NOTICE([m4_toupper(myvar)_LFLAGS: "${m4_toupper(myvar)_LFLAGS}"])
562         AC_MSG_NOTICE([m4_toupper(myvar)_CFLAGS: "${m4_toupper(myvar)_CFLAGS}"])
563       fi ; ])
564
565])   # COIN_CHK_HERE
566
567###########################################################################
568#                      COIN_DEF_PRIM_ARGS                                 #
569###########################################################################
570
571# COIN_DEF_PRIM_ARGS([prim],[base],[lflags],[cflags],[dflags],[build])
572
573# This is a utility macro to handle the standard arguments that COIN
574# configuration files supply for a component (package or library):
575#   --with-prim: use primitive (yes / no / special)
576#   --with-prim-lflags: linker flags for the primitive
577#   --with-prim-cflags: preprocessor & compiler flags for the primitive
578#   --with-prim-data: data directory for the primitive
579# These arguments allow the user to override default macro behaviour from the
580# configure command line.
581# The string prim, lower-cased, is used in the flag name.
582# The parameters base, lflags, cflags, and dflags have the value yes or no and
583# determine whether a --with option will be defined for prim, lflags, cflags,
584# and data, respectively. They must be literals, as the macro uses them to cut
585# out unused options. To use the results, construct the name of the shell
586# variable as specified in the autoconf doc'n for ARG_WITH.
587
588# Setting the final parameter to 'build' will cause the phrase "'build' will
589# look for a COIN ThirdParty package" to be inserted in the documentation for
590# --with-prim.
591
592AC_DEFUN([AC_COIN_DEF_PRIM_ARGS],
593[
594  m4_define([extraHelp],[
595    m4_normalize(Use $1. [If an argument is given,]
596      ['yes' is equivalent to --with-m4_tolower($1),]
597      m4_case($6,build,
598      ['no' is equivalent to --without-m4_tolower($1)[,]
599       'build' will look for a COIN ThirdParty package.],
600      ['no' is equivalent to --without-m4_tolower($1).])
601      m4_case($3$4$5,nonono,,
602        nonoyes,
603        Any other argument is applied as for --with-m4_tolower($1)-data,
604        noyesno,
605        Any other argument is applied as for --with-m4_tolower($1)-cflags,
606        noyesyes,
607        Any other argument is applied as for --with-m4_tolower($1)-cflags,
608        Any other argument is applied as for --with-m4_tolower($1)-lflags))])
609
610  m4_if($2,yes,
611    [AC_ARG_WITH([m4_tolower($1)],
612       AS_HELP_STRING([--with-m4_tolower($1)],extraHelp))])
613
614  m4_if($3,yes,
615    [AC_ARG_WITH([m4_tolower($1)-lflags],
616       AS_HELP_STRING([--with-m4_tolower($1)-lflags],
617         [Linker flags for $1 appropriate for your environment.
618          (Most often, -l specs for libraries.)]))])
619
620  m4_if($4,yes,
621    [AC_ARG_WITH([m4_tolower($1)-cflags],
622       AS_HELP_STRING([--with-m4_tolower($1)-cflags],
623         [Compiler flags for $1 appropriate for your environment.
624          (Most often, -I specs for header file directories.)]))])
625
626  m4_if($5,yes,
627    [AC_ARG_WITH([m4_tolower($1)-data],
628       AS_HELP_STRING([--with-m4_tolower($1)-data],
629         [A data directory specification for $1 appropriate for your
630          environment.]))])
631])   # COIN_DEF_PRIM_ARGS
632
633
634###########################################################################
635#                     COIN_FIND_PRIM_PKG                                  #
636###########################################################################
637# COIN_FIND_PRIM_PKG([prim],[.pc file name],[default action],[cmdlineopts])
638
639# Determine whether we can use primary package prim ($1) and assemble
640# information on the required library flags (prim_lflags), compiler flags
641# (prim_cflags), and data directories (prim_data) as specified by cmdlineopts.
642
643# cmdlineopts ($4) specifies the set of configure command line options
644# defined and processed: 'nodata' produces --with-prim, --with-prim-libs, and
645# --with-prim-cflags; 'dataonly' produces --with-prim and --with-prim-data;
646# anything else ('all' works well) produces all four command line
647# options. Shell code produced by the macro is tailored based on
648# cmdlineopts. `nodata' is the default.
649
650# --with-prim is interpreted as follows: --with-prim=no is equivalent to
651# --without-prim. Any of --with-prim, --with-prim=yes, or --with-prim=build,
652# cause the macro to look for a .pc file. Any other value is taken as
653# equivalent to --with-prim-data=value (dataonly) or --with-prim-lflags=value
654# (anything else).
655
656# The algorithm first checks for a user-specified value of --with-prim;
657# if this is no, prim is skipped. Next, it looks for user specified values
658# given with command line parameters --with-prim-lflags, --with-prim-cflags,
659# and --with-prim-data. If none of these are specified, it will look for a
660# .pc file for prim using PKG_CONFIG.
661
662# Default action ($3) (no, yes, build) is the default action if the user
663# offers no guidance via command line parameters. The (hardwired) default is
664# yes.
665
666# If no .pc file names are specified, the macro will look for prim.pc if the
667# default is yes, coinprim.pc if the default is build.  If a .pc file name
668# ($2) is specified, it overrides the macro defaults. Note that for the
669# majority of COIN packages, you should not specify `build' as .pc files
670# for most COIN packages are simply the package name (e.g., clp.pc). For
671# ThirdParty packages, this works (e.g., coinglpk.pc).
672
673# The macro doesn't test that the specified values actually work. This is
674# deliberate.  There's no guarantee that user-specified libraries and/or
675# directories actually exist yet. The same possibility exists for values
676# returned when pkgconf checks the .pc file.
677
678AC_DEFUN([AC_COIN_FIND_PRIM_PKG],
679[
680  AC_REQUIRE([AC_COIN_HAS_PKGCONFIG])
681
682  dflt_action=m4_default([$3],[yes])
683
684# Initialize variables for the primary package.
685
686  m4_tolower(coin_has_$1)=noInfo
687  m4_tolower($1_lflags)=
688  m4_tolower($1_cflags)=
689  m4_tolower($1_data)=
690  m4_tolower($1_pcfiles)=
691
692# --with-prim is always present. If the client specified dataonly, its value
693# is assigned to prim_data.
694
695  withval=$m4_tolower(with_$1)
696  if test -n "$withval" ; then
697    case "$withval" in
698      no )
699        m4_tolower(coin_has_$1)=skipping
700        ;;
701      yes )
702        m4_tolower(coin_has_$1)=requested
703        ;;
704      build )
705        m4_tolower(coin_has_$1)=build
706        ;;
707      * )
708        m4_tolower(coin_has_$1)=yes
709        m4_if(m4_default($4,nodata),dataonly,
710          [m4_tolower($1_data)=$withval],
711          [m4_tolower($1_lflags)=$withval])
712        ;;
713    esac
714  fi
715
716# --with-prim-libs and --with-prim-cflags are present unless the client
717# specified dataonly. Specifying --with-prim=no overrides the individual
718# options for libs and cflags.
719
720  m4_if(m4_default($4,nodata),dataonly,[],
721    [if test "$m4_tolower(coin_has_$1)" != skipping ; then
722       withval=$m4_tolower(with_$1_lflags)
723       if test -n "$withval" ; then
724         case "$withval" in
725           build | no | yes )
726             AC_MSG_ERROR(["$withval" is not valid here; please specify linker flags appropriate for your environment.])
727             ;;
728           * )
729             m4_tolower(coin_has_$1)=yes
730             m4_tolower($1_lflags)=$withval
731             ;;
732         esac
733       fi
734
735       withval=$m4_tolower(with_$1_cflags)
736       if test -n "$withval" ; then
737         case "$withval" in
738           build | no | yes )
739             AC_MSG_ERROR(["$withval" is not valid here; please specify compiler flags appropriate for your environment.])
740             ;;
741           * )
742             m4_tolower(coin_has_$1)=yes
743             m4_tolower($1_cflags)="$withval"
744             ;;
745         esac
746       fi
747     fi])
748
749# --with-prim-data will be present unless the client specified nodata.
750# Specifying --with-prim=no overrides the individual option for data.
751
752  m4_if(m4_default($4,nodata),nodata,[],
753    [if test "$m4_tolower(coin_has_$1)" != skipping ; then
754       withval=$m4_tolower(with_$1_data)
755       if test -n "$withval" ; then
756         case "$withval" in
757           build | no | yes )
758             AC_MSG_ERROR(["$withval" is not valid here; please give a data directory specification appropriate for your environment.])
759             ;;
760           * )
761             m4_tolower(coin_has_$1)=yes
762             m4_tolower($1_data)="$withval"
763             ;;
764         esac
765       fi
766     fi])
767
768# At this point, coin_has_prim can be one of noInfo (no user options
769# specified), skipping (user said no), requested or build (user said yes
770# or build and gave no further guidance), or yes (user specified one or
771# more --with-prim options). If we're already at yes or skipping, we're
772# done looking.
773
774# If there are no user options (noInfo) and the default is no, we're skipping.
775# Otherwise, the default must be yes or build; consider the package requested.
776# A default action we don't recognise defaults to yes.
777
778  if test "$m4_tolower(coin_has_$1)" = noInfo ; then
779    case $dflt_action in
780      no )
781        m4_tolower(coin_has_$1)=skipping
782        ;;
783      build )
784        m4_tolower(coin_has_$1)=build
785        ;;
786      * )
787        m4_tolower(coin_has_$1)=requested
788        ;;
789    esac
790  fi
791
792# Now coin_has_prim can be one of skipping, yes, requested, or build. For
793# requested or build, try pkgconf, if it's available. If it's not available,
794# well, hope that the user knows their system and prim can be used with no
795# additional flags.
796
797  case $m4_tolower(coin_has_$1) in
798    requested | build )
799      if test -n "$PKG_CONFIG" ; then
800        m4_ifnblank($2,
801          [pcfile=$2],
802          [if test $m4_tolower(coin_has_$1) = build ; then
803             pcfile=m4_tolower(coin$1)
804           else
805             pcfile=m4_tolower($1)
806           fi])
807        AC_COIN_CHK_MOD_EXISTS([$1],[$pcfile],
808          [m4_tolower(coin_has_$1)=yes
809           m4_tolower($1_data)=`PKG_CONFIG_PATH="$COIN_PKG_CONFIG_PATH" $PKG_CONFIG --variable=datadir $pcfile 2>/dev/null`
810           m4_tolower($1_pcfiles)="$pcfile"],
811          [m4_tolower(coin_has_$1)=no])
812      else
813        m4_tolower(coin_has_$1)=yes
814        # AC_MSG_WARN([skipped check via pkgconf as no pkgconf available])
815      fi
816      ;;
817    skipping | yes )
818      ;;
819    * )
820      AC_MSG_WARN([Unexpected status "$m4_tolower(coin_has_$1)" in COIN_FIND_PRIM_PKG])
821      ;;
822  esac
823
824# The final value of coin_has_prim will be yes, no, or skipping. No means
825# we looked (with pkgconfig) and didn't find anything. Skipping means the
826# user said `don't use.' Yes means we have something, from the user or
827# from pkgconfig. Note that we haven't run a useability test!
828
829# Change the test to enable / disable debugging output
830
831    if test 1 = 1 ; then
832      AC_MSG_NOTICE([FIND_PRIM_PKG result for $1: "$m4_tolower(coin_has_$1)"])
833      AC_MSG_NOTICE([Collected values for package '$1'])
834      AC_MSG_NOTICE([m4_tolower($1_lflags) is "$m4_tolower($1_lflags)"])
835      AC_MSG_NOTICE([m4_tolower($1_cflags) is "$m4_tolower($1_cflags)"])
836      AC_MSG_NOTICE([m4_tolower($1_data) is "$m4_tolower($1_data)"])
837      AC_MSG_NOTICE([m4_tolower($1_pcfiles) is "$m4_tolower($1_pcfiles)"])
838    fi
839
840])  # COIN_FIND_PRIM_PKG
841
842###########################################################################
843#                          COIN_CHK_PKG                                   #
844###########################################################################
845
846# COIN_CHK_PKG([prim],[client packages],[.pc file name],
847#              [default action],[cmdopts])
848
849# Determine whether we can use primary package prim ($1) and assemble
850# information on the required linker flags (prim_lflags), compiler flags
851# (prim_cflags), and data directories (prim_data).
852
853# The configure command line options offered to the user are controlled
854# by cmdopts ($5). 'nodata' offers --with-prim, --with-prim-lflags, and
855# --with-prim-cflags. 'dataonly' offers --with-prim and --with-prim-data.
856# 'all' offers all four. DEF_PRIM_ARGS and FIND_PRIM_PKG are tailored
857# accordingly. The (hardwired) default is 'nodata'.
858
859# Default action ($4) (no, yes, build) is the default action if the user
860# offers no guidance via command line parameters. Really, 'build' has no hope
861# of working except for COIN ThirdParty packages. Don't use it for other COIN
862# packages.
863
864# If no .pc file names are specified, the macro will look for prim.pc if the
865# default is yes, coinprim.pc if the default is build.  If a .pc file name
866# ($3) is specified, it overrides the macro defaults.
867
868# Define an automake conditional COIN_HAS_PRIM to record the result. If we
869# decide to use prim, also define a preprocessor symbol COIN_HAS_PRIM.
870
871# Linker and compiler flag information will be propagated to the space-
872# separated list of client packages ($2) using the _PCFILES variable if
873# a .pc file is used, otherwise by the _LFLAGS and _CFLAGS variables of
874# client packages. These variables match Requires.private, Libs.private,
875# and Cflags.private, respectively, in a .pc file.
876
877# The macro doesn't test that the specified values actually work. This is
878# deliberate.  There's no guarantee that user-specified libraries and/or
879# directories actually exist yet. The same possibility exists for values
880# returned when pkgconf checks the .pc file.
881
882AC_DEFUN([AC_COIN_CHK_PKG],
883[
884  AC_REQUIRE([AC_COIN_HAS_PKGCONFIG])
885
886  AC_MSG_CHECKING([for package $1])
887
888# Make sure the necessary variables exist for each client package.
889
890  m4_foreach_w([myvar],[$2],
891    [AC_SUBST(m4_toupper(myvar)_LFLAGS)
892     AC_SUBST(m4_toupper(myvar)_CFLAGS)
893     AC_SUBST(m4_toupper(myvar)_PCFILES)])
894
895# Check to see if the user has set an override to skip this primary.
896
897  m4_tolower(coin_has_$1)=noInfo
898  if test x"$COIN_SKIP_PROJECTS" != x ; then
899    for pkg in $COIN_SKIP_PROJECTS ; do
900      if test "$m4_tolower(pkg)" = "$m4_tolower($1)" ; then
901        m4_tolower(coin_has_$1)=skipping
902      fi
903    done
904  fi
905
906# If we're not skipping this primary, define and process the command line
907# options according to the cmdopts parameter. Then invoke FIND_PRIM_PKG to do
908# the heavy lifting.
909
910  if test "$m4_tolower(coin_has_$1)" != skipping ; then
911    m4_case(m4_default($5,nodata),
912      nodata,[AC_COIN_DEF_PRIM_ARGS([$1],yes,yes,yes,no,$4)],
913      dataonly,[AC_COIN_DEF_PRIM_ARGS([$1],yes,no,no,yes,$4)],
914      [AC_COIN_DEF_PRIM_ARGS([$1],yes,yes,yes,yes,$4)])
915    AC_COIN_FIND_PRIM_PKG(m4_tolower($1),[$3],[$4],[$5])
916    AC_MSG_RESULT([$m4_tolower(coin_has_$1)])
917  else
918    AC_MSG_RESULT([$m4_tolower(coin_has_$1) due to COIN_SKIP_PROJECTS])
919  fi
920
921# Possibilities are `yes', 'no', or `skipping'. Normalise to `yes' or `no'.
922
923  if test "$m4_tolower(coin_has_$1)" != yes ; then
924    m4_tolower(coin_has_$1)=no
925  fi
926
927# Create an automake conditional COIN_HAS_PRIM.
928
929  AM_CONDITIONAL(m4_toupper(COIN_HAS_$1),
930                 [test $m4_tolower(coin_has_$1) = yes])
931
932# If we've located the package, define preprocessor symbol COIN_HAS_PRIM and
933# augment the necessary variables for the client packages.
934
935  if test $m4_tolower(coin_has_$1) = yes ; then
936    AC_DEFINE(m4_toupper(COIN_HAS_$1),[1],
937      [Define to 1 if $1 is available.])
938    m4_foreach_w([myvar],[$2],
939      [m4_toupper(myvar)_PCFILES="$m4_tolower($1_pcfiles) $m4_toupper(myvar)_PCFILES"
940       m4_toupper(myvar)_LFLAGS="$m4_tolower($1_lflags) $m4_toupper(myvar)_LFLAGS"
941       m4_toupper(myvar)_CFLAGS="$m4_tolower($1_cflags) $m4_toupper(myvar)_CFLAGS"])
942
943# Finally, set up PRIM_DATA, unless the user specified nodata.
944
945    m4_if(m4_default([$5],nodata),nodata,[],
946      [AC_SUBST(m4_toupper($1)_DATA)
947       m4_toupper($1)_DATA=$m4_tolower($1_data)])
948  fi
949])   # COIN_CHK_PKG
950
951
952###########################################################################
953#                          FIND_PRIM_LIB                                  #
954###########################################################################
955
956# COIN_FIND_PRIM_LIB([prim],[lflgs],[cflgs],[dflgs],
957#                    [dfltaction],[cmdlineopts])
958
959# Determine whether we can use primary library prim ($1) and assemble
960# information on the required linker flags (prim_lflags), compiler flags
961# (prim_cflags), and data directories (prim_data) as specified by cmdlineopts.
962
963# cmdlineopts ($6) specifies the set of configure command line options
964# defined and processed: 'nodata' produces --with-prim, --with-prim-lflags,
965# and --with-prim-cflags; 'dataonly' produces only --with-prim and
966# --with-prim-data; anything else ('all' works well) produces all four
967# command line options. Shell code produced by the macro is tailored based
968# on cmdlineopts. `nodata' is the default.
969
970# --with-prim is interpreted as follows:
971#   * --with-prim=no is equivalent to --without-prim.
972#   * --with-prim or --with-prim=yes is equivalent to
973#       --with-prim-lflags=-lprim
974#       --with-prim-data=/usr/local/share
975#   * --with-prim=build attempts to invent something that will find a COIN
976#     ThirdParty library or data
977#       --with-prim-lflags="-L\$(libdir) -lcoinprim"
978#       --with-prim-cflgs="-I\$(pkgincludedir)/ThirdParty"
979#       --with-prim-data="\$(pkgdatadir)"
980#   * Any other value is taken as equivalent to
981#       --with-prim-data=value (dataonly) or
982#       --with-prim-lflags=value (anything else)
983
984# The algorithm first checks for a user-specified value of --with-prim;
985# if this is no, prim is skipped. Next, it looks for user specified values
986# given with command line parameters --with-prim-lflags, --with-prim-cflags,
987# and --with-prim-data. If none of these are specified, it will use the values
988# passed as parameters. It's all or none: any command line options disable all
989# parameters.
990
991# Default action ($5) (no, yes, build) is the default value of --with-prim
992# if the user offers no guidance via command line parameters. The (hardwired)
993# default is yes. `build' doesn't have a hope of working except for COIN
994# ThirdParty packages, and even then it's pretty shaky. You should be
995# using CHK_PKG, because COIN packaging for ThirdParty software creates a .pc
996# file.
997
998# The macro doesn't test that the specified values actually work. This is
999# deliberate --- there's no guarantee that the specified values actually
1000# exist just yet. Really all we're doing here is filling in variables using a
1001# complicated algorithm.
1002
1003AC_DEFUN([AC_COIN_FIND_PRIM_LIB],
1004[
1005  dflt_action=m4_default([$5],[yes])
1006
1007# Initialize variables for the primary library.
1008
1009  m4_tolower(coin_has_$1)=noInfo
1010  m4_tolower($1_lflags)=
1011  m4_tolower($1_cflags)=
1012  m4_tolower($1_data)=
1013
1014# --with-prim is always present. If the client specified dataonly, its value
1015# is assigned to prim_data.
1016
1017  withval=$m4_tolower(with_$1)
1018  if test -n "$withval" ; then
1019    case "$withval" in
1020      no )
1021        m4_tolower(coin_has_$1)=skipping
1022        ;;
1023      yes )
1024        m4_tolower(coin_has_$1)=requested
1025        ;;
1026      build )
1027        m4_tolower(coin_has_$1)=build
1028        ;;
1029      * )
1030        m4_tolower(coin_has_$1)=yes
1031        m4_if(m4_default($6,nodata),dataonly,
1032          [m4_tolower($1_data)=$withval],
1033          [m4_tolower($1_libs)=$withval])
1034        ;;
1035    esac
1036  fi
1037
1038# --with-prim-lflags and --with-prim-cflags are present unless the client
1039# specified dataonly. Specifying --with-prim=no overrides the individual
1040# options for lflags and cflags.
1041
1042  m4_if(m4_default($6,nodata),dataonly,[],
1043    [if test "$m4_tolower(coin_has_$1)" != skipping ; then
1044       withval=$m4_tolower(with_$1_lflags)
1045       if test -n "$withval" ; then
1046         case "$withval" in
1047           build | no | yes )
1048             AC_MSG_ERROR(["$withval" is not valid here; please specify linker flags appropriate for your environment.])
1049             ;;
1050           * )
1051             m4_tolower(coin_has_$1)=yes
1052             m4_tolower($1_libs)=$withval
1053             ;;
1054         esac
1055       fi
1056
1057       withval=$m4_tolower(with_$1_cflags)
1058       if test -n "$withval" ; then
1059         case "$withval" in
1060           build | no | yes )
1061             AC_MSG_ERROR(["$withval" is not valid here; please specify compiler flags appropriate for your environment.])
1062             ;;
1063           * )
1064             m4_tolower(coin_has_$1)=yes
1065             m4_tolower($1_cflags)="$withval"
1066             ;;
1067         esac
1068       fi
1069     fi])
1070
1071# --with-prim-data will be present unless the client specified nodata.
1072# Specifying --with-prim=no overrides the individual option for data.
1073
1074  m4_if(m4_default($6,nodata),nodata,[],
1075    [if test "$m4_tolower(coin_has_$1)" != skipping ; then
1076       withval=$m4_tolower(with_$1_data)
1077       if test -n "$withval" ; then
1078         case "$withval" in
1079           build | no | yes )
1080             AC_MSG_ERROR(["$withval" is not valid here; please give a data directory specification appropriate for your environment.])
1081             ;;
1082           * )
1083             m4_tolower(coin_has_$1)=yes
1084             m4_tolower($1_data)="$withval"
1085             ;;
1086         esac
1087       fi
1088     fi])
1089
1090# At this point, coin_has_prim can be one of noInfo (no user options
1091# specified), skipping (user said no), requested or build (user said yes
1092# or build and gave no further guidance), or yes (user specified one or
1093# more --with-prim options). If we're already at yes or skipping, we're
1094# done looking.
1095
1096# If there are no user options (noInfo) and the default is no, we're skipping.
1097# Otherwise, the default must be yes or build; consider the package requested.
1098# A default action we don't recognise defaults to yes.
1099
1100  if test "$m4_tolower(coin_has_$1)" = noInfo ; then
1101    case $dflt_action in
1102      no )
1103        m4_tolower(coin_has_$1)=skipping
1104        ;;
1105      build )
1106        m4_tolower(coin_has_$1)=build
1107        ;;
1108      * )
1109        m4_tolower(coin_has_$1)=requested
1110        ;;
1111    esac
1112  fi
1113
1114# Now coin_has_prim can be one of skipping, yes, build, or requested. For
1115# build or requested, use the parameter values or invent some.
1116
1117  case $m4_tolower(coin_has_$1) in
1118    build | requested)
1119      m4_if(m4_default($6,nodata),dataonly,[],
1120        [m4_ifnblank([$2],
1121           [m4_tolower($1_lflags)=$2],
1122           [if test "$m4_tolower(coin_has_$1)" = build ; then
1123              m4_tolower($1_lflags)="-L\$(libdir) -l[]m4_tolower(coin$1)"
1124            else
1125              m4_tolower($1_lflags)="-l[]m4_tolower($1)"
1126            fi])
1127         m4_ifnblank([$3],
1128           [m4_tolower($1_cflags)=$3],
1129           [if test "$m4_tolower(coin_has_$1)" = build ; then
1130              m4_tolower($1_cflags)="-I\$(pkgincludedir)/ThirdParty"
1131            fi])])
1132      m4_if(m4_default($6,nodata),nodata,[],
1133        [m4_tolower($1_data)=m4_default([$3],
1134           [if test "$m4_tolower(coin_has_$1)" = build ; then
1135              m4_tolower($1_data)="\$(pkgdatadir)"
1136            else
1137              m4_tolower($1_data)="/usr/local/share"
1138            fi])])
1139      m4_tolower(coin_has_$1)=yes
1140      ;;
1141    skipping | yes )
1142      ;;
1143    * )
1144      AC_MSG_WARN([Unexpected status "$m4_tolower(coin_has_$1)" in COIN_FIND_PRIM_LIB])
1145      ;;
1146  esac
1147
1148# The final value of coin_has_prim will be yes or skipping.  Skipping means
1149# the user said `don't use.' Yes means we have something, from the user or
1150# macro parameters or invented. Note that we haven't run a useability test!
1151
1152# Change the test to enable / disable debugging output
1153
1154    if test 1 = 1 ; then
1155      AC_MSG_NOTICE([FIND_PRIM_LIB result for $1: "$m4_tolower(coin_has_$1)"])
1156      AC_MSG_NOTICE([Collected values for package '$1'])
1157      AC_MSG_NOTICE([m4_tolower($1_lflags) is "$m4_tolower($1_lflags)"])
1158      AC_MSG_NOTICE([m4_tolower($1_cflags) is "$m4_tolower($1_cflags)"])
1159      AC_MSG_NOTICE([m4_tolower($1_data) is "$m4_tolower($1_data)"])
1160      AC_MSG_NOTICE([m4_tolower($1_pcfiles) is "$m4_tolower($1_pcfiles)"])
1161    fi
1162
1163])  # COIN_FIND_PRIM_LIB
1164
1165###########################################################################
1166#                          COIN_CHK_LIB                                   #
1167###########################################################################
1168
1169# COIN_CHK_LIB([prim],[client packages],[lflgs],[cflgs],[dflgs],
1170#              [dfltaction],[cmdopts])
1171
1172# Determine whether we can use primary library prim ($1) and assemble
1173# information on the required linker flags (prim_lflags), compiler flags
1174# (prim_cflags), and data directories (prim_data).
1175
1176# The configure command line options offered to the user are controlled
1177# by cmdopts ($7). 'nodata' offers --with-prim, --with-prim-lflags, and
1178# --with-prim-cflags; 'dataonly' offers --with-prim and --with-prim-data;
1179# 'all' offers all four. DEF_PRIM_ARGS and FIND_PRIM_LIB are tailored
1180# accordingly. The (hardwired) default is 'nodata'.
1181
1182# Macro parameters lflgs ($3), cflgs ($4), and dflgs ($5) are used for
1183# --with-prim-lflags, --with-prim-cflags, and --with-prim-data if and only if
1184# there are no user-supplied values on the command line. It's all or nothing;
1185# any user-supplied value causes all macro parameters to be ignored.
1186
1187# Default action ($6) (no, yes, build) is the default action if the user
1188# offers no guidance via command line parameters. Really, 'build' has no
1189# hope of working except for COIN ThirdParty packages. Don't use it for
1190# other COIN packages. You should be using CHK_PKG because COIN packaging
1191# for ThirdParty software creates a .pc file.
1192
1193# Define an automake conditional COIN_HAS_PRIM to record the result. If we
1194# decide to use prim, also define a preprocessor symbol COIN_HAS_PRIM.
1195
1196# Linker and compiler flag information will be propagated to the space-
1197# separated list of client packages ($2) using the _LFLAGS and _CFLAGS
1198# variables of client packages. These variables match Libs.private and
1199# Cflags.private, respectively, in a .pc file.
1200
1201# The macro doesn't test that the specified values actually work. This is
1202# deliberate.  There's no guarantee that user-specified libraries and/or
1203# directories actually exist yet. The same possibility exists for values
1204# returned when pkgconf checks the .pc file.
1205
1206AC_DEFUN([AC_COIN_CHK_LIB],
1207[
1208  AC_MSG_CHECKING([for package $1])
1209
1210# Make sure the necessary variables exist for each client package.
1211
1212  m4_foreach_w([myvar],[$2],
1213    [AC_SUBST(m4_toupper(myvar)_LFLAGS)
1214     AC_SUBST(m4_toupper(myvar)_CFLAGS)])
1215
1216# Check to see if the user has overridden configure parameters from the
1217# environment.
1218
1219  m4_tolower(coin_has_$1)=noInfo
1220  if test x"$COIN_SKIP_PROJECTS" != x ; then
1221    for pkg in $COIN_SKIP_PROJECTS ; do
1222      if test "$m4_tolower(pkg)" = "$m4_tolower($1)" ; then
1223        m4_tolower(coin_has_$1)=skipping
1224      fi
1225    done
1226  fi
1227
1228# If we're not skipping this project, define and process the command line
1229# options according to the cmdopts parameter. Then invoke FIND_PRIM_PKG to do
1230# the heavy lifting.
1231
1232  if test "$m4_tolower(coin_has_$1)" != skipping ; then
1233    m4_case(m4_default($7,nodata),
1234      nodata,[AC_COIN_DEF_PRIM_ARGS([$1],yes,yes,yes,no,$4)],
1235      dataonly,[AC_COIN_DEF_PRIM_ARGS([$1],yes,no,no,yes,$4)],
1236      [AC_COIN_DEF_PRIM_ARGS([$1],yes,yes,yes,yes,$4)])
1237    AC_COIN_FIND_PRIM_LIB(m4_tolower($1),[$3],[$4],[$5],[$6],[$7])
1238    AC_MSG_RESULT([$m4_tolower(coin_has_$1)])
1239  else
1240    AC_MSG_RESULT([$m4_tolower(coin_has_$1) due to COIN_SKIP_PROJECTS])
1241  fi
1242
1243# Possibilities are `yes' or `skipping'. Normalise to `yes' or `no'.
1244
1245  if test "$m4_tolower(coin_has_$1)" != yes ; then
1246    m4_tolower(coin_has_$1)=no
1247  fi
1248
1249# Create an automake conditional COIN_HAS_PRIM.
1250
1251  AM_CONDITIONAL(m4_toupper(COIN_HAS_$1),
1252                 [test $m4_tolower(coin_has_$1) = yes])
1253
1254# If we've located the package, define preprocessor symbol COIN_HAS_PRIM
1255# and augment the necessary variables for the client packages.
1256
1257  if test $m4_tolower(coin_has_$1) = yes ; then
1258    AC_DEFINE(m4_toupper(COIN_HAS_$1),[1],
1259      [Define to 1 if the $1 package is available])
1260    m4_foreach_w([myvar],[$2],
1261      [m4_toupper(myvar)_LFLAGS="$m4_tolower($1_lflags) $m4_toupper(myvar)_LFLAGS"
1262       m4_toupper(myvar)_CFLAGS="$m4_tolower($1_cflags) $m4_toupper(myvar)_CFLAGS"])
1263
1264# Finally, set up PRIM_DATA, unless the user specified nodata.
1265
1266    m4_if(m4_default([$7],nodata),nodata,[],
1267      [AC_SUBST(m4_toupper($1)_DATA)
1268       m4_toupper($1)_DATA=$m4_tolower($1_data)])
1269  fi
1270])   # COIN_CHK_LIB
1271
1272
1273#######################################################################
1274#                           COIN_CHK_LIBM                           #
1275#######################################################################
1276
1277# COIN_CHK_LIBM([client1 client2 ...])
1278# Check if a library spec is needed for the math library. If something is
1279# needed, the macro adds the flags to CLIENT_LFLAGS for each client.
1280
1281AC_DEFUN([AC_COIN_CHK_LIBM],
1282[
1283  AC_REQUIRE([AC_PROG_CC])
1284
1285  coin_save_LIBS="$LIBS"
1286  LIBS=
1287  AC_SEARCH_LIBS([cos],[m],
1288    [if test "$ac_cv_search_cos" != 'none required' ; then
1289       m4_foreach_w([myvar],[$1],
1290         [m4_toupper(myvar)_LFLAGS="$ac_cv_search_cos $m4_toupper(myvar)_LFLAGS"])
1291     fi])
1292  LIBS="$coin_save_LIBS"
1293]) # AC_COIN_CHK_LIBM
1294
1295###########################################################################
1296#                           COIN_CHK_ZLIB                               #
1297###########################################################################
1298
1299# COIN_CHK_ZLIB([client1 client2 ...])
1300
1301# This macro checks for the libz library.  If found, it sets the automake
1302# conditional COIN_HAS_ZLIB and defines the C preprocessor variable
1303# COIN_HAS_ZLIB. The default is to use zlib, if it's present.  For each client,
1304# it adds the linker flags to the variable CLIENT_LFLAGS for each client.
1305
1306AC_DEFUN([AC_COIN_CHK_ZLIB],
1307[
1308  AC_REQUIRE([AC_COIN_PROG_CC])
1309
1310  coin_has_zlib=no
1311
1312  AC_ARG_ENABLE([zlib],
1313    [AC_HELP_STRING([--disable-zlib],
1314       [do not compile with compression library zlib])],
1315    [coin_enable_zlib=$enableval],
1316    [coin_enable_zlib=yes])
1317
1318  if test x$coin_enable_zlib = xyes ; then
1319    AC_CHECK_HEADER([zlib.h],[coin_has_zlib=yes])
1320    if test x$coin_has_zlib = xyes ; then
1321      AC_CHECK_LIB([z],[gzopen],[],[coin_has_zlib=no])
1322    fi
1323    if test x$coin_has_zlib = xyes ; then
1324      m4_foreach_w([myvar],[$1],
1325        [m4_toupper(myvar)_LFLAGS="-lz $m4_toupper(myvar)_LFLAGS"])
1326      AC_DEFINE([COIN_HAS_ZLIB],[1],[Define to 1 if zlib is available])
1327    fi
1328  fi
1329
1330  AM_CONDITIONAL([COIN_HAS_ZLIB],[test x$coin_has_zlib = xyes])
1331]) # AC_COIN_CHK_ZLIB
1332
1333
1334###########################################################################
1335#                            COIN_CHK_BZLIB                             #
1336###########################################################################
1337
1338# COIN_CHK_BZLIB([client1 client2 ...])
1339
1340# This macro checks for the libbz2 library.  If found, it defines the
1341# C preprocessor variable COIN_HAS_BZLIB and the automake conditional
1342# COIN_HAS_BZLIB.  Further, for a (space separated) list of clients, it adds
1343# the linker flag to the variable CLIENT_LFLAGS for each client.
1344
1345AC_DEFUN([AC_COIN_CHK_BZLIB],
1346[
1347  AC_REQUIRE([AC_PROG_CC])
1348
1349  coin_has_bzlib=no
1350
1351  AC_ARG_ENABLE([bzlib],
1352    [AC_HELP_STRING([--disable-bzlib],
1353       [do not compile with compression library bzlib])],
1354    [coin_enable_bzlib=$enableval],
1355    [coin_enable_bzlib=yes])
1356
1357  if test $coin_enable_bzlib = yes ; then
1358    AC_CHECK_HEADER([bzlib.h],[coin_has_bzlib=yes])
1359    if test $coin_has_bzlib = yes ; then
1360      AC_CHECK_LIB([bz2],[BZ2_bzReadOpen],[],[coin_has_bzlib=no])
1361    fi
1362    if test $coin_has_bzlib = yes ; then
1363      m4_foreach_w([myvar],[$1],
1364        [m4_toupper(myvar)_LFLAGS="-lbz2 $m4_toupper(myvar)_LFLAGS"])
1365      AC_DEFINE([COIN_HAS_BZLIB],[1],[Define to 1 if bzlib is available])
1366    fi
1367  fi
1368
1369  AM_CONDITIONAL([COIN_HAS_BZLIB],[test x$coin_has_bzlib = xyes])
1370]) # AC_COIN_CHK_BZLIB
1371
1372
1373###########################################################################
1374#                              COIN_CHK_GMP                             #
1375###########################################################################
1376
1377# COIN_CHK_GMP([client1 client2 ...])
1378
1379# This macro checks for the gmp library.  If found, it defines the C
1380# preprocessor variable COIN_HAS_GMP and the automake conditional COIN_HAS_GMP.
1381# Further, for a (space separated) list of clients, it adds the linker
1382# flag to the variable CLIENT_LFLAGS for each client.
1383
1384AC_DEFUN([AC_COIN_CHK_GMP],
1385[
1386  AC_REQUIRE([AC_PROG_CC])
1387
1388  coin_has_gmp=no
1389
1390  AC_ARG_ENABLE([gmp],
1391    [AC_HELP_STRING([--disable-gmp],
1392       [do not compile with GNU multiple precision library])],
1393    [coin_enable_gmp=$enableval],
1394    [coin_enable_gmp=yes])
1395
1396  if test $coin_enable_gmp = yes ; then
1397    AC_CHECK_HEADER([gmp.h],
1398      [AC_CHECK_LIB([gmp],[__gmpz_init],[coin_has_gmp=yes])])
1399    if test $coin_has_gmp = yes ; then
1400      m4_foreach_w([myvar],[$1],
1401        [m4_toupper(myvar)_LFLAGS="-lgmp $m4_toupper(myvar)_LFLAGS"])
1402      AC_DEFINE([COIN_HAS_GMP],[1],[Define to 1 if GMP is available])
1403    fi
1404  fi
1405
1406  AM_CONDITIONAL([COIN_HAS_GMP],[test x$coin_has_gmp = xyes])
1407]) # AC_COIN_CHK_GMP
1408
1409
1410###########################################################################
1411#                         COIN_CHK_GNU_READLINE                         #
1412###########################################################################
1413
1414# COIN_CHK_GNU_READLINE([client1 client2 ...])
1415
1416# This macro checks for GNU's readline.  It verifies that the header
1417# readline/readline.h is available, and that the -lreadline library contains
1418# "readline".  It is assumed that #include <stdio.h> is included in the source
1419# file before the #include<readline/readline.h> If found, it defines the C
1420# preprocessor variable COIN_HAS_READLINE.  Further, for a (space separated)
1421# list of clients, it adds the linker flag to the variable CLIENT_LFLAGS for
1422# each client.
1423
1424AC_DEFUN([AC_COIN_CHK_GNU_READLINE],
1425[
1426  AC_REQUIRE([AC_PROG_CC])
1427
1428  coin_has_readline=no
1429
1430  AC_ARG_ENABLE([readline],
1431    [AC_HELP_STRING([--disable-readline],
1432       [do not compile with readline library])],
1433    [coin_enable_readline=$enableval],
1434    [coin_enable_readline=yes])
1435
1436  if test $coin_enable_readline = yes ; then
1437    AC_CHECK_HEADER([readline/readline.h],
1438      [coin_has_readline=yes],[],[#include <stdio.h>])
1439    coin_save_LIBS="$LIBS"
1440    LIBS=
1441    if test $coin_has_readline = yes ; then
1442      AC_SEARCH_LIBS([tputs],
1443        [ncurses termcap curses],[],[coin_has_readline=no])
1444    fi
1445    if test $coin_has_readline = yes ; then
1446      AC_CHECK_LIB([readline],[readline],[],[coin_has_readline=no])
1447    fi
1448    if test $coin_has_readline = yes ; then
1449      m4_foreach_w([myvar],[$1],
1450        [m4_toupper(myvar)_LFLAGS="-lreadline $m4_toupper(myvar)_LFLAGS"])
1451      AC_DEFINE([COIN_HAS_READLINE],[1],[Define to 1 if readline is available])
1452    fi
1453    LIBS="$coin_save_LIBS"
1454  fi
1455
1456  AM_CONDITIONAL([COIN_HAS_READLINE],[test x$coin_has_readline = xyes])
1457]) # AC_COIN_CHK_GNU_READLINE
1458
1459###########################################################################
1460#                           COIN_DOXYGEN                                  #
1461###########################################################################
1462
1463# This macro determines the configuration information for doxygen, the tool
1464# used to generate online documentation of COIN code. It takes one parameter,
1465# a list of projects (mixed-case, to match the install directory names) that
1466# should be processed as external tag files. E.g., COIN_DOXYGEN([Clp Osi]).
1467
1468# This macro will define the following variables:
1469#  coin_have_doxygen    Yes if doxygen is found, no otherwise
1470#  coin_doxy_usedot     Defaults to `yes'; --with-dot will still check to see
1471#                       if dot is available
1472#  coin_doxy_tagname    Name of doxygen tag file (placed in doxydoc directory)
1473#  coin_doxy_logname    Name of doxygen log file (placed in doxydoc directory)
1474#  coin_doxy_tagfiles   List of doxygen tag files used to reference other
1475#                       doxygen documentation
1476
1477AC_DEFUN([AC_COIN_DOXYGEN],
1478[
1479
1480AC_MSG_NOTICE([configuring doxygen documentation options])
1481
1482# Check to see if doxygen is available.
1483
1484AC_CHECK_PROG([coin_have_doxygen],[doxygen],[yes],[no])
1485AC_CHECK_PROG([coin_have_latex],[latex],[yes],[no])
1486
1487# Look for the dot tool from the graphviz package, unless the user has
1488# disabled it.
1489
1490AC_ARG_WITH([dot],
1491  AS_HELP_STRING([--with-dot],
1492                 [use dot (from graphviz) when creating documentation with
1493                  doxygen if available; --without-dot to disable]),
1494  [],[withval=yes])
1495if test x"$withval" = xno ; then
1496  coin_doxy_usedot=NO
1497  AC_MSG_CHECKING([for dot ])
1498  AC_MSG_RESULT([disabled])
1499else
1500  AC_CHECK_PROG([coin_doxy_usedot],[dot],[YES],[NO])
1501fi
1502
1503# Generate a tag file name and a log file name
1504
1505lc_pkg=`echo ${PACKAGE_NAME} | [tr [A-Z] [a-z]]`
1506AC_SUBST([coin_doxy_tagname],[${lc_pkg}_doxy.tag])
1507AC_SUBST([coin_doxy_logname],[${lc_pkg}_doxy.log])
1508AM_CONDITIONAL(COIN_HAS_DOXYGEN, [test $coin_have_doxygen = yes])
1509AM_CONDITIONAL(COIN_HAS_LATEX, [test $coin_have_latex = yes])
1510
1511# Process the list of project names and massage each one into the name of a
1512# tag file. Further substitution for @doxydocdir@ will happen during make
1513# install.
1514
1515coin_doxy_tagfiles=
1516tmp="$1"
1517for proj in $tmp ; do
1518  lc_proj=`echo $proj | [tr [A-Z] [a-z]]`
1519  doxytag=${lc_proj}_doxy.tag
1520  doxydir="@baredocdir_nosub@/coin-or-${lc_proj}/doxydoc"
1521  coin_doxy_tagfiles="$coin_doxy_tagfiles $doxydir/$doxytag=$doxydir/html"
1522done
1523AC_SUBST([coin_doxy_tagfiles])
1524
1525]) # AC_COIN_DOXYGEN
1526
1527
1528###########################################################################
1529#                          COIN_EXAMPLE_FILES                             #
1530###########################################################################
1531
1532# This macro deals with `example' files. Its original use is for data files
1533# associated with the Data projects. It allows for uniform handling of files
1534# that are not processed but should be present in the build directory. Most of
1535# the work is done by make. This macro just sets up the necessary variables.
1536# The justification for this approach is to allow the use of file name wild
1537# cards in the argument. The underlying machinery of autoconf and automake
1538# kind of breaks down when the file names are not literal text.
1539
1540# One tradeoff for allowing the use of wildcards is that it's not possible to
1541# give the created link a name that's different from the source file.
1542
1543# The variables (file names accumulate over calls):
1544# EXAMPLE_DIST_FILES: The originals that should be distributed
1545# EXAMPLE_UNCOMP_FILES: like EXAMPLE_DIST_FILES, but names of compressed files
1546# are stripped of their .gz suffix.
1547# EXAMPLE_CLEAN_FILES: contains only the names of files that were stripped of
1548# .gz. Essential for distclean in a non-VPATH build.
1549# One of EXAMPLE_DIST_FILES or EXAMPLE_UNCOMP_FILES will be the list of file
1550# names for install / uninstall. See Makefile.am in a Data project for usage.
1551
1552AC_DEFUN([AC_COIN_EXAMPLE_FILES],
1553[
1554AC_REQUIRE([AC_COIN_CHECK_VPATH])[]dnl
1555AC_REQUIRE([AC_PROG_LN_S])[]dnl
1556AM_CONDITIONAL([COIN_VPATH_BUILD],[test x$coin_vpath_config = xyes])
1557
1558# Get the names of the files and sort them to the various variables. As
1559# a convenient side-effect, the loop will remove newlines from the list
1560# of files. Avoid adding duplicate file names. (Allowing wild cards makes
1561# duplicates far too likely.) The redirect of stderr on the ls is arguable. It
1562# avoids error messages in the configure output if the package maintainer
1563# specifies files that don't exist (for example, generic wild card specs
1564# that anticipate future growth) but it will hide honest errors.
1565
1566files=`cd $srcdir; ls $1 2>/dev/null`
1567for file in $files; do
1568  if expr " $EXAMPLE_DIST_FILES " : '.* '"$file"' .*' >/dev/null 2>&1 ; then
1569    continue ;
1570  fi
1571  EXAMPLE_DIST_FILES="$EXAMPLE_DIST_FILES $file"
1572  if expr "$file" : '.*\.gz$' >/dev/null 2>&1 ; then
1573    EXAMPLE_UNCOMP_FILES="$EXAMPLE_UNCOMP_FILES `expr "$file" : '\(.*\)\.gz$'`"
1574    EXAMPLE_CLEAN_FILES="$EXAMPLE_CLEAN_FILES `expr "$file" : '\(.*\)\.gz$'`"
1575  else
1576    EXAMPLE_UNCOMP_FILES="$EXAMPLE_UNCOMP_FILES $file"
1577  fi
1578done
1579
1580AC_SUBST(EXAMPLE_DIST_FILES)
1581AC_SUBST(EXAMPLE_UNCOMP_FILES)
1582AC_SUBST(EXAMPLE_CLEAN_FILES)
1583
1584]) # AC_COIN_EXAMPLE_FILES
1585
1586###########################################################################
1587#                           COIN_FINALIZE_FLAGS                           #
1588###########################################################################
1589
1590# COIN_FINALIZE_FLAGS([prim1 prim2 ...])
1591
1592# For each PRIM, produce final versions of variables specifying linker and
1593# compiler flags.  PRIM_LFLAGS_NOPC and PRIM_CFLAGS_NOPC are appropriate for
1594# use in .pc files together with PRIM_PCFILES. PRIM_LFLAGS and PRIM_CFLAGS
1595# are augmented to contain flags obtained by invoking PKG_CONFIG on packages
1596# listed in PRIM_PCFILES and are appropriate for use in Makefile.am files.
1597
1598# TODO this could be moved into COIN_FINALIZE, if we were able to remember
1599#   for which variables we need to run pkg-config
1600
1601AC_DEFUN([AC_COIN_FINALIZE_FLAGS],
1602[
1603  m4_foreach_w([myvar],[$1],
1604    [ if test 1 = 1 ; then
1605        AC_MSG_NOTICE([FINALIZE_FLAGS for myvar:])
1606      fi
1607      AC_SUBST(m4_toupper(myvar)_LFLAGS_NOPC,[$m4_toupper(myvar)_LFLAGS])
1608      AC_SUBST(m4_toupper(myvar)_CFLAGS_NOPC,[$m4_toupper(myvar)_CFLAGS])
1609      if test -n "${m4_toupper(myvar)_PCFILES}" ; then
1610        temp_CFLAGS=`PKG_CONFIG_PATH="$COIN_PKG_CONFIG_PATH" $PKG_CONFIG --cflags ${m4_toupper(myvar)_PCFILES}`
1611        temp_LFLAGS=`PKG_CONFIG_PATH="$COIN_PKG_CONFIG_PATH" $PKG_CONFIG --libs ${m4_toupper(myvar)_PCFILES}`
1612        m4_toupper(myvar)_CFLAGS="$temp_CFLAGS ${m4_toupper(myvar)_CFLAGS}"
1613        m4_toupper(myvar)_LFLAGS="$temp_LFLAGS ${m4_toupper(myvar)_LFLAGS}"
1614      fi
1615
1616# Change the test to enable / disable debugging output
1617
1618      if test 1 = 1 ; then
1619        AC_MSG_NOTICE(
1620          [m4_toupper(myvar)_LFLAGS_NOPC: "${m4_toupper(myvar)_LFLAGS_NOPC}"])
1621        AC_MSG_NOTICE(
1622          [m4_toupper(myvar)_CFLAGS_NOPC: "${m4_toupper(myvar)_CFLAGS_NOPC}"])
1623        AC_MSG_NOTICE([adding "${m4_toupper(myvar)_PCFILES}"])
1624        AC_MSG_NOTICE([m4_toupper(myvar)_LFLAGS: "${m4_toupper(myvar)_LFLAGS}"])
1625        AC_MSG_NOTICE([m4_toupper(myvar)_CFLAGS: "${m4_toupper(myvar)_CFLAGS}"])
1626      fi ; ])
1627])
1628
1629###########################################################################
1630#                              COIN_FINALIZE                              #
1631###########################################################################
1632
1633# This macro should be called at the very end of the configure.ac file.
1634# It creates the output files (by using AC_OUTPUT), and might do some other
1635# things (such as generating links to data files in a VPATH configuration).
1636# It also prints the "success" message.
1637# Note: If the variable coin_skip_ac_output is set to yes, then no output
1638# files are written.
1639
1640AC_DEFUN([AC_COIN_FINALIZE],
1641[
1642  AC_OUTPUT
1643
1644  AC_MSG_NOTICE([In case of trouble, first consult the troubleshooting page at https://projects.coin-or.org/BuildTools/wiki/user-troubleshooting])
1645  AC_MSG_NOTICE([Configuration of $PACKAGE_NAME successful])
1646
1647]) #AC_COIN_FINALIZE
1648
Note: See TracBrowser for help on using the repository browser.