source: ThirdParty/Glpk/branches/autotools-update/glpk_config_files/aclocal.m4

Last change on this file was 4056, checked in by lou, 4 months ago

Second try, rewriting glpk's configuration source files. Went with Stefan's
suggestion to stop trying to pass values and just add COIN macros to glpk's
configure.ac. More straightforward.

File size: 446.8 KB
Line 
1# generated automatically by aclocal 1.16.1 -*- Autoconf -*-
2
3# Copyright (C) 1996-2018 Free Software Foundation, Inc.
4
5# This file is free software; the Free Software Foundation
6# gives unlimited permission to copy and/or distribute it,
7# with or without modifications, as long as this notice is preserved.
8
9# This program is distributed in the hope that it will be useful,
10# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12# PARTICULAR PURPOSE.
13
14m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
15m4_ifndef([AC_AUTOCONF_VERSION],
16  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
17m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],,
18[m4_warning([this file was generated for autoconf 2.69.
19You have another version of autoconf.  It may work, but is not guaranteed to.
20If you have problems, you may need to regenerate the build system entirely.
21To do so, use the procedure documented by the package, typically 'autoreconf'.])])
22
23# Copyright (C) 2002-2018 Free Software Foundation, Inc.
24#
25# This file is free software; the Free Software Foundation
26# gives unlimited permission to copy and/or distribute it,
27# with or without modifications, as long as this notice is preserved.
28
29# AM_AUTOMAKE_VERSION(VERSION)
30# ----------------------------
31# Automake X.Y traces this macro to ensure aclocal.m4 has been
32# generated from the m4 files accompanying Automake X.Y.
33# (This private macro should not be called outside this file.)
34AC_DEFUN([AM_AUTOMAKE_VERSION],
35[am__api_version='1.16'
36dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
37dnl require some minimum version.  Point them to the right macro.
38m4_if([$1], [1.16.1], [],
39      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
40])
41
42# _AM_AUTOCONF_VERSION(VERSION)
43# -----------------------------
44# aclocal traces this macro to find the Autoconf version.
45# This is a private macro too.  Using m4_define simplifies
46# the logic in aclocal, which can simply ignore this definition.
47m4_define([_AM_AUTOCONF_VERSION], [])
48
49# AM_SET_CURRENT_AUTOMAKE_VERSION
50# -------------------------------
51# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
52# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
53AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
54[AM_AUTOMAKE_VERSION([1.16.1])dnl
55m4_ifndef([AC_AUTOCONF_VERSION],
56  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
57_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
58
59# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
60
61# Copyright (C) 2001-2018 Free Software Foundation, Inc.
62#
63# This file is free software; the Free Software Foundation
64# gives unlimited permission to copy and/or distribute it,
65# with or without modifications, as long as this notice is preserved.
66
67# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
68# $ac_aux_dir to '$srcdir/foo'.  In other projects, it is set to
69# '$srcdir', '$srcdir/..', or '$srcdir/../..'.
70#
71# Of course, Automake must honor this variable whenever it calls a
72# tool from the auxiliary directory.  The problem is that $srcdir (and
73# therefore $ac_aux_dir as well) can be either absolute or relative,
74# depending on how configure is run.  This is pretty annoying, since
75# it makes $ac_aux_dir quite unusable in subdirectories: in the top
76# source directory, any form will work fine, but in subdirectories a
77# relative path needs to be adjusted first.
78#
79# $ac_aux_dir/missing
80#    fails when called from a subdirectory if $ac_aux_dir is relative
81# $top_srcdir/$ac_aux_dir/missing
82#    fails if $ac_aux_dir is absolute,
83#    fails when called from a subdirectory in a VPATH build with
84#          a relative $ac_aux_dir
85#
86# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
87# are both prefixed by $srcdir.  In an in-source build this is usually
88# harmless because $srcdir is '.', but things will broke when you
89# start a VPATH build or use an absolute $srcdir.
90#
91# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
92# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
93#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
94# and then we would define $MISSING as
95#   MISSING="\${SHELL} $am_aux_dir/missing"
96# This will work as long as MISSING is not called from configure, because
97# unfortunately $(top_srcdir) has no meaning in configure.
98# However there are other variables, like CC, which are often used in
99# configure, and could therefore not use this "fixed" $ac_aux_dir.
100#
101# Another solution, used here, is to always expand $ac_aux_dir to an
102# absolute PATH.  The drawback is that using absolute paths prevent a
103# configured tree to be moved without reconfiguration.
104
105AC_DEFUN([AM_AUX_DIR_EXPAND],
106[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
107# Expand $ac_aux_dir to an absolute path.
108am_aux_dir=`cd "$ac_aux_dir" && pwd`
109])
110
111# AM_CONDITIONAL                                            -*- Autoconf -*-
112
113# Copyright (C) 1997-2018 Free Software Foundation, Inc.
114#
115# This file is free software; the Free Software Foundation
116# gives unlimited permission to copy and/or distribute it,
117# with or without modifications, as long as this notice is preserved.
118
119# AM_CONDITIONAL(NAME, SHELL-CONDITION)
120# -------------------------------------
121# Define a conditional.
122AC_DEFUN([AM_CONDITIONAL],
123[AC_PREREQ([2.52])dnl
124 m4_if([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
125       [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
126AC_SUBST([$1_TRUE])dnl
127AC_SUBST([$1_FALSE])dnl
128_AM_SUBST_NOTMAKE([$1_TRUE])dnl
129_AM_SUBST_NOTMAKE([$1_FALSE])dnl
130m4_define([_AM_COND_VALUE_$1], [$2])dnl
131if $2; then
132  $1_TRUE=
133  $1_FALSE='#'
134else
135  $1_TRUE='#'
136  $1_FALSE=
137fi
138AC_CONFIG_COMMANDS_PRE(
139[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
140  AC_MSG_ERROR([[conditional "$1" was never defined.
141Usually this means the macro was only invoked conditionally.]])
142fi])])
143
144# Copyright (C) 1999-2018 Free Software Foundation, Inc.
145#
146# This file is free software; the Free Software Foundation
147# gives unlimited permission to copy and/or distribute it,
148# with or without modifications, as long as this notice is preserved.
149
150
151# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
152# written in clear, in which case automake, when reading aclocal.m4,
153# will think it sees a *use*, and therefore will trigger all it's
154# C support machinery.  Also note that it means that autoscan, seeing
155# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
156
157
158# _AM_DEPENDENCIES(NAME)
159# ----------------------
160# See how the compiler implements dependency checking.
161# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC".
162# We try a few techniques and use that to set a single cache variable.
163#
164# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
165# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
166# dependency, and given that the user is not expected to run this macro,
167# just rely on AC_PROG_CC.
168AC_DEFUN([_AM_DEPENDENCIES],
169[AC_REQUIRE([AM_SET_DEPDIR])dnl
170AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
171AC_REQUIRE([AM_MAKE_INCLUDE])dnl
172AC_REQUIRE([AM_DEP_TRACK])dnl
173
174m4_if([$1], [CC],   [depcc="$CC"   am_compiler_list=],
175      [$1], [CXX],  [depcc="$CXX"  am_compiler_list=],
176      [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
177      [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'],
178      [$1], [UPC],  [depcc="$UPC"  am_compiler_list=],
179      [$1], [GCJ],  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
180                    [depcc="$$1"   am_compiler_list=])
181
182AC_CACHE_CHECK([dependency style of $depcc],
183               [am_cv_$1_dependencies_compiler_type],
184[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
185  # We make a subdir and do the tests there.  Otherwise we can end up
186  # making bogus files that we don't know about and never remove.  For
187  # instance it was reported that on HP-UX the gcc test will end up
188  # making a dummy file named 'D' -- because '-MD' means "put the output
189  # in D".
190  rm -rf conftest.dir
191  mkdir conftest.dir
192  # Copy depcomp to subdir because otherwise we won't find it if we're
193  # using a relative directory.
194  cp "$am_depcomp" conftest.dir
195  cd conftest.dir
196  # We will build objects and dependencies in a subdirectory because
197  # it helps to detect inapplicable dependency modes.  For instance
198  # both Tru64's cc and ICC support -MD to output dependencies as a
199  # side effect of compilation, but ICC will put the dependencies in
200  # the current directory while Tru64 will put them in the object
201  # directory.
202  mkdir sub
203
204  am_cv_$1_dependencies_compiler_type=none
205  if test "$am_compiler_list" = ""; then
206     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
207  fi
208  am__universal=false
209  m4_case([$1], [CC],
210    [case " $depcc " in #(
211     *\ -arch\ *\ -arch\ *) am__universal=true ;;
212     esac],
213    [CXX],
214    [case " $depcc " in #(
215     *\ -arch\ *\ -arch\ *) am__universal=true ;;
216     esac])
217
218  for depmode in $am_compiler_list; do
219    # Setup a source with many dependencies, because some compilers
220    # like to wrap large dependency lists on column 80 (with \), and
221    # we should not choose a depcomp mode which is confused by this.
222    #
223    # We need to recreate these files for each test, as the compiler may
224    # overwrite some of them when testing with obscure command lines.
225    # This happens at least with the AIX C compiler.
226    : > sub/conftest.c
227    for i in 1 2 3 4 5 6; do
228      echo '#include "conftst'$i'.h"' >> sub/conftest.c
229      # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
230      # Solaris 10 /bin/sh.
231      echo '/* dummy */' > sub/conftst$i.h
232    done
233    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
234
235    # We check with '-c' and '-o' for the sake of the "dashmstdout"
236    # mode.  It turns out that the SunPro C++ compiler does not properly
237    # handle '-M -o', and we need to detect this.  Also, some Intel
238    # versions had trouble with output in subdirs.
239    am__obj=sub/conftest.${OBJEXT-o}
240    am__minus_obj="-o $am__obj"
241    case $depmode in
242    gcc)
243      # This depmode causes a compiler race in universal mode.
244      test "$am__universal" = false || continue
245      ;;
246    nosideeffect)
247      # After this tag, mechanisms are not by side-effect, so they'll
248      # only be used when explicitly requested.
249      if test "x$enable_dependency_tracking" = xyes; then
250        continue
251      else
252        break
253      fi
254      ;;
255    msvc7 | msvc7msys | msvisualcpp | msvcmsys)
256      # This compiler won't grok '-c -o', but also, the minuso test has
257      # not run yet.  These depmodes are late enough in the game, and
258      # so weak that their functioning should not be impacted.
259      am__obj=conftest.${OBJEXT-o}
260      am__minus_obj=
261      ;;
262    none) break ;;
263    esac
264    if depmode=$depmode \
265       source=sub/conftest.c object=$am__obj \
266       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
267       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
268         >/dev/null 2>conftest.err &&
269       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
270       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
271       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
272       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
273      # icc doesn't choke on unknown options, it will just issue warnings
274      # or remarks (even with -Werror).  So we grep stderr for any message
275      # that says an option was ignored or not supported.
276      # When given -MP, icc 7.0 and 7.1 complain thusly:
277      #   icc: Command line warning: ignoring option '-M'; no argument required
278      # The diagnosis changed in icc 8.0:
279      #   icc: Command line remark: option '-MP' not supported
280      if (grep 'ignoring option' conftest.err ||
281          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
282        am_cv_$1_dependencies_compiler_type=$depmode
283        break
284      fi
285    fi
286  done
287
288  cd ..
289  rm -rf conftest.dir
290else
291  am_cv_$1_dependencies_compiler_type=none
292fi
293])
294AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
295AM_CONDITIONAL([am__fastdep$1], [
296  test "x$enable_dependency_tracking" != xno \
297  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
298])
299
300
301# AM_SET_DEPDIR
302# -------------
303# Choose a directory name for dependency files.
304# This macro is AC_REQUIREd in _AM_DEPENDENCIES.
305AC_DEFUN([AM_SET_DEPDIR],
306[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
307AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
308])
309
310
311# AM_DEP_TRACK
312# ------------
313AC_DEFUN([AM_DEP_TRACK],
314[AC_ARG_ENABLE([dependency-tracking], [dnl
315AS_HELP_STRING(
316  [--enable-dependency-tracking],
317  [do not reject slow dependency extractors])
318AS_HELP_STRING(
319  [--disable-dependency-tracking],
320  [speeds up one-time build])])
321if test "x$enable_dependency_tracking" != xno; then
322  am_depcomp="$ac_aux_dir/depcomp"
323  AMDEPBACKSLASH='\'
324  am__nodep='_no'
325fi
326AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
327AC_SUBST([AMDEPBACKSLASH])dnl
328_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
329AC_SUBST([am__nodep])dnl
330_AM_SUBST_NOTMAKE([am__nodep])dnl
331])
332
333# Generate code to set up dependency tracking.              -*- Autoconf -*-
334
335# Copyright (C) 1999-2018 Free Software Foundation, Inc.
336#
337# This file is free software; the Free Software Foundation
338# gives unlimited permission to copy and/or distribute it,
339# with or without modifications, as long as this notice is preserved.
340
341# _AM_OUTPUT_DEPENDENCY_COMMANDS
342# ------------------------------
343AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
344[{
345  # Older Autoconf quotes --file arguments for eval, but not when files
346  # are listed without --file.  Let's play safe and only enable the eval
347  # if we detect the quoting.
348  # TODO: see whether this extra hack can be removed once we start
349  # requiring Autoconf 2.70 or later.
350  AS_CASE([$CONFIG_FILES],
351          [*\'*], [eval set x "$CONFIG_FILES"],
352          [*], [set x $CONFIG_FILES])
353  shift
354  # Used to flag and report bootstrapping failures.
355  am_rc=0
356  for am_mf
357  do
358    # Strip MF so we end up with the name of the file.
359    am_mf=`AS_ECHO(["$am_mf"]) | sed -e 's/:.*$//'`
360    # Check whether this is an Automake generated Makefile which includes
361    # dependency-tracking related rules and includes.
362    # Grep'ing the whole file directly is not great: AIX grep has a line
363    # limit of 2048, but all sed's we know have understand at least 4000.
364    sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \
365      || continue
366    am_dirpart=`AS_DIRNAME(["$am_mf"])`
367    am_filepart=`AS_BASENAME(["$am_mf"])`
368    AM_RUN_LOG([cd "$am_dirpart" \
369      && sed -e '/# am--include-marker/d' "$am_filepart" \
370        | $MAKE -f - am--depfiles]) || am_rc=$?
371  done
372  if test $am_rc -ne 0; then
373    AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments
374    for automatic dependency tracking.  Try re-running configure with the
375    '--disable-dependency-tracking' option to at least be able to build
376    the package (albeit without support for automatic dependency tracking).])
377  fi
378  AS_UNSET([am_dirpart])
379  AS_UNSET([am_filepart])
380  AS_UNSET([am_mf])
381  AS_UNSET([am_rc])
382  rm -f conftest-deps.mk
383}
384])# _AM_OUTPUT_DEPENDENCY_COMMANDS
385
386
387# AM_OUTPUT_DEPENDENCY_COMMANDS
388# -----------------------------
389# This macro should only be invoked once -- use via AC_REQUIRE.
390#
391# This code is only required when automatic dependency tracking is enabled.
392# This creates each '.Po' and '.Plo' makefile fragment that we'll need in
393# order to bootstrap the dependency handling code.
394AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
395[AC_CONFIG_COMMANDS([depfiles],
396     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
397     [AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"])])
398
399# Do all the work for Automake.                             -*- Autoconf -*-
400
401# Copyright (C) 1996-2018 Free Software Foundation, Inc.
402#
403# This file is free software; the Free Software Foundation
404# gives unlimited permission to copy and/or distribute it,
405# with or without modifications, as long as this notice is preserved.
406
407# This macro actually does too much.  Some checks are only needed if
408# your package does certain things.  But this isn't really a big deal.
409
410dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O.
411m4_define([AC_PROG_CC],
412m4_defn([AC_PROG_CC])
413[_AM_PROG_CC_C_O
414])
415
416# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
417# AM_INIT_AUTOMAKE([OPTIONS])
418# -----------------------------------------------
419# The call with PACKAGE and VERSION arguments is the old style
420# call (pre autoconf-2.50), which is being phased out.  PACKAGE
421# and VERSION should now be passed to AC_INIT and removed from
422# the call to AM_INIT_AUTOMAKE.
423# We support both call styles for the transition.  After
424# the next Automake release, Autoconf can make the AC_INIT
425# arguments mandatory, and then we can depend on a new Autoconf
426# release and drop the old call support.
427AC_DEFUN([AM_INIT_AUTOMAKE],
428[AC_PREREQ([2.65])dnl
429dnl Autoconf wants to disallow AM_ names.  We explicitly allow
430dnl the ones we care about.
431m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
432AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
433AC_REQUIRE([AC_PROG_INSTALL])dnl
434if test "`cd $srcdir && pwd`" != "`pwd`"; then
435  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
436  # is not polluted with repeated "-I."
437  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
438  # test to see if srcdir already configured
439  if test -f $srcdir/config.status; then
440    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
441  fi
442fi
443
444# test whether we have cygpath
445if test -z "$CYGPATH_W"; then
446  if (cygpath --version) >/dev/null 2>/dev/null; then
447    CYGPATH_W='cygpath -w'
448  else
449    CYGPATH_W=echo
450  fi
451fi
452AC_SUBST([CYGPATH_W])
453
454# Define the identity of the package.
455dnl Distinguish between old-style and new-style calls.
456m4_ifval([$2],
457[AC_DIAGNOSE([obsolete],
458             [$0: two- and three-arguments forms are deprecated.])
459m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
460 AC_SUBST([PACKAGE], [$1])dnl
461 AC_SUBST([VERSION], [$2])],
462[_AM_SET_OPTIONS([$1])dnl
463dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
464m4_if(
465  m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
466  [ok:ok],,
467  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
468 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
469 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
470
471_AM_IF_OPTION([no-define],,
472[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
473 AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
474
475# Some tools Automake needs.
476AC_REQUIRE([AM_SANITY_CHECK])dnl
477AC_REQUIRE([AC_ARG_PROGRAM])dnl
478AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
479AM_MISSING_PROG([AUTOCONF], [autoconf])
480AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
481AM_MISSING_PROG([AUTOHEADER], [autoheader])
482AM_MISSING_PROG([MAKEINFO], [makeinfo])
483AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
484AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
485AC_REQUIRE([AC_PROG_MKDIR_P])dnl
486# For better backward compatibility.  To be removed once Automake 1.9.x
487# dies out for good.  For more background, see:
488# <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
489# <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
490AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
491# We need awk for the "check" target (and possibly the TAP driver).  The
492# system "awk" is bad on some platforms.
493AC_REQUIRE([AC_PROG_AWK])dnl
494AC_REQUIRE([AC_PROG_MAKE_SET])dnl
495AC_REQUIRE([AM_SET_LEADING_DOT])dnl
496_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
497              [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
498                             [_AM_PROG_TAR([v7])])])
499_AM_IF_OPTION([no-dependencies],,
500[AC_PROVIDE_IFELSE([AC_PROG_CC],
501                  [_AM_DEPENDENCIES([CC])],
502                  [m4_define([AC_PROG_CC],
503                             m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
504AC_PROVIDE_IFELSE([AC_PROG_CXX],
505                  [_AM_DEPENDENCIES([CXX])],
506                  [m4_define([AC_PROG_CXX],
507                             m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
508AC_PROVIDE_IFELSE([AC_PROG_OBJC],
509                  [_AM_DEPENDENCIES([OBJC])],
510                  [m4_define([AC_PROG_OBJC],
511                             m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
512AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
513                  [_AM_DEPENDENCIES([OBJCXX])],
514                  [m4_define([AC_PROG_OBJCXX],
515                             m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
516])
517AC_REQUIRE([AM_SILENT_RULES])dnl
518dnl The testsuite driver may need to know about EXEEXT, so add the
519dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This
520dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
521AC_CONFIG_COMMANDS_PRE(dnl
522[m4_provide_if([_AM_COMPILER_EXEEXT],
523  [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
524
525# POSIX will say in a future version that running "rm -f" with no argument
526# is OK; and we want to be able to make that assumption in our Makefile
527# recipes.  So use an aggressive probe to check that the usage we want is
528# actually supported "in the wild" to an acceptable degree.
529# See automake bug#10828.
530# To make any issue more visible, cause the running configure to be aborted
531# by default if the 'rm' program in use doesn't match our expectations; the
532# user can still override this though.
533if rm -f && rm -fr && rm -rf; then : OK; else
534  cat >&2 <<'END'
535Oops!
536
537Your 'rm' program seems unable to run without file operands specified
538on the command line, even when the '-f' option is present.  This is contrary
539to the behaviour of most rm programs out there, and not conforming with
540the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
541
542Please tell bug-automake@gnu.org about your system, including the value
543of your $PATH and any error possibly output before this message.  This
544can help us improve future automake versions.
545
546END
547  if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
548    echo 'Configuration will proceed anyway, since you have set the' >&2
549    echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
550    echo >&2
551  else
552    cat >&2 <<'END'
553Aborting the configuration process, to ensure you take notice of the issue.
554
555You can download and install GNU coreutils to get an 'rm' implementation
556that behaves properly: <https://www.gnu.org/software/coreutils/>.
557
558If you want to complete the configuration process using your problematic
559'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
560to "yes", and re-run configure.
561
562END
563    AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
564  fi
565fi
566dnl The trailing newline in this macro's definition is deliberate, for
567dnl backward compatibility and to allow trailing 'dnl'-style comments
568dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841.
569])
570
571dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
572dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
573dnl mangled by Autoconf and run in a shell conditional statement.
574m4_define([_AC_COMPILER_EXEEXT],
575m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
576
577# When config.status generates a header, we must update the stamp-h file.
578# This file resides in the same directory as the config header
579# that is generated.  The stamp files are numbered to have different names.
580
581# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
582# loop where config.status creates the headers, so we can generate
583# our stamp files there.
584AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
585[# Compute $1's index in $config_headers.
586_am_arg=$1
587_am_stamp_count=1
588for _am_header in $config_headers :; do
589  case $_am_header in
590    $_am_arg | $_am_arg:* )
591      break ;;
592    * )
593      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
594  esac
595done
596echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
597
598# Copyright (C) 2001-2018 Free Software Foundation, Inc.
599#
600# This file is free software; the Free Software Foundation
601# gives unlimited permission to copy and/or distribute it,
602# with or without modifications, as long as this notice is preserved.
603
604# AM_PROG_INSTALL_SH
605# ------------------
606# Define $install_sh.
607AC_DEFUN([AM_PROG_INSTALL_SH],
608[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
609if test x"${install_sh+set}" != xset; then
610  case $am_aux_dir in
611  *\ * | *\     *)
612    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
613  *)
614    install_sh="\${SHELL} $am_aux_dir/install-sh"
615  esac
616fi
617AC_SUBST([install_sh])])
618
619# Copyright (C) 2003-2018 Free Software Foundation, Inc.
620#
621# This file is free software; the Free Software Foundation
622# gives unlimited permission to copy and/or distribute it,
623# with or without modifications, as long as this notice is preserved.
624
625# Check whether the underlying file-system supports filenames
626# with a leading dot.  For instance MS-DOS doesn't.
627AC_DEFUN([AM_SET_LEADING_DOT],
628[rm -rf .tst 2>/dev/null
629mkdir .tst 2>/dev/null
630if test -d .tst; then
631  am__leading_dot=.
632else
633  am__leading_dot=_
634fi
635rmdir .tst 2>/dev/null
636AC_SUBST([am__leading_dot])])
637
638# Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
639# From Jim Meyering
640
641# Copyright (C) 1996-2018 Free Software Foundation, Inc.
642#
643# This file is free software; the Free Software Foundation
644# gives unlimited permission to copy and/or distribute it,
645# with or without modifications, as long as this notice is preserved.
646
647# AM_MAINTAINER_MODE([DEFAULT-MODE])
648# ----------------------------------
649# Control maintainer-specific portions of Makefiles.
650# Default is to disable them, unless 'enable' is passed literally.
651# For symmetry, 'disable' may be passed as well.  Anyway, the user
652# can override the default with the --enable/--disable switch.
653AC_DEFUN([AM_MAINTAINER_MODE],
654[m4_case(m4_default([$1], [disable]),
655       [enable], [m4_define([am_maintainer_other], [disable])],
656       [disable], [m4_define([am_maintainer_other], [enable])],
657       [m4_define([am_maintainer_other], [enable])
658        m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
659AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
660  dnl maintainer-mode's default is 'disable' unless 'enable' is passed
661  AC_ARG_ENABLE([maintainer-mode],
662    [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode],
663      am_maintainer_other[ make rules and dependencies not useful
664      (and sometimes confusing) to the casual installer])],
665    [USE_MAINTAINER_MODE=$enableval],
666    [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
667  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
668  AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
669  MAINT=$MAINTAINER_MODE_TRUE
670  AC_SUBST([MAINT])dnl
671]
672)
673
674# Check to see how 'make' treats includes.                  -*- Autoconf -*-
675
676# Copyright (C) 2001-2018 Free Software Foundation, Inc.
677#
678# This file is free software; the Free Software Foundation
679# gives unlimited permission to copy and/or distribute it,
680# with or without modifications, as long as this notice is preserved.
681
682# AM_MAKE_INCLUDE()
683# -----------------
684# Check whether make has an 'include' directive that can support all
685# the idioms we need for our automatic dependency tracking code.
686AC_DEFUN([AM_MAKE_INCLUDE],
687[AC_MSG_CHECKING([whether ${MAKE-make} supports the include directive])
688cat > confinc.mk << 'END'
689am__doit:
690        @echo this is the am__doit target >confinc.out
691.PHONY: am__doit
692END
693am__include="#"
694am__quote=
695# BSD make does it like this.
696echo '.include "confinc.mk" # ignored' > confmf.BSD
697# Other make implementations (GNU, Solaris 10, AIX) do it like this.
698echo 'include confinc.mk # ignored' > confmf.GNU
699_am_result=no
700for s in GNU BSD; do
701  AM_RUN_LOG([${MAKE-make} -f confmf.$s && cat confinc.out])
702  AS_CASE([$?:`cat confinc.out 2>/dev/null`],
703      ['0:this is the am__doit target'],
704      [AS_CASE([$s],
705          [BSD], [am__include='.include' am__quote='"'],
706          [am__include='include' am__quote=''])])
707  if test "$am__include" != "#"; then
708    _am_result="yes ($s style)"
709    break
710  fi
711done
712rm -f confinc.* confmf.*
713AC_MSG_RESULT([${_am_result}])
714AC_SUBST([am__include])])
715AC_SUBST([am__quote])])
716
717# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
718
719# Copyright (C) 1997-2018 Free Software Foundation, Inc.
720#
721# This file is free software; the Free Software Foundation
722# gives unlimited permission to copy and/or distribute it,
723# with or without modifications, as long as this notice is preserved.
724
725# AM_MISSING_PROG(NAME, PROGRAM)
726# ------------------------------
727AC_DEFUN([AM_MISSING_PROG],
728[AC_REQUIRE([AM_MISSING_HAS_RUN])
729$1=${$1-"${am_missing_run}$2"}
730AC_SUBST($1)])
731
732# AM_MISSING_HAS_RUN
733# ------------------
734# Define MISSING if not defined so far and test if it is modern enough.
735# If it is, set am_missing_run to use it, otherwise, to nothing.
736AC_DEFUN([AM_MISSING_HAS_RUN],
737[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
738AC_REQUIRE_AUX_FILE([missing])dnl
739if test x"${MISSING+set}" != xset; then
740  case $am_aux_dir in
741  *\ * | *\     *)
742    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
743  *)
744    MISSING="\${SHELL} $am_aux_dir/missing" ;;
745  esac
746fi
747# Use eval to expand $SHELL
748if eval "$MISSING --is-lightweight"; then
749  am_missing_run="$MISSING "
750else
751  am_missing_run=
752  AC_MSG_WARN(['missing' script is too old or missing])
753fi
754])
755
756# Helper functions for option handling.                     -*- Autoconf -*-
757
758# Copyright (C) 2001-2018 Free Software Foundation, Inc.
759#
760# This file is free software; the Free Software Foundation
761# gives unlimited permission to copy and/or distribute it,
762# with or without modifications, as long as this notice is preserved.
763
764# _AM_MANGLE_OPTION(NAME)
765# -----------------------
766AC_DEFUN([_AM_MANGLE_OPTION],
767[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
768
769# _AM_SET_OPTION(NAME)
770# --------------------
771# Set option NAME.  Presently that only means defining a flag for this option.
772AC_DEFUN([_AM_SET_OPTION],
773[m4_define(_AM_MANGLE_OPTION([$1]), [1])])
774
775# _AM_SET_OPTIONS(OPTIONS)
776# ------------------------
777# OPTIONS is a space-separated list of Automake options.
778AC_DEFUN([_AM_SET_OPTIONS],
779[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
780
781# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
782# -------------------------------------------
783# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
784AC_DEFUN([_AM_IF_OPTION],
785[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
786
787# Copyright (C) 1999-2018 Free Software Foundation, Inc.
788#
789# This file is free software; the Free Software Foundation
790# gives unlimited permission to copy and/or distribute it,
791# with or without modifications, as long as this notice is preserved.
792
793# _AM_PROG_CC_C_O
794# ---------------
795# Like AC_PROG_CC_C_O, but changed for automake.  We rewrite AC_PROG_CC
796# to automatically call this.
797AC_DEFUN([_AM_PROG_CC_C_O],
798[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
799AC_REQUIRE_AUX_FILE([compile])dnl
800AC_LANG_PUSH([C])dnl
801AC_CACHE_CHECK(
802  [whether $CC understands -c and -o together],
803  [am_cv_prog_cc_c_o],
804  [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])])
805  # Make sure it works both with $CC and with simple cc.
806  # Following AC_PROG_CC_C_O, we do the test twice because some
807  # compilers refuse to overwrite an existing .o file with -o,
808  # though they will create one.
809  am_cv_prog_cc_c_o=yes
810  for am_i in 1 2; do
811    if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \
812         && test -f conftest2.$ac_objext; then
813      : OK
814    else
815      am_cv_prog_cc_c_o=no
816      break
817    fi
818  done
819  rm -f core conftest*
820  unset am_i])
821if test "$am_cv_prog_cc_c_o" != yes; then
822   # Losing compiler, so override with the script.
823   # FIXME: It is wrong to rewrite CC.
824   # But if we don't then we get into trouble of one sort or another.
825   # A longer-term fix would be to have automake use am__CC in this case,
826   # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
827   CC="$am_aux_dir/compile $CC"
828fi
829AC_LANG_POP([C])])
830
831# For backward compatibility.
832AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
833
834# Copyright (C) 2001-2018 Free Software Foundation, Inc.
835#
836# This file is free software; the Free Software Foundation
837# gives unlimited permission to copy and/or distribute it,
838# with or without modifications, as long as this notice is preserved.
839
840# AM_RUN_LOG(COMMAND)
841# -------------------
842# Run COMMAND, save the exit status in ac_status, and log it.
843# (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
844AC_DEFUN([AM_RUN_LOG],
845[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
846   ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
847   ac_status=$?
848   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
849   (exit $ac_status); }])
850
851# Check to make sure that the build environment is sane.    -*- Autoconf -*-
852
853# Copyright (C) 1996-2018 Free Software Foundation, Inc.
854#
855# This file is free software; the Free Software Foundation
856# gives unlimited permission to copy and/or distribute it,
857# with or without modifications, as long as this notice is preserved.
858
859# AM_SANITY_CHECK
860# ---------------
861AC_DEFUN([AM_SANITY_CHECK],
862[AC_MSG_CHECKING([whether build environment is sane])
863# Reject unsafe characters in $srcdir or the absolute working directory
864# name.  Accept space and tab only in the latter.
865am_lf='
866'
867case `pwd` in
868  *[[\\\"\#\$\&\'\`$am_lf]]*)
869    AC_MSG_ERROR([unsafe absolute working directory name]);;
870esac
871case $srcdir in
872  *[[\\\"\#\$\&\'\`$am_lf\ \    ]]*)
873    AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
874esac
875
876# Do 'set' in a subshell so we don't clobber the current shell's
877# arguments.  Must try -L first in case configure is actually a
878# symlink; some systems play weird games with the mod time of symlinks
879# (eg FreeBSD returns the mod time of the symlink's containing
880# directory).
881if (
882   am_has_slept=no
883   for am_try in 1 2; do
884     echo "timestamp, slept: $am_has_slept" > conftest.file
885     set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
886     if test "$[*]" = "X"; then
887        # -L didn't work.
888        set X `ls -t "$srcdir/configure" conftest.file`
889     fi
890     if test "$[*]" != "X $srcdir/configure conftest.file" \
891        && test "$[*]" != "X conftest.file $srcdir/configure"; then
892
893        # If neither matched, then we have a broken ls.  This can happen
894        # if, for instance, CONFIG_SHELL is bash and it inherits a
895        # broken ls alias from the environment.  This has actually
896        # happened.  Such a system could not be considered "sane".
897        AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
898  alias in your environment])
899     fi
900     if test "$[2]" = conftest.file || test $am_try -eq 2; then
901       break
902     fi
903     # Just in case.
904     sleep 1
905     am_has_slept=yes
906   done
907   test "$[2]" = conftest.file
908   )
909then
910   # Ok.
911   :
912else
913   AC_MSG_ERROR([newly created file is older than distributed files!
914Check your system clock])
915fi
916AC_MSG_RESULT([yes])
917# If we didn't sleep, we still need to ensure time stamps of config.status and
918# generated files are strictly newer.
919am_sleep_pid=
920if grep 'slept: no' conftest.file >/dev/null 2>&1; then
921  ( sleep 1 ) &
922  am_sleep_pid=$!
923fi
924AC_CONFIG_COMMANDS_PRE(
925  [AC_MSG_CHECKING([that generated files are newer than configure])
926   if test -n "$am_sleep_pid"; then
927     # Hide warnings about reused PIDs.
928     wait $am_sleep_pid 2>/dev/null
929   fi
930   AC_MSG_RESULT([done])])
931rm -f conftest.file
932])
933
934# Copyright (C) 2009-2018 Free Software Foundation, Inc.
935#
936# This file is free software; the Free Software Foundation
937# gives unlimited permission to copy and/or distribute it,
938# with or without modifications, as long as this notice is preserved.
939
940# AM_SILENT_RULES([DEFAULT])
941# --------------------------
942# Enable less verbose build rules; with the default set to DEFAULT
943# ("yes" being less verbose, "no" or empty being verbose).
944AC_DEFUN([AM_SILENT_RULES],
945[AC_ARG_ENABLE([silent-rules], [dnl
946AS_HELP_STRING(
947  [--enable-silent-rules],
948  [less verbose build output (undo: "make V=1")])
949AS_HELP_STRING(
950  [--disable-silent-rules],
951  [verbose build output (undo: "make V=0")])dnl
952])
953case $enable_silent_rules in @%:@ (((
954  yes) AM_DEFAULT_VERBOSITY=0;;
955   no) AM_DEFAULT_VERBOSITY=1;;
956    *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
957esac
958dnl
959dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
960dnl do not support nested variable expansions.
961dnl See automake bug#9928 and bug#10237.
962am_make=${MAKE-make}
963AC_CACHE_CHECK([whether $am_make supports nested variables],
964   [am_cv_make_support_nested_variables],
965   [if AS_ECHO([['TRUE=$(BAR$(V))
966BAR0=false
967BAR1=true
968V=1
969am__doit:
970        @$(TRUE)
971.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
972  am_cv_make_support_nested_variables=yes
973else
974  am_cv_make_support_nested_variables=no
975fi])
976if test $am_cv_make_support_nested_variables = yes; then
977  dnl Using '$V' instead of '$(V)' breaks IRIX make.
978  AM_V='$(V)'
979  AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
980else
981  AM_V=$AM_DEFAULT_VERBOSITY
982  AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
983fi
984AC_SUBST([AM_V])dnl
985AM_SUBST_NOTMAKE([AM_V])dnl
986AC_SUBST([AM_DEFAULT_V])dnl
987AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
988AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
989AM_BACKSLASH='\'
990AC_SUBST([AM_BACKSLASH])dnl
991_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
992])
993
994# Copyright (C) 2001-2018 Free Software Foundation, Inc.
995#
996# This file is free software; the Free Software Foundation
997# gives unlimited permission to copy and/or distribute it,
998# with or without modifications, as long as this notice is preserved.
999
1000# AM_PROG_INSTALL_STRIP
1001# ---------------------
1002# One issue with vendor 'install' (even GNU) is that you can't
1003# specify the program used to strip binaries.  This is especially
1004# annoying in cross-compiling environments, where the build's strip
1005# is unlikely to handle the host's binaries.
1006# Fortunately install-sh will honor a STRIPPROG variable, so we
1007# always use install-sh in "make install-strip", and initialize
1008# STRIPPROG with the value of the STRIP variable (set by the user).
1009AC_DEFUN([AM_PROG_INSTALL_STRIP],
1010[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
1011# Installed binaries are usually stripped using 'strip' when the user
1012# run "make install-strip".  However 'strip' might not be the right
1013# tool to use in cross-compilation environments, therefore Automake
1014# will honor the 'STRIP' environment variable to overrule this program.
1015dnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
1016if test "$cross_compiling" != no; then
1017  AC_CHECK_TOOL([STRIP], [strip], :)
1018fi
1019INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
1020AC_SUBST([INSTALL_STRIP_PROGRAM])])
1021
1022# Copyright (C) 2006-2018 Free Software Foundation, Inc.
1023#
1024# This file is free software; the Free Software Foundation
1025# gives unlimited permission to copy and/or distribute it,
1026# with or without modifications, as long as this notice is preserved.
1027
1028# _AM_SUBST_NOTMAKE(VARIABLE)
1029# ---------------------------
1030# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
1031# This macro is traced by Automake.
1032AC_DEFUN([_AM_SUBST_NOTMAKE])
1033
1034# AM_SUBST_NOTMAKE(VARIABLE)
1035# --------------------------
1036# Public sister of _AM_SUBST_NOTMAKE.
1037AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
1038
1039# Check how to create a tarball.                            -*- Autoconf -*-
1040
1041# Copyright (C) 2004-2018 Free Software Foundation, Inc.
1042#
1043# This file is free software; the Free Software Foundation
1044# gives unlimited permission to copy and/or distribute it,
1045# with or without modifications, as long as this notice is preserved.
1046
1047# _AM_PROG_TAR(FORMAT)
1048# --------------------
1049# Check how to create a tarball in format FORMAT.
1050# FORMAT should be one of 'v7', 'ustar', or 'pax'.
1051#
1052# Substitute a variable $(am__tar) that is a command
1053# writing to stdout a FORMAT-tarball containing the directory
1054# $tardir.
1055#     tardir=directory && $(am__tar) > result.tar
1056#
1057# Substitute a variable $(am__untar) that extract such
1058# a tarball read from stdin.
1059#     $(am__untar) < result.tar
1060#
1061AC_DEFUN([_AM_PROG_TAR],
1062[# Always define AMTAR for backward compatibility.  Yes, it's still used
1063# in the wild :-(  We should find a proper way to deprecate it ...
1064AC_SUBST([AMTAR], ['$${TAR-tar}'])
1065
1066# We'll loop over all known methods to create a tar archive until one works.
1067_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
1068
1069m4_if([$1], [v7],
1070  [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
1071
1072  [m4_case([$1],
1073    [ustar],
1074     [# The POSIX 1988 'ustar' format is defined with fixed-size fields.
1075      # There is notably a 21 bits limit for the UID and the GID.  In fact,
1076      # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
1077      # and bug#13588).
1078      am_max_uid=2097151 # 2^21 - 1
1079      am_max_gid=$am_max_uid
1080      # The $UID and $GID variables are not portable, so we need to resort
1081      # to the POSIX-mandated id(1) utility.  Errors in the 'id' calls
1082      # below are definitely unexpected, so allow the users to see them
1083      # (that is, avoid stderr redirection).
1084      am_uid=`id -u || echo unknown`
1085      am_gid=`id -g || echo unknown`
1086      AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
1087      if test $am_uid -le $am_max_uid; then
1088         AC_MSG_RESULT([yes])
1089      else
1090         AC_MSG_RESULT([no])
1091         _am_tools=none
1092      fi
1093      AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
1094      if test $am_gid -le $am_max_gid; then
1095         AC_MSG_RESULT([yes])
1096      else
1097        AC_MSG_RESULT([no])
1098        _am_tools=none
1099      fi],
1100
1101  [pax],
1102    [],
1103
1104  [m4_fatal([Unknown tar format])])
1105
1106  AC_MSG_CHECKING([how to create a $1 tar archive])
1107
1108  # Go ahead even if we have the value already cached.  We do so because we
1109  # need to set the values for the 'am__tar' and 'am__untar' variables.
1110  _am_tools=${am_cv_prog_tar_$1-$_am_tools}
1111
1112  for _am_tool in $_am_tools; do
1113    case $_am_tool in
1114    gnutar)
1115      for _am_tar in tar gnutar gtar; do
1116        AM_RUN_LOG([$_am_tar --version]) && break
1117      done
1118      am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
1119      am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
1120      am__untar="$_am_tar -xf -"
1121      ;;
1122    plaintar)
1123      # Must skip GNU tar: if it does not support --format= it doesn't create
1124      # ustar tarball either.
1125      (tar --version) >/dev/null 2>&1 && continue
1126      am__tar='tar chf - "$$tardir"'
1127      am__tar_='tar chf - "$tardir"'
1128      am__untar='tar xf -'
1129      ;;
1130    pax)
1131      am__tar='pax -L -x $1 -w "$$tardir"'
1132      am__tar_='pax -L -x $1 -w "$tardir"'
1133      am__untar='pax -r'
1134      ;;
1135    cpio)
1136      am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
1137      am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
1138      am__untar='cpio -i -H $1 -d'
1139      ;;
1140    none)
1141      am__tar=false
1142      am__tar_=false
1143      am__untar=false
1144      ;;
1145    esac
1146
1147    # If the value was cached, stop now.  We just wanted to have am__tar
1148    # and am__untar set.
1149    test -n "${am_cv_prog_tar_$1}" && break
1150
1151    # tar/untar a dummy directory, and stop if the command works.
1152    rm -rf conftest.dir
1153    mkdir conftest.dir
1154    echo GrepMe > conftest.dir/file
1155    AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
1156    rm -rf conftest.dir
1157    if test -s conftest.tar; then
1158      AM_RUN_LOG([$am__untar <conftest.tar])
1159      AM_RUN_LOG([cat conftest.dir/file])
1160      grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
1161    fi
1162  done
1163  rm -rf conftest.dir
1164
1165  AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
1166  AC_MSG_RESULT([$am_cv_prog_tar_$1])])
1167
1168AC_SUBST([am__tar])
1169AC_SUBST([am__untar])
1170]) # _AM_PROG_TAR
1171
1172# Copyright (C) 2013-2019 COIN-OR
1173# All Rights Reserved.
1174# This file is distributed under the Eclipse Public License.
1175#
1176# This file defines the common autoconf macros for COIN-OR
1177
1178# Check requirements
1179AC_PREREQ(2.69)
1180
1181#                           COIN_CHECK_VPATH                              #
1182
1183# This macro sets the variable coin_vpath_config to true if this is a VPATH
1184# configuration, otherwise it sets it to false. `VPATH' just means we're
1185# following best practices and not building in the source directory.
1186
1187AC_DEFUN([AC_COIN_CHECK_VPATH],
1188[
1189  AC_MSG_CHECKING(whether this is a VPATH configuration)
1190  if test `cd $srcdir ; pwd` != `pwd`; then
1191    coin_vpath_config=yes
1192  else
1193    coin_vpath_config=no
1194  fi
1195  AC_MSG_RESULT($coin_vpath_config)
1196])
1197
1198
1199#                            COIN_VPATH_LINK                              #
1200
1201# This macro ensures that the given files are available in a VPATH
1202# configuration, using the same name and relative path as in the source
1203# tree. It expects a white-space separated list of files.
1204# This macro is a small wrapper around AC_CONFIG_LINKS.
1205
1206AC_DEFUN([AC_COIN_VPATH_LINK],
1207[
1208  m4_foreach_w(linkvar,[$1],[AC_CONFIG_LINKS(linkvar:linkvar)])
1209])
1210
1211
1212#                          COIN_PROJECTVERSION                            #
1213
1214# This macro is used by COIN_INITIALIZE and sets up variables related to
1215# versioning numbers of the project.
1216#   COIN_PROJECTVERSION([project],[libtool_version_string])
1217#
1218# If libtool_version_string is given, then defines AC_COIN_LIBTOOL_VERSIONINFO,
1219# which will be picked up by AC_COIN_PROG_LIBTOOL to set libtools -version-info flag.
1220#
1221# Further, breaks up AC_PACKAGE_VERSION into AC_PACKAGE_VERSION_MAJOR,
1222# AC_PACKAGE_VERSION_MINOR, AC_PACKAGE_VERSION_RELEASE, assuming it has
1223# the form major.minor.release.
1224
1225AC_DEFUN([AC_COIN_PROJECTVERSION],
1226[
1227  # break up package version number in major.minor.release
1228  # AC_PACKAGE_VERSION is defined by AC_INIT
1229  m4_define(AC_PACKAGE_VERSION_MAJOR, m4_bregexp(AC_PACKAGE_VERSION, [^\([0-9]*\).*], [\1]))
1230  m4_define(AC_PACKAGE_VERSION_MINOR, m4_bregexp(AC_PACKAGE_VERSION, [^[0-9]*\.\([0-9]*\).*], [\1]))
1231  m4_define(AC_PACKAGE_VERSION_RELEASE, m4_bregexp(AC_PACKAGE_VERSION, [^[0-9]*\.[0-9]*\.\([0-9]*\).*], [\1]))
1232
1233  # ac-define AC_PACKAGE_VERSION macros, use 9999 for missing values
1234  m4_ifvaln([$1],
1235    [AC_DEFINE_UNQUOTED(m4_toupper($1_VERSION),"AC_PACKAGE_VERSION",[Version number of project])
1236     AC_DEFINE_UNQUOTED(m4_toupper($1_VERSION_MAJOR),
1237       m4_ifnblank(AC_PACKAGE_VERSION_MAJOR,AC_PACKAGE_VERSION_MAJOR,9999),
1238       [Major version number of project.])
1239     AC_DEFINE_UNQUOTED(m4_toupper($1_VERSION_MINOR),
1240       m4_ifnblank(AC_PACKAGE_VERSION_MINOR,AC_PACKAGE_VERSION_MINOR,9999),
1241       [Minor version number of project.])
1242     AC_DEFINE_UNQUOTED(m4_toupper($1_VERSION_RELEASE),
1243       m4_ifnblank(AC_PACKAGE_VERSION_RELEASE,AC_PACKAGE_VERSION_RELEASE,9999),
1244       [Release version number of project.])
1245    ])
1246
1247  m4_define(AC_COIN_LIBTOOL_VERSIONINFO,$2)
1248])
1249
1250
1251#                          COIN_ENABLE_MSVC                               #
1252
1253# This macro is invoked by any PROG_compiler macro to establish the
1254# --enable-msvc option.
1255# If unset but we have a Windows environment, look for some known C compilers
1256# and set enable_msvc if (i)cl is picked up (or has been set via CC by user)
1257
1258AC_DEFUN([AC_COIN_ENABLE_MSVC],
1259[
1260  AC_CANONICAL_BUILD
1261
1262  AC_ARG_ENABLE([msvc],
1263    [AC_HELP_STRING([--enable-msvc],
1264       [look for and allow only Intel/Microsoft compilers on MinGW/MSys/Cygwin])],
1265    [enable_msvc=$enableval],
1266    [enable_msvc=no
1267     case $build in
1268       *-mingw* | *-cygwin* | *-msys* )
1269         AC_CHECK_PROGS(CC, [gcc clang icl cl])
1270         case "$CC" in *cl ) enable_msvc=yes ;; esac
1271       ;;
1272     esac])
1273])
1274
1275
1276#                        COIN_COMPFLAGS_DEFAULTS                          #
1277
1278AC_DEFUN([AC_COIN_COMPFLAGS_DEFAULTS],
1279[
1280  # We want --enable-msvc setup and checked
1281  AC_REQUIRE([AC_COIN_ENABLE_MSVC])
1282
1283  AC_ARG_ENABLE([debug],
1284    [AC_HELP_STRING([--enable-debug],
1285       [build debugging symbols and turn off compiler optimization])],
1286    [enable_debug=$enableval],
1287    [enable_debug=no])
1288
1289# This macro should run before the compiler checks (doesn't seem to be
1290# sufficient for CFLAGS)
1291
1292  AC_BEFORE([$0],[AC_PROG_CXX])
1293  AC_BEFORE([$0],[AC_PROG_CC])
1294  AC_BEFORE([$0],[AC_PROG_F77])
1295  AC_BEFORE([$0],[AC_PROG_FC])
1296
1297# change default compiler flags
1298# - debugging enabled: enable debug symbols (-g/-Z7)
1299# - debugging disabled: disable debug code (-DNDEBUG); enable (more) optimization (-O2)
1300# - enable exceptions for (i)cl
1301
1302  if test "$enable_debug" = yes ; then
1303    if test "$enable_msvc" = yes ; then
1304      : ${FFLAGS:="-nologo -fpp -Z7 -MDd"}
1305      : ${FCFLAGS:="-nologo -fpp -Z7 -MDd"}
1306      : ${CFLAGS:="-nologo -Z7 -MDd"}
1307      : ${CXXFLAGS:="-nologo -EHs -Z7 -MDd"}
1308      : ${AR:="lib"}
1309      : ${AR_FLAGS:="-nologo -out:"}
1310    else
1311      : ${FFLAGS:="-g"}
1312      : ${FCFLAGS:="-g"}
1313      : ${CFLAGS:="-g"}
1314      : ${CXXFLAGS:="-g"}
1315    fi
1316  else
1317    if test "$enable_msvc" = yes ; then
1318      : ${FFLAGS:="-nologo -fpp -O2 -MD"}
1319      : ${FCFLAGS:="-nologo -fpp -O2 -MD"}
1320      : ${CFLAGS:="-nologo -DNDEBUG -O2 -MD"}
1321      : ${CXXFLAGS:="-nologo -EHs -DNDEBUG -O2 -MD"}
1322      : ${AR:="lib"}
1323      : ${AR_FLAGS:="-nologo -out:"}
1324    else
1325      : ${FFLAGS:="-O2"}
1326      : ${FCFLAGS:="-O2"}
1327      : ${CFLAGS:="-O2 -DNDEBUG"}
1328      : ${CXXFLAGS:="-O2 -DNDEBUG"}
1329    fi
1330  fi
1331])
1332
1333
1334#                            COIN_DEBUGLEVEL                              #
1335
1336# This macro makes the switches --with-prjct-verbosity and
1337# --with-prjct-checklevel available, which define the preprocessor macros
1338# COIN_PRJCT_VERBOSITY and COIN_PRJCT_CHECKLEVEL to the specified value
1339# (default is 0).
1340
1341AC_DEFUN([AC_COIN_DEBUGLEVEL],
1342[
1343  AC_ARG_WITH(m4_tolower($1)-verbosity,
1344    AC_HELP_STRING([--with-m4_tolower($1)-verbosity],[specify the debug verbosity level for project $1]),
1345    [if test "$withval" = yes; then withval=1 ; fi
1346     m4_tolower(coin_$1_verbosity)=$withval],
1347    [m4_tolower(coin_$1_verbosity)=0])
1348  AC_DEFINE_UNQUOTED(m4_toupper(COIN_$1_VERBOSITY),
1349                     m4_tolower($coin_$1_verbosity),
1350                     [Define to the debug verbosity level (0 is no output)])
1351
1352  AC_ARG_WITH(m4_tolower($1)-checklevel,
1353    AC_HELP_STRING([--with-m4_tolower($1)-checklevel],[specify the sanity check level for project $1]),
1354    [if test "$withval" = yes; then withval=1 ; fi
1355     m4_tolower(coin_$1_checklevel)=$withval],
1356    [m4_tolower(coin_$1_checklevel)=0])
1357  AC_DEFINE_UNQUOTED(m4_toupper(COIN_$1_CHECKLEVEL),
1358                     m4_tolower($coin_$1_checklevel),
1359                     [Define to the debug sanity check level (0 is no test)])
1360])
1361
1362
1363#                            COIN_INITIALIZE                               #
1364
1365# AC_COIN_INITIALIZE(name,version)
1366
1367# This macro does everything that is required in the early part of the
1368# configure script, such as defining a few variables.
1369#   name: project name
1370#   version (optional): the libtool library version (important for releases,
1371#     less so for stable or trunk).
1372
1373AC_DEFUN([AC_COIN_INITIALIZE],
1374[
1375# Enforce the required autoconf version
1376
1377  AC_PREREQ(2.69)
1378
1379# Set the project's version numbers
1380
1381  AC_COIN_PROJECTVERSION($1, $2)
1382
1383# A useful makefile conditional that is always false
1384
1385  AM_CONDITIONAL(ALWAYS_FALSE, false)
1386
1387# Change the default compiler flags. This needs to run before
1388# AC_CANONICAL_BUILD.
1389
1390  AC_REQUIRE([AC_COIN_COMPFLAGS_DEFAULTS])
1391
1392# Get the build and host types
1393
1394  AC_CANONICAL_BUILD
1395  AC_CANONICAL_HOST
1396
1397# libtool has some magic for host_os and build_os being mingw, but doesn't know about msys
1398
1399  if test $host_os = msys ; then
1400    host_os=mingw
1401    host=`echo $host | sed -e 's/msys/mingw/'`
1402  fi
1403
1404  if test $build_os = msys ; then
1405    build_os=mingw
1406    build=`echo $build | sed -e 's/msys/mingw/'`
1407  fi
1408
1409# Make silent build rules the default (https://www.gnu.org/software/automake/
1410# manual/html_node/Automake-Silent-Rules.html). Run before AM_INIT_AUTOMAKE,
1411# which will AC_REQUIRE it anyway.
1412
1413  AM_SILENT_RULES([yes])
1414
1415# Initialize automake
1416# - don't AC_DEFINE PACKAGE or VERSION (but there're still defined as shell
1417#   variables in configure, and as make variables).
1418# - disable dist target
1419# - enable all automake warnings
1420
1421  AM_INIT_AUTOMAKE([no-define no-dist -Wall])
1422
1423# Disable automatic rebuild of configure/Makefile. Use run_autotools.
1424
1425  AM_MAINTAINER_MODE
1426
1427# Figure out the path where libraries are installed.
1428# Unless the user specifies --prefix, prefix is set to NONE until the
1429# end of configuration, at which point it will be set to $ac_default_prefix.
1430# Unless the user specifies --exec-prefix, exec-prefix is set to NONE until
1431# the end of configuration, at which point it's set to '${prefix}'.
1432# Sheesh.  So do the expansion, then back it out.
1433  save_prefix=$prefix
1434  save_exec_prefix=$exec_prefix
1435  if test "x$prefix" = xNONE ; then
1436    prefix=$ac_default_prefix
1437  fi
1438  if test "x$exec_prefix" = xNONE ; then
1439    exec_prefix=$prefix
1440  fi
1441  expanded_libdir=$libdir
1442  while expr "$expanded_libdir" : '.*$.*' >/dev/null 2>&1 ; do
1443    eval expanded_libdir=$expanded_libdir
1444  done
1445  prefix=$save_prefix
1446  exec_prefix=$save_exec_prefix
1447])
1448
1449
1450#                           COIN_PROG_LIBTOOL                             #
1451
1452# Set up libtool parameters and create libtool
1453# (https://www.gnu.org/software/libtool/manual/html_node/LT_005fINIT.html)
1454# Pass no-win32-dll to omit passing win32-dll to LT_INIT
1455
1456AC_DEFUN([AC_COIN_PROG_LIBTOOL],
1457[
1458# Create libtool.
1459
1460  LT_INIT([disable-static pic-only m4_bmatch($1,no-win32-dll,,win32-dll)])
1461
1462# Patch libtool to circumvent some issues when using MSVC and MS lib.
1463# This needs to be run after config.status has created libtool.
1464# 1. Eliminate a trailing space after AR_FLAGS. Apparently necessary on
1465#    Windows when AR=lib.exe.
1466# 2. Patch libtool's func_extract_an_archive in case of $AR=lib. The current
1467#    libtool implementation assumes that it can do $AR x to extract an archive.
1468#    We replace this two-liner in func_extract_an_archive by replacing the first
1469#    line by something clunky that works with lib and making sure that the following
1470#    line is ignored (by finishing with ": \"). We completely disregard running the
1471#    command through func_show_eval and do not stop if it fails.
1472# 3. Relax check which libraries can be used when linking a DLL.
1473#    libtool's func_mode_link() would reject linking a .lib file when building a DLL,
1474#    even though this .lib file may just be the one that eventually loads a depending DLL,
1475#    e.g., mkl_core_dll.lib. Setting deplibs_check_method=pass_all will still print a
1476#    warning, but the .lib is still passed to the linker.
1477# 4. Ensure always_export_symbols=no if win32-dll. Even when we pass win32-dll,
1478#    libtool forces always_export_symbols=yes for --tag=CXX if using MS compiler.
1479#    This leads to a nm call that collects ALL C-functions from a library
1480#    and explicitly dll-exporting them, leading to warnings about duplicates
1481#    regarding those that are properly marked for dll-export in the source.
1482#
1483# Patch libtool also to circumvent some issues when using MinGW (Msys+GCC).
1484# 1. Relax check which libraries can be used when linking a DLL.
1485#    libtool's func_mode_link() would reject linking MinGW system libraries,
1486#    e.g., -lmingw32, when building a DLL, because it does not find this
1487#    library in the installation path, and then falls back to build only
1488#    static libraries. Setting deplibs_check_method=pass_all will avoid
1489#    this faulty check.
1490
1491  case "$AR" in
1492    *lib* | *LIB* )
1493      AC_CONFIG_COMMANDS([libtoolclpatch],
1494        [sed -e 's|AR_FLAGS |AR_FLAGS|g' \
1495             -e '/$AR x/s/.*/( cd $f_ex_an_ar_dir ; for f in `$AR -nologo -list "$f_ex_an_ar_oldlib" | tr "\\r" " "` ; do lib -nologo -extract:$f "$f_ex_an_ar_oldlib"; done ); : \\/g' \
1496             -e '/^deplibs_check_method/s/.*/deplibs_check_method="pass_all"/g' \
1497             m4_bmatch($1,no-win32-dll,,[-e 's|always_export_symbols=yes|always_export_symbols=no|g']) \
1498         libtool > libtool.tmp
1499         mv libtool.tmp libtool
1500         chmod 755 libtool])
1501      ;;
1502    * )
1503      case $build in
1504        *-mingw* )
1505          AC_CONFIG_COMMANDS([libtoolmingwpatch],
1506            [sed -e '/^deplibs_check_method/s/.*/deplibs_check_method="pass_all"/g' libtool > libtool.tmp
1507             mv libtool.tmp libtool
1508             chmod 755 libtool])
1509        ;;
1510      esac
1511      ;;
1512  esac
1513
1514  # Set up LT_LDFLAGS.
1515  AC_SUBST([LT_LDFLAGS])
1516
1517  # Use the libtool library info, if defined, otherwise use the project version info,
1518  # if a full major.minor.release number was available
1519  m4_ifnblank(AC_COIN_LIBTOOL_VERSIONINFO,
1520    LT_LDFLAGS="$LT_LDFLAGS -version-info AC_COIN_LIBTOOL_VERSIONINFO"
1521    AC_MSG_NOTICE(libtool version info: -version-info AC_COIN_LIBTOOL_VERSIONINFO),
1522    m4_ifnblank(AC_PACKAGE_VERSION_MAJOR,
1523     m4_ifnblank(AC_PACKAGE_VERSION_MINOR,
1524      m4_ifnblank(AC_PACKAGE_VERSION_RELEASE,
1525       LT_LDFLAGS="$LT_LDFLAGS -version-number AC_PACKAGE_VERSION_MAJOR:AC_PACKAGE_VERSION_MINOR:AC_PACKAGE_VERSION_RELEASE"
1526       AC_MSG_NOTICE(libtool version info: -version-number AC_PACKAGE_VERSION_MAJOR:AC_PACKAGE_VERSION_MINOR:AC_PACKAGE_VERSION_RELEASE)
1527    ))))
1528
1529  # shared libraries should have no undefined symbols
1530  # for Windows DLLs, it is mandatory to add this
1531  LT_LDFLAGS="$LT_LDFLAGS -no-undefined"
1532])
1533
1534
1535#                    COIN_PROG_CC   COIN_PROG_CXX                         #
1536
1537# Macros to find C and C++ compilers according to specified lists of compiler
1538# names. For Fortran compilers, see coin_fortran.m4.
1539
1540# Note that automake redefines AC_PROG_CC to invoke _AM_PROG_CC_C_O (an
1541# equivalent to AC_PROG_CC_C_O, plus wrap CC in the compile script if needed)
1542# and _AM_DEPENDENCIES (`dependency style'). Look in aclocal.m4 to see this.
1543
1544AC_DEFUN_ONCE([AC_COIN_PROG_CC],
1545[
1546  AC_REQUIRE([AC_COIN_ENABLE_MSVC])
1547
1548  # Setting up libtool with LT_INIT will AC_REQUIRE AC_PROG_CC, but we want
1549  # to invoke it from this macro first so that we can supply a parameter.
1550  AC_BEFORE([$0],[LT_INIT])
1551
1552  # If enable-msvc, then test for Intel (on Windows) and MS C compiler
1553  # explicitly and add the compile wrapper before AC_PROG_CC. The compile
1554  # wrapper works around issues related to finding MS link.exe. (Unix link.exe
1555  # occurs first in PATH, which causes compile and link checks to fail.) For
1556  # the same reason, set LD to use the compile wrapper. If CC remains unset
1557  # (neither icl or cl was found, and CC was not set by the user), stop with
1558  # an error.
1559
1560  if test $enable_msvc = yes ; then
1561    AC_CHECK_PROGS(CC, [icl cl])
1562    if test -n "$CC" ; then
1563      CC="$am_aux_dir/compile $CC"
1564      ac_cv_prog_CC="$CC"
1565      LD="$CC"
1566    else
1567      AC_MSG_ERROR([Neither MS nor Intel C compiler found in PATH and CC is unset.])
1568    fi
1569  fi
1570
1571  # Look for some C compiler and check that it works. If the user has set CC
1572  # or we found icl/cl above, this shouldn't overwrite CC. Unlike the macros
1573  # that establish C++ or Fortran compilers, PROG_CC also takes care of adding
1574  # the compile wrapper if needed.
1575
1576  AC_PROG_CC([gcc clang cc icc icl cl cc xlc xlc_r pgcc])
1577])
1578
1579# Note that automake redefines AC_PROG_CXX to invoke _AM_DEPENDENCIES
1580# (`dependency style') but does not add an equivalent for AC_PROG_CXX_C_O,
1581# hence we need an explicit call.
1582
1583AC_DEFUN_ONCE([AC_COIN_PROG_CXX],
1584[
1585  AC_REQUIRE([AC_COIN_ENABLE_MSVC])
1586  AC_REQUIRE([AC_COIN_PROG_CC])
1587
1588  # If enable-msvc, then test for Intel (on Windows) and MS C compiler
1589  # explicitly and add the compile wrapper before AC_PROG_CXX. The compile
1590  # wrapper works around issues related to finding MS link.exe. (Unix link.exe
1591  # occurs first in PATH, which causes compile and link checks to fail.) For
1592  # the same reason, set LD to use the compile wrapper. If CC remains unset
1593  # (neither icl or cl was found, and CC was not set by the user), stop with
1594  # an error.
1595
1596  if test $enable_msvc = yes ; then
1597    AC_CHECK_PROGS(CXX, [icl cl])
1598    if test -n "$CXX" ; then
1599      CXX="$am_aux_dir/compile $CXX"
1600      ac_cv_prog_CXX="$CXX"
1601      LD="$CXX"
1602    else
1603      AC_MSG_ERROR([Neither MS nor Intel C++ compiler found in PATH and CXX is unset.])
1604    fi
1605  fi
1606
1607  # Look for some C++ compiler and check that it works. If the user has set
1608  # CXX or we found icl/cl above, this shouldn't overwrite CXX.
1609
1610  AC_PROG_CXX([g++ clang++ c++ pgCC icpc gpp cxx cc++ icl cl FCC KCC RCC xlC_r aCC CC])
1611
1612  # If the compiler does not support -c -o, wrap it with the compile script.
1613
1614  AC_PROG_CXX_C_O
1615  if test $ac_cv_prog_cxx_c_o = no ; then
1616    CXX="$am_aux_dir/compile $CXX"
1617  fi
1618])
1619
1620#                             COIN_CXXLIBS                                #
1621
1622# Determine the C++ runtime libraries required for linking a C++ library
1623# with a Fortran or C compiler.  The result is available in CXXLIBS.
1624
1625AC_DEFUN([AC_COIN_CXXLIBS],
1626[AC_REQUIRE([AC_COIN_PROG_CXX])dnl
1627AC_LANG_PUSH(C++)
1628AC_ARG_VAR(CXXLIBS,[Libraries necessary for linking C++ code with non-C++ compiler])
1629if test -z "$CXXLIBS"; then
1630  if test "$GXX" = "yes"; then
1631    case "$CXX" in
1632      icpc* | */icpc*)
1633        CXXLIBS="-lstdc++"
1634        ;;
1635      *)
1636        # clang uses libc++ as the default standard C++ library, not libstdc++
1637        # this test is supposed to recognize whether the compiler is clang
1638        #
1639        AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <ciso646>]], [[
1640#ifndef _LIBCPP_VERSION
1641       choke me
1642#endif
1643          ]])],
1644          [CXXLIBS="-lc++"],
1645          [CXXLIBS="-lstdc++ -lm"])  dnl The -lm works around an issue with libtool removing -lm from the dependency_libs in an .la file (look for postdeps= in libtool)
1646        ;;
1647    esac
1648  else
1649    case $build in
1650     *-mingw* | *-cygwin* | *-msys* )
1651       if test "$enable_msvc" = yes ; then
1652         CXXLIBS=nothing
1653       fi;;
1654     *-linux-*)
1655      case "$CXX" in
1656      icpc* | */icpc*)
1657        CXXLIBS="-lstdc++"
1658             ;;
1659      pgCC* | */pgCC*)
1660        CXXLIBS="-lstd -lC -lc"
1661             ;;
1662      esac;;
1663    *-ibm-*)
1664      CXXLIBS="-lC -lc"
1665      ;;
1666    *-hp-*)
1667      CXXLIBS="-L/opt/aCC/lib -l++ -lstd_v2 -lCsup_v2 -lm -lcl -lc"
1668      ;;
1669    *-*-solaris*)
1670      CXXLIBS="-lCstd -lCrun"
1671    esac
1672  fi
1673fi
1674if test -z "$CXXLIBS"; then
1675  AC_MSG_WARN([Could not automatically determine CXXLIBS (C++ link libraries; necessary if main program is in Fortran or C).])
1676else
1677  AC_MSG_NOTICE([Assuming that CXXLIBS is \"$CXXLIBS\".])
1678fi
1679if test x"$CXXLIBS" = xnothing; then
1680  CXXLIBS=
1681fi
1682AC_LANG_POP(C++)
1683]) # AC_COIN_CXXLIBS
1684
1685
1686#                            COIN_RPATH_FLAGS                             #
1687
1688# This macro, in case shared objects are used, defines a variable
1689# RPATH_FLAGS that can be used by the linker to hardwire the library
1690# search path for the given directories.  This is useful for example
1691# Makefiles
1692
1693AC_DEFUN([AC_COIN_RPATH_FLAGS],
1694[RPATH_FLAGS=
1695
1696if test $enable_shared = yes; then
1697  case $build in
1698    *-linux-*)
1699      if test "$GCC" = "yes"; then
1700        RPATH_FLAGS=
1701        for dir in $1; do
1702          RPATH_FLAGS="$RPATH_FLAGS -Wl,--rpath -Wl,$dir"
1703        done
1704      fi ;;
1705    *-darwin*)
1706        RPATH_FLAGS=nothing ;;
1707    *-ibm-*)
1708      case "$CC" in
1709      xlc* | */xlc* | mpxlc* | */mpxlc*)
1710        RPATH_FLAGS=nothing ;;
1711      esac ;;
1712    *-hp-*)
1713        RPATH_FLAGS=nothing ;;
1714    *-mingw* | *-msys* )
1715        RPATH_FLAGS=nothing ;;
1716    *-*-solaris*)
1717        RPATH_FLAGS=
1718        for dir in $1; do
1719          RPATH_FLAGS="$RPATH_FLAGS -R$dir"
1720        done
1721  esac
1722
1723  if test "$RPATH_FLAGS" = ""; then
1724    AC_MSG_WARN([Could not automatically determine how to tell the linker about automatic inclusion of the path for shared libraries.  The test examples might not work if you link against shared objects.  You will need to set the LD_LIBRARY_PATH, DYLP_LIBRARY_PATH, or LIBDIR variable manually.])
1725  fi
1726  if test "$RPATH_FLAGS" = "nothing"; then
1727    RPATH_FLAGS=
1728  fi
1729fi
1730
1731AC_SUBST(RPATH_FLAGS)
1732]) # AC_COIN_RPATH_FLAGS
1733
1734
1735#                   COIN_DEFINENAMEMANGLING                               #
1736
1737# COIN_DEFINENAMEMANGLING (name,namemangling)
1738# -------------------------------------------------------------------------
1739# Determine C/C++ name mangling to allow linking with header-less libraries.
1740#  name ($1) an identifier to prefix C macro names
1741#  namemangling ($2) the name mangling scheme as determined by COIN_NAMEMANGLING
1742#                    or COIN_TRY_LINK
1743#
1744# Defines the C macros $1_FUNC and $1_FUNC_ (in uppercase) to be used for
1745# declaring functions from library $1.
1746
1747# -------------------------------------------------------------------------
1748
1749AC_DEFUN([AC_COIN_DEFINENAMEMANGLING],
1750[
1751  AH_TEMPLATE($1_FUNC, [Define to a macro mangling the given C identifier (in lower and upper case).])
1752  AH_TEMPLATE($1_FUNC_, [As $1_FUNC, but for C identifiers containing underscores.])
1753  case "$2" in
1754   "lower case, no underscore, no extra underscore")
1755      AC_DEFINE($1_FUNC[(name,NAME)],  [name])
1756      AC_DEFINE($1_FUNC_[(name,NAME)], [name]) ;;
1757   "lower case, no underscore, extra underscore")
1758      AC_DEFINE($1_FUNC[(name,NAME)],  [name])
1759      AC_DEFINE($1_FUNC_[(name,NAME)], [name [##] _]) ;;
1760   "lower case, underscore, no extra underscore")
1761      AC_DEFINE($1_FUNC[(name,NAME)],  [name [##] _])
1762      AC_DEFINE($1_FUNC_[(name,NAME)], [name [##] _]) ;;
1763   "lower case, underscore, extra underscore")
1764      AC_DEFINE($1_FUNC[(name,NAME)],  [name [##] _])
1765      AC_DEFINE($1_FUNC_[(name,NAME)], [name [##] __]) ;;
1766   "upper case, no underscore, no extra underscore")
1767      AC_DEFINE($1_FUNC[(name,NAME)],  [NAME])
1768      AC_DEFINE($1_FUNC_[(name,NAME)], [NAME]) ;;
1769   "upper case, no underscore, extra underscore")
1770      AC_DEFINE($1_FUNC[(name,NAME)],  [NAME])
1771      AC_DEFINE($1_FUNC_[(name,NAME)], [NAME [##] _]) ;;
1772   "upper case, underscore, no extra underscore")
1773      AC_DEFINE($1_FUNC[(name,NAME)],  [NAME [##] _])
1774      AC_DEFINE($1_FUNC_[(name,NAME)], [NAME [##] _]) ;;
1775   "upper case, underscore, extra underscore")
1776      AC_DEFINE($1_FUNC[(name,NAME)],  [NAME [##] _])
1777      AC_DEFINE($1_FUNC_[(name,NAME)], [NAME [##] __]) ;;
1778   *)
1779      AC_MSG_WARN([Unsupported or unknown name-mangling scheme: $2])
1780      ;;
1781  esac
1782])
1783
1784
1785#                   COIN_NAMEMANGLING                                     #
1786
1787# COIN_NAMEMANGLING (lib,func,lflags)
1788# -------------------------------------------------------------------------
1789# Determine C/C++ name mangling to allow linking with header-less libraries.
1790#  lib ($1) a library we're attempting to link to
1791#  func ($2) a function within that library
1792#  lflags ($3) flags to link to library, defaults to -l$1 if not given
1793#
1794# Defines the C macros $1_FUNC and $1_FUNC_ (in uppercase) to be used for
1795# declaring functions from library $1.
1796
1797# Ideally, the function name will contain an embedded underscore but the
1798# macro doesn't require that because typical COIN-OR use cases (BLAS, LAPACK)
1799# don't have any names with embedded underscores. The default is `no extra
1800# underscore' (because this is tested first and will succeed if the name
1801# has no embedded underscore).
1802
1803# The possibilities amount to
1804# { lower / upper case } X (no) trailing underscore X (no) extra underscore
1805# where the extra underscore is applied to name with an embedded underscore.
1806# -------------------------------------------------------------------------
1807
1808AC_DEFUN([AC_COIN_NAMEMANGLING],
1809[
1810  AC_CACHE_CHECK(
1811    [$1 name mangling scheme],
1812    [m4_tolower(ac_cv_$1_namemangling)],
1813    [ac_save_LIBS=$LIBS
1814     m4_ifblank([$3], [LIBS="-l$1"], [LIBS="$3"])
1815     for ac_case in "lower case" "upper case" ; do
1816       for ac_trail in "underscore" "no underscore" ; do
1817         for ac_extra in "no extra underscore" "extra underscore" ; do
1818           m4_tolower(ac_cv_$1_namemangling)="${ac_case}, ${ac_trail}, ${ac_extra}"
1819           # AC_MSG_NOTICE([Attempting link for m4_tolower(ac_cv_$1_namemangling)])
1820           case $ac_case in
1821             "lower case")
1822               ac_name=m4_tolower($2)
1823               ;;
1824             "upper case")
1825               ac_name=m4_toupper($2)
1826               ;;
1827           esac
1828           if test "$ac_trail" = underscore ; then
1829             ac_name=${ac_name}_
1830           fi
1831           # AC_MSG_CHECKING([$2 -> $ac_name])
1832           AC_LINK_IFELSE(
1833             [AC_LANG_PROGRAM(
1834                [#ifdef __cplusplus
1835                  extern "C"
1836                 #endif
1837                 void $ac_name();],
1838                [$ac_name()])],
1839             [ac_success=yes],
1840             [ac_success=no])
1841           # AC_MSG_RESULT([$result])
1842           if test $ac_success = yes ; then
1843             break 3
1844           fi
1845         done
1846       done
1847     done
1848     if test "$ac_success" = "no" ; then
1849       m4_tolower(ac_cv_$1_namemangling)=unknown
1850     fi
1851     LIBS=$ac_save_LIBS])
1852
1853  # setup the m4_toupper($1)_FUNC and m4_toupper($1)_FUNC_ macros
1854  AC_COIN_DEFINENAMEMANGLING([m4_toupper($1)],[$m4_tolower(ac_cv_$1_namemangling)])
1855
1856  # AC_MSG_NOTICE([Done COIN_NAMEMANGLING])
1857])
1858
1859
1860#                            COIN_TRY_LINK                                #
1861
1862# This is a helper macro for checking if a library can be linked based on
1863# a function name only.
1864#   COIN_TRY_LINK(func,lflags,pcfiles,action-if-success,action-if-failed)
1865#  func ($1) the name of the function to try to link
1866#  lflags ($2) linker flags to use
1867#  pcfiles ($3) pc files to query for additional linker flags
1868#  action-if-success ($4) commands to execute if any linking was successful
1869#  action-if-failed ($5) commands to execute if no linking was successful
1870#
1871# The macro tries different name mangling schemes and expands into
1872# action-if-success for the first one that succeeds.
1873# It sets variable func_namemangling according to the found name mangling
1874# scheme, which can be used as input for COIN_DEFINENAMEMANGLING.
1875
1876AC_DEFUN([AC_COIN_TRY_LINK],
1877[
1878  # setup LIBS by adding $2 and those from $3
1879  ac_save_LIBS="$LIBS"
1880  m4_ifnblank([$2], [LIBS="$2 $LIBS"])
1881  m4_ifnblank([$3],
1882    [if test -n "$3" ; then
1883      AC_REQUIRE([AC_COIN_HAS_PKGCONFIG])
1884      temp_LFLAGS=`PKG_CONFIG_PATH="$COIN_PKG_CONFIG_PATH" $PKG_CONFIG --libs $3`
1885      LIBS="$temp_LFLAGS $LIBS"
1886    fi])
1887
1888  $1_namemangling=unknown
1889
1890  # FIXME we had "extra underscore" as additional option for ac_extra
1891  #   but since there is no use for ac_extra below, was there any use for it?
1892  for ac_extra in "no extra underscore" ; do
1893    for ac_case in "lower case" "upper case" ; do
1894      for ac_trail in "underscore" "no underscore" ; do
1895        #AC_MSG_NOTICE([Attempting link for ${ac_case}, ${ac_trail}, ${ac_extra}])
1896        case $ac_case in
1897          "lower case")
1898            ac_name=m4_tolower($1)
1899            ;;
1900          "upper case")
1901            ac_name=m4_toupper($1)
1902            ;;
1903        esac
1904        if test "$ac_trail" = underscore ; then
1905          ac_name=${ac_name}_
1906        fi
1907        AC_MSG_CHECKING([for function $ac_name in $LIBS])
1908        AC_LINK_IFELSE(
1909          [AC_LANG_PROGRAM(
1910            [#ifdef __cplusplus
1911             extern "C"
1912             #endif
1913             void $ac_name();],
1914            [$ac_name()])],
1915          [$1_namemangling="${ac_case}, ${ac_trail}, ${ac_extra}"
1916           ac_success=yes],
1917          [ac_success=no])
1918        AC_MSG_RESULT([$ac_success])
1919        if test $ac_success = yes ; then
1920          break 3
1921        fi
1922      done
1923    done
1924  done
1925  LIBS=$ac_save_LIBS
1926
1927  if test $ac_success = yes ; then
1928    m4_ifblank([$4],[:],[$4])
1929    m4_ifnblank([$5],[else $5])
1930  fi
1931])
1932
1933
1934#                           COIN_HAS_PKGCONFIG                            #
1935
1936# Check whether a suitable pkg-config tool is available.  If so, then the
1937# variable PKGCONFIG is set to its path, otherwise it is set to "".  Further,
1938# the AM_CONDITIONAL COIN_HAS_PKGCONFIG is set and PKGCONFIG is AC_SUBST'ed.
1939# Finally, the search path for .pc files is assembled from the value of
1940# $prefix and $PKG_CONFIG_PATH in a variable COIN_PKG_CONFIG_PATH, which is
1941# also AC_SUBST'ed.
1942# The default minimal version number is 0.16.0 because COIN-OR .pc files
1943# include a URL field which breaks pkg-config version <= 0.15. A more recent
1944# minimum version can be specified as a parameter.
1945# Portions of the macro body are derived from macros in pkg.m4.
1946
1947AC_DEFUN([AC_COIN_HAS_PKGCONFIG],
1948[
1949  AC_ARG_VAR([PKG_CONFIG],[path to pkg-config utility])
1950
1951# pkgconf is the up-and-coming thing, replacing pkg-config, so prefer it.
1952# The next stanza is a modified version of PKG_PROG_PKG_CONFIG from pkg.m4.
1953
1954  if test -z "$PKG_CONFIG" ; then
1955   AC_CHECK_TOOLS([PKG_CONFIG],[pkgconf pkg-config])
1956  fi
1957  if test -n "$PKG_CONFIG" ; then
1958    pkg_min_version=m4_default([$1],[0.16.0])
1959    AC_MSG_CHECKING([$PKG_CONFIG is at least version $pkg_min_version])
1960    if $PKG_CONFIG --atleast-pkgconfig-version $pkg_min_version ; then
1961      pkg_version=`$PKG_CONFIG --version`
1962      AC_MSG_RESULT([yes: $pkg_version])
1963    else
1964     AC_MSG_RESULT([no])
1965     PKG_CONFIG=""
1966   fi
1967  fi
1968
1969# Check if PKG_CONFIG supports the short-errors flag. The next stanza is a
1970# modified version of _PKG_SHORT_ERRORS_SUPPORTED from pkg.m4.
1971
1972  if test -n "$PKG_CONFIG" &&
1973     $PKG_CONFIG --atleast-pkgconfig-version 0.20 ; then
1974    pkg_short_errors=" --short-errors "
1975  else
1976    pkg_short_errors=""
1977  fi
1978
1979# Create a makefile variable and conditional.
1980
1981  AM_CONDITIONAL([COIN_HAS_PKGCONFIG], [test -n "$PKG_CONFIG"])
1982  AC_SUBST(PKG_CONFIG)
1983
1984# Assemble a PKG_CONFIG search path that will include the installation
1985# directory for .pc files for COIN packages.  Coin .pc files are installed in
1986# ${libdir}/pkgconfig and COIN_INITIALIZE takes care of setting up
1987# $expanded_libdir based on $libdir. Of course,
1988# this whole house of cards balances on the shaky assumption that the user is
1989# sane and has installed all packages in the same place and does not change
1990# that place when make executes. If not, well, it's their responsibility to
1991# augment PKG_CONFIG_PATH in the environment.
1992
1993  COIN_PKG_CONFIG_PATH="${PKG_CONFIG_PATH}"
1994  AC_SUBST(COIN_PKG_CONFIG_PATH)
1995
1996  COIN_PKG_CONFIG_PATH="${expanded_libdir}/pkgconfig:${COIN_PKG_CONFIG_PATH}"
1997  AC_MSG_NOTICE([$PKG_CONFIG path is "$COIN_PKG_CONFIG_PATH"])
1998
1999])  # COIN_HAS_PKGCONFIG
2000
2001
2002#                      COIN_CHK_MOD_EXISTS                                #
2003
2004# COIN_CHK_MOD_EXISTS(MODULE, PACKAGES,
2005#                     [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
2006
2007# Check to see whether a particular module (set of packages) exists. Derived
2008# from PKG_CHECK_MODULES() from pkg.m4, but set only the variables $1_VERSIONS
2009# and $1_PKG_ERRORS. PACKAGES ($2) is a space-separated list of .pc file names
2010# (without the .pc suffix). Note that variable values will have one line per
2011# package (embedded newlines) if more than one package is given in PACKAGES.
2012
2013AC_DEFUN([AC_COIN_CHK_MOD_EXISTS],
2014[
2015  AC_REQUIRE([AC_COIN_HAS_PKGCONFIG])
2016
2017  if test -n "$PKG_CONFIG" ; then
2018    if PKG_CONFIG_PATH="$COIN_PKG_CONFIG_PATH" $PKG_CONFIG --exists "$2" ; then
2019      m4_toupper($1)_VERSIONS=`PKG_CONFIG_PATH="$COIN_PKG_CONFIG_PATH" $PKG_CONFIG --modversion "$2" 2>/dev/null | tr '\n' ' '`
2020      $3
2021    else
2022      m4_toupper($1)_PKG_ERRORS=`PKG_CONFIG_PATH="$COIN_PKG_CONFIG_PATH" $PKG_CONFIG $pkg_short_errors --errors-to-stdout --print-errors "$2"`
2023      $4
2024    fi
2025  else
2026    AC_MSG_ERROR("Cannot check for existence of module $1 without pkgconf")
2027  fi
2028])
2029
2030
2031#                          COIN_CHK_HERE                                  #
2032
2033# COIN_CHK_HERE([prim],[client packages],[pcfile])
2034
2035# Augment the _LFLAGS, _CFLAGS, and _PCFILES variables of the client
2036# packages with the values from PRIM_LFLAGS_PUB, PRIM_CFLAGS_PUB, and
2037# PRIM_PCFILES_PUB. This macro is intended for the case where a single project
2038# builds several objects and one object includes another. For example,
2039# the various OsiXxxLib solvers, which depend on OsiLib. We can't consult
2040# osi.pc (it's not installed yet) but the relevant variables are ready at
2041# hand. The name of prim is often different from the name of the .pc file
2042# ($3), hence the separate parameter. If $3 is not given, it defaults to
2043# tolower($1).
2044
2045# This macro should be called after FINALIZE_FLAGS is invoked for the
2046# client packages, for two reasons: First, COIN packages tend to use
2047# .pc files, so we're probably adding a package to _PCFILES that isn't yet
2048# installed. Also, FINALIZE_FLAGS will have accessed the .pc files already
2049# in _PCFILES and expanded them into _LIBS and _CFLAGS, saving the original
2050# _LIBS and _CFLAGS in _LIBS_NOPC and _CFLAGS_NOPC.
2051
2052AC_DEFUN([AC_COIN_CHK_HERE],
2053[
2054
2055# Make sure the necessary variables exist for each client package.
2056
2057  m4_foreach_w([myvar],[$2],
2058    [AC_SUBST(m4_toupper(myvar)_LFLAGS)
2059     AC_SUBST(m4_toupper(myvar)_CFLAGS)
2060     AC_SUBST(m4_toupper(myvar)_PCFILES)
2061    ])
2062
2063# Add the .pc file and augment LFLAGS and CFLAGS.
2064
2065    m4_foreach_w([myvar],[$2],
2066      [if test -n "$m4_toupper(myvar)_PCFILES" ; then m4_toupper(myvar)_PCFILES="$m4_toupper(myvar)_PCFILES m4_default($3,m4_tolower($1))" ; fi
2067       m4_toupper(myvar)_LFLAGS="$m4_toupper(myvar)_LFLAGS $m4_toupper($1)_LFLAGS"
2068       m4_toupper(myvar)_CFLAGS="$m4_toupper(myvar)_CFLAGS $m4_toupper($1)_CFLAGS"
2069
2070# Define BUILDTOOLS_DEBUG to enable debugging output
2071
2072       if test "$BUILDTOOLS_DEBUG" = 1 ; then
2073         AC_MSG_NOTICE([CHK_HERE adding $1 to myvar:])
2074         AC_MSG_NOTICE([m4_toupper(myvar)_PCFILES: "${m4_toupper(myvar)_PCFILES}"])
2075         AC_MSG_NOTICE([m4_toupper(myvar)_LFLAGS: "${m4_toupper(myvar)_LFLAGS}"])
2076         AC_MSG_NOTICE([m4_toupper(myvar)_CFLAGS: "${m4_toupper(myvar)_CFLAGS}"])
2077       fi
2078      ])
2079
2080])   # COIN_CHK_HERE
2081
2082
2083#                      COIN_DEF_PRIM_ARGS                                 #
2084
2085# COIN_DEF_PRIM_ARGS([prim],[base],[lflags],[cflags],[dflags],[build])
2086
2087# This is a utility macro to handle the standard arguments that COIN-OR
2088# configuration files supply for a component (package or library):
2089#   --with-prim: use primitive (yes / no / special)
2090#   --with-prim-lflags: linker flags for the primitive
2091#   --with-prim-cflags: preprocessor & compiler flags for the primitive
2092#   --with-prim-data: data directory for the primitive
2093# These arguments allow the user to override default macro behaviour from the
2094# configure command line.
2095# The string prim, lower-cased, is used in the flag name.
2096# The parameters base, lflags, cflags, and dflags have the value yes or no and
2097# determine whether a --with option will be defined for prim, lflags, cflags,
2098# and data, respectively. They must be literals, as the macro uses them to cut
2099# out unused options. To use the results, construct the name of the shell
2100# variable as specified in the autoconf doc'n for ARG_WITH.
2101
2102# Setting the final parameter to 'build' will cause the phrase "'build' will
2103# look for a COIN ThirdParty package" to be inserted in the documentation for
2104# --with-prim.
2105
2106AC_DEFUN([AC_COIN_DEF_PRIM_ARGS],
2107[
2108  m4_define([extraHelp],[
2109    m4_normalize(Use $1. [If an argument is given,]
2110      ['yes' is equivalent to --with-m4_tolower($1),]
2111      m4_case($6,build,
2112      ['no' is equivalent to --without-m4_tolower($1)[,]
2113       'build' will look for a COIN ThirdParty package.],
2114      ['no' is equivalent to --without-m4_tolower($1).])
2115      m4_case($3$4$5,nonono,,
2116        nonoyes,
2117        Any other argument is applied as for --with-m4_tolower($1)-data,
2118        noyesno,
2119        Any other argument is applied as for --with-m4_tolower($1)-cflags,
2120        noyesyes,
2121        Any other argument is applied as for --with-m4_tolower($1)-cflags,
2122        Any other argument is applied as for --with-m4_tolower($1)-lflags))])
2123
2124  m4_if($2,yes,
2125    [AC_ARG_WITH([m4_tolower($1)],
2126       AS_HELP_STRING([--with-m4_tolower($1)],extraHelp))])
2127
2128  m4_if($3,yes,
2129    [AC_ARG_WITH([m4_tolower($1)-lflags],
2130       AS_HELP_STRING([--with-m4_tolower($1)-lflags],
2131         [Linker flags for $1 appropriate for your environment.
2132          (Most often, -l specs for libraries.)]))])
2133
2134  m4_if($4,yes,
2135    [AC_ARG_WITH([m4_tolower($1)-cflags],
2136       AS_HELP_STRING([--with-m4_tolower($1)-cflags],
2137         [Compiler flags for $1 appropriate for your environment.
2138          (Most often, -I specs for header file directories.)]))])
2139
2140  m4_if($5,yes,
2141    [AC_ARG_WITH([m4_tolower($1)-data],
2142       AS_HELP_STRING([--with-m4_tolower($1)-data],
2143         [A data directory specification for $1 appropriate for your
2144          environment.]))])
2145])   # COIN_DEF_PRIM_ARGS
2146
2147
2148#                     COIN_FIND_PRIM_PKG                                  #
2149# COIN_FIND_PRIM_PKG([prim],[.pc file name],[default action],[cmdlineopts])
2150
2151# Determine whether we can use primary package prim ($1) and assemble
2152# information on the required library flags (prim_lflags), compiler flags
2153# (prim_cflags), and data directories (prim_data) as specified by cmdlineopts.
2154
2155# cmdlineopts ($4) specifies the set of configure command line options
2156# defined and processed: 'nodata' produces --with-prim, --with-prim-libs, and
2157# --with-prim-cflags; 'dataonly' produces --with-prim and --with-prim-data;
2158# anything else ('all' works well) produces all four command line
2159# options. Shell code produced by the macro is tailored based on
2160# cmdlineopts. `nodata' is the default.
2161
2162# --with-prim is interpreted as follows: --with-prim=no is equivalent to
2163# --without-prim. Any of --with-prim, --with-prim=yes, or --with-prim=build,
2164# cause the macro to look for a .pc file. Any other value is taken as
2165# equivalent to --with-prim-data=value (dataonly) or --with-prim-lflags=value
2166# (anything else).
2167
2168# The algorithm first checks for a user-specified value of --with-prim;
2169# if this is no, prim is skipped. Next, it looks for user specified values
2170# given with command line parameters --with-prim-lflags, --with-prim-cflags,
2171# and --with-prim-data. If none of these are specified, it will look for a
2172# .pc file for prim using PKG_CONFIG.
2173
2174# Default action ($3) (no, yes, build) is the default action if the user
2175# offers no guidance via command line parameters. The (hardwired) default is
2176# yes.
2177
2178# If no .pc file names are specified, the macro will look for prim.pc if the
2179# default is yes, coinprim.pc if the default is build.  If a .pc file name
2180# ($2) is specified, but is not "skip", it overrides the macro defaults.
2181# If $2=skip, then checks for .pc files are skipped.
2182
2183# Note that for the
2184# majority of COIN packages, you should not specify `build' as .pc files
2185# for most COIN packages are simply the package name (e.g., clp.pc). For
2186# ThirdParty packages, this works (e.g., coinglpk.pc).
2187
2188# The macro doesn't test that the specified values actually work. This is
2189# deliberate.  There's no guarantee that user-specified libraries and/or
2190# directories actually exist yet. The same possibility exists for values
2191# returned when pkgconf checks the .pc file.
2192
2193AC_DEFUN([AC_COIN_FIND_PRIM_PKG],
2194[
2195  AC_REQUIRE([AC_COIN_HAS_PKGCONFIG])
2196
2197  dflt_action=m4_default([$3],[yes])
2198
2199# Initialize variables for the primary package.
2200
2201  m4_tolower(coin_has_$1)=noInfo
2202  m4_tolower($1_lflags)=
2203  m4_tolower($1_cflags)=
2204  m4_tolower($1_data)=
2205  m4_tolower($1_pcfiles)=
2206
2207# --with-prim is always present. If the client specified dataonly, its value
2208# is assigned to prim_data.
2209
2210  withval=$m4_tolower(with_$1)
2211  if test -n "$withval" ; then
2212    case "$withval" in
2213      no )
2214        m4_tolower(coin_has_$1)=skipping
2215        ;;
2216      yes )
2217        m4_tolower(coin_has_$1)=requested
2218        ;;
2219      build )
2220        m4_tolower(coin_has_$1)=build
2221        ;;
2222      * )
2223        m4_tolower(coin_has_$1)=yes
2224        m4_if(m4_default($4,nodata),dataonly,
2225          [m4_tolower($1_data)=$withval],
2226          [m4_tolower($1_lflags)=$withval])
2227        ;;
2228    esac
2229  fi
2230
2231# --with-prim-libs and --with-prim-cflags are present unless the client
2232# specified dataonly. Specifying --with-prim=no overrides the individual
2233# options for libs and cflags.
2234
2235  m4_if(m4_default($4,nodata),dataonly,[],
2236    [if test "$m4_tolower(coin_has_$1)" != skipping ; then
2237       withval=$m4_tolower(with_$1_lflags)
2238       if test -n "$withval" ; then
2239         case "$withval" in
2240           build | no | yes )
2241             AC_MSG_ERROR(["$withval" is not valid here; please specify linker flags appropriate for your environment.])
2242             ;;
2243           * )
2244             m4_tolower(coin_has_$1)=yes
2245             m4_tolower($1_lflags)=$withval
2246             ;;
2247         esac
2248       fi
2249
2250       withval=$m4_tolower(with_$1_cflags)
2251       if test -n "$withval" ; then
2252         case "$withval" in
2253           build | no | yes )
2254             AC_MSG_ERROR(["$withval" is not valid here; please specify compiler flags appropriate for your environment.])
2255             ;;
2256           * )
2257             m4_tolower(coin_has_$1)=yes
2258             m4_tolower($1_cflags)="$withval"
2259             ;;
2260         esac
2261       fi
2262     fi])
2263
2264# --with-prim-data will be present unless the client specified nodata.
2265# Specifying --with-prim=no overrides the individual option for data.
2266
2267  m4_if(m4_default($4,nodata),nodata,[],
2268    [if test "$m4_tolower(coin_has_$1)" != skipping ; then
2269       withval=$m4_tolower(with_$1_data)
2270       if test -n "$withval" ; then
2271         case "$withval" in
2272           build | no | yes )
2273             AC_MSG_ERROR(["$withval" is not valid here; please give a data directory specification appropriate for your environment.])
2274             ;;
2275           * )
2276             m4_tolower(coin_has_$1)=yes
2277             m4_tolower($1_data)="$withval"
2278             ;;
2279         esac
2280       fi
2281     fi])
2282
2283# At this point, coin_has_prim can be one of noInfo (no user options
2284# specified), skipping (user said no), requested or build (user said yes
2285# or build and gave no further guidance), or yes (user specified one or
2286# more --with-prim options). If we're already at yes or skipping, we're
2287# done looking.
2288
2289# If there are no user options (noInfo) and the default is no, we're skipping.
2290# Otherwise, the default must be yes or build; consider the package requested.
2291# A default action we don't recognise defaults to yes.
2292
2293  if test "$m4_tolower(coin_has_$1)" = noInfo ; then
2294    case $dflt_action in
2295      no )
2296        m4_tolower(coin_has_$1)=skipping
2297        ;;
2298      build )
2299        m4_tolower(coin_has_$1)=build
2300        ;;
2301      * )
2302        m4_tolower(coin_has_$1)=requested
2303        ;;
2304    esac
2305  fi
2306
2307# Now coin_has_prim can be one of skipping, yes, requested, or build. For
2308# requested or build, try pkgconf, if it's available. If it's not available,
2309# well, hope that the user knows their system and prim can be used with no
2310# additional flags.
2311
2312  case $m4_tolower(coin_has_$1) in
2313    requested | build )
2314      if test -n "$PKG_CONFIG" -a "$2" != skip ; then
2315        m4_ifnblank($2,
2316          [pcfile="$2"],
2317          [if test $m4_tolower(coin_has_$1) = build ; then
2318             pcfile=m4_tolower(coin$1)
2319           else
2320             pcfile=m4_tolower($1)
2321           fi])
2322        AC_COIN_CHK_MOD_EXISTS([$1],[$pcfile],
2323          [m4_tolower(coin_has_$1)=yes
2324           m4_tolower($1_data)=`PKG_CONFIG_PATH="$COIN_PKG_CONFIG_PATH" $PKG_CONFIG --variable=datadir "$pcfile" 2>/dev/null`
2325           m4_tolower($1_pcfiles)="$pcfile"],
2326          [m4_tolower(coin_has_$1)=no])
2327      else
2328        m4_tolower(coin_has_$1)=no
2329        # AC_MSG_WARN([skipped check via pkgconf as no pkgconf available])
2330      fi
2331      ;;
2332    skipping | yes )
2333      ;;
2334    * )
2335      AC_MSG_WARN([Unexpected status "$m4_tolower(coin_has_$1)" in COIN_FIND_PRIM_PKG])
2336      ;;
2337  esac
2338
2339# The final value of coin_has_prim will be yes, no, or skipping. No means
2340# we looked (with pkgconfig) and didn't find anything. Skipping means the
2341# user said `don't use.' Yes means we have something, from the user or
2342# from pkgconfig. Note that we haven't run a useability test!
2343
2344# Define BUILDTOOLS_DEBUG to enable debugging output
2345
2346    if test "$BUILDTOOLS_DEBUG" = 1 ; then
2347      AC_MSG_NOTICE([FIND_PRIM_PKG result for $1: "$m4_tolower(coin_has_$1)"])
2348      AC_MSG_NOTICE([Collected values for package '$1'])
2349      AC_MSG_NOTICE([m4_tolower($1_lflags) is "$m4_tolower($1_lflags)"])
2350      AC_MSG_NOTICE([m4_tolower($1_cflags) is "$m4_tolower($1_cflags)"])
2351      AC_MSG_NOTICE([m4_tolower($1_data) is "$m4_tolower($1_data)"])
2352      AC_MSG_NOTICE([m4_tolower($1_pcfiles) is "$m4_tolower($1_pcfiles)"])
2353    fi
2354
2355])  # COIN_FIND_PRIM_PKG
2356
2357
2358#                          COIN_CHK_PKG                                   #
2359
2360# COIN_CHK_PKG([prim],[client packages],[.pc file name],
2361#              [default action],[cmdopts])
2362
2363# Determine whether we can use primary package prim ($1) and assemble
2364# information on the required linker flags (prim_lflags), compiler flags
2365# (prim_cflags), and data directories (prim_data).
2366
2367# The configure command line options offered to the user are controlled
2368# by cmdopts ($5). 'nodata' offers --with-prim, --with-prim-lflags, and
2369# --with-prim-cflags. 'dataonly' offers --with-prim and --with-prim-data.
2370# 'all' offers all four. DEF_PRIM_ARGS and FIND_PRIM_PKG are tailored
2371# accordingly. The (hardwired) default is 'nodata'.
2372
2373# Default action ($4) (no, yes, build) is the default action if the user
2374# offers no guidance via command line parameters. Really, 'build' has no hope
2375# of working except for COIN ThirdParty packages. Don't use it for other COIN
2376# packages.
2377
2378# If no .pc file names are specified, the macro will look for prim.pc if the
2379# default is yes, coinprim.pc if the default is build.  If a .pc file name
2380# ($3) is specified, it overrides the macro defaults.
2381
2382# Define an automake conditional COIN_HAS_PRIM to record the result. If we
2383# decide to use prim, also define a preprocessor symbol COIN_HAS_PRIM.
2384
2385# Linker and compiler flag information will be propagated to the space-
2386# separated list of client packages ($2) using the _PCFILES variable if
2387# a .pc file is used, otherwise by the _LFLAGS and _CFLAGS variables of
2388# client packages. These variables match Requires.private, Libs.private,
2389# and Cflags.private, respectively, in a .pc file.
2390
2391# Data directory information is used differently. Typically what's wanted is
2392# individual variables specifying the data directory for each primitive. Hence
2393# the macro defines PRIM_DATA for the primitive.
2394
2395# The macro doesn't test that the specified values actually work. This is
2396# deliberate.  There's no guarantee that user-specified libraries and/or
2397# directories actually exist yet. The same possibility exists for values
2398# returned when pkgconf checks the .pc file.
2399
2400AC_DEFUN([AC_COIN_CHK_PKG],
2401[
2402  AC_REQUIRE([AC_COIN_HAS_PKGCONFIG])
2403
2404  AC_MSG_CHECKING([for package $1])
2405
2406# Make sure the necessary variables exist for each client package.
2407
2408  m4_foreach_w([myvar],[$2],
2409    [AC_SUBST(m4_toupper(myvar)_LFLAGS)
2410     AC_SUBST(m4_toupper(myvar)_CFLAGS)
2411     AC_SUBST(m4_toupper(myvar)_PCFILES)
2412    ])
2413
2414# Check to see if the user has set an override to skip this primary.
2415
2416  m4_tolower(coin_has_$1)=noInfo
2417  if test x"$COIN_SKIP_PROJECTS" != x ; then
2418    for pkg in $COIN_SKIP_PROJECTS ; do
2419      if test "$m4_tolower(pkg)" = "$m4_tolower($1)" ; then
2420        m4_tolower(coin_has_$1)=skipping
2421      fi
2422    done
2423  fi
2424
2425# If we're not skipping this primary, define and process the command line
2426# options according to the cmdopts parameter. Then invoke FIND_PRIM_PKG to do
2427# the heavy lifting.
2428
2429  if test "$m4_tolower(coin_has_$1)" != skipping ; then
2430    m4_case(m4_default($5,nodata),
2431      nodata,[AC_COIN_DEF_PRIM_ARGS([$1],yes,yes,yes,no,$4)],
2432      dataonly,[AC_COIN_DEF_PRIM_ARGS([$1],yes,no,no,yes,$4)],
2433      [AC_COIN_DEF_PRIM_ARGS([$1],yes,yes,yes,yes,$4)])
2434    AC_COIN_FIND_PRIM_PKG(m4_tolower($1),[$3],[$4],[$5])
2435    AC_MSG_RESULT([$m4_tolower(coin_has_$1)])
2436  else
2437    AC_MSG_RESULT([$m4_tolower(coin_has_$1) due to COIN_SKIP_PROJECTS])
2438  fi
2439
2440# Possibilities are `yes', 'no', or `skipping'. Normalise to `yes' or `no'.
2441
2442  if test "$m4_tolower(coin_has_$1)" != yes ; then
2443    m4_tolower(coin_has_$1)=no
2444  fi
2445
2446# Create an automake conditional COIN_HAS_PRIM.
2447
2448  AM_CONDITIONAL(m4_toupper(COIN_HAS_$1),
2449                   [test $m4_tolower(coin_has_$1) = yes])
2450
2451# If we've located the package, define preprocessor symbol COIN_HAS_PRIM and
2452# augment the necessary variables for the client packages.
2453
2454  if test $m4_tolower(coin_has_$1) = yes ; then
2455    AC_DEFINE(m4_toupper(COIN_HAS_$1),[1],
2456      [Define to 1 if $1 is available.])
2457    m4_foreach_w([myvar],[$2],
2458      [if test -n "$m4_tolower($1_pcfiles)" ; then m4_toupper(myvar)_PCFILES="$m4_tolower($1_pcfiles) $m4_toupper(myvar)_PCFILES" ; fi
2459       m4_toupper(myvar)_LFLAGS="$m4_tolower($1_lflags) $m4_toupper(myvar)_LFLAGS"
2460       m4_toupper(myvar)_CFLAGS="$m4_tolower($1_cflags) $m4_toupper(myvar)_CFLAGS"
2461      ])
2462
2463# Finally, set up PRIM_DATA, unless the user specified nodata.
2464
2465    m4_if(m4_default([$5],nodata),nodata,[],
2466      [AC_SUBST(m4_toupper($1)_DATA)
2467       m4_toupper($1)_DATA=$m4_tolower($1_data)])
2468  fi
2469])   # COIN_CHK_PKG
2470
2471
2472#                          FIND_PRIM_LIB                                  #
2473
2474# COIN_FIND_PRIM_LIB([prim],[lflgs],[cflgs],[dflgs],
2475#                    [func],[other libraries],
2476#                    [dfltaction],[cmdlineopts])
2477
2478# Determine whether we can use primary library prim ($1) and assemble
2479# information on the required linker flags (prim_lflags), compiler flags
2480# (prim_cflags), and data directories (prim_data) as specified by cmdlineopts.
2481# Run a link check if the user provides [func]. Linker flags for the link are
2482# the concatenation of [lflgs] and [other libraries].
2483
2484# cmdlineopts ($8) specifies the set of configure command line options
2485# defined and processed: 'nodata' produces --with-prim, --with-prim-lflags,
2486# and --with-prim-cflags; 'dataonly' produces only --with-prim and
2487# --with-prim-data; anything else ('all' works well) produces all four
2488# command line options. Shell code produced by the macro is tailored based
2489# on cmdlineopts. `nodata' is the default.
2490
2491# --with-prim is interpreted as follows:
2492#   * --with-prim=no is equivalent to --without-prim.
2493#   * --with-prim or --with-prim=yes is equivalent to
2494#       --with-prim-lflags=-lprim
2495#       --with-prim-data=/usr/local/share
2496#   * --with-prim=build attempts to invent something that will find a COIN
2497#     ThirdParty library or data
2498#       --with-prim-lflags="-L\$(libdir) -lcoinprim"
2499#       --with-prim-cflgs="-I\$(pkgincludedir)/ThirdParty"
2500#       --with-prim-data="\$(pkgdatadir)"
2501#   * Any other value is taken as equivalent to
2502#       --with-prim-data=value (dataonly) or
2503#       --with-prim-lflags=value (anything else)
2504
2505# The algorithm first checks for a user-specified value of --with-prim;
2506# if this is no, prim is skipped. Next, it looks for user specified values
2507# given with command line parameters --with-prim-lflags, --with-prim-cflags,
2508# and --with-prim-data. If none of these are specified, it will use the values
2509# passed as parameters. It's all or none: any command line options disable all
2510# parameters.
2511
2512# Default action ($7) (no, yes, build) is the default value of --with-prim
2513# if the user offers no guidance via command line parameters. The (hardwired)
2514# default is yes. `build' doesn't have a hope of working except for COIN
2515# ThirdParty packages, and even then it's pretty shaky. You should be
2516# using CHK_PKG, because COIN packaging for ThirdParty software creates a .pc
2517# file.
2518
2519# The macro doesn't test that the specified values actually work unless
2520# [func] is given as a parameter. This is deliberate --- there's no guarantee
2521# that the specified library can be accessed just yet with the specified
2522# flags. Except for the link check, all we're doing here is filling in
2523# variables using a complicated algorithm.
2524
2525AC_DEFUN([AC_COIN_FIND_PRIM_LIB],
2526[
2527  dflt_action=m4_default([$7],[yes])
2528
2529# Initialize variables for the primary library.
2530
2531  m4_tolower(coin_has_$1)=noInfo
2532  m4_tolower($1_lflags)=
2533  m4_tolower($1_cflags)=
2534  m4_tolower($1_data)=
2535
2536# --with-prim is always present. If the client specified dataonly, its value
2537# is assigned to prim_data.
2538
2539  withval=$m4_tolower(with_$1)
2540  if test -n "$withval" ; then
2541    case "$withval" in
2542      no )
2543        m4_tolower(coin_has_$1)=skipping
2544        ;;
2545      yes )
2546        m4_tolower(coin_has_$1)=requested
2547        ;;
2548      build )
2549        m4_tolower(coin_has_$1)=build
2550        ;;
2551      * )
2552        m4_tolower(coin_has_$1)=yes
2553        m4_if(m4_default($8,nodata),dataonly,
2554          [m4_tolower($1_data)=$withval],
2555          [m4_tolower($1_lflags)=$withval])
2556        ;;
2557    esac
2558  fi
2559
2560# --with-prim-lflags and --with-prim-cflags are present unless the client
2561# specified dataonly. Specifying --with-prim=no overrides the individual
2562# options for lflags and cflags.
2563
2564  m4_if(m4_default($8,nodata),dataonly,[],
2565    [if test "$m4_tolower(coin_has_$1)" != skipping ; then
2566       withval=$m4_tolower(with_$1_lflags)
2567       if test -n "$withval" ; then
2568         case "$withval" in
2569           build | no | yes )
2570             AC_MSG_ERROR(["$withval" is not valid here; please specify linker flags appropriate for your environment.])
2571             ;;
2572           * )
2573             m4_tolower(coin_has_$1)=yes
2574             m4_tolower($1_lflags)=$withval
2575             ;;
2576         esac
2577       fi
2578
2579       withval=$m4_tolower(with_$1_cflags)
2580       if test -n "$withval" ; then
2581         case "$withval" in
2582           build | no | yes )
2583             AC_MSG_ERROR(["$withval" is not valid here; please specify compiler flags appropriate for your environment.])
2584             ;;
2585           * )
2586             m4_tolower(coin_has_$1)=yes
2587             m4_tolower($1_cflags)="$withval"
2588             ;;
2589         esac
2590       fi
2591     fi])
2592
2593# --with-prim-data will be present unless the client specified nodata.
2594# Specifying --with-prim=no overrides the individual option for data.
2595
2596  m4_if(m4_default($8,nodata),nodata,[],
2597    [if test "$m4_tolower(coin_has_$1)" != skipping ; then
2598       withval=$m4_tolower(with_$1_data)
2599       if test -n "$withval" ; then
2600         case "$withval" in
2601           build | no | yes )
2602             AC_MSG_ERROR(["$withval" is not valid here; please give a data directory specification appropriate for your environment.])
2603             ;;
2604           * )
2605             m4_tolower(coin_has_$1)=yes
2606             m4_tolower($1_data)="$withval"
2607             ;;
2608         esac
2609       fi
2610     fi])
2611
2612# At this point, coin_has_prim can be one of noInfo (no user options
2613# specified), skipping (user said no), requested or build (user said yes
2614# or build and gave no further guidance), or yes (user specified one or
2615# more --with-prim options). If we're already at yes or skipping, we're
2616# done looking.
2617
2618# If there are no user options (noInfo) and the default is no, we're skipping.
2619# Otherwise, the default must be yes or build; consider the package requested.
2620# A default action we don't recognise defaults to yes.
2621
2622  if test "$m4_tolower(coin_has_$1)" = noInfo ; then
2623    case $dflt_action in
2624      no )
2625        m4_tolower(coin_has_$1)=skipping
2626        ;;
2627      build )
2628        m4_tolower(coin_has_$1)=build
2629        ;;
2630      * )
2631        m4_tolower(coin_has_$1)=requested
2632        ;;
2633    esac
2634  fi
2635
2636# Now coin_has_prim can be one of skipping, yes, build, or requested. For
2637# build or requested, use the parameter values or invent some.
2638
2639  case $m4_tolower(coin_has_$1) in
2640    build | requested)
2641      m4_if(m4_default($8,nodata),dataonly,[],
2642        [m4_ifnblank([$2],
2643           [m4_tolower($1_lflags)="$2"],
2644           [if test "$m4_tolower(coin_has_$1)" = build ; then
2645              m4_tolower($1_lflags)="-L\$(libdir) -l[]m4_tolower(coin$1)"
2646            else
2647              m4_tolower($1_lflags)="-l[]m4_tolower($1)"
2648            fi])
2649         m4_ifnblank([$3],
2650           [m4_tolower($1_cflags)="$3"],
2651           [if test "$m4_tolower(coin_has_$1)" = build ; then
2652              m4_tolower($1_cflags)="-I\$(pkgincludedir)/ThirdParty"
2653            fi])])
2654      m4_if(m4_default($8,nodata),nodata,[],
2655        [m4_tolower($1_data)=m4_default([$3],
2656           [if test "$m4_tolower(coin_has_$1)" = build ; then
2657              m4_tolower($1_data)="\$(pkgdatadir)"
2658            else
2659              m4_tolower($1_data)="/usr/local/share"
2660            fi])])
2661      m4_tolower(coin_has_$1)=yes
2662      ;;
2663    skipping | yes )
2664      ;;
2665    * )
2666      AC_MSG_WARN([Unexpected status "$m4_tolower(coin_has_$1)" in COIN_FIND_PRIM_LIB])
2667      ;;
2668  esac
2669
2670# At this point, coin_has_prim is yes or skipping.  Time to run a link check,
2671# if we have a function ($5). Use whatever we've collected for lflags, plus
2672# other libraries ($6) as the other libraries parameter to AC_SEARCH_LIBS,
2673# leaving the library parameter blank.
2674
2675  if test $m4_tolower(coin_has_$1) != skipping ; then
2676    m4_ifnblank([$5],
2677      [ac_save_LIBS=$LIBS
2678       LIBS="$m4_tolower($1_lflags) $6"
2679       AC_LINK_IFELSE(
2680        [AC_LANG_PROGRAM(
2681          [#ifdef __cplusplus
2682             extern "C"
2683           #endif
2684           void $5();],
2685          [$5()])],
2686       [],
2687       [m4_tolower(coin_has_$1)=no])
2688       LIBS=$ac_save_LIBS],
2689      [:])
2690  fi
2691
2692# The final value of coin_has_prim will be yes, no, or skipping. No means that
2693# the link check failed. Yes means that we passed the link check, or no link
2694# check was performed. Skipping means the user said `don't use.'
2695
2696# Define BUILDTOOLS_DEBUG to enable debugging output
2697
2698    if test "$BUILDTOOLS_DEBUG" = 1 ; then
2699      AC_MSG_NOTICE([FIND_PRIM_LIB result for $1: "$m4_tolower(coin_has_$1)"])
2700      AC_MSG_NOTICE([Collected values for package '$1'])
2701      AC_MSG_NOTICE([m4_tolower($1_lflags) is "$m4_tolower($1_lflags)"])
2702      AC_MSG_NOTICE([m4_tolower($1_cflags) is "$m4_tolower($1_cflags)"])
2703      AC_MSG_NOTICE([m4_tolower($1_data) is "$m4_tolower($1_data)"])
2704      AC_MSG_NOTICE([m4_tolower($1_pcfiles) is "$m4_tolower($1_pcfiles)"])
2705    fi
2706
2707])  # COIN_FIND_PRIM_LIB
2708
2709
2710#                          COIN_CHK_LIB                                   #
2711
2712# COIN_CHK_LIB([prim],[client packages],[lflgs],[cflgs],[dflgs],
2713#              [func],[other libraries],
2714#              [dfltaction],[cmdopts])
2715
2716# Determine whether we can use primary library prim ($1) and assemble
2717# information on the required linker flags (prim_lflags), compiler flags
2718# (prim_cflags), and data directories (prim_data). A link check will be
2719# performed in COIN_FIND_PRIM_LIB if [func] is specified, using link flags
2720# formed by concatenating the values of [lflgs] and [other libraries].
2721
2722# The configure command line options offered to the user are controlled
2723# by cmdopts ($9). 'nodata' offers --with-prim, --with-prim-lflags, and
2724# --with-prim-cflags; 'dataonly' offers --with-prim and --with-prim-data;
2725# 'all' offers all four. DEF_PRIM_ARGS and FIND_PRIM_LIB are tailored
2726# accordingly. The (hardwired) default is 'nodata'.
2727
2728# Macro parameters lflgs ($3), cflgs ($4), and dflgs ($5) are used for
2729# --with-prim-lflags, --with-prim-cflags, and --with-prim-data if and only if
2730# there are no user-supplied values on the command line. It's all or nothing;
2731# any user-supplied value causes all macro parameters to be ignored.
2732
2733# Default action ($8) (no, yes, build) is the default action if the user
2734# offers no guidance via command line parameters. Really, 'build' has no
2735# hope of working except for COIN ThirdParty packages. Don't use it for
2736# other COIN packages. You should be using CHK_PKG because COIN packaging
2737# for ThirdParty software creates a .pc file.
2738
2739# Define an automake conditional COIN_HAS_PRIM to record the result. If we
2740# decide to use prim, also define a preprocessor symbol COIN_HAS_PRIM.
2741
2742# Linker and compiler flag information will be propagated to the space-
2743# separated list of client packages ($2) using the _LFLAGS and _CFLAGS
2744# variables of client packages. These variables match Libs.private and
2745# Cflags.private, respectively, in a .pc file.
2746
2747# Data directory information is used differently. Typically what's wanted is
2748# individual variables specifying the data directory for each primitive. Hence
2749# the macro defines PRIM_DATA for the primitive.
2750
2751AC_DEFUN([AC_COIN_CHK_LIB],
2752[
2753  AC_MSG_CHECKING([for package $1])
2754
2755# Make sure the necessary variables exist for each client package.
2756
2757  m4_foreach_w([myvar],[$2],
2758    [AC_SUBST(m4_toupper(myvar)_LFLAGS)
2759     AC_SUBST(m4_toupper(myvar)_CFLAGS)
2760    ])
2761
2762# Check to see if the user has overridden configure parameters from the
2763# environment.
2764
2765  m4_tolower(coin_has_$1)=noInfo
2766  if test x"$COIN_SKIP_PROJECTS" != x ; then
2767    for pkg in $COIN_SKIP_PROJECTS ; do
2768      if test "$m4_tolower(pkg)" = "$m4_tolower($1)" ; then
2769        m4_tolower(coin_has_$1)=skipping
2770      fi
2771    done
2772  fi
2773
2774# If we're not skipping this project, define and process the command line
2775# options according to the cmdopts parameter. Then invoke FIND_PRIM_PKG to do
2776# the heavy lifting.
2777
2778  if test "$m4_tolower(coin_has_$1)" != skipping ; then
2779    m4_case(m4_default($9,nodata),
2780      nodata,[AC_COIN_DEF_PRIM_ARGS([$1],yes,yes,yes,no,$4)],
2781      dataonly,[AC_COIN_DEF_PRIM_ARGS([$1],yes,no,no,yes,$4)],
2782      [AC_COIN_DEF_PRIM_ARGS([$1],yes,yes,yes,yes,$4)])
2783    AC_COIN_FIND_PRIM_LIB(m4_tolower($1),[$3],[$4],[$5],[$6],[$7],[$8],[$9])
2784    AC_MSG_RESULT([$m4_tolower(coin_has_$1)])
2785  else
2786    AC_MSG_RESULT([$m4_tolower(coin_has_$1) due to COIN_SKIP_PROJECTS])
2787  fi
2788
2789# Possibilities are `yes', `no', or `skipping'. Normalise to `yes' or `no'.
2790
2791  if test "$m4_tolower(coin_has_$1)" != yes ; then
2792    m4_tolower(coin_has_$1)=no
2793  fi
2794
2795# Create an automake conditional COIN_HAS_PRIM.
2796
2797  AM_CONDITIONAL(m4_toupper(COIN_HAS_$1),
2798                   [test $m4_tolower(coin_has_$1) = yes])
2799
2800# If we've located the package, define preprocessor symbol COIN_HAS_PRIM
2801# and augment the necessary variables for the client packages.
2802
2803  if test $m4_tolower(coin_has_$1) = yes ; then
2804    AC_DEFINE(m4_toupper(COIN_HAS_$1),[1],
2805      [Define to 1 if the $1 package is available])
2806    m4_foreach_w([myvar],[$2],
2807      [m4_toupper(myvar)_LFLAGS="$m4_tolower($1_lflags) $m4_toupper(myvar)_LFLAGS"
2808       m4_toupper(myvar)_CFLAGS="$m4_tolower($1_cflags) $m4_toupper(myvar)_CFLAGS"
2809      ])
2810
2811# Finally, set up PRIM_DATA, unless the user specified nodata.
2812
2813    m4_if(m4_default([$9],nodata),nodata,[],
2814      [AC_SUBST(m4_toupper($1)_DATA)
2815       m4_toupper($1)_DATA=$m4_tolower($1_data)])
2816  fi
2817])   # COIN_CHK_LIB
2818
2819
2820#                           COIN_CHK_LIBM                           #
2821
2822# COIN_CHK_LIBM([client1 client2 ...])
2823# Check if a library spec is needed for the math library. If something is
2824# needed, the macro adds the flags to CLIENT_LFLAGS for each client.
2825
2826AC_DEFUN([AC_COIN_CHK_LIBM],
2827[
2828  AC_REQUIRE([AC_PROG_CC])
2829
2830  m4_foreach_w([myvar],[$1],[AC_SUBST(m4_toupper(myvar)_LFLAGS)])
2831
2832  coin_save_LIBS="$LIBS"
2833  LIBS=
2834  AC_SEARCH_LIBS([cos],[m],
2835    [if test "$ac_cv_search_cos" != 'none required' ; then
2836       m4_foreach_w([myvar],[$1],
2837         [m4_toupper(myvar)_LFLAGS="$ac_cv_search_cos $m4_toupper(myvar)_LFLAGS"
2838         ])
2839     fi])
2840  LIBS="$coin_save_LIBS"
2841]) # AC_COIN_CHK_LIBM
2842
2843
2844#                           COIN_CHK_ZLIB                               #
2845
2846# COIN_CHK_ZLIB([client1 client2 ...])
2847
2848# This macro checks for the libz library.  If found, it sets the automake
2849# conditional COIN_HAS_ZLIB and defines the C preprocessor variable
2850# COIN_HAS_ZLIB. The default is to use zlib, if it's present.  For each client,
2851# it adds the linker flags to the variable CLIENT_LFLAGS for each client.
2852
2853AC_DEFUN([AC_COIN_CHK_ZLIB],
2854[
2855  AC_REQUIRE([AC_COIN_PROG_CC])
2856
2857  m4_foreach_w([myvar],[$1],[AC_SUBST(m4_toupper(myvar)_LFLAGS)])
2858
2859  coin_has_zlib=no
2860
2861  AC_ARG_ENABLE([zlib],
2862    [AC_HELP_STRING([--disable-zlib],
2863       [do not compile with compression library zlib])],
2864    [coin_enable_zlib=$enableval],
2865    [coin_enable_zlib=yes])
2866
2867  if test x$coin_enable_zlib = xyes ; then
2868    AC_CHECK_HEADER([zlib.h],[coin_has_zlib=yes])
2869    if test x$coin_has_zlib = xyes ; then
2870      AC_CHECK_LIB([z],[gzopen],[],[coin_has_zlib=no])
2871    fi
2872    if test x$coin_has_zlib = xyes ; then
2873      m4_foreach_w([myvar],[$1],
2874        [m4_toupper(myvar)_LFLAGS="-lz $m4_toupper(myvar)_LFLAGS"
2875        ])
2876      AC_DEFINE([COIN_HAS_ZLIB],[1],[Define to 1 if zlib is available])
2877    fi
2878  fi
2879
2880  AM_CONDITIONAL([COIN_HAS_ZLIB],[test x$coin_has_zlib = xyes])
2881]) # AC_COIN_CHK_ZLIB
2882
2883
2884#                            COIN_CHK_BZLIB                             #
2885
2886# COIN_CHK_BZLIB([client1 client2 ...])
2887
2888# This macro checks for the libbz2 library.  If found, it defines the
2889# C preprocessor variable COIN_HAS_BZLIB and the automake conditional
2890# COIN_HAS_BZLIB.  Further, for a (space separated) list of clients, it adds
2891# the linker flag to the variable CLIENT_LFLAGS for each client.
2892
2893AC_DEFUN([AC_COIN_CHK_BZLIB],
2894[
2895  AC_REQUIRE([AC_PROG_CC])
2896
2897  m4_foreach_w([myvar],[$1],[AC_SUBST(m4_toupper(myvar)_LFLAGS)])
2898
2899  coin_has_bzlib=no
2900
2901  AC_ARG_ENABLE([bzlib],
2902    [AC_HELP_STRING([--disable-bzlib],
2903       [do not compile with compression library bzlib])],
2904    [coin_enable_bzlib=$enableval],
2905    [coin_enable_bzlib=yes])
2906
2907  if test $coin_enable_bzlib = yes ; then
2908    AC_CHECK_HEADER([bzlib.h],[coin_has_bzlib=yes])
2909    if test $coin_has_bzlib = yes ; then
2910      AC_CHECK_LIB([bz2],[BZ2_bzReadOpen],[],[coin_has_bzlib=no])
2911    fi
2912    if test $coin_has_bzlib = yes ; then
2913      m4_foreach_w([myvar],[$1],
2914        [m4_toupper(myvar)_LFLAGS="-lbz2 $m4_toupper(myvar)_LFLAGS"
2915        ])
2916      AC_DEFINE([COIN_HAS_BZLIB],[1],[Define to 1 if bzlib is available])
2917    fi
2918  fi
2919
2920  AM_CONDITIONAL([COIN_HAS_BZLIB],[test x$coin_has_bzlib = xyes])
2921]) # AC_COIN_CHK_BZLIB
2922
2923
2924#                              COIN_CHK_GMP                               #
2925
2926# COIN_CHK_GMP([client1 client2 ...])
2927
2928# This macro checks for the gmp library.  If found, it defines the C
2929# preprocessor variable COIN_HAS_GMP and the automake conditional COIN_HAS_GMP.
2930# Further, for a (space separated) list of clients, it adds the linker
2931# flag to the variable CLIENT_LFLAGS for each client.
2932
2933AC_DEFUN([AC_COIN_CHK_GMP],
2934[
2935  AC_REQUIRE([AC_PROG_CC])
2936
2937  m4_foreach_w([myvar],[$1],[AC_SUBST(m4_toupper(myvar)_LFLAGS)])
2938
2939  coin_has_gmp=no
2940
2941  AC_ARG_ENABLE([gmp],
2942    [AC_HELP_STRING([--disable-gmp],
2943       [do not compile with GNU multiple precision library])],
2944    [coin_enable_gmp=$enableval],
2945    [coin_enable_gmp=yes])
2946
2947  if test $coin_enable_gmp = yes ; then
2948    AC_CHECK_HEADER([gmp.h],
2949      [AC_CHECK_LIB([gmp],[__gmpz_init],[coin_has_gmp=yes])])
2950    if test $coin_has_gmp = yes ; then
2951      m4_foreach_w([myvar],[$1],
2952        [m4_toupper(myvar)_LFLAGS="-lgmp $m4_toupper(myvar)_LFLAGS"
2953        ])
2954      AC_DEFINE([COIN_HAS_GMP],[1],[Define to 1 if GMP is available])
2955    fi
2956  fi
2957
2958  AM_CONDITIONAL([COIN_HAS_GMP],[test x$coin_has_gmp = xyes])
2959]) # AC_COIN_CHK_GMP
2960
2961
2962#                         COIN_CHK_GNU_READLINE                         #
2963
2964# COIN_CHK_GNU_READLINE([client1 client2 ...])
2965
2966# This macro checks for GNU's readline.  It verifies that the header
2967# readline/readline.h is available, and that the -lreadline library contains
2968# "readline".  It is assumed that #include <stdio.h> is included in the source
2969# file before the #include<readline/readline.h> If found, it defines the C
2970# preprocessor variable COIN_HAS_READLINE.  Further, for a (space separated)
2971# list of clients, it adds the linker flag to the variable CLIENT_LFLAGS for
2972# each client.
2973
2974AC_DEFUN([AC_COIN_CHK_GNU_READLINE],
2975[
2976  AC_REQUIRE([AC_PROG_CC])
2977
2978  m4_foreach_w([myvar],[$1],[AC_SUBST(m4_toupper(myvar)_LFLAGS)])
2979
2980  coin_has_readline=no
2981
2982  AC_ARG_ENABLE([readline],
2983    [AC_HELP_STRING([--disable-readline],
2984       [do not compile with readline library])],
2985    [coin_enable_readline=$enableval],
2986    [coin_enable_readline=yes])
2987
2988  if test $coin_enable_readline = yes ; then
2989    AC_CHECK_HEADER([readline/readline.h],
2990      [coin_has_readline=yes],[],[#include <stdio.h>])
2991    coin_save_LIBS="$LIBS"
2992    LIBS=
2993    if test $coin_has_readline = yes ; then
2994      AC_SEARCH_LIBS([tputs],
2995        [ncurses termcap curses],[],[coin_has_readline=no])
2996    fi
2997    if test $coin_has_readline = yes ; then
2998      AC_CHECK_LIB([readline],[readline],[],[coin_has_readline=no])
2999    fi
3000    if test $coin_has_readline = yes ; then
3001      m4_foreach_w([myvar],[$1],
3002        [m4_toupper(myvar)_LFLAGS="-lreadline $m4_toupper(myvar)_LFLAGS"
3003        ])
3004      AC_DEFINE([COIN_HAS_READLINE],[1],[Define to 1 if readline is available])
3005    fi
3006    LIBS="$coin_save_LIBS"
3007  fi
3008
3009  AM_CONDITIONAL([COIN_HAS_READLINE],[test x$coin_has_readline = xyes])
3010]) # AC_COIN_CHK_GNU_READLINE
3011
3012
3013#                       COIN_CHK_LAPACK                                   #
3014
3015# COIN_CHK_LAPACK([client packages])
3016
3017# This macro checks for a LAPACK library and adds the information necessary to
3018# use it to the _LFLAGS, _CFLAGS, and _PCFILES variables of the client packages
3019# passed as a space-separated list in parameter $1. These correspond to
3020# Libs.private, Cflags.private, and Requires.private, respectively, in a .pc
3021# file.
3022
3023# The algorithm first invokes FIND_PRIM_PKG. The parameters --with-lapack,
3024# --with-lapack-lflags, and --with-lapack-cflags are interpreted there. If
3025# nothing is found, default locations are checked.
3026# A link check is used to determine whether default locations work and to
3027# determine the name mangling scheme of the Lapack library.
3028
3029AC_DEFUN([AC_COIN_CHK_LAPACK],
3030[
3031# Make sure the necessary variables exist for each client package.
3032  m4_foreach_w([myvar],[$1],
3033    [AC_SUBST(m4_toupper(myvar)_CFLAGS)
3034     AC_SUBST(m4_toupper(myvar)_LFLAGS)
3035     AC_SUBST(m4_toupper(myvar)_PCFILES)
3036    ])
3037
3038# Set up command line arguments with DEF_PRIM_ARGS.
3039  AC_COIN_DEF_PRIM_ARGS([lapack],yes,yes,yes,no)
3040
3041# Give FIND_PRIM_PKG a chance to look for user-specified lapack flags,
3042# but skip any checks via a .pc file. The result (coin_has_lapack) will
3043# be one of yes (the user specified something), no (user specified nothing),
3044# or skipping (user said do not use). We'll also have variables
3045# lapack_lflags, lapack_cflags, lapack_data, and lapack_pcfiles.
3046  AC_COIN_FIND_PRIM_PKG([lapack],[skip])
3047
3048# If FIND_PRIM_PKG found something, then we'll do a link check to figure
3049# out whether it is working and what the name mangling scheme is.
3050# This sets dsyev_namemangling
3051  if test "$coin_has_lapack" = yes ; then
3052    AC_COIN_TRY_LINK([dsyev],[$lapack_lflags],[$lapack_pcfiles],,
3053      [AC_MSG_ERROR([Could not find dsyev in Lapack])])
3054  fi
3055
3056# If FIND_PRIM_PKG didn't find anything, try a few more guesses for
3057# optimized blas/lapack libs (based on build system type).
3058dnl To use static MKL libs on Linux/Darwin, one would need to enclose the libs into
3059dnl -Wl,--start-group ... -Wl,--end-group. Unfortunately, libtool does not write these
3060dnl flags into the dependency_libs of the .la file, so linking an executable fails.
3061dnl See also https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=159760&repeatmerged=yes
3062dnl So for now the checks below will only work for shared MKL libs on Linux/Darwin.
3063  if test "$coin_has_lapack" = no ; then
3064    case $build in
3065      *-linux*)
3066         AC_COIN_TRY_LINK([dsyev],[-lmkl_core -lmkl_intel_lp64 -lmkl_sequential -lm],[],[
3067           coin_has_lapack=yes
3068           lapack_lflags="-lmkl_core -lmkl_intel_lp64 -lmkl_sequential -lm"])
3069      ;;
3070
3071      *-sgi-*)
3072        AC_COIN_TRY_LINK([dsyev],[-lcomplib.sgimath],[],[
3073          coin_has_lapack=yes
3074          lapack_lflags=-lcomplib.sgimath])
3075      ;;
3076
3077      *-*-solaris*)
3078        # Ideally, we'd use -library=sunperf, but it's an imperfect world.
3079        # Studio cc doesn't recognise -library, it wants -xlic_lib. Studio 12
3080        # CC doesn't recognise -xlic_lib. Libtool doesn't like -xlic_lib
3081        # anyway. Sun claims that CC and cc will understand -library in Studio
3082        # 13. The main extra function of -xlic_lib and -library is to arrange
3083        # for the Fortran run-time libraries to be linked for C++ and C. We
3084        # can arrange that explicitly.
3085        AC_COIN_TRY_LINK([dsyev],[-lsunperf],[],[
3086          coin_has_lapack=yes
3087          lapack_lflags=-lsunperf])
3088      ;;
3089
3090      *-cygwin* | *-mingw* | *-msys*)
3091        # check for 64-bit sequential MKL
3092        if test "$enable_shared" = yes ; then
3093          AC_COIN_TRY_LINK([dsyev],[mkl_intel_lp64_dll.lib mkl_sequential_dll.lib mkl_core_dll.lib],[],
3094            [coin_has_lapack=yes
3095             lapack_lflags="mkl_intel_lp64_dll.lib mkl_sequential_dll.lib mkl_core_dll.lib"])
3096        else
3097          AC_COIN_TRY_LINK([dsyev],[mkl_intel_lp64.lib mkl_sequential.lib mkl_core.lib],[],
3098            [coin_has_lapack=yes
3099             lapack_lflags="mkl_intel_lp64.lib mkl_sequential.lib mkl_core.lib"])
3100        fi
3101      ;;
3102
3103      *-darwin*)
3104        AC_COIN_TRY_LINK([dsyev],[-lmkl_core -lmkl_intel_lp64 -lmkl_sequential -lm],[],[
3105          coin_has_lapack=yes
3106          lapack_lflags="-lmkl_core -lmkl_intel_lp64 -lmkl_sequential -lm"])
3107        if test "$coin_has_lapack" = no ; then
3108          AC_COIN_TRY_LINK([dsyev],[-framework Accelerate],[],[
3109            coin_has_lapack=yes
3110            lapack_lflags="-framework Accelerate"])
3111        fi
3112      ;;
3113    esac
3114  fi
3115
3116# If none of the above worked, check whether lapack.pc blas.pc exists and links
3117# We check for both to ensure that blas lib also appears on link line in case
3118# someone wants to use Blas functions but tests only for Lapack.
3119  if test "$coin_has_lapack" = no ; then
3120    AC_MSG_CHECKING([for lapack.pc and blas.pc])
3121    AC_COIN_CHK_MOD_EXISTS([lapack],[lapack blas],
3122      [AC_MSG_RESULT([yes])
3123       AC_COIN_TRY_LINK([dsyev],[],[lapack],
3124        [coin_has_lapack=yes
3125         lapack_pcfiles="lapack blas"],
3126        [AC_MSG_ERROR([Could not find dsyev in Lapack from lapack.pc blas.pc.])])],
3127      [AC_MSG_RESULT([no])])
3128  fi
3129
3130# TODO do we need another check with lapack.pc only?
3131
3132# If none of the above worked, try the generic -llapack -lblas as last resort.
3133# We check for both to ensure that blas lib also appears on link line in case
3134# someone wants to use Blas functions but tests only for Lapack.
3135  if test "$coin_has_lapack" = no ; then
3136    AC_COIN_TRY_LINK([dsyev],[-llapack -lblas],[],[
3137      coin_has_lapack=yes
3138      lapack_lflags="-llapack -lblas"])
3139  fi
3140
3141# TODO do we need another check with -llapack only?
3142
3143# Time to set some variables. Create an automake conditional COIN_HAS_LAPACK.
3144  AM_CONDITIONAL(m4_toupper(COIN_HAS_LAPACK),[test $coin_has_lapack = yes])
3145
3146# If we've located the package, define preprocessor symbol COIN_HAS_LAPACK
3147# and COIN_LAPACK_FUNC[_] and augment the necessary variables for the client packages.
3148  if test $coin_has_lapack = yes ; then
3149    AC_DEFINE(m4_toupper(COIN_HAS_LAPACK),[1],
3150      [Define to 1 if the LAPACK package is available])
3151    AC_COIN_DEFINENAMEMANGLING([COIN_LAPACK], ${dsyev_namemangling})
3152    m4_foreach_w([myvar],[$1],
3153      [if test -n "$lapack_pcfiles" ; then m4_toupper(myvar)_PCFILES="$lapack_pcfiles $m4_toupper(myvar)_PCFILES" ; fi
3154       m4_toupper(myvar)_LFLAGS="$lapack_lflags $m4_toupper(myvar)_LFLAGS"
3155       m4_toupper(myvar)_CFLAGS="$lapack_cflags $m4_toupper(myvar)_CFLAGS"
3156      ])
3157  fi
3158]) # AC_COIN_CHK_LAPACK
3159
3160
3161#                           COIN_DOXYGEN                                  #
3162
3163# This macro determines the configuration information for doxygen, the tool
3164# used to generate online documentation of COIN code. It takes one parameter,
3165# a list of projects (mixed-case, to match the install directory names) that
3166# should be processed as external tag files. E.g., COIN_DOXYGEN([Clp Osi]).
3167
3168# This macro will define the following variables:
3169#  coin_have_doxygen        Yes if doxygen is found, no otherwise
3170#  coin_doxy_usedot     Defaults to `yes'; --with-dot will still check to see
3171#                        if dot is available
3172#  coin_doxy_tagname        Name of doxygen tag file (placed in doxydoc directory)
3173#  coin_doxy_logname    Name of doxygen log file (placed in doxydoc directory)
3174#  coin_doxy_tagfiles   List of doxygen tag files used to reference other
3175#                       doxygen documentation
3176
3177# It's not immediately obvious, but the code in this macro, configure-time
3178# substitions in doxygen.conf.in, and build-time edits of doxygen.conf in
3179# Makemain.inc combine to hardwire the assumptions that a tag file is named
3180# proj_doxy.tag, that PKG_TARNAME is coin-or-proj, and that the doxygen
3181# documentation is in the GNU default location $(docdir)/$PKG_TARNAME. Have
3182# a look over the complete machinery before you start changing things. The
3183# point of the build-time edits is to allow the user to redefine docdir at
3184# build time, as per GNU standards. Failure to use coin-or-proj as PKG_TARNAME
3185# will surely break linking of documentation with tag files.
3186
3187AC_DEFUN([AC_COIN_DOXYGEN],
3188[
3189
3190AC_MSG_NOTICE([configuring doxygen documentation options])
3191
3192# Check to see if doxygen is available.
3193
3194AC_CHECK_PROG([coin_have_doxygen],[doxygen],[yes],[no])
3195AC_CHECK_PROG([coin_have_latex],[latex],[yes],[no])
3196
3197# Look for the dot tool from the graphviz package, unless the user has
3198# disabled it.
3199
3200AC_ARG_WITH([dot],
3201  AS_HELP_STRING([--with-dot],
3202                 [use dot (from graphviz) when creating documentation with
3203                  doxygen if available; --without-dot to disable]),
3204  [],[withval=yes])
3205if test x"$withval" = xno ; then
3206  coin_doxy_usedot=NO
3207  AC_MSG_CHECKING([for dot ])
3208  AC_MSG_RESULT([disabled])
3209else
3210  AC_CHECK_PROG([coin_doxy_usedot],[dot],[YES],[NO])
3211fi
3212
3213# Generate a tag file name and a log file name.
3214
3215lc_pkg=`echo ${PACKAGE_NAME} | [tr [A-Z] [a-z]]`
3216AC_SUBST([coin_doxy_tagname],[${lc_pkg}_doxy.tag])
3217AC_SUBST([coin_doxy_logname],[${lc_pkg}_doxy.log])
3218AM_CONDITIONAL(COIN_HAS_DOXYGEN, [test $coin_have_doxygen = yes])
3219AM_CONDITIONAL(COIN_HAS_LATEX, [test $coin_have_latex = yes])
3220
3221# Process the list of project names and massage each one into the name of
3222# a tag file. The value of coin_doxy_tagfiles is substituted for TAGFILES
3223# in doxygen.conf.in. Further substitution for @baredocdir_nosub@ will happen
3224# as an edit during make install. See comments in Makemain.inc.
3225
3226coin_doxy_tagfiles=
3227tmp="$1"
3228for proj in $tmp ; do
3229  lc_proj=`echo $proj | [tr [A-Z] [a-z]]`
3230  doxytag=${lc_proj}_doxy.tag
3231  doxydir="@baredocdir_nosub@/coin-or-${lc_proj}/doxydoc"
3232  coin_doxy_tagfiles="$coin_doxy_tagfiles $doxydir/$doxytag=$doxydir/html"
3233done
3234AC_SUBST([coin_doxy_tagfiles])
3235
3236]) # AC_COIN_DOXYGEN
3237
3238
3239#                          COIN_EXAMPLE_FILES                             #
3240
3241# This macro deals with `example' files. Its original use is for data files
3242# associated with the Data projects. It allows for uniform handling of files
3243# that are not processed but should be present in the build directory. Most of
3244# the work is done by make. This macro just sets up the necessary variables.
3245# The justification for this approach is to allow the use of file name wild
3246# cards in the argument. The underlying machinery of autoconf and automake
3247# kind of breaks down when the file names are not literal text.
3248
3249# One tradeoff for allowing the use of wildcards is that it's not possible to
3250# give the created link a name that's different from the source file.
3251
3252# The variables (file names accumulate over calls):
3253# EXAMPLE_DIST_FILES: The originals that should be distributed
3254# EXAMPLE_UNCOMP_FILES: like EXAMPLE_DIST_FILES, but names of compressed files
3255# are stripped of their .gz suffix.
3256# EXAMPLE_CLEAN_FILES: contains only the names of files that were stripped of
3257# .gz. Essential for distclean in a non-VPATH build.
3258# One of EXAMPLE_DIST_FILES or EXAMPLE_UNCOMP_FILES will be the list of file
3259# names for install / uninstall. See Makefile.am in a Data project for usage.
3260
3261AC_DEFUN([AC_COIN_EXAMPLE_FILES],
3262[
3263AC_REQUIRE([AC_COIN_CHECK_VPATH])[]dnl
3264AC_REQUIRE([AC_PROG_LN_S])[]dnl
3265AM_CONDITIONAL([COIN_VPATH_BUILD],[test x$coin_vpath_config = xyes])
3266
3267# Get the names of the files and sort them to the various variables. As
3268# a convenient side-effect, the loop will remove newlines from the list
3269# of files. Avoid adding duplicate file names. (Allowing wild cards makes
3270# duplicates far too likely.) The redirect of stderr on the ls is arguable. It
3271# avoids error messages in the configure output if the package maintainer
3272# specifies files that don't exist (for example, generic wild card specs
3273# that anticipate future growth) but it will hide honest errors.
3274
3275files=`cd $srcdir; ls $1 2>/dev/null`
3276for file in $files; do
3277  if expr " $EXAMPLE_DIST_FILES " : '.* '"$file"' .*' >/dev/null 2>&1 ; then
3278    continue ;
3279  fi
3280  EXAMPLE_DIST_FILES="$EXAMPLE_DIST_FILES $file"
3281  if expr "$file" : '.*\.gz$' >/dev/null 2>&1 ; then
3282    EXAMPLE_UNCOMP_FILES="$EXAMPLE_UNCOMP_FILES `expr "$file" : '\(.*\)\.gz$'`"
3283    EXAMPLE_CLEAN_FILES="$EXAMPLE_CLEAN_FILES `expr "$file" : '\(.*\)\.gz$'`"
3284  else
3285    EXAMPLE_UNCOMP_FILES="$EXAMPLE_UNCOMP_FILES $file"
3286  fi
3287done
3288
3289AC_SUBST(EXAMPLE_DIST_FILES)
3290AC_SUBST(EXAMPLE_UNCOMP_FILES)
3291AC_SUBST(EXAMPLE_CLEAN_FILES)
3292
3293]) # AC_COIN_EXAMPLE_FILES
3294
3295
3296#                           COIN_FINALIZE_FLAGS                           #
3297
3298# COIN_FINALIZE_FLAGS([prim1 prim2 ...])
3299
3300# For each PRIM, produce final versions of variables specifying linker and
3301# compiler flags.  PRIM_LFLAGS_NOPC and PRIM_CFLAGS_NOPC are appropriate for
3302# use in .pc files together with PRIM_PCFILES. PRIM_LFLAGS and PRIM_CFLAGS
3303# are augmented to contain flags obtained by invoking PKG_CONFIG on packages
3304# listed in PRIM_PCFILES and are appropriate for use in Makefile.am files.
3305
3306AC_DEFUN([AC_COIN_FINALIZE_FLAGS],
3307[
3308  m4_foreach_w([myvar],[$1],
3309    [ if test "$BUILDTOOLS_DEBUG" = 1 ; then
3310        AC_MSG_NOTICE([FINALIZE_FLAGS for myvar:])
3311      fi
3312      AC_SUBST(m4_toupper(myvar)_LFLAGS_NOPC,[$m4_toupper(myvar)_LFLAGS])
3313      AC_SUBST(m4_toupper(myvar)_CFLAGS_NOPC,[$m4_toupper(myvar)_CFLAGS])
3314      if test -n "${m4_toupper(myvar)_PCFILES}" ; then
3315        temp_CFLAGS=`PKG_CONFIG_PATH="$COIN_PKG_CONFIG_PATH" $PKG_CONFIG --cflags ${m4_toupper(myvar)_PCFILES}`
3316        temp_LFLAGS=`PKG_CONFIG_PATH="$COIN_PKG_CONFIG_PATH" $PKG_CONFIG --libs ${m4_toupper(myvar)_PCFILES}`
3317        m4_toupper(myvar)_CFLAGS="$temp_CFLAGS ${m4_toupper(myvar)_CFLAGS}"
3318        m4_toupper(myvar)_LFLAGS="$temp_LFLAGS ${m4_toupper(myvar)_LFLAGS}"
3319      fi
3320
3321      # setup XYZ_EXPORT symbol for library users
3322      libexport_attribute=
3323      if test "$enable_shared" = yes ; then
3324        case $build_os in
3325          cygwin* | mingw* | msys* | cegcc* )
3326            libexport_attribute="__declspec(dllimport)"
3327            if test "$enable_static" = yes ; then
3328              AC_MSG_ERROR([Cannot do DLL and static LIB builds simultaneously. Do not add --enable-static without --disable-shared.])
3329            fi
3330          ;;
3331        esac
3332      fi
3333      AC_DEFINE_UNQUOTED(m4_toupper(myvar)_EXPORT, [$libexport_attribute], [Library Visibility Attribute])
3334
3335# Define BUILDTOOLS_DEBUG to enable debugging output
3336
3337      if test "$BUILDTOOLS_DEBUG" = 1 ; then
3338        AC_MSG_NOTICE(
3339          [m4_toupper(myvar)_LFLAGS_NOPC: "${m4_toupper(myvar)_LFLAGS_NOPC}"])
3340        AC_MSG_NOTICE(
3341          [m4_toupper(myvar)_CFLAGS_NOPC: "${m4_toupper(myvar)_CFLAGS_NOPC}"])
3342        AC_MSG_NOTICE([adding "${m4_toupper(myvar)_PCFILES}"])
3343        AC_MSG_NOTICE([m4_toupper(myvar)_LFLAGS: "${m4_toupper(myvar)_LFLAGS}"])
3344        AC_MSG_NOTICE([m4_toupper(myvar)_CFLAGS: "${m4_toupper(myvar)_CFLAGS}"])
3345      fi
3346    ])
3347])
3348
3349
3350#                              COIN_FINALIZE                              #
3351
3352# This macro should be called at the very end of the configure.ac file.
3353# It creates the output files (by using AC_OUTPUT), and might do some other
3354# things (such as generating links to data files in a VPATH configuration).
3355# It also prints the "success" message.
3356# Note: If the variable coin_skip_ac_output is set to yes, then no output
3357# files are written.
3358
3359AC_DEFUN([AC_COIN_FINALIZE],
3360[
3361  AC_OUTPUT
3362
3363  #AC_MSG_NOTICE([In case of trouble, first consult the troubleshooting page at https://projects.coin-or.org/BuildTools/wiki/user-troubleshooting])
3364  AC_MSG_NOTICE([Configuration of $PACKAGE_NAME successful])
3365])
3366
3367# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
3368#
3369#   Copyright (C) 1996-2001, 2003-2015 Free Software Foundation, Inc.
3370#   Written by Gordon Matzigkeit, 1996
3371#
3372# This file is free software; the Free Software Foundation gives
3373# unlimited permission to copy and/or distribute it, with or without
3374# modifications, as long as this notice is preserved.
3375
3376m4_define([_LT_COPYING], [dnl
3377# Copyright (C) 2014 Free Software Foundation, Inc.
3378# This is free software; see the source for copying conditions.  There is NO
3379# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
3380
3381# GNU Libtool is free software; you can redistribute it and/or modify
3382# it under the terms of the GNU General Public License as published by
3383# the Free Software Foundation; either version 2 of of the License, or
3384# (at your option) any later version.
3385#
3386# As a special exception to the GNU General Public License, if you
3387# distribute this file as part of a program or library that is built
3388# using GNU Libtool, you may include this file under the  same
3389# distribution terms that you use for the rest of that program.
3390#
3391# GNU Libtool is distributed in the hope that it will be useful, but
3392# WITHOUT ANY WARRANTY; without even the implied warranty of
3393# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
3394# GNU General Public License for more details.
3395#
3396# You should have received a copy of the GNU General Public License
3397# along with this program.  If not, see <http://www.gnu.org/licenses/>.
3398])
3399
3400# serial 58 LT_INIT
3401
3402
3403# LT_PREREQ(VERSION)
3404# ------------------
3405# Complain and exit if this libtool version is less that VERSION.
3406m4_defun([LT_PREREQ],
3407[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
3408       [m4_default([$3],
3409                   [m4_fatal([Libtool version $1 or higher is required],
3410                             63)])],
3411       [$2])])
3412
3413
3414# _LT_CHECK_BUILDDIR
3415# ------------------
3416# Complain if the absolute build directory name contains unusual characters
3417m4_defun([_LT_CHECK_BUILDDIR],
3418[case `pwd` in
3419  *\ * | *\     *)
3420    AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
3421esac
3422])
3423
3424
3425# LT_INIT([OPTIONS])
3426# ------------------
3427AC_DEFUN([LT_INIT],
3428[AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK
3429AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
3430AC_BEFORE([$0], [LT_LANG])dnl
3431AC_BEFORE([$0], [LT_OUTPUT])dnl
3432AC_BEFORE([$0], [LTDL_INIT])dnl
3433m4_require([_LT_CHECK_BUILDDIR])dnl
3434
3435dnl Autoconf doesn't catch unexpanded LT_ macros by default:
3436m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
3437m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
3438dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
3439dnl unless we require an AC_DEFUNed macro:
3440AC_REQUIRE([LTOPTIONS_VERSION])dnl
3441AC_REQUIRE([LTSUGAR_VERSION])dnl
3442AC_REQUIRE([LTVERSION_VERSION])dnl
3443AC_REQUIRE([LTOBSOLETE_VERSION])dnl
3444m4_require([_LT_PROG_LTMAIN])dnl
3445
3446_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
3447
3448dnl Parse OPTIONS
3449_LT_SET_OPTIONS([$0], [$1])
3450
3451# This can be used to rebuild libtool when needed
3452LIBTOOL_DEPS=$ltmain
3453
3454# Always use our own libtool.
3455LIBTOOL='$(SHELL) $(top_builddir)/libtool'
3456AC_SUBST(LIBTOOL)dnl
3457
3458_LT_SETUP
3459
3460# Only expand once:
3461m4_define([LT_INIT])
3462])# LT_INIT
3463
3464# Old names:
3465AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
3466AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
3467dnl aclocal-1.4 backwards compatibility:
3468dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
3469dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
3470
3471
3472# _LT_PREPARE_CC_BASENAME
3473# -----------------------
3474m4_defun([_LT_PREPARE_CC_BASENAME], [
3475# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
3476func_cc_basename ()
3477{
3478    for cc_temp in @S|@*""; do
3479      case $cc_temp in
3480        compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
3481        distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
3482        \-*) ;;
3483        *) break;;
3484      esac
3485    done
3486    func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
3487}
3488])# _LT_PREPARE_CC_BASENAME
3489
3490
3491# _LT_CC_BASENAME(CC)
3492# -------------------
3493# It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME,
3494# but that macro is also expanded into generated libtool script, which
3495# arranges for $SED and $ECHO to be set by different means.
3496m4_defun([_LT_CC_BASENAME],
3497[m4_require([_LT_PREPARE_CC_BASENAME])dnl
3498AC_REQUIRE([_LT_DECL_SED])dnl
3499AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
3500func_cc_basename $1
3501cc_basename=$func_cc_basename_result
3502])
3503
3504
3505# _LT_FILEUTILS_DEFAULTS
3506# ----------------------
3507# It is okay to use these file commands and assume they have been set
3508# sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'.
3509m4_defun([_LT_FILEUTILS_DEFAULTS],
3510[: ${CP="cp -f"}
3511: ${MV="mv -f"}
3512: ${RM="rm -f"}
3513])# _LT_FILEUTILS_DEFAULTS
3514
3515
3516# _LT_SETUP
3517# ---------
3518m4_defun([_LT_SETUP],
3519[AC_REQUIRE([AC_CANONICAL_HOST])dnl
3520AC_REQUIRE([AC_CANONICAL_BUILD])dnl
3521AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
3522AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
3523
3524_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl
3525dnl
3526_LT_DECL([], [host_alias], [0], [The host system])dnl
3527_LT_DECL([], [host], [0])dnl
3528_LT_DECL([], [host_os], [0])dnl
3529dnl
3530_LT_DECL([], [build_alias], [0], [The build system])dnl
3531_LT_DECL([], [build], [0])dnl
3532_LT_DECL([], [build_os], [0])dnl
3533dnl
3534AC_REQUIRE([AC_PROG_CC])dnl
3535AC_REQUIRE([LT_PATH_LD])dnl
3536AC_REQUIRE([LT_PATH_NM])dnl
3537dnl
3538AC_REQUIRE([AC_PROG_LN_S])dnl
3539test -z "$LN_S" && LN_S="ln -s"
3540_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
3541dnl
3542AC_REQUIRE([LT_CMD_MAX_LEN])dnl
3543_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
3544_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
3545dnl
3546m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3547m4_require([_LT_CHECK_SHELL_FEATURES])dnl
3548m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
3549m4_require([_LT_CMD_RELOAD])dnl
3550m4_require([_LT_CHECK_MAGIC_METHOD])dnl
3551m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
3552m4_require([_LT_CMD_OLD_ARCHIVE])dnl
3553m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
3554m4_require([_LT_WITH_SYSROOT])dnl
3555m4_require([_LT_CMD_TRUNCATE])dnl
3556
3557_LT_CONFIG_LIBTOOL_INIT([
3558# See if we are running on zsh, and set the options that allow our
3559# commands through without removal of \ escapes INIT.
3560if test -n "\${ZSH_VERSION+set}"; then
3561   setopt NO_GLOB_SUBST
3562fi
3563])
3564if test -n "${ZSH_VERSION+set}"; then
3565   setopt NO_GLOB_SUBST
3566fi
3567
3568_LT_CHECK_OBJDIR
3569
3570m4_require([_LT_TAG_COMPILER])dnl
3571
3572case $host_os in
3573aix3*)
3574  # AIX sometimes has problems with the GCC collect2 program.  For some
3575  # reason, if we set the COLLECT_NAMES environment variable, the problems
3576  # vanish in a puff of smoke.
3577  if test set != "${COLLECT_NAMES+set}"; then
3578    COLLECT_NAMES=
3579    export COLLECT_NAMES
3580  fi
3581  ;;
3582esac
3583
3584# Global variables:
3585ofile=libtool
3586can_build_shared=yes
3587
3588# All known linkers require a '.a' archive for static linking (except MSVC,
3589# which needs '.lib').
3590libext=a
3591
3592with_gnu_ld=$lt_cv_prog_gnu_ld
3593
3594old_CC=$CC
3595old_CFLAGS=$CFLAGS
3596
3597# Set sane defaults for various variables
3598test -z "$CC" && CC=cc
3599test -z "$LTCC" && LTCC=$CC
3600test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
3601test -z "$LD" && LD=ld
3602test -z "$ac_objext" && ac_objext=o
3603
3604_LT_CC_BASENAME([$compiler])
3605
3606# Only perform the check for file, if the check method requires it
3607test -z "$MAGIC_CMD" && MAGIC_CMD=file
3608case $deplibs_check_method in
3609file_magic*)
3610  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
3611    _LT_PATH_MAGIC
3612  fi
3613  ;;
3614esac
3615
3616# Use C for the default configuration in the libtool script
3617LT_SUPPORTED_TAG([CC])
3618_LT_LANG_C_CONFIG
3619_LT_LANG_DEFAULT_CONFIG
3620_LT_CONFIG_COMMANDS
3621])# _LT_SETUP
3622
3623
3624# _LT_PREPARE_SED_QUOTE_VARS
3625# --------------------------
3626# Define a few sed substitution that help us do robust quoting.
3627m4_defun([_LT_PREPARE_SED_QUOTE_VARS],
3628[# Backslashify metacharacters that are still active within
3629# double-quoted strings.
3630sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
3631
3632# Same as above, but do not quote variable references.
3633double_quote_subst='s/\([["`\\]]\)/\\\1/g'
3634
3635# Sed substitution to delay expansion of an escaped shell variable in a
3636# double_quote_subst'ed string.
3637delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
3638
3639# Sed substitution to delay expansion of an escaped single quote.
3640delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
3641
3642# Sed substitution to avoid accidental globbing in evaled expressions
3643no_glob_subst='s/\*/\\\*/g'
3644])
3645
3646# _LT_PROG_LTMAIN
3647# ---------------
3648# Note that this code is called both from 'configure', and 'config.status'
3649# now that we use AC_CONFIG_COMMANDS to generate libtool.  Notably,
3650# 'config.status' has no value for ac_aux_dir unless we are using Automake,
3651# so we pass a copy along to make sure it has a sensible value anyway.
3652m4_defun([_LT_PROG_LTMAIN],
3653[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
3654_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
3655ltmain=$ac_aux_dir/ltmain.sh
3656])# _LT_PROG_LTMAIN
3657
3658
3659
3660# So that we can recreate a full libtool script including additional
3661# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
3662# in macros and then make a single call at the end using the 'libtool'
3663# label.
3664
3665
3666# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
3667# ----------------------------------------
3668# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
3669m4_define([_LT_CONFIG_LIBTOOL_INIT],
3670[m4_ifval([$1],
3671          [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
3672                     [$1
3673])])])
3674
3675# Initialize.
3676m4_define([_LT_OUTPUT_LIBTOOL_INIT])
3677
3678
3679# _LT_CONFIG_LIBTOOL([COMMANDS])
3680# ------------------------------
3681# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
3682m4_define([_LT_CONFIG_LIBTOOL],
3683[m4_ifval([$1],
3684          [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
3685                     [$1
3686])])])
3687
3688# Initialize.
3689m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
3690
3691
3692# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
3693# -----------------------------------------------------
3694m4_defun([_LT_CONFIG_SAVE_COMMANDS],
3695[_LT_CONFIG_LIBTOOL([$1])
3696_LT_CONFIG_LIBTOOL_INIT([$2])
3697])
3698
3699
3700# _LT_FORMAT_COMMENT([COMMENT])
3701# -----------------------------
3702# Add leading comment marks to the start of each line, and a trailing
3703# full-stop to the whole comment if one is not present already.
3704m4_define([_LT_FORMAT_COMMENT],
3705[m4_ifval([$1], [
3706m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
3707              [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
3708)])
3709
3710
3711
3712
3713
3714# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
3715# -------------------------------------------------------------------
3716# CONFIGNAME is the name given to the value in the libtool script.
3717# VARNAME is the (base) name used in the configure script.
3718# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
3719# VARNAME.  Any other value will be used directly.
3720m4_define([_LT_DECL],
3721[lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
3722    [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
3723        [m4_ifval([$1], [$1], [$2])])
3724    lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
3725    m4_ifval([$4],
3726        [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
3727    lt_dict_add_subkey([lt_decl_dict], [$2],
3728        [tagged?], [m4_ifval([$5], [yes], [no])])])
3729])
3730
3731
3732# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
3733# --------------------------------------------------------
3734m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
3735
3736
3737# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
3738# ------------------------------------------------
3739m4_define([lt_decl_tag_varnames],
3740[_lt_decl_filter([tagged?], [yes], $@)])
3741
3742
3743# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
3744# ---------------------------------------------------------
3745m4_define([_lt_decl_filter],
3746[m4_case([$#],
3747  [0], [m4_fatal([$0: too few arguments: $#])],
3748  [1], [m4_fatal([$0: too few arguments: $#: $1])],
3749  [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
3750  [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
3751  [lt_dict_filter([lt_decl_dict], $@)])[]dnl
3752])
3753
3754
3755# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
3756# --------------------------------------------------
3757m4_define([lt_decl_quote_varnames],
3758[_lt_decl_filter([value], [1], $@)])
3759
3760
3761# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
3762# ---------------------------------------------------
3763m4_define([lt_decl_dquote_varnames],
3764[_lt_decl_filter([value], [2], $@)])
3765
3766
3767# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
3768# ---------------------------------------------------
3769m4_define([lt_decl_varnames_tagged],
3770[m4_assert([$# <= 2])dnl
3771_$0(m4_quote(m4_default([$1], [[, ]])),
3772    m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
3773    m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
3774m4_define([_lt_decl_varnames_tagged],
3775[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
3776
3777
3778# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
3779# ------------------------------------------------
3780m4_define([lt_decl_all_varnames],
3781[_$0(m4_quote(m4_default([$1], [[, ]])),
3782     m4_if([$2], [],
3783           m4_quote(lt_decl_varnames),
3784        m4_quote(m4_shift($@))))[]dnl
3785])
3786m4_define([_lt_decl_all_varnames],
3787[lt_join($@, lt_decl_varnames_tagged([$1],
3788                        lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
3789])
3790
3791
3792# _LT_CONFIG_STATUS_DECLARE([VARNAME])
3793# ------------------------------------
3794# Quote a variable value, and forward it to 'config.status' so that its
3795# declaration there will have the same value as in 'configure'.  VARNAME
3796# must have a single quote delimited value for this to work.
3797m4_define([_LT_CONFIG_STATUS_DECLARE],
3798[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
3799
3800
3801# _LT_CONFIG_STATUS_DECLARATIONS
3802# ------------------------------
3803# We delimit libtool config variables with single quotes, so when
3804# we write them to config.status, we have to be sure to quote all
3805# embedded single quotes properly.  In configure, this macro expands
3806# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
3807#
3808#    <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
3809m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
3810[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
3811    [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
3812
3813
3814# _LT_LIBTOOL_TAGS
3815# ----------------
3816# Output comment and list of tags supported by the script
3817m4_defun([_LT_LIBTOOL_TAGS],
3818[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
3819available_tags='_LT_TAGS'dnl
3820])
3821
3822
3823# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
3824# -----------------------------------
3825# Extract the dictionary values for VARNAME (optionally with TAG) and
3826# expand to a commented shell variable setting:
3827#
3828#    # Some comment about what VAR is for.
3829#    visible_name=$lt_internal_name
3830m4_define([_LT_LIBTOOL_DECLARE],
3831[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
3832                                           [description])))[]dnl
3833m4_pushdef([_libtool_name],
3834    m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
3835m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
3836    [0], [_libtool_name=[$]$1],
3837    [1], [_libtool_name=$lt_[]$1],
3838    [2], [_libtool_name=$lt_[]$1],
3839    [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
3840m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
3841])
3842
3843
3844# _LT_LIBTOOL_CONFIG_VARS
3845# -----------------------
3846# Produce commented declarations of non-tagged libtool config variables
3847# suitable for insertion in the LIBTOOL CONFIG section of the 'libtool'
3848# script.  Tagged libtool config variables (even for the LIBTOOL CONFIG
3849# section) are produced by _LT_LIBTOOL_TAG_VARS.
3850m4_defun([_LT_LIBTOOL_CONFIG_VARS],
3851[m4_foreach([_lt_var],
3852    m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
3853    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
3854
3855
3856# _LT_LIBTOOL_TAG_VARS(TAG)
3857# -------------------------
3858m4_define([_LT_LIBTOOL_TAG_VARS],
3859[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
3860    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
3861
3862
3863# _LT_TAGVAR(VARNAME, [TAGNAME])
3864# ------------------------------
3865m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
3866
3867
3868# _LT_CONFIG_COMMANDS
3869# -------------------
3870# Send accumulated output to $CONFIG_STATUS.  Thanks to the lists of
3871# variables for single and double quote escaping we saved from calls
3872# to _LT_DECL, we can put quote escaped variables declarations
3873# into 'config.status', and then the shell code to quote escape them in
3874# for loops in 'config.status'.  Finally, any additional code accumulated
3875# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
3876m4_defun([_LT_CONFIG_COMMANDS],
3877[AC_PROVIDE_IFELSE([LT_OUTPUT],
3878        dnl If the libtool generation code has been placed in $CONFIG_LT,
3879        dnl instead of duplicating it all over again into config.status,
3880        dnl then we will have config.status run $CONFIG_LT later, so it
3881        dnl needs to know what name is stored there:
3882        [AC_CONFIG_COMMANDS([libtool],
3883            [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
3884    dnl If the libtool generation code is destined for config.status,
3885    dnl expand the accumulated commands and init code now:
3886    [AC_CONFIG_COMMANDS([libtool],
3887        [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
3888])#_LT_CONFIG_COMMANDS
3889
3890
3891# Initialize.
3892m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
3893[
3894
3895# The HP-UX ksh and POSIX shell print the target directory to stdout
3896# if CDPATH is set.
3897(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
3898
3899sed_quote_subst='$sed_quote_subst'
3900double_quote_subst='$double_quote_subst'
3901delay_variable_subst='$delay_variable_subst'
3902_LT_CONFIG_STATUS_DECLARATIONS
3903LTCC='$LTCC'
3904LTCFLAGS='$LTCFLAGS'
3905compiler='$compiler_DEFAULT'
3906
3907# A function that is used when there is no print builtin or printf.
3908func_fallback_echo ()
3909{
3910  eval 'cat <<_LTECHO_EOF
3911\$[]1
3912_LTECHO_EOF'
3913}
3914
3915# Quote evaled strings.
3916for var in lt_decl_all_varnames([[ \
3917]], lt_decl_quote_varnames); do
3918    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
3919    *[[\\\\\\\`\\"\\\$]]*)
3920      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
3921      ;;
3922    *)
3923      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
3924      ;;
3925    esac
3926done
3927
3928# Double-quote double-evaled strings.
3929for var in lt_decl_all_varnames([[ \
3930]], lt_decl_dquote_varnames); do
3931    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
3932    *[[\\\\\\\`\\"\\\$]]*)
3933      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
3934      ;;
3935    *)
3936      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
3937      ;;
3938    esac
3939done
3940
3941_LT_OUTPUT_LIBTOOL_INIT
3942])
3943
3944# _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
3945# ------------------------------------
3946# Generate a child script FILE with all initialization necessary to
3947# reuse the environment learned by the parent script, and make the
3948# file executable.  If COMMENT is supplied, it is inserted after the
3949# '#!' sequence but before initialization text begins.  After this
3950# macro, additional text can be appended to FILE to form the body of
3951# the child script.  The macro ends with non-zero status if the
3952# file could not be fully written (such as if the disk is full).
3953m4_ifdef([AS_INIT_GENERATED],
3954[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
3955[m4_defun([_LT_GENERATED_FILE_INIT],
3956[m4_require([AS_PREPARE])]dnl
3957[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
3958[lt_write_fail=0
3959cat >$1 <<_ASEOF || lt_write_fail=1
3960#! $SHELL
3961# Generated by $as_me.
3962$2
3963SHELL=\${CONFIG_SHELL-$SHELL}
3964export SHELL
3965_ASEOF
3966cat >>$1 <<\_ASEOF || lt_write_fail=1
3967AS_SHELL_SANITIZE
3968_AS_PREPARE
3969exec AS_MESSAGE_FD>&1
3970_ASEOF
3971test 0 = "$lt_write_fail" && chmod +x $1[]dnl
3972m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
3973
3974# LT_OUTPUT
3975# ---------
3976# This macro allows early generation of the libtool script (before
3977# AC_OUTPUT is called), incase it is used in configure for compilation
3978# tests.
3979AC_DEFUN([LT_OUTPUT],
3980[: ${CONFIG_LT=./config.lt}
3981AC_MSG_NOTICE([creating $CONFIG_LT])
3982_LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
3983[# Run this file to recreate a libtool stub with the current configuration.])
3984
3985cat >>"$CONFIG_LT" <<\_LTEOF
3986lt_cl_silent=false
3987exec AS_MESSAGE_LOG_FD>>config.log
3988{
3989  echo
3990  AS_BOX([Running $as_me.])
3991} >&AS_MESSAGE_LOG_FD
3992
3993lt_cl_help="\
3994'$as_me' creates a local libtool stub from the current configuration,
3995for use in further configure time tests before the real libtool is
3996generated.
3997
3998Usage: $[0] [[OPTIONS]]
3999
4000  -h, --help      print this help, then exit
4001  -V, --version   print version number, then exit
4002  -q, --quiet     do not print progress messages
4003  -d, --debug     don't remove temporary files
4004
4005Report bugs to <bug-libtool@gnu.org>."
4006
4007lt_cl_version="\
4008m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
4009m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
4010configured by $[0], generated by m4_PACKAGE_STRING.
4011
4012Copyright (C) 2011 Free Software Foundation, Inc.
4013This config.lt script is free software; the Free Software Foundation
4014gives unlimited permision to copy, distribute and modify it."
4015
4016while test 0 != $[#]
4017do
4018  case $[1] in
4019    --version | --v* | -V )
4020      echo "$lt_cl_version"; exit 0 ;;
4021    --help | --h* | -h )
4022      echo "$lt_cl_help"; exit 0 ;;
4023    --debug | --d* | -d )
4024      debug=: ;;
4025    --quiet | --q* | --silent | --s* | -q )
4026      lt_cl_silent=: ;;
4027
4028    -*) AC_MSG_ERROR([unrecognized option: $[1]
4029Try '$[0] --help' for more information.]) ;;
4030
4031    *) AC_MSG_ERROR([unrecognized argument: $[1]
4032Try '$[0] --help' for more information.]) ;;
4033  esac
4034  shift
4035done
4036
4037if $lt_cl_silent; then
4038  exec AS_MESSAGE_FD>/dev/null
4039fi
4040_LTEOF
4041
4042cat >>"$CONFIG_LT" <<_LTEOF
4043_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
4044_LTEOF
4045
4046cat >>"$CONFIG_LT" <<\_LTEOF
4047AC_MSG_NOTICE([creating $ofile])
4048_LT_OUTPUT_LIBTOOL_COMMANDS
4049AS_EXIT(0)
4050_LTEOF
4051chmod +x "$CONFIG_LT"
4052
4053# configure is writing to config.log, but config.lt does its own redirection,
4054# appending to config.log, which fails on DOS, as config.log is still kept
4055# open by configure.  Here we exec the FD to /dev/null, effectively closing
4056# config.log, so it can be properly (re)opened and appended to by config.lt.
4057lt_cl_success=:
4058test yes = "$silent" &&
4059  lt_config_lt_args="$lt_config_lt_args --quiet"
4060exec AS_MESSAGE_LOG_FD>/dev/null
4061$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
4062exec AS_MESSAGE_LOG_FD>>config.log
4063$lt_cl_success || AS_EXIT(1)
4064])# LT_OUTPUT
4065
4066
4067# _LT_CONFIG(TAG)
4068# ---------------
4069# If TAG is the built-in tag, create an initial libtool script with a
4070# default configuration from the untagged config vars.  Otherwise add code
4071# to config.status for appending the configuration named by TAG from the
4072# matching tagged config vars.
4073m4_defun([_LT_CONFIG],
4074[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
4075_LT_CONFIG_SAVE_COMMANDS([
4076  m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
4077  m4_if(_LT_TAG, [C], [
4078    # See if we are running on zsh, and set the options that allow our
4079    # commands through without removal of \ escapes.
4080    if test -n "${ZSH_VERSION+set}"; then
4081      setopt NO_GLOB_SUBST
4082    fi
4083
4084    cfgfile=${ofile}T
4085    trap "$RM \"$cfgfile\"; exit 1" 1 2 15
4086    $RM "$cfgfile"
4087
4088    cat <<_LT_EOF >> "$cfgfile"
4089#! $SHELL
4090# Generated automatically by $as_me ($PACKAGE) $VERSION
4091# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
4092# NOTE: Changes made to this file will be lost: look at ltmain.sh.
4093
4094# Provide generalized library-building support services.
4095# Written by Gordon Matzigkeit, 1996
4096
4097_LT_COPYING
4098_LT_LIBTOOL_TAGS
4099
4100# Configured defaults for sys_lib_dlsearch_path munging.
4101: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"}
4102
4103# ### BEGIN LIBTOOL CONFIG
4104_LT_LIBTOOL_CONFIG_VARS
4105_LT_LIBTOOL_TAG_VARS
4106# ### END LIBTOOL CONFIG
4107
4108_LT_EOF
4109
4110    cat <<'_LT_EOF' >> "$cfgfile"
4111
4112# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE
4113
4114_LT_PREPARE_MUNGE_PATH_LIST
4115_LT_PREPARE_CC_BASENAME
4116
4117# ### END FUNCTIONS SHARED WITH CONFIGURE
4118
4119_LT_EOF
4120
4121  case $host_os in
4122  aix3*)
4123    cat <<\_LT_EOF >> "$cfgfile"
4124# AIX sometimes has problems with the GCC collect2 program.  For some
4125# reason, if we set the COLLECT_NAMES environment variable, the problems
4126# vanish in a puff of smoke.
4127if test set != "${COLLECT_NAMES+set}"; then
4128  COLLECT_NAMES=
4129  export COLLECT_NAMES
4130fi
4131_LT_EOF
4132    ;;
4133  esac
4134
4135  _LT_PROG_LTMAIN
4136
4137  # We use sed instead of cat because bash on DJGPP gets confused if
4138  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
4139  # text mode, it properly converts lines to CR/LF.  This bash problem
4140  # is reportedly fixed, but why not run on old versions too?
4141  sed '$q' "$ltmain" >> "$cfgfile" \
4142     || (rm -f "$cfgfile"; exit 1)
4143
4144   mv -f "$cfgfile" "$ofile" ||
4145    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
4146  chmod +x "$ofile"
4147],
4148[cat <<_LT_EOF >> "$ofile"
4149
4150dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
4151dnl in a comment (ie after a #).
4152# ### BEGIN LIBTOOL TAG CONFIG: $1
4153_LT_LIBTOOL_TAG_VARS(_LT_TAG)
4154# ### END LIBTOOL TAG CONFIG: $1
4155_LT_EOF
4156])dnl /m4_if
4157],
4158[m4_if([$1], [], [
4159    PACKAGE='$PACKAGE'
4160    VERSION='$VERSION'
4161    RM='$RM'
4162    ofile='$ofile'], [])
4163])dnl /_LT_CONFIG_SAVE_COMMANDS
4164])# _LT_CONFIG
4165
4166
4167# LT_SUPPORTED_TAG(TAG)
4168# ---------------------
4169# Trace this macro to discover what tags are supported by the libtool
4170# --tag option, using:
4171#    autoconf --trace 'LT_SUPPORTED_TAG:$1'
4172AC_DEFUN([LT_SUPPORTED_TAG], [])
4173
4174
4175# C support is built-in for now
4176m4_define([_LT_LANG_C_enabled], [])
4177m4_define([_LT_TAGS], [])
4178
4179
4180# LT_LANG(LANG)
4181# -------------
4182# Enable libtool support for the given language if not already enabled.
4183AC_DEFUN([LT_LANG],
4184[AC_BEFORE([$0], [LT_OUTPUT])dnl
4185m4_case([$1],
4186  [C],                  [_LT_LANG(C)],
4187  [C++],                [_LT_LANG(CXX)],
4188  [Go],                 [_LT_LANG(GO)],
4189  [Java],               [_LT_LANG(GCJ)],
4190  [Fortran 77],         [_LT_LANG(F77)],
4191  [Fortran],            [_LT_LANG(FC)],
4192  [Windows Resource],   [_LT_LANG(RC)],
4193  [m4_ifdef([_LT_LANG_]$1[_CONFIG],
4194    [_LT_LANG($1)],
4195    [m4_fatal([$0: unsupported language: "$1"])])])dnl
4196])# LT_LANG
4197
4198
4199# _LT_LANG(LANGNAME)
4200# ------------------
4201m4_defun([_LT_LANG],
4202[m4_ifdef([_LT_LANG_]$1[_enabled], [],
4203  [LT_SUPPORTED_TAG([$1])dnl
4204  m4_append([_LT_TAGS], [$1 ])dnl
4205  m4_define([_LT_LANG_]$1[_enabled], [])dnl
4206  _LT_LANG_$1_CONFIG($1)])dnl
4207])# _LT_LANG
4208
4209
4210m4_ifndef([AC_PROG_GO], [
4211# NOTE: This macro has been submitted for inclusion into   #
4212#  GNU Autoconf as AC_PROG_GO.  When it is available in    #
4213#  a released version of Autoconf we should remove this    #
4214#  macro and use it instead.                               #
4215m4_defun([AC_PROG_GO],
4216[AC_LANG_PUSH(Go)dnl
4217AC_ARG_VAR([GOC],     [Go compiler command])dnl
4218AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl
4219_AC_ARG_VAR_LDFLAGS()dnl
4220AC_CHECK_TOOL(GOC, gccgo)
4221if test -z "$GOC"; then
4222  if test -n "$ac_tool_prefix"; then
4223    AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo])
4224  fi
4225fi
4226if test -z "$GOC"; then
4227  AC_CHECK_PROG(GOC, gccgo, gccgo, false)
4228fi
4229])#m4_defun
4230])#m4_ifndef
4231
4232
4233# _LT_LANG_DEFAULT_CONFIG
4234# -----------------------
4235m4_defun([_LT_LANG_DEFAULT_CONFIG],
4236[AC_PROVIDE_IFELSE([AC_PROG_CXX],
4237  [LT_LANG(CXX)],
4238  [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
4239
4240AC_PROVIDE_IFELSE([AC_PROG_F77],
4241  [LT_LANG(F77)],
4242  [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
4243
4244AC_PROVIDE_IFELSE([AC_PROG_FC],
4245  [LT_LANG(FC)],
4246  [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
4247
4248dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
4249dnl pulling things in needlessly.
4250AC_PROVIDE_IFELSE([AC_PROG_GCJ],
4251  [LT_LANG(GCJ)],
4252  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
4253    [LT_LANG(GCJ)],
4254    [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
4255      [LT_LANG(GCJ)],
4256      [m4_ifdef([AC_PROG_GCJ],
4257        [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
4258       m4_ifdef([A][M_PROG_GCJ],
4259        [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
4260       m4_ifdef([LT_PROG_GCJ],
4261        [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
4262
4263AC_PROVIDE_IFELSE([AC_PROG_GO],
4264  [LT_LANG(GO)],
4265  [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])])
4266
4267AC_PROVIDE_IFELSE([LT_PROG_RC],
4268  [LT_LANG(RC)],
4269  [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
4270])# _LT_LANG_DEFAULT_CONFIG
4271
4272# Obsolete macros:
4273AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
4274AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
4275AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
4276AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
4277AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
4278dnl aclocal-1.4 backwards compatibility:
4279dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
4280dnl AC_DEFUN([AC_LIBTOOL_F77], [])
4281dnl AC_DEFUN([AC_LIBTOOL_FC], [])
4282dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
4283dnl AC_DEFUN([AC_LIBTOOL_RC], [])
4284
4285
4286# _LT_TAG_COMPILER
4287# ----------------
4288m4_defun([_LT_TAG_COMPILER],
4289[AC_REQUIRE([AC_PROG_CC])dnl
4290
4291_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
4292_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
4293_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
4294_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
4295
4296# If no C compiler was specified, use CC.
4297LTCC=${LTCC-"$CC"}
4298
4299# If no C compiler flags were specified, use CFLAGS.
4300LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
4301
4302# Allow CC to be a program name with arguments.
4303compiler=$CC
4304])# _LT_TAG_COMPILER
4305
4306
4307# _LT_COMPILER_BOILERPLATE
4308# ------------------------
4309# Check for compiler boilerplate output or warnings with
4310# the simple compiler test code.
4311m4_defun([_LT_COMPILER_BOILERPLATE],
4312[m4_require([_LT_DECL_SED])dnl
4313ac_outfile=conftest.$ac_objext
4314echo "$lt_simple_compile_test_code" >conftest.$ac_ext
4315eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
4316_lt_compiler_boilerplate=`cat conftest.err`
4317$RM conftest*
4318])# _LT_COMPILER_BOILERPLATE
4319
4320
4321# _LT_LINKER_BOILERPLATE
4322# ----------------------
4323# Check for linker boilerplate output or warnings with
4324# the simple link test code.
4325m4_defun([_LT_LINKER_BOILERPLATE],
4326[m4_require([_LT_DECL_SED])dnl
4327ac_outfile=conftest.$ac_objext
4328echo "$lt_simple_link_test_code" >conftest.$ac_ext
4329eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
4330_lt_linker_boilerplate=`cat conftest.err`
4331$RM -r conftest*
4332])# _LT_LINKER_BOILERPLATE
4333
4334# _LT_REQUIRED_DARWIN_CHECKS
4335# -------------------------
4336m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
4337  case $host_os in
4338    rhapsody* | darwin*)
4339    AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
4340    AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
4341    AC_CHECK_TOOL([LIPO], [lipo], [:])
4342    AC_CHECK_TOOL([OTOOL], [otool], [:])
4343    AC_CHECK_TOOL([OTOOL64], [otool64], [:])
4344    _LT_DECL([], [DSYMUTIL], [1],
4345      [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
4346    _LT_DECL([], [NMEDIT], [1],
4347      [Tool to change global to local symbols on Mac OS X])
4348    _LT_DECL([], [LIPO], [1],
4349      [Tool to manipulate fat objects and archives on Mac OS X])
4350    _LT_DECL([], [OTOOL], [1],
4351      [ldd/readelf like tool for Mach-O binaries on Mac OS X])
4352    _LT_DECL([], [OTOOL64], [1],
4353      [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
4354
4355    AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
4356      [lt_cv_apple_cc_single_mod=no
4357      if test -z "$LT_MULTI_MODULE"; then
4358        # By default we will add the -single_module flag. You can override
4359        # by either setting the environment variable LT_MULTI_MODULE
4360        # non-empty at configure time, or by adding -multi_module to the
4361        # link flags.
4362        rm -rf libconftest.dylib*
4363        echo "int foo(void){return 1;}" > conftest.c
4364        echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
4365-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
4366        $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
4367          -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
4368        _lt_result=$?
4369        # If there is a non-empty error log, and "single_module"
4370        # appears in it, assume the flag caused a linker warning
4371        if test -s conftest.err && $GREP single_module conftest.err; then
4372          cat conftest.err >&AS_MESSAGE_LOG_FD
4373        # Otherwise, if the output was created with a 0 exit code from
4374        # the compiler, it worked.
4375        elif test -f libconftest.dylib && test 0 = "$_lt_result"; then
4376          lt_cv_apple_cc_single_mod=yes
4377        else
4378          cat conftest.err >&AS_MESSAGE_LOG_FD
4379        fi
4380        rm -rf libconftest.dylib*
4381        rm -f conftest.*
4382      fi])
4383
4384    AC_CACHE_CHECK([for -exported_symbols_list linker flag],
4385      [lt_cv_ld_exported_symbols_list],
4386      [lt_cv_ld_exported_symbols_list=no
4387      save_LDFLAGS=$LDFLAGS
4388      echo "_main" > conftest.sym
4389      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
4390      AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
4391        [lt_cv_ld_exported_symbols_list=yes],
4392        [lt_cv_ld_exported_symbols_list=no])
4393        LDFLAGS=$save_LDFLAGS
4394    ])
4395
4396    AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
4397      [lt_cv_ld_force_load=no
4398      cat > conftest.c << _LT_EOF
4399int forced_loaded() { return 2;}
4400_LT_EOF
4401      echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
4402      $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
4403      echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
4404      $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
4405      echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
4406      $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
4407      cat > conftest.c << _LT_EOF
4408int main() { return 0;}
4409_LT_EOF
4410      echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
4411      $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
4412      _lt_result=$?
4413      if test -s conftest.err && $GREP force_load conftest.err; then
4414        cat conftest.err >&AS_MESSAGE_LOG_FD
4415      elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then
4416        lt_cv_ld_force_load=yes
4417      else
4418        cat conftest.err >&AS_MESSAGE_LOG_FD
4419      fi
4420        rm -f conftest.err libconftest.a conftest conftest.c
4421        rm -rf conftest.dSYM
4422    ])
4423    case $host_os in
4424    rhapsody* | darwin1.[[012]])
4425      _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
4426    darwin1.*)
4427      _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
4428    darwin*) # darwin 5.x on
4429      # if running on 10.5 or later, the deployment target defaults
4430      # to the OS version, if on x86, and 10.4, the deployment
4431      # target defaults to 10.4. Don't you love it?
4432      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
4433        10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
4434          _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
4435        10.[[012]][[,.]]*)
4436          _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
4437        10.*)
4438          _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
4439      esac
4440    ;;
4441  esac
4442    if test yes = "$lt_cv_apple_cc_single_mod"; then
4443      _lt_dar_single_mod='$single_module'
4444    fi
4445    if test yes = "$lt_cv_ld_exported_symbols_list"; then
4446      _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym'
4447    else
4448      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib'
4449    fi
4450    if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then
4451      _lt_dsymutil='~$DSYMUTIL $lib || :'
4452    else
4453      _lt_dsymutil=
4454    fi
4455    ;;
4456  esac
4457])
4458
4459
4460# _LT_DARWIN_LINKER_FEATURES([TAG])
4461# ---------------------------------
4462# Checks for linker and compiler features on darwin
4463m4_defun([_LT_DARWIN_LINKER_FEATURES],
4464[
4465  m4_require([_LT_REQUIRED_DARWIN_CHECKS])
4466  _LT_TAGVAR(archive_cmds_need_lc, $1)=no
4467  _LT_TAGVAR(hardcode_direct, $1)=no
4468  _LT_TAGVAR(hardcode_automatic, $1)=yes
4469  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
4470  if test yes = "$lt_cv_ld_force_load"; then
4471    _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
4472    m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes],
4473                  [FC],  [_LT_TAGVAR(compiler_needs_object, $1)=yes])
4474  else
4475    _LT_TAGVAR(whole_archive_flag_spec, $1)=''
4476  fi
4477  _LT_TAGVAR(link_all_deplibs, $1)=yes
4478  _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined
4479  case $cc_basename in
4480     ifort*|nagfor*) _lt_dar_can_shared=yes ;;
4481     *) _lt_dar_can_shared=$GCC ;;
4482  esac
4483  if test yes = "$_lt_dar_can_shared"; then
4484    output_verbose_link_cmd=func_echo_all
4485    _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil"
4486    _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
4487    _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil"
4488    _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil"
4489    m4_if([$1], [CXX],
4490[   if test yes != "$lt_cv_apple_cc_single_mod"; then
4491      _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dsymutil"
4492      _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil"
4493    fi
4494],[])
4495  else
4496  _LT_TAGVAR(ld_shlibs, $1)=no
4497  fi
4498])
4499
4500# _LT_SYS_MODULE_PATH_AIX([TAGNAME])
4501# ----------------------------------
4502# Links a minimal program and checks the executable
4503# for the system default hardcoded library path. In most cases,
4504# this is /usr/lib:/lib, but when the MPI compilers are used
4505# the location of the communication and MPI libs are included too.
4506# If we don't find anything, use the default library path according
4507# to the aix ld manual.
4508# Store the results from the different compilers for each TAGNAME.
4509# Allow to override them for all tags through lt_cv_aix_libpath.
4510m4_defun([_LT_SYS_MODULE_PATH_AIX],
4511[m4_require([_LT_DECL_SED])dnl
4512if test set = "${lt_cv_aix_libpath+set}"; then
4513  aix_libpath=$lt_cv_aix_libpath
4514else
4515  AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
4516  [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
4517  lt_aix_libpath_sed='[
4518      /Import File Strings/,/^$/ {
4519          /^0/ {
4520              s/^0  *\([^ ]*\) *$/\1/
4521              p
4522          }
4523      }]'
4524  _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
4525  # Check for a 64-bit object if we didn't find anything.
4526  if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
4527    _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
4528  fi],[])
4529  if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
4530    _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib
4531  fi
4532  ])
4533  aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
4534fi
4535])# _LT_SYS_MODULE_PATH_AIX
4536
4537
4538# _LT_SHELL_INIT(ARG)
4539# -------------------
4540m4_define([_LT_SHELL_INIT],
4541[m4_divert_text([M4SH-INIT], [$1
4542])])# _LT_SHELL_INIT
4543
4544
4545
4546# _LT_PROG_ECHO_BACKSLASH
4547# -----------------------
4548# Find how we can fake an echo command that does not interpret backslash.
4549# In particular, with Autoconf 2.60 or later we add some code to the start
4550# of the generated configure script that will find a shell with a builtin
4551# printf (that we can use as an echo command).
4552m4_defun([_LT_PROG_ECHO_BACKSLASH],
4553[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
4554ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
4555ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
4556
4557AC_MSG_CHECKING([how to print strings])
4558# Test print first, because it will be a builtin if present.
4559if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
4560   test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
4561  ECHO='print -r --'
4562elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
4563  ECHO='printf %s\n'
4564else
4565  # Use this function as a fallback that always works.
4566  func_fallback_echo ()
4567  {
4568    eval 'cat <<_LTECHO_EOF
4569$[]1
4570_LTECHO_EOF'
4571  }
4572  ECHO='func_fallback_echo'
4573fi
4574
4575# func_echo_all arg...
4576# Invoke $ECHO with all args, space-separated.
4577func_echo_all ()
4578{
4579    $ECHO "$*"
4580}
4581
4582case $ECHO in
4583  printf*) AC_MSG_RESULT([printf]) ;;
4584  print*) AC_MSG_RESULT([print -r]) ;;
4585  *) AC_MSG_RESULT([cat]) ;;
4586esac
4587
4588m4_ifdef([_AS_DETECT_SUGGESTED],
4589[_AS_DETECT_SUGGESTED([
4590  test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
4591    ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
4592    ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
4593    ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
4594    PATH=/empty FPATH=/empty; export PATH FPATH
4595    test "X`printf %s $ECHO`" = "X$ECHO" \
4596      || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
4597
4598_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
4599_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
4600])# _LT_PROG_ECHO_BACKSLASH
4601
4602
4603# _LT_WITH_SYSROOT
4604# ----------------
4605AC_DEFUN([_LT_WITH_SYSROOT],
4606[AC_MSG_CHECKING([for sysroot])
4607AC_ARG_WITH([sysroot],
4608[AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@],
4609  [Search for dependent libraries within DIR (or the compiler's sysroot
4610   if not specified).])],
4611[], [with_sysroot=no])
4612
4613dnl lt_sysroot will always be passed unquoted.  We quote it here
4614dnl in case the user passed a directory name.
4615lt_sysroot=
4616case $with_sysroot in #(
4617 yes)
4618   if test yes = "$GCC"; then
4619     lt_sysroot=`$CC --print-sysroot 2>/dev/null`
4620   fi
4621   ;; #(
4622 /*)
4623   lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
4624   ;; #(
4625 no|'')
4626   ;; #(
4627 *)
4628   AC_MSG_RESULT([$with_sysroot])
4629   AC_MSG_ERROR([The sysroot must be an absolute path.])
4630   ;;
4631esac
4632
4633 AC_MSG_RESULT([${lt_sysroot:-no}])
4634_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
4635[dependent libraries, and where our libraries should be installed.])])
4636
4637# _LT_ENABLE_LOCK
4638# ---------------
4639m4_defun([_LT_ENABLE_LOCK],
4640[AC_ARG_ENABLE([libtool-lock],
4641  [AS_HELP_STRING([--disable-libtool-lock],
4642    [avoid locking (might break parallel builds)])])
4643test no = "$enable_libtool_lock" || enable_libtool_lock=yes
4644
4645# Some flags need to be propagated to the compiler or linker for good
4646# libtool support.
4647case $host in
4648ia64-*-hpux*)
4649  # Find out what ABI is being produced by ac_compile, and set mode
4650  # options accordingly.
4651  echo 'int i;' > conftest.$ac_ext
4652  if AC_TRY_EVAL(ac_compile); then
4653    case `/usr/bin/file conftest.$ac_objext` in
4654      *ELF-32*)
4655        HPUX_IA64_MODE=32
4656        ;;
4657      *ELF-64*)
4658        HPUX_IA64_MODE=64
4659        ;;
4660    esac
4661  fi
4662  rm -rf conftest*
4663  ;;
4664*-*-irix6*)
4665  # Find out what ABI is being produced by ac_compile, and set linker
4666  # options accordingly.
4667  echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
4668  if AC_TRY_EVAL(ac_compile); then
4669    if test yes = "$lt_cv_prog_gnu_ld"; then
4670      case `/usr/bin/file conftest.$ac_objext` in
4671        *32-bit*)
4672          LD="${LD-ld} -melf32bsmip"
4673          ;;
4674        *N32*)
4675          LD="${LD-ld} -melf32bmipn32"
4676          ;;
4677        *64-bit*)
4678          LD="${LD-ld} -melf64bmip"
4679        ;;
4680      esac
4681    else
4682      case `/usr/bin/file conftest.$ac_objext` in
4683        *32-bit*)
4684          LD="${LD-ld} -32"
4685          ;;
4686        *N32*)
4687          LD="${LD-ld} -n32"
4688          ;;
4689        *64-bit*)
4690          LD="${LD-ld} -64"
4691          ;;
4692      esac
4693    fi
4694  fi
4695  rm -rf conftest*
4696  ;;
4697
4698mips64*-*linux*)
4699  # Find out what ABI is being produced by ac_compile, and set linker
4700  # options accordingly.
4701  echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
4702  if AC_TRY_EVAL(ac_compile); then
4703    emul=elf
4704    case `/usr/bin/file conftest.$ac_objext` in
4705      *32-bit*)
4706        emul="${emul}32"
4707        ;;
4708      *64-bit*)
4709        emul="${emul}64"
4710        ;;
4711    esac
4712    case `/usr/bin/file conftest.$ac_objext` in
4713      *MSB*)
4714        emul="${emul}btsmip"
4715        ;;
4716      *LSB*)
4717        emul="${emul}ltsmip"
4718        ;;
4719    esac
4720    case `/usr/bin/file conftest.$ac_objext` in
4721      *N32*)
4722        emul="${emul}n32"
4723        ;;
4724    esac
4725    LD="${LD-ld} -m $emul"
4726  fi
4727  rm -rf conftest*
4728  ;;
4729
4730x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
4731s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
4732  # Find out what ABI is being produced by ac_compile, and set linker
4733  # options accordingly.  Note that the listed cases only cover the
4734  # situations where additional linker options are needed (such as when
4735  # doing 32-bit compilation for a host where ld defaults to 64-bit, or
4736  # vice versa); the common cases where no linker options are needed do
4737  # not appear in the list.
4738  echo 'int i;' > conftest.$ac_ext
4739  if AC_TRY_EVAL(ac_compile); then
4740    case `/usr/bin/file conftest.o` in
4741      *32-bit*)
4742        case $host in
4743          x86_64-*kfreebsd*-gnu)
4744            LD="${LD-ld} -m elf_i386_fbsd"
4745            ;;
4746          x86_64-*linux*)
4747            case `/usr/bin/file conftest.o` in
4748              *x86-64*)
4749                LD="${LD-ld} -m elf32_x86_64"
4750                ;;
4751              *)
4752                LD="${LD-ld} -m elf_i386"
4753                ;;
4754            esac
4755            ;;
4756          powerpc64le-*linux*)
4757            LD="${LD-ld} -m elf32lppclinux"
4758            ;;
4759          powerpc64-*linux*)
4760            LD="${LD-ld} -m elf32ppclinux"
4761            ;;
4762          s390x-*linux*)
4763            LD="${LD-ld} -m elf_s390"
4764            ;;
4765          sparc64-*linux*)
4766            LD="${LD-ld} -m elf32_sparc"
4767            ;;
4768        esac
4769        ;;
4770      *64-bit*)
4771        case $host in
4772          x86_64-*kfreebsd*-gnu)
4773            LD="${LD-ld} -m elf_x86_64_fbsd"
4774            ;;
4775          x86_64-*linux*)
4776            LD="${LD-ld} -m elf_x86_64"
4777            ;;
4778          powerpcle-*linux*)
4779            LD="${LD-ld} -m elf64lppc"
4780            ;;
4781          powerpc-*linux*)
4782            LD="${LD-ld} -m elf64ppc"
4783            ;;
4784          s390*-*linux*|s390*-*tpf*)
4785            LD="${LD-ld} -m elf64_s390"
4786            ;;
4787          sparc*-*linux*)
4788            LD="${LD-ld} -m elf64_sparc"
4789            ;;
4790        esac
4791        ;;
4792    esac
4793  fi
4794  rm -rf conftest*
4795  ;;
4796
4797*-*-sco3.2v5*)
4798  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
4799  SAVE_CFLAGS=$CFLAGS
4800  CFLAGS="$CFLAGS -belf"
4801  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
4802    [AC_LANG_PUSH(C)
4803     AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
4804     AC_LANG_POP])
4805  if test yes != "$lt_cv_cc_needs_belf"; then
4806    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
4807    CFLAGS=$SAVE_CFLAGS
4808  fi
4809  ;;
4810*-*solaris*)
4811  # Find out what ABI is being produced by ac_compile, and set linker
4812  # options accordingly.
4813  echo 'int i;' > conftest.$ac_ext
4814  if AC_TRY_EVAL(ac_compile); then
4815    case `/usr/bin/file conftest.o` in
4816    *64-bit*)
4817      case $lt_cv_prog_gnu_ld in
4818      yes*)
4819        case $host in
4820        i?86-*-solaris*|x86_64-*-solaris*)
4821          LD="${LD-ld} -m elf_x86_64"
4822          ;;
4823        sparc*-*-solaris*)
4824          LD="${LD-ld} -m elf64_sparc"
4825          ;;
4826        esac
4827        # GNU ld 2.21 introduced _sol2 emulations.  Use them if available.
4828        if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
4829          LD=${LD-ld}_sol2
4830        fi
4831        ;;
4832      *)
4833        if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
4834          LD="${LD-ld} -64"
4835        fi
4836        ;;
4837      esac
4838      ;;
4839    esac
4840  fi
4841  rm -rf conftest*
4842  ;;
4843esac
4844
4845need_locks=$enable_libtool_lock
4846])# _LT_ENABLE_LOCK
4847
4848
4849# _LT_PROG_AR
4850# -----------
4851m4_defun([_LT_PROG_AR],
4852[AC_CHECK_TOOLS(AR, [ar], false)
4853: ${AR=ar}
4854: ${AR_FLAGS=cru}
4855_LT_DECL([], [AR], [1], [The archiver])
4856_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
4857
4858AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
4859  [lt_cv_ar_at_file=no
4860   AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
4861     [echo conftest.$ac_objext > conftest.lst
4862      lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
4863      AC_TRY_EVAL([lt_ar_try])
4864      if test 0 -eq "$ac_status"; then
4865        # Ensure the archiver fails upon bogus file names.
4866        rm -f conftest.$ac_objext libconftest.a
4867        AC_TRY_EVAL([lt_ar_try])
4868        if test 0 -ne "$ac_status"; then
4869          lt_cv_ar_at_file=@
4870        fi
4871      fi
4872      rm -f conftest.* libconftest.a
4873     ])
4874  ])
4875
4876if test no = "$lt_cv_ar_at_file"; then
4877  archiver_list_spec=
4878else
4879  archiver_list_spec=$lt_cv_ar_at_file
4880fi
4881_LT_DECL([], [archiver_list_spec], [1],
4882  [How to feed a file listing to the archiver])
4883])# _LT_PROG_AR
4884
4885
4886# _LT_CMD_OLD_ARCHIVE
4887# -------------------
4888m4_defun([_LT_CMD_OLD_ARCHIVE],
4889[_LT_PROG_AR
4890
4891AC_CHECK_TOOL(STRIP, strip, :)
4892test -z "$STRIP" && STRIP=:
4893_LT_DECL([], [STRIP], [1], [A symbol stripping program])
4894
4895AC_CHECK_TOOL(RANLIB, ranlib, :)
4896test -z "$RANLIB" && RANLIB=:
4897_LT_DECL([], [RANLIB], [1],
4898    [Commands used to install an old-style archive])
4899
4900# Determine commands to create old-style static archives.
4901old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
4902old_postinstall_cmds='chmod 644 $oldlib'
4903old_postuninstall_cmds=
4904
4905if test -n "$RANLIB"; then
4906  case $host_os in
4907  bitrig* | openbsd*)
4908    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
4909    ;;
4910  *)
4911    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
4912    ;;
4913  esac
4914  old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
4915fi
4916
4917case $host_os in
4918  darwin*)
4919    lock_old_archive_extraction=yes ;;
4920  *)
4921    lock_old_archive_extraction=no ;;
4922esac
4923_LT_DECL([], [old_postinstall_cmds], [2])
4924_LT_DECL([], [old_postuninstall_cmds], [2])
4925_LT_TAGDECL([], [old_archive_cmds], [2],
4926    [Commands used to build an old-style archive])
4927_LT_DECL([], [lock_old_archive_extraction], [0],
4928    [Whether to use a lock for old archive extraction])
4929])# _LT_CMD_OLD_ARCHIVE
4930
4931
4932# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
4933#               [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
4934# ----------------------------------------------------------------
4935# Check whether the given compiler option works
4936AC_DEFUN([_LT_COMPILER_OPTION],
4937[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
4938m4_require([_LT_DECL_SED])dnl
4939AC_CACHE_CHECK([$1], [$2],
4940  [$2=no
4941   m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
4942   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
4943   lt_compiler_flag="$3"  ## exclude from sc_useless_quotes_in_assignment
4944   # Insert the option either (1) after the last *FLAGS variable, or
4945   # (2) before a word containing "conftest.", or (3) at the end.
4946   # Note that $ac_compile itself does not contain backslashes and begins
4947   # with a dollar sign (not a hyphen), so the echo should work correctly.
4948   # The option is referenced via a variable to avoid confusing sed.
4949   lt_compile=`echo "$ac_compile" | $SED \
4950   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
4951   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
4952   -e 's:$: $lt_compiler_flag:'`
4953   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
4954   (eval "$lt_compile" 2>conftest.err)
4955   ac_status=$?
4956   cat conftest.err >&AS_MESSAGE_LOG_FD
4957   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
4958   if (exit $ac_status) && test -s "$ac_outfile"; then
4959     # The compiler can only warn and ignore the option if not recognized
4960     # So say no if there are warnings other than the usual output.
4961     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
4962     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
4963     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
4964       $2=yes
4965     fi
4966   fi
4967   $RM conftest*
4968])
4969
4970if test yes = "[$]$2"; then
4971    m4_if([$5], , :, [$5])
4972else
4973    m4_if([$6], , :, [$6])
4974fi
4975])# _LT_COMPILER_OPTION
4976
4977# Old name:
4978AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
4979dnl aclocal-1.4 backwards compatibility:
4980dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
4981
4982
4983# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
4984#                  [ACTION-SUCCESS], [ACTION-FAILURE])
4985# ----------------------------------------------------
4986# Check whether the given linker option works
4987AC_DEFUN([_LT_LINKER_OPTION],
4988[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
4989m4_require([_LT_DECL_SED])dnl
4990AC_CACHE_CHECK([$1], [$2],
4991  [$2=no
4992   save_LDFLAGS=$LDFLAGS
4993   LDFLAGS="$LDFLAGS $3"
4994   echo "$lt_simple_link_test_code" > conftest.$ac_ext
4995   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
4996     # The linker can only warn and ignore the option if not recognized
4997     # So say no if there are warnings
4998     if test -s conftest.err; then
4999       # Append any errors to the config.log.
5000       cat conftest.err 1>&AS_MESSAGE_LOG_FD
5001       $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
5002       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
5003       if diff conftest.exp conftest.er2 >/dev/null; then
5004         $2=yes
5005       fi
5006     else
5007       $2=yes
5008     fi
5009   fi
5010   $RM -r conftest*
5011   LDFLAGS=$save_LDFLAGS
5012])
5013
5014if test yes = "[$]$2"; then
5015    m4_if([$4], , :, [$4])
5016else
5017    m4_if([$5], , :, [$5])
5018fi
5019])# _LT_LINKER_OPTION
5020
5021# Old name:
5022AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
5023dnl aclocal-1.4 backwards compatibility:
5024dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
5025
5026
5027# LT_CMD_MAX_LEN
5028#---------------
5029AC_DEFUN([LT_CMD_MAX_LEN],
5030[AC_REQUIRE([AC_CANONICAL_HOST])dnl
5031# find the maximum length of command line arguments
5032AC_MSG_CHECKING([the maximum length of command line arguments])
5033AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
5034  i=0
5035  teststring=ABCD
5036
5037  case $build_os in
5038  msdosdjgpp*)
5039    # On DJGPP, this test can blow up pretty badly due to problems in libc
5040    # (any single argument exceeding 2000 bytes causes a buffer overrun
5041    # during glob expansion).  Even if it were fixed, the result of this
5042    # check would be larger than it should be.
5043    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
5044    ;;
5045
5046  gnu*)
5047    # Under GNU Hurd, this test is not required because there is
5048    # no limit to the length of command line arguments.
5049    # Libtool will interpret -1 as no limit whatsoever
5050    lt_cv_sys_max_cmd_len=-1;
5051    ;;
5052
5053  cygwin* | mingw* | cegcc*)
5054    # On Win9x/ME, this test blows up -- it succeeds, but takes
5055    # about 5 minutes as the teststring grows exponentially.
5056    # Worse, since 9x/ME are not pre-emptively multitasking,
5057    # you end up with a "frozen" computer, even though with patience
5058    # the test eventually succeeds (with a max line length of 256k).
5059    # Instead, let's just punt: use the minimum linelength reported by
5060    # all of the supported platforms: 8192 (on NT/2K/XP).
5061    lt_cv_sys_max_cmd_len=8192;
5062    ;;
5063
5064  mint*)
5065    # On MiNT this can take a long time and run out of memory.
5066    lt_cv_sys_max_cmd_len=8192;
5067    ;;
5068
5069  amigaos*)
5070    # On AmigaOS with pdksh, this test takes hours, literally.
5071    # So we just punt and use a minimum line length of 8192.
5072    lt_cv_sys_max_cmd_len=8192;
5073    ;;
5074
5075  bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*)
5076    # This has been around since 386BSD, at least.  Likely further.
5077    if test -x /sbin/sysctl; then
5078      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
5079    elif test -x /usr/sbin/sysctl; then
5080      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
5081    else
5082      lt_cv_sys_max_cmd_len=65536       # usable default for all BSDs
5083    fi
5084    # And add a safety zone
5085    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
5086    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
5087    ;;
5088
5089  interix*)
5090    # We know the value 262144 and hardcode it with a safety zone (like BSD)
5091    lt_cv_sys_max_cmd_len=196608
5092    ;;
5093
5094  os2*)
5095    # The test takes a long time on OS/2.
5096    lt_cv_sys_max_cmd_len=8192
5097    ;;
5098
5099  osf*)
5100    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
5101    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
5102    # nice to cause kernel panics so lets avoid the loop below.
5103    # First set a reasonable default.
5104    lt_cv_sys_max_cmd_len=16384
5105    #
5106    if test -x /sbin/sysconfig; then
5107      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
5108        *1*) lt_cv_sys_max_cmd_len=-1 ;;
5109      esac
5110    fi
5111    ;;
5112  sco3.2v5*)
5113    lt_cv_sys_max_cmd_len=102400
5114    ;;
5115  sysv5* | sco5v6* | sysv4.2uw2*)
5116    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
5117    if test -n "$kargmax"; then
5118      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[         ]]//'`
5119    else
5120      lt_cv_sys_max_cmd_len=32768
5121    fi
5122    ;;
5123  *)
5124    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
5125    if test -n "$lt_cv_sys_max_cmd_len" && \
5126       test undefined != "$lt_cv_sys_max_cmd_len"; then
5127      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
5128      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
5129    else
5130      # Make teststring a little bigger before we do anything with it.
5131      # a 1K string should be a reasonable start.
5132      for i in 1 2 3 4 5 6 7 8; do
5133        teststring=$teststring$teststring
5134      done
5135      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
5136      # If test is not a shell built-in, we'll probably end up computing a
5137      # maximum length that is only half of the actual maximum length, but
5138      # we can't tell.
5139      while { test X`env echo "$teststring$teststring" 2>/dev/null` \
5140                 = "X$teststring$teststring"; } >/dev/null 2>&1 &&
5141              test 17 != "$i" # 1/2 MB should be enough
5142      do
5143        i=`expr $i + 1`
5144        teststring=$teststring$teststring
5145      done
5146      # Only check the string length outside the loop.
5147      lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
5148      teststring=
5149      # Add a significant safety factor because C++ compilers can tack on
5150      # massive amounts of additional arguments before passing them to the
5151      # linker.  It appears as though 1/2 is a usable value.
5152      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
5153    fi
5154    ;;
5155  esac
5156])
5157if test -n "$lt_cv_sys_max_cmd_len"; then
5158  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
5159else
5160  AC_MSG_RESULT(none)
5161fi
5162max_cmd_len=$lt_cv_sys_max_cmd_len
5163_LT_DECL([], [max_cmd_len], [0],
5164    [What is the maximum length of a command?])
5165])# LT_CMD_MAX_LEN
5166
5167# Old name:
5168AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
5169dnl aclocal-1.4 backwards compatibility:
5170dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
5171
5172
5173# _LT_HEADER_DLFCN
5174# ----------------
5175m4_defun([_LT_HEADER_DLFCN],
5176[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
5177])# _LT_HEADER_DLFCN
5178
5179
5180# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
5181#                      ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
5182# ----------------------------------------------------------------
5183m4_defun([_LT_TRY_DLOPEN_SELF],
5184[m4_require([_LT_HEADER_DLFCN])dnl
5185if test yes = "$cross_compiling"; then :
5186  [$4]
5187else
5188  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
5189  lt_status=$lt_dlunknown
5190  cat > conftest.$ac_ext <<_LT_EOF
5191[#line $LINENO "configure"
5192#include "confdefs.h"
5193
5194#if HAVE_DLFCN_H
5195#include <dlfcn.h>
5196#endif
5197
5198#include <stdio.h>
5199
5200#ifdef RTLD_GLOBAL
5201#  define LT_DLGLOBAL           RTLD_GLOBAL
5202#else
5203#  ifdef DL_GLOBAL
5204#    define LT_DLGLOBAL         DL_GLOBAL
5205#  else
5206#    define LT_DLGLOBAL         0
5207#  endif
5208#endif
5209
5210/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
5211   find out it does not work in some platform. */
5212#ifndef LT_DLLAZY_OR_NOW
5213#  ifdef RTLD_LAZY
5214#    define LT_DLLAZY_OR_NOW            RTLD_LAZY
5215#  else
5216#    ifdef DL_LAZY
5217#      define LT_DLLAZY_OR_NOW          DL_LAZY
5218#    else
5219#      ifdef RTLD_NOW
5220#        define LT_DLLAZY_OR_NOW        RTLD_NOW
5221#      else
5222#        ifdef DL_NOW
5223#          define LT_DLLAZY_OR_NOW      DL_NOW
5224#        else
5225#          define LT_DLLAZY_OR_NOW      0
5226#        endif
5227#      endif
5228#    endif
5229#  endif
5230#endif
5231
5232/* When -fvisibility=hidden is used, assume the code has been annotated
5233   correspondingly for the symbols needed.  */
5234#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
5235int fnord () __attribute__((visibility("default")));
5236#endif
5237
5238int fnord () { return 42; }
5239int main ()
5240{
5241  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
5242  int status = $lt_dlunknown;
5243
5244  if (self)
5245    {
5246      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
5247      else
5248        {
5249          if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
5250          else puts (dlerror ());
5251        }
5252      /* dlclose (self); */
5253    }
5254  else
5255    puts (dlerror ());
5256
5257  return status;
5258}]
5259_LT_EOF
5260  if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then
5261    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
5262    lt_status=$?
5263    case x$lt_status in
5264      x$lt_dlno_uscore) $1 ;;
5265      x$lt_dlneed_uscore) $2 ;;
5266      x$lt_dlunknown|x*) $3 ;;
5267    esac
5268  else :
5269    # compilation failed
5270    $3
5271  fi
5272fi
5273rm -fr conftest*
5274])# _LT_TRY_DLOPEN_SELF
5275
5276
5277# LT_SYS_DLOPEN_SELF
5278# ------------------
5279AC_DEFUN([LT_SYS_DLOPEN_SELF],
5280[m4_require([_LT_HEADER_DLFCN])dnl
5281if test yes != "$enable_dlopen"; then
5282  enable_dlopen=unknown
5283  enable_dlopen_self=unknown
5284  enable_dlopen_self_static=unknown
5285else
5286  lt_cv_dlopen=no
5287  lt_cv_dlopen_libs=
5288
5289  case $host_os in
5290  beos*)
5291    lt_cv_dlopen=load_add_on
5292    lt_cv_dlopen_libs=
5293    lt_cv_dlopen_self=yes
5294    ;;
5295
5296  mingw* | pw32* | cegcc*)
5297    lt_cv_dlopen=LoadLibrary
5298    lt_cv_dlopen_libs=
5299    ;;
5300
5301  cygwin*)
5302    lt_cv_dlopen=dlopen
5303    lt_cv_dlopen_libs=
5304    ;;
5305
5306  darwin*)
5307    # if libdl is installed we need to link against it
5308    AC_CHECK_LIB([dl], [dlopen],
5309                [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[
5310    lt_cv_dlopen=dyld
5311    lt_cv_dlopen_libs=
5312    lt_cv_dlopen_self=yes
5313    ])
5314    ;;
5315
5316  tpf*)
5317    # Don't try to run any link tests for TPF.  We know it's impossible
5318    # because TPF is a cross-compiler, and we know how we open DSOs.
5319    lt_cv_dlopen=dlopen
5320    lt_cv_dlopen_libs=
5321    lt_cv_dlopen_self=no
5322    ;;
5323
5324  *)
5325    AC_CHECK_FUNC([shl_load],
5326          [lt_cv_dlopen=shl_load],
5327      [AC_CHECK_LIB([dld], [shl_load],
5328            [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld],
5329        [AC_CHECK_FUNC([dlopen],
5330              [lt_cv_dlopen=dlopen],
5331          [AC_CHECK_LIB([dl], [dlopen],
5332                [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],
5333            [AC_CHECK_LIB([svld], [dlopen],
5334                  [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld],
5335              [AC_CHECK_LIB([dld], [dld_link],
5336                    [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld])
5337              ])
5338            ])
5339          ])
5340        ])
5341      ])
5342    ;;
5343  esac
5344
5345  if test no = "$lt_cv_dlopen"; then
5346    enable_dlopen=no
5347  else
5348    enable_dlopen=yes
5349  fi
5350
5351  case $lt_cv_dlopen in
5352  dlopen)
5353    save_CPPFLAGS=$CPPFLAGS
5354    test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
5355
5356    save_LDFLAGS=$LDFLAGS
5357    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
5358
5359    save_LIBS=$LIBS
5360    LIBS="$lt_cv_dlopen_libs $LIBS"
5361
5362    AC_CACHE_CHECK([whether a program can dlopen itself],
5363          lt_cv_dlopen_self, [dnl
5364          _LT_TRY_DLOPEN_SELF(
5365            lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
5366            lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
5367    ])
5368
5369    if test yes = "$lt_cv_dlopen_self"; then
5370      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
5371      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
5372          lt_cv_dlopen_self_static, [dnl
5373          _LT_TRY_DLOPEN_SELF(
5374            lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
5375            lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
5376      ])
5377    fi
5378
5379    CPPFLAGS=$save_CPPFLAGS
5380    LDFLAGS=$save_LDFLAGS
5381    LIBS=$save_LIBS
5382    ;;
5383  esac
5384
5385  case $lt_cv_dlopen_self in
5386  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
5387  *) enable_dlopen_self=unknown ;;
5388  esac
5389
5390  case $lt_cv_dlopen_self_static in
5391  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
5392  *) enable_dlopen_self_static=unknown ;;
5393  esac
5394fi
5395_LT_DECL([dlopen_support], [enable_dlopen], [0],
5396         [Whether dlopen is supported])
5397_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
5398         [Whether dlopen of programs is supported])
5399_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
5400         [Whether dlopen of statically linked programs is supported])
5401])# LT_SYS_DLOPEN_SELF
5402
5403# Old name:
5404AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
5405dnl aclocal-1.4 backwards compatibility:
5406dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
5407
5408
5409# _LT_COMPILER_C_O([TAGNAME])
5410# ---------------------------
5411# Check to see if options -c and -o are simultaneously supported by compiler.
5412# This macro does not hard code the compiler like AC_PROG_CC_C_O.
5413m4_defun([_LT_COMPILER_C_O],
5414[m4_require([_LT_DECL_SED])dnl
5415m4_require([_LT_FILEUTILS_DEFAULTS])dnl
5416m4_require([_LT_TAG_COMPILER])dnl
5417AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
5418  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
5419  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
5420   $RM -r conftest 2>/dev/null
5421   mkdir conftest
5422   cd conftest
5423   mkdir out
5424   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
5425
5426   lt_compiler_flag="-o out/conftest2.$ac_objext"
5427   # Insert the option either (1) after the last *FLAGS variable, or
5428   # (2) before a word containing "conftest.", or (3) at the end.
5429   # Note that $ac_compile itself does not contain backslashes and begins
5430   # with a dollar sign (not a hyphen), so the echo should work correctly.
5431   lt_compile=`echo "$ac_compile" | $SED \
5432   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
5433   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
5434   -e 's:$: $lt_compiler_flag:'`
5435   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
5436   (eval "$lt_compile" 2>out/conftest.err)
5437   ac_status=$?
5438   cat out/conftest.err >&AS_MESSAGE_LOG_FD
5439   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
5440   if (exit $ac_status) && test -s out/conftest2.$ac_objext
5441   then
5442     # The compiler can only warn and ignore the option if not recognized
5443     # So say no if there are warnings
5444     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
5445     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
5446     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
5447       _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
5448     fi
5449   fi
5450   chmod u+w . 2>&AS_MESSAGE_LOG_FD
5451   $RM conftest*
5452   # SGI C++ compiler will create directory out/ii_files/ for
5453   # template instantiation
5454   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
5455   $RM out/* && rmdir out
5456   cd ..
5457   $RM -r conftest
5458   $RM conftest*
5459])
5460_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
5461        [Does compiler simultaneously support -c and -o options?])
5462])# _LT_COMPILER_C_O
5463
5464
5465# _LT_COMPILER_FILE_LOCKS([TAGNAME])
5466# ----------------------------------
5467# Check to see if we can do hard links to lock some files if needed
5468m4_defun([_LT_COMPILER_FILE_LOCKS],
5469[m4_require([_LT_ENABLE_LOCK])dnl
5470m4_require([_LT_FILEUTILS_DEFAULTS])dnl
5471_LT_COMPILER_C_O([$1])
5472
5473hard_links=nottested
5474if test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then
5475  # do not overwrite the value of need_locks provided by the user
5476  AC_MSG_CHECKING([if we can lock with hard links])
5477  hard_links=yes
5478  $RM conftest*
5479  ln conftest.a conftest.b 2>/dev/null && hard_links=no
5480  touch conftest.a
5481  ln conftest.a conftest.b 2>&5 || hard_links=no
5482  ln conftest.a conftest.b 2>/dev/null && hard_links=no
5483  AC_MSG_RESULT([$hard_links])
5484  if test no = "$hard_links"; then
5485    AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe])
5486    need_locks=warn
5487  fi
5488else
5489  need_locks=no
5490fi
5491_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
5492])# _LT_COMPILER_FILE_LOCKS
5493
5494
5495# _LT_CHECK_OBJDIR
5496# ----------------
5497m4_defun([_LT_CHECK_OBJDIR],
5498[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
5499[rm -f .libs 2>/dev/null
5500mkdir .libs 2>/dev/null
5501if test -d .libs; then
5502  lt_cv_objdir=.libs
5503else
5504  # MS-DOS does not allow filenames that begin with a dot.
5505  lt_cv_objdir=_libs
5506fi
5507rmdir .libs 2>/dev/null])
5508objdir=$lt_cv_objdir
5509_LT_DECL([], [objdir], [0],
5510         [The name of the directory that contains temporary libtool files])dnl
5511m4_pattern_allow([LT_OBJDIR])dnl
5512AC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/",
5513  [Define to the sub-directory where libtool stores uninstalled libraries.])
5514])# _LT_CHECK_OBJDIR
5515
5516
5517# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
5518# --------------------------------------
5519# Check hardcoding attributes.
5520m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
5521[AC_MSG_CHECKING([how to hardcode library paths into programs])
5522_LT_TAGVAR(hardcode_action, $1)=
5523if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
5524   test -n "$_LT_TAGVAR(runpath_var, $1)" ||
5525   test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then
5526
5527  # We can hardcode non-existent directories.
5528  if test no != "$_LT_TAGVAR(hardcode_direct, $1)" &&
5529     # If the only mechanism to avoid hardcoding is shlibpath_var, we
5530     # have to relink, otherwise we might link with an installed library
5531     # when we should be linking with a yet-to-be-installed one
5532     ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" &&
5533     test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then
5534    # Linking always hardcodes the temporary library directory.
5535    _LT_TAGVAR(hardcode_action, $1)=relink
5536  else
5537    # We can link without hardcoding, and we can hardcode nonexisting dirs.
5538    _LT_TAGVAR(hardcode_action, $1)=immediate
5539  fi
5540else
5541  # We cannot hardcode anything, or else we can only hardcode existing
5542  # directories.
5543  _LT_TAGVAR(hardcode_action, $1)=unsupported
5544fi
5545AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
5546
5547if test relink = "$_LT_TAGVAR(hardcode_action, $1)" ||
5548   test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then
5549  # Fast installation is not supported
5550  enable_fast_install=no
5551elif test yes = "$shlibpath_overrides_runpath" ||
5552     test no = "$enable_shared"; then
5553  # Fast installation is not necessary
5554  enable_fast_install=needless
5555fi
5556_LT_TAGDECL([], [hardcode_action], [0],
5557    [How to hardcode a shared library path into an executable])
5558])# _LT_LINKER_HARDCODE_LIBPATH
5559
5560
5561# _LT_CMD_STRIPLIB
5562# ----------------
5563m4_defun([_LT_CMD_STRIPLIB],
5564[m4_require([_LT_DECL_EGREP])
5565striplib=
5566old_striplib=
5567AC_MSG_CHECKING([whether stripping libraries is possible])
5568if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
5569  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
5570  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
5571  AC_MSG_RESULT([yes])
5572else
5573# FIXME - insert some real tests, host_os isn't really good enough
5574  case $host_os in
5575  darwin*)
5576    if test -n "$STRIP"; then
5577      striplib="$STRIP -x"
5578      old_striplib="$STRIP -S"
5579      AC_MSG_RESULT([yes])
5580    else
5581      AC_MSG_RESULT([no])
5582    fi
5583    ;;
5584  *)
5585    AC_MSG_RESULT([no])
5586    ;;
5587  esac
5588fi
5589_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
5590_LT_DECL([], [striplib], [1])
5591])# _LT_CMD_STRIPLIB
5592
5593
5594# _LT_PREPARE_MUNGE_PATH_LIST
5595# ---------------------------
5596# Make sure func_munge_path_list() is defined correctly.
5597m4_defun([_LT_PREPARE_MUNGE_PATH_LIST],
5598[[# func_munge_path_list VARIABLE PATH
5599# -----------------------------------
5600# VARIABLE is name of variable containing _space_ separated list of
5601# directories to be munged by the contents of PATH, which is string
5602# having a format:
5603# "DIR[:DIR]:"
5604#       string "DIR[ DIR]" will be prepended to VARIABLE
5605# ":DIR[:DIR]"
5606#       string "DIR[ DIR]" will be appended to VARIABLE
5607# "DIRP[:DIRP]::[DIRA:]DIRA"
5608#       string "DIRP[ DIRP]" will be prepended to VARIABLE and string
5609#       "DIRA[ DIRA]" will be appended to VARIABLE
5610# "DIR[:DIR]"
5611#       VARIABLE will be replaced by "DIR[ DIR]"
5612func_munge_path_list ()
5613{
5614    case x@S|@2 in
5615    x)
5616        ;;
5617    *:)
5618        eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\"
5619        ;;
5620    x:*)
5621        eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\"
5622        ;;
5623    *::*)
5624        eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
5625        eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\"
5626        ;;
5627    *)
5628        eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\"
5629        ;;
5630    esac
5631}
5632]])# _LT_PREPARE_PATH_LIST
5633
5634
5635# _LT_SYS_DYNAMIC_LINKER([TAG])
5636# -----------------------------
5637# PORTME Fill in your ld.so characteristics
5638m4_defun([_LT_SYS_DYNAMIC_LINKER],
5639[AC_REQUIRE([AC_CANONICAL_HOST])dnl
5640m4_require([_LT_DECL_EGREP])dnl
5641m4_require([_LT_FILEUTILS_DEFAULTS])dnl
5642m4_require([_LT_DECL_OBJDUMP])dnl
5643m4_require([_LT_DECL_SED])dnl
5644m4_require([_LT_CHECK_SHELL_FEATURES])dnl
5645m4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl
5646AC_MSG_CHECKING([dynamic linker characteristics])
5647m4_if([$1],
5648        [], [
5649if test yes = "$GCC"; then
5650  case $host_os in
5651    darwin*) lt_awk_arg='/^libraries:/,/LR/' ;;
5652    *) lt_awk_arg='/^libraries:/' ;;
5653  esac
5654  case $host_os in
5655    mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;;
5656    *) lt_sed_strip_eq='s|=/|/|g' ;;
5657  esac
5658  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
5659  case $lt_search_path_spec in
5660  *\;*)
5661    # if the path contains ";" then we assume it to be the separator
5662    # otherwise default to the standard path separator (i.e. ":") - it is
5663    # assumed that no part of a normal pathname contains ";" but that should
5664    # okay in the real world where ";" in dirpaths is itself problematic.
5665    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
5666    ;;
5667  *)
5668    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
5669    ;;
5670  esac
5671  # Ok, now we have the path, separated by spaces, we can step through it
5672  # and add multilib dir if necessary...
5673  lt_tmp_lt_search_path_spec=
5674  lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
5675  # ...but if some path component already ends with the multilib dir we assume
5676  # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer).
5677  case "$lt_multi_os_dir; $lt_search_path_spec " in
5678  "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*)
5679    lt_multi_os_dir=
5680    ;;
5681  esac
5682  for lt_sys_path in $lt_search_path_spec; do
5683    if test -d "$lt_sys_path$lt_multi_os_dir"; then
5684      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir"
5685    elif test -n "$lt_multi_os_dir"; then
5686      test -d "$lt_sys_path" && \
5687        lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
5688    fi
5689  done
5690  lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
5691BEGIN {RS = " "; FS = "/|\n";} {
5692  lt_foo = "";
5693  lt_count = 0;
5694  for (lt_i = NF; lt_i > 0; lt_i--) {
5695    if ($lt_i != "" && $lt_i != ".") {
5696      if ($lt_i == "..") {
5697        lt_count++;
5698      } else {
5699        if (lt_count == 0) {
5700          lt_foo = "/" $lt_i lt_foo;
5701        } else {
5702          lt_count--;
5703        }
5704      }
5705    }
5706  }
5707  if (lt_foo != "") { lt_freq[[lt_foo]]++; }
5708  if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
5709}'`
5710  # AWK program above erroneously prepends '/' to C:/dos/paths
5711  # for these hosts.
5712  case $host_os in
5713    mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
5714      $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;;
5715  esac
5716  sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
5717else
5718  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
5719fi])
5720library_names_spec=
5721libname_spec='lib$name'
5722soname_spec=
5723shrext_cmds=.so
5724postinstall_cmds=
5725postuninstall_cmds=
5726finish_cmds=
5727finish_eval=
5728shlibpath_var=
5729shlibpath_overrides_runpath=unknown
5730version_type=none
5731dynamic_linker="$host_os ld.so"
5732sys_lib_dlsearch_path_spec="/lib /usr/lib"
5733need_lib_prefix=unknown
5734hardcode_into_libs=no
5735
5736# when you set need_version to no, make sure it does not cause -set_version
5737# flags to be left without arguments
5738need_version=unknown
5739
5740AC_ARG_VAR([LT_SYS_LIBRARY_PATH],
5741[User-defined run-time library search path.])
5742
5743case $host_os in
5744aix3*)
5745  version_type=linux # correct to gnu/linux during the next big refactor
5746  library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
5747  shlibpath_var=LIBPATH
5748
5749  # AIX 3 has no versioning support, so we append a major version to the name.
5750  soname_spec='$libname$release$shared_ext$major'
5751  ;;
5752
5753aix[[4-9]]*)
5754  version_type=linux # correct to gnu/linux during the next big refactor
5755  need_lib_prefix=no
5756  need_version=no
5757  hardcode_into_libs=yes
5758  if test ia64 = "$host_cpu"; then
5759    # AIX 5 supports IA64
5760    library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
5761    shlibpath_var=LD_LIBRARY_PATH
5762  else
5763    # With GCC up to 2.95.x, collect2 would create an import file
5764    # for dependence libraries.  The import file would start with
5765    # the line '#! .'.  This would cause the generated library to
5766    # depend on '.', always an invalid library.  This was fixed in
5767    # development snapshots of GCC prior to 3.0.
5768    case $host_os in
5769      aix4 | aix4.[[01]] | aix4.[[01]].*)
5770      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
5771           echo ' yes '
5772           echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
5773        :
5774      else
5775        can_build_shared=no
5776      fi
5777      ;;
5778    esac
5779    # Using Import Files as archive members, it is possible to support
5780    # filename-based versioning of shared library archives on AIX. While
5781    # this would work for both with and without runtime linking, it will
5782    # prevent static linking of such archives. So we do filename-based
5783    # shared library versioning with .so extension only, which is used
5784    # when both runtime linking and shared linking is enabled.
5785    # Unfortunately, runtime linking may impact performance, so we do
5786    # not want this to be the default eventually. Also, we use the
5787    # versioned .so libs for executables only if there is the -brtl
5788    # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
5789    # To allow for filename-based versioning support, we need to create
5790    # libNAME.so.V as an archive file, containing:
5791    # *) an Import File, referring to the versioned filename of the
5792    #    archive as well as the shared archive member, telling the
5793    #    bitwidth (32 or 64) of that shared object, and providing the
5794    #    list of exported symbols of that shared object, eventually
5795    #    decorated with the 'weak' keyword
5796    # *) the shared object with the F_LOADONLY flag set, to really avoid
5797    #    it being seen by the linker.
5798    # At run time we better use the real file rather than another symlink,
5799    # but for link time we create the symlink libNAME.so -> libNAME.so.V
5800
5801    case $with_aix_soname,$aix_use_runtimelinking in
5802    # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
5803    # soname into executable. Probably we can add versioning support to
5804    # collect2, so additional links can be useful in future.
5805    aix,yes) # traditional libtool
5806      dynamic_linker='AIX unversionable lib.so'
5807      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
5808      # instead of lib<name>.a to let people know that these are not
5809      # typical AIX shared libraries.
5810      library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
5811      ;;
5812    aix,no) # traditional AIX only
5813      dynamic_linker='AIX lib.a[(]lib.so.V[)]'
5814      # We preserve .a as extension for shared libraries through AIX4.2
5815      # and later when we are not doing run time linking.
5816      library_names_spec='$libname$release.a $libname.a'
5817      soname_spec='$libname$release$shared_ext$major'
5818      ;;
5819    svr4,*) # full svr4 only
5820      dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]"
5821      library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
5822      # We do not specify a path in Import Files, so LIBPATH fires.
5823      shlibpath_overrides_runpath=yes
5824      ;;
5825    *,yes) # both, prefer svr4
5826      dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]"
5827      library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
5828      # unpreferred sharedlib libNAME.a needs extra handling
5829      postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"'
5830      postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"'
5831      # We do not specify a path in Import Files, so LIBPATH fires.
5832      shlibpath_overrides_runpath=yes
5833      ;;
5834    *,no) # both, prefer aix
5835      dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]"
5836      library_names_spec='$libname$release.a $libname.a'
5837      soname_spec='$libname$release$shared_ext$major'
5838      # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling
5839      postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)'
5840      postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"'
5841      ;;
5842    esac
5843    shlibpath_var=LIBPATH
5844  fi
5845  ;;
5846
5847amigaos*)
5848  case $host_cpu in
5849  powerpc)
5850    # Since July 2007 AmigaOS4 officially supports .so libraries.
5851    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
5852    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
5853    ;;
5854  m68k)
5855    library_names_spec='$libname.ixlibrary $libname.a'
5856    # Create ${libname}_ixlibrary.a entries in /sys/libs.
5857    finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
5858    ;;
5859  esac
5860  ;;
5861
5862beos*)
5863  library_names_spec='$libname$shared_ext'
5864  dynamic_linker="$host_os ld.so"
5865  shlibpath_var=LIBRARY_PATH
5866  ;;
5867
5868bsdi[[45]]*)
5869  version_type=linux # correct to gnu/linux during the next big refactor
5870  need_version=no
5871  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
5872  soname_spec='$libname$release$shared_ext$major'
5873  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
5874  shlibpath_var=LD_LIBRARY_PATH
5875  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
5876  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
5877  # the default ld.so.conf also contains /usr/contrib/lib and
5878  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
5879  # libtool to hard-code these into programs
5880  ;;
5881
5882cygwin* | mingw* | pw32* | cegcc*)
5883  version_type=windows
5884  shrext_cmds=.dll
5885  need_version=no
5886  need_lib_prefix=no
5887
5888  case $GCC,$cc_basename in
5889  yes,*)
5890    # gcc
5891    library_names_spec='$libname.dll.a'
5892    # DLL is installed to $(libdir)/../bin by postinstall_cmds
5893    postinstall_cmds='base_file=`basename \$file`~
5894      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
5895      dldir=$destdir/`dirname \$dlpath`~
5896      test -d \$dldir || mkdir -p \$dldir~
5897      $install_prog $dir/$dlname \$dldir/$dlname~
5898      chmod a+x \$dldir/$dlname~
5899      if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
5900        eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
5901      fi'
5902    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
5903      dlpath=$dir/\$dldll~
5904       $RM \$dlpath'
5905    shlibpath_overrides_runpath=yes
5906
5907    case $host_os in
5908    cygwin*)
5909      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
5910      soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
5911m4_if([$1], [],[
5912      sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
5913      ;;
5914    mingw* | cegcc*)
5915      # MinGW DLLs use traditional 'lib' prefix
5916      soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
5917      ;;
5918    pw32*)
5919      # pw32 DLLs use 'pw' prefix rather than 'lib'
5920      library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
5921      ;;
5922    esac
5923    dynamic_linker='Win32 ld.exe'
5924    ;;
5925
5926  *,cl* | *,icl* | *,ifort*)
5927    # Native MSVC or ICC or IFORT
5928    libname_spec='$name'
5929    soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
5930    library_names_spec='$libname.dll.lib'
5931
5932    case $build_os in
5933    mingw*)
5934      sys_lib_search_path_spec=
5935      lt_save_ifs=$IFS
5936      IFS=';'
5937      for lt_path in $LIB
5938      do
5939        IFS=$lt_save_ifs
5940        # Let DOS variable expansion print the short 8.3 style file name.
5941        lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
5942        sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
5943      done
5944      IFS=$lt_save_ifs
5945      # Convert to MSYS style.
5946      sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
5947      ;;
5948    cygwin*)
5949      # Convert to unix form, then to dos form, then back to unix form
5950      # but this time dos style (no spaces!) so that the unix form looks
5951      # like /cygdrive/c/PROGRA~1:/cygdr...
5952      sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
5953      sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
5954      sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
5955      ;;
5956    *)
5957      sys_lib_search_path_spec=$LIB
5958      if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
5959        # It is most probably a Windows format PATH.
5960        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
5961      else
5962        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
5963      fi
5964      # FIXME: find the short name or the path components, as spaces are
5965      # common. (e.g. "Program Files" -> "PROGRA~1")
5966      ;;
5967    esac
5968
5969    # DLL is installed to $(libdir)/../bin by postinstall_cmds
5970    postinstall_cmds='base_file=`basename \$file`~
5971      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
5972      dldir=$destdir/`dirname \$dlpath`~
5973      test -d \$dldir || mkdir -p \$dldir~
5974      $install_prog $dir/$dlname \$dldir/$dlname'
5975    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
5976      dlpath=$dir/\$dldll~
5977       $RM \$dlpath'
5978    shlibpath_overrides_runpath=yes
5979    dynamic_linker='Win32 link.exe'
5980    ;;
5981
5982  *)
5983    # Assume MSVC wrapper
5984    library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib'
5985    dynamic_linker='Win32 ld.exe'
5986    ;;
5987  esac
5988  # FIXME: first we should search . and the directory the executable is in
5989  shlibpath_var=PATH
5990  ;;
5991
5992darwin* | rhapsody*)
5993  dynamic_linker="$host_os dyld"
5994  version_type=darwin
5995  need_lib_prefix=no
5996  need_version=no
5997  library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
5998  soname_spec='$libname$release$major$shared_ext'
5999  shlibpath_overrides_runpath=yes
6000  shlibpath_var=DYLD_LIBRARY_PATH
6001  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
6002m4_if([$1], [],[
6003  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
6004  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
6005  ;;
6006
6007dgux*)
6008  version_type=linux # correct to gnu/linux during the next big refactor
6009  need_lib_prefix=no
6010  need_version=no
6011  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
6012  soname_spec='$libname$release$shared_ext$major'
6013  shlibpath_var=LD_LIBRARY_PATH
6014  ;;
6015
6016freebsd* | dragonfly*)
6017  # DragonFly does not have aout.  When/if they implement a new
6018  # versioning mechanism, adjust this.
6019  if test -x /usr/bin/objformat; then
6020    objformat=`/usr/bin/objformat`
6021  else
6022    case $host_os in
6023    freebsd[[23]].*) objformat=aout ;;
6024    *) objformat=elf ;;
6025    esac
6026  fi
6027  version_type=freebsd-$objformat
6028  case $version_type in
6029    freebsd-elf*)
6030      library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
6031      soname_spec='$libname$release$shared_ext$major'
6032      need_version=no
6033      need_lib_prefix=no
6034      ;;
6035    freebsd-*)
6036      library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
6037      need_version=yes
6038      ;;
6039  esac
6040  shlibpath_var=LD_LIBRARY_PATH
6041  case $host_os in
6042  freebsd2.*)
6043    shlibpath_overrides_runpath=yes
6044    ;;
6045  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
6046    shlibpath_overrides_runpath=yes
6047    hardcode_into_libs=yes
6048    ;;
6049  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
6050  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
6051    shlibpath_overrides_runpath=no
6052    hardcode_into_libs=yes
6053    ;;
6054  *) # from 4.6 on, and DragonFly
6055    shlibpath_overrides_runpath=yes
6056    hardcode_into_libs=yes
6057    ;;
6058  esac
6059  ;;
6060
6061haiku*)
6062  version_type=linux # correct to gnu/linux during the next big refactor
6063  need_lib_prefix=no
6064  need_version=no
6065  dynamic_linker="$host_os runtime_loader"
6066  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
6067  soname_spec='$libname$release$shared_ext$major'
6068  shlibpath_var=LIBRARY_PATH
6069  shlibpath_overrides_runpath=no
6070  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
6071  hardcode_into_libs=yes
6072  ;;
6073
6074hpux9* | hpux10* | hpux11*)
6075  # Give a soname corresponding to the major version so that dld.sl refuses to
6076  # link against other versions.
6077  version_type=sunos
6078  need_lib_prefix=no
6079  need_version=no
6080  case $host_cpu in
6081  ia64*)
6082    shrext_cmds='.so'
6083    hardcode_into_libs=yes
6084    dynamic_linker="$host_os dld.so"
6085    shlibpath_var=LD_LIBRARY_PATH
6086    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
6087    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
6088    soname_spec='$libname$release$shared_ext$major'
6089    if test 32 = "$HPUX_IA64_MODE"; then
6090      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
6091      sys_lib_dlsearch_path_spec=/usr/lib/hpux32
6092    else
6093      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
6094      sys_lib_dlsearch_path_spec=/usr/lib/hpux64
6095    fi
6096    ;;
6097  hppa*64*)
6098    shrext_cmds='.sl'
6099    hardcode_into_libs=yes
6100    dynamic_linker="$host_os dld.sl"
6101    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
6102    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
6103    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
6104    soname_spec='$libname$release$shared_ext$major'
6105    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
6106    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
6107    ;;
6108  *)
6109    shrext_cmds='.sl'
6110    dynamic_linker="$host_os dld.sl"
6111    shlibpath_var=SHLIB_PATH
6112    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
6113    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
6114    soname_spec='$libname$release$shared_ext$major'
6115    ;;
6116  esac
6117  # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
6118  postinstall_cmds='chmod 555 $lib'
6119  # or fails outright, so override atomically:
6120  install_override_mode=555
6121  ;;
6122
6123interix[[3-9]]*)
6124  version_type=linux # correct to gnu/linux during the next big refactor
6125  need_lib_prefix=no
6126  need_version=no
6127  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
6128  soname_spec='$libname$release$shared_ext$major'
6129  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
6130  shlibpath_var=LD_LIBRARY_PATH
6131  shlibpath_overrides_runpath=no
6132  hardcode_into_libs=yes
6133  ;;
6134
6135irix5* | irix6* | nonstopux*)
6136  case $host_os in
6137    nonstopux*) version_type=nonstopux ;;
6138    *)
6139        if test yes = "$lt_cv_prog_gnu_ld"; then
6140                version_type=linux # correct to gnu/linux during the next big refactor
6141        else
6142                version_type=irix
6143        fi ;;
6144  esac
6145  need_lib_prefix=no
6146  need_version=no
6147  soname_spec='$libname$release$shared_ext$major'
6148  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
6149  case $host_os in
6150  irix5* | nonstopux*)
6151    libsuff= shlibsuff=
6152    ;;
6153  *)
6154    case $LD in # libtool.m4 will add one of these switches to LD
6155    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
6156      libsuff= shlibsuff= libmagic=32-bit;;
6157    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
6158      libsuff=32 shlibsuff=N32 libmagic=N32;;
6159    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
6160      libsuff=64 shlibsuff=64 libmagic=64-bit;;
6161    *) libsuff= shlibsuff= libmagic=never-match;;
6162    esac
6163    ;;
6164  esac
6165  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
6166  shlibpath_overrides_runpath=no
6167  sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
6168  sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
6169  hardcode_into_libs=yes
6170  ;;
6171
6172# No shared lib support for Linux oldld, aout, or coff.
6173linux*oldld* | linux*aout* | linux*coff*)
6174  dynamic_linker=no
6175  ;;
6176
6177linux*android*)
6178  version_type=none # Android doesn't support versioned libraries.
6179  need_lib_prefix=no
6180  need_version=no
6181  library_names_spec='$libname$release$shared_ext'
6182  soname_spec='$libname$release$shared_ext'
6183  finish_cmds=
6184  shlibpath_var=LD_LIBRARY_PATH
6185  shlibpath_overrides_runpath=yes
6186
6187  # This implies no fast_install, which is unacceptable.
6188  # Some rework will be needed to allow for fast_install
6189  # before this can be enabled.
6190  hardcode_into_libs=yes
6191
6192  dynamic_linker='Android linker'
6193  # Don't embed -rpath directories since the linker doesn't support them.
6194  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6195  ;;
6196
6197# This must be glibc/ELF.
6198linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
6199  version_type=linux # correct to gnu/linux during the next big refactor
6200  need_lib_prefix=no
6201  need_version=no
6202  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
6203  soname_spec='$libname$release$shared_ext$major'
6204  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
6205  shlibpath_var=LD_LIBRARY_PATH
6206  shlibpath_overrides_runpath=no
6207
6208  # Some binutils ld are patched to set DT_RUNPATH
6209  AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
6210    [lt_cv_shlibpath_overrides_runpath=no
6211    save_LDFLAGS=$LDFLAGS
6212    save_libdir=$libdir
6213    eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
6214         LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
6215    AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
6216      [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
6217         [lt_cv_shlibpath_overrides_runpath=yes])])
6218    LDFLAGS=$save_LDFLAGS
6219    libdir=$save_libdir
6220    ])
6221  shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
6222
6223  # This implies no fast_install, which is unacceptable.
6224  # Some rework will be needed to allow for fast_install
6225  # before this can be enabled.
6226  hardcode_into_libs=yes
6227
6228  # Ideally, we could use ldconfig to report *all* directores which are
6229  # searched for libraries, however this is still not possible.  Aside from not
6230  # being certain /sbin/ldconfig is available, command
6231  # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
6232  # even though it is searched at run-time.  Try to do the best guess by
6233  # appending ld.so.conf contents (and includes) to the search path.
6234  if test -f /etc/ld.so.conf; then
6235    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[   ]*hwcap[        ]/d;s/[:,      ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
6236    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
6237  fi
6238
6239  # We used to test for /lib/ld.so.1 and disable shared libraries on
6240  # powerpc, because MkLinux only supported shared libraries with the
6241  # GNU dynamic linker.  Since this was broken with cross compilers,
6242  # most powerpc-linux boxes support dynamic linking these days and
6243  # people can always --disable-shared, the test was removed, and we
6244  # assume the GNU/Linux dynamic linker is in use.
6245  dynamic_linker='GNU/Linux ld.so'
6246  ;;
6247
6248netbsd*)
6249  version_type=sunos
6250  need_lib_prefix=no
6251  need_version=no
6252  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
6253    library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
6254    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6255    dynamic_linker='NetBSD (a.out) ld.so'
6256  else
6257    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
6258    soname_spec='$libname$release$shared_ext$major'
6259    dynamic_linker='NetBSD ld.elf_so'
6260  fi
6261  shlibpath_var=LD_LIBRARY_PATH
6262  shlibpath_overrides_runpath=yes
6263  hardcode_into_libs=yes
6264  ;;
6265
6266newsos6)
6267  version_type=linux # correct to gnu/linux during the next big refactor
6268  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
6269  shlibpath_var=LD_LIBRARY_PATH
6270  shlibpath_overrides_runpath=yes
6271  ;;
6272
6273*nto* | *qnx*)
6274  version_type=qnx
6275  need_lib_prefix=no
6276  need_version=no
6277  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
6278  soname_spec='$libname$release$shared_ext$major'
6279  shlibpath_var=LD_LIBRARY_PATH
6280  shlibpath_overrides_runpath=no
6281  hardcode_into_libs=yes
6282  dynamic_linker='ldqnx.so'
6283  ;;
6284
6285openbsd* | bitrig*)
6286  version_type=sunos
6287  sys_lib_dlsearch_path_spec=/usr/lib
6288  need_lib_prefix=no
6289  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
6290    need_version=no
6291  else
6292    need_version=yes
6293  fi
6294  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
6295  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6296  shlibpath_var=LD_LIBRARY_PATH
6297  shlibpath_overrides_runpath=yes
6298  ;;
6299
6300os2*)
6301  libname_spec='$name'
6302  version_type=windows
6303  shrext_cmds=.dll
6304  need_version=no
6305  need_lib_prefix=no
6306  # OS/2 can only load a DLL with a base name of 8 characters or less.
6307  soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
6308    v=$($ECHO $release$versuffix | tr -d .-);
6309    n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
6310    $ECHO $n$v`$shared_ext'
6311  library_names_spec='${libname}_dll.$libext'
6312  dynamic_linker='OS/2 ld.exe'
6313  shlibpath_var=BEGINLIBPATH
6314  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
6315  sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
6316  postinstall_cmds='base_file=`basename \$file`~
6317    dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
6318    dldir=$destdir/`dirname \$dlpath`~
6319    test -d \$dldir || mkdir -p \$dldir~
6320    $install_prog $dir/$dlname \$dldir/$dlname~
6321    chmod a+x \$dldir/$dlname~
6322    if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
6323      eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
6324    fi'
6325  postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
6326    dlpath=$dir/\$dldll~
6327    $RM \$dlpath'
6328  ;;
6329
6330osf3* | osf4* | osf5*)
6331  version_type=osf
6332  need_lib_prefix=no
6333  need_version=no
6334  soname_spec='$libname$release$shared_ext$major'
6335  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
6336  shlibpath_var=LD_LIBRARY_PATH
6337  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
6338  sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
6339  ;;
6340
6341rdos*)
6342  dynamic_linker=no
6343  ;;
6344
6345solaris*)
6346  version_type=linux # correct to gnu/linux during the next big refactor
6347  need_lib_prefix=no
6348  need_version=no
6349  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
6350  soname_spec='$libname$release$shared_ext$major'
6351  shlibpath_var=LD_LIBRARY_PATH
6352  shlibpath_overrides_runpath=yes
6353  hardcode_into_libs=yes
6354  # ldd complains unless libraries are executable
6355  postinstall_cmds='chmod +x $lib'
6356  ;;
6357
6358sunos4*)
6359  version_type=sunos
6360  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
6361  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
6362  shlibpath_var=LD_LIBRARY_PATH
6363  shlibpath_overrides_runpath=yes
6364  if test yes = "$with_gnu_ld"; then
6365    need_lib_prefix=no
6366  fi
6367  need_version=yes
6368  ;;
6369
6370sysv4 | sysv4.3*)
6371  version_type=linux # correct to gnu/linux during the next big refactor
6372  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
6373  soname_spec='$libname$release$shared_ext$major'
6374  shlibpath_var=LD_LIBRARY_PATH
6375  case $host_vendor in
6376    sni)
6377      shlibpath_overrides_runpath=no
6378      need_lib_prefix=no
6379      runpath_var=LD_RUN_PATH
6380      ;;
6381    siemens)
6382      need_lib_prefix=no
6383      ;;
6384    motorola)
6385      need_lib_prefix=no
6386      need_version=no
6387      shlibpath_overrides_runpath=no
6388      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
6389      ;;
6390  esac
6391  ;;
6392
6393sysv4*MP*)
6394  if test -d /usr/nec; then
6395    version_type=linux # correct to gnu/linux during the next big refactor
6396    library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
6397    soname_spec='$libname$shared_ext.$major'
6398    shlibpath_var=LD_LIBRARY_PATH
6399  fi
6400  ;;
6401
6402sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
6403  version_type=sco
6404  need_lib_prefix=no
6405  need_version=no
6406  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
6407  soname_spec='$libname$release$shared_ext$major'
6408  shlibpath_var=LD_LIBRARY_PATH
6409  shlibpath_overrides_runpath=yes
6410  hardcode_into_libs=yes
6411  if test yes = "$with_gnu_ld"; then
6412    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
6413  else
6414    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
6415    case $host_os in
6416      sco3.2v5*)
6417        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
6418        ;;
6419    esac
6420  fi
6421  sys_lib_dlsearch_path_spec='/usr/lib'
6422  ;;
6423
6424tpf*)
6425  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
6426  version_type=linux # correct to gnu/linux during the next big refactor
6427  need_lib_prefix=no
6428  need_version=no
6429  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
6430  shlibpath_var=LD_LIBRARY_PATH
6431  shlibpath_overrides_runpath=no
6432  hardcode_into_libs=yes
6433  ;;
6434
6435uts4*)
6436  version_type=linux # correct to gnu/linux during the next big refactor
6437  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
6438  soname_spec='$libname$release$shared_ext$major'
6439  shlibpath_var=LD_LIBRARY_PATH
6440  ;;
6441
6442*)
6443  dynamic_linker=no
6444  ;;
6445esac
6446AC_MSG_RESULT([$dynamic_linker])
6447test no = "$dynamic_linker" && can_build_shared=no
6448
6449variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
6450if test yes = "$GCC"; then
6451  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
6452fi
6453
6454if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
6455  sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
6456fi
6457
6458if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
6459  sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
6460fi
6461
6462# remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
6463configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
6464
6465# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
6466func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
6467
6468# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
6469configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
6470
6471_LT_DECL([], [variables_saved_for_relink], [1],
6472    [Variables whose values should be saved in libtool wrapper scripts and
6473    restored at link time])
6474_LT_DECL([], [need_lib_prefix], [0],
6475    [Do we need the "lib" prefix for modules?])
6476_LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
6477_LT_DECL([], [version_type], [0], [Library versioning type])
6478_LT_DECL([], [runpath_var], [0],  [Shared library runtime path variable])
6479_LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
6480_LT_DECL([], [shlibpath_overrides_runpath], [0],
6481    [Is shlibpath searched before the hard-coded library search path?])
6482_LT_DECL([], [libname_spec], [1], [Format of library name prefix])
6483_LT_DECL([], [library_names_spec], [1],
6484    [[List of archive names.  First name is the real one, the rest are links.
6485    The last name is the one that the linker finds with -lNAME]])
6486_LT_DECL([], [soname_spec], [1],
6487    [[The coded name of the library, if different from the real name]])
6488_LT_DECL([], [install_override_mode], [1],
6489    [Permission mode override for installation of shared libraries])
6490_LT_DECL([], [postinstall_cmds], [2],
6491    [Command to use after installation of a shared archive])
6492_LT_DECL([], [postuninstall_cmds], [2],
6493    [Command to use after uninstallation of a shared archive])
6494_LT_DECL([], [finish_cmds], [2],
6495    [Commands used to finish a libtool library installation in a directory])
6496_LT_DECL([], [finish_eval], [1],
6497    [[As "finish_cmds", except a single script fragment to be evaled but
6498    not shown]])
6499_LT_DECL([], [hardcode_into_libs], [0],
6500    [Whether we should hardcode library paths into libraries])
6501_LT_DECL([], [sys_lib_search_path_spec], [2],
6502    [Compile-time system search path for libraries])
6503_LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2],
6504    [Detected run-time system search path for libraries])
6505_LT_DECL([], [configure_time_lt_sys_library_path], [2],
6506    [Explicit LT_SYS_LIBRARY_PATH set during ./configure time])
6507])# _LT_SYS_DYNAMIC_LINKER
6508
6509
6510# _LT_PATH_TOOL_PREFIX(TOOL)
6511# --------------------------
6512# find a file program that can recognize shared library
6513AC_DEFUN([_LT_PATH_TOOL_PREFIX],
6514[m4_require([_LT_DECL_EGREP])dnl
6515AC_MSG_CHECKING([for $1])
6516AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
6517[case $MAGIC_CMD in
6518[[\\/*] |  ?:[\\/]*])
6519  lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
6520  ;;
6521*)
6522  lt_save_MAGIC_CMD=$MAGIC_CMD
6523  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
6524dnl $ac_dummy forces splitting on constant user-supplied paths.
6525dnl POSIX.2 word splitting is done only on the output of word expansions,
6526dnl not every word.  This closes a longstanding sh security hole.
6527  ac_dummy="m4_if([$2], , $PATH, [$2])"
6528  for ac_dir in $ac_dummy; do
6529    IFS=$lt_save_ifs
6530    test -z "$ac_dir" && ac_dir=.
6531    if test -f "$ac_dir/$1"; then
6532      lt_cv_path_MAGIC_CMD=$ac_dir/"$1"
6533      if test -n "$file_magic_test_file"; then
6534        case $deplibs_check_method in
6535        "file_magic "*)
6536          file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
6537          MAGIC_CMD=$lt_cv_path_MAGIC_CMD
6538          if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
6539            $EGREP "$file_magic_regex" > /dev/null; then
6540            :
6541          else
6542            cat <<_LT_EOF 1>&2
6543
6544*** Warning: the command libtool uses to detect shared libraries,
6545*** $file_magic_cmd, produces output that libtool cannot recognize.
6546*** The result is that libtool may fail to recognize shared libraries
6547*** as such.  This will affect the creation of libtool libraries that
6548*** depend on shared libraries, but programs linked with such libtool
6549*** libraries will work regardless of this problem.  Nevertheless, you
6550*** may want to report the problem to your system manager and/or to
6551*** bug-libtool@gnu.org
6552
6553_LT_EOF
6554          fi ;;
6555        esac
6556      fi
6557      break
6558    fi
6559  done
6560  IFS=$lt_save_ifs
6561  MAGIC_CMD=$lt_save_MAGIC_CMD
6562  ;;
6563esac])
6564MAGIC_CMD=$lt_cv_path_MAGIC_CMD
6565if test -n "$MAGIC_CMD"; then
6566  AC_MSG_RESULT($MAGIC_CMD)
6567else
6568  AC_MSG_RESULT(no)
6569fi
6570_LT_DECL([], [MAGIC_CMD], [0],
6571         [Used to examine libraries when file_magic_cmd begins with "file"])dnl
6572])# _LT_PATH_TOOL_PREFIX
6573
6574# Old name:
6575AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
6576dnl aclocal-1.4 backwards compatibility:
6577dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
6578
6579
6580# _LT_PATH_MAGIC
6581# --------------
6582# find a file program that can recognize a shared library
6583m4_defun([_LT_PATH_MAGIC],
6584[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
6585if test -z "$lt_cv_path_MAGIC_CMD"; then
6586  if test -n "$ac_tool_prefix"; then
6587    _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
6588  else
6589    MAGIC_CMD=:
6590  fi
6591fi
6592])# _LT_PATH_MAGIC
6593
6594
6595# LT_PATH_LD
6596# ----------
6597# find the pathname to the GNU or non-GNU linker
6598AC_DEFUN([LT_PATH_LD],
6599[AC_REQUIRE([AC_PROG_CC])dnl
6600AC_REQUIRE([AC_CANONICAL_HOST])dnl
6601AC_REQUIRE([AC_CANONICAL_BUILD])dnl
6602m4_require([_LT_DECL_SED])dnl
6603m4_require([_LT_DECL_EGREP])dnl
6604m4_require([_LT_PROG_ECHO_BACKSLASH])dnl
6605
6606AC_ARG_WITH([gnu-ld],
6607    [AS_HELP_STRING([--with-gnu-ld],
6608        [assume the C compiler uses GNU ld @<:@default=no@:>@])],
6609    [test no = "$withval" || with_gnu_ld=yes],
6610    [with_gnu_ld=no])dnl
6611
6612ac_prog=ld
6613if test yes = "$GCC"; then
6614  # Check if gcc -print-prog-name=ld gives a path.
6615  AC_MSG_CHECKING([for ld used by $CC])
6616  case $host in
6617  *-*-mingw*)
6618    # gcc leaves a trailing carriage return, which upsets mingw
6619    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
6620  *)
6621    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
6622  esac
6623  case $ac_prog in
6624    # Accept absolute paths.
6625    [[\\/]]* | ?:[[\\/]]*)
6626      re_direlt='/[[^/]][[^/]]*/\.\./'
6627      # Canonicalize the pathname of ld
6628      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
6629      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
6630        ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
6631      done
6632      test -z "$LD" && LD=$ac_prog
6633      ;;
6634  "")
6635    # If it fails, then pretend we aren't using GCC.
6636    ac_prog=ld
6637    ;;
6638  *)
6639    # If it is relative, then search for the first ld in PATH.
6640    with_gnu_ld=unknown
6641    ;;
6642  esac
6643elif test yes = "$with_gnu_ld"; then
6644  AC_MSG_CHECKING([for GNU ld])
6645else
6646  AC_MSG_CHECKING([for non-GNU ld])
6647fi
6648AC_CACHE_VAL(lt_cv_path_LD,
6649[if test -z "$LD"; then
6650  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
6651  for ac_dir in $PATH; do
6652    IFS=$lt_save_ifs
6653    test -z "$ac_dir" && ac_dir=.
6654    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
6655      lt_cv_path_LD=$ac_dir/$ac_prog
6656      # Check to see if the program is GNU ld.  I'd rather use --version,
6657      # but apparently some variants of GNU ld only accept -v.
6658      # Break only if it was the GNU/non-GNU ld that we prefer.
6659      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
6660      *GNU* | *'with BFD'*)
6661        test no != "$with_gnu_ld" && break
6662        ;;
6663      *)
6664        test yes != "$with_gnu_ld" && break
6665        ;;
6666      esac
6667    fi
6668  done
6669  IFS=$lt_save_ifs
6670else
6671  lt_cv_path_LD=$LD # Let the user override the test with a path.
6672fi])
6673LD=$lt_cv_path_LD
6674if test -n "$LD"; then
6675  AC_MSG_RESULT($LD)
6676else
6677  AC_MSG_RESULT(no)
6678fi
6679test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
6680_LT_PATH_LD_GNU
6681AC_SUBST([LD])
6682
6683_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
6684])# LT_PATH_LD
6685
6686# Old names:
6687AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
6688AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
6689dnl aclocal-1.4 backwards compatibility:
6690dnl AC_DEFUN([AM_PROG_LD], [])
6691dnl AC_DEFUN([AC_PROG_LD], [])
6692
6693
6694# _LT_PATH_LD_GNU
6695#- --------------
6696m4_defun([_LT_PATH_LD_GNU],
6697[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
6698[# I'd rather use --version here, but apparently some GNU lds only accept -v.
6699case `$LD -v 2>&1 </dev/null` in
6700*GNU* | *'with BFD'*)
6701  lt_cv_prog_gnu_ld=yes
6702  ;;
6703*)
6704  lt_cv_prog_gnu_ld=no
6705  ;;
6706esac])
6707with_gnu_ld=$lt_cv_prog_gnu_ld
6708])# _LT_PATH_LD_GNU
6709
6710
6711# _LT_CMD_RELOAD
6712# --------------
6713# find reload flag for linker
6714#   -- PORTME Some linkers may need a different reload flag.
6715m4_defun([_LT_CMD_RELOAD],
6716[AC_CACHE_CHECK([for $LD option to reload object files],
6717  lt_cv_ld_reload_flag,
6718  [lt_cv_ld_reload_flag='-r'])
6719reload_flag=$lt_cv_ld_reload_flag
6720case $reload_flag in
6721"" | " "*) ;;
6722*) reload_flag=" $reload_flag" ;;
6723esac
6724reload_cmds='$LD$reload_flag -o $output$reload_objs'
6725case $host_os in
6726  cygwin* | mingw* | pw32* | cegcc*)
6727    if test yes != "$GCC"; then
6728      reload_cmds=false
6729    fi
6730    ;;
6731  darwin*)
6732    if test yes = "$GCC"; then
6733      reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs'
6734    else
6735      reload_cmds='$LD$reload_flag -o $output$reload_objs'
6736    fi
6737    ;;
6738esac
6739_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
6740_LT_TAGDECL([], [reload_cmds], [2])dnl
6741])# _LT_CMD_RELOAD
6742
6743
6744# _LT_PATH_DD
6745# -----------
6746# find a working dd
6747m4_defun([_LT_PATH_DD],
6748[AC_CACHE_CHECK([for a working dd], [ac_cv_path_lt_DD],
6749[printf 0123456789abcdef0123456789abcdef >conftest.i
6750cat conftest.i conftest.i >conftest2.i
6751: ${lt_DD:=$DD}
6752AC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd],
6753[if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
6754  cmp -s conftest.i conftest.out \
6755  && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=:
6756fi])
6757rm -f conftest.i conftest2.i conftest.out])
6758])# _LT_PATH_DD
6759
6760
6761# _LT_CMD_TRUNCATE
6762# ----------------
6763# find command to truncate a binary pipe
6764m4_defun([_LT_CMD_TRUNCATE],
6765[m4_require([_LT_PATH_DD])
6766AC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin],
6767[printf 0123456789abcdef0123456789abcdef >conftest.i
6768cat conftest.i conftest.i >conftest2.i
6769lt_cv_truncate_bin=
6770if "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
6771  cmp -s conftest.i conftest.out \
6772  && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1"
6773fi
6774rm -f conftest.i conftest2.i conftest.out
6775test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"])
6776_LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1],
6777  [Command to truncate a binary pipe])
6778])# _LT_CMD_TRUNCATE
6779
6780
6781# _LT_CHECK_MAGIC_METHOD
6782# ----------------------
6783# how to check for library dependencies
6784#  -- PORTME fill in with the dynamic library characteristics
6785m4_defun([_LT_CHECK_MAGIC_METHOD],
6786[m4_require([_LT_DECL_EGREP])
6787m4_require([_LT_DECL_OBJDUMP])
6788AC_CACHE_CHECK([how to recognize dependent libraries],
6789lt_cv_deplibs_check_method,
6790[lt_cv_file_magic_cmd='$MAGIC_CMD'
6791lt_cv_file_magic_test_file=
6792lt_cv_deplibs_check_method='unknown'
6793# Need to set the preceding variable on all platforms that support
6794# interlibrary dependencies.
6795# 'none' -- dependencies not supported.
6796# 'unknown' -- same as none, but documents that we really don't know.
6797# 'pass_all' -- all dependencies passed with no checks.
6798# 'test_compile' -- check by making test program.
6799# 'file_magic [[regex]]' -- check by looking for files in library path
6800# that responds to the $file_magic_cmd with a given extended regex.
6801# If you have 'file' or equivalent on your system and you're not sure
6802# whether 'pass_all' will *always* work, you probably want this one.
6803
6804case $host_os in
6805aix[[4-9]]*)
6806  lt_cv_deplibs_check_method=pass_all
6807  ;;
6808
6809beos*)
6810  lt_cv_deplibs_check_method=pass_all
6811  ;;
6812
6813bsdi[[45]]*)
6814  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
6815  lt_cv_file_magic_cmd='/usr/bin/file -L'
6816  lt_cv_file_magic_test_file=/shlib/libc.so
6817  ;;
6818
6819cygwin*)
6820  # func_win32_libid is a shell function defined in ltmain.sh
6821  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
6822  lt_cv_file_magic_cmd='func_win32_libid'
6823  ;;
6824
6825mingw* | pw32*)
6826  # Base MSYS/MinGW do not provide the 'file' command needed by
6827  # func_win32_libid shell function, so use a weaker test based on 'objdump',
6828  # unless we find 'file', for example because we are cross-compiling.
6829  if ( file / ) >/dev/null 2>&1; then
6830    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
6831    lt_cv_file_magic_cmd='func_win32_libid'
6832  else
6833    # Keep this pattern in sync with the one in func_win32_libid.
6834    lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
6835    lt_cv_file_magic_cmd='$OBJDUMP -f'
6836  fi
6837  ;;
6838
6839cegcc*)
6840  # use the weaker test based on 'objdump'. See mingw*.
6841  lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
6842  lt_cv_file_magic_cmd='$OBJDUMP -f'
6843  ;;
6844
6845darwin* | rhapsody*)
6846  lt_cv_deplibs_check_method=pass_all
6847  ;;
6848
6849freebsd* | dragonfly*)
6850  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
6851    case $host_cpu in
6852    i*86 )
6853      # Not sure whether the presence of OpenBSD here was a mistake.
6854      # Let's accept both of them until this is cleared up.
6855      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
6856      lt_cv_file_magic_cmd=/usr/bin/file
6857      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
6858      ;;
6859    esac
6860  else
6861    lt_cv_deplibs_check_method=pass_all
6862  fi
6863  ;;
6864
6865haiku*)
6866  lt_cv_deplibs_check_method=pass_all
6867  ;;
6868
6869hpux10.20* | hpux11*)
6870  lt_cv_file_magic_cmd=/usr/bin/file
6871  case $host_cpu in
6872  ia64*)
6873    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
6874    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
6875    ;;
6876  hppa*64*)
6877    [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]']
6878    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
6879    ;;
6880  *)
6881    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
6882    lt_cv_file_magic_test_file=/usr/lib/libc.sl
6883    ;;
6884  esac
6885  ;;
6886
6887interix[[3-9]]*)
6888  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
6889  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
6890  ;;
6891
6892irix5* | irix6* | nonstopux*)
6893  case $LD in
6894  *-32|*"-32 ") libmagic=32-bit;;
6895  *-n32|*"-n32 ") libmagic=N32;;
6896  *-64|*"-64 ") libmagic=64-bit;;
6897  *) libmagic=never-match;;
6898  esac
6899  lt_cv_deplibs_check_method=pass_all
6900  ;;
6901
6902# This must be glibc/ELF.
6903linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
6904  lt_cv_deplibs_check_method=pass_all
6905  ;;
6906
6907netbsd*)
6908  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
6909    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
6910  else
6911    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
6912  fi
6913  ;;
6914
6915newos6*)
6916  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
6917  lt_cv_file_magic_cmd=/usr/bin/file
6918  lt_cv_file_magic_test_file=/usr/lib/libnls.so
6919  ;;
6920
6921*nto* | *qnx*)
6922  lt_cv_deplibs_check_method=pass_all
6923  ;;
6924
6925openbsd* | bitrig*)
6926  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
6927    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
6928  else
6929    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
6930  fi
6931  ;;
6932
6933osf3* | osf4* | osf5*)
6934  lt_cv_deplibs_check_method=pass_all
6935  ;;
6936
6937rdos*)
6938  lt_cv_deplibs_check_method=pass_all
6939  ;;
6940
6941solaris*)
6942  lt_cv_deplibs_check_method=pass_all
6943  ;;
6944
6945sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
6946  lt_cv_deplibs_check_method=pass_all
6947  ;;
6948
6949sysv4 | sysv4.3*)
6950  case $host_vendor in
6951  motorola)
6952    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]'
6953    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
6954    ;;
6955  ncr)
6956    lt_cv_deplibs_check_method=pass_all
6957    ;;
6958  sequent)
6959    lt_cv_file_magic_cmd='/bin/file'
6960    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
6961    ;;
6962  sni)
6963    lt_cv_file_magic_cmd='/bin/file'
6964    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
6965    lt_cv_file_magic_test_file=/lib/libc.so
6966    ;;
6967  siemens)
6968    lt_cv_deplibs_check_method=pass_all
6969    ;;
6970  pc)
6971    lt_cv_deplibs_check_method=pass_all
6972    ;;
6973  esac
6974  ;;
6975
6976tpf*)
6977  lt_cv_deplibs_check_method=pass_all
6978  ;;
6979os2*)
6980  lt_cv_deplibs_check_method=pass_all
6981  ;;
6982esac
6983])
6984
6985file_magic_glob=
6986want_nocaseglob=no
6987if test "$build" = "$host"; then
6988  case $host_os in
6989  mingw* | pw32*)
6990    if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
6991      want_nocaseglob=yes
6992    else
6993      file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
6994    fi
6995    ;;
6996  esac
6997fi
6998
6999file_magic_cmd=$lt_cv_file_magic_cmd
7000deplibs_check_method=$lt_cv_deplibs_check_method
7001test -z "$deplibs_check_method" && deplibs_check_method=unknown
7002
7003_LT_DECL([], [deplibs_check_method], [1],
7004    [Method to check whether dependent libraries are shared objects])
7005_LT_DECL([], [file_magic_cmd], [1],
7006    [Command to use when deplibs_check_method = "file_magic"])
7007_LT_DECL([], [file_magic_glob], [1],
7008    [How to find potential files when deplibs_check_method = "file_magic"])
7009_LT_DECL([], [want_nocaseglob], [1],
7010    [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
7011])# _LT_CHECK_MAGIC_METHOD
7012
7013
7014# LT_PATH_NM
7015# ----------
7016# find the pathname to a BSD- or MS-compatible name lister
7017AC_DEFUN([LT_PATH_NM],
7018[AC_REQUIRE([AC_PROG_CC])dnl
7019AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
7020[if test -n "$NM"; then
7021  # Let the user override the test.
7022  lt_cv_path_NM=$NM
7023else
7024  lt_nm_to_check=${ac_tool_prefix}nm
7025  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
7026    lt_nm_to_check="$lt_nm_to_check nm"
7027  fi
7028  for lt_tmp_nm in $lt_nm_to_check; do
7029    lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
7030    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
7031      IFS=$lt_save_ifs
7032      test -z "$ac_dir" && ac_dir=.
7033      tmp_nm=$ac_dir/$lt_tmp_nm
7034      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then
7035        # Check to see if the nm accepts a BSD-compat flag.
7036        # Adding the 'sed 1q' prevents false positives on HP-UX, which says:
7037        #   nm: unknown option "B" ignored
7038        # Tru64's nm complains that /dev/null is an invalid object file
7039        # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty
7040        case $build_os in
7041        mingw*) lt_bad_file=conftest.nm/nofile ;;
7042        *) lt_bad_file=/dev/null ;;
7043        esac
7044        case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in
7045        *$lt_bad_file* | *'Invalid file or object type'*)
7046          lt_cv_path_NM="$tmp_nm -B"
7047          break 2
7048          ;;
7049        *)
7050          case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
7051          */dev/null*)
7052            lt_cv_path_NM="$tmp_nm -p"
7053            break 2
7054            ;;
7055          *)
7056            lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
7057            continue # so that we can try to find one that supports BSD flags
7058            ;;
7059          esac
7060          ;;
7061        esac
7062      fi
7063    done
7064    IFS=$lt_save_ifs
7065  done
7066  : ${lt_cv_path_NM=no}
7067fi])
7068if test no != "$lt_cv_path_NM"; then
7069  NM=$lt_cv_path_NM
7070else
7071  # Didn't find any BSD compatible name lister, look for dumpbin.
7072  if test -n "$DUMPBIN"; then :
7073    # Let the user override the test.
7074  else
7075    AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
7076    case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in
7077    *COFF*)
7078      DUMPBIN="$DUMPBIN -symbols -headers"
7079      ;;
7080    *)
7081      DUMPBIN=:
7082      ;;
7083    esac
7084  fi
7085  AC_SUBST([DUMPBIN])
7086  if test : != "$DUMPBIN"; then
7087    NM=$DUMPBIN
7088  fi
7089fi
7090test -z "$NM" && NM=nm
7091AC_SUBST([NM])
7092_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
7093
7094AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
7095  [lt_cv_nm_interface="BSD nm"
7096  echo "int some_variable = 0;" > conftest.$ac_ext
7097  (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
7098  (eval "$ac_compile" 2>conftest.err)
7099  cat conftest.err >&AS_MESSAGE_LOG_FD
7100  (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
7101  (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
7102  cat conftest.err >&AS_MESSAGE_LOG_FD
7103  (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
7104  cat conftest.out >&AS_MESSAGE_LOG_FD
7105  if $GREP 'External.*some_variable' conftest.out > /dev/null; then
7106    lt_cv_nm_interface="MS dumpbin"
7107  fi
7108  rm -f conftest*])
7109])# LT_PATH_NM
7110
7111# Old names:
7112AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
7113AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
7114dnl aclocal-1.4 backwards compatibility:
7115dnl AC_DEFUN([AM_PROG_NM], [])
7116dnl AC_DEFUN([AC_PROG_NM], [])
7117
7118# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
7119# --------------------------------
7120# how to determine the name of the shared library
7121# associated with a specific link library.
7122#  -- PORTME fill in with the dynamic library characteristics
7123m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
7124[m4_require([_LT_DECL_EGREP])
7125m4_require([_LT_DECL_OBJDUMP])
7126m4_require([_LT_DECL_DLLTOOL])
7127AC_CACHE_CHECK([how to associate runtime and link libraries],
7128lt_cv_sharedlib_from_linklib_cmd,
7129[lt_cv_sharedlib_from_linklib_cmd='unknown'
7130
7131case $host_os in
7132cygwin* | mingw* | pw32* | cegcc*)
7133  # two different shell functions defined in ltmain.sh;
7134  # decide which one to use based on capabilities of $DLLTOOL
7135  case `$DLLTOOL --help 2>&1` in
7136  *--identify-strict*)
7137    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
7138    ;;
7139  *)
7140    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
7141    ;;
7142  esac
7143  ;;
7144*)
7145  # fallback: assume linklib IS sharedlib
7146  lt_cv_sharedlib_from_linklib_cmd=$ECHO
7147  ;;
7148esac
7149])
7150sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
7151test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
7152
7153_LT_DECL([], [sharedlib_from_linklib_cmd], [1],
7154    [Command to associate shared and link libraries])
7155])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
7156
7157
7158# _LT_PATH_MANIFEST_TOOL
7159# ----------------------
7160# locate the manifest tool
7161m4_defun([_LT_PATH_MANIFEST_TOOL],
7162[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
7163test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
7164AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
7165  [lt_cv_path_mainfest_tool=no
7166  echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
7167  $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
7168  cat conftest.err >&AS_MESSAGE_LOG_FD
7169  if $GREP 'Manifest Tool' conftest.out > /dev/null; then
7170    lt_cv_path_mainfest_tool=yes
7171  fi
7172  rm -f conftest*])
7173if test yes != "$lt_cv_path_mainfest_tool"; then
7174  MANIFEST_TOOL=:
7175fi
7176_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
7177])# _LT_PATH_MANIFEST_TOOL
7178
7179
7180# _LT_DLL_DEF_P([FILE])
7181# ---------------------
7182# True iff FILE is a Windows DLL '.def' file.
7183# Keep in sync with func_dll_def_p in the libtool script
7184AC_DEFUN([_LT_DLL_DEF_P],
7185[dnl
7186  test DEF = "`$SED -n dnl
7187    -e '\''s/^[[         ]]*//'\'' dnl Strip leading whitespace
7188    -e '\''/^\(;.*\)*$/d'\'' dnl      Delete empty lines and comments
7189    -e '\''s/^\(EXPORTS\|LIBRARY\)\([[   ]].*\)*$/DEF/p'\'' dnl
7190    -e q dnl                          Only consider the first "real" line
7191    $1`" dnl
7192])# _LT_DLL_DEF_P
7193
7194
7195# LT_LIB_M
7196# --------
7197# check for math library
7198AC_DEFUN([LT_LIB_M],
7199[AC_REQUIRE([AC_CANONICAL_HOST])dnl
7200LIBM=
7201case $host in
7202*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
7203  # These system don't have libm, or don't need it
7204  ;;
7205*-ncr-sysv4.3*)
7206  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw)
7207  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
7208  ;;
7209*)
7210  AC_CHECK_LIB(m, cos, LIBM=-lm)
7211  ;;
7212esac
7213AC_SUBST([LIBM])
7214])# LT_LIB_M
7215
7216# Old name:
7217AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
7218dnl aclocal-1.4 backwards compatibility:
7219dnl AC_DEFUN([AC_CHECK_LIBM], [])
7220
7221
7222# _LT_COMPILER_NO_RTTI([TAGNAME])
7223# -------------------------------
7224m4_defun([_LT_COMPILER_NO_RTTI],
7225[m4_require([_LT_TAG_COMPILER])dnl
7226
7227_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
7228
7229if test yes = "$GCC"; then
7230  case $cc_basename in
7231  nvcc*)
7232    _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
7233  *)
7234    _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
7235  esac
7236
7237  _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
7238    lt_cv_prog_compiler_rtti_exceptions,
7239    [-fno-rtti -fno-exceptions], [],
7240    [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
7241fi
7242_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
7243        [Compiler flag to turn off builtin functions])
7244])# _LT_COMPILER_NO_RTTI
7245
7246
7247# _LT_CMD_GLOBAL_SYMBOLS
7248# ----------------------
7249m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
7250[AC_REQUIRE([AC_CANONICAL_HOST])dnl
7251AC_REQUIRE([AC_PROG_CC])dnl
7252AC_REQUIRE([AC_PROG_AWK])dnl
7253AC_REQUIRE([LT_PATH_NM])dnl
7254AC_REQUIRE([LT_PATH_LD])dnl
7255m4_require([_LT_DECL_SED])dnl
7256m4_require([_LT_DECL_EGREP])dnl
7257m4_require([_LT_TAG_COMPILER])dnl
7258
7259# Check for command to grab the raw symbol name followed by C symbol from nm.
7260AC_MSG_CHECKING([command to parse $NM output from $compiler object])
7261AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
7262[
7263# These are sane defaults that work on at least a few old systems.
7264# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
7265
7266# Character class describing NM global symbol codes.
7267symcode='[[BCDEGRST]]'
7268
7269# Regexp to match symbols that can be accessed directly from C.
7270sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
7271
7272# Define system-specific variables.
7273case $host_os in
7274aix*)
7275  symcode='[[BCDT]]'
7276  ;;
7277cygwin* | mingw* | pw32* | cegcc*)
7278  symcode='[[ABCDGISTW]]'
7279  ;;
7280hpux*)
7281  if test ia64 = "$host_cpu"; then
7282    symcode='[[ABCDEGRST]]'
7283  fi
7284  ;;
7285irix* | nonstopux*)
7286  symcode='[[BCDEGRST]]'
7287  ;;
7288osf*)
7289  symcode='[[BCDEGQRST]]'
7290  ;;
7291solaris*)
7292  symcode='[[BDRT]]'
7293  ;;
7294sco3.2v5*)
7295  symcode='[[DT]]'
7296  ;;
7297sysv4.2uw2*)
7298  symcode='[[DT]]'
7299  ;;
7300sysv5* | sco5v6* | unixware* | OpenUNIX*)
7301  symcode='[[ABDT]]'
7302  ;;
7303sysv4)
7304  symcode='[[DFNSTU]]'
7305  ;;
7306esac
7307
7308# If we're using GNU nm, then use its standard symbol codes.
7309case `$NM -V 2>&1` in
7310*GNU* | *'with BFD'*)
7311  symcode='[[ABCDGIRSTW]]' ;;
7312esac
7313
7314if test "$lt_cv_nm_interface" = "MS dumpbin"; then
7315  # Gets list of data symbols to import.
7316  lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'"
7317  # Adjust the below global symbol transforms to fixup imported variables.
7318  lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
7319  lt_c_name_hook=" -e 's/^I .* \(.*\)$/  {\"\1\", (void *) 0},/p'"
7320  lt_c_name_lib_hook="\
7321  -e 's/^I .* \(lib.*\)$/  {\"\1\", (void *) 0},/p'\
7322  -e 's/^I .* \(.*\)$/  {\"lib\1\", (void *) 0},/p'"
7323else
7324  # Disable hooks by default.
7325  lt_cv_sys_global_symbol_to_import=
7326  lt_cdecl_hook=
7327  lt_c_name_hook=
7328  lt_c_name_lib_hook=
7329fi
7330
7331# Transform an extracted symbol line into a proper C declaration.
7332# Some systems (esp. on ia64) link data and code symbols differently,
7333# so use this general approach.
7334lt_cv_sys_global_symbol_to_cdecl="sed -n"\
7335$lt_cdecl_hook\
7336" -e 's/^T .* \(.*\)$/extern int \1();/p'"\
7337" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'"
7338
7339# Transform an extracted symbol line into symbol name and symbol address
7340lt_cv_sys_global_symbol_to_c_name_address="sed -n"\
7341$lt_c_name_hook\
7342" -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
7343" -e 's/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/p'"
7344
7345# Transform an extracted symbol line into symbol name with lib prefix and
7346# symbol address.
7347lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\
7348$lt_c_name_lib_hook\
7349" -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
7350" -e 's/^$symcode$symcode* .* \(lib.*\)$/  {\"\1\", (void *) \&\1},/p'"\
7351" -e 's/^$symcode$symcode* .* \(.*\)$/  {\"lib\1\", (void *) \&\1},/p'"
7352
7353# Handle CRLF in mingw tool chain
7354opt_cr=
7355case $build_os in
7356mingw*)
7357  opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
7358  ;;
7359esac
7360
7361# Try without a prefix underscore, then with it.
7362for ac_symprfx in "" "_"; do
7363
7364  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
7365  symxfrm="\\1 $ac_symprfx\\2 \\2"
7366
7367  # Write the raw and C identifiers.
7368  if test "$lt_cv_nm_interface" = "MS dumpbin"; then
7369    # Fake it for dumpbin and say T for any non-static function,
7370    # D for any global variable and I for any imported variable.
7371    # Also find C++ and __fastcall symbols from MSVC++,
7372    # which start with @ or ?.
7373    lt_cv_sys_global_symbol_pipe="$AWK ['"\
7374"     {last_section=section; section=\$ 3};"\
7375"     /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
7376"     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
7377"     /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\
7378"     /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\
7379"     /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\
7380"     \$ 0!~/External *\|/{next};"\
7381"     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
7382"     {if(hide[section]) next};"\
7383"     {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\
7384"     {split(\$ 0,a,/\||\r/); split(a[2],s)};"\
7385"     s[1]~/^[@?]/{print f,s[1],s[1]; next};"\
7386"     s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
7387"     ' prfx=^$ac_symprfx]"
7388  else
7389    lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[     ]]\($symcode$symcode*\)[[       ]][[    ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
7390  fi
7391  lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
7392
7393  # Check to see that the pipe works correctly.
7394  pipe_works=no
7395
7396  rm -f conftest*
7397  cat > conftest.$ac_ext <<_LT_EOF
7398#ifdef __cplusplus
7399extern "C" {
7400#endif
7401char nm_test_var;
7402void nm_test_func(void);
7403void nm_test_func(void){}
7404#ifdef __cplusplus
7405}
7406#endif
7407int main(){nm_test_var='a';nm_test_func();return(0);}
7408_LT_EOF
7409
7410  if AC_TRY_EVAL(ac_compile); then
7411    # Now try to grab the symbols.
7412    nlist=conftest.nm
7413    if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
7414      # Try sorting and uniquifying the output.
7415      if sort "$nlist" | uniq > "$nlist"T; then
7416        mv -f "$nlist"T "$nlist"
7417      else
7418        rm -f "$nlist"T
7419      fi
7420
7421      # Make sure that we snagged all the symbols we need.
7422      if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
7423        if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
7424          cat <<_LT_EOF > conftest.$ac_ext
7425/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
7426#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
7427/* DATA imports from DLLs on WIN32 can't be const, because runtime
7428   relocations are performed -- see ld's documentation on pseudo-relocs.  */
7429# define LT@&t@_DLSYM_CONST
7430#elif defined __osf__
7431/* This system does not cope well with relocations in const data.  */
7432# define LT@&t@_DLSYM_CONST
7433#else
7434# define LT@&t@_DLSYM_CONST const
7435#endif
7436
7437#ifdef __cplusplus
7438extern "C" {
7439#endif
7440
7441_LT_EOF
7442          # Now generate the symbol file.
7443          eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
7444
7445          cat <<_LT_EOF >> conftest.$ac_ext
7446
7447/* The mapping between symbol names and symbols.  */
7448LT@&t@_DLSYM_CONST struct {
7449  const char *name;
7450  void       *address;
7451}
7452lt__PROGRAM__LTX_preloaded_symbols[[]] =
7453{
7454  { "@PROGRAM@", (void *) 0 },
7455_LT_EOF
7456          $SED "s/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
7457          cat <<\_LT_EOF >> conftest.$ac_ext
7458  {0, (void *) 0}
7459};
7460
7461/* This works around a problem in FreeBSD linker */
7462#ifdef FREEBSD_WORKAROUND
7463static const void *lt_preloaded_setup() {
7464  return lt__PROGRAM__LTX_preloaded_symbols;
7465}
7466#endif
7467
7468#ifdef __cplusplus
7469}
7470#endif
7471_LT_EOF
7472          # Now try linking the two files.
7473          mv conftest.$ac_objext conftstm.$ac_objext
7474          lt_globsym_save_LIBS=$LIBS
7475          lt_globsym_save_CFLAGS=$CFLAGS
7476          LIBS=conftstm.$ac_objext
7477          CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
7478          if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then
7479            pipe_works=yes
7480          fi
7481          LIBS=$lt_globsym_save_LIBS
7482          CFLAGS=$lt_globsym_save_CFLAGS
7483        else
7484          echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
7485        fi
7486      else
7487        echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
7488      fi
7489    else
7490      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
7491    fi
7492  else
7493    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
7494    cat conftest.$ac_ext >&5
7495  fi
7496  rm -rf conftest* conftst*
7497
7498  # Do not use the global_symbol_pipe unless it works.
7499  if test yes = "$pipe_works"; then
7500    break
7501  else
7502    lt_cv_sys_global_symbol_pipe=
7503  fi
7504done
7505])
7506if test -z "$lt_cv_sys_global_symbol_pipe"; then
7507  lt_cv_sys_global_symbol_to_cdecl=
7508fi
7509if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
7510  AC_MSG_RESULT(failed)
7511else
7512  AC_MSG_RESULT(ok)
7513fi
7514
7515# Response file support.
7516if test "$lt_cv_nm_interface" = "MS dumpbin"; then
7517  nm_file_list_spec='@'
7518elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
7519  nm_file_list_spec='@'
7520fi
7521
7522_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
7523    [Take the output of nm and produce a listing of raw symbols and C names])
7524_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
7525    [Transform the output of nm in a proper C declaration])
7526_LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1],
7527    [Transform the output of nm into a list of symbols to manually relocate])
7528_LT_DECL([global_symbol_to_c_name_address],
7529    [lt_cv_sys_global_symbol_to_c_name_address], [1],
7530    [Transform the output of nm in a C name address pair])
7531_LT_DECL([global_symbol_to_c_name_address_lib_prefix],
7532    [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
7533    [Transform the output of nm in a C name address pair when lib prefix is needed])
7534_LT_DECL([nm_interface], [lt_cv_nm_interface], [1],
7535    [The name lister interface])
7536_LT_DECL([], [nm_file_list_spec], [1],
7537    [Specify filename containing input files for $NM])
7538]) # _LT_CMD_GLOBAL_SYMBOLS
7539
7540
7541# _LT_COMPILER_PIC([TAGNAME])
7542# ---------------------------
7543m4_defun([_LT_COMPILER_PIC],
7544[m4_require([_LT_TAG_COMPILER])dnl
7545_LT_TAGVAR(lt_prog_compiler_wl, $1)=
7546_LT_TAGVAR(lt_prog_compiler_pic, $1)=
7547_LT_TAGVAR(lt_prog_compiler_static, $1)=
7548
7549m4_if([$1], [CXX], [
7550  # C++ specific cases for pic, static, wl, etc.
7551  if test yes = "$GXX"; then
7552    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7553    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
7554
7555    case $host_os in
7556    aix*)
7557      # All AIX code is PIC.
7558      if test ia64 = "$host_cpu"; then
7559        # AIX 5 now supports IA64 processor
7560        _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
7561      fi
7562      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
7563      ;;
7564
7565    amigaos*)
7566      case $host_cpu in
7567      powerpc)
7568            # see comment about AmigaOS4 .so support
7569            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
7570        ;;
7571      m68k)
7572            # FIXME: we need at least 68020 code to build shared libraries, but
7573            # adding the '-m68020' flag to GCC prevents building anything better,
7574            # like '-m68040'.
7575            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
7576        ;;
7577      esac
7578      ;;
7579
7580    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
7581      # PIC is the default for these OSes.
7582      ;;
7583    mingw* | cygwin* | os2* | pw32* | cegcc*)
7584      # This hack is so that the source file can tell whether it is being
7585      # built for inclusion in a dll (and should export symbols for example).
7586      # Although the cygwin gcc ignores -fPIC, still need this for old-style
7587      # (--disable-auto-import) libraries
7588      m4_if([$1], [GCJ], [],
7589        [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
7590      case $host_os in
7591      os2*)
7592        _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
7593        ;;
7594      esac
7595      ;;
7596    darwin* | rhapsody*)
7597      # PIC is the default on this platform
7598      # Common symbols not allowed in MH_DYLIB files
7599      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
7600      ;;
7601    *djgpp*)
7602      # DJGPP does not support shared libraries at all
7603      _LT_TAGVAR(lt_prog_compiler_pic, $1)=
7604      ;;
7605    haiku*)
7606      # PIC is the default for Haiku.
7607      # The "-static" flag exists, but is broken.
7608      _LT_TAGVAR(lt_prog_compiler_static, $1)=
7609      ;;
7610    interix[[3-9]]*)
7611      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
7612      # Instead, we relocate shared libraries at runtime.
7613      ;;
7614    sysv4*MP*)
7615      if test -d /usr/nec; then
7616        _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
7617      fi
7618      ;;
7619    hpux*)
7620      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
7621      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
7622      # sets the default TLS model and affects inlining.
7623      case $host_cpu in
7624      hppa*64*)
7625        ;;
7626      *)
7627        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
7628        ;;
7629      esac
7630      ;;
7631    *qnx* | *nto*)
7632      # QNX uses GNU C++, but need to define -shared option too, otherwise
7633      # it will coredump.
7634      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
7635      ;;
7636    *)
7637      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
7638      ;;
7639    esac
7640  else
7641    case $host_os in
7642      aix[[4-9]]*)
7643        # All AIX code is PIC.
7644        if test ia64 = "$host_cpu"; then
7645          # AIX 5 now supports IA64 processor
7646          _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
7647        else
7648          _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
7649        fi
7650        ;;
7651      chorus*)
7652        case $cc_basename in
7653        cxch68*)
7654          # Green Hills C++ Compiler
7655          # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
7656          ;;
7657        esac
7658        ;;
7659      mingw* | cygwin* | os2* | pw32* | cegcc*)
7660        # This hack is so that the source file can tell whether it is being
7661        # built for inclusion in a dll (and should export symbols for example).
7662        m4_if([$1], [GCJ], [],
7663          [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
7664        ;;
7665      dgux*)
7666        case $cc_basename in
7667          ec++*)
7668            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
7669            ;;
7670          ghcx*)
7671            # Green Hills C++ Compiler
7672            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
7673            ;;
7674          *)
7675            ;;
7676        esac
7677        ;;
7678      freebsd* | dragonfly*)
7679        # FreeBSD uses GNU C++
7680        ;;
7681      hpux9* | hpux10* | hpux11*)
7682        case $cc_basename in
7683          CC*)
7684            _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7685            _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
7686            if test ia64 != "$host_cpu"; then
7687              _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
7688            fi
7689            ;;
7690          aCC*)
7691            _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7692            _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
7693            case $host_cpu in
7694            hppa*64*|ia64*)
7695              # +Z the default
7696              ;;
7697            *)
7698              _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
7699              ;;
7700            esac
7701            ;;
7702          *)
7703            ;;
7704        esac
7705        ;;
7706      interix*)
7707        # This is c89, which is MS Visual C++ (no shared libs)
7708        # Anyone wants to do a port?
7709        ;;
7710      irix5* | irix6* | nonstopux*)
7711        case $cc_basename in
7712          CC*)
7713            _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7714            _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
7715            # CC pic flag -KPIC is the default.
7716            ;;
7717          *)
7718            ;;
7719        esac
7720        ;;
7721      linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
7722        case $cc_basename in
7723          KCC*)
7724            # KAI C++ Compiler
7725            _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
7726            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
7727            ;;
7728          ecpc* )
7729            # old Intel C++ for x86_64, which still supported -KPIC.
7730            _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7731            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
7732            _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
7733            ;;
7734          icpc* )
7735            # Intel C++, used to be incompatible with GCC.
7736            # ICC 10 doesn't accept -KPIC any more.
7737            _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7738            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
7739            _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
7740            ;;
7741          pgCC* | pgcpp*)
7742            # Portland Group C++ compiler
7743            _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7744            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
7745            _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
7746            ;;
7747          cxx*)
7748            # Compaq C++
7749            # Make sure the PIC flag is empty.  It appears that all Alpha
7750            # Linux and Compaq Tru64 Unix objects are PIC.
7751            _LT_TAGVAR(lt_prog_compiler_pic, $1)=
7752            _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
7753            ;;
7754          xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
7755            # IBM XL 8.0, 9.0 on PPC and BlueGene
7756            _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7757            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
7758            _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
7759            ;;
7760          *)
7761            case `$CC -V 2>&1 | sed 5q` in
7762            *Sun\ C*)
7763              # Sun C++ 5.9
7764              _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
7765              _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
7766              _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
7767              ;;
7768            esac
7769            ;;
7770        esac
7771        ;;
7772      lynxos*)
7773        ;;
7774      m88k*)
7775        ;;
7776      mvs*)
7777        case $cc_basename in
7778          cxx*)
7779            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
7780            ;;
7781          *)
7782            ;;
7783        esac
7784        ;;
7785      netbsd*)
7786        ;;
7787      *qnx* | *nto*)
7788        # QNX uses GNU C++, but need to define -shared option too, otherwise
7789        # it will coredump.
7790        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
7791        ;;
7792      osf3* | osf4* | osf5*)
7793        case $cc_basename in
7794          KCC*)
7795            _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
7796            ;;
7797          RCC*)
7798            # Rational C++ 2.4.1
7799            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
7800            ;;
7801          cxx*)
7802            # Digital/Compaq C++
7803            _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7804            # Make sure the PIC flag is empty.  It appears that all Alpha
7805            # Linux and Compaq Tru64 Unix objects are PIC.
7806            _LT_TAGVAR(lt_prog_compiler_pic, $1)=
7807            _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
7808            ;;
7809          *)
7810            ;;
7811        esac
7812        ;;
7813      psos*)
7814        ;;
7815      solaris*)
7816        case $cc_basename in
7817          CC* | sunCC*)
7818            # Sun C++ 4.2, 5.x and Centerline C++
7819            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
7820            _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
7821            _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
7822            ;;
7823          gcx*)
7824            # Green Hills C++ Compiler
7825            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
7826            ;;
7827          *)
7828            ;;
7829        esac
7830        ;;
7831      sunos4*)
7832        case $cc_basename in
7833          CC*)
7834            # Sun C++ 4.x
7835            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
7836            _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
7837            ;;
7838          lcc*)
7839            # Lucid
7840            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
7841            ;;
7842          *)
7843            ;;
7844        esac
7845        ;;
7846      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
7847        case $cc_basename in
7848          CC*)
7849            _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7850            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
7851            _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
7852            ;;
7853        esac
7854        ;;
7855      tandem*)
7856        case $cc_basename in
7857          NCC*)
7858            # NonStop-UX NCC 3.20
7859            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
7860            ;;
7861          *)
7862            ;;
7863        esac
7864        ;;
7865      vxworks*)
7866        ;;
7867      *)
7868        _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
7869        ;;
7870    esac
7871  fi
7872],
7873[
7874  if test yes = "$GCC"; then
7875    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7876    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
7877
7878    case $host_os in
7879      aix*)
7880      # All AIX code is PIC.
7881      if test ia64 = "$host_cpu"; then
7882        # AIX 5 now supports IA64 processor
7883        _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
7884      fi
7885      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
7886      ;;
7887
7888    amigaos*)
7889      case $host_cpu in
7890      powerpc)
7891            # see comment about AmigaOS4 .so support
7892            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
7893        ;;
7894      m68k)
7895            # FIXME: we need at least 68020 code to build shared libraries, but
7896            # adding the '-m68020' flag to GCC prevents building anything better,
7897            # like '-m68040'.
7898            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
7899        ;;
7900      esac
7901      ;;
7902
7903    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
7904      # PIC is the default for these OSes.
7905      ;;
7906
7907    mingw* | cygwin* | pw32* | os2* | cegcc*)
7908      # This hack is so that the source file can tell whether it is being
7909      # built for inclusion in a dll (and should export symbols for example).
7910      # Although the cygwin gcc ignores -fPIC, still need this for old-style
7911      # (--disable-auto-import) libraries
7912      m4_if([$1], [GCJ], [],
7913        [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
7914      case $host_os in
7915      os2*)
7916        _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
7917        ;;
7918      esac
7919      ;;
7920
7921    darwin* | rhapsody*)
7922      # PIC is the default on this platform
7923      # Common symbols not allowed in MH_DYLIB files
7924      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
7925      ;;
7926
7927    haiku*)
7928      # PIC is the default for Haiku.
7929      # The "-static" flag exists, but is broken.
7930      _LT_TAGVAR(lt_prog_compiler_static, $1)=
7931      ;;
7932
7933    hpux*)
7934      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
7935      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
7936      # sets the default TLS model and affects inlining.
7937      case $host_cpu in
7938      hppa*64*)
7939        # +Z the default
7940        ;;
7941      *)
7942        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
7943        ;;
7944      esac
7945      ;;
7946
7947    interix[[3-9]]*)
7948      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
7949      # Instead, we relocate shared libraries at runtime.
7950      ;;
7951
7952    msdosdjgpp*)
7953      # Just because we use GCC doesn't mean we suddenly get shared libraries
7954      # on systems that don't support them.
7955      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
7956      enable_shared=no
7957      ;;
7958
7959    *nto* | *qnx*)
7960      # QNX uses GNU C++, but need to define -shared option too, otherwise
7961      # it will coredump.
7962      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
7963      ;;
7964
7965    sysv4*MP*)
7966      if test -d /usr/nec; then
7967        _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
7968      fi
7969      ;;
7970
7971    *)
7972      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
7973      ;;
7974    esac
7975
7976    case $cc_basename in
7977    nvcc*) # Cuda Compiler Driver 2.2
7978      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
7979      if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
7980        _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)"
7981      fi
7982      ;;
7983    esac
7984  else
7985    # PORTME Check for flag to pass linker flags through the system compiler.
7986    case $host_os in
7987    aix*)
7988      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7989      if test ia64 = "$host_cpu"; then
7990        # AIX 5 now supports IA64 processor
7991        _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
7992      else
7993        _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
7994      fi
7995      ;;
7996
7997    darwin* | rhapsody*)
7998      # PIC is the default on this platform
7999      # Common symbols not allowed in MH_DYLIB files
8000      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
8001      case $cc_basename in
8002      nagfor*)
8003        # NAG Fortran compiler
8004        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
8005        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
8006        _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
8007        ;;
8008      esac
8009      ;;
8010
8011    mingw* | cygwin* | pw32* | os2* | cegcc*)
8012      # This hack is so that the source file can tell whether it is being
8013      # built for inclusion in a dll (and should export symbols for example).
8014      m4_if([$1], [GCJ], [],
8015        [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
8016      case $host_os in
8017      os2*)
8018        _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
8019        ;;
8020      esac
8021      ;;
8022
8023    hpux9* | hpux10* | hpux11*)
8024      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
8025      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
8026      # not for PA HP-UX.
8027      case $host_cpu in
8028      hppa*64*|ia64*)
8029        # +Z the default
8030        ;;
8031      *)
8032        _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
8033        ;;
8034      esac
8035      # Is there a better lt_prog_compiler_static that works with the bundled CC?
8036      _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
8037      ;;
8038
8039    irix5* | irix6* | nonstopux*)
8040      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
8041      # PIC (with -KPIC) is the default.
8042      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
8043      ;;
8044
8045    linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
8046      case $cc_basename in
8047      # old Intel for x86_64, which still supported -KPIC.
8048      ecc*)
8049        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
8050        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
8051        _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
8052        ;;
8053      # icc used to be incompatible with GCC.
8054      # ICC 10 doesn't accept -KPIC any more.
8055      icc* | ifort*)
8056        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
8057        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
8058        _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
8059        ;;
8060      # Lahey Fortran 8.1.
8061      lf95*)
8062        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
8063        _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
8064        _LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
8065        ;;
8066      nagfor*)
8067        # NAG Fortran compiler
8068        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
8069        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
8070        _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
8071        ;;
8072      tcc*)
8073        # Fabrice Bellard et al's Tiny C Compiler
8074        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
8075        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
8076        _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
8077        ;;
8078      pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
8079        # Portland Group compilers (*not* the Pentium gcc compiler,
8080        # which looks to be a dead project)
8081        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
8082        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
8083        _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
8084        ;;
8085      ccc*)
8086        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
8087        # All Alpha code is PIC.
8088        _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
8089        ;;
8090      xl* | bgxl* | bgf* | mpixl*)
8091        # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
8092        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
8093        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
8094        _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
8095        ;;
8096      *)
8097        case `$CC -V 2>&1 | sed 5q` in
8098        *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*)
8099          # Sun Fortran 8.3 passes all unrecognized flags to the linker
8100          _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
8101          _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
8102          _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
8103          ;;
8104        *Sun\ F* | *Sun*Fortran*)
8105          _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
8106          _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
8107          _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
8108          ;;
8109        *Sun\ C*)
8110          # Sun C 5.9
8111          _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
8112          _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
8113          _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
8114          ;;
8115        *Intel*\ [[CF]]*Compiler*)
8116          _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
8117          _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
8118          _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
8119          ;;
8120        *Portland\ Group*)
8121          _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
8122          _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
8123          _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
8124          ;;
8125        esac
8126        ;;
8127      esac
8128      ;;
8129
8130    newsos6)
8131      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
8132      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
8133      ;;
8134
8135    *nto* | *qnx*)
8136      # QNX uses GNU C++, but need to define -shared option too, otherwise
8137      # it will coredump.
8138      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
8139      ;;
8140
8141    osf3* | osf4* | osf5*)
8142      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
8143      # All OSF/1 code is PIC.
8144      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
8145      ;;
8146
8147    rdos*)
8148      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
8149      ;;
8150
8151    solaris*)
8152      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
8153      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
8154      case $cc_basename in
8155      f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
8156        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
8157      *)
8158        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
8159      esac
8160      ;;
8161
8162    sunos4*)
8163      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
8164      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
8165      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
8166      ;;
8167
8168    sysv4 | sysv4.2uw2* | sysv4.3*)
8169      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
8170      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
8171      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
8172      ;;
8173
8174    sysv4*MP*)
8175      if test -d /usr/nec; then
8176        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
8177        _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
8178      fi
8179      ;;
8180
8181    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
8182      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
8183      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
8184      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
8185      ;;
8186
8187    unicos*)
8188      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
8189      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
8190      ;;
8191
8192    uts4*)
8193      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
8194      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
8195      ;;
8196
8197    *)
8198      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
8199      ;;
8200    esac
8201  fi
8202])
8203case $host_os in
8204  # For platforms that do not support PIC, -DPIC is meaningless:
8205  *djgpp*)
8206    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
8207    ;;
8208  *)
8209    _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
8210    ;;
8211esac
8212
8213AC_CACHE_CHECK([for $compiler option to produce PIC],
8214  [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
8215  [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
8216_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
8217
8218#
8219# Check to make sure the PIC flag actually works.
8220#
8221if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
8222  _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
8223    [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
8224    [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
8225    [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
8226     "" | " "*) ;;
8227     *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
8228     esac],
8229    [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
8230     _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
8231fi
8232_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
8233        [Additional compiler flags for building library objects])
8234
8235_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
8236        [How to pass a linker flag through the compiler])
8237#
8238# Check to make sure the static flag actually works.
8239#
8240wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
8241_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
8242  _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
8243  $lt_tmp_static_flag,
8244  [],
8245  [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
8246_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
8247        [Compiler flag to prevent dynamic linking])
8248])# _LT_COMPILER_PIC
8249
8250
8251# _LT_LINKER_SHLIBS([TAGNAME])
8252# ----------------------------
8253# See if the linker supports building shared libraries.
8254m4_defun([_LT_LINKER_SHLIBS],
8255[AC_REQUIRE([LT_PATH_LD])dnl
8256AC_REQUIRE([LT_PATH_NM])dnl
8257m4_require([_LT_PATH_MANIFEST_TOOL])dnl
8258m4_require([_LT_FILEUTILS_DEFAULTS])dnl
8259m4_require([_LT_DECL_EGREP])dnl
8260m4_require([_LT_DECL_SED])dnl
8261m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
8262m4_require([_LT_TAG_COMPILER])dnl
8263AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
8264m4_if([$1], [CXX], [
8265  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
8266  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
8267  case $host_os in
8268  aix[[4-9]]*)
8269    # If we're using GNU nm, then we don't want the "-C" option.
8270    # -C means demangle to GNU nm, but means don't demangle to AIX nm.
8271    # Without the "-l" option, or with the "-B" option, AIX nm treats
8272    # weak defined symbols like other global defined symbols, whereas
8273    # GNU nm marks them as "W".
8274    # While the 'weak' keyword is ignored in the Export File, we need
8275    # it in the Import File for the 'aix-soname' feature, so we have
8276    # to replace the "-B" option with "-P" for AIX nm.
8277    if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
8278      _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
8279    else
8280      _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
8281    fi
8282    ;;
8283  pw32*)
8284    _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds
8285    ;;
8286  cygwin* | mingw* | cegcc*)
8287    case $cc_basename in
8288    cl* | icl* | ifort*)
8289      _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
8290      ;;
8291    *)
8292      _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
8293      _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
8294      ;;
8295    esac
8296    ;;
8297  *)
8298    _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
8299    ;;
8300  esac
8301], [
8302  runpath_var=
8303  _LT_TAGVAR(allow_undefined_flag, $1)=
8304  _LT_TAGVAR(always_export_symbols, $1)=no
8305  _LT_TAGVAR(archive_cmds, $1)=
8306  _LT_TAGVAR(archive_expsym_cmds, $1)=
8307  _LT_TAGVAR(compiler_needs_object, $1)=no
8308  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
8309  _LT_TAGVAR(export_dynamic_flag_spec, $1)=
8310  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
8311  _LT_TAGVAR(hardcode_automatic, $1)=no
8312  _LT_TAGVAR(hardcode_direct, $1)=no
8313  _LT_TAGVAR(hardcode_direct_absolute, $1)=no
8314  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
8315  _LT_TAGVAR(hardcode_libdir_separator, $1)=
8316  _LT_TAGVAR(hardcode_minus_L, $1)=no
8317  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
8318  _LT_TAGVAR(inherit_rpath, $1)=no
8319  _LT_TAGVAR(link_all_deplibs, $1)=unknown
8320  _LT_TAGVAR(module_cmds, $1)=
8321  _LT_TAGVAR(module_expsym_cmds, $1)=
8322  _LT_TAGVAR(old_archive_from_new_cmds, $1)=
8323  _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
8324  _LT_TAGVAR(thread_safe_flag_spec, $1)=
8325  _LT_TAGVAR(whole_archive_flag_spec, $1)=
8326  # include_expsyms should be a list of space-separated symbols to be *always*
8327  # included in the symbol list
8328  _LT_TAGVAR(include_expsyms, $1)=
8329  # exclude_expsyms can be an extended regexp of symbols to exclude
8330  # it will be wrapped by ' (' and ')$', so one must not match beginning or
8331  # end of line.  Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc',
8332  # as well as any symbol that contains 'd'.
8333  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
8334  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
8335  # platforms (ab)use it in PIC code, but their linkers get confused if
8336  # the symbol is explicitly referenced.  Since portable code cannot
8337  # rely on this symbol name, it's probably fine to never include it in
8338  # preloaded symbol tables.
8339  # Exclude shared library initialization/finalization symbols.
8340dnl Note also adjust exclude_expsyms for C++ above.
8341  extract_expsyms_cmds=
8342
8343  case $host_os in
8344  cygwin* | mingw* | pw32* | cegcc*)
8345    # FIXME: the MSVC++ port hasn't been tested in a loooong time
8346    # When not using gcc, we currently assume that we are using
8347    # Microsoft Visual C++.
8348    if test yes != "$GCC"; then
8349      with_gnu_ld=no
8350    fi
8351    ;;
8352  interix*)
8353    # we just hope/assume this is gcc and not c89 (= MSVC++)
8354    with_gnu_ld=yes
8355    ;;
8356  openbsd* | bitrig*)
8357    with_gnu_ld=no
8358    ;;
8359  esac
8360
8361  _LT_TAGVAR(ld_shlibs, $1)=yes
8362
8363  # On some targets, GNU ld is compatible enough with the native linker
8364  # that we're better off using the native interface for both.
8365  lt_use_gnu_ld_interface=no
8366  if test yes = "$with_gnu_ld"; then
8367    case $host_os in
8368      aix*)
8369        # The AIX port of GNU ld has always aspired to compatibility
8370        # with the native linker.  However, as the warning in the GNU ld
8371        # block says, versions before 2.19.5* couldn't really create working
8372        # shared libraries, regardless of the interface used.
8373        case `$LD -v 2>&1` in
8374          *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
8375          *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
8376          *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
8377          *)
8378            lt_use_gnu_ld_interface=yes
8379            ;;
8380        esac
8381        ;;
8382      *)
8383        lt_use_gnu_ld_interface=yes
8384        ;;
8385    esac
8386  fi
8387
8388  if test yes = "$lt_use_gnu_ld_interface"; then
8389    # If archive_cmds runs LD, not CC, wlarc should be empty
8390    wlarc='$wl'
8391
8392    # Set some defaults for GNU ld with shared library support. These
8393    # are reset later if shared libraries are not supported. Putting them
8394    # here allows them to be overridden if necessary.
8395    runpath_var=LD_RUN_PATH
8396    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
8397    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
8398    # ancient GNU ld didn't support --whole-archive et. al.
8399    if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
8400      _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
8401    else
8402      _LT_TAGVAR(whole_archive_flag_spec, $1)=
8403    fi
8404    supports_anon_versioning=no
8405    case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in
8406      *GNU\ gold*) supports_anon_versioning=yes ;;
8407      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
8408      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
8409      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
8410      *\ 2.11.*) ;; # other 2.11 versions
8411      *) supports_anon_versioning=yes ;;
8412    esac
8413
8414    # See if GNU ld supports shared libraries.
8415    case $host_os in
8416    aix[[3-9]]*)
8417      # On AIX/PPC, the GNU linker is very broken
8418      if test ia64 != "$host_cpu"; then
8419        _LT_TAGVAR(ld_shlibs, $1)=no
8420        cat <<_LT_EOF 1>&2
8421
8422*** Warning: the GNU linker, at least up to release 2.19, is reported
8423*** to be unable to reliably create shared libraries on AIX.
8424*** Therefore, libtool is disabling shared libraries support.  If you
8425*** really care for shared libraries, you may want to install binutils
8426*** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
8427*** You will then need to restart the configuration process.
8428
8429_LT_EOF
8430      fi
8431      ;;
8432
8433    amigaos*)
8434      case $host_cpu in
8435      powerpc)
8436            # see comment about AmigaOS4 .so support
8437            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
8438            _LT_TAGVAR(archive_expsym_cmds, $1)=''
8439        ;;
8440      m68k)
8441            _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
8442            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
8443            _LT_TAGVAR(hardcode_minus_L, $1)=yes
8444        ;;
8445      esac
8446      ;;
8447
8448    beos*)
8449      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
8450        _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
8451        # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
8452        # support --undefined.  This deserves some investigation.  FIXME
8453        _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
8454      else
8455        _LT_TAGVAR(ld_shlibs, $1)=no
8456      fi
8457      ;;
8458
8459    cygwin* | mingw* | pw32* | cegcc*)
8460      # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
8461      # as there is no search path for DLLs.
8462      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
8463      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols'
8464      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
8465      _LT_TAGVAR(always_export_symbols, $1)=no
8466      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
8467      _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
8468      _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
8469
8470      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
8471        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
8472        # If the export-symbols file already is a .def file, use it as
8473        # is; otherwise, prepend EXPORTS...
8474        _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
8475          cp $export_symbols $output_objdir/$soname.def;
8476        else
8477          echo EXPORTS > $output_objdir/$soname.def;
8478          cat $export_symbols >> $output_objdir/$soname.def;
8479        fi~
8480        $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
8481      else
8482        _LT_TAGVAR(ld_shlibs, $1)=no
8483      fi
8484      ;;
8485
8486    haiku*)
8487      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
8488      _LT_TAGVAR(link_all_deplibs, $1)=yes
8489      ;;
8490
8491    os2*)
8492      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
8493      _LT_TAGVAR(hardcode_minus_L, $1)=yes
8494      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
8495      shrext_cmds=.dll
8496      _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
8497        $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
8498        $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
8499        $ECHO EXPORTS >> $output_objdir/$libname.def~
8500        emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
8501        $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
8502        emximp -o $lib $output_objdir/$libname.def'
8503      _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
8504        $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
8505        $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
8506        $ECHO EXPORTS >> $output_objdir/$libname.def~
8507        prefix_cmds="$SED"~
8508        if test EXPORTS = "`$SED 1q $export_symbols`"; then
8509          prefix_cmds="$prefix_cmds -e 1d";
8510        fi~
8511        prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
8512        cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
8513        $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
8514        emximp -o $lib $output_objdir/$libname.def'
8515      _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
8516      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
8517      ;;
8518
8519    interix[[3-9]]*)
8520      _LT_TAGVAR(hardcode_direct, $1)=no
8521      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8522      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
8523      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
8524      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
8525      # Instead, shared libraries are loaded at an image base (0x10000000 by
8526      # default) and relocated if they conflict, which is a slow very memory
8527      # consuming and fragmenting process.  To avoid this, we pick a random,
8528      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
8529      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
8530      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
8531      _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
8532      ;;
8533
8534    gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
8535      tmp_diet=no
8536      if test linux-dietlibc = "$host_os"; then
8537        case $cc_basename in
8538          diet\ *) tmp_diet=yes;;       # linux-dietlibc with static linking (!diet-dyn)
8539        esac
8540      fi
8541      if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
8542         && test no = "$tmp_diet"
8543      then
8544        tmp_addflag=' $pic_flag'
8545        tmp_sharedflag='-shared'
8546        case $cc_basename,$host_cpu in
8547        pgcc*)                          # Portland Group C compiler
8548          _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
8549          tmp_addflag=' $pic_flag'
8550          ;;
8551        pgf77* | pgf90* | pgf95* | pgfortran*)
8552                                        # Portland Group f77 and f90 compilers
8553          _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
8554          tmp_addflag=' $pic_flag -Mnomain' ;;
8555        ecc*,ia64* | icc*,ia64*)        # Intel C compiler on ia64
8556          tmp_addflag=' -i_dynamic' ;;
8557        efc*,ia64* | ifort*,ia64*)      # Intel Fortran compiler on ia64
8558          tmp_addflag=' -i_dynamic -nofor_main' ;;
8559        ifc* | ifort*)                  # Intel Fortran compiler
8560          tmp_addflag=' -nofor_main' ;;
8561        lf95*)                          # Lahey Fortran 8.1
8562          _LT_TAGVAR(whole_archive_flag_spec, $1)=
8563          tmp_sharedflag='--shared' ;;
8564        nagfor*)                        # NAGFOR 5.3
8565          tmp_sharedflag='-Wl,-shared' ;;
8566        xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
8567          tmp_sharedflag='-qmkshrobj'
8568          tmp_addflag= ;;
8569        nvcc*)  # Cuda Compiler Driver 2.2
8570          _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
8571          _LT_TAGVAR(compiler_needs_object, $1)=yes
8572          ;;
8573        esac
8574        case `$CC -V 2>&1 | sed 5q` in
8575        *Sun\ C*)                       # Sun C 5.9
8576          _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
8577          _LT_TAGVAR(compiler_needs_object, $1)=yes
8578          tmp_sharedflag='-G' ;;
8579        *Sun\ F*)                       # Sun Fortran 8.3
8580          tmp_sharedflag='-G' ;;
8581        esac
8582        _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
8583
8584        if test yes = "$supports_anon_versioning"; then
8585          _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
8586            cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
8587            echo "local: *; };" >> $output_objdir/$libname.ver~
8588            $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
8589        fi
8590
8591        case $cc_basename in
8592        tcc*)
8593          _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic'
8594          ;;
8595        xlf* | bgf* | bgxlf* | mpixlf*)
8596          # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
8597          _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
8598          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
8599          _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
8600          if test yes = "$supports_anon_versioning"; then
8601            _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
8602              cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
8603              echo "local: *; };" >> $output_objdir/$libname.ver~
8604              $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
8605          fi
8606          ;;
8607        esac
8608      else
8609        _LT_TAGVAR(ld_shlibs, $1)=no
8610      fi
8611      ;;
8612
8613    netbsd*)
8614      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
8615        _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
8616        wlarc=
8617      else
8618        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
8619        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
8620      fi
8621      ;;
8622
8623    solaris*)
8624      if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
8625        _LT_TAGVAR(ld_shlibs, $1)=no
8626        cat <<_LT_EOF 1>&2
8627
8628*** Warning: The releases 2.8.* of the GNU linker cannot reliably
8629*** create shared libraries on Solaris systems.  Therefore, libtool
8630*** is disabling shared libraries support.  We urge you to upgrade GNU
8631*** binutils to release 2.9.1 or newer.  Another option is to modify
8632*** your PATH or compiler configuration so that the native linker is
8633*** used, and then restart.
8634
8635_LT_EOF
8636      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
8637        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
8638        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
8639      else
8640        _LT_TAGVAR(ld_shlibs, $1)=no
8641      fi
8642      ;;
8643
8644    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
8645      case `$LD -v 2>&1` in
8646        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
8647        _LT_TAGVAR(ld_shlibs, $1)=no
8648        cat <<_LT_EOF 1>&2
8649
8650*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot
8651*** reliably create shared libraries on SCO systems.  Therefore, libtool
8652*** is disabling shared libraries support.  We urge you to upgrade GNU
8653*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
8654*** your PATH or compiler configuration so that the native linker is
8655*** used, and then restart.
8656
8657_LT_EOF
8658        ;;
8659        *)
8660          # For security reasons, it is highly recommended that you always
8661          # use absolute paths for naming shared libraries, and exclude the
8662          # DT_RUNPATH tag from executables and libraries.  But doing so
8663          # requires that you compile everything twice, which is a pain.
8664          if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
8665            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
8666            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
8667            _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
8668          else
8669            _LT_TAGVAR(ld_shlibs, $1)=no
8670          fi
8671        ;;
8672      esac
8673      ;;
8674
8675    sunos4*)
8676      _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
8677      wlarc=
8678      _LT_TAGVAR(hardcode_direct, $1)=yes
8679      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8680      ;;
8681
8682    *)
8683      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
8684        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
8685        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
8686      else
8687        _LT_TAGVAR(ld_shlibs, $1)=no
8688      fi
8689      ;;
8690    esac
8691
8692    if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then
8693      runpath_var=
8694      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
8695      _LT_TAGVAR(export_dynamic_flag_spec, $1)=
8696      _LT_TAGVAR(whole_archive_flag_spec, $1)=
8697    fi
8698  else
8699    # PORTME fill in a description of your system's linker (not GNU ld)
8700    case $host_os in
8701    aix3*)
8702      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
8703      _LT_TAGVAR(always_export_symbols, $1)=yes
8704      _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
8705      # Note: this linker hardcodes the directories in LIBPATH if there
8706      # are no directories specified by -L.
8707      _LT_TAGVAR(hardcode_minus_L, $1)=yes
8708      if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then
8709        # Neither direct hardcoding nor static linking is supported with a
8710        # broken collect2.
8711        _LT_TAGVAR(hardcode_direct, $1)=unsupported
8712      fi
8713      ;;
8714
8715    aix[[4-9]]*)
8716      if test ia64 = "$host_cpu"; then
8717        # On IA64, the linker does run time linking by default, so we don't
8718        # have to do anything special.
8719        aix_use_runtimelinking=no
8720        exp_sym_flag='-Bexport'
8721        no_entry_flag=
8722      else
8723        # If we're using GNU nm, then we don't want the "-C" option.
8724        # -C means demangle to GNU nm, but means don't demangle to AIX nm.
8725        # Without the "-l" option, or with the "-B" option, AIX nm treats
8726        # weak defined symbols like other global defined symbols, whereas
8727        # GNU nm marks them as "W".
8728        # While the 'weak' keyword is ignored in the Export File, we need
8729        # it in the Import File for the 'aix-soname' feature, so we have
8730        # to replace the "-B" option with "-P" for AIX nm.
8731        if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
8732          _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
8733        else
8734          _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
8735        fi
8736        aix_use_runtimelinking=no
8737
8738        # Test if we are trying to use run time linking or normal
8739        # AIX style linking. If -brtl is somewhere in LDFLAGS, we
8740        # have runtime linking enabled, and use it for executables.
8741        # For shared libraries, we enable/disable runtime linking
8742        # depending on the kind of the shared library created -
8743        # when "with_aix_soname,aix_use_runtimelinking" is:
8744        # "aix,no"   lib.a(lib.so.V) shared, rtl:no,  for executables
8745        # "aix,yes"  lib.so          shared, rtl:yes, for executables
8746        #            lib.a           static archive
8747        # "both,no"  lib.so.V(shr.o) shared, rtl:yes
8748        #            lib.a(lib.so.V) shared, rtl:no,  for executables
8749        # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
8750        #            lib.a(lib.so.V) shared, rtl:no
8751        # "svr4,*"   lib.so.V(shr.o) shared, rtl:yes, for executables
8752        #            lib.a           static archive
8753        case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
8754          for ld_flag in $LDFLAGS; do
8755          if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then
8756            aix_use_runtimelinking=yes
8757            break
8758          fi
8759          done
8760          if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
8761            # With aix-soname=svr4, we create the lib.so.V shared archives only,
8762            # so we don't have lib.a shared libs to link our executables.
8763            # We have to force runtime linking in this case.
8764            aix_use_runtimelinking=yes
8765            LDFLAGS="$LDFLAGS -Wl,-brtl"
8766          fi
8767          ;;
8768        esac
8769
8770        exp_sym_flag='-bexport'
8771        no_entry_flag='-bnoentry'
8772      fi
8773
8774      # When large executables or shared objects are built, AIX ld can
8775      # have problems creating the table of contents.  If linking a library
8776      # or program results in "error TOC overflow" add -mminimal-toc to
8777      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
8778      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
8779
8780      _LT_TAGVAR(archive_cmds, $1)=''
8781      _LT_TAGVAR(hardcode_direct, $1)=yes
8782      _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
8783      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
8784      _LT_TAGVAR(link_all_deplibs, $1)=yes
8785      _LT_TAGVAR(file_list_spec, $1)='$wl-f,'
8786      case $with_aix_soname,$aix_use_runtimelinking in
8787      aix,*) ;; # traditional, no import file
8788      svr4,* | *,yes) # use import file
8789        # The Import File defines what to hardcode.
8790        _LT_TAGVAR(hardcode_direct, $1)=no
8791        _LT_TAGVAR(hardcode_direct_absolute, $1)=no
8792        ;;
8793      esac
8794
8795      if test yes = "$GCC"; then
8796        case $host_os in aix4.[[012]]|aix4.[[012]].*)
8797        # We only want to do this on AIX 4.2 and lower, the check
8798        # below for broken collect2 doesn't work under 4.3+
8799          collect2name=`$CC -print-prog-name=collect2`
8800          if test -f "$collect2name" &&
8801           strings "$collect2name" | $GREP resolve_lib_name >/dev/null
8802          then
8803          # We have reworked collect2
8804          :
8805          else
8806          # We have old collect2
8807          _LT_TAGVAR(hardcode_direct, $1)=unsupported
8808          # It fails to find uninstalled libraries when the uninstalled
8809          # path is not listed in the libpath.  Setting hardcode_minus_L
8810          # to unsupported forces relinking
8811          _LT_TAGVAR(hardcode_minus_L, $1)=yes
8812          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
8813          _LT_TAGVAR(hardcode_libdir_separator, $1)=
8814          fi
8815          ;;
8816        esac
8817        shared_flag='-shared'
8818        if test yes = "$aix_use_runtimelinking"; then
8819          shared_flag="$shared_flag "'$wl-G'
8820        fi
8821        # Need to ensure runtime linking is disabled for the traditional
8822        # shared library, or the linker may eventually find shared libraries
8823        # /with/ Import File - we do not want to mix them.
8824        shared_flag_aix='-shared'
8825        shared_flag_svr4='-shared $wl-G'
8826      else
8827        # not using gcc
8828        if test ia64 = "$host_cpu"; then
8829        # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
8830        # chokes on -Wl,-G. The following line is correct:
8831          shared_flag='-G'
8832        else
8833          if test yes = "$aix_use_runtimelinking"; then
8834            shared_flag='$wl-G'
8835          else
8836            shared_flag='$wl-bM:SRE'
8837          fi
8838          shared_flag_aix='$wl-bM:SRE'
8839          shared_flag_svr4='$wl-G'
8840        fi
8841      fi
8842
8843      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall'
8844      # It seems that -bexpall does not export symbols beginning with
8845      # underscore (_), so it is better to generate a list of symbols to export.
8846      _LT_TAGVAR(always_export_symbols, $1)=yes
8847      if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
8848        # Warning - without using the other runtime loading flags (-brtl),
8849        # -berok will link without error, but may produce a broken library.
8850        _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
8851        # Determine the default libpath from the value encoded in an
8852        # empty executable.
8853        _LT_SYS_MODULE_PATH_AIX([$1])
8854        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
8855        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag
8856      else
8857        if test ia64 = "$host_cpu"; then
8858          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib'
8859          _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
8860          _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols"
8861        else
8862         # Determine the default libpath from the value encoded in an
8863         # empty executable.
8864         _LT_SYS_MODULE_PATH_AIX([$1])
8865         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
8866          # Warning - without using the other run time loading flags,
8867          # -berok will link without error, but may produce a broken library.
8868          _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok'
8869          _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok'
8870          if test yes = "$with_gnu_ld"; then
8871            # We only use this code for GNU lds that support --whole-archive.
8872            _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
8873          else
8874            # Exported symbols can be pulled into shared objects from archives
8875            _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
8876          fi
8877          _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
8878          _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
8879          # -brtl affects multiple linker settings, -berok does not and is overridden later
8880          compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`'
8881          if test svr4 != "$with_aix_soname"; then
8882            # This is similar to how AIX traditionally builds its shared libraries.
8883            _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname'
8884          fi
8885          if test aix != "$with_aix_soname"; then
8886            _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp'
8887          else
8888            # used by -dlpreopen to get the symbols
8889            _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV  $output_objdir/$realname.d/$soname $output_objdir'
8890          fi
8891          _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d'
8892        fi
8893      fi
8894      ;;
8895
8896    amigaos*)
8897      case $host_cpu in
8898      powerpc)
8899            # see comment about AmigaOS4 .so support
8900            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
8901            _LT_TAGVAR(archive_expsym_cmds, $1)=''
8902        ;;
8903      m68k)
8904            _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
8905            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
8906            _LT_TAGVAR(hardcode_minus_L, $1)=yes
8907        ;;
8908      esac
8909      ;;
8910
8911    bsdi[[45]]*)
8912      _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
8913      ;;
8914
8915    cygwin* | mingw* | pw32* | cegcc*)
8916      # When not using gcc, we currently assume that we are using
8917      # Microsoft Visual C++ or Intel C++/Fortran Compiler.
8918      # hardcode_libdir_flag_spec is actually meaningless, as there is
8919      # no search path for DLLs.
8920      case $cc_basename in
8921      cl* | icl*| ifort*)
8922        # Native MSVC or ICC or IFORT
8923        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
8924        _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
8925        _LT_TAGVAR(always_export_symbols, $1)=yes
8926        _LT_TAGVAR(file_list_spec, $1)='@'
8927        # Tell ltmain to make .lib files, not .a files.
8928        libext=lib
8929        # Tell ltmain to make .dll files, not .so files.
8930        shrext_cmds=.dll
8931        # FIXME: Setting linknames here is a bad hack.
8932        _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
8933        _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
8934            cp "$export_symbols" "$output_objdir/$soname.def";
8935            echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
8936          else
8937            $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
8938          fi~
8939          $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
8940          linknames='
8941        # The linker will not automatically build a static lib if we build a DLL.
8942        # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
8943        _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
8944        _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
8945        _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
8946        # Don't use ranlib
8947        _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
8948        _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
8949          lt_tool_outputfile="@TOOL_OUTPUT@"~
8950          case $lt_outputfile in
8951            *.exe|*.EXE) ;;
8952            *)
8953              lt_outputfile=$lt_outputfile.exe
8954              lt_tool_outputfile=$lt_tool_outputfile.exe
8955              ;;
8956          esac~
8957          if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
8958            $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
8959            $RM "$lt_outputfile.manifest";
8960          fi'
8961        ;;
8962      *)
8963        # Assume MSVC and ICC and IFORT wrapper
8964        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
8965        _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
8966        # Tell ltmain to make .lib files, not .a files.
8967        libext=lib
8968        # Tell ltmain to make .dll files, not .so files.
8969        shrext_cmds=.dll
8970        # FIXME: Setting linknames here is a bad hack.
8971        _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
8972        # The linker will automatically build a .lib file if we build a DLL.
8973        _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
8974        # FIXME: Should let the user specify the lib program.
8975        _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
8976        _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
8977        ;;
8978      esac
8979      ;;
8980
8981    darwin* | rhapsody*)
8982      _LT_DARWIN_LINKER_FEATURES($1)
8983      ;;
8984
8985    dgux*)
8986      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8987      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
8988      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8989      ;;
8990
8991    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
8992    # support.  Future versions do this automatically, but an explicit c++rt0.o
8993    # does not break anything, and helps significantly (at the cost of a little
8994    # extra space).
8995    freebsd2.2*)
8996      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
8997      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
8998      _LT_TAGVAR(hardcode_direct, $1)=yes
8999      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
9000      ;;
9001
9002    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
9003    freebsd2.*)
9004      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
9005      _LT_TAGVAR(hardcode_direct, $1)=yes
9006      _LT_TAGVAR(hardcode_minus_L, $1)=yes
9007      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
9008      ;;
9009
9010    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
9011    freebsd* | dragonfly*)
9012      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
9013      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
9014      _LT_TAGVAR(hardcode_direct, $1)=yes
9015      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
9016      ;;
9017
9018    hpux9*)
9019      if test yes = "$GCC"; then
9020        _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
9021      else
9022        _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
9023      fi
9024      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
9025      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
9026      _LT_TAGVAR(hardcode_direct, $1)=yes
9027
9028      # hardcode_minus_L: Not really in the search PATH,
9029      # but as the default location of the library.
9030      _LT_TAGVAR(hardcode_minus_L, $1)=yes
9031      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
9032      ;;
9033
9034    hpux10*)
9035      if test yes,no = "$GCC,$with_gnu_ld"; then
9036        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
9037      else
9038        _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
9039      fi
9040      if test no = "$with_gnu_ld"; then
9041        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
9042        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
9043        _LT_TAGVAR(hardcode_direct, $1)=yes
9044        _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
9045        _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
9046        # hardcode_minus_L: Not really in the search PATH,
9047        # but as the default location of the library.
9048        _LT_TAGVAR(hardcode_minus_L, $1)=yes
9049      fi
9050      ;;
9051
9052    hpux11*)
9053      if test yes,no = "$GCC,$with_gnu_ld"; then
9054        case $host_cpu in
9055        hppa*64*)
9056          _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
9057          ;;
9058        ia64*)
9059          _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
9060          ;;
9061        *)
9062          _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
9063          ;;
9064        esac
9065      else
9066        case $host_cpu in
9067        hppa*64*)
9068          _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
9069          ;;
9070        ia64*)
9071          _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
9072          ;;
9073        *)
9074        m4_if($1, [], [
9075          # Older versions of the 11.00 compiler do not understand -b yet
9076          # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
9077          _LT_LINKER_OPTION([if $CC understands -b],
9078            _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
9079            [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
9080            [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
9081          [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
9082          ;;
9083        esac
9084      fi
9085      if test no = "$with_gnu_ld"; then
9086        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
9087        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
9088
9089        case $host_cpu in
9090        hppa*64*|ia64*)
9091          _LT_TAGVAR(hardcode_direct, $1)=no
9092          _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
9093          ;;
9094        *)
9095          _LT_TAGVAR(hardcode_direct, $1)=yes
9096          _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
9097          _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
9098
9099          # hardcode_minus_L: Not really in the search PATH,
9100          # but as the default location of the library.
9101          _LT_TAGVAR(hardcode_minus_L, $1)=yes
9102          ;;
9103        esac
9104      fi
9105      ;;
9106
9107    irix5* | irix6* | nonstopux*)
9108      if test yes = "$GCC"; then
9109        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
9110        # Try to use the -exported_symbol ld option, if it does not
9111        # work, assume that -exports_file does not work either and
9112        # implicitly export all symbols.
9113        # This should be the same for all languages, so no per-tag cache variable.
9114        AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
9115          [lt_cv_irix_exported_symbol],
9116          [save_LDFLAGS=$LDFLAGS
9117           LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null"
9118           AC_LINK_IFELSE(
9119             [AC_LANG_SOURCE(
9120                [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
9121                              [C++], [[int foo (void) { return 0; }]],
9122                              [Fortran 77], [[
9123      subroutine foo
9124      end]],
9125                              [Fortran], [[
9126      subroutine foo
9127      end]])])],
9128              [lt_cv_irix_exported_symbol=yes],
9129              [lt_cv_irix_exported_symbol=no])
9130           LDFLAGS=$save_LDFLAGS])
9131        if test yes = "$lt_cv_irix_exported_symbol"; then
9132          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib'
9133        fi
9134      else
9135        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
9136        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib'
9137      fi
9138      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
9139      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
9140      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
9141      _LT_TAGVAR(inherit_rpath, $1)=yes
9142      _LT_TAGVAR(link_all_deplibs, $1)=yes
9143      ;;
9144
9145    linux*)
9146      case $cc_basename in
9147      tcc*)
9148        # Fabrice Bellard et al's Tiny C Compiler
9149        _LT_TAGVAR(ld_shlibs, $1)=yes
9150        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
9151        ;;
9152      esac
9153      ;;
9154
9155    netbsd*)
9156      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
9157        _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
9158      else
9159        _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
9160      fi
9161      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
9162      _LT_TAGVAR(hardcode_direct, $1)=yes
9163      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
9164      ;;
9165
9166    newsos6)
9167      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
9168      _LT_TAGVAR(hardcode_direct, $1)=yes
9169      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
9170      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
9171      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
9172      ;;
9173
9174    *nto* | *qnx*)
9175      ;;
9176
9177    openbsd* | bitrig*)
9178      if test -f /usr/libexec/ld.so; then
9179        _LT_TAGVAR(hardcode_direct, $1)=yes
9180        _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
9181        _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
9182        if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
9183          _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
9184          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols'
9185          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
9186          _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
9187        else
9188          _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
9189          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
9190        fi
9191      else
9192        _LT_TAGVAR(ld_shlibs, $1)=no
9193      fi
9194      ;;
9195
9196    os2*)
9197      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
9198      _LT_TAGVAR(hardcode_minus_L, $1)=yes
9199      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
9200      shrext_cmds=.dll
9201      _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
9202        $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
9203        $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
9204        $ECHO EXPORTS >> $output_objdir/$libname.def~
9205        emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
9206        $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
9207        emximp -o $lib $output_objdir/$libname.def'
9208      _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
9209        $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
9210        $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
9211        $ECHO EXPORTS >> $output_objdir/$libname.def~
9212        prefix_cmds="$SED"~
9213        if test EXPORTS = "`$SED 1q $export_symbols`"; then
9214          prefix_cmds="$prefix_cmds -e 1d";
9215        fi~
9216        prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
9217        cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
9218        $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
9219        emximp -o $lib $output_objdir/$libname.def'
9220      _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
9221      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
9222      ;;
9223
9224    osf3*)
9225      if test yes = "$GCC"; then
9226        _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
9227        _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
9228      else
9229        _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
9230        _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
9231      fi
9232      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
9233      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
9234      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
9235      ;;
9236
9237    osf4* | osf5*)      # as osf3* with the addition of -msym flag
9238      if test yes = "$GCC"; then
9239        _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
9240        _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
9241        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
9242      else
9243        _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
9244        _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
9245        _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
9246          $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp'
9247
9248        # Both c and cxx compiler support -rpath directly
9249        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
9250      fi
9251      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
9252      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
9253      ;;
9254
9255    solaris*)
9256      _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
9257      if test yes = "$GCC"; then
9258        wlarc='$wl'
9259        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
9260        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
9261          $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
9262      else
9263        case `$CC -V 2>&1` in
9264        *"Compilers 5.0"*)
9265          wlarc=''
9266          _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags'
9267          _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
9268            $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
9269          ;;
9270        *)
9271          wlarc='$wl'
9272          _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags'
9273          _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
9274            $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
9275          ;;
9276        esac
9277      fi
9278      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
9279      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
9280      case $host_os in
9281      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
9282      *)
9283        # The compiler driver will combine and reorder linker options,
9284        # but understands '-z linker_flag'.  GCC discards it without '$wl',
9285        # but is careful enough not to reorder.
9286        # Supported since Solaris 2.6 (maybe 2.5.1?)
9287        if test yes = "$GCC"; then
9288          _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
9289        else
9290          _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
9291        fi
9292        ;;
9293      esac
9294      _LT_TAGVAR(link_all_deplibs, $1)=yes
9295      ;;
9296
9297    sunos4*)
9298      if test sequent = "$host_vendor"; then
9299        # Use $CC to link under sequent, because it throws in some extra .o
9300        # files that make .init and .fini sections work.
9301        _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags'
9302      else
9303        _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
9304      fi
9305      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
9306      _LT_TAGVAR(hardcode_direct, $1)=yes
9307      _LT_TAGVAR(hardcode_minus_L, $1)=yes
9308      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
9309      ;;
9310
9311    sysv4)
9312      case $host_vendor in
9313        sni)
9314          _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
9315          _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
9316        ;;
9317        siemens)
9318          ## LD is ld it makes a PLAMLIB
9319          ## CC just makes a GrossModule.
9320          _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
9321          _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
9322          _LT_TAGVAR(hardcode_direct, $1)=no
9323        ;;
9324        motorola)
9325          _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
9326          _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
9327        ;;
9328      esac
9329      runpath_var='LD_RUN_PATH'
9330      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
9331      ;;
9332
9333    sysv4.3*)
9334      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
9335      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
9336      _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
9337      ;;
9338
9339    sysv4*MP*)
9340      if test -d /usr/nec; then
9341        _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
9342        _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
9343        runpath_var=LD_RUN_PATH
9344        hardcode_runpath_var=yes
9345        _LT_TAGVAR(ld_shlibs, $1)=yes
9346      fi
9347      ;;
9348
9349    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
9350      _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
9351      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
9352      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
9353      runpath_var='LD_RUN_PATH'
9354
9355      if test yes = "$GCC"; then
9356        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
9357        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
9358      else
9359        _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
9360        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
9361      fi
9362      ;;
9363
9364    sysv5* | sco3.2v5* | sco5v6*)
9365      # Note: We CANNOT use -z defs as we might desire, because we do not
9366      # link with -lc, and that would cause any symbols used from libc to
9367      # always be unresolved, which means just about no library would
9368      # ever link correctly.  If we're not using GNU ld we use -z text
9369      # though, which does catch some bad symbols but isn't as heavy-handed
9370      # as -z defs.
9371      _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
9372      _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs'
9373      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
9374      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
9375      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir'
9376      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
9377      _LT_TAGVAR(link_all_deplibs, $1)=yes
9378      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport'
9379      runpath_var='LD_RUN_PATH'
9380
9381      if test yes = "$GCC"; then
9382        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
9383        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
9384      else
9385        _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
9386        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
9387      fi
9388      ;;
9389
9390    uts4*)
9391      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
9392      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
9393      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
9394      ;;
9395
9396    *)
9397      _LT_TAGVAR(ld_shlibs, $1)=no
9398      ;;
9399    esac
9400
9401    if test sni = "$host_vendor"; then
9402      case $host in
9403      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
9404        _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym'
9405        ;;
9406      esac
9407    fi
9408  fi
9409])
9410AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
9411test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no
9412
9413_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
9414
9415_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
9416_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
9417_LT_DECL([], [extract_expsyms_cmds], [2],
9418    [The commands to extract the exported symbol list from a shared archive])
9419
9420#
9421# Do we need to explicitly link libc?
9422#
9423case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
9424x|xyes)
9425  # Assume -lc should be added
9426  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
9427
9428  if test yes,yes = "$GCC,$enable_shared"; then
9429    case $_LT_TAGVAR(archive_cmds, $1) in
9430    *'~'*)
9431      # FIXME: we may have to deal with multi-command sequences.
9432      ;;
9433    '$CC '*)
9434      # Test whether the compiler implicitly links with -lc since on some
9435      # systems, -lgcc has to come before -lc. If gcc already passes -lc
9436      # to ld, don't add -lc before -lgcc.
9437      AC_CACHE_CHECK([whether -lc should be explicitly linked in],
9438        [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
9439        [$RM conftest*
9440        echo "$lt_simple_compile_test_code" > conftest.$ac_ext
9441
9442        if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
9443          soname=conftest
9444          lib=conftest
9445          libobjs=conftest.$ac_objext
9446          deplibs=
9447          wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
9448          pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
9449          compiler_flags=-v
9450          linker_flags=-v
9451          verstring=
9452          output_objdir=.
9453          libname=conftest
9454          lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
9455          _LT_TAGVAR(allow_undefined_flag, $1)=
9456          if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
9457          then
9458            lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
9459          else
9460            lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
9461          fi
9462          _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
9463        else
9464          cat conftest.err 1>&5
9465        fi
9466        $RM conftest*
9467        ])
9468      _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
9469      ;;
9470    esac
9471  fi
9472  ;;
9473esac
9474
9475_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
9476    [Whether or not to add -lc for building shared libraries])
9477_LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
9478    [enable_shared_with_static_runtimes], [0],
9479    [Whether or not to disallow shared libs when runtime libs are static])
9480_LT_TAGDECL([], [export_dynamic_flag_spec], [1],
9481    [Compiler flag to allow reflexive dlopens])
9482_LT_TAGDECL([], [whole_archive_flag_spec], [1],
9483    [Compiler flag to generate shared objects directly from archives])
9484_LT_TAGDECL([], [compiler_needs_object], [1],
9485    [Whether the compiler copes with passing no objects directly])
9486_LT_TAGDECL([], [old_archive_from_new_cmds], [2],
9487    [Create an old-style archive from a shared archive])
9488_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
9489    [Create a temporary old-style archive to link instead of a shared archive])
9490_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
9491_LT_TAGDECL([], [archive_expsym_cmds], [2])
9492_LT_TAGDECL([], [module_cmds], [2],
9493    [Commands used to build a loadable module if different from building
9494    a shared archive.])
9495_LT_TAGDECL([], [module_expsym_cmds], [2])
9496_LT_TAGDECL([], [with_gnu_ld], [1],
9497    [Whether we are building with GNU ld or not])
9498_LT_TAGDECL([], [allow_undefined_flag], [1],
9499    [Flag that allows shared libraries with undefined symbols to be built])
9500_LT_TAGDECL([], [no_undefined_flag], [1],
9501    [Flag that enforces no undefined symbols])
9502_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
9503    [Flag to hardcode $libdir into a binary during linking.
9504    This must work even if $libdir does not exist])
9505_LT_TAGDECL([], [hardcode_libdir_separator], [1],
9506    [Whether we need a single "-rpath" flag with a separated argument])
9507_LT_TAGDECL([], [hardcode_direct], [0],
9508    [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes
9509    DIR into the resulting binary])
9510_LT_TAGDECL([], [hardcode_direct_absolute], [0],
9511    [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes
9512    DIR into the resulting binary and the resulting library dependency is
9513    "absolute", i.e impossible to change by setting $shlibpath_var if the
9514    library is relocated])
9515_LT_TAGDECL([], [hardcode_minus_L], [0],
9516    [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
9517    into the resulting binary])
9518_LT_TAGDECL([], [hardcode_shlibpath_var], [0],
9519    [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
9520    into the resulting binary])
9521_LT_TAGDECL([], [hardcode_automatic], [0],
9522    [Set to "yes" if building a shared library automatically hardcodes DIR
9523    into the library and all subsequent libraries and executables linked
9524    against it])
9525_LT_TAGDECL([], [inherit_rpath], [0],
9526    [Set to yes if linker adds runtime paths of dependent libraries
9527    to runtime path list])
9528_LT_TAGDECL([], [link_all_deplibs], [0],
9529    [Whether libtool must link a program against all its dependency libraries])
9530_LT_TAGDECL([], [always_export_symbols], [0],
9531    [Set to "yes" if exported symbols are required])
9532_LT_TAGDECL([], [export_symbols_cmds], [2],
9533    [The commands to list exported symbols])
9534_LT_TAGDECL([], [exclude_expsyms], [1],
9535    [Symbols that should not be listed in the preloaded symbols])
9536_LT_TAGDECL([], [include_expsyms], [1],
9537    [Symbols that must always be exported])
9538_LT_TAGDECL([], [prelink_cmds], [2],
9539    [Commands necessary for linking programs (against libraries) with templates])
9540_LT_TAGDECL([], [postlink_cmds], [2],
9541    [Commands necessary for finishing linking programs])
9542_LT_TAGDECL([], [file_list_spec], [1],
9543    [Specify filename containing input files])
9544dnl FIXME: Not yet implemented
9545dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
9546dnl    [Compiler flag to generate thread safe objects])
9547])# _LT_LINKER_SHLIBS
9548
9549
9550# _LT_LANG_C_CONFIG([TAG])
9551# ------------------------
9552# Ensure that the configuration variables for a C compiler are suitably
9553# defined.  These variables are subsequently used by _LT_CONFIG to write
9554# the compiler configuration to 'libtool'.
9555m4_defun([_LT_LANG_C_CONFIG],
9556[m4_require([_LT_DECL_EGREP])dnl
9557lt_save_CC=$CC
9558AC_LANG_PUSH(C)
9559
9560# Source file extension for C test sources.
9561ac_ext=c
9562
9563# Object file extension for compiled C test sources.
9564objext=o
9565_LT_TAGVAR(objext, $1)=$objext
9566
9567# Code to be used in simple compile tests
9568lt_simple_compile_test_code="int some_variable = 0;"
9569
9570# Code to be used in simple link tests
9571lt_simple_link_test_code='int main(){return(0);}'
9572
9573_LT_TAG_COMPILER
9574# Save the default compiler, since it gets overwritten when the other
9575# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
9576compiler_DEFAULT=$CC
9577
9578# save warnings/boilerplate of simple test code
9579_LT_COMPILER_BOILERPLATE
9580_LT_LINKER_BOILERPLATE
9581
9582if test -n "$compiler"; then
9583  _LT_COMPILER_NO_RTTI($1)
9584  _LT_COMPILER_PIC($1)
9585  _LT_COMPILER_C_O($1)
9586  _LT_COMPILER_FILE_LOCKS($1)
9587  _LT_LINKER_SHLIBS($1)
9588  _LT_SYS_DYNAMIC_LINKER($1)
9589  _LT_LINKER_HARDCODE_LIBPATH($1)
9590  LT_SYS_DLOPEN_SELF
9591  _LT_CMD_STRIPLIB
9592
9593  # Report what library types will actually be built
9594  AC_MSG_CHECKING([if libtool supports shared libraries])
9595  AC_MSG_RESULT([$can_build_shared])
9596
9597  AC_MSG_CHECKING([whether to build shared libraries])
9598  test no = "$can_build_shared" && enable_shared=no
9599
9600  # On AIX, shared libraries and static libraries use the same namespace, and
9601  # are all built from PIC.
9602  case $host_os in
9603  aix3*)
9604    test yes = "$enable_shared" && enable_static=no
9605    if test -n "$RANLIB"; then
9606      archive_cmds="$archive_cmds~\$RANLIB \$lib"
9607      postinstall_cmds='$RANLIB $lib'
9608    fi
9609    ;;
9610
9611  aix[[4-9]]*)
9612    if test ia64 != "$host_cpu"; then
9613      case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
9614      yes,aix,yes) ;;                   # shared object as lib.so file only
9615      yes,svr4,*) ;;                    # shared object as lib.so archive member only
9616      yes,*) enable_static=no ;;        # shared object in lib.a archive as well
9617      esac
9618    fi
9619    ;;
9620  esac
9621  AC_MSG_RESULT([$enable_shared])
9622
9623  AC_MSG_CHECKING([whether to build static libraries])
9624  # Make sure either enable_shared or enable_static is yes.
9625  test yes = "$enable_shared" || enable_static=yes
9626  AC_MSG_RESULT([$enable_static])
9627
9628  _LT_CONFIG($1)
9629fi
9630AC_LANG_POP
9631CC=$lt_save_CC
9632])# _LT_LANG_C_CONFIG
9633
9634
9635# _LT_LANG_CXX_CONFIG([TAG])
9636# --------------------------
9637# Ensure that the configuration variables for a C++ compiler are suitably
9638# defined.  These variables are subsequently used by _LT_CONFIG to write
9639# the compiler configuration to 'libtool'.
9640m4_defun([_LT_LANG_CXX_CONFIG],
9641[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
9642m4_require([_LT_DECL_EGREP])dnl
9643m4_require([_LT_PATH_MANIFEST_TOOL])dnl
9644if test -n "$CXX" && ( test no != "$CXX" &&
9645    ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) ||
9646    (test g++ != "$CXX"))); then
9647  AC_PROG_CXXCPP
9648else
9649  _lt_caught_CXX_error=yes
9650fi
9651
9652AC_LANG_PUSH(C++)
9653_LT_TAGVAR(archive_cmds_need_lc, $1)=no
9654_LT_TAGVAR(allow_undefined_flag, $1)=
9655_LT_TAGVAR(always_export_symbols, $1)=no
9656_LT_TAGVAR(archive_expsym_cmds, $1)=
9657_LT_TAGVAR(compiler_needs_object, $1)=no
9658_LT_TAGVAR(export_dynamic_flag_spec, $1)=
9659_LT_TAGVAR(hardcode_direct, $1)=no
9660_LT_TAGVAR(hardcode_direct_absolute, $1)=no
9661_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
9662_LT_TAGVAR(hardcode_libdir_separator, $1)=
9663_LT_TAGVAR(hardcode_minus_L, $1)=no
9664_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
9665_LT_TAGVAR(hardcode_automatic, $1)=no
9666_LT_TAGVAR(inherit_rpath, $1)=no
9667_LT_TAGVAR(module_cmds, $1)=
9668_LT_TAGVAR(module_expsym_cmds, $1)=
9669_LT_TAGVAR(link_all_deplibs, $1)=unknown
9670_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
9671_LT_TAGVAR(reload_flag, $1)=$reload_flag
9672_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
9673_LT_TAGVAR(no_undefined_flag, $1)=
9674_LT_TAGVAR(whole_archive_flag_spec, $1)=
9675_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
9676
9677# Source file extension for C++ test sources.
9678ac_ext=cpp
9679
9680# Object file extension for compiled C++ test sources.
9681objext=o
9682_LT_TAGVAR(objext, $1)=$objext
9683
9684# No sense in running all these tests if we already determined that
9685# the CXX compiler isn't working.  Some variables (like enable_shared)
9686# are currently assumed to apply to all compilers on this platform,
9687# and will be corrupted by setting them based on a non-working compiler.
9688if test yes != "$_lt_caught_CXX_error"; then
9689  # Code to be used in simple compile tests
9690  lt_simple_compile_test_code="int some_variable = 0;"
9691
9692  # Code to be used in simple link tests
9693  lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
9694
9695  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
9696  _LT_TAG_COMPILER
9697
9698  # save warnings/boilerplate of simple test code
9699  _LT_COMPILER_BOILERPLATE
9700  _LT_LINKER_BOILERPLATE
9701
9702  # Allow CC to be a program name with arguments.
9703  lt_save_CC=$CC
9704  lt_save_CFLAGS=$CFLAGS
9705  lt_save_LD=$LD
9706  lt_save_GCC=$GCC
9707  GCC=$GXX
9708  lt_save_with_gnu_ld=$with_gnu_ld
9709  lt_save_path_LD=$lt_cv_path_LD
9710  if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
9711    lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
9712  else
9713    $as_unset lt_cv_prog_gnu_ld
9714  fi
9715  if test -n "${lt_cv_path_LDCXX+set}"; then
9716    lt_cv_path_LD=$lt_cv_path_LDCXX
9717  else
9718    $as_unset lt_cv_path_LD
9719  fi
9720  test -z "${LDCXX+set}" || LD=$LDCXX
9721  CC=${CXX-"c++"}
9722  CFLAGS=$CXXFLAGS
9723  compiler=$CC
9724  _LT_TAGVAR(compiler, $1)=$CC
9725  _LT_CC_BASENAME([$compiler])
9726
9727  if test -n "$compiler"; then
9728    # We don't want -fno-exception when compiling C++ code, so set the
9729    # no_builtin_flag separately
9730    if test yes = "$GXX"; then
9731      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
9732    else
9733      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
9734    fi
9735
9736    if test yes = "$GXX"; then
9737      # Set up default GNU C++ configuration
9738
9739      LT_PATH_LD
9740
9741      # Check if GNU C++ uses GNU ld as the underlying linker, since the
9742      # archiving commands below assume that GNU ld is being used.
9743      if test yes = "$with_gnu_ld"; then
9744        _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
9745        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
9746
9747        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
9748        _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
9749
9750        # If archive_cmds runs LD, not CC, wlarc should be empty
9751        # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
9752        #     investigate it a little bit more. (MM)
9753        wlarc='$wl'
9754
9755        # ancient GNU ld didn't support --whole-archive et. al.
9756        if eval "`$CC -print-prog-name=ld` --help 2>&1" |
9757          $GREP 'no-whole-archive' > /dev/null; then
9758          _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
9759        else
9760          _LT_TAGVAR(whole_archive_flag_spec, $1)=
9761        fi
9762      else
9763        with_gnu_ld=no
9764        wlarc=
9765
9766        # A generic and very simple default shared library creation
9767        # command for GNU C++ for the case where it uses the native
9768        # linker, instead of GNU ld.  If possible, this setting should
9769        # overridden to take advantage of the native linker features on
9770        # the platform it is being used on.
9771        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
9772      fi
9773
9774      # Commands to make compiler produce verbose output that lists
9775      # what "hidden" libraries, object files and flags are used when
9776      # linking a shared library.
9777      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
9778
9779    else
9780      GXX=no
9781      with_gnu_ld=no
9782      wlarc=
9783    fi
9784
9785    # PORTME: fill in a description of your system's C++ link characteristics
9786    AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
9787    _LT_TAGVAR(ld_shlibs, $1)=yes
9788    case $host_os in
9789      aix3*)
9790        # FIXME: insert proper C++ library support
9791        _LT_TAGVAR(ld_shlibs, $1)=no
9792        ;;
9793      aix[[4-9]]*)
9794        if test ia64 = "$host_cpu"; then
9795          # On IA64, the linker does run time linking by default, so we don't
9796          # have to do anything special.
9797          aix_use_runtimelinking=no
9798          exp_sym_flag='-Bexport'
9799          no_entry_flag=
9800        else
9801          aix_use_runtimelinking=no
9802
9803          # Test if we are trying to use run time linking or normal
9804          # AIX style linking. If -brtl is somewhere in LDFLAGS, we
9805          # have runtime linking enabled, and use it for executables.
9806          # For shared libraries, we enable/disable runtime linking
9807          # depending on the kind of the shared library created -
9808          # when "with_aix_soname,aix_use_runtimelinking" is:
9809          # "aix,no"   lib.a(lib.so.V) shared, rtl:no,  for executables
9810          # "aix,yes"  lib.so          shared, rtl:yes, for executables
9811          #            lib.a           static archive
9812          # "both,no"  lib.so.V(shr.o) shared, rtl:yes
9813          #            lib.a(lib.so.V) shared, rtl:no,  for executables
9814          # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
9815          #            lib.a(lib.so.V) shared, rtl:no
9816          # "svr4,*"   lib.so.V(shr.o) shared, rtl:yes, for executables
9817          #            lib.a           static archive
9818          case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
9819            for ld_flag in $LDFLAGS; do
9820              case $ld_flag in
9821              *-brtl*)
9822                aix_use_runtimelinking=yes
9823                break
9824                ;;
9825              esac
9826            done
9827            if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
9828              # With aix-soname=svr4, we create the lib.so.V shared archives only,
9829              # so we don't have lib.a shared libs to link our executables.
9830              # We have to force runtime linking in this case.
9831              aix_use_runtimelinking=yes
9832              LDFLAGS="$LDFLAGS -Wl,-brtl"
9833            fi
9834            ;;
9835          esac
9836
9837          exp_sym_flag='-bexport'
9838          no_entry_flag='-bnoentry'
9839        fi
9840
9841        # When large executables or shared objects are built, AIX ld can
9842        # have problems creating the table of contents.  If linking a library
9843        # or program results in "error TOC overflow" add -mminimal-toc to
9844        # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
9845        # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
9846
9847        _LT_TAGVAR(archive_cmds, $1)=''
9848        _LT_TAGVAR(hardcode_direct, $1)=yes
9849        _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
9850        _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
9851        _LT_TAGVAR(link_all_deplibs, $1)=yes
9852        _LT_TAGVAR(file_list_spec, $1)='$wl-f,'
9853        case $with_aix_soname,$aix_use_runtimelinking in
9854        aix,*) ;;       # no import file
9855        svr4,* | *,yes) # use import file
9856          # The Import File defines what to hardcode.
9857          _LT_TAGVAR(hardcode_direct, $1)=no
9858          _LT_TAGVAR(hardcode_direct_absolute, $1)=no
9859          ;;
9860        esac
9861
9862        if test yes = "$GXX"; then
9863          case $host_os in aix4.[[012]]|aix4.[[012]].*)
9864          # We only want to do this on AIX 4.2 and lower, the check
9865          # below for broken collect2 doesn't work under 4.3+
9866          collect2name=`$CC -print-prog-name=collect2`
9867          if test -f "$collect2name" &&
9868             strings "$collect2name" | $GREP resolve_lib_name >/dev/null
9869          then
9870            # We have reworked collect2
9871            :
9872          else
9873            # We have old collect2
9874            _LT_TAGVAR(hardcode_direct, $1)=unsupported
9875            # It fails to find uninstalled libraries when the uninstalled
9876            # path is not listed in the libpath.  Setting hardcode_minus_L
9877            # to unsupported forces relinking
9878            _LT_TAGVAR(hardcode_minus_L, $1)=yes
9879            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
9880            _LT_TAGVAR(hardcode_libdir_separator, $1)=
9881          fi
9882          esac
9883          shared_flag='-shared'
9884          if test yes = "$aix_use_runtimelinking"; then
9885            shared_flag=$shared_flag' $wl-G'
9886          fi
9887          # Need to ensure runtime linking is disabled for the traditional
9888          # shared library, or the linker may eventually find shared libraries
9889          # /with/ Import File - we do not want to mix them.
9890          shared_flag_aix='-shared'
9891          shared_flag_svr4='-shared $wl-G'
9892        else
9893          # not using gcc
9894          if test ia64 = "$host_cpu"; then
9895          # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
9896          # chokes on -Wl,-G. The following line is correct:
9897          shared_flag='-G'
9898          else
9899            if test yes = "$aix_use_runtimelinking"; then
9900              shared_flag='$wl-G'
9901            else
9902              shared_flag='$wl-bM:SRE'
9903            fi
9904            shared_flag_aix='$wl-bM:SRE'
9905            shared_flag_svr4='$wl-G'
9906          fi
9907        fi
9908
9909        _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall'
9910        # It seems that -bexpall does not export symbols beginning with
9911        # underscore (_), so it is better to generate a list of symbols to
9912        # export.
9913        _LT_TAGVAR(always_export_symbols, $1)=yes
9914        if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
9915          # Warning - without using the other runtime loading flags (-brtl),
9916          # -berok will link without error, but may produce a broken library.
9917          # The "-G" linker flag allows undefined symbols.
9918          _LT_TAGVAR(no_undefined_flag, $1)='-bernotok'
9919          # Determine the default libpath from the value encoded in an empty
9920          # executable.
9921          _LT_SYS_MODULE_PATH_AIX([$1])
9922          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
9923
9924          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag
9925        else
9926          if test ia64 = "$host_cpu"; then
9927            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib'
9928            _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
9929            _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols"
9930          else
9931            # Determine the default libpath from the value encoded in an
9932            # empty executable.
9933            _LT_SYS_MODULE_PATH_AIX([$1])
9934            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
9935            # Warning - without using the other run time loading flags,
9936            # -berok will link without error, but may produce a broken library.
9937            _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok'
9938            _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok'
9939            if test yes = "$with_gnu_ld"; then
9940              # We only use this code for GNU lds that support --whole-archive.
9941              _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
9942            else
9943              # Exported symbols can be pulled into shared objects from archives
9944              _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
9945            fi
9946            _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
9947            _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
9948            # -brtl affects multiple linker settings, -berok does not and is overridden later
9949            compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`'
9950            if test svr4 != "$with_aix_soname"; then
9951              # This is similar to how AIX traditionally builds its shared
9952              # libraries. Need -bnortl late, we may have -brtl in LDFLAGS.
9953              _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname'
9954            fi
9955            if test aix != "$with_aix_soname"; then
9956              _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp'
9957            else
9958              # used by -dlpreopen to get the symbols
9959              _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV  $output_objdir/$realname.d/$soname $output_objdir'
9960            fi
9961            _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d'
9962          fi
9963        fi
9964        ;;
9965
9966      beos*)
9967        if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
9968          _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
9969          # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
9970          # support --undefined.  This deserves some investigation.  FIXME
9971          _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
9972        else
9973          _LT_TAGVAR(ld_shlibs, $1)=no
9974        fi
9975        ;;
9976
9977      chorus*)
9978        case $cc_basename in
9979          *)
9980          # FIXME: insert proper C++ library support
9981          _LT_TAGVAR(ld_shlibs, $1)=no
9982          ;;
9983        esac
9984        ;;
9985
9986      cygwin* | mingw* | pw32* | cegcc*)
9987        case $GXX,$cc_basename in
9988        ,cl* | no,cl* | ,icl* | no,icl* | ,ifort* | no,ifort*)
9989          # Native MSVC or ICC or IFORT
9990          # hardcode_libdir_flag_spec is actually meaningless, as there is
9991          # no search path for DLLs.
9992          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
9993          _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
9994          _LT_TAGVAR(always_export_symbols, $1)=yes
9995          _LT_TAGVAR(file_list_spec, $1)='@'
9996          # Tell ltmain to make .lib files, not .a files.
9997          libext=lib
9998          # Tell ltmain to make .dll files, not .so files.
9999          shrext_cmds=.dll
10000          # FIXME: Setting linknames here is a bad hack.
10001          _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
10002          _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
10003              cp "$export_symbols" "$output_objdir/$soname.def";
10004              echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
10005            else
10006              $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
10007            fi~
10008            $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
10009            linknames='
10010          # The linker will not automatically build a static lib if we build a DLL.
10011          # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
10012          _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
10013          # Don't use ranlib
10014          _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
10015          _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
10016            lt_tool_outputfile="@TOOL_OUTPUT@"~
10017            case $lt_outputfile in
10018              *.exe|*.EXE) ;;
10019              *)
10020                lt_outputfile=$lt_outputfile.exe
10021                lt_tool_outputfile=$lt_tool_outputfile.exe
10022                ;;
10023            esac~
10024            func_to_tool_file "$lt_outputfile"~
10025            if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
10026              $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
10027              $RM "$lt_outputfile.manifest";
10028            fi'
10029          ;;
10030        *)
10031          # g++
10032          # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
10033          # as there is no search path for DLLs.
10034          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
10035          _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols'
10036          _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
10037          _LT_TAGVAR(always_export_symbols, $1)=no
10038          _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
10039
10040          if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
10041            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
10042            # If the export-symbols file already is a .def file, use it as
10043            # is; otherwise, prepend EXPORTS...
10044            _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
10045              cp $export_symbols $output_objdir/$soname.def;
10046            else
10047              echo EXPORTS > $output_objdir/$soname.def;
10048              cat $export_symbols >> $output_objdir/$soname.def;
10049            fi~
10050            $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
10051          else
10052            _LT_TAGVAR(ld_shlibs, $1)=no
10053          fi
10054          ;;
10055        esac
10056        ;;
10057      darwin* | rhapsody*)
10058        _LT_DARWIN_LINKER_FEATURES($1)
10059        ;;
10060
10061      os2*)
10062        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
10063        _LT_TAGVAR(hardcode_minus_L, $1)=yes
10064        _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
10065        shrext_cmds=.dll
10066        _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
10067          $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
10068          $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
10069          $ECHO EXPORTS >> $output_objdir/$libname.def~
10070          emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
10071          $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
10072          emximp -o $lib $output_objdir/$libname.def'
10073        _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
10074          $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
10075          $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
10076          $ECHO EXPORTS >> $output_objdir/$libname.def~
10077          prefix_cmds="$SED"~
10078          if test EXPORTS = "`$SED 1q $export_symbols`"; then
10079            prefix_cmds="$prefix_cmds -e 1d";
10080          fi~
10081          prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
10082          cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
10083          $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
10084          emximp -o $lib $output_objdir/$libname.def'
10085        _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
10086        _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
10087        ;;
10088
10089      dgux*)
10090        case $cc_basename in
10091          ec++*)
10092            # FIXME: insert proper C++ library support
10093            _LT_TAGVAR(ld_shlibs, $1)=no
10094            ;;
10095          ghcx*)
10096            # Green Hills C++ Compiler
10097            # FIXME: insert proper C++ library support
10098            _LT_TAGVAR(ld_shlibs, $1)=no
10099            ;;
10100          *)
10101            # FIXME: insert proper C++ library support
10102            _LT_TAGVAR(ld_shlibs, $1)=no
10103            ;;
10104        esac
10105        ;;
10106
10107      freebsd2.*)
10108        # C++ shared libraries reported to be fairly broken before
10109        # switch to ELF
10110        _LT_TAGVAR(ld_shlibs, $1)=no
10111        ;;
10112
10113      freebsd-elf*)
10114        _LT_TAGVAR(archive_cmds_need_lc, $1)=no
10115        ;;
10116
10117      freebsd* | dragonfly*)
10118        # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
10119        # conventions
10120        _LT_TAGVAR(ld_shlibs, $1)=yes
10121        ;;
10122
10123      haiku*)
10124        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
10125        _LT_TAGVAR(link_all_deplibs, $1)=yes
10126        ;;
10127
10128      hpux9*)
10129        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
10130        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
10131        _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
10132        _LT_TAGVAR(hardcode_direct, $1)=yes
10133        _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
10134                                             # but as the default
10135                                             # location of the library.
10136
10137        case $cc_basename in
10138          CC*)
10139            # FIXME: insert proper C++ library support
10140            _LT_TAGVAR(ld_shlibs, $1)=no
10141            ;;
10142          aCC*)
10143            _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
10144            # Commands to make compiler produce verbose output that lists
10145            # what "hidden" libraries, object files and flags are used when
10146            # linking a shared library.
10147            #
10148            # There doesn't appear to be a way to prevent this compiler from
10149            # explicitly linking system object files so we need to strip them
10150            # from the output so that they don't get included in the library
10151            # dependencies.
10152            output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
10153            ;;
10154          *)
10155            if test yes = "$GXX"; then
10156              _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
10157            else
10158              # FIXME: insert proper C++ library support
10159              _LT_TAGVAR(ld_shlibs, $1)=no
10160            fi
10161            ;;
10162        esac
10163        ;;
10164
10165      hpux10*|hpux11*)
10166        if test no = "$with_gnu_ld"; then
10167          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
10168          _LT_TAGVAR(hardcode_libdir_separator, $1)=:
10169
10170          case $host_cpu in
10171            hppa*64*|ia64*)
10172              ;;
10173            *)
10174              _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
10175              ;;
10176          esac
10177        fi
10178        case $host_cpu in
10179          hppa*64*|ia64*)
10180            _LT_TAGVAR(hardcode_direct, $1)=no
10181            _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
10182            ;;
10183          *)
10184            _LT_TAGVAR(hardcode_direct, $1)=yes
10185            _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
10186            _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
10187                                                 # but as the default
10188                                                 # location of the library.
10189            ;;
10190        esac
10191
10192        case $cc_basename in
10193          CC*)
10194            # FIXME: insert proper C++ library support
10195            _LT_TAGVAR(ld_shlibs, $1)=no
10196            ;;
10197          aCC*)
10198            case $host_cpu in
10199              hppa*64*)
10200                _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
10201                ;;
10202              ia64*)