aclocal.m4 revision b9867631
1b9867631Smrg# generated automatically by aclocal 1.15 -*- Autoconf -*-
289c04b6cSmrg
3b9867631Smrg# Copyright (C) 1996-2014 Free Software Foundation, Inc.
41f0ac6a5Smrg
51f0ac6a5Smrg# This file is free software; the Free Software Foundation
61f0ac6a5Smrg# gives unlimited permission to copy and/or distribute it,
71f0ac6a5Smrg# with or without modifications, as long as this notice is preserved.
81f0ac6a5Smrg
91f0ac6a5Smrg# This program is distributed in the hope that it will be useful,
101f0ac6a5Smrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
111f0ac6a5Smrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
121f0ac6a5Smrg# PARTICULAR PURPOSE.
131f0ac6a5Smrg
1489c04b6cSmrgm4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
15e5410a46Smrgm4_ifndef([AC_AUTOCONF_VERSION],
16e5410a46Smrg  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
17b9867631Smrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],,
18b9867631Smrg[m4_warning([this file was generated for autoconf 2.69.
19e5410a46SmrgYou have another version of autoconf.  It may work, but is not guaranteed to.
20e5410a46SmrgIf you have problems, you may need to regenerate the build system entirely.
2189c04b6cSmrgTo do so, use the procedure documented by the package, typically 'autoreconf'.])])
221f0ac6a5Smrg
23b9867631Smrg# Copyright (C) 2002-2014 Free Software Foundation, Inc.
241f0ac6a5Smrg#
25e5410a46Smrg# This file is free software; the Free Software Foundation
26e5410a46Smrg# gives unlimited permission to copy and/or distribute it,
27e5410a46Smrg# with or without modifications, as long as this notice is preserved.
281f0ac6a5Smrg
29e5410a46Smrg# AM_AUTOMAKE_VERSION(VERSION)
30e5410a46Smrg# ----------------------------
31e5410a46Smrg# Automake X.Y traces this macro to ensure aclocal.m4 has been
32e5410a46Smrg# generated from the m4 files accompanying Automake X.Y.
33e5410a46Smrg# (This private macro should not be called outside this file.)
34e5410a46SmrgAC_DEFUN([AM_AUTOMAKE_VERSION],
35b9867631Smrg[am__api_version='1.15'
36e5410a46Smrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
37e5410a46Smrgdnl require some minimum version.  Point them to the right macro.
38b9867631Smrgm4_if([$1], [1.15], [],
39e5410a46Smrg      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
40e5410a46Smrg])
411f0ac6a5Smrg
42e5410a46Smrg# _AM_AUTOCONF_VERSION(VERSION)
43e5410a46Smrg# -----------------------------
44e5410a46Smrg# aclocal traces this macro to find the Autoconf version.
45e5410a46Smrg# This is a private macro too.  Using m4_define simplifies
46e5410a46Smrg# the logic in aclocal, which can simply ignore this definition.
47e5410a46Smrgm4_define([_AM_AUTOCONF_VERSION], [])
481f0ac6a5Smrg
49e5410a46Smrg# AM_SET_CURRENT_AUTOMAKE_VERSION
50e5410a46Smrg# -------------------------------
51e5410a46Smrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
52e5410a46Smrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
53e5410a46SmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
54b9867631Smrg[AM_AUTOMAKE_VERSION([1.15])dnl
55e5410a46Smrgm4_ifndef([AC_AUTOCONF_VERSION],
56e5410a46Smrg  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
57e5410a46Smrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
581f0ac6a5Smrg
59e5410a46Smrg# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
601f0ac6a5Smrg
61b9867631Smrg# Copyright (C) 2001-2014 Free Software Foundation, Inc.
62e5410a46Smrg#
63e5410a46Smrg# This file is free software; the Free Software Foundation
64e5410a46Smrg# gives unlimited permission to copy and/or distribute it,
65e5410a46Smrg# with or without modifications, as long as this notice is preserved.
661f0ac6a5Smrg
67e5410a46Smrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
6889c04b6cSmrg# $ac_aux_dir to '$srcdir/foo'.  In other projects, it is set to
6989c04b6cSmrg# '$srcdir', '$srcdir/..', or '$srcdir/../..'.
701f0ac6a5Smrg#
71e5410a46Smrg# Of course, Automake must honor this variable whenever it calls a
72e5410a46Smrg# tool from the auxiliary directory.  The problem is that $srcdir (and
73e5410a46Smrg# therefore $ac_aux_dir as well) can be either absolute or relative,
74e5410a46Smrg# depending on how configure is run.  This is pretty annoying, since
75e5410a46Smrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top
76e5410a46Smrg# source directory, any form will work fine, but in subdirectories a
77e5410a46Smrg# relative path needs to be adjusted first.
781f0ac6a5Smrg#
79e5410a46Smrg# $ac_aux_dir/missing
80e5410a46Smrg#    fails when called from a subdirectory if $ac_aux_dir is relative
81e5410a46Smrg# $top_srcdir/$ac_aux_dir/missing
82e5410a46Smrg#    fails if $ac_aux_dir is absolute,
83e5410a46Smrg#    fails when called from a subdirectory in a VPATH build with
84e5410a46Smrg#          a relative $ac_aux_dir
851f0ac6a5Smrg#
86e5410a46Smrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
87e5410a46Smrg# are both prefixed by $srcdir.  In an in-source build this is usually
8889c04b6cSmrg# harmless because $srcdir is '.', but things will broke when you
89e5410a46Smrg# start a VPATH build or use an absolute $srcdir.
901f0ac6a5Smrg#
91e5410a46Smrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
92e5410a46Smrg# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
93e5410a46Smrg#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
94e5410a46Smrg# and then we would define $MISSING as
95e5410a46Smrg#   MISSING="\${SHELL} $am_aux_dir/missing"
96e5410a46Smrg# This will work as long as MISSING is not called from configure, because
97e5410a46Smrg# unfortunately $(top_srcdir) has no meaning in configure.
98e5410a46Smrg# However there are other variables, like CC, which are often used in
99e5410a46Smrg# configure, and could therefore not use this "fixed" $ac_aux_dir.
100e5410a46Smrg#
101e5410a46Smrg# Another solution, used here, is to always expand $ac_aux_dir to an
102e5410a46Smrg# absolute PATH.  The drawback is that using absolute paths prevent a
103e5410a46Smrg# configured tree to be moved without reconfiguration.
1041f0ac6a5Smrg
105e5410a46SmrgAC_DEFUN([AM_AUX_DIR_EXPAND],
106b9867631Smrg[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
107b9867631Smrg# Expand $ac_aux_dir to an absolute path.
108b9867631Smrgam_aux_dir=`cd "$ac_aux_dir" && pwd`
109e5410a46Smrg])
1101f0ac6a5Smrg
111e5410a46Smrg# AM_CONDITIONAL                                            -*- Autoconf -*-
1121f0ac6a5Smrg
113b9867631Smrg# Copyright (C) 1997-2014 Free Software Foundation, Inc.
114e5410a46Smrg#
115e5410a46Smrg# This file is free software; the Free Software Foundation
116e5410a46Smrg# gives unlimited permission to copy and/or distribute it,
117e5410a46Smrg# with or without modifications, as long as this notice is preserved.
1181f0ac6a5Smrg
119e5410a46Smrg# AM_CONDITIONAL(NAME, SHELL-CONDITION)
120e5410a46Smrg# -------------------------------------
121e5410a46Smrg# Define a conditional.
122e5410a46SmrgAC_DEFUN([AM_CONDITIONAL],
12389c04b6cSmrg[AC_PREREQ([2.52])dnl
12489c04b6cSmrg m4_if([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
12589c04b6cSmrg       [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
126e5410a46SmrgAC_SUBST([$1_TRUE])dnl
127e5410a46SmrgAC_SUBST([$1_FALSE])dnl
128e5410a46Smrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl
129e5410a46Smrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl
130e5410a46Smrgm4_define([_AM_COND_VALUE_$1], [$2])dnl
131e5410a46Smrgif $2; then
132e5410a46Smrg  $1_TRUE=
133e5410a46Smrg  $1_FALSE='#'
134e5410a46Smrgelse
135e5410a46Smrg  $1_TRUE='#'
136e5410a46Smrg  $1_FALSE=
137e5410a46Smrgfi
138e5410a46SmrgAC_CONFIG_COMMANDS_PRE(
139e5410a46Smrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
140e5410a46Smrg  AC_MSG_ERROR([[conditional "$1" was never defined.
141e5410a46SmrgUsually this means the macro was only invoked conditionally.]])
142e5410a46Smrgfi])])
1431f0ac6a5Smrg
144b9867631Smrg# Copyright (C) 1999-2014 Free Software Foundation, Inc.
145e5410a46Smrg#
146e5410a46Smrg# This file is free software; the Free Software Foundation
147e5410a46Smrg# gives unlimited permission to copy and/or distribute it,
148e5410a46Smrg# with or without modifications, as long as this notice is preserved.
1491f0ac6a5Smrg
1501f0ac6a5Smrg
15189c04b6cSmrg# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
152e5410a46Smrg# written in clear, in which case automake, when reading aclocal.m4,
153e5410a46Smrg# will think it sees a *use*, and therefore will trigger all it's
154e5410a46Smrg# C support machinery.  Also note that it means that autoscan, seeing
155e5410a46Smrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
1561f0ac6a5Smrg
1571f0ac6a5Smrg
158e5410a46Smrg# _AM_DEPENDENCIES(NAME)
159e5410a46Smrg# ----------------------
160e5410a46Smrg# See how the compiler implements dependency checking.
16189c04b6cSmrg# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC".
162e5410a46Smrg# We try a few techniques and use that to set a single cache variable.
163e5410a46Smrg#
164e5410a46Smrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
165e5410a46Smrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
166e5410a46Smrg# dependency, and given that the user is not expected to run this macro,
167e5410a46Smrg# just rely on AC_PROG_CC.
168e5410a46SmrgAC_DEFUN([_AM_DEPENDENCIES],
169e5410a46Smrg[AC_REQUIRE([AM_SET_DEPDIR])dnl
170e5410a46SmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
171e5410a46SmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl
172e5410a46SmrgAC_REQUIRE([AM_DEP_TRACK])dnl
1731f0ac6a5Smrg
17489c04b6cSmrgm4_if([$1], [CC],   [depcc="$CC"   am_compiler_list=],
17589c04b6cSmrg      [$1], [CXX],  [depcc="$CXX"  am_compiler_list=],
17689c04b6cSmrg      [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
17789c04b6cSmrg      [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'],
17889c04b6cSmrg      [$1], [UPC],  [depcc="$UPC"  am_compiler_list=],
17989c04b6cSmrg      [$1], [GCJ],  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
18089c04b6cSmrg                    [depcc="$$1"   am_compiler_list=])
1811f0ac6a5Smrg
182e5410a46SmrgAC_CACHE_CHECK([dependency style of $depcc],
183e5410a46Smrg               [am_cv_$1_dependencies_compiler_type],
184e5410a46Smrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
185e5410a46Smrg  # We make a subdir and do the tests there.  Otherwise we can end up
186e5410a46Smrg  # making bogus files that we don't know about and never remove.  For
187e5410a46Smrg  # instance it was reported that on HP-UX the gcc test will end up
18889c04b6cSmrg  # making a dummy file named 'D' -- because '-MD' means "put the output
18989c04b6cSmrg  # in D".
19089c04b6cSmrg  rm -rf conftest.dir
191e5410a46Smrg  mkdir conftest.dir
192e5410a46Smrg  # Copy depcomp to subdir because otherwise we won't find it if we're
193e5410a46Smrg  # using a relative directory.
194e5410a46Smrg  cp "$am_depcomp" conftest.dir
195e5410a46Smrg  cd conftest.dir
196e5410a46Smrg  # We will build objects and dependencies in a subdirectory because
197e5410a46Smrg  # it helps to detect inapplicable dependency modes.  For instance
198e5410a46Smrg  # both Tru64's cc and ICC support -MD to output dependencies as a
199e5410a46Smrg  # side effect of compilation, but ICC will put the dependencies in
200e5410a46Smrg  # the current directory while Tru64 will put them in the object
201e5410a46Smrg  # directory.
202e5410a46Smrg  mkdir sub
2031f0ac6a5Smrg
204e5410a46Smrg  am_cv_$1_dependencies_compiler_type=none
205e5410a46Smrg  if test "$am_compiler_list" = ""; then
206e5410a46Smrg     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
207e5410a46Smrg  fi
208e5410a46Smrg  am__universal=false
209e5410a46Smrg  m4_case([$1], [CC],
210e5410a46Smrg    [case " $depcc " in #(
211e5410a46Smrg     *\ -arch\ *\ -arch\ *) am__universal=true ;;
212e5410a46Smrg     esac],
213e5410a46Smrg    [CXX],
214e5410a46Smrg    [case " $depcc " in #(
215e5410a46Smrg     *\ -arch\ *\ -arch\ *) am__universal=true ;;
216e5410a46Smrg     esac])
2171f0ac6a5Smrg
218e5410a46Smrg  for depmode in $am_compiler_list; do
219e5410a46Smrg    # Setup a source with many dependencies, because some compilers
220e5410a46Smrg    # like to wrap large dependency lists on column 80 (with \), and
221e5410a46Smrg    # we should not choose a depcomp mode which is confused by this.
222e5410a46Smrg    #
223e5410a46Smrg    # We need to recreate these files for each test, as the compiler may
224e5410a46Smrg    # overwrite some of them when testing with obscure command lines.
225e5410a46Smrg    # This happens at least with the AIX C compiler.
226e5410a46Smrg    : > sub/conftest.c
227e5410a46Smrg    for i in 1 2 3 4 5 6; do
228e5410a46Smrg      echo '#include "conftst'$i'.h"' >> sub/conftest.c
22989c04b6cSmrg      # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
23089c04b6cSmrg      # Solaris 10 /bin/sh.
23189c04b6cSmrg      echo '/* dummy */' > sub/conftst$i.h
232e5410a46Smrg    done
233e5410a46Smrg    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
234e5410a46Smrg
23589c04b6cSmrg    # We check with '-c' and '-o' for the sake of the "dashmstdout"
236e5410a46Smrg    # mode.  It turns out that the SunPro C++ compiler does not properly
23789c04b6cSmrg    # handle '-M -o', and we need to detect this.  Also, some Intel
23889c04b6cSmrg    # versions had trouble with output in subdirs.
239e5410a46Smrg    am__obj=sub/conftest.${OBJEXT-o}
240e5410a46Smrg    am__minus_obj="-o $am__obj"
241e5410a46Smrg    case $depmode in
242e5410a46Smrg    gcc)
243e5410a46Smrg      # This depmode causes a compiler race in universal mode.
244e5410a46Smrg      test "$am__universal" = false || continue
245e5410a46Smrg      ;;
246e5410a46Smrg    nosideeffect)
24789c04b6cSmrg      # After this tag, mechanisms are not by side-effect, so they'll
24889c04b6cSmrg      # only be used when explicitly requested.
249e5410a46Smrg      if test "x$enable_dependency_tracking" = xyes; then
250e5410a46Smrg	continue
251e5410a46Smrg      else
252e5410a46Smrg	break
253e5410a46Smrg      fi
254e5410a46Smrg      ;;
25589c04b6cSmrg    msvc7 | msvc7msys | msvisualcpp | msvcmsys)
25689c04b6cSmrg      # This compiler won't grok '-c -o', but also, the minuso test has
257e5410a46Smrg      # not run yet.  These depmodes are late enough in the game, and
258e5410a46Smrg      # so weak that their functioning should not be impacted.
259e5410a46Smrg      am__obj=conftest.${OBJEXT-o}
260e5410a46Smrg      am__minus_obj=
261e5410a46Smrg      ;;
262e5410a46Smrg    none) break ;;
263e5410a46Smrg    esac
264e5410a46Smrg    if depmode=$depmode \
265e5410a46Smrg       source=sub/conftest.c object=$am__obj \
266e5410a46Smrg       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
267e5410a46Smrg       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
268e5410a46Smrg         >/dev/null 2>conftest.err &&
269e5410a46Smrg       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
270e5410a46Smrg       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
271e5410a46Smrg       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
272e5410a46Smrg       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
273e5410a46Smrg      # icc doesn't choke on unknown options, it will just issue warnings
274e5410a46Smrg      # or remarks (even with -Werror).  So we grep stderr for any message
275e5410a46Smrg      # that says an option was ignored or not supported.
276e5410a46Smrg      # When given -MP, icc 7.0 and 7.1 complain thusly:
277e5410a46Smrg      #   icc: Command line warning: ignoring option '-M'; no argument required
278e5410a46Smrg      # The diagnosis changed in icc 8.0:
279e5410a46Smrg      #   icc: Command line remark: option '-MP' not supported
280e5410a46Smrg      if (grep 'ignoring option' conftest.err ||
281e5410a46Smrg          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
282e5410a46Smrg        am_cv_$1_dependencies_compiler_type=$depmode
283e5410a46Smrg        break
284e5410a46Smrg      fi
285e5410a46Smrg    fi
286e5410a46Smrg  done
287e5410a46Smrg
288e5410a46Smrg  cd ..
289e5410a46Smrg  rm -rf conftest.dir
2901f0ac6a5Smrgelse
291e5410a46Smrg  am_cv_$1_dependencies_compiler_type=none
2921f0ac6a5Smrgfi
293e5410a46Smrg])
294e5410a46SmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
295e5410a46SmrgAM_CONDITIONAL([am__fastdep$1], [
296e5410a46Smrg  test "x$enable_dependency_tracking" != xno \
297e5410a46Smrg  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
298e5410a46Smrg])
2991f0ac6a5Smrg
300e5410a46Smrg
301e5410a46Smrg# AM_SET_DEPDIR
302e5410a46Smrg# -------------
303e5410a46Smrg# Choose a directory name for dependency files.
30489c04b6cSmrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES.
305e5410a46SmrgAC_DEFUN([AM_SET_DEPDIR],
306e5410a46Smrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
307e5410a46SmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
308e5410a46Smrg])
309e5410a46Smrg
310e5410a46Smrg
311e5410a46Smrg# AM_DEP_TRACK
312e5410a46Smrg# ------------
313e5410a46SmrgAC_DEFUN([AM_DEP_TRACK],
31489c04b6cSmrg[AC_ARG_ENABLE([dependency-tracking], [dnl
31589c04b6cSmrgAS_HELP_STRING(
31689c04b6cSmrg  [--enable-dependency-tracking],
31789c04b6cSmrg  [do not reject slow dependency extractors])
31889c04b6cSmrgAS_HELP_STRING(
31989c04b6cSmrg  [--disable-dependency-tracking],
32089c04b6cSmrg  [speeds up one-time build])])
321e5410a46Smrgif test "x$enable_dependency_tracking" != xno; then
322e5410a46Smrg  am_depcomp="$ac_aux_dir/depcomp"
323e5410a46Smrg  AMDEPBACKSLASH='\'
32489c04b6cSmrg  am__nodep='_no'
3251f0ac6a5Smrgfi
326e5410a46SmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
327e5410a46SmrgAC_SUBST([AMDEPBACKSLASH])dnl
328e5410a46Smrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
32989c04b6cSmrgAC_SUBST([am__nodep])dnl
33089c04b6cSmrg_AM_SUBST_NOTMAKE([am__nodep])dnl
331e5410a46Smrg])
3321f0ac6a5Smrg
333e5410a46Smrg# Generate code to set up dependency tracking.              -*- Autoconf -*-
334e5410a46Smrg
335b9867631Smrg# Copyright (C) 1999-2014 Free Software Foundation, Inc.
3361f0ac6a5Smrg#
337e5410a46Smrg# This file is free software; the Free Software Foundation
338e5410a46Smrg# gives unlimited permission to copy and/or distribute it,
339e5410a46Smrg# with or without modifications, as long as this notice is preserved.
3401f0ac6a5Smrg
3411f0ac6a5Smrg
342e5410a46Smrg# _AM_OUTPUT_DEPENDENCY_COMMANDS
343e5410a46Smrg# ------------------------------
344e5410a46SmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
345e5410a46Smrg[{
34689c04b6cSmrg  # Older Autoconf quotes --file arguments for eval, but not when files
347e5410a46Smrg  # are listed without --file.  Let's play safe and only enable the eval
348e5410a46Smrg  # if we detect the quoting.
349e5410a46Smrg  case $CONFIG_FILES in
350e5410a46Smrg  *\'*) eval set x "$CONFIG_FILES" ;;
351e5410a46Smrg  *)   set x $CONFIG_FILES ;;
352e5410a46Smrg  esac
353e5410a46Smrg  shift
354e5410a46Smrg  for mf
355e5410a46Smrg  do
356e5410a46Smrg    # Strip MF so we end up with the name of the file.
357e5410a46Smrg    mf=`echo "$mf" | sed -e 's/:.*$//'`
358e5410a46Smrg    # Check whether this is an Automake generated Makefile or not.
35989c04b6cSmrg    # We used to match only the files named 'Makefile.in', but
360e5410a46Smrg    # some people rename them; so instead we look at the file content.
361e5410a46Smrg    # Grep'ing the first line is not enough: some people post-process
362e5410a46Smrg    # each Makefile.in and add a new line on top of each file to say so.
363e5410a46Smrg    # Grep'ing the whole file is not good either: AIX grep has a line
364e5410a46Smrg    # limit of 2048, but all sed's we know have understand at least 4000.
365e5410a46Smrg    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
366e5410a46Smrg      dirpart=`AS_DIRNAME("$mf")`
367e5410a46Smrg    else
368e5410a46Smrg      continue
369e5410a46Smrg    fi
370e5410a46Smrg    # Extract the definition of DEPDIR, am__include, and am__quote
37189c04b6cSmrg    # from the Makefile without running 'make'.
372e5410a46Smrg    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
373e5410a46Smrg    test -z "$DEPDIR" && continue
374e5410a46Smrg    am__include=`sed -n 's/^am__include = //p' < "$mf"`
37589c04b6cSmrg    test -z "$am__include" && continue
376e5410a46Smrg    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
377e5410a46Smrg    # Find all dependency output files, they are included files with
378e5410a46Smrg    # $(DEPDIR) in their names.  We invoke sed twice because it is the
379e5410a46Smrg    # simplest approach to changing $(DEPDIR) to its actual value in the
380e5410a46Smrg    # expansion.
381e5410a46Smrg    for file in `sed -n "
382e5410a46Smrg      s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
38389c04b6cSmrg	 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
384e5410a46Smrg      # Make sure the directory exists.
385e5410a46Smrg      test -f "$dirpart/$file" && continue
386e5410a46Smrg      fdir=`AS_DIRNAME(["$file"])`
387e5410a46Smrg      AS_MKDIR_P([$dirpart/$fdir])
388e5410a46Smrg      # echo "creating $dirpart/$file"
389e5410a46Smrg      echo '# dummy' > "$dirpart/$file"
390e5410a46Smrg    done
391e5410a46Smrg  done
392e5410a46Smrg}
393e5410a46Smrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS
3941f0ac6a5Smrg
3951f0ac6a5Smrg
396e5410a46Smrg# AM_OUTPUT_DEPENDENCY_COMMANDS
397e5410a46Smrg# -----------------------------
398e5410a46Smrg# This macro should only be invoked once -- use via AC_REQUIRE.
399e5410a46Smrg#
400e5410a46Smrg# This code is only required when automatic dependency tracking
40189c04b6cSmrg# is enabled.  FIXME.  This creates each '.P' file that we will
402e5410a46Smrg# need in order to bootstrap the dependency handling code.
403e5410a46SmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
404e5410a46Smrg[AC_CONFIG_COMMANDS([depfiles],
405e5410a46Smrg     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
406e5410a46Smrg     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
407e5410a46Smrg])
4081f0ac6a5Smrg
409e5410a46Smrg# Do all the work for Automake.                             -*- Autoconf -*-
410e5410a46Smrg
411b9867631Smrg# Copyright (C) 1996-2014 Free Software Foundation, Inc.
412e5410a46Smrg#
413e5410a46Smrg# This file is free software; the Free Software Foundation
414e5410a46Smrg# gives unlimited permission to copy and/or distribute it,
415e5410a46Smrg# with or without modifications, as long as this notice is preserved.
416e5410a46Smrg
417e5410a46Smrg# This macro actually does too much.  Some checks are only needed if
418e5410a46Smrg# your package does certain things.  But this isn't really a big deal.
419e5410a46Smrg
420b9867631Smrgdnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O.
421b9867631Smrgm4_define([AC_PROG_CC],
422b9867631Smrgm4_defn([AC_PROG_CC])
423b9867631Smrg[_AM_PROG_CC_C_O
424b9867631Smrg])
425b9867631Smrg
426e5410a46Smrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
427e5410a46Smrg# AM_INIT_AUTOMAKE([OPTIONS])
428e5410a46Smrg# -----------------------------------------------
429e5410a46Smrg# The call with PACKAGE and VERSION arguments is the old style
430e5410a46Smrg# call (pre autoconf-2.50), which is being phased out.  PACKAGE
431e5410a46Smrg# and VERSION should now be passed to AC_INIT and removed from
432e5410a46Smrg# the call to AM_INIT_AUTOMAKE.
433e5410a46Smrg# We support both call styles for the transition.  After
434e5410a46Smrg# the next Automake release, Autoconf can make the AC_INIT
435e5410a46Smrg# arguments mandatory, and then we can depend on a new Autoconf
436e5410a46Smrg# release and drop the old call support.
437e5410a46SmrgAC_DEFUN([AM_INIT_AUTOMAKE],
43889c04b6cSmrg[AC_PREREQ([2.65])dnl
439e5410a46Smrgdnl Autoconf wants to disallow AM_ names.  We explicitly allow
440e5410a46Smrgdnl the ones we care about.
441e5410a46Smrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
442e5410a46SmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
443e5410a46SmrgAC_REQUIRE([AC_PROG_INSTALL])dnl
444e5410a46Smrgif test "`cd $srcdir && pwd`" != "`pwd`"; then
445e5410a46Smrg  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
446e5410a46Smrg  # is not polluted with repeated "-I."
447e5410a46Smrg  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
448e5410a46Smrg  # test to see if srcdir already configured
449e5410a46Smrg  if test -f $srcdir/config.status; then
450e5410a46Smrg    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
451e5410a46Smrg  fi
4521f0ac6a5Smrgfi
453e5410a46Smrg
454e5410a46Smrg# test whether we have cygpath
455e5410a46Smrgif test -z "$CYGPATH_W"; then
456e5410a46Smrg  if (cygpath --version) >/dev/null 2>/dev/null; then
457e5410a46Smrg    CYGPATH_W='cygpath -w'
458e5410a46Smrg  else
459e5410a46Smrg    CYGPATH_W=echo
460e5410a46Smrg  fi
4611f0ac6a5Smrgfi
462e5410a46SmrgAC_SUBST([CYGPATH_W])
463e5410a46Smrg
464e5410a46Smrg# Define the identity of the package.
465e5410a46Smrgdnl Distinguish between old-style and new-style calls.
466e5410a46Smrgm4_ifval([$2],
46789c04b6cSmrg[AC_DIAGNOSE([obsolete],
46889c04b6cSmrg             [$0: two- and three-arguments forms are deprecated.])
46989c04b6cSmrgm4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
470e5410a46Smrg AC_SUBST([PACKAGE], [$1])dnl
471e5410a46Smrg AC_SUBST([VERSION], [$2])],
472e5410a46Smrg[_AM_SET_OPTIONS([$1])dnl
473e5410a46Smrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
47489c04b6cSmrgm4_if(
47589c04b6cSmrg  m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
47689c04b6cSmrg  [ok:ok],,
477e5410a46Smrg  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
478e5410a46Smrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
479e5410a46Smrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
480e5410a46Smrg
481e5410a46Smrg_AM_IF_OPTION([no-define],,
48289c04b6cSmrg[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
48389c04b6cSmrg AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
484e5410a46Smrg
485e5410a46Smrg# Some tools Automake needs.
486e5410a46SmrgAC_REQUIRE([AM_SANITY_CHECK])dnl
487e5410a46SmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl
48889c04b6cSmrgAM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
48989c04b6cSmrgAM_MISSING_PROG([AUTOCONF], [autoconf])
49089c04b6cSmrgAM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
49189c04b6cSmrgAM_MISSING_PROG([AUTOHEADER], [autoheader])
49289c04b6cSmrgAM_MISSING_PROG([MAKEINFO], [makeinfo])
493e5410a46SmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl
494e5410a46SmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
49589c04b6cSmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl
49689c04b6cSmrg# For better backward compatibility.  To be removed once Automake 1.9.x
49789c04b6cSmrg# dies out for good.  For more background, see:
49889c04b6cSmrg# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
49989c04b6cSmrg# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
50089c04b6cSmrgAC_SUBST([mkdir_p], ['$(MKDIR_P)'])
501b9867631Smrg# We need awk for the "check" target (and possibly the TAP driver).  The
502b9867631Smrg# system "awk" is bad on some platforms.
503e5410a46SmrgAC_REQUIRE([AC_PROG_AWK])dnl
504e5410a46SmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl
505e5410a46SmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl
506e5410a46Smrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
507e5410a46Smrg	      [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
508e5410a46Smrg			     [_AM_PROG_TAR([v7])])])
509e5410a46Smrg_AM_IF_OPTION([no-dependencies],,
510e5410a46Smrg[AC_PROVIDE_IFELSE([AC_PROG_CC],
51189c04b6cSmrg		  [_AM_DEPENDENCIES([CC])],
51289c04b6cSmrg		  [m4_define([AC_PROG_CC],
51389c04b6cSmrg			     m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
514e5410a46SmrgAC_PROVIDE_IFELSE([AC_PROG_CXX],
51589c04b6cSmrg		  [_AM_DEPENDENCIES([CXX])],
51689c04b6cSmrg		  [m4_define([AC_PROG_CXX],
51789c04b6cSmrg			     m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
518e5410a46SmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC],
51989c04b6cSmrg		  [_AM_DEPENDENCIES([OBJC])],
52089c04b6cSmrg		  [m4_define([AC_PROG_OBJC],
52189c04b6cSmrg			     m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
52289c04b6cSmrgAC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
52389c04b6cSmrg		  [_AM_DEPENDENCIES([OBJCXX])],
52489c04b6cSmrg		  [m4_define([AC_PROG_OBJCXX],
52589c04b6cSmrg			     m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
526e5410a46Smrg])
52789c04b6cSmrgAC_REQUIRE([AM_SILENT_RULES])dnl
52889c04b6cSmrgdnl The testsuite driver may need to know about EXEEXT, so add the
52989c04b6cSmrgdnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This
53089c04b6cSmrgdnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
531e5410a46SmrgAC_CONFIG_COMMANDS_PRE(dnl
532e5410a46Smrg[m4_provide_if([_AM_COMPILER_EXEEXT],
533e5410a46Smrg  [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
534b9867631Smrg
535b9867631Smrg# POSIX will say in a future version that running "rm -f" with no argument
536b9867631Smrg# is OK; and we want to be able to make that assumption in our Makefile
537b9867631Smrg# recipes.  So use an aggressive probe to check that the usage we want is
538b9867631Smrg# actually supported "in the wild" to an acceptable degree.
539b9867631Smrg# See automake bug#10828.
540b9867631Smrg# To make any issue more visible, cause the running configure to be aborted
541b9867631Smrg# by default if the 'rm' program in use doesn't match our expectations; the
542b9867631Smrg# user can still override this though.
543b9867631Smrgif rm -f && rm -fr && rm -rf; then : OK; else
544b9867631Smrg  cat >&2 <<'END'
545b9867631SmrgOops!
546b9867631Smrg
547b9867631SmrgYour 'rm' program seems unable to run without file operands specified
548b9867631Smrgon the command line, even when the '-f' option is present.  This is contrary
549b9867631Smrgto the behaviour of most rm programs out there, and not conforming with
550b9867631Smrgthe upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
551b9867631Smrg
552b9867631SmrgPlease tell bug-automake@gnu.org about your system, including the value
553b9867631Smrgof your $PATH and any error possibly output before this message.  This
554b9867631Smrgcan help us improve future automake versions.
555b9867631Smrg
556b9867631SmrgEND
557b9867631Smrg  if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
558b9867631Smrg    echo 'Configuration will proceed anyway, since you have set the' >&2
559b9867631Smrg    echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
560b9867631Smrg    echo >&2
561b9867631Smrg  else
562b9867631Smrg    cat >&2 <<'END'
563b9867631SmrgAborting the configuration process, to ensure you take notice of the issue.
564b9867631Smrg
565b9867631SmrgYou can download and install GNU coreutils to get an 'rm' implementation
566b9867631Smrgthat behaves properly: <http://www.gnu.org/software/coreutils/>.
567b9867631Smrg
568b9867631SmrgIf you want to complete the configuration process using your problematic
569b9867631Smrg'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
570b9867631Smrgto "yes", and re-run configure.
571b9867631Smrg
572b9867631SmrgEND
573b9867631Smrg    AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
574b9867631Smrg  fi
575b9867631Smrgfi
576b9867631Smrgdnl The trailing newline in this macro's definition is deliberate, for
577b9867631Smrgdnl backward compatibility and to allow trailing 'dnl'-style comments
578b9867631Smrgdnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841.
579e5410a46Smrg])
5801f0ac6a5Smrg
58189c04b6cSmrgdnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
582e5410a46Smrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
583e5410a46Smrgdnl mangled by Autoconf and run in a shell conditional statement.
584e5410a46Smrgm4_define([_AC_COMPILER_EXEEXT],
585e5410a46Smrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
5861f0ac6a5Smrg
587e5410a46Smrg# When config.status generates a header, we must update the stamp-h file.
588e5410a46Smrg# This file resides in the same directory as the config header
589e5410a46Smrg# that is generated.  The stamp files are numbered to have different names.
5901f0ac6a5Smrg
591e5410a46Smrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
592e5410a46Smrg# loop where config.status creates the headers, so we can generate
593e5410a46Smrg# our stamp files there.
594e5410a46SmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
595e5410a46Smrg[# Compute $1's index in $config_headers.
596e5410a46Smrg_am_arg=$1
597e5410a46Smrg_am_stamp_count=1
598e5410a46Smrgfor _am_header in $config_headers :; do
599e5410a46Smrg  case $_am_header in
600e5410a46Smrg    $_am_arg | $_am_arg:* )
601e5410a46Smrg      break ;;
602e5410a46Smrg    * )
603e5410a46Smrg      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
604e5410a46Smrg  esac
605e5410a46Smrgdone
606e5410a46Smrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
6071f0ac6a5Smrg
608b9867631Smrg# Copyright (C) 2001-2014 Free Software Foundation, Inc.
6091f0ac6a5Smrg#
610e5410a46Smrg# This file is free software; the Free Software Foundation
611e5410a46Smrg# gives unlimited permission to copy and/or distribute it,
612e5410a46Smrg# with or without modifications, as long as this notice is preserved.
6131f0ac6a5Smrg
614e5410a46Smrg# AM_PROG_INSTALL_SH
615e5410a46Smrg# ------------------
616e5410a46Smrg# Define $install_sh.
617e5410a46SmrgAC_DEFUN([AM_PROG_INSTALL_SH],
618e5410a46Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
619b9867631Smrgif test x"${install_sh+set}" != xset; then
620e5410a46Smrg  case $am_aux_dir in
621e5410a46Smrg  *\ * | *\	*)
622e5410a46Smrg    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
623e5410a46Smrg  *)
624e5410a46Smrg    install_sh="\${SHELL} $am_aux_dir/install-sh"
625e5410a46Smrg  esac
626e5410a46Smrgfi
62789c04b6cSmrgAC_SUBST([install_sh])])
6281f0ac6a5Smrg
629b9867631Smrg# Copyright (C) 2003-2014 Free Software Foundation, Inc.
630e5410a46Smrg#
631e5410a46Smrg# This file is free software; the Free Software Foundation
632e5410a46Smrg# gives unlimited permission to copy and/or distribute it,
633e5410a46Smrg# with or without modifications, as long as this notice is preserved.
6341f0ac6a5Smrg
635e5410a46Smrg# Check whether the underlying file-system supports filenames
636e5410a46Smrg# with a leading dot.  For instance MS-DOS doesn't.
637e5410a46SmrgAC_DEFUN([AM_SET_LEADING_DOT],
638e5410a46Smrg[rm -rf .tst 2>/dev/null
639e5410a46Smrgmkdir .tst 2>/dev/null
640e5410a46Smrgif test -d .tst; then
641e5410a46Smrg  am__leading_dot=.
6421f0ac6a5Smrgelse
643e5410a46Smrg  am__leading_dot=_
6441f0ac6a5Smrgfi
645e5410a46Smrgrmdir .tst 2>/dev/null
646e5410a46SmrgAC_SUBST([am__leading_dot])])
6471f0ac6a5Smrg
648e5410a46Smrg# Check to see how 'make' treats includes.	            -*- Autoconf -*-
6491f0ac6a5Smrg
650b9867631Smrg# Copyright (C) 2001-2014 Free Software Foundation, Inc.
651e5410a46Smrg#
652e5410a46Smrg# This file is free software; the Free Software Foundation
653e5410a46Smrg# gives unlimited permission to copy and/or distribute it,
654e5410a46Smrg# with or without modifications, as long as this notice is preserved.
6551f0ac6a5Smrg
656e5410a46Smrg# AM_MAKE_INCLUDE()
657e5410a46Smrg# -----------------
658e5410a46Smrg# Check to see how make treats includes.
659e5410a46SmrgAC_DEFUN([AM_MAKE_INCLUDE],
660e5410a46Smrg[am_make=${MAKE-make}
661e5410a46Smrgcat > confinc << 'END'
662e5410a46Smrgam__doit:
663e5410a46Smrg	@echo this is the am__doit target
664e5410a46Smrg.PHONY: am__doit
665e5410a46SmrgEND
666e5410a46Smrg# If we don't find an include directive, just comment out the code.
667e5410a46SmrgAC_MSG_CHECKING([for style of include used by $am_make])
668e5410a46Smrgam__include="#"
669e5410a46Smrgam__quote=
670e5410a46Smrg_am_result=none
671e5410a46Smrg# First try GNU make style include.
672e5410a46Smrgecho "include confinc" > confmf
67389c04b6cSmrg# Ignore all kinds of additional output from 'make'.
674e5410a46Smrgcase `$am_make -s -f confmf 2> /dev/null` in #(
675e5410a46Smrg*the\ am__doit\ target*)
676e5410a46Smrg  am__include=include
677e5410a46Smrg  am__quote=
678e5410a46Smrg  _am_result=GNU
679e5410a46Smrg  ;;
680e5410a46Smrgesac
681e5410a46Smrg# Now try BSD make style include.
682e5410a46Smrgif test "$am__include" = "#"; then
683e5410a46Smrg   echo '.include "confinc"' > confmf
684e5410a46Smrg   case `$am_make -s -f confmf 2> /dev/null` in #(
685e5410a46Smrg   *the\ am__doit\ target*)
686e5410a46Smrg     am__include=.include
687e5410a46Smrg     am__quote="\""
688e5410a46Smrg     _am_result=BSD
689e5410a46Smrg     ;;
690e5410a46Smrg   esac
691e5410a46Smrgfi
692e5410a46SmrgAC_SUBST([am__include])
693e5410a46SmrgAC_SUBST([am__quote])
694e5410a46SmrgAC_MSG_RESULT([$_am_result])
695e5410a46Smrgrm -f confinc confmf
696e5410a46Smrg])
697e5410a46Smrg
698e5410a46Smrg# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
699e5410a46Smrg
700b9867631Smrg# Copyright (C) 1997-2014 Free Software Foundation, Inc.
7011f0ac6a5Smrg#
702e5410a46Smrg# This file is free software; the Free Software Foundation
703e5410a46Smrg# gives unlimited permission to copy and/or distribute it,
704e5410a46Smrg# with or without modifications, as long as this notice is preserved.
7051f0ac6a5Smrg
706e5410a46Smrg# AM_MISSING_PROG(NAME, PROGRAM)
707e5410a46Smrg# ------------------------------
708e5410a46SmrgAC_DEFUN([AM_MISSING_PROG],
709e5410a46Smrg[AC_REQUIRE([AM_MISSING_HAS_RUN])
710e5410a46Smrg$1=${$1-"${am_missing_run}$2"}
711e5410a46SmrgAC_SUBST($1)])
7121f0ac6a5Smrg
713e5410a46Smrg# AM_MISSING_HAS_RUN
714e5410a46Smrg# ------------------
71589c04b6cSmrg# Define MISSING if not defined so far and test if it is modern enough.
71689c04b6cSmrg# If it is, set am_missing_run to use it, otherwise, to nothing.
717e5410a46SmrgAC_DEFUN([AM_MISSING_HAS_RUN],
718e5410a46Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
719e5410a46SmrgAC_REQUIRE_AUX_FILE([missing])dnl
720e5410a46Smrgif test x"${MISSING+set}" != xset; then
721e5410a46Smrg  case $am_aux_dir in
722e5410a46Smrg  *\ * | *\	*)
723e5410a46Smrg    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
724e5410a46Smrg  *)
725e5410a46Smrg    MISSING="\${SHELL} $am_aux_dir/missing" ;;
726e5410a46Smrg  esac
7271f0ac6a5Smrgfi
728e5410a46Smrg# Use eval to expand $SHELL
72989c04b6cSmrgif eval "$MISSING --is-lightweight"; then
73089c04b6cSmrg  am_missing_run="$MISSING "
731e5410a46Smrgelse
732e5410a46Smrg  am_missing_run=
73389c04b6cSmrg  AC_MSG_WARN(['missing' script is too old or missing])
7341f0ac6a5Smrgfi
735e5410a46Smrg])
736e5410a46Smrg
737e5410a46Smrg# Helper functions for option handling.                     -*- Autoconf -*-
7381f0ac6a5Smrg
739b9867631Smrg# Copyright (C) 2001-2014 Free Software Foundation, Inc.
740e5410a46Smrg#
741e5410a46Smrg# This file is free software; the Free Software Foundation
742e5410a46Smrg# gives unlimited permission to copy and/or distribute it,
743e5410a46Smrg# with or without modifications, as long as this notice is preserved.
7441f0ac6a5Smrg
745e5410a46Smrg# _AM_MANGLE_OPTION(NAME)
746e5410a46Smrg# -----------------------
747e5410a46SmrgAC_DEFUN([_AM_MANGLE_OPTION],
748e5410a46Smrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
7491f0ac6a5Smrg
750e5410a46Smrg# _AM_SET_OPTION(NAME)
75189c04b6cSmrg# --------------------
752e5410a46Smrg# Set option NAME.  Presently that only means defining a flag for this option.
753e5410a46SmrgAC_DEFUN([_AM_SET_OPTION],
75489c04b6cSmrg[m4_define(_AM_MANGLE_OPTION([$1]), [1])])
7551f0ac6a5Smrg
756e5410a46Smrg# _AM_SET_OPTIONS(OPTIONS)
75789c04b6cSmrg# ------------------------
758e5410a46Smrg# OPTIONS is a space-separated list of Automake options.
759e5410a46SmrgAC_DEFUN([_AM_SET_OPTIONS],
760e5410a46Smrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
7611f0ac6a5Smrg
762e5410a46Smrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
763e5410a46Smrg# -------------------------------------------
764e5410a46Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
765e5410a46SmrgAC_DEFUN([_AM_IF_OPTION],
766e5410a46Smrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
7671f0ac6a5Smrg
768b9867631Smrg# Copyright (C) 1999-2014 Free Software Foundation, Inc.
769b9867631Smrg#
770b9867631Smrg# This file is free software; the Free Software Foundation
771b9867631Smrg# gives unlimited permission to copy and/or distribute it,
772b9867631Smrg# with or without modifications, as long as this notice is preserved.
773b9867631Smrg
774b9867631Smrg# _AM_PROG_CC_C_O
775b9867631Smrg# ---------------
776b9867631Smrg# Like AC_PROG_CC_C_O, but changed for automake.  We rewrite AC_PROG_CC
777b9867631Smrg# to automatically call this.
778b9867631SmrgAC_DEFUN([_AM_PROG_CC_C_O],
779b9867631Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
780b9867631SmrgAC_REQUIRE_AUX_FILE([compile])dnl
781b9867631SmrgAC_LANG_PUSH([C])dnl
782b9867631SmrgAC_CACHE_CHECK(
783b9867631Smrg  [whether $CC understands -c and -o together],
784b9867631Smrg  [am_cv_prog_cc_c_o],
785b9867631Smrg  [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])])
786b9867631Smrg  # Make sure it works both with $CC and with simple cc.
787b9867631Smrg  # Following AC_PROG_CC_C_O, we do the test twice because some
788b9867631Smrg  # compilers refuse to overwrite an existing .o file with -o,
789b9867631Smrg  # though they will create one.
790b9867631Smrg  am_cv_prog_cc_c_o=yes
791b9867631Smrg  for am_i in 1 2; do
792b9867631Smrg    if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \
793b9867631Smrg         && test -f conftest2.$ac_objext; then
794b9867631Smrg      : OK
795b9867631Smrg    else
796b9867631Smrg      am_cv_prog_cc_c_o=no
797b9867631Smrg      break
798b9867631Smrg    fi
799b9867631Smrg  done
800b9867631Smrg  rm -f core conftest*
801b9867631Smrg  unset am_i])
802b9867631Smrgif test "$am_cv_prog_cc_c_o" != yes; then
803b9867631Smrg   # Losing compiler, so override with the script.
804b9867631Smrg   # FIXME: It is wrong to rewrite CC.
805b9867631Smrg   # But if we don't then we get into trouble of one sort or another.
806b9867631Smrg   # A longer-term fix would be to have automake use am__CC in this case,
807b9867631Smrg   # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
808b9867631Smrg   CC="$am_aux_dir/compile $CC"
809b9867631Smrgfi
810b9867631SmrgAC_LANG_POP([C])])
811b9867631Smrg
812b9867631Smrg# For backward compatibility.
813b9867631SmrgAC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
814b9867631Smrg
815b9867631Smrg# Copyright (C) 2001-2014 Free Software Foundation, Inc.
816b9867631Smrg#
817b9867631Smrg# This file is free software; the Free Software Foundation
818b9867631Smrg# gives unlimited permission to copy and/or distribute it,
819b9867631Smrg# with or without modifications, as long as this notice is preserved.
820b9867631Smrg
821b9867631Smrg# AM_RUN_LOG(COMMAND)
822b9867631Smrg# -------------------
823b9867631Smrg# Run COMMAND, save the exit status in ac_status, and log it.
824b9867631Smrg# (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
825b9867631SmrgAC_DEFUN([AM_RUN_LOG],
826b9867631Smrg[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
827b9867631Smrg   ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
828b9867631Smrg   ac_status=$?
829b9867631Smrg   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
830b9867631Smrg   (exit $ac_status); }])
831b9867631Smrg
832e5410a46Smrg# Check to make sure that the build environment is sane.    -*- Autoconf -*-
8331f0ac6a5Smrg
834b9867631Smrg# Copyright (C) 1996-2014 Free Software Foundation, Inc.
8351f0ac6a5Smrg#
836e5410a46Smrg# This file is free software; the Free Software Foundation
837e5410a46Smrg# gives unlimited permission to copy and/or distribute it,
838e5410a46Smrg# with or without modifications, as long as this notice is preserved.
8391f0ac6a5Smrg
840e5410a46Smrg# AM_SANITY_CHECK
841e5410a46Smrg# ---------------
842e5410a46SmrgAC_DEFUN([AM_SANITY_CHECK],
843e5410a46Smrg[AC_MSG_CHECKING([whether build environment is sane])
844e5410a46Smrg# Reject unsafe characters in $srcdir or the absolute working directory
845e5410a46Smrg# name.  Accept space and tab only in the latter.
846e5410a46Smrgam_lf='
847e5410a46Smrg'
848e5410a46Smrgcase `pwd` in
849e5410a46Smrg  *[[\\\"\#\$\&\'\`$am_lf]]*)
850e5410a46Smrg    AC_MSG_ERROR([unsafe absolute working directory name]);;
851e5410a46Smrgesac
852e5410a46Smrgcase $srcdir in
853e5410a46Smrg  *[[\\\"\#\$\&\'\`$am_lf\ \	]]*)
85489c04b6cSmrg    AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
855e5410a46Smrgesac
8561f0ac6a5Smrg
85789c04b6cSmrg# Do 'set' in a subshell so we don't clobber the current shell's
858e5410a46Smrg# arguments.  Must try -L first in case configure is actually a
859e5410a46Smrg# symlink; some systems play weird games with the mod time of symlinks
860e5410a46Smrg# (eg FreeBSD returns the mod time of the symlink's containing
861e5410a46Smrg# directory).
862e5410a46Smrgif (
86389c04b6cSmrg   am_has_slept=no
86489c04b6cSmrg   for am_try in 1 2; do
86589c04b6cSmrg     echo "timestamp, slept: $am_has_slept" > conftest.file
86689c04b6cSmrg     set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
86789c04b6cSmrg     if test "$[*]" = "X"; then
86889c04b6cSmrg	# -L didn't work.
86989c04b6cSmrg	set X `ls -t "$srcdir/configure" conftest.file`
87089c04b6cSmrg     fi
87189c04b6cSmrg     if test "$[*]" != "X $srcdir/configure conftest.file" \
87289c04b6cSmrg	&& test "$[*]" != "X conftest.file $srcdir/configure"; then
87389c04b6cSmrg
87489c04b6cSmrg	# If neither matched, then we have a broken ls.  This can happen
87589c04b6cSmrg	# if, for instance, CONFIG_SHELL is bash and it inherits a
87689c04b6cSmrg	# broken ls alias from the environment.  This has actually
87789c04b6cSmrg	# happened.  Such a system could not be considered "sane".
87889c04b6cSmrg	AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
87989c04b6cSmrg  alias in your environment])
88089c04b6cSmrg     fi
88189c04b6cSmrg     if test "$[2]" = conftest.file || test $am_try -eq 2; then
88289c04b6cSmrg       break
88389c04b6cSmrg     fi
88489c04b6cSmrg     # Just in case.
88589c04b6cSmrg     sleep 1
88689c04b6cSmrg     am_has_slept=yes
88789c04b6cSmrg   done
888e5410a46Smrg   test "$[2]" = conftest.file
889e5410a46Smrg   )
890e5410a46Smrgthen
891e5410a46Smrg   # Ok.
892e5410a46Smrg   :
893e5410a46Smrgelse
894e5410a46Smrg   AC_MSG_ERROR([newly created file is older than distributed files!
895e5410a46SmrgCheck your system clock])
8961f0ac6a5Smrgfi
89789c04b6cSmrgAC_MSG_RESULT([yes])
89889c04b6cSmrg# If we didn't sleep, we still need to ensure time stamps of config.status and
89989c04b6cSmrg# generated files are strictly newer.
90089c04b6cSmrgam_sleep_pid=
90189c04b6cSmrgif grep 'slept: no' conftest.file >/dev/null 2>&1; then
90289c04b6cSmrg  ( sleep 1 ) &
90389c04b6cSmrg  am_sleep_pid=$!
90489c04b6cSmrgfi
90589c04b6cSmrgAC_CONFIG_COMMANDS_PRE(
90689c04b6cSmrg  [AC_MSG_CHECKING([that generated files are newer than configure])
90789c04b6cSmrg   if test -n "$am_sleep_pid"; then
90889c04b6cSmrg     # Hide warnings about reused PIDs.
90989c04b6cSmrg     wait $am_sleep_pid 2>/dev/null
91089c04b6cSmrg   fi
91189c04b6cSmrg   AC_MSG_RESULT([done])])
91289c04b6cSmrgrm -f conftest.file
91389c04b6cSmrg])
9141f0ac6a5Smrg
915b9867631Smrg# Copyright (C) 2009-2014 Free Software Foundation, Inc.
916e5410a46Smrg#
917e5410a46Smrg# This file is free software; the Free Software Foundation
918e5410a46Smrg# gives unlimited permission to copy and/or distribute it,
919e5410a46Smrg# with or without modifications, as long as this notice is preserved.
9201f0ac6a5Smrg
921e5410a46Smrg# AM_SILENT_RULES([DEFAULT])
922e5410a46Smrg# --------------------------
923e5410a46Smrg# Enable less verbose build rules; with the default set to DEFAULT
92489c04b6cSmrg# ("yes" being less verbose, "no" or empty being verbose).
925e5410a46SmrgAC_DEFUN([AM_SILENT_RULES],
92689c04b6cSmrg[AC_ARG_ENABLE([silent-rules], [dnl
92789c04b6cSmrgAS_HELP_STRING(
92889c04b6cSmrg  [--enable-silent-rules],
92989c04b6cSmrg  [less verbose build output (undo: "make V=1")])
93089c04b6cSmrgAS_HELP_STRING(
93189c04b6cSmrg  [--disable-silent-rules],
93289c04b6cSmrg  [verbose build output (undo: "make V=0")])dnl
93389c04b6cSmrg])
93489c04b6cSmrgcase $enable_silent_rules in @%:@ (((
93589c04b6cSmrg  yes) AM_DEFAULT_VERBOSITY=0;;
93689c04b6cSmrg   no) AM_DEFAULT_VERBOSITY=1;;
93789c04b6cSmrg    *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
938e5410a46Smrgesac
93989c04b6cSmrgdnl
94089c04b6cSmrgdnl A few 'make' implementations (e.g., NonStop OS and NextStep)
94189c04b6cSmrgdnl do not support nested variable expansions.
94289c04b6cSmrgdnl See automake bug#9928 and bug#10237.
94389c04b6cSmrgam_make=${MAKE-make}
94489c04b6cSmrgAC_CACHE_CHECK([whether $am_make supports nested variables],
94589c04b6cSmrg   [am_cv_make_support_nested_variables],
94689c04b6cSmrg   [if AS_ECHO([['TRUE=$(BAR$(V))
94789c04b6cSmrgBAR0=false
94889c04b6cSmrgBAR1=true
94989c04b6cSmrgV=1
95089c04b6cSmrgam__doit:
95189c04b6cSmrg	@$(TRUE)
95289c04b6cSmrg.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
95389c04b6cSmrg  am_cv_make_support_nested_variables=yes
95489c04b6cSmrgelse
95589c04b6cSmrg  am_cv_make_support_nested_variables=no
95689c04b6cSmrgfi])
95789c04b6cSmrgif test $am_cv_make_support_nested_variables = yes; then
95889c04b6cSmrg  dnl Using '$V' instead of '$(V)' breaks IRIX make.
95989c04b6cSmrg  AM_V='$(V)'
96089c04b6cSmrg  AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
96189c04b6cSmrgelse
96289c04b6cSmrg  AM_V=$AM_DEFAULT_VERBOSITY
96389c04b6cSmrg  AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
96489c04b6cSmrgfi
96589c04b6cSmrgAC_SUBST([AM_V])dnl
96689c04b6cSmrgAM_SUBST_NOTMAKE([AM_V])dnl
96789c04b6cSmrgAC_SUBST([AM_DEFAULT_V])dnl
96889c04b6cSmrgAM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
969e5410a46SmrgAC_SUBST([AM_DEFAULT_VERBOSITY])dnl
970e5410a46SmrgAM_BACKSLASH='\'
971e5410a46SmrgAC_SUBST([AM_BACKSLASH])dnl
972e5410a46Smrg_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
9731f0ac6a5Smrg])
9741f0ac6a5Smrg
975b9867631Smrg# Copyright (C) 2001-2014 Free Software Foundation, Inc.
976e5410a46Smrg#
977e5410a46Smrg# This file is free software; the Free Software Foundation
978e5410a46Smrg# gives unlimited permission to copy and/or distribute it,
979e5410a46Smrg# with or without modifications, as long as this notice is preserved.
980e5410a46Smrg
981e5410a46Smrg# AM_PROG_INSTALL_STRIP
982e5410a46Smrg# ---------------------
98389c04b6cSmrg# One issue with vendor 'install' (even GNU) is that you can't
984e5410a46Smrg# specify the program used to strip binaries.  This is especially
985e5410a46Smrg# annoying in cross-compiling environments, where the build's strip
986e5410a46Smrg# is unlikely to handle the host's binaries.
987e5410a46Smrg# Fortunately install-sh will honor a STRIPPROG variable, so we
98889c04b6cSmrg# always use install-sh in "make install-strip", and initialize
989e5410a46Smrg# STRIPPROG with the value of the STRIP variable (set by the user).
990e5410a46SmrgAC_DEFUN([AM_PROG_INSTALL_STRIP],
991e5410a46Smrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
99289c04b6cSmrg# Installed binaries are usually stripped using 'strip' when the user
99389c04b6cSmrg# run "make install-strip".  However 'strip' might not be the right
994e5410a46Smrg# tool to use in cross-compilation environments, therefore Automake
99589c04b6cSmrg# will honor the 'STRIP' environment variable to overrule this program.
99689c04b6cSmrgdnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
997e5410a46Smrgif test "$cross_compiling" != no; then
998e5410a46Smrg  AC_CHECK_TOOL([STRIP], [strip], :)
999e5410a46Smrgfi
1000e5410a46SmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
1001e5410a46SmrgAC_SUBST([INSTALL_STRIP_PROGRAM])])
1002e5410a46Smrg
1003b9867631Smrg# Copyright (C) 2006-2014 Free Software Foundation, Inc.
10041f0ac6a5Smrg#
10051f0ac6a5Smrg# This file is free software; the Free Software Foundation
10061f0ac6a5Smrg# gives unlimited permission to copy and/or distribute it,
10071f0ac6a5Smrg# with or without modifications, as long as this notice is preserved.
10081f0ac6a5Smrg
1009e5410a46Smrg# _AM_SUBST_NOTMAKE(VARIABLE)
1010e5410a46Smrg# ---------------------------
1011e5410a46Smrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
1012e5410a46Smrg# This macro is traced by Automake.
1013e5410a46SmrgAC_DEFUN([_AM_SUBST_NOTMAKE])
10141f0ac6a5Smrg
1015e5410a46Smrg# AM_SUBST_NOTMAKE(VARIABLE)
101689c04b6cSmrg# --------------------------
1017e5410a46Smrg# Public sister of _AM_SUBST_NOTMAKE.
1018e5410a46SmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
10191f0ac6a5Smrg
1020e5410a46Smrg# Check how to create a tarball.                            -*- Autoconf -*-
10211f0ac6a5Smrg
1022b9867631Smrg# Copyright (C) 2004-2014 Free Software Foundation, Inc.
10231f0ac6a5Smrg#
10241f0ac6a5Smrg# This file is free software; the Free Software Foundation
10251f0ac6a5Smrg# gives unlimited permission to copy and/or distribute it,
10261f0ac6a5Smrg# with or without modifications, as long as this notice is preserved.
10271f0ac6a5Smrg
1028e5410a46Smrg# _AM_PROG_TAR(FORMAT)
1029e5410a46Smrg# --------------------
1030e5410a46Smrg# Check how to create a tarball in format FORMAT.
103189c04b6cSmrg# FORMAT should be one of 'v7', 'ustar', or 'pax'.
10321f0ac6a5Smrg#
1033e5410a46Smrg# Substitute a variable $(am__tar) that is a command
1034e5410a46Smrg# writing to stdout a FORMAT-tarball containing the directory
1035e5410a46Smrg# $tardir.
1036e5410a46Smrg#     tardir=directory && $(am__tar) > result.tar
10371f0ac6a5Smrg#
1038e5410a46Smrg# Substitute a variable $(am__untar) that extract such
1039e5410a46Smrg# a tarball read from stdin.
1040e5410a46Smrg#     $(am__untar) < result.tar
10416fae4e5dSmrg#
104289c04b6cSmrgAC_DEFUN([_AM_PROG_TAR],
104389c04b6cSmrg[# Always define AMTAR for backward compatibility.  Yes, it's still used
104489c04b6cSmrg# in the wild :-(  We should find a proper way to deprecate it ...
104589c04b6cSmrgAC_SUBST([AMTAR], ['$${TAR-tar}'])
10461f0ac6a5Smrg
104789c04b6cSmrg# We'll loop over all known methods to create a tar archive until one works.
104889c04b6cSmrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
10491f0ac6a5Smrg
105089c04b6cSmrgm4_if([$1], [v7],
105189c04b6cSmrg  [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
105289c04b6cSmrg
105389c04b6cSmrg  [m4_case([$1],
105489c04b6cSmrg    [ustar],
105589c04b6cSmrg     [# The POSIX 1988 'ustar' format is defined with fixed-size fields.
105689c04b6cSmrg      # There is notably a 21 bits limit for the UID and the GID.  In fact,
105789c04b6cSmrg      # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
105889c04b6cSmrg      # and bug#13588).
105989c04b6cSmrg      am_max_uid=2097151 # 2^21 - 1
106089c04b6cSmrg      am_max_gid=$am_max_uid
106189c04b6cSmrg      # The $UID and $GID variables are not portable, so we need to resort
106289c04b6cSmrg      # to the POSIX-mandated id(1) utility.  Errors in the 'id' calls
106389c04b6cSmrg      # below are definitely unexpected, so allow the users to see them
106489c04b6cSmrg      # (that is, avoid stderr redirection).
106589c04b6cSmrg      am_uid=`id -u || echo unknown`
106689c04b6cSmrg      am_gid=`id -g || echo unknown`
106789c04b6cSmrg      AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
106889c04b6cSmrg      if test $am_uid -le $am_max_uid; then
106989c04b6cSmrg         AC_MSG_RESULT([yes])
107089c04b6cSmrg      else
107189c04b6cSmrg         AC_MSG_RESULT([no])
107289c04b6cSmrg         _am_tools=none
107389c04b6cSmrg      fi
107489c04b6cSmrg      AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
107589c04b6cSmrg      if test $am_gid -le $am_max_gid; then
107689c04b6cSmrg         AC_MSG_RESULT([yes])
107789c04b6cSmrg      else
107889c04b6cSmrg        AC_MSG_RESULT([no])
107989c04b6cSmrg        _am_tools=none
108089c04b6cSmrg      fi],
10811f0ac6a5Smrg
108289c04b6cSmrg  [pax],
108389c04b6cSmrg    [],
10841f0ac6a5Smrg
108589c04b6cSmrg  [m4_fatal([Unknown tar format])])
10869c9ff80cSmrg
108789c04b6cSmrg  AC_MSG_CHECKING([how to create a $1 tar archive])
10889c9ff80cSmrg
108989c04b6cSmrg  # Go ahead even if we have the value already cached.  We do so because we
109089c04b6cSmrg  # need to set the values for the 'am__tar' and 'am__untar' variables.
109189c04b6cSmrg  _am_tools=${am_cv_prog_tar_$1-$_am_tools}
10921f0ac6a5Smrg
109389c04b6cSmrg  for _am_tool in $_am_tools; do
109489c04b6cSmrg    case $_am_tool in
109589c04b6cSmrg    gnutar)
109689c04b6cSmrg      for _am_tar in tar gnutar gtar; do
109789c04b6cSmrg        AM_RUN_LOG([$_am_tar --version]) && break
109889c04b6cSmrg      done
109989c04b6cSmrg      am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
110089c04b6cSmrg      am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
110189c04b6cSmrg      am__untar="$_am_tar -xf -"
110289c04b6cSmrg      ;;
110389c04b6cSmrg    plaintar)
110489c04b6cSmrg      # Must skip GNU tar: if it does not support --format= it doesn't create
110589c04b6cSmrg      # ustar tarball either.
110689c04b6cSmrg      (tar --version) >/dev/null 2>&1 && continue
110789c04b6cSmrg      am__tar='tar chf - "$$tardir"'
110889c04b6cSmrg      am__tar_='tar chf - "$tardir"'
110989c04b6cSmrg      am__untar='tar xf -'
111089c04b6cSmrg      ;;
111189c04b6cSmrg    pax)
111289c04b6cSmrg      am__tar='pax -L -x $1 -w "$$tardir"'
111389c04b6cSmrg      am__tar_='pax -L -x $1 -w "$tardir"'
111489c04b6cSmrg      am__untar='pax -r'
111589c04b6cSmrg      ;;
111689c04b6cSmrg    cpio)
111789c04b6cSmrg      am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
111889c04b6cSmrg      am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
111989c04b6cSmrg      am__untar='cpio -i -H $1 -d'
112089c04b6cSmrg      ;;
112189c04b6cSmrg    none)
112289c04b6cSmrg      am__tar=false
112389c04b6cSmrg      am__tar_=false
112489c04b6cSmrg      am__untar=false
112589c04b6cSmrg      ;;
112689c04b6cSmrg    esac
11279c9ff80cSmrg
112889c04b6cSmrg    # If the value was cached, stop now.  We just wanted to have am__tar
112989c04b6cSmrg    # and am__untar set.
113089c04b6cSmrg    test -n "${am_cv_prog_tar_$1}" && break
113189c04b6cSmrg
113289c04b6cSmrg    # tar/untar a dummy directory, and stop if the command works.
113389c04b6cSmrg    rm -rf conftest.dir
113489c04b6cSmrg    mkdir conftest.dir
113589c04b6cSmrg    echo GrepMe > conftest.dir/file
113689c04b6cSmrg    AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
113789c04b6cSmrg    rm -rf conftest.dir
113889c04b6cSmrg    if test -s conftest.tar; then
113989c04b6cSmrg      AM_RUN_LOG([$am__untar <conftest.tar])
114089c04b6cSmrg      AM_RUN_LOG([cat conftest.dir/file])
114189c04b6cSmrg      grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
114289c04b6cSmrg    fi
114389c04b6cSmrg  done
114489c04b6cSmrg  rm -rf conftest.dir
11456fae4e5dSmrg
114689c04b6cSmrg  AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
114789c04b6cSmrg  AC_MSG_RESULT([$am_cv_prog_tar_$1])])
11486fae4e5dSmrg
114989c04b6cSmrgAC_SUBST([am__tar])
115089c04b6cSmrgAC_SUBST([am__untar])
115189c04b6cSmrg]) # _AM_PROG_TAR
11529c9ff80cSmrg
11536fae4e5dSmrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
11546fae4e5dSmrg#
11556fae4e5dSmrg#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
115689c04b6cSmrg#                 2006, 2007, 2008, 2009, 2010, 2011 Free Software
115789c04b6cSmrg#                 Foundation, Inc.
11586fae4e5dSmrg#   Written by Gordon Matzigkeit, 1996
11596fae4e5dSmrg#
11606fae4e5dSmrg# This file is free software; the Free Software Foundation gives
11616fae4e5dSmrg# unlimited permission to copy and/or distribute it, with or without
11626fae4e5dSmrg# modifications, as long as this notice is preserved.
11639c9ff80cSmrg
11646fae4e5dSmrgm4_define([_LT_COPYING], [dnl
11656fae4e5dSmrg#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
116689c04b6cSmrg#                 2006, 2007, 2008, 2009, 2010, 2011 Free Software
116789c04b6cSmrg#                 Foundation, Inc.
11686fae4e5dSmrg#   Written by Gordon Matzigkeit, 1996
1169e5410a46Smrg#
11706fae4e5dSmrg#   This file is part of GNU Libtool.
11716fae4e5dSmrg#
11726fae4e5dSmrg# GNU Libtool is free software; you can redistribute it and/or
11736fae4e5dSmrg# modify it under the terms of the GNU General Public License as
11746fae4e5dSmrg# published by the Free Software Foundation; either version 2 of
11756fae4e5dSmrg# the License, or (at your option) any later version.
11766fae4e5dSmrg#
11776fae4e5dSmrg# As a special exception to the GNU General Public License,
11786fae4e5dSmrg# if you distribute this file as part of a program or library that
11796fae4e5dSmrg# is built using GNU Libtool, you may include this file under the
11806fae4e5dSmrg# same distribution terms that you use for the rest of that program.
11816fae4e5dSmrg#
11826fae4e5dSmrg# GNU Libtool is distributed in the hope that it will be useful,
11836fae4e5dSmrg# but WITHOUT ANY WARRANTY; without even the implied warranty of
11846fae4e5dSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11856fae4e5dSmrg# GNU General Public License for more details.
11866fae4e5dSmrg#
11876fae4e5dSmrg# You should have received a copy of the GNU General Public License
11886fae4e5dSmrg# along with GNU Libtool; see the file COPYING.  If not, a copy
11896fae4e5dSmrg# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
11906fae4e5dSmrg# obtained by writing to the Free Software Foundation, Inc.,
11916fae4e5dSmrg# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
11926fae4e5dSmrg])
11931f0ac6a5Smrg
11946fae4e5dSmrg# serial 57 LT_INIT
11951f0ac6a5Smrg
11961f0ac6a5Smrg
11976fae4e5dSmrg# LT_PREREQ(VERSION)
11986fae4e5dSmrg# ------------------
11996fae4e5dSmrg# Complain and exit if this libtool version is less that VERSION.
12006fae4e5dSmrgm4_defun([LT_PREREQ],
12016fae4e5dSmrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
12026fae4e5dSmrg       [m4_default([$3],
12036fae4e5dSmrg		   [m4_fatal([Libtool version $1 or higher is required],
12046fae4e5dSmrg		             63)])],
12056fae4e5dSmrg       [$2])])
12061f0ac6a5Smrg
1207e5410a46Smrg
12086fae4e5dSmrg# _LT_CHECK_BUILDDIR
12096fae4e5dSmrg# ------------------
12106fae4e5dSmrg# Complain if the absolute build directory name contains unusual characters
12116fae4e5dSmrgm4_defun([_LT_CHECK_BUILDDIR],
12126fae4e5dSmrg[case `pwd` in
12136fae4e5dSmrg  *\ * | *\	*)
12146fae4e5dSmrg    AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
12156fae4e5dSmrgesac
12166fae4e5dSmrg])
1217e5410a46Smrg
12181f0ac6a5Smrg
12196fae4e5dSmrg# LT_INIT([OPTIONS])
12206fae4e5dSmrg# ------------------
12216fae4e5dSmrgAC_DEFUN([LT_INIT],
12226fae4e5dSmrg[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
12236fae4e5dSmrgAC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
12246fae4e5dSmrgAC_BEFORE([$0], [LT_LANG])dnl
12256fae4e5dSmrgAC_BEFORE([$0], [LT_OUTPUT])dnl
12266fae4e5dSmrgAC_BEFORE([$0], [LTDL_INIT])dnl
12276fae4e5dSmrgm4_require([_LT_CHECK_BUILDDIR])dnl
12281f0ac6a5Smrg
12296fae4e5dSmrgdnl Autoconf doesn't catch unexpanded LT_ macros by default:
12306fae4e5dSmrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
12316fae4e5dSmrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
12326fae4e5dSmrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
12336fae4e5dSmrgdnl unless we require an AC_DEFUNed macro:
12346fae4e5dSmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl
12356fae4e5dSmrgAC_REQUIRE([LTSUGAR_VERSION])dnl
12366fae4e5dSmrgAC_REQUIRE([LTVERSION_VERSION])dnl
12376fae4e5dSmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl
12386fae4e5dSmrgm4_require([_LT_PROG_LTMAIN])dnl
12391f0ac6a5Smrg
12406fae4e5dSmrg_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
12411f0ac6a5Smrg
12426fae4e5dSmrgdnl Parse OPTIONS
12436fae4e5dSmrg_LT_SET_OPTIONS([$0], [$1])
12441f0ac6a5Smrg
12456fae4e5dSmrg# This can be used to rebuild libtool when needed
12466fae4e5dSmrgLIBTOOL_DEPS="$ltmain"
12471f0ac6a5Smrg
12486fae4e5dSmrg# Always use our own libtool.
12496fae4e5dSmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool'
12506fae4e5dSmrgAC_SUBST(LIBTOOL)dnl
12519c9ff80cSmrg
12526fae4e5dSmrg_LT_SETUP
12531f0ac6a5Smrg
12546fae4e5dSmrg# Only expand once:
12556fae4e5dSmrgm4_define([LT_INIT])
12566fae4e5dSmrg])# LT_INIT
12571f0ac6a5Smrg
12586fae4e5dSmrg# Old names:
12596fae4e5dSmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
12606fae4e5dSmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
12616fae4e5dSmrgdnl aclocal-1.4 backwards compatibility:
12626fae4e5dSmrgdnl AC_DEFUN([AC_PROG_LIBTOOL], [])
12636fae4e5dSmrgdnl AC_DEFUN([AM_PROG_LIBTOOL], [])
12641f0ac6a5Smrg
12651f0ac6a5Smrg
12666fae4e5dSmrg# _LT_CC_BASENAME(CC)
12676fae4e5dSmrg# -------------------
12686fae4e5dSmrg# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
12696fae4e5dSmrgm4_defun([_LT_CC_BASENAME],
12706fae4e5dSmrg[for cc_temp in $1""; do
12716fae4e5dSmrg  case $cc_temp in
12726fae4e5dSmrg    compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
12736fae4e5dSmrg    distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
12746fae4e5dSmrg    \-*) ;;
12756fae4e5dSmrg    *) break;;
12766fae4e5dSmrg  esac
12776fae4e5dSmrgdone
12786fae4e5dSmrgcc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
12796fae4e5dSmrg])
12801f0ac6a5Smrg
12811f0ac6a5Smrg
12826fae4e5dSmrg# _LT_FILEUTILS_DEFAULTS
12836fae4e5dSmrg# ----------------------
12846fae4e5dSmrg# It is okay to use these file commands and assume they have been set
12856fae4e5dSmrg# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
12866fae4e5dSmrgm4_defun([_LT_FILEUTILS_DEFAULTS],
12876fae4e5dSmrg[: ${CP="cp -f"}
12886fae4e5dSmrg: ${MV="mv -f"}
12896fae4e5dSmrg: ${RM="rm -f"}
12906fae4e5dSmrg])# _LT_FILEUTILS_DEFAULTS
1291e5410a46Smrg
1292e5410a46Smrg
12936fae4e5dSmrg# _LT_SETUP
12946fae4e5dSmrg# ---------
12956fae4e5dSmrgm4_defun([_LT_SETUP],
12966fae4e5dSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
12976fae4e5dSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl
12986fae4e5dSmrgAC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
12996fae4e5dSmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
13009c9ff80cSmrg
130189c04b6cSmrg_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl
130289c04b6cSmrgdnl
13036fae4e5dSmrg_LT_DECL([], [host_alias], [0], [The host system])dnl
13046fae4e5dSmrg_LT_DECL([], [host], [0])dnl
13056fae4e5dSmrg_LT_DECL([], [host_os], [0])dnl
13066fae4e5dSmrgdnl
13076fae4e5dSmrg_LT_DECL([], [build_alias], [0], [The build system])dnl
13086fae4e5dSmrg_LT_DECL([], [build], [0])dnl
13096fae4e5dSmrg_LT_DECL([], [build_os], [0])dnl
13106fae4e5dSmrgdnl
13116fae4e5dSmrgAC_REQUIRE([AC_PROG_CC])dnl
13126fae4e5dSmrgAC_REQUIRE([LT_PATH_LD])dnl
13136fae4e5dSmrgAC_REQUIRE([LT_PATH_NM])dnl
13146fae4e5dSmrgdnl
13156fae4e5dSmrgAC_REQUIRE([AC_PROG_LN_S])dnl
13166fae4e5dSmrgtest -z "$LN_S" && LN_S="ln -s"
13176fae4e5dSmrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
13186fae4e5dSmrgdnl
13196fae4e5dSmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl
13206fae4e5dSmrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
13216fae4e5dSmrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
13226fae4e5dSmrgdnl
13236fae4e5dSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
13246fae4e5dSmrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl
13256fae4e5dSmrgm4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
13266fae4e5dSmrgm4_require([_LT_CMD_RELOAD])dnl
13276fae4e5dSmrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl
13286fae4e5dSmrgm4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
13296fae4e5dSmrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl
13306fae4e5dSmrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
13316fae4e5dSmrgm4_require([_LT_WITH_SYSROOT])dnl
13326fae4e5dSmrg
13336fae4e5dSmrg_LT_CONFIG_LIBTOOL_INIT([
13346fae4e5dSmrg# See if we are running on zsh, and set the options which allow our
13356fae4e5dSmrg# commands through without removal of \ escapes INIT.
13366fae4e5dSmrgif test -n "\${ZSH_VERSION+set}" ; then
13376fae4e5dSmrg   setopt NO_GLOB_SUBST
13386fae4e5dSmrgfi
13396fae4e5dSmrg])
13406fae4e5dSmrgif test -n "${ZSH_VERSION+set}" ; then
13416fae4e5dSmrg   setopt NO_GLOB_SUBST
13429c9ff80cSmrgfi
13439c9ff80cSmrg
13446fae4e5dSmrg_LT_CHECK_OBJDIR
13459c9ff80cSmrg
13466fae4e5dSmrgm4_require([_LT_TAG_COMPILER])dnl
13479c9ff80cSmrg
13486fae4e5dSmrgcase $host_os in
13496fae4e5dSmrgaix3*)
13506fae4e5dSmrg  # AIX sometimes has problems with the GCC collect2 program.  For some
13516fae4e5dSmrg  # reason, if we set the COLLECT_NAMES environment variable, the problems
13526fae4e5dSmrg  # vanish in a puff of smoke.
13536fae4e5dSmrg  if test "X${COLLECT_NAMES+set}" != Xset; then
13546fae4e5dSmrg    COLLECT_NAMES=
13556fae4e5dSmrg    export COLLECT_NAMES
13566fae4e5dSmrg  fi
13576fae4e5dSmrg  ;;
13586fae4e5dSmrgesac
13599c9ff80cSmrg
13606fae4e5dSmrg# Global variables:
13616fae4e5dSmrgofile=libtool
13626fae4e5dSmrgcan_build_shared=yes
13639c9ff80cSmrg
13646fae4e5dSmrg# All known linkers require a `.a' archive for static linking (except MSVC,
13656fae4e5dSmrg# which needs '.lib').
13666fae4e5dSmrglibext=a
13679c9ff80cSmrg
13686fae4e5dSmrgwith_gnu_ld="$lt_cv_prog_gnu_ld"
13699c9ff80cSmrg
13706fae4e5dSmrgold_CC="$CC"
13716fae4e5dSmrgold_CFLAGS="$CFLAGS"
13729c9ff80cSmrg
13736fae4e5dSmrg# Set sane defaults for various variables
13746fae4e5dSmrgtest -z "$CC" && CC=cc
13756fae4e5dSmrgtest -z "$LTCC" && LTCC=$CC
13766fae4e5dSmrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
13776fae4e5dSmrgtest -z "$LD" && LD=ld
13786fae4e5dSmrgtest -z "$ac_objext" && ac_objext=o
13799c9ff80cSmrg
13806fae4e5dSmrg_LT_CC_BASENAME([$compiler])
13819c9ff80cSmrg
13826fae4e5dSmrg# Only perform the check for file, if the check method requires it
13836fae4e5dSmrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file
13846fae4e5dSmrgcase $deplibs_check_method in
13856fae4e5dSmrgfile_magic*)
13866fae4e5dSmrg  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
13876fae4e5dSmrg    _LT_PATH_MAGIC
13886fae4e5dSmrg  fi
13896fae4e5dSmrg  ;;
13906fae4e5dSmrgesac
13919c9ff80cSmrg
13926fae4e5dSmrg# Use C for the default configuration in the libtool script
13936fae4e5dSmrgLT_SUPPORTED_TAG([CC])
13946fae4e5dSmrg_LT_LANG_C_CONFIG
13956fae4e5dSmrg_LT_LANG_DEFAULT_CONFIG
13966fae4e5dSmrg_LT_CONFIG_COMMANDS
13976fae4e5dSmrg])# _LT_SETUP
13989c9ff80cSmrg
13999c9ff80cSmrg
14006fae4e5dSmrg# _LT_PREPARE_SED_QUOTE_VARS
14016fae4e5dSmrg# --------------------------
14026fae4e5dSmrg# Define a few sed substitution that help us do robust quoting.
14036fae4e5dSmrgm4_defun([_LT_PREPARE_SED_QUOTE_VARS],
14046fae4e5dSmrg[# Backslashify metacharacters that are still active within
14056fae4e5dSmrg# double-quoted strings.
14066fae4e5dSmrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
14079c9ff80cSmrg
14086fae4e5dSmrg# Same as above, but do not quote variable references.
14096fae4e5dSmrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g'
1410e5410a46Smrg
14116fae4e5dSmrg# Sed substitution to delay expansion of an escaped shell variable in a
14126fae4e5dSmrg# double_quote_subst'ed string.
14136fae4e5dSmrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
14141f0ac6a5Smrg
14156fae4e5dSmrg# Sed substitution to delay expansion of an escaped single quote.
14166fae4e5dSmrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
14171f0ac6a5Smrg
14186fae4e5dSmrg# Sed substitution to avoid accidental globbing in evaled expressions
14196fae4e5dSmrgno_glob_subst='s/\*/\\\*/g'
14206fae4e5dSmrg])
14211f0ac6a5Smrg
14226fae4e5dSmrg# _LT_PROG_LTMAIN
14236fae4e5dSmrg# ---------------
14246fae4e5dSmrg# Note that this code is called both from `configure', and `config.status'
14256fae4e5dSmrg# now that we use AC_CONFIG_COMMANDS to generate libtool.  Notably,
14266fae4e5dSmrg# `config.status' has no value for ac_aux_dir unless we are using Automake,
14276fae4e5dSmrg# so we pass a copy along to make sure it has a sensible value anyway.
14286fae4e5dSmrgm4_defun([_LT_PROG_LTMAIN],
14296fae4e5dSmrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
14306fae4e5dSmrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
14316fae4e5dSmrgltmain="$ac_aux_dir/ltmain.sh"
14326fae4e5dSmrg])# _LT_PROG_LTMAIN
14331f0ac6a5Smrg
14349c9ff80cSmrg
14359c9ff80cSmrg
14366fae4e5dSmrg# So that we can recreate a full libtool script including additional
14376fae4e5dSmrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
14386fae4e5dSmrg# in macros and then make a single call at the end using the `libtool'
14396fae4e5dSmrg# label.
14409c9ff80cSmrg
14411f0ac6a5Smrg
14426fae4e5dSmrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
14436fae4e5dSmrg# ----------------------------------------
14446fae4e5dSmrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
14456fae4e5dSmrgm4_define([_LT_CONFIG_LIBTOOL_INIT],
14466fae4e5dSmrg[m4_ifval([$1],
14476fae4e5dSmrg          [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
14486fae4e5dSmrg                     [$1
14496fae4e5dSmrg])])])
14501f0ac6a5Smrg
14516fae4e5dSmrg# Initialize.
14526fae4e5dSmrgm4_define([_LT_OUTPUT_LIBTOOL_INIT])
14531f0ac6a5Smrg
14541f0ac6a5Smrg
14556fae4e5dSmrg# _LT_CONFIG_LIBTOOL([COMMANDS])
14566fae4e5dSmrg# ------------------------------
14576fae4e5dSmrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
14586fae4e5dSmrgm4_define([_LT_CONFIG_LIBTOOL],
14596fae4e5dSmrg[m4_ifval([$1],
14606fae4e5dSmrg          [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
14616fae4e5dSmrg                     [$1
14626fae4e5dSmrg])])])
14639c9ff80cSmrg
14646fae4e5dSmrg# Initialize.
14656fae4e5dSmrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
14669c9ff80cSmrg
1467e5410a46Smrg
14686fae4e5dSmrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
14696fae4e5dSmrg# -----------------------------------------------------
14706fae4e5dSmrgm4_defun([_LT_CONFIG_SAVE_COMMANDS],
14716fae4e5dSmrg[_LT_CONFIG_LIBTOOL([$1])
14726fae4e5dSmrg_LT_CONFIG_LIBTOOL_INIT([$2])
14736fae4e5dSmrg])
1474e5410a46Smrg
14751f0ac6a5Smrg
14766fae4e5dSmrg# _LT_FORMAT_COMMENT([COMMENT])
14776fae4e5dSmrg# -----------------------------
14786fae4e5dSmrg# Add leading comment marks to the start of each line, and a trailing
14796fae4e5dSmrg# full-stop to the whole comment if one is not present already.
14806fae4e5dSmrgm4_define([_LT_FORMAT_COMMENT],
14816fae4e5dSmrg[m4_ifval([$1], [
14826fae4e5dSmrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
14836fae4e5dSmrg              [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
14846fae4e5dSmrg)])
1485e5410a46Smrg
14861f0ac6a5Smrg
14871f0ac6a5Smrg
14881f0ac6a5Smrg
14891f0ac6a5Smrg
14906fae4e5dSmrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
14916fae4e5dSmrg# -------------------------------------------------------------------
14926fae4e5dSmrg# CONFIGNAME is the name given to the value in the libtool script.
14936fae4e5dSmrg# VARNAME is the (base) name used in the configure script.
14946fae4e5dSmrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
14956fae4e5dSmrg# VARNAME.  Any other value will be used directly.
14966fae4e5dSmrgm4_define([_LT_DECL],
14976fae4e5dSmrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
14986fae4e5dSmrg    [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
14996fae4e5dSmrg	[m4_ifval([$1], [$1], [$2])])
15006fae4e5dSmrg    lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
15016fae4e5dSmrg    m4_ifval([$4],
15026fae4e5dSmrg	[lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
15036fae4e5dSmrg    lt_dict_add_subkey([lt_decl_dict], [$2],
15046fae4e5dSmrg	[tagged?], [m4_ifval([$5], [yes], [no])])])
15056fae4e5dSmrg])
15061f0ac6a5Smrg
15071f0ac6a5Smrg
15086fae4e5dSmrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
15096fae4e5dSmrg# --------------------------------------------------------
15106fae4e5dSmrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
15111f0ac6a5Smrg
15121f0ac6a5Smrg
15136fae4e5dSmrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
15146fae4e5dSmrg# ------------------------------------------------
15156fae4e5dSmrgm4_define([lt_decl_tag_varnames],
15166fae4e5dSmrg[_lt_decl_filter([tagged?], [yes], $@)])
15171f0ac6a5Smrg
15181f0ac6a5Smrg
15196fae4e5dSmrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
15206fae4e5dSmrg# ---------------------------------------------------------
15216fae4e5dSmrgm4_define([_lt_decl_filter],
15226fae4e5dSmrg[m4_case([$#],
15236fae4e5dSmrg  [0], [m4_fatal([$0: too few arguments: $#])],
15246fae4e5dSmrg  [1], [m4_fatal([$0: too few arguments: $#: $1])],
15256fae4e5dSmrg  [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
15266fae4e5dSmrg  [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
15276fae4e5dSmrg  [lt_dict_filter([lt_decl_dict], $@)])[]dnl
15286fae4e5dSmrg])
15291f0ac6a5Smrg
15301f0ac6a5Smrg
15316fae4e5dSmrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
15326fae4e5dSmrg# --------------------------------------------------
15336fae4e5dSmrgm4_define([lt_decl_quote_varnames],
15346fae4e5dSmrg[_lt_decl_filter([value], [1], $@)])
15351f0ac6a5Smrg
15369c9ff80cSmrg
15376fae4e5dSmrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
15386fae4e5dSmrg# ---------------------------------------------------
15396fae4e5dSmrgm4_define([lt_decl_dquote_varnames],
15406fae4e5dSmrg[_lt_decl_filter([value], [2], $@)])
15419c9ff80cSmrg
15429c9ff80cSmrg
15436fae4e5dSmrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
15446fae4e5dSmrg# ---------------------------------------------------
15456fae4e5dSmrgm4_define([lt_decl_varnames_tagged],
15466fae4e5dSmrg[m4_assert([$# <= 2])dnl
15476fae4e5dSmrg_$0(m4_quote(m4_default([$1], [[, ]])),
15486fae4e5dSmrg    m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
15496fae4e5dSmrg    m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
15506fae4e5dSmrgm4_define([_lt_decl_varnames_tagged],
15516fae4e5dSmrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
15529c9ff80cSmrg
15539c9ff80cSmrg
15546fae4e5dSmrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
15556fae4e5dSmrg# ------------------------------------------------
15566fae4e5dSmrgm4_define([lt_decl_all_varnames],
15576fae4e5dSmrg[_$0(m4_quote(m4_default([$1], [[, ]])),
15586fae4e5dSmrg     m4_if([$2], [],
15596fae4e5dSmrg	   m4_quote(lt_decl_varnames),
15606fae4e5dSmrg	m4_quote(m4_shift($@))))[]dnl
15616fae4e5dSmrg])
15626fae4e5dSmrgm4_define([_lt_decl_all_varnames],
15636fae4e5dSmrg[lt_join($@, lt_decl_varnames_tagged([$1],
15646fae4e5dSmrg			lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
15656fae4e5dSmrg])
15669c9ff80cSmrg
15679c9ff80cSmrg
15686fae4e5dSmrg# _LT_CONFIG_STATUS_DECLARE([VARNAME])
15696fae4e5dSmrg# ------------------------------------
15706fae4e5dSmrg# Quote a variable value, and forward it to `config.status' so that its
15716fae4e5dSmrg# declaration there will have the same value as in `configure'.  VARNAME
15726fae4e5dSmrg# must have a single quote delimited value for this to work.
15736fae4e5dSmrgm4_define([_LT_CONFIG_STATUS_DECLARE],
15746fae4e5dSmrg[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
15759c9ff80cSmrg
15769c9ff80cSmrg
15776fae4e5dSmrg# _LT_CONFIG_STATUS_DECLARATIONS
15786fae4e5dSmrg# ------------------------------
15796fae4e5dSmrg# We delimit libtool config variables with single quotes, so when
15806fae4e5dSmrg# we write them to config.status, we have to be sure to quote all
15816fae4e5dSmrg# embedded single quotes properly.  In configure, this macro expands
15826fae4e5dSmrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
15839c9ff80cSmrg#
15846fae4e5dSmrg#    <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
15856fae4e5dSmrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
15866fae4e5dSmrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
15876fae4e5dSmrg    [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
15886fae4e5dSmrg
15896fae4e5dSmrg
15906fae4e5dSmrg# _LT_LIBTOOL_TAGS
15916fae4e5dSmrg# ----------------
15926fae4e5dSmrg# Output comment and list of tags supported by the script
15936fae4e5dSmrgm4_defun([_LT_LIBTOOL_TAGS],
15946fae4e5dSmrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
15956fae4e5dSmrgavailable_tags="_LT_TAGS"dnl
15969c9ff80cSmrg])
15979c9ff80cSmrg
15989c9ff80cSmrg
15996fae4e5dSmrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
16006fae4e5dSmrg# -----------------------------------
16016fae4e5dSmrg# Extract the dictionary values for VARNAME (optionally with TAG) and
16026fae4e5dSmrg# expand to a commented shell variable setting:
16036fae4e5dSmrg#
16046fae4e5dSmrg#    # Some comment about what VAR is for.
16056fae4e5dSmrg#    visible_name=$lt_internal_name
16066fae4e5dSmrgm4_define([_LT_LIBTOOL_DECLARE],
16076fae4e5dSmrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
16086fae4e5dSmrg					   [description])))[]dnl
16096fae4e5dSmrgm4_pushdef([_libtool_name],
16106fae4e5dSmrg    m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
16116fae4e5dSmrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
16126fae4e5dSmrg    [0], [_libtool_name=[$]$1],
16136fae4e5dSmrg    [1], [_libtool_name=$lt_[]$1],
16146fae4e5dSmrg    [2], [_libtool_name=$lt_[]$1],
16156fae4e5dSmrg    [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
16166fae4e5dSmrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
16176fae4e5dSmrg])
16189c9ff80cSmrg
16199c9ff80cSmrg
16206fae4e5dSmrg# _LT_LIBTOOL_CONFIG_VARS
16216fae4e5dSmrg# -----------------------
16226fae4e5dSmrg# Produce commented declarations of non-tagged libtool config variables
16236fae4e5dSmrg# suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
16246fae4e5dSmrg# script.  Tagged libtool config variables (even for the LIBTOOL CONFIG
16256fae4e5dSmrg# section) are produced by _LT_LIBTOOL_TAG_VARS.
16266fae4e5dSmrgm4_defun([_LT_LIBTOOL_CONFIG_VARS],
16276fae4e5dSmrg[m4_foreach([_lt_var],
16286fae4e5dSmrg    m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
16296fae4e5dSmrg    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
16309c9ff80cSmrg
16319c9ff80cSmrg
16326fae4e5dSmrg# _LT_LIBTOOL_TAG_VARS(TAG)
16336fae4e5dSmrg# -------------------------
16346fae4e5dSmrgm4_define([_LT_LIBTOOL_TAG_VARS],
16356fae4e5dSmrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
16366fae4e5dSmrg    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
16379c9ff80cSmrg
16389c9ff80cSmrg
16396fae4e5dSmrg# _LT_TAGVAR(VARNAME, [TAGNAME])
16406fae4e5dSmrg# ------------------------------
16416fae4e5dSmrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
16429c9ff80cSmrg
16439c9ff80cSmrg
16446fae4e5dSmrg# _LT_CONFIG_COMMANDS
16456fae4e5dSmrg# -------------------
16466fae4e5dSmrg# Send accumulated output to $CONFIG_STATUS.  Thanks to the lists of
16476fae4e5dSmrg# variables for single and double quote escaping we saved from calls
16486fae4e5dSmrg# to _LT_DECL, we can put quote escaped variables declarations
16496fae4e5dSmrg# into `config.status', and then the shell code to quote escape them in
16506fae4e5dSmrg# for loops in `config.status'.  Finally, any additional code accumulated
16516fae4e5dSmrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
16526fae4e5dSmrgm4_defun([_LT_CONFIG_COMMANDS],
16536fae4e5dSmrg[AC_PROVIDE_IFELSE([LT_OUTPUT],
16546fae4e5dSmrg	dnl If the libtool generation code has been placed in $CONFIG_LT,
16556fae4e5dSmrg	dnl instead of duplicating it all over again into config.status,
16566fae4e5dSmrg	dnl then we will have config.status run $CONFIG_LT later, so it
16576fae4e5dSmrg	dnl needs to know what name is stored there:
16586fae4e5dSmrg        [AC_CONFIG_COMMANDS([libtool],
16596fae4e5dSmrg            [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
16606fae4e5dSmrg    dnl If the libtool generation code is destined for config.status,
16616fae4e5dSmrg    dnl expand the accumulated commands and init code now:
16626fae4e5dSmrg    [AC_CONFIG_COMMANDS([libtool],
16636fae4e5dSmrg        [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
16646fae4e5dSmrg])#_LT_CONFIG_COMMANDS
16659c9ff80cSmrg
16669c9ff80cSmrg
16676fae4e5dSmrg# Initialize.
16686fae4e5dSmrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
16696fae4e5dSmrg[
16709c9ff80cSmrg
16716fae4e5dSmrg# The HP-UX ksh and POSIX shell print the target directory to stdout
16726fae4e5dSmrg# if CDPATH is set.
16736fae4e5dSmrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
16749c9ff80cSmrg
16756fae4e5dSmrgsed_quote_subst='$sed_quote_subst'
16766fae4e5dSmrgdouble_quote_subst='$double_quote_subst'
16776fae4e5dSmrgdelay_variable_subst='$delay_variable_subst'
16786fae4e5dSmrg_LT_CONFIG_STATUS_DECLARATIONS
16796fae4e5dSmrgLTCC='$LTCC'
16806fae4e5dSmrgLTCFLAGS='$LTCFLAGS'
16816fae4e5dSmrgcompiler='$compiler_DEFAULT'
16829c9ff80cSmrg
16836fae4e5dSmrg# A function that is used when there is no print builtin or printf.
16846fae4e5dSmrgfunc_fallback_echo ()
16856fae4e5dSmrg{
16866fae4e5dSmrg  eval 'cat <<_LTECHO_EOF
16876fae4e5dSmrg\$[]1
16886fae4e5dSmrg_LTECHO_EOF'
16896fae4e5dSmrg}
16909c9ff80cSmrg
16916fae4e5dSmrg# Quote evaled strings.
16926fae4e5dSmrgfor var in lt_decl_all_varnames([[ \
16936fae4e5dSmrg]], lt_decl_quote_varnames); do
16946fae4e5dSmrg    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
16956fae4e5dSmrg    *[[\\\\\\\`\\"\\\$]]*)
16966fae4e5dSmrg      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
16976fae4e5dSmrg      ;;
16986fae4e5dSmrg    *)
16996fae4e5dSmrg      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
17006fae4e5dSmrg      ;;
17016fae4e5dSmrg    esac
17029c9ff80cSmrgdone
17039c9ff80cSmrg
17046fae4e5dSmrg# Double-quote double-evaled strings.
17056fae4e5dSmrgfor var in lt_decl_all_varnames([[ \
17066fae4e5dSmrg]], lt_decl_dquote_varnames); do
17076fae4e5dSmrg    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
17086fae4e5dSmrg    *[[\\\\\\\`\\"\\\$]]*)
17096fae4e5dSmrg      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
17106fae4e5dSmrg      ;;
17116fae4e5dSmrg    *)
17126fae4e5dSmrg      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
17136fae4e5dSmrg      ;;
17146fae4e5dSmrg    esac
17156fae4e5dSmrgdone
17169c9ff80cSmrg
17176fae4e5dSmrg_LT_OUTPUT_LIBTOOL_INIT
17186fae4e5dSmrg])
17199c9ff80cSmrg
17206fae4e5dSmrg# _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
17216fae4e5dSmrg# ------------------------------------
17226fae4e5dSmrg# Generate a child script FILE with all initialization necessary to
17236fae4e5dSmrg# reuse the environment learned by the parent script, and make the
17246fae4e5dSmrg# file executable.  If COMMENT is supplied, it is inserted after the
17256fae4e5dSmrg# `#!' sequence but before initialization text begins.  After this
17266fae4e5dSmrg# macro, additional text can be appended to FILE to form the body of
17276fae4e5dSmrg# the child script.  The macro ends with non-zero status if the
17286fae4e5dSmrg# file could not be fully written (such as if the disk is full).
17296fae4e5dSmrgm4_ifdef([AS_INIT_GENERATED],
17306fae4e5dSmrg[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
17316fae4e5dSmrg[m4_defun([_LT_GENERATED_FILE_INIT],
17326fae4e5dSmrg[m4_require([AS_PREPARE])]dnl
17336fae4e5dSmrg[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
17346fae4e5dSmrg[lt_write_fail=0
17356fae4e5dSmrgcat >$1 <<_ASEOF || lt_write_fail=1
17366fae4e5dSmrg#! $SHELL
17376fae4e5dSmrg# Generated by $as_me.
17386fae4e5dSmrg$2
17396fae4e5dSmrgSHELL=\${CONFIG_SHELL-$SHELL}
17406fae4e5dSmrgexport SHELL
17416fae4e5dSmrg_ASEOF
17426fae4e5dSmrgcat >>$1 <<\_ASEOF || lt_write_fail=1
17436fae4e5dSmrgAS_SHELL_SANITIZE
17446fae4e5dSmrg_AS_PREPARE
17456fae4e5dSmrgexec AS_MESSAGE_FD>&1
17466fae4e5dSmrg_ASEOF
17476fae4e5dSmrgtest $lt_write_fail = 0 && chmod +x $1[]dnl
17486fae4e5dSmrgm4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
17491f0ac6a5Smrg
17506fae4e5dSmrg# LT_OUTPUT
17516fae4e5dSmrg# ---------
17526fae4e5dSmrg# This macro allows early generation of the libtool script (before
17536fae4e5dSmrg# AC_OUTPUT is called), incase it is used in configure for compilation
17546fae4e5dSmrg# tests.
17556fae4e5dSmrgAC_DEFUN([LT_OUTPUT],
17566fae4e5dSmrg[: ${CONFIG_LT=./config.lt}
17576fae4e5dSmrgAC_MSG_NOTICE([creating $CONFIG_LT])
17586fae4e5dSmrg_LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
17596fae4e5dSmrg[# Run this file to recreate a libtool stub with the current configuration.])
17601f0ac6a5Smrg
17616fae4e5dSmrgcat >>"$CONFIG_LT" <<\_LTEOF
17626fae4e5dSmrglt_cl_silent=false
17636fae4e5dSmrgexec AS_MESSAGE_LOG_FD>>config.log
17646fae4e5dSmrg{
17656fae4e5dSmrg  echo
17666fae4e5dSmrg  AS_BOX([Running $as_me.])
17676fae4e5dSmrg} >&AS_MESSAGE_LOG_FD
17681f0ac6a5Smrg
17696fae4e5dSmrglt_cl_help="\
17706fae4e5dSmrg\`$as_me' creates a local libtool stub from the current configuration,
17716fae4e5dSmrgfor use in further configure time tests before the real libtool is
17726fae4e5dSmrggenerated.
17731f0ac6a5Smrg
17746fae4e5dSmrgUsage: $[0] [[OPTIONS]]
17751f0ac6a5Smrg
17766fae4e5dSmrg  -h, --help      print this help, then exit
17776fae4e5dSmrg  -V, --version   print version number, then exit
17786fae4e5dSmrg  -q, --quiet     do not print progress messages
17796fae4e5dSmrg  -d, --debug     don't remove temporary files
17801f0ac6a5Smrg
17816fae4e5dSmrgReport bugs to <bug-libtool@gnu.org>."
17829c9ff80cSmrg
17836fae4e5dSmrglt_cl_version="\
17846fae4e5dSmrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
17856fae4e5dSmrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
17866fae4e5dSmrgconfigured by $[0], generated by m4_PACKAGE_STRING.
17871f0ac6a5Smrg
178889c04b6cSmrgCopyright (C) 2011 Free Software Foundation, Inc.
17896fae4e5dSmrgThis config.lt script is free software; the Free Software Foundation
17906fae4e5dSmrggives unlimited permision to copy, distribute and modify it."
17911f0ac6a5Smrg
17926fae4e5dSmrgwhile test $[#] != 0
17936fae4e5dSmrgdo
17946fae4e5dSmrg  case $[1] in
17956fae4e5dSmrg    --version | --v* | -V )
17966fae4e5dSmrg      echo "$lt_cl_version"; exit 0 ;;
17976fae4e5dSmrg    --help | --h* | -h )
17986fae4e5dSmrg      echo "$lt_cl_help"; exit 0 ;;
17996fae4e5dSmrg    --debug | --d* | -d )
18006fae4e5dSmrg      debug=: ;;
18016fae4e5dSmrg    --quiet | --q* | --silent | --s* | -q )
18026fae4e5dSmrg      lt_cl_silent=: ;;
18031f0ac6a5Smrg
18046fae4e5dSmrg    -*) AC_MSG_ERROR([unrecognized option: $[1]
18056fae4e5dSmrgTry \`$[0] --help' for more information.]) ;;
18061f0ac6a5Smrg
18076fae4e5dSmrg    *) AC_MSG_ERROR([unrecognized argument: $[1]
18086fae4e5dSmrgTry \`$[0] --help' for more information.]) ;;
18096fae4e5dSmrg  esac
18106fae4e5dSmrg  shift
18116fae4e5dSmrgdone
18121f0ac6a5Smrg
18136fae4e5dSmrgif $lt_cl_silent; then
18146fae4e5dSmrg  exec AS_MESSAGE_FD>/dev/null
18156fae4e5dSmrgfi
18166fae4e5dSmrg_LTEOF
18171f0ac6a5Smrg
18186fae4e5dSmrgcat >>"$CONFIG_LT" <<_LTEOF
18196fae4e5dSmrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
18206fae4e5dSmrg_LTEOF
18211f0ac6a5Smrg
18226fae4e5dSmrgcat >>"$CONFIG_LT" <<\_LTEOF
18236fae4e5dSmrgAC_MSG_NOTICE([creating $ofile])
18246fae4e5dSmrg_LT_OUTPUT_LIBTOOL_COMMANDS
18256fae4e5dSmrgAS_EXIT(0)
18266fae4e5dSmrg_LTEOF
18276fae4e5dSmrgchmod +x "$CONFIG_LT"
18281f0ac6a5Smrg
18296fae4e5dSmrg# configure is writing to config.log, but config.lt does its own redirection,
18306fae4e5dSmrg# appending to config.log, which fails on DOS, as config.log is still kept
18316fae4e5dSmrg# open by configure.  Here we exec the FD to /dev/null, effectively closing
18326fae4e5dSmrg# config.log, so it can be properly (re)opened and appended to by config.lt.
18336fae4e5dSmrglt_cl_success=:
18346fae4e5dSmrgtest "$silent" = yes &&
18356fae4e5dSmrg  lt_config_lt_args="$lt_config_lt_args --quiet"
18366fae4e5dSmrgexec AS_MESSAGE_LOG_FD>/dev/null
18376fae4e5dSmrg$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
18386fae4e5dSmrgexec AS_MESSAGE_LOG_FD>>config.log
18396fae4e5dSmrg$lt_cl_success || AS_EXIT(1)
18406fae4e5dSmrg])# LT_OUTPUT
1841e5410a46Smrg
18421f0ac6a5Smrg
18436fae4e5dSmrg# _LT_CONFIG(TAG)
18449c9ff80cSmrg# ---------------
18456fae4e5dSmrg# If TAG is the built-in tag, create an initial libtool script with a
18466fae4e5dSmrg# default configuration from the untagged config vars.  Otherwise add code
18476fae4e5dSmrg# to config.status for appending the configuration named by TAG from the
18486fae4e5dSmrg# matching tagged config vars.
18496fae4e5dSmrgm4_defun([_LT_CONFIG],
18506fae4e5dSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
18516fae4e5dSmrg_LT_CONFIG_SAVE_COMMANDS([
18526fae4e5dSmrg  m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
18536fae4e5dSmrg  m4_if(_LT_TAG, [C], [
18546fae4e5dSmrg    # See if we are running on zsh, and set the options which allow our
18556fae4e5dSmrg    # commands through without removal of \ escapes.
18566fae4e5dSmrg    if test -n "${ZSH_VERSION+set}" ; then
18576fae4e5dSmrg      setopt NO_GLOB_SUBST
18586fae4e5dSmrg    fi
18591f0ac6a5Smrg
18606fae4e5dSmrg    cfgfile="${ofile}T"
18616fae4e5dSmrg    trap "$RM \"$cfgfile\"; exit 1" 1 2 15
18626fae4e5dSmrg    $RM "$cfgfile"
18631f0ac6a5Smrg
18646fae4e5dSmrg    cat <<_LT_EOF >> "$cfgfile"
18656fae4e5dSmrg#! $SHELL
18661f0ac6a5Smrg
18676fae4e5dSmrg# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
18686fae4e5dSmrg# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
18696fae4e5dSmrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
18706fae4e5dSmrg# NOTE: Changes made to this file will be lost: look at ltmain.sh.
18716fae4e5dSmrg#
18726fae4e5dSmrg_LT_COPYING
18736fae4e5dSmrg_LT_LIBTOOL_TAGS
18741f0ac6a5Smrg
18756fae4e5dSmrg# ### BEGIN LIBTOOL CONFIG
18766fae4e5dSmrg_LT_LIBTOOL_CONFIG_VARS
18776fae4e5dSmrg_LT_LIBTOOL_TAG_VARS
18786fae4e5dSmrg# ### END LIBTOOL CONFIG
18791f0ac6a5Smrg
18806fae4e5dSmrg_LT_EOF
18811f0ac6a5Smrg
18826fae4e5dSmrg  case $host_os in
18836fae4e5dSmrg  aix3*)
18846fae4e5dSmrg    cat <<\_LT_EOF >> "$cfgfile"
18856fae4e5dSmrg# AIX sometimes has problems with the GCC collect2 program.  For some
18866fae4e5dSmrg# reason, if we set the COLLECT_NAMES environment variable, the problems
18876fae4e5dSmrg# vanish in a puff of smoke.
18886fae4e5dSmrgif test "X${COLLECT_NAMES+set}" != Xset; then
18896fae4e5dSmrg  COLLECT_NAMES=
18906fae4e5dSmrg  export COLLECT_NAMES
18916fae4e5dSmrgfi
18926fae4e5dSmrg_LT_EOF
18936fae4e5dSmrg    ;;
18946fae4e5dSmrg  esac
18951f0ac6a5Smrg
18966fae4e5dSmrg  _LT_PROG_LTMAIN
18971f0ac6a5Smrg
18986fae4e5dSmrg  # We use sed instead of cat because bash on DJGPP gets confused if
18996fae4e5dSmrg  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
19006fae4e5dSmrg  # text mode, it properly converts lines to CR/LF.  This bash problem
19016fae4e5dSmrg  # is reportedly fixed, but why not run on old versions too?
19026fae4e5dSmrg  sed '$q' "$ltmain" >> "$cfgfile" \
19036fae4e5dSmrg     || (rm -f "$cfgfile"; exit 1)
19049c9ff80cSmrg
19056fae4e5dSmrg  _LT_PROG_REPLACE_SHELLFNS
19069c9ff80cSmrg
19076fae4e5dSmrg   mv -f "$cfgfile" "$ofile" ||
19086fae4e5dSmrg    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
19096fae4e5dSmrg  chmod +x "$ofile"
19106fae4e5dSmrg],
19116fae4e5dSmrg[cat <<_LT_EOF >> "$ofile"
19129c9ff80cSmrg
19136fae4e5dSmrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
19146fae4e5dSmrgdnl in a comment (ie after a #).
19156fae4e5dSmrg# ### BEGIN LIBTOOL TAG CONFIG: $1
19166fae4e5dSmrg_LT_LIBTOOL_TAG_VARS(_LT_TAG)
19176fae4e5dSmrg# ### END LIBTOOL TAG CONFIG: $1
19186fae4e5dSmrg_LT_EOF
19196fae4e5dSmrg])dnl /m4_if
19206fae4e5dSmrg],
19216fae4e5dSmrg[m4_if([$1], [], [
19226fae4e5dSmrg    PACKAGE='$PACKAGE'
19236fae4e5dSmrg    VERSION='$VERSION'
19246fae4e5dSmrg    TIMESTAMP='$TIMESTAMP'
19256fae4e5dSmrg    RM='$RM'
19266fae4e5dSmrg    ofile='$ofile'], [])
19276fae4e5dSmrg])dnl /_LT_CONFIG_SAVE_COMMANDS
19286fae4e5dSmrg])# _LT_CONFIG
19299c9ff80cSmrg
19309c9ff80cSmrg
19316fae4e5dSmrg# LT_SUPPORTED_TAG(TAG)
19326fae4e5dSmrg# ---------------------
19336fae4e5dSmrg# Trace this macro to discover what tags are supported by the libtool
19346fae4e5dSmrg# --tag option, using:
19356fae4e5dSmrg#    autoconf --trace 'LT_SUPPORTED_TAG:$1'
19366fae4e5dSmrgAC_DEFUN([LT_SUPPORTED_TAG], [])
19379c9ff80cSmrg
19389c9ff80cSmrg
19396fae4e5dSmrg# C support is built-in for now
19406fae4e5dSmrgm4_define([_LT_LANG_C_enabled], [])
19416fae4e5dSmrgm4_define([_LT_TAGS], [])
19429c9ff80cSmrg
19431f0ac6a5Smrg
19446fae4e5dSmrg# LT_LANG(LANG)
19456fae4e5dSmrg# -------------
19466fae4e5dSmrg# Enable libtool support for the given language if not already enabled.
19476fae4e5dSmrgAC_DEFUN([LT_LANG],
19486fae4e5dSmrg[AC_BEFORE([$0], [LT_OUTPUT])dnl
19496fae4e5dSmrgm4_case([$1],
19506fae4e5dSmrg  [C],			[_LT_LANG(C)],
19516fae4e5dSmrg  [C++],		[_LT_LANG(CXX)],
195289c04b6cSmrg  [Go],			[_LT_LANG(GO)],
19536fae4e5dSmrg  [Java],		[_LT_LANG(GCJ)],
19546fae4e5dSmrg  [Fortran 77],		[_LT_LANG(F77)],
19556fae4e5dSmrg  [Fortran],		[_LT_LANG(FC)],
19566fae4e5dSmrg  [Windows Resource],	[_LT_LANG(RC)],
19576fae4e5dSmrg  [m4_ifdef([_LT_LANG_]$1[_CONFIG],
19586fae4e5dSmrg    [_LT_LANG($1)],
19596fae4e5dSmrg    [m4_fatal([$0: unsupported language: "$1"])])])dnl
19606fae4e5dSmrg])# LT_LANG
19611f0ac6a5Smrg
19621f0ac6a5Smrg
19636fae4e5dSmrg# _LT_LANG(LANGNAME)
19646fae4e5dSmrg# ------------------
19656fae4e5dSmrgm4_defun([_LT_LANG],
19666fae4e5dSmrg[m4_ifdef([_LT_LANG_]$1[_enabled], [],
19676fae4e5dSmrg  [LT_SUPPORTED_TAG([$1])dnl
19686fae4e5dSmrg  m4_append([_LT_TAGS], [$1 ])dnl
19696fae4e5dSmrg  m4_define([_LT_LANG_]$1[_enabled], [])dnl
19706fae4e5dSmrg  _LT_LANG_$1_CONFIG($1)])dnl
19716fae4e5dSmrg])# _LT_LANG
19721f0ac6a5Smrg
19731f0ac6a5Smrg
197489c04b6cSmrgm4_ifndef([AC_PROG_GO], [
197589c04b6cSmrg# NOTE: This macro has been submitted for inclusion into   #
197689c04b6cSmrg#  GNU Autoconf as AC_PROG_GO.  When it is available in    #
197789c04b6cSmrg#  a released version of Autoconf we should remove this    #
197889c04b6cSmrg#  macro and use it instead.                               #
197989c04b6cSmrgm4_defun([AC_PROG_GO],
198089c04b6cSmrg[AC_LANG_PUSH(Go)dnl
198189c04b6cSmrgAC_ARG_VAR([GOC],     [Go compiler command])dnl
198289c04b6cSmrgAC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl
198389c04b6cSmrg_AC_ARG_VAR_LDFLAGS()dnl
198489c04b6cSmrgAC_CHECK_TOOL(GOC, gccgo)
198589c04b6cSmrgif test -z "$GOC"; then
198689c04b6cSmrg  if test -n "$ac_tool_prefix"; then
198789c04b6cSmrg    AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo])
198889c04b6cSmrg  fi
198989c04b6cSmrgfi
199089c04b6cSmrgif test -z "$GOC"; then
199189c04b6cSmrg  AC_CHECK_PROG(GOC, gccgo, gccgo, false)
199289c04b6cSmrgfi
199389c04b6cSmrg])#m4_defun
199489c04b6cSmrg])#m4_ifndef
199589c04b6cSmrg
199689c04b6cSmrg
19976fae4e5dSmrg# _LT_LANG_DEFAULT_CONFIG
19986fae4e5dSmrg# -----------------------
19996fae4e5dSmrgm4_defun([_LT_LANG_DEFAULT_CONFIG],
20006fae4e5dSmrg[AC_PROVIDE_IFELSE([AC_PROG_CXX],
20016fae4e5dSmrg  [LT_LANG(CXX)],
20026fae4e5dSmrg  [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
2003e5410a46Smrg
20046fae4e5dSmrgAC_PROVIDE_IFELSE([AC_PROG_F77],
20056fae4e5dSmrg  [LT_LANG(F77)],
20066fae4e5dSmrg  [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
20071f0ac6a5Smrg
20086fae4e5dSmrgAC_PROVIDE_IFELSE([AC_PROG_FC],
20096fae4e5dSmrg  [LT_LANG(FC)],
20106fae4e5dSmrg  [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
20111f0ac6a5Smrg
20126fae4e5dSmrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
20136fae4e5dSmrgdnl pulling things in needlessly.
20146fae4e5dSmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ],
20156fae4e5dSmrg  [LT_LANG(GCJ)],
20166fae4e5dSmrg  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
20176fae4e5dSmrg    [LT_LANG(GCJ)],
20186fae4e5dSmrg    [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
20196fae4e5dSmrg      [LT_LANG(GCJ)],
20206fae4e5dSmrg      [m4_ifdef([AC_PROG_GCJ],
20216fae4e5dSmrg	[m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
20226fae4e5dSmrg       m4_ifdef([A][M_PROG_GCJ],
20236fae4e5dSmrg	[m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
20246fae4e5dSmrg       m4_ifdef([LT_PROG_GCJ],
20256fae4e5dSmrg	[m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
20269c9ff80cSmrg
202789c04b6cSmrgAC_PROVIDE_IFELSE([AC_PROG_GO],
202889c04b6cSmrg  [LT_LANG(GO)],
202989c04b6cSmrg  [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])])
203089c04b6cSmrg
20316fae4e5dSmrgAC_PROVIDE_IFELSE([LT_PROG_RC],
20326fae4e5dSmrg  [LT_LANG(RC)],
20336fae4e5dSmrg  [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
20346fae4e5dSmrg])# _LT_LANG_DEFAULT_CONFIG
20359c9ff80cSmrg
20366fae4e5dSmrg# Obsolete macros:
20376fae4e5dSmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
20386fae4e5dSmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
20396fae4e5dSmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
20406fae4e5dSmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
20416fae4e5dSmrgAU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
20426fae4e5dSmrgdnl aclocal-1.4 backwards compatibility:
20436fae4e5dSmrgdnl AC_DEFUN([AC_LIBTOOL_CXX], [])
20446fae4e5dSmrgdnl AC_DEFUN([AC_LIBTOOL_F77], [])
20456fae4e5dSmrgdnl AC_DEFUN([AC_LIBTOOL_FC], [])
20466fae4e5dSmrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
20476fae4e5dSmrgdnl AC_DEFUN([AC_LIBTOOL_RC], [])
20489c9ff80cSmrg
20499c9ff80cSmrg
20506fae4e5dSmrg# _LT_TAG_COMPILER
20516fae4e5dSmrg# ----------------
20526fae4e5dSmrgm4_defun([_LT_TAG_COMPILER],
20536fae4e5dSmrg[AC_REQUIRE([AC_PROG_CC])dnl
20549c9ff80cSmrg
20556fae4e5dSmrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
20566fae4e5dSmrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
20576fae4e5dSmrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
20586fae4e5dSmrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
20599c9ff80cSmrg
20606fae4e5dSmrg# If no C compiler was specified, use CC.
20616fae4e5dSmrgLTCC=${LTCC-"$CC"}
20629c9ff80cSmrg
20636fae4e5dSmrg# If no C compiler flags were specified, use CFLAGS.
20646fae4e5dSmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"}
20659c9ff80cSmrg
20666fae4e5dSmrg# Allow CC to be a program name with arguments.
20676fae4e5dSmrgcompiler=$CC
20686fae4e5dSmrg])# _LT_TAG_COMPILER
20699c9ff80cSmrg
20709c9ff80cSmrg
20716fae4e5dSmrg# _LT_COMPILER_BOILERPLATE
20726fae4e5dSmrg# ------------------------
20736fae4e5dSmrg# Check for compiler boilerplate output or warnings with
20746fae4e5dSmrg# the simple compiler test code.
20756fae4e5dSmrgm4_defun([_LT_COMPILER_BOILERPLATE],
20766fae4e5dSmrg[m4_require([_LT_DECL_SED])dnl
20776fae4e5dSmrgac_outfile=conftest.$ac_objext
20786fae4e5dSmrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext
20796fae4e5dSmrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
20806fae4e5dSmrg_lt_compiler_boilerplate=`cat conftest.err`
20816fae4e5dSmrg$RM conftest*
20826fae4e5dSmrg])# _LT_COMPILER_BOILERPLATE
20839c9ff80cSmrg
20849c9ff80cSmrg
20856fae4e5dSmrg# _LT_LINKER_BOILERPLATE
20866fae4e5dSmrg# ----------------------
20876fae4e5dSmrg# Check for linker boilerplate output or warnings with
20886fae4e5dSmrg# the simple link test code.
20896fae4e5dSmrgm4_defun([_LT_LINKER_BOILERPLATE],
20906fae4e5dSmrg[m4_require([_LT_DECL_SED])dnl
20916fae4e5dSmrgac_outfile=conftest.$ac_objext
20926fae4e5dSmrgecho "$lt_simple_link_test_code" >conftest.$ac_ext
20936fae4e5dSmrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
20946fae4e5dSmrg_lt_linker_boilerplate=`cat conftest.err`
20956fae4e5dSmrg$RM -r conftest*
20966fae4e5dSmrg])# _LT_LINKER_BOILERPLATE
20979c9ff80cSmrg
20986fae4e5dSmrg# _LT_REQUIRED_DARWIN_CHECKS
20996fae4e5dSmrg# -------------------------
21006fae4e5dSmrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
21016fae4e5dSmrg  case $host_os in
21026fae4e5dSmrg    rhapsody* | darwin*)
21036fae4e5dSmrg    AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
21046fae4e5dSmrg    AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
21056fae4e5dSmrg    AC_CHECK_TOOL([LIPO], [lipo], [:])
21066fae4e5dSmrg    AC_CHECK_TOOL([OTOOL], [otool], [:])
21076fae4e5dSmrg    AC_CHECK_TOOL([OTOOL64], [otool64], [:])
21086fae4e5dSmrg    _LT_DECL([], [DSYMUTIL], [1],
21096fae4e5dSmrg      [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
21106fae4e5dSmrg    _LT_DECL([], [NMEDIT], [1],
21116fae4e5dSmrg      [Tool to change global to local symbols on Mac OS X])
21126fae4e5dSmrg    _LT_DECL([], [LIPO], [1],
21136fae4e5dSmrg      [Tool to manipulate fat objects and archives on Mac OS X])
21146fae4e5dSmrg    _LT_DECL([], [OTOOL], [1],
21156fae4e5dSmrg      [ldd/readelf like tool for Mach-O binaries on Mac OS X])
21166fae4e5dSmrg    _LT_DECL([], [OTOOL64], [1],
21176fae4e5dSmrg      [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
21189c9ff80cSmrg
21196fae4e5dSmrg    AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
21206fae4e5dSmrg      [lt_cv_apple_cc_single_mod=no
21216fae4e5dSmrg      if test -z "${LT_MULTI_MODULE}"; then
21226fae4e5dSmrg	# By default we will add the -single_module flag. You can override
21236fae4e5dSmrg	# by either setting the environment variable LT_MULTI_MODULE
21246fae4e5dSmrg	# non-empty at configure time, or by adding -multi_module to the
21256fae4e5dSmrg	# link flags.
21266fae4e5dSmrg	rm -rf libconftest.dylib*
21276fae4e5dSmrg	echo "int foo(void){return 1;}" > conftest.c
21286fae4e5dSmrg	echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
21296fae4e5dSmrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
21306fae4e5dSmrg	$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
21316fae4e5dSmrg	  -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
21326fae4e5dSmrg        _lt_result=$?
213389c04b6cSmrg	# If there is a non-empty error log, and "single_module"
213489c04b6cSmrg	# appears in it, assume the flag caused a linker warning
213589c04b6cSmrg        if test -s conftest.err && $GREP single_module conftest.err; then
213689c04b6cSmrg	  cat conftest.err >&AS_MESSAGE_LOG_FD
213789c04b6cSmrg	# Otherwise, if the output was created with a 0 exit code from
213889c04b6cSmrg	# the compiler, it worked.
213989c04b6cSmrg	elif test -f libconftest.dylib && test $_lt_result -eq 0; then
21406fae4e5dSmrg	  lt_cv_apple_cc_single_mod=yes
21416fae4e5dSmrg	else
21426fae4e5dSmrg	  cat conftest.err >&AS_MESSAGE_LOG_FD
21436fae4e5dSmrg	fi
21446fae4e5dSmrg	rm -rf libconftest.dylib*
21456fae4e5dSmrg	rm -f conftest.*
21466fae4e5dSmrg      fi])
214789c04b6cSmrg
21486fae4e5dSmrg    AC_CACHE_CHECK([for -exported_symbols_list linker flag],
21496fae4e5dSmrg      [lt_cv_ld_exported_symbols_list],
21506fae4e5dSmrg      [lt_cv_ld_exported_symbols_list=no
21516fae4e5dSmrg      save_LDFLAGS=$LDFLAGS
21526fae4e5dSmrg      echo "_main" > conftest.sym
21536fae4e5dSmrg      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
21546fae4e5dSmrg      AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
21556fae4e5dSmrg	[lt_cv_ld_exported_symbols_list=yes],
21566fae4e5dSmrg	[lt_cv_ld_exported_symbols_list=no])
21576fae4e5dSmrg	LDFLAGS="$save_LDFLAGS"
21586fae4e5dSmrg    ])
215989c04b6cSmrg
21606fae4e5dSmrg    AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
21616fae4e5dSmrg      [lt_cv_ld_force_load=no
21626fae4e5dSmrg      cat > conftest.c << _LT_EOF
21636fae4e5dSmrgint forced_loaded() { return 2;}
21646fae4e5dSmrg_LT_EOF
21656fae4e5dSmrg      echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
21666fae4e5dSmrg      $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
21676fae4e5dSmrg      echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
21686fae4e5dSmrg      $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
21696fae4e5dSmrg      echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
21706fae4e5dSmrg      $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
21716fae4e5dSmrg      cat > conftest.c << _LT_EOF
21726fae4e5dSmrgint main() { return 0;}
21736fae4e5dSmrg_LT_EOF
21746fae4e5dSmrg      echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
21756fae4e5dSmrg      $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
21766fae4e5dSmrg      _lt_result=$?
217789c04b6cSmrg      if test -s conftest.err && $GREP force_load conftest.err; then
217889c04b6cSmrg	cat conftest.err >&AS_MESSAGE_LOG_FD
217989c04b6cSmrg      elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then
21806fae4e5dSmrg	lt_cv_ld_force_load=yes
21816fae4e5dSmrg      else
21826fae4e5dSmrg	cat conftest.err >&AS_MESSAGE_LOG_FD
21836fae4e5dSmrg      fi
21846fae4e5dSmrg        rm -f conftest.err libconftest.a conftest conftest.c
21856fae4e5dSmrg        rm -rf conftest.dSYM
21866fae4e5dSmrg    ])
21876fae4e5dSmrg    case $host_os in
21886fae4e5dSmrg    rhapsody* | darwin1.[[012]])
21896fae4e5dSmrg      _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
21906fae4e5dSmrg    darwin1.*)
21916fae4e5dSmrg      _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
21926fae4e5dSmrg    darwin*) # darwin 5.x on
21936fae4e5dSmrg      # if running on 10.5 or later, the deployment target defaults
21946fae4e5dSmrg      # to the OS version, if on x86, and 10.4, the deployment
21956fae4e5dSmrg      # target defaults to 10.4. Don't you love it?
21966fae4e5dSmrg      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
21976fae4e5dSmrg	10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
21986fae4e5dSmrg	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
21996fae4e5dSmrg	10.[[012]]*)
22006fae4e5dSmrg	  _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
22016fae4e5dSmrg	10.*)
22026fae4e5dSmrg	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
22036fae4e5dSmrg      esac
22046fae4e5dSmrg    ;;
22056fae4e5dSmrg  esac
22066fae4e5dSmrg    if test "$lt_cv_apple_cc_single_mod" = "yes"; then
22076fae4e5dSmrg      _lt_dar_single_mod='$single_module'
22086fae4e5dSmrg    fi
22096fae4e5dSmrg    if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
22106fae4e5dSmrg      _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
22116fae4e5dSmrg    else
22126fae4e5dSmrg      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
22136fae4e5dSmrg    fi
22146fae4e5dSmrg    if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
22156fae4e5dSmrg      _lt_dsymutil='~$DSYMUTIL $lib || :'
22166fae4e5dSmrg    else
22176fae4e5dSmrg      _lt_dsymutil=
22186fae4e5dSmrg    fi
22196fae4e5dSmrg    ;;
22206fae4e5dSmrg  esac
22219c9ff80cSmrg])
22229c9ff80cSmrg
22239c9ff80cSmrg
222489c04b6cSmrg# _LT_DARWIN_LINKER_FEATURES([TAG])
222589c04b6cSmrg# ---------------------------------
22266fae4e5dSmrg# Checks for linker and compiler features on darwin
22276fae4e5dSmrgm4_defun([_LT_DARWIN_LINKER_FEATURES],
22286fae4e5dSmrg[
22296fae4e5dSmrg  m4_require([_LT_REQUIRED_DARWIN_CHECKS])
22306fae4e5dSmrg  _LT_TAGVAR(archive_cmds_need_lc, $1)=no
22316fae4e5dSmrg  _LT_TAGVAR(hardcode_direct, $1)=no
22326fae4e5dSmrg  _LT_TAGVAR(hardcode_automatic, $1)=yes
22336fae4e5dSmrg  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
22346fae4e5dSmrg  if test "$lt_cv_ld_force_load" = "yes"; then
22356fae4e5dSmrg    _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\"`'
223689c04b6cSmrg    m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes],
223789c04b6cSmrg                  [FC],  [_LT_TAGVAR(compiler_needs_object, $1)=yes])
22386fae4e5dSmrg  else
22396fae4e5dSmrg    _LT_TAGVAR(whole_archive_flag_spec, $1)=''
22406fae4e5dSmrg  fi
22416fae4e5dSmrg  _LT_TAGVAR(link_all_deplibs, $1)=yes
22426fae4e5dSmrg  _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
22436fae4e5dSmrg  case $cc_basename in
22446fae4e5dSmrg     ifort*) _lt_dar_can_shared=yes ;;
22456fae4e5dSmrg     *) _lt_dar_can_shared=$GCC ;;
22466fae4e5dSmrg  esac
22476fae4e5dSmrg  if test "$_lt_dar_can_shared" = "yes"; then
22486fae4e5dSmrg    output_verbose_link_cmd=func_echo_all
22496fae4e5dSmrg    _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}"
22506fae4e5dSmrg    _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
22516fae4e5dSmrg    _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}"
22526fae4e5dSmrg    _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}"
22536fae4e5dSmrg    m4_if([$1], [CXX],
22546fae4e5dSmrg[   if test "$lt_cv_apple_cc_single_mod" != "yes"; then
22556fae4e5dSmrg      _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}"
22566fae4e5dSmrg      _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}"
22576fae4e5dSmrg    fi
22586fae4e5dSmrg],[])
22596fae4e5dSmrg  else
22606fae4e5dSmrg  _LT_TAGVAR(ld_shlibs, $1)=no
22616fae4e5dSmrg  fi
22626fae4e5dSmrg])
22639c9ff80cSmrg
22646fae4e5dSmrg# _LT_SYS_MODULE_PATH_AIX([TAGNAME])
22656fae4e5dSmrg# ----------------------------------
22666fae4e5dSmrg# Links a minimal program and checks the executable
22676fae4e5dSmrg# for the system default hardcoded library path. In most cases,
22686fae4e5dSmrg# this is /usr/lib:/lib, but when the MPI compilers are used
22696fae4e5dSmrg# the location of the communication and MPI libs are included too.
22706fae4e5dSmrg# If we don't find anything, use the default library path according
22716fae4e5dSmrg# to the aix ld manual.
22726fae4e5dSmrg# Store the results from the different compilers for each TAGNAME.
22736fae4e5dSmrg# Allow to override them for all tags through lt_cv_aix_libpath.
22746fae4e5dSmrgm4_defun([_LT_SYS_MODULE_PATH_AIX],
22756fae4e5dSmrg[m4_require([_LT_DECL_SED])dnl
22766fae4e5dSmrgif test "${lt_cv_aix_libpath+set}" = set; then
22776fae4e5dSmrg  aix_libpath=$lt_cv_aix_libpath
22786fae4e5dSmrgelse
22796fae4e5dSmrg  AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
22806fae4e5dSmrg  [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
22816fae4e5dSmrg  lt_aix_libpath_sed='[
22826fae4e5dSmrg      /Import File Strings/,/^$/ {
22836fae4e5dSmrg	  /^0/ {
22846fae4e5dSmrg	      s/^0  *\([^ ]*\) *$/\1/
22856fae4e5dSmrg	      p
22866fae4e5dSmrg	  }
22876fae4e5dSmrg      }]'
22886fae4e5dSmrg  _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
22896fae4e5dSmrg  # Check for a 64-bit object if we didn't find anything.
22906fae4e5dSmrg  if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
22916fae4e5dSmrg    _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
22926fae4e5dSmrg  fi],[])
22936fae4e5dSmrg  if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
22946fae4e5dSmrg    _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib"
22956fae4e5dSmrg  fi
22966fae4e5dSmrg  ])
22976fae4e5dSmrg  aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
22986fae4e5dSmrgfi
22996fae4e5dSmrg])# _LT_SYS_MODULE_PATH_AIX
23009c9ff80cSmrg
23019c9ff80cSmrg
23026fae4e5dSmrg# _LT_SHELL_INIT(ARG)
23039c9ff80cSmrg# -------------------
23046fae4e5dSmrgm4_define([_LT_SHELL_INIT],
23056fae4e5dSmrg[m4_divert_text([M4SH-INIT], [$1
23066fae4e5dSmrg])])# _LT_SHELL_INIT
23079c9ff80cSmrg
23089c9ff80cSmrg
23099c9ff80cSmrg
23106fae4e5dSmrg# _LT_PROG_ECHO_BACKSLASH
23116fae4e5dSmrg# -----------------------
23126fae4e5dSmrg# Find how we can fake an echo command that does not interpret backslash.
23136fae4e5dSmrg# In particular, with Autoconf 2.60 or later we add some code to the start
23146fae4e5dSmrg# of the generated configure script which will find a shell with a builtin
23156fae4e5dSmrg# printf (which we can use as an echo command).
23166fae4e5dSmrgm4_defun([_LT_PROG_ECHO_BACKSLASH],
23176fae4e5dSmrg[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
23186fae4e5dSmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
23196fae4e5dSmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
23206fae4e5dSmrg
23216fae4e5dSmrgAC_MSG_CHECKING([how to print strings])
23226fae4e5dSmrg# Test print first, because it will be a builtin if present.
23236fae4e5dSmrgif test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
23246fae4e5dSmrg   test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
23256fae4e5dSmrg  ECHO='print -r --'
23266fae4e5dSmrgelif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
23276fae4e5dSmrg  ECHO='printf %s\n'
23286fae4e5dSmrgelse
23296fae4e5dSmrg  # Use this function as a fallback that always works.
23306fae4e5dSmrg  func_fallback_echo ()
23316fae4e5dSmrg  {
23326fae4e5dSmrg    eval 'cat <<_LTECHO_EOF
23336fae4e5dSmrg$[]1
23346fae4e5dSmrg_LTECHO_EOF'
23356fae4e5dSmrg  }
23366fae4e5dSmrg  ECHO='func_fallback_echo'
23376fae4e5dSmrgfi
23389c9ff80cSmrg
23396fae4e5dSmrg# func_echo_all arg...
23406fae4e5dSmrg# Invoke $ECHO with all args, space-separated.
23416fae4e5dSmrgfunc_echo_all ()
23426fae4e5dSmrg{
23436fae4e5dSmrg    $ECHO "$*" 
23446fae4e5dSmrg}
23459c9ff80cSmrg
23466fae4e5dSmrgcase "$ECHO" in
23476fae4e5dSmrg  printf*) AC_MSG_RESULT([printf]) ;;
23486fae4e5dSmrg  print*) AC_MSG_RESULT([print -r]) ;;
23496fae4e5dSmrg  *) AC_MSG_RESULT([cat]) ;;
23509c9ff80cSmrgesac
23519c9ff80cSmrg
23526fae4e5dSmrgm4_ifdef([_AS_DETECT_SUGGESTED],
23536fae4e5dSmrg[_AS_DETECT_SUGGESTED([
23546fae4e5dSmrg  test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
23556fae4e5dSmrg    ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
23566fae4e5dSmrg    ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
23576fae4e5dSmrg    ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
23586fae4e5dSmrg    PATH=/empty FPATH=/empty; export PATH FPATH
23596fae4e5dSmrg    test "X`printf %s $ECHO`" = "X$ECHO" \
23606fae4e5dSmrg      || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
23619c9ff80cSmrg
23626fae4e5dSmrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
23636fae4e5dSmrg_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
23646fae4e5dSmrg])# _LT_PROG_ECHO_BACKSLASH
23659c9ff80cSmrg
23669c9ff80cSmrg
23676fae4e5dSmrg# _LT_WITH_SYSROOT
23686fae4e5dSmrg# ----------------
23696fae4e5dSmrgAC_DEFUN([_LT_WITH_SYSROOT],
23706fae4e5dSmrg[AC_MSG_CHECKING([for sysroot])
23716fae4e5dSmrgAC_ARG_WITH([sysroot],
23726fae4e5dSmrg[  --with-sysroot[=DIR] Search for dependent libraries within DIR
23736fae4e5dSmrg                        (or the compiler's sysroot if not specified).],
23746fae4e5dSmrg[], [with_sysroot=no])
23756fae4e5dSmrg
23766fae4e5dSmrgdnl lt_sysroot will always be passed unquoted.  We quote it here
23776fae4e5dSmrgdnl in case the user passed a directory name.
23786fae4e5dSmrglt_sysroot=
23796fae4e5dSmrgcase ${with_sysroot} in #(
23806fae4e5dSmrg yes)
23816fae4e5dSmrg   if test "$GCC" = yes; then
23826fae4e5dSmrg     lt_sysroot=`$CC --print-sysroot 2>/dev/null`
23836fae4e5dSmrg   fi
23846fae4e5dSmrg   ;; #(
23856fae4e5dSmrg /*)
23866fae4e5dSmrg   lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
23876fae4e5dSmrg   ;; #(
23886fae4e5dSmrg no|'')
23896fae4e5dSmrg   ;; #(
23906fae4e5dSmrg *)
23916fae4e5dSmrg   AC_MSG_RESULT([${with_sysroot}])
23926fae4e5dSmrg   AC_MSG_ERROR([The sysroot must be an absolute path.])
23936fae4e5dSmrg   ;;
23946fae4e5dSmrgesac
23959c9ff80cSmrg
23966fae4e5dSmrg AC_MSG_RESULT([${lt_sysroot:-no}])
23976fae4e5dSmrg_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
23986fae4e5dSmrg[dependent libraries, and in which our libraries should be installed.])])
23999c9ff80cSmrg
24006fae4e5dSmrg# _LT_ENABLE_LOCK
24016fae4e5dSmrg# ---------------
24026fae4e5dSmrgm4_defun([_LT_ENABLE_LOCK],
24036fae4e5dSmrg[AC_ARG_ENABLE([libtool-lock],
24046fae4e5dSmrg  [AS_HELP_STRING([--disable-libtool-lock],
24056fae4e5dSmrg    [avoid locking (might break parallel builds)])])
24066fae4e5dSmrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
24079c9ff80cSmrg
24086fae4e5dSmrg# Some flags need to be propagated to the compiler or linker for good
24096fae4e5dSmrg# libtool support.
24106fae4e5dSmrgcase $host in
24116fae4e5dSmrgia64-*-hpux*)
24126fae4e5dSmrg  # Find out which ABI we are using.
24136fae4e5dSmrg  echo 'int i;' > conftest.$ac_ext
24146fae4e5dSmrg  if AC_TRY_EVAL(ac_compile); then
24156fae4e5dSmrg    case `/usr/bin/file conftest.$ac_objext` in
24166fae4e5dSmrg      *ELF-32*)
24176fae4e5dSmrg	HPUX_IA64_MODE="32"
24186fae4e5dSmrg	;;
24196fae4e5dSmrg      *ELF-64*)
24206fae4e5dSmrg	HPUX_IA64_MODE="64"
24216fae4e5dSmrg	;;
24226fae4e5dSmrg    esac
24236fae4e5dSmrg  fi
24246fae4e5dSmrg  rm -rf conftest*
24256fae4e5dSmrg  ;;
24266fae4e5dSmrg*-*-irix6*)
24276fae4e5dSmrg  # Find out which ABI we are using.
24286fae4e5dSmrg  echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
24296fae4e5dSmrg  if AC_TRY_EVAL(ac_compile); then
24306fae4e5dSmrg    if test "$lt_cv_prog_gnu_ld" = yes; then
24316fae4e5dSmrg      case `/usr/bin/file conftest.$ac_objext` in
24326fae4e5dSmrg	*32-bit*)
24336fae4e5dSmrg	  LD="${LD-ld} -melf32bsmip"
24346fae4e5dSmrg	  ;;
24356fae4e5dSmrg	*N32*)
24366fae4e5dSmrg	  LD="${LD-ld} -melf32bmipn32"
24376fae4e5dSmrg	  ;;
24386fae4e5dSmrg	*64-bit*)
24396fae4e5dSmrg	  LD="${LD-ld} -melf64bmip"
24406fae4e5dSmrg	;;
24416fae4e5dSmrg      esac
24426fae4e5dSmrg    else
24436fae4e5dSmrg      case `/usr/bin/file conftest.$ac_objext` in
24446fae4e5dSmrg	*32-bit*)
24456fae4e5dSmrg	  LD="${LD-ld} -32"
24466fae4e5dSmrg	  ;;
24476fae4e5dSmrg	*N32*)
24486fae4e5dSmrg	  LD="${LD-ld} -n32"
24496fae4e5dSmrg	  ;;
24506fae4e5dSmrg	*64-bit*)
24516fae4e5dSmrg	  LD="${LD-ld} -64"
24526fae4e5dSmrg	  ;;
24536fae4e5dSmrg      esac
24546fae4e5dSmrg    fi
24556fae4e5dSmrg  fi
24566fae4e5dSmrg  rm -rf conftest*
24576fae4e5dSmrg  ;;
24589c9ff80cSmrg
24596fae4e5dSmrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
24606fae4e5dSmrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*)
24616fae4e5dSmrg  # Find out which ABI we are using.
24626fae4e5dSmrg  echo 'int i;' > conftest.$ac_ext
24636fae4e5dSmrg  if AC_TRY_EVAL(ac_compile); then
24646fae4e5dSmrg    case `/usr/bin/file conftest.o` in
24656fae4e5dSmrg      *32-bit*)
24666fae4e5dSmrg	case $host in
24676fae4e5dSmrg	  x86_64-*kfreebsd*-gnu)
24686fae4e5dSmrg	    LD="${LD-ld} -m elf_i386_fbsd"
24696fae4e5dSmrg	    ;;
24706fae4e5dSmrg	  x86_64-*linux*)
24716fae4e5dSmrg	    LD="${LD-ld} -m elf_i386"
24726fae4e5dSmrg	    ;;
24736fae4e5dSmrg	  ppc64-*linux*|powerpc64-*linux*)
24746fae4e5dSmrg	    LD="${LD-ld} -m elf32ppclinux"
24756fae4e5dSmrg	    ;;
24766fae4e5dSmrg	  s390x-*linux*)
24776fae4e5dSmrg	    LD="${LD-ld} -m elf_s390"
24786fae4e5dSmrg	    ;;
24796fae4e5dSmrg	  sparc64-*linux*)
24806fae4e5dSmrg	    LD="${LD-ld} -m elf32_sparc"
24816fae4e5dSmrg	    ;;
24826fae4e5dSmrg	esac
24836fae4e5dSmrg	;;
24846fae4e5dSmrg      *64-bit*)
24856fae4e5dSmrg	case $host in
24866fae4e5dSmrg	  x86_64-*kfreebsd*-gnu)
24876fae4e5dSmrg	    LD="${LD-ld} -m elf_x86_64_fbsd"
24886fae4e5dSmrg	    ;;
24896fae4e5dSmrg	  x86_64-*linux*)
24906fae4e5dSmrg	    LD="${LD-ld} -m elf_x86_64"
24916fae4e5dSmrg	    ;;
24926fae4e5dSmrg	  ppc*-*linux*|powerpc*-*linux*)
24936fae4e5dSmrg	    LD="${LD-ld} -m elf64ppc"
24946fae4e5dSmrg	    ;;
24956fae4e5dSmrg	  s390*-*linux*|s390*-*tpf*)
24966fae4e5dSmrg	    LD="${LD-ld} -m elf64_s390"
24976fae4e5dSmrg	    ;;
24986fae4e5dSmrg	  sparc*-*linux*)
24996fae4e5dSmrg	    LD="${LD-ld} -m elf64_sparc"
25006fae4e5dSmrg	    ;;
25016fae4e5dSmrg	esac
25026fae4e5dSmrg	;;
25036fae4e5dSmrg    esac
25046fae4e5dSmrg  fi
25056fae4e5dSmrg  rm -rf conftest*
25066fae4e5dSmrg  ;;
25079c9ff80cSmrg
25086fae4e5dSmrg*-*-sco3.2v5*)
25096fae4e5dSmrg  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
25106fae4e5dSmrg  SAVE_CFLAGS="$CFLAGS"
25116fae4e5dSmrg  CFLAGS="$CFLAGS -belf"
25126fae4e5dSmrg  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
25136fae4e5dSmrg    [AC_LANG_PUSH(C)
25146fae4e5dSmrg     AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
25156fae4e5dSmrg     AC_LANG_POP])
25166fae4e5dSmrg  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
25176fae4e5dSmrg    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
25186fae4e5dSmrg    CFLAGS="$SAVE_CFLAGS"
25196fae4e5dSmrg  fi
25206fae4e5dSmrg  ;;
252189c04b6cSmrg*-*solaris*)
25226fae4e5dSmrg  # Find out which ABI we are using.
25236fae4e5dSmrg  echo 'int i;' > conftest.$ac_ext
25246fae4e5dSmrg  if AC_TRY_EVAL(ac_compile); then
25256fae4e5dSmrg    case `/usr/bin/file conftest.o` in
25266fae4e5dSmrg    *64-bit*)
25276fae4e5dSmrg      case $lt_cv_prog_gnu_ld in
252889c04b6cSmrg      yes*)
252989c04b6cSmrg        case $host in
253089c04b6cSmrg        i?86-*-solaris*)
253189c04b6cSmrg          LD="${LD-ld} -m elf_x86_64"
253289c04b6cSmrg          ;;
253389c04b6cSmrg        sparc*-*-solaris*)
253489c04b6cSmrg          LD="${LD-ld} -m elf64_sparc"
253589c04b6cSmrg          ;;
253689c04b6cSmrg        esac
253789c04b6cSmrg        # GNU ld 2.21 introduced _sol2 emulations.  Use them if available.
253889c04b6cSmrg        if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
253989c04b6cSmrg          LD="${LD-ld}_sol2"
254089c04b6cSmrg        fi
254189c04b6cSmrg        ;;
25426fae4e5dSmrg      *)
25436fae4e5dSmrg	if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
25446fae4e5dSmrg	  LD="${LD-ld} -64"
25456fae4e5dSmrg	fi
25466fae4e5dSmrg	;;
25476fae4e5dSmrg      esac
25486fae4e5dSmrg      ;;
25496fae4e5dSmrg    esac
25506fae4e5dSmrg  fi
25516fae4e5dSmrg  rm -rf conftest*
25526fae4e5dSmrg  ;;
25536fae4e5dSmrgesac
25549c9ff80cSmrg
25556fae4e5dSmrgneed_locks="$enable_libtool_lock"
25566fae4e5dSmrg])# _LT_ENABLE_LOCK
25579c9ff80cSmrg
25589c9ff80cSmrg
25596fae4e5dSmrg# _LT_PROG_AR
25606fae4e5dSmrg# -----------
25616fae4e5dSmrgm4_defun([_LT_PROG_AR],
25626fae4e5dSmrg[AC_CHECK_TOOLS(AR, [ar], false)
25636fae4e5dSmrg: ${AR=ar}
25646fae4e5dSmrg: ${AR_FLAGS=cru}
25656fae4e5dSmrg_LT_DECL([], [AR], [1], [The archiver])
25666fae4e5dSmrg_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
25676fae4e5dSmrg
25686fae4e5dSmrgAC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
25696fae4e5dSmrg  [lt_cv_ar_at_file=no
25706fae4e5dSmrg   AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
25716fae4e5dSmrg     [echo conftest.$ac_objext > conftest.lst
25726fae4e5dSmrg      lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
25736fae4e5dSmrg      AC_TRY_EVAL([lt_ar_try])
25746fae4e5dSmrg      if test "$ac_status" -eq 0; then
25756fae4e5dSmrg	# Ensure the archiver fails upon bogus file names.
25766fae4e5dSmrg	rm -f conftest.$ac_objext libconftest.a
25776fae4e5dSmrg	AC_TRY_EVAL([lt_ar_try])
25786fae4e5dSmrg	if test "$ac_status" -ne 0; then
25796fae4e5dSmrg          lt_cv_ar_at_file=@
25806fae4e5dSmrg        fi
25816fae4e5dSmrg      fi
25826fae4e5dSmrg      rm -f conftest.* libconftest.a
25836fae4e5dSmrg     ])
25846fae4e5dSmrg  ])
25859c9ff80cSmrg
25866fae4e5dSmrgif test "x$lt_cv_ar_at_file" = xno; then
25876fae4e5dSmrg  archiver_list_spec=
25886fae4e5dSmrgelse
25896fae4e5dSmrg  archiver_list_spec=$lt_cv_ar_at_file
25909c9ff80cSmrgfi
25916fae4e5dSmrg_LT_DECL([], [archiver_list_spec], [1],
25926fae4e5dSmrg  [How to feed a file listing to the archiver])
25936fae4e5dSmrg])# _LT_PROG_AR
25949c9ff80cSmrg
25959c9ff80cSmrg
25966fae4e5dSmrg# _LT_CMD_OLD_ARCHIVE
25976fae4e5dSmrg# -------------------
25986fae4e5dSmrgm4_defun([_LT_CMD_OLD_ARCHIVE],
25996fae4e5dSmrg[_LT_PROG_AR
26009c9ff80cSmrg
26016fae4e5dSmrgAC_CHECK_TOOL(STRIP, strip, :)
26026fae4e5dSmrgtest -z "$STRIP" && STRIP=:
26036fae4e5dSmrg_LT_DECL([], [STRIP], [1], [A symbol stripping program])
26049c9ff80cSmrg
26056fae4e5dSmrgAC_CHECK_TOOL(RANLIB, ranlib, :)
26066fae4e5dSmrgtest -z "$RANLIB" && RANLIB=:
26076fae4e5dSmrg_LT_DECL([], [RANLIB], [1],
26086fae4e5dSmrg    [Commands used to install an old-style archive])
26099c9ff80cSmrg
26106fae4e5dSmrg# Determine commands to create old-style static archives.
26116fae4e5dSmrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
26126fae4e5dSmrgold_postinstall_cmds='chmod 644 $oldlib'
26136fae4e5dSmrgold_postuninstall_cmds=
26149c9ff80cSmrg
26156fae4e5dSmrgif test -n "$RANLIB"; then
26166fae4e5dSmrg  case $host_os in
26176fae4e5dSmrg  openbsd*)
261889c04b6cSmrg    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
26196fae4e5dSmrg    ;;
26206fae4e5dSmrg  *)
262189c04b6cSmrg    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
26226fae4e5dSmrg    ;;
26236fae4e5dSmrg  esac
262489c04b6cSmrg  old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
26256fae4e5dSmrgfi
26269c9ff80cSmrg
26276fae4e5dSmrgcase $host_os in
26286fae4e5dSmrg  darwin*)
26296fae4e5dSmrg    lock_old_archive_extraction=yes ;;
26306fae4e5dSmrg  *)
26316fae4e5dSmrg    lock_old_archive_extraction=no ;;
26326fae4e5dSmrgesac
26336fae4e5dSmrg_LT_DECL([], [old_postinstall_cmds], [2])
26346fae4e5dSmrg_LT_DECL([], [old_postuninstall_cmds], [2])
26356fae4e5dSmrg_LT_TAGDECL([], [old_archive_cmds], [2],
26366fae4e5dSmrg    [Commands used to build an old-style archive])
26376fae4e5dSmrg_LT_DECL([], [lock_old_archive_extraction], [0],
26386fae4e5dSmrg    [Whether to use a lock for old archive extraction])
26396fae4e5dSmrg])# _LT_CMD_OLD_ARCHIVE
26409c9ff80cSmrg
26419c9ff80cSmrg
26426fae4e5dSmrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
26436fae4e5dSmrg#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
26446fae4e5dSmrg# ----------------------------------------------------------------
26456fae4e5dSmrg# Check whether the given compiler option works
26466fae4e5dSmrgAC_DEFUN([_LT_COMPILER_OPTION],
26476fae4e5dSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
26486fae4e5dSmrgm4_require([_LT_DECL_SED])dnl
26496fae4e5dSmrgAC_CACHE_CHECK([$1], [$2],
26506fae4e5dSmrg  [$2=no
26516fae4e5dSmrg   m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
26526fae4e5dSmrg   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
26536fae4e5dSmrg   lt_compiler_flag="$3"
26546fae4e5dSmrg   # Insert the option either (1) after the last *FLAGS variable, or
26556fae4e5dSmrg   # (2) before a word containing "conftest.", or (3) at the end.
26566fae4e5dSmrg   # Note that $ac_compile itself does not contain backslashes and begins
26576fae4e5dSmrg   # with a dollar sign (not a hyphen), so the echo should work correctly.
26586fae4e5dSmrg   # The option is referenced via a variable to avoid confusing sed.
26596fae4e5dSmrg   lt_compile=`echo "$ac_compile" | $SED \
26606fae4e5dSmrg   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
26616fae4e5dSmrg   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
26626fae4e5dSmrg   -e 's:$: $lt_compiler_flag:'`
26636fae4e5dSmrg   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
26646fae4e5dSmrg   (eval "$lt_compile" 2>conftest.err)
26656fae4e5dSmrg   ac_status=$?
26666fae4e5dSmrg   cat conftest.err >&AS_MESSAGE_LOG_FD
26676fae4e5dSmrg   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
26686fae4e5dSmrg   if (exit $ac_status) && test -s "$ac_outfile"; then
26696fae4e5dSmrg     # The compiler can only warn and ignore the option if not recognized
26706fae4e5dSmrg     # So say no if there are warnings other than the usual output.
26716fae4e5dSmrg     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
26726fae4e5dSmrg     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
26736fae4e5dSmrg     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
26746fae4e5dSmrg       $2=yes
26756fae4e5dSmrg     fi
26766fae4e5dSmrg   fi
26776fae4e5dSmrg   $RM conftest*
26786fae4e5dSmrg])
26799c9ff80cSmrg
26806fae4e5dSmrgif test x"[$]$2" = xyes; then
26816fae4e5dSmrg    m4_if([$5], , :, [$5])
26826fae4e5dSmrgelse
26836fae4e5dSmrg    m4_if([$6], , :, [$6])
26849c9ff80cSmrgfi
26856fae4e5dSmrg])# _LT_COMPILER_OPTION
26869c9ff80cSmrg
26876fae4e5dSmrg# Old name:
26886fae4e5dSmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
26896fae4e5dSmrgdnl aclocal-1.4 backwards compatibility:
26906fae4e5dSmrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
26919c9ff80cSmrg
26929c9ff80cSmrg
26936fae4e5dSmrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
26946fae4e5dSmrg#                  [ACTION-SUCCESS], [ACTION-FAILURE])
26956fae4e5dSmrg# ----------------------------------------------------
26966fae4e5dSmrg# Check whether the given linker option works
26976fae4e5dSmrgAC_DEFUN([_LT_LINKER_OPTION],
26986fae4e5dSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
26996fae4e5dSmrgm4_require([_LT_DECL_SED])dnl
27006fae4e5dSmrgAC_CACHE_CHECK([$1], [$2],
27016fae4e5dSmrg  [$2=no
27026fae4e5dSmrg   save_LDFLAGS="$LDFLAGS"
27036fae4e5dSmrg   LDFLAGS="$LDFLAGS $3"
27046fae4e5dSmrg   echo "$lt_simple_link_test_code" > conftest.$ac_ext
27056fae4e5dSmrg   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
27066fae4e5dSmrg     # The linker can only warn and ignore the option if not recognized
27076fae4e5dSmrg     # So say no if there are warnings
27086fae4e5dSmrg     if test -s conftest.err; then
27096fae4e5dSmrg       # Append any errors to the config.log.
27106fae4e5dSmrg       cat conftest.err 1>&AS_MESSAGE_LOG_FD
27116fae4e5dSmrg       $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
27126fae4e5dSmrg       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
27136fae4e5dSmrg       if diff conftest.exp conftest.er2 >/dev/null; then
27146fae4e5dSmrg         $2=yes
27156fae4e5dSmrg       fi
27166fae4e5dSmrg     else
27176fae4e5dSmrg       $2=yes
27186fae4e5dSmrg     fi
27196fae4e5dSmrg   fi
27206fae4e5dSmrg   $RM -r conftest*
27216fae4e5dSmrg   LDFLAGS="$save_LDFLAGS"
27226fae4e5dSmrg])
27239c9ff80cSmrg
27246fae4e5dSmrgif test x"[$]$2" = xyes; then
27256fae4e5dSmrg    m4_if([$4], , :, [$4])
27266fae4e5dSmrgelse
27276fae4e5dSmrg    m4_if([$5], , :, [$5])
27286fae4e5dSmrgfi
27296fae4e5dSmrg])# _LT_LINKER_OPTION
27309c9ff80cSmrg
27316fae4e5dSmrg# Old name:
27326fae4e5dSmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
27336fae4e5dSmrgdnl aclocal-1.4 backwards compatibility:
27346fae4e5dSmrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
27359c9ff80cSmrg
27369c9ff80cSmrg
27376fae4e5dSmrg# LT_CMD_MAX_LEN
27386fae4e5dSmrg#---------------
27396fae4e5dSmrgAC_DEFUN([LT_CMD_MAX_LEN],
27406fae4e5dSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
27416fae4e5dSmrg# find the maximum length of command line arguments
27426fae4e5dSmrgAC_MSG_CHECKING([the maximum length of command line arguments])
27436fae4e5dSmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
27446fae4e5dSmrg  i=0
27456fae4e5dSmrg  teststring="ABCD"
27469c9ff80cSmrg
27476fae4e5dSmrg  case $build_os in
27486fae4e5dSmrg  msdosdjgpp*)
27496fae4e5dSmrg    # On DJGPP, this test can blow up pretty badly due to problems in libc
27506fae4e5dSmrg    # (any single argument exceeding 2000 bytes causes a buffer overrun
27516fae4e5dSmrg    # during glob expansion).  Even if it were fixed, the result of this
27526fae4e5dSmrg    # check would be larger than it should be.
27536fae4e5dSmrg    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
27546fae4e5dSmrg    ;;
27559c9ff80cSmrg
27566fae4e5dSmrg  gnu*)
27576fae4e5dSmrg    # Under GNU Hurd, this test is not required because there is
27586fae4e5dSmrg    # no limit to the length of command line arguments.
27596fae4e5dSmrg    # Libtool will interpret -1 as no limit whatsoever
27606fae4e5dSmrg    lt_cv_sys_max_cmd_len=-1;
27616fae4e5dSmrg    ;;
27629c9ff80cSmrg
27636fae4e5dSmrg  cygwin* | mingw* | cegcc*)
27646fae4e5dSmrg    # On Win9x/ME, this test blows up -- it succeeds, but takes
27656fae4e5dSmrg    # about 5 minutes as the teststring grows exponentially.
27666fae4e5dSmrg    # Worse, since 9x/ME are not pre-emptively multitasking,
27676fae4e5dSmrg    # you end up with a "frozen" computer, even though with patience
27686fae4e5dSmrg    # the test eventually succeeds (with a max line length of 256k).
27696fae4e5dSmrg    # Instead, let's just punt: use the minimum linelength reported by
27706fae4e5dSmrg    # all of the supported platforms: 8192 (on NT/2K/XP).
27716fae4e5dSmrg    lt_cv_sys_max_cmd_len=8192;
27726fae4e5dSmrg    ;;
27739c9ff80cSmrg
27746fae4e5dSmrg  mint*)
27756fae4e5dSmrg    # On MiNT this can take a long time and run out of memory.
27766fae4e5dSmrg    lt_cv_sys_max_cmd_len=8192;
27776fae4e5dSmrg    ;;
27789c9ff80cSmrg
27796fae4e5dSmrg  amigaos*)
27806fae4e5dSmrg    # On AmigaOS with pdksh, this test takes hours, literally.
27816fae4e5dSmrg    # So we just punt and use a minimum line length of 8192.
27826fae4e5dSmrg    lt_cv_sys_max_cmd_len=8192;
27836fae4e5dSmrg    ;;
27849c9ff80cSmrg
27856fae4e5dSmrg  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
27866fae4e5dSmrg    # This has been around since 386BSD, at least.  Likely further.
27876fae4e5dSmrg    if test -x /sbin/sysctl; then
27886fae4e5dSmrg      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
27896fae4e5dSmrg    elif test -x /usr/sbin/sysctl; then
27906fae4e5dSmrg      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
27916fae4e5dSmrg    else
27926fae4e5dSmrg      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
27936fae4e5dSmrg    fi
27946fae4e5dSmrg    # And add a safety zone
27956fae4e5dSmrg    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
27966fae4e5dSmrg    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
27976fae4e5dSmrg    ;;
27989c9ff80cSmrg
27996fae4e5dSmrg  interix*)
28006fae4e5dSmrg    # We know the value 262144 and hardcode it with a safety zone (like BSD)
28016fae4e5dSmrg    lt_cv_sys_max_cmd_len=196608
28026fae4e5dSmrg    ;;
28039c9ff80cSmrg
280489c04b6cSmrg  os2*)
280589c04b6cSmrg    # The test takes a long time on OS/2.
280689c04b6cSmrg    lt_cv_sys_max_cmd_len=8192
280789c04b6cSmrg    ;;
280889c04b6cSmrg
28096fae4e5dSmrg  osf*)
28106fae4e5dSmrg    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
28116fae4e5dSmrg    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
28126fae4e5dSmrg    # nice to cause kernel panics so lets avoid the loop below.
28136fae4e5dSmrg    # First set a reasonable default.
28146fae4e5dSmrg    lt_cv_sys_max_cmd_len=16384
28156fae4e5dSmrg    #
28166fae4e5dSmrg    if test -x /sbin/sysconfig; then
28176fae4e5dSmrg      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
28186fae4e5dSmrg        *1*) lt_cv_sys_max_cmd_len=-1 ;;
28199c9ff80cSmrg      esac
28209c9ff80cSmrg    fi
28216fae4e5dSmrg    ;;
28226fae4e5dSmrg  sco3.2v5*)
28236fae4e5dSmrg    lt_cv_sys_max_cmd_len=102400
28246fae4e5dSmrg    ;;
28256fae4e5dSmrg  sysv5* | sco5v6* | sysv4.2uw2*)
28266fae4e5dSmrg    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
28276fae4e5dSmrg    if test -n "$kargmax"; then
28286fae4e5dSmrg      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[	 ]]//'`
28299c9ff80cSmrg    else
28306fae4e5dSmrg      lt_cv_sys_max_cmd_len=32768
28319c9ff80cSmrg    fi
28326fae4e5dSmrg    ;;
28336fae4e5dSmrg  *)
28346fae4e5dSmrg    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
28356fae4e5dSmrg    if test -n "$lt_cv_sys_max_cmd_len"; then
28366fae4e5dSmrg      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
28376fae4e5dSmrg      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
28389c9ff80cSmrg    else
28396fae4e5dSmrg      # Make teststring a little bigger before we do anything with it.
28406fae4e5dSmrg      # a 1K string should be a reasonable start.
28416fae4e5dSmrg      for i in 1 2 3 4 5 6 7 8 ; do
28426fae4e5dSmrg        teststring=$teststring$teststring
28436fae4e5dSmrg      done
28446fae4e5dSmrg      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
28456fae4e5dSmrg      # If test is not a shell built-in, we'll probably end up computing a
28466fae4e5dSmrg      # maximum length that is only half of the actual maximum length, but
28476fae4e5dSmrg      # we can't tell.
284889c04b6cSmrg      while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \
28496fae4e5dSmrg	         = "X$teststring$teststring"; } >/dev/null 2>&1 &&
28506fae4e5dSmrg	      test $i != 17 # 1/2 MB should be enough
28516fae4e5dSmrg      do
28526fae4e5dSmrg        i=`expr $i + 1`
28536fae4e5dSmrg        teststring=$teststring$teststring
28546fae4e5dSmrg      done
28556fae4e5dSmrg      # Only check the string length outside the loop.
28566fae4e5dSmrg      lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
28576fae4e5dSmrg      teststring=
28586fae4e5dSmrg      # Add a significant safety factor because C++ compilers can tack on
28596fae4e5dSmrg      # massive amounts of additional arguments before passing them to the
28606fae4e5dSmrg      # linker.  It appears as though 1/2 is a usable value.
28616fae4e5dSmrg      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
28629c9ff80cSmrg    fi
28639c9ff80cSmrg    ;;
28649c9ff80cSmrg  esac
28659c9ff80cSmrg])
28666fae4e5dSmrgif test -n $lt_cv_sys_max_cmd_len ; then
28676fae4e5dSmrg  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
28686fae4e5dSmrgelse
28696fae4e5dSmrg  AC_MSG_RESULT(none)
28706fae4e5dSmrgfi
28716fae4e5dSmrgmax_cmd_len=$lt_cv_sys_max_cmd_len
28726fae4e5dSmrg_LT_DECL([], [max_cmd_len], [0],
28736fae4e5dSmrg    [What is the maximum length of a command?])
28746fae4e5dSmrg])# LT_CMD_MAX_LEN
28759c9ff80cSmrg
28766fae4e5dSmrg# Old name:
28776fae4e5dSmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
28786fae4e5dSmrgdnl aclocal-1.4 backwards compatibility:
28796fae4e5dSmrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
28809c9ff80cSmrg
28819c9ff80cSmrg
28826fae4e5dSmrg# _LT_HEADER_DLFCN
28836fae4e5dSmrg# ----------------
28846fae4e5dSmrgm4_defun([_LT_HEADER_DLFCN],
28856fae4e5dSmrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
28866fae4e5dSmrg])# _LT_HEADER_DLFCN
28879c9ff80cSmrg
28889c9ff80cSmrg
28896fae4e5dSmrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
28906fae4e5dSmrg#                      ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
28916fae4e5dSmrg# ----------------------------------------------------------------
28926fae4e5dSmrgm4_defun([_LT_TRY_DLOPEN_SELF],
28936fae4e5dSmrg[m4_require([_LT_HEADER_DLFCN])dnl
28946fae4e5dSmrgif test "$cross_compiling" = yes; then :
28956fae4e5dSmrg  [$4]
28966fae4e5dSmrgelse
28976fae4e5dSmrg  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
28986fae4e5dSmrg  lt_status=$lt_dlunknown
28996fae4e5dSmrg  cat > conftest.$ac_ext <<_LT_EOF
29006fae4e5dSmrg[#line $LINENO "configure"
29016fae4e5dSmrg#include "confdefs.h"
29021f0ac6a5Smrg
29036fae4e5dSmrg#if HAVE_DLFCN_H
29046fae4e5dSmrg#include <dlfcn.h>
29056fae4e5dSmrg#endif
29061f0ac6a5Smrg
29076fae4e5dSmrg#include <stdio.h>
29081f0ac6a5Smrg
29096fae4e5dSmrg#ifdef RTLD_GLOBAL
29106fae4e5dSmrg#  define LT_DLGLOBAL		RTLD_GLOBAL
29116fae4e5dSmrg#else
29126fae4e5dSmrg#  ifdef DL_GLOBAL
29136fae4e5dSmrg#    define LT_DLGLOBAL		DL_GLOBAL
29146fae4e5dSmrg#  else
29156fae4e5dSmrg#    define LT_DLGLOBAL		0
29166fae4e5dSmrg#  endif
29176fae4e5dSmrg#endif
29181f0ac6a5Smrg
29196fae4e5dSmrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
29206fae4e5dSmrg   find out it does not work in some platform. */
29216fae4e5dSmrg#ifndef LT_DLLAZY_OR_NOW
29226fae4e5dSmrg#  ifdef RTLD_LAZY
29236fae4e5dSmrg#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
29246fae4e5dSmrg#  else
29256fae4e5dSmrg#    ifdef DL_LAZY
29266fae4e5dSmrg#      define LT_DLLAZY_OR_NOW		DL_LAZY
29276fae4e5dSmrg#    else
29286fae4e5dSmrg#      ifdef RTLD_NOW
29296fae4e5dSmrg#        define LT_DLLAZY_OR_NOW	RTLD_NOW
29306fae4e5dSmrg#      else
29316fae4e5dSmrg#        ifdef DL_NOW
29326fae4e5dSmrg#          define LT_DLLAZY_OR_NOW	DL_NOW
29336fae4e5dSmrg#        else
29346fae4e5dSmrg#          define LT_DLLAZY_OR_NOW	0
29356fae4e5dSmrg#        endif
29366fae4e5dSmrg#      endif
29376fae4e5dSmrg#    endif
29386fae4e5dSmrg#  endif
29396fae4e5dSmrg#endif
29406fae4e5dSmrg
29416fae4e5dSmrg/* When -fvisbility=hidden is used, assume the code has been annotated
29426fae4e5dSmrg   correspondingly for the symbols needed.  */
29436fae4e5dSmrg#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
29446fae4e5dSmrgint fnord () __attribute__((visibility("default")));
29456fae4e5dSmrg#endif
29466fae4e5dSmrg
29476fae4e5dSmrgint fnord () { return 42; }
29486fae4e5dSmrgint main ()
29496fae4e5dSmrg{
29506fae4e5dSmrg  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
29516fae4e5dSmrg  int status = $lt_dlunknown;
29526fae4e5dSmrg
29536fae4e5dSmrg  if (self)
29546fae4e5dSmrg    {
29556fae4e5dSmrg      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
29566fae4e5dSmrg      else
29576fae4e5dSmrg        {
29586fae4e5dSmrg	  if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
29596fae4e5dSmrg          else puts (dlerror ());
29606fae4e5dSmrg	}
29616fae4e5dSmrg      /* dlclose (self); */
29626fae4e5dSmrg    }
29636fae4e5dSmrg  else
29646fae4e5dSmrg    puts (dlerror ());
29656fae4e5dSmrg
29666fae4e5dSmrg  return status;
29676fae4e5dSmrg}]
29689c9ff80cSmrg_LT_EOF
29696fae4e5dSmrg  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
29706fae4e5dSmrg    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
29716fae4e5dSmrg    lt_status=$?
29726fae4e5dSmrg    case x$lt_status in
29736fae4e5dSmrg      x$lt_dlno_uscore) $1 ;;
29746fae4e5dSmrg      x$lt_dlneed_uscore) $2 ;;
29756fae4e5dSmrg      x$lt_dlunknown|x*) $3 ;;
29766fae4e5dSmrg    esac
29776fae4e5dSmrg  else :
29786fae4e5dSmrg    # compilation failed
29796fae4e5dSmrg    $3
29806fae4e5dSmrg  fi
29811f0ac6a5Smrgfi
29826fae4e5dSmrgrm -fr conftest*
29836fae4e5dSmrg])# _LT_TRY_DLOPEN_SELF
29841f0ac6a5Smrg
29851f0ac6a5Smrg
29866fae4e5dSmrg# LT_SYS_DLOPEN_SELF
29876fae4e5dSmrg# ------------------
29886fae4e5dSmrgAC_DEFUN([LT_SYS_DLOPEN_SELF],
29896fae4e5dSmrg[m4_require([_LT_HEADER_DLFCN])dnl
29906fae4e5dSmrgif test "x$enable_dlopen" != xyes; then
29916fae4e5dSmrg  enable_dlopen=unknown
29926fae4e5dSmrg  enable_dlopen_self=unknown
29936fae4e5dSmrg  enable_dlopen_self_static=unknown
29946fae4e5dSmrgelse
29956fae4e5dSmrg  lt_cv_dlopen=no
29966fae4e5dSmrg  lt_cv_dlopen_libs=
29971f0ac6a5Smrg
29986fae4e5dSmrg  case $host_os in
29996fae4e5dSmrg  beos*)
30006fae4e5dSmrg    lt_cv_dlopen="load_add_on"
30016fae4e5dSmrg    lt_cv_dlopen_libs=
30026fae4e5dSmrg    lt_cv_dlopen_self=yes
30036fae4e5dSmrg    ;;
30049c9ff80cSmrg
30056fae4e5dSmrg  mingw* | pw32* | cegcc*)
30066fae4e5dSmrg    lt_cv_dlopen="LoadLibrary"
30076fae4e5dSmrg    lt_cv_dlopen_libs=
30086fae4e5dSmrg    ;;
30091f0ac6a5Smrg
30106fae4e5dSmrg  cygwin*)
30116fae4e5dSmrg    lt_cv_dlopen="dlopen"
30126fae4e5dSmrg    lt_cv_dlopen_libs=
30136fae4e5dSmrg    ;;
30141f0ac6a5Smrg
30156fae4e5dSmrg  darwin*)
30166fae4e5dSmrg  # if libdl is installed we need to link against it
30176fae4e5dSmrg    AC_CHECK_LIB([dl], [dlopen],
30186fae4e5dSmrg		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
30196fae4e5dSmrg    lt_cv_dlopen="dyld"
30206fae4e5dSmrg    lt_cv_dlopen_libs=
30216fae4e5dSmrg    lt_cv_dlopen_self=yes
30226fae4e5dSmrg    ])
30236fae4e5dSmrg    ;;
30241f0ac6a5Smrg
30256fae4e5dSmrg  *)
30266fae4e5dSmrg    AC_CHECK_FUNC([shl_load],
30276fae4e5dSmrg	  [lt_cv_dlopen="shl_load"],
30286fae4e5dSmrg      [AC_CHECK_LIB([dld], [shl_load],
30296fae4e5dSmrg	    [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
30306fae4e5dSmrg	[AC_CHECK_FUNC([dlopen],
30316fae4e5dSmrg	      [lt_cv_dlopen="dlopen"],
30326fae4e5dSmrg	  [AC_CHECK_LIB([dl], [dlopen],
30336fae4e5dSmrg		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
30346fae4e5dSmrg	    [AC_CHECK_LIB([svld], [dlopen],
30356fae4e5dSmrg		  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
30366fae4e5dSmrg	      [AC_CHECK_LIB([dld], [dld_link],
30376fae4e5dSmrg		    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
30386fae4e5dSmrg	      ])
30396fae4e5dSmrg	    ])
30406fae4e5dSmrg	  ])
30416fae4e5dSmrg	])
30426fae4e5dSmrg      ])
30436fae4e5dSmrg    ;;
30446fae4e5dSmrg  esac
30456fae4e5dSmrg
30466fae4e5dSmrg  if test "x$lt_cv_dlopen" != xno; then
30476fae4e5dSmrg    enable_dlopen=yes
30486fae4e5dSmrg  else
30496fae4e5dSmrg    enable_dlopen=no
30501f0ac6a5Smrg  fi
30511f0ac6a5Smrg
30526fae4e5dSmrg  case $lt_cv_dlopen in
30536fae4e5dSmrg  dlopen)
30546fae4e5dSmrg    save_CPPFLAGS="$CPPFLAGS"
30556fae4e5dSmrg    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
30561f0ac6a5Smrg
30576fae4e5dSmrg    save_LDFLAGS="$LDFLAGS"
30586fae4e5dSmrg    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
30591f0ac6a5Smrg
30606fae4e5dSmrg    save_LIBS="$LIBS"
30616fae4e5dSmrg    LIBS="$lt_cv_dlopen_libs $LIBS"
30621f0ac6a5Smrg
30636fae4e5dSmrg    AC_CACHE_CHECK([whether a program can dlopen itself],
30646fae4e5dSmrg	  lt_cv_dlopen_self, [dnl
30656fae4e5dSmrg	  _LT_TRY_DLOPEN_SELF(
30666fae4e5dSmrg	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
30676fae4e5dSmrg	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
30686fae4e5dSmrg    ])
30691f0ac6a5Smrg
30706fae4e5dSmrg    if test "x$lt_cv_dlopen_self" = xyes; then
30716fae4e5dSmrg      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
30726fae4e5dSmrg      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
30736fae4e5dSmrg	  lt_cv_dlopen_self_static, [dnl
30746fae4e5dSmrg	  _LT_TRY_DLOPEN_SELF(
30756fae4e5dSmrg	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
30766fae4e5dSmrg	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
30776fae4e5dSmrg      ])
30789c9ff80cSmrg    fi
30791f0ac6a5Smrg
30806fae4e5dSmrg    CPPFLAGS="$save_CPPFLAGS"
30816fae4e5dSmrg    LDFLAGS="$save_LDFLAGS"
30826fae4e5dSmrg    LIBS="$save_LIBS"
30836fae4e5dSmrg    ;;
30846fae4e5dSmrg  esac
30859c9ff80cSmrg
30866fae4e5dSmrg  case $lt_cv_dlopen_self in
30876fae4e5dSmrg  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
30886fae4e5dSmrg  *) enable_dlopen_self=unknown ;;
30896fae4e5dSmrg  esac
30901f0ac6a5Smrg
30916fae4e5dSmrg  case $lt_cv_dlopen_self_static in
30926fae4e5dSmrg  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
30936fae4e5dSmrg  *) enable_dlopen_self_static=unknown ;;
30949c9ff80cSmrg  esac
30959c9ff80cSmrgfi
30966fae4e5dSmrg_LT_DECL([dlopen_support], [enable_dlopen], [0],
30976fae4e5dSmrg	 [Whether dlopen is supported])
30986fae4e5dSmrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
30996fae4e5dSmrg	 [Whether dlopen of programs is supported])
31006fae4e5dSmrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
31016fae4e5dSmrg	 [Whether dlopen of statically linked programs is supported])
31026fae4e5dSmrg])# LT_SYS_DLOPEN_SELF
31036fae4e5dSmrg
31046fae4e5dSmrg# Old name:
31056fae4e5dSmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
31066fae4e5dSmrgdnl aclocal-1.4 backwards compatibility:
31076fae4e5dSmrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
31081f0ac6a5Smrg
31091f0ac6a5Smrg
31106fae4e5dSmrg# _LT_COMPILER_C_O([TAGNAME])
31116fae4e5dSmrg# ---------------------------
31126fae4e5dSmrg# Check to see if options -c and -o are simultaneously supported by compiler.
31136fae4e5dSmrg# This macro does not hard code the compiler like AC_PROG_CC_C_O.
31146fae4e5dSmrgm4_defun([_LT_COMPILER_C_O],
31156fae4e5dSmrg[m4_require([_LT_DECL_SED])dnl
31166fae4e5dSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
31176fae4e5dSmrgm4_require([_LT_TAG_COMPILER])dnl
31186fae4e5dSmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
31196fae4e5dSmrg  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
31206fae4e5dSmrg  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
31216fae4e5dSmrg   $RM -r conftest 2>/dev/null
31226fae4e5dSmrg   mkdir conftest
31236fae4e5dSmrg   cd conftest
31246fae4e5dSmrg   mkdir out
3125e5410a46Smrg   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
31266fae4e5dSmrg
31276fae4e5dSmrg   lt_compiler_flag="-o out/conftest2.$ac_objext"
31281f0ac6a5Smrg   # Insert the option either (1) after the last *FLAGS variable, or
31291f0ac6a5Smrg   # (2) before a word containing "conftest.", or (3) at the end.
31301f0ac6a5Smrg   # Note that $ac_compile itself does not contain backslashes and begins
31311f0ac6a5Smrg   # with a dollar sign (not a hyphen), so the echo should work correctly.
31321f0ac6a5Smrg   lt_compile=`echo "$ac_compile" | $SED \
31331f0ac6a5Smrg   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
31341f0ac6a5Smrg   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
31351f0ac6a5Smrg   -e 's:$: $lt_compiler_flag:'`
31366fae4e5dSmrg   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
31376fae4e5dSmrg   (eval "$lt_compile" 2>out/conftest.err)
31381f0ac6a5Smrg   ac_status=$?
31396fae4e5dSmrg   cat out/conftest.err >&AS_MESSAGE_LOG_FD
31406fae4e5dSmrg   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
31416fae4e5dSmrg   if (exit $ac_status) && test -s out/conftest2.$ac_objext
31426fae4e5dSmrg   then
31431f0ac6a5Smrg     # The compiler can only warn and ignore the option if not recognized
31446fae4e5dSmrg     # So say no if there are warnings
31456fae4e5dSmrg     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
31466fae4e5dSmrg     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
31476fae4e5dSmrg     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
31486fae4e5dSmrg       _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
31491f0ac6a5Smrg     fi
31501f0ac6a5Smrg   fi
31516fae4e5dSmrg   chmod u+w . 2>&AS_MESSAGE_LOG_FD
31526fae4e5dSmrg   $RM conftest*
31536fae4e5dSmrg   # SGI C++ compiler will create directory out/ii_files/ for
31546fae4e5dSmrg   # template instantiation
31556fae4e5dSmrg   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
31566fae4e5dSmrg   $RM out/* && rmdir out
31576fae4e5dSmrg   cd ..
31586fae4e5dSmrg   $RM -r conftest
31599c9ff80cSmrg   $RM conftest*
31601f0ac6a5Smrg])
31616fae4e5dSmrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
31626fae4e5dSmrg	[Does compiler simultaneously support -c and -o options?])
31636fae4e5dSmrg])# _LT_COMPILER_C_O
31641f0ac6a5Smrg
31659c9ff80cSmrg
31666fae4e5dSmrg# _LT_COMPILER_FILE_LOCKS([TAGNAME])
31676fae4e5dSmrg# ----------------------------------
31686fae4e5dSmrg# Check to see if we can do hard links to lock some files if needed
31696fae4e5dSmrgm4_defun([_LT_COMPILER_FILE_LOCKS],
31706fae4e5dSmrg[m4_require([_LT_ENABLE_LOCK])dnl
31716fae4e5dSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
31726fae4e5dSmrg_LT_COMPILER_C_O([$1])
31731f0ac6a5Smrg
31746fae4e5dSmrghard_links="nottested"
31756fae4e5dSmrgif test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
31766fae4e5dSmrg  # do not overwrite the value of need_locks provided by the user
31776fae4e5dSmrg  AC_MSG_CHECKING([if we can lock with hard links])
31786fae4e5dSmrg  hard_links=yes
31796fae4e5dSmrg  $RM conftest*
31806fae4e5dSmrg  ln conftest.a conftest.b 2>/dev/null && hard_links=no
31816fae4e5dSmrg  touch conftest.a
31826fae4e5dSmrg  ln conftest.a conftest.b 2>&5 || hard_links=no
31836fae4e5dSmrg  ln conftest.a conftest.b 2>/dev/null && hard_links=no
31846fae4e5dSmrg  AC_MSG_RESULT([$hard_links])
31856fae4e5dSmrg  if test "$hard_links" = no; then
31866fae4e5dSmrg    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
31876fae4e5dSmrg    need_locks=warn
31886fae4e5dSmrg  fi
31891f0ac6a5Smrgelse
31906fae4e5dSmrg  need_locks=no
31911f0ac6a5Smrgfi
31926fae4e5dSmrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
31936fae4e5dSmrg])# _LT_COMPILER_FILE_LOCKS
31941f0ac6a5Smrg
31951f0ac6a5Smrg
31966fae4e5dSmrg# _LT_CHECK_OBJDIR
31976fae4e5dSmrg# ----------------
31986fae4e5dSmrgm4_defun([_LT_CHECK_OBJDIR],
31996fae4e5dSmrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
32006fae4e5dSmrg[rm -f .libs 2>/dev/null
32016fae4e5dSmrgmkdir .libs 2>/dev/null
32026fae4e5dSmrgif test -d .libs; then
32036fae4e5dSmrg  lt_cv_objdir=.libs
32046fae4e5dSmrgelse
32056fae4e5dSmrg  # MS-DOS does not allow filenames that begin with a dot.
32066fae4e5dSmrg  lt_cv_objdir=_libs
32076fae4e5dSmrgfi
32086fae4e5dSmrgrmdir .libs 2>/dev/null])
32096fae4e5dSmrgobjdir=$lt_cv_objdir
32106fae4e5dSmrg_LT_DECL([], [objdir], [0],
32116fae4e5dSmrg         [The name of the directory that contains temporary libtool files])dnl
32126fae4e5dSmrgm4_pattern_allow([LT_OBJDIR])dnl
32136fae4e5dSmrgAC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
32146fae4e5dSmrg  [Define to the sub-directory in which libtool stores uninstalled libraries.])
32156fae4e5dSmrg])# _LT_CHECK_OBJDIR
32169c9ff80cSmrg
32171f0ac6a5Smrg
32186fae4e5dSmrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
32196fae4e5dSmrg# --------------------------------------
32206fae4e5dSmrg# Check hardcoding attributes.
32216fae4e5dSmrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH],
32226fae4e5dSmrg[AC_MSG_CHECKING([how to hardcode library paths into programs])
32236fae4e5dSmrg_LT_TAGVAR(hardcode_action, $1)=
32246fae4e5dSmrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
32256fae4e5dSmrg   test -n "$_LT_TAGVAR(runpath_var, $1)" ||
32266fae4e5dSmrg   test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
32271f0ac6a5Smrg
32286fae4e5dSmrg  # We can hardcode non-existent directories.
32296fae4e5dSmrg  if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
32306fae4e5dSmrg     # If the only mechanism to avoid hardcoding is shlibpath_var, we
32316fae4e5dSmrg     # have to relink, otherwise we might link with an installed library
32326fae4e5dSmrg     # when we should be linking with a yet-to-be-installed one
32336fae4e5dSmrg     ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
32346fae4e5dSmrg     test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
32356fae4e5dSmrg    # Linking always hardcodes the temporary library directory.
32366fae4e5dSmrg    _LT_TAGVAR(hardcode_action, $1)=relink
32376fae4e5dSmrg  else
32386fae4e5dSmrg    # We can link without hardcoding, and we can hardcode nonexisting dirs.
32396fae4e5dSmrg    _LT_TAGVAR(hardcode_action, $1)=immediate
32406fae4e5dSmrg  fi
32416fae4e5dSmrgelse
32426fae4e5dSmrg  # We cannot hardcode anything, or else we can only hardcode existing
32436fae4e5dSmrg  # directories.
32446fae4e5dSmrg  _LT_TAGVAR(hardcode_action, $1)=unsupported
32456fae4e5dSmrgfi
32466fae4e5dSmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
32471f0ac6a5Smrg
32486fae4e5dSmrgif test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
32496fae4e5dSmrg   test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
32506fae4e5dSmrg  # Fast installation is not supported
32516fae4e5dSmrg  enable_fast_install=no
32526fae4e5dSmrgelif test "$shlibpath_overrides_runpath" = yes ||
32536fae4e5dSmrg     test "$enable_shared" = no; then
32546fae4e5dSmrg  # Fast installation is not necessary
32556fae4e5dSmrg  enable_fast_install=needless
32566fae4e5dSmrgfi
32576fae4e5dSmrg_LT_TAGDECL([], [hardcode_action], [0],
32586fae4e5dSmrg    [How to hardcode a shared library path into an executable])
32596fae4e5dSmrg])# _LT_LINKER_HARDCODE_LIBPATH
32601f0ac6a5Smrg
32611f0ac6a5Smrg
32626fae4e5dSmrg# _LT_CMD_STRIPLIB
32636fae4e5dSmrg# ----------------
32646fae4e5dSmrgm4_defun([_LT_CMD_STRIPLIB],
32656fae4e5dSmrg[m4_require([_LT_DECL_EGREP])
32666fae4e5dSmrgstriplib=
32676fae4e5dSmrgold_striplib=
32686fae4e5dSmrgAC_MSG_CHECKING([whether stripping libraries is possible])
32696fae4e5dSmrgif test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
32706fae4e5dSmrg  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
32716fae4e5dSmrg  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
32726fae4e5dSmrg  AC_MSG_RESULT([yes])
32736fae4e5dSmrgelse
32746fae4e5dSmrg# FIXME - insert some real tests, host_os isn't really good enough
32756fae4e5dSmrg  case $host_os in
32766fae4e5dSmrg  darwin*)
32776fae4e5dSmrg    if test -n "$STRIP" ; then
32786fae4e5dSmrg      striplib="$STRIP -x"
32796fae4e5dSmrg      old_striplib="$STRIP -S"
32806fae4e5dSmrg      AC_MSG_RESULT([yes])
32811f0ac6a5Smrg    else
32826fae4e5dSmrg      AC_MSG_RESULT([no])
32831f0ac6a5Smrg    fi
32841f0ac6a5Smrg    ;;
32856fae4e5dSmrg  *)
32866fae4e5dSmrg    AC_MSG_RESULT([no])
32871f0ac6a5Smrg    ;;
32886fae4e5dSmrg  esac
32896fae4e5dSmrgfi
32906fae4e5dSmrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
32916fae4e5dSmrg_LT_DECL([], [striplib], [1])
32926fae4e5dSmrg])# _LT_CMD_STRIPLIB
32931f0ac6a5Smrg
32946fae4e5dSmrg
32956fae4e5dSmrg# _LT_SYS_DYNAMIC_LINKER([TAG])
32966fae4e5dSmrg# -----------------------------
32976fae4e5dSmrg# PORTME Fill in your ld.so characteristics
32986fae4e5dSmrgm4_defun([_LT_SYS_DYNAMIC_LINKER],
32996fae4e5dSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
33006fae4e5dSmrgm4_require([_LT_DECL_EGREP])dnl
33016fae4e5dSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
33026fae4e5dSmrgm4_require([_LT_DECL_OBJDUMP])dnl
33036fae4e5dSmrgm4_require([_LT_DECL_SED])dnl
33046fae4e5dSmrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl
33056fae4e5dSmrgAC_MSG_CHECKING([dynamic linker characteristics])
33066fae4e5dSmrgm4_if([$1],
33076fae4e5dSmrg	[], [
33086fae4e5dSmrgif test "$GCC" = yes; then
33096fae4e5dSmrg  case $host_os in
33106fae4e5dSmrg    darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
33116fae4e5dSmrg    *) lt_awk_arg="/^libraries:/" ;;
33126fae4e5dSmrg  esac
33136fae4e5dSmrg  case $host_os in
33146fae4e5dSmrg    mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;;
33156fae4e5dSmrg    *) lt_sed_strip_eq="s,=/,/,g" ;;
33166fae4e5dSmrg  esac
33176fae4e5dSmrg  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
33186fae4e5dSmrg  case $lt_search_path_spec in
33196fae4e5dSmrg  *\;*)
33206fae4e5dSmrg    # if the path contains ";" then we assume it to be the separator
33216fae4e5dSmrg    # otherwise default to the standard path separator (i.e. ":") - it is
33226fae4e5dSmrg    # assumed that no part of a normal pathname contains ";" but that should
33236fae4e5dSmrg    # okay in the real world where ";" in dirpaths is itself problematic.
33246fae4e5dSmrg    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
33251f0ac6a5Smrg    ;;
33261f0ac6a5Smrg  *)
33276fae4e5dSmrg    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
33286fae4e5dSmrg    ;;
33296fae4e5dSmrg  esac
33306fae4e5dSmrg  # Ok, now we have the path, separated by spaces, we can step through it
33316fae4e5dSmrg  # and add multilib dir if necessary.
33326fae4e5dSmrg  lt_tmp_lt_search_path_spec=
33336fae4e5dSmrg  lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
33346fae4e5dSmrg  for lt_sys_path in $lt_search_path_spec; do
33356fae4e5dSmrg    if test -d "$lt_sys_path/$lt_multi_os_dir"; then
33366fae4e5dSmrg      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
3337e5410a46Smrg    else
33386fae4e5dSmrg      test -d "$lt_sys_path" && \
33396fae4e5dSmrg	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
3340e5410a46Smrg    fi
33416fae4e5dSmrg  done
33426fae4e5dSmrg  lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
33436fae4e5dSmrgBEGIN {RS=" "; FS="/|\n";} {
33446fae4e5dSmrg  lt_foo="";
33456fae4e5dSmrg  lt_count=0;
33466fae4e5dSmrg  for (lt_i = NF; lt_i > 0; lt_i--) {
33476fae4e5dSmrg    if ($lt_i != "" && $lt_i != ".") {
33486fae4e5dSmrg      if ($lt_i == "..") {
33496fae4e5dSmrg        lt_count++;
33506fae4e5dSmrg      } else {
33516fae4e5dSmrg        if (lt_count == 0) {
33526fae4e5dSmrg          lt_foo="/" $lt_i lt_foo;
33536fae4e5dSmrg        } else {
33546fae4e5dSmrg          lt_count--;
33556fae4e5dSmrg        }
33566fae4e5dSmrg      }
33576fae4e5dSmrg    }
33586fae4e5dSmrg  }
33596fae4e5dSmrg  if (lt_foo != "") { lt_freq[[lt_foo]]++; }
33606fae4e5dSmrg  if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
33616fae4e5dSmrg}'`
33626fae4e5dSmrg  # AWK program above erroneously prepends '/' to C:/dos/paths
33636fae4e5dSmrg  # for these hosts.
33646fae4e5dSmrg  case $host_os in
33656fae4e5dSmrg    mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
33666fae4e5dSmrg      $SED 's,/\([[A-Za-z]]:\),\1,g'` ;;
33671f0ac6a5Smrg  esac
33686fae4e5dSmrg  sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
33691f0ac6a5Smrgelse
33706fae4e5dSmrg  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
33716fae4e5dSmrgfi])
33726fae4e5dSmrglibrary_names_spec=
33736fae4e5dSmrglibname_spec='lib$name'
33746fae4e5dSmrgsoname_spec=
33756fae4e5dSmrgshrext_cmds=".so"
33766fae4e5dSmrgpostinstall_cmds=
33776fae4e5dSmrgpostuninstall_cmds=
33786fae4e5dSmrgfinish_cmds=
33796fae4e5dSmrgfinish_eval=
33806fae4e5dSmrgshlibpath_var=
33816fae4e5dSmrgshlibpath_overrides_runpath=unknown
33826fae4e5dSmrgversion_type=none
33836fae4e5dSmrgdynamic_linker="$host_os ld.so"
33846fae4e5dSmrgsys_lib_dlsearch_path_spec="/lib /usr/lib"
33856fae4e5dSmrgneed_lib_prefix=unknown
33866fae4e5dSmrghardcode_into_libs=no
33871f0ac6a5Smrg
33886fae4e5dSmrg# when you set need_version to no, make sure it does not cause -set_version
33896fae4e5dSmrg# flags to be left without arguments
33906fae4e5dSmrgneed_version=unknown
33911f0ac6a5Smrg
33926fae4e5dSmrgcase $host_os in
33936fae4e5dSmrgaix3*)
339489c04b6cSmrg  version_type=linux # correct to gnu/linux during the next big refactor
33956fae4e5dSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
33966fae4e5dSmrg  shlibpath_var=LIBPATH
33971f0ac6a5Smrg
33986fae4e5dSmrg  # AIX 3 has no versioning support, so we append a major version to the name.
33996fae4e5dSmrg  soname_spec='${libname}${release}${shared_ext}$major'
34006fae4e5dSmrg  ;;
34011f0ac6a5Smrg
34026fae4e5dSmrgaix[[4-9]]*)
340389c04b6cSmrg  version_type=linux # correct to gnu/linux during the next big refactor
34046fae4e5dSmrg  need_lib_prefix=no
34056fae4e5dSmrg  need_version=no
34066fae4e5dSmrg  hardcode_into_libs=yes
34076fae4e5dSmrg  if test "$host_cpu" = ia64; then
34086fae4e5dSmrg    # AIX 5 supports IA64
34096fae4e5dSmrg    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
34106fae4e5dSmrg    shlibpath_var=LD_LIBRARY_PATH
34111f0ac6a5Smrg  else
34126fae4e5dSmrg    # With GCC up to 2.95.x, collect2 would create an import file
34136fae4e5dSmrg    # for dependence libraries.  The import file would start with
34146fae4e5dSmrg    # the line `#! .'.  This would cause the generated library to
34156fae4e5dSmrg    # depend on `.', always an invalid library.  This was fixed in
34166fae4e5dSmrg    # development snapshots of GCC prior to 3.0.
34176fae4e5dSmrg    case $host_os in
34186fae4e5dSmrg      aix4 | aix4.[[01]] | aix4.[[01]].*)
34196fae4e5dSmrg      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
34206fae4e5dSmrg	   echo ' yes '
34216fae4e5dSmrg	   echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
34226fae4e5dSmrg	:
34236fae4e5dSmrg      else
34246fae4e5dSmrg	can_build_shared=no
34256fae4e5dSmrg      fi
34266fae4e5dSmrg      ;;
34271f0ac6a5Smrg    esac
34286fae4e5dSmrg    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
34296fae4e5dSmrg    # soname into executable. Probably we can add versioning support to
34306fae4e5dSmrg    # collect2, so additional links can be useful in future.
34316fae4e5dSmrg    if test "$aix_use_runtimelinking" = yes; then
34326fae4e5dSmrg      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
34336fae4e5dSmrg      # instead of lib<name>.a to let people know that these are not
34346fae4e5dSmrg      # typical AIX shared libraries.
34356fae4e5dSmrg      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
34366fae4e5dSmrg    else
34376fae4e5dSmrg      # We preserve .a as extension for shared libraries through AIX4.2
34386fae4e5dSmrg      # and later when we are not doing run time linking.
34396fae4e5dSmrg      library_names_spec='${libname}${release}.a $libname.a'
34406fae4e5dSmrg      soname_spec='${libname}${release}${shared_ext}$major'
34416fae4e5dSmrg    fi
34426fae4e5dSmrg    shlibpath_var=LIBPATH
34431f0ac6a5Smrg  fi
34446fae4e5dSmrg  ;;
34451f0ac6a5Smrg
34466fae4e5dSmrgamigaos*)
34476fae4e5dSmrg  case $host_cpu in
34486fae4e5dSmrg  powerpc)
34496fae4e5dSmrg    # Since July 2007 AmigaOS4 officially supports .so libraries.
34506fae4e5dSmrg    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
34516fae4e5dSmrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
34526fae4e5dSmrg    ;;
34536fae4e5dSmrg  m68k)
34546fae4e5dSmrg    library_names_spec='$libname.ixlibrary $libname.a'
34556fae4e5dSmrg    # Create ${libname}_ixlibrary.a entries in /sys/libs.
34566fae4e5dSmrg    finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $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'
34576fae4e5dSmrg    ;;
34586fae4e5dSmrg  esac
34596fae4e5dSmrg  ;;
34601f0ac6a5Smrg
34616fae4e5dSmrgbeos*)
34626fae4e5dSmrg  library_names_spec='${libname}${shared_ext}'
34636fae4e5dSmrg  dynamic_linker="$host_os ld.so"
34646fae4e5dSmrg  shlibpath_var=LIBRARY_PATH
34656fae4e5dSmrg  ;;
34661f0ac6a5Smrg
34676fae4e5dSmrgbsdi[[45]]*)
346889c04b6cSmrg  version_type=linux # correct to gnu/linux during the next big refactor
34696fae4e5dSmrg  need_version=no
34706fae4e5dSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
34716fae4e5dSmrg  soname_spec='${libname}${release}${shared_ext}$major'
34726fae4e5dSmrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
34736fae4e5dSmrg  shlibpath_var=LD_LIBRARY_PATH
34746fae4e5dSmrg  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
34756fae4e5dSmrg  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
34766fae4e5dSmrg  # the default ld.so.conf also contains /usr/contrib/lib and
34776fae4e5dSmrg  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
34786fae4e5dSmrg  # libtool to hard-code these into programs
34796fae4e5dSmrg  ;;
34801f0ac6a5Smrg
34816fae4e5dSmrgcygwin* | mingw* | pw32* | cegcc*)
34826fae4e5dSmrg  version_type=windows
34836fae4e5dSmrg  shrext_cmds=".dll"
34846fae4e5dSmrg  need_version=no
34856fae4e5dSmrg  need_lib_prefix=no
34861f0ac6a5Smrg
34876fae4e5dSmrg  case $GCC,$cc_basename in
34886fae4e5dSmrg  yes,*)
34896fae4e5dSmrg    # gcc
34906fae4e5dSmrg    library_names_spec='$libname.dll.a'
34916fae4e5dSmrg    # DLL is installed to $(libdir)/../bin by postinstall_cmds
34926fae4e5dSmrg    postinstall_cmds='base_file=`basename \${file}`~
34936fae4e5dSmrg      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
34946fae4e5dSmrg      dldir=$destdir/`dirname \$dlpath`~
34956fae4e5dSmrg      test -d \$dldir || mkdir -p \$dldir~
34966fae4e5dSmrg      $install_prog $dir/$dlname \$dldir/$dlname~
34976fae4e5dSmrg      chmod a+x \$dldir/$dlname~
34986fae4e5dSmrg      if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
34996fae4e5dSmrg        eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
35006fae4e5dSmrg      fi'
35016fae4e5dSmrg    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
35026fae4e5dSmrg      dlpath=$dir/\$dldll~
35036fae4e5dSmrg       $RM \$dlpath'
35046fae4e5dSmrg    shlibpath_overrides_runpath=yes
35051f0ac6a5Smrg
35066fae4e5dSmrg    case $host_os in
35076fae4e5dSmrg    cygwin*)
35086fae4e5dSmrg      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
35096fae4e5dSmrg      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
35106fae4e5dSmrgm4_if([$1], [],[
35116fae4e5dSmrg      sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
35126fae4e5dSmrg      ;;
35136fae4e5dSmrg    mingw* | cegcc*)
35146fae4e5dSmrg      # MinGW DLLs use traditional 'lib' prefix
35156fae4e5dSmrg      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
35166fae4e5dSmrg      ;;
35176fae4e5dSmrg    pw32*)
35186fae4e5dSmrg      # pw32 DLLs use 'pw' prefix rather than 'lib'
35196fae4e5dSmrg      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
35206fae4e5dSmrg      ;;
35216fae4e5dSmrg    esac
35226fae4e5dSmrg    dynamic_linker='Win32 ld.exe'
35236fae4e5dSmrg    ;;
35246fae4e5dSmrg
35256fae4e5dSmrg  *,cl*)
35266fae4e5dSmrg    # Native MSVC
35276fae4e5dSmrg    libname_spec='$name'
35286fae4e5dSmrg    soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
35296fae4e5dSmrg    library_names_spec='${libname}.dll.lib'
35306fae4e5dSmrg
35316fae4e5dSmrg    case $build_os in
35326fae4e5dSmrg    mingw*)
35336fae4e5dSmrg      sys_lib_search_path_spec=
35346fae4e5dSmrg      lt_save_ifs=$IFS
35356fae4e5dSmrg      IFS=';'
35366fae4e5dSmrg      for lt_path in $LIB
35376fae4e5dSmrg      do
35386fae4e5dSmrg        IFS=$lt_save_ifs
35396fae4e5dSmrg        # Let DOS variable expansion print the short 8.3 style file name.
35406fae4e5dSmrg        lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
35416fae4e5dSmrg        sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
35426fae4e5dSmrg      done
35436fae4e5dSmrg      IFS=$lt_save_ifs
35446fae4e5dSmrg      # Convert to MSYS style.
35456fae4e5dSmrg      sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
35466fae4e5dSmrg      ;;
35476fae4e5dSmrg    cygwin*)
35486fae4e5dSmrg      # Convert to unix form, then to dos form, then back to unix form
35496fae4e5dSmrg      # but this time dos style (no spaces!) so that the unix form looks
35506fae4e5dSmrg      # like /cygdrive/c/PROGRA~1:/cygdr...
35516fae4e5dSmrg      sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
35526fae4e5dSmrg      sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
35536fae4e5dSmrg      sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
35546fae4e5dSmrg      ;;
35556fae4e5dSmrg    *)
35566fae4e5dSmrg      sys_lib_search_path_spec="$LIB"
35576fae4e5dSmrg      if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
35586fae4e5dSmrg        # It is most probably a Windows format PATH.
35596fae4e5dSmrg        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
35606fae4e5dSmrg      else
35616fae4e5dSmrg        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
35626fae4e5dSmrg      fi
35636fae4e5dSmrg      # FIXME: find the short name or the path components, as spaces are
35646fae4e5dSmrg      # common. (e.g. "Program Files" -> "PROGRA~1")
35656fae4e5dSmrg      ;;
35666fae4e5dSmrg    esac
35676fae4e5dSmrg
35686fae4e5dSmrg    # DLL is installed to $(libdir)/../bin by postinstall_cmds
35696fae4e5dSmrg    postinstall_cmds='base_file=`basename \${file}`~
35706fae4e5dSmrg      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
35716fae4e5dSmrg      dldir=$destdir/`dirname \$dlpath`~
35726fae4e5dSmrg      test -d \$dldir || mkdir -p \$dldir~
35736fae4e5dSmrg      $install_prog $dir/$dlname \$dldir/$dlname'
35746fae4e5dSmrg    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
35756fae4e5dSmrg      dlpath=$dir/\$dldll~
35766fae4e5dSmrg       $RM \$dlpath'
35776fae4e5dSmrg    shlibpath_overrides_runpath=yes
35786fae4e5dSmrg    dynamic_linker='Win32 link.exe'
35799c9ff80cSmrg    ;;
35801f0ac6a5Smrg
35811f0ac6a5Smrg  *)
35826fae4e5dSmrg    # Assume MSVC wrapper
35836fae4e5dSmrg    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
35846fae4e5dSmrg    dynamic_linker='Win32 ld.exe'
35851f0ac6a5Smrg    ;;
35861f0ac6a5Smrg  esac
35876fae4e5dSmrg  # FIXME: first we should search . and the directory the executable is in
35886fae4e5dSmrg  shlibpath_var=PATH
35896fae4e5dSmrg  ;;
35901f0ac6a5Smrg
35916fae4e5dSmrgdarwin* | rhapsody*)
35926fae4e5dSmrg  dynamic_linker="$host_os dyld"
35936fae4e5dSmrg  version_type=darwin
35946fae4e5dSmrg  need_lib_prefix=no
35956fae4e5dSmrg  need_version=no
35966fae4e5dSmrg  library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
35976fae4e5dSmrg  soname_spec='${libname}${release}${major}$shared_ext'
35986fae4e5dSmrg  shlibpath_overrides_runpath=yes
35996fae4e5dSmrg  shlibpath_var=DYLD_LIBRARY_PATH
36006fae4e5dSmrg  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
36016fae4e5dSmrgm4_if([$1], [],[
36026fae4e5dSmrg  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
36036fae4e5dSmrg  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
36046fae4e5dSmrg  ;;
36051f0ac6a5Smrg
36066fae4e5dSmrgdgux*)
360789c04b6cSmrg  version_type=linux # correct to gnu/linux during the next big refactor
36086fae4e5dSmrg  need_lib_prefix=no
36096fae4e5dSmrg  need_version=no
36106fae4e5dSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
361189c04b6cSmrg  soname_spec='${libname}${release}${shared_ext}$major'
361289c04b6cSmrg  shlibpath_var=LD_LIBRARY_PATH
36136fae4e5dSmrg  ;;
36141f0ac6a5Smrg
36156fae4e5dSmrgfreebsd* | dragonfly*)
36166fae4e5dSmrg  # DragonFly does not have aout.  When/if they implement a new
36176fae4e5dSmrg  # versioning mechanism, adjust this.
36186fae4e5dSmrg  if test -x /usr/bin/objformat; then
36196fae4e5dSmrg    objformat=`/usr/bin/objformat`
36206fae4e5dSmrg  else
36216fae4e5dSmrg    case $host_os in
362289c04b6cSmrg    freebsd[[23]].*) objformat=aout ;;
36236fae4e5dSmrg    *) objformat=elf ;;
36246fae4e5dSmrg    esac
36256fae4e5dSmrg  fi
36266fae4e5dSmrg  version_type=freebsd-$objformat
36276fae4e5dSmrg  case $version_type in
36286fae4e5dSmrg    freebsd-elf*)
36296fae4e5dSmrg      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
36306fae4e5dSmrg      need_version=no
36316fae4e5dSmrg      need_lib_prefix=no
36326fae4e5dSmrg      ;;
36336fae4e5dSmrg    freebsd-*)
36346fae4e5dSmrg      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
36356fae4e5dSmrg      need_version=yes
36366fae4e5dSmrg      ;;
36376fae4e5dSmrg  esac
36386fae4e5dSmrg  shlibpath_var=LD_LIBRARY_PATH
36396fae4e5dSmrg  case $host_os in
364089c04b6cSmrg  freebsd2.*)
36416fae4e5dSmrg    shlibpath_overrides_runpath=yes
36426fae4e5dSmrg    ;;
36436fae4e5dSmrg  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
36446fae4e5dSmrg    shlibpath_overrides_runpath=yes
36456fae4e5dSmrg    hardcode_into_libs=yes
36466fae4e5dSmrg    ;;
36476fae4e5dSmrg  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
36486fae4e5dSmrg  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
36496fae4e5dSmrg    shlibpath_overrides_runpath=no
36506fae4e5dSmrg    hardcode_into_libs=yes
36516fae4e5dSmrg    ;;
36526fae4e5dSmrg  *) # from 4.6 on, and DragonFly
36536fae4e5dSmrg    shlibpath_overrides_runpath=yes
36546fae4e5dSmrg    hardcode_into_libs=yes
36556fae4e5dSmrg    ;;
36566fae4e5dSmrg  esac
36576fae4e5dSmrg  ;;
36581f0ac6a5Smrg
36596fae4e5dSmrggnu*)
366089c04b6cSmrg  version_type=linux # correct to gnu/linux during the next big refactor
36616fae4e5dSmrg  need_lib_prefix=no
36626fae4e5dSmrg  need_version=no
36636fae4e5dSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
36646fae4e5dSmrg  soname_spec='${libname}${release}${shared_ext}$major'
36656fae4e5dSmrg  shlibpath_var=LD_LIBRARY_PATH
366689c04b6cSmrg  shlibpath_overrides_runpath=no
36676fae4e5dSmrg  hardcode_into_libs=yes
36686fae4e5dSmrg  ;;
36691f0ac6a5Smrg
36706fae4e5dSmrghaiku*)
367189c04b6cSmrg  version_type=linux # correct to gnu/linux during the next big refactor
36726fae4e5dSmrg  need_lib_prefix=no
36736fae4e5dSmrg  need_version=no
36746fae4e5dSmrg  dynamic_linker="$host_os runtime_loader"
36756fae4e5dSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
36766fae4e5dSmrg  soname_spec='${libname}${release}${shared_ext}$major'
36776fae4e5dSmrg  shlibpath_var=LIBRARY_PATH
36786fae4e5dSmrg  shlibpath_overrides_runpath=yes
36796fae4e5dSmrg  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
36806fae4e5dSmrg  hardcode_into_libs=yes
36816fae4e5dSmrg  ;;
36821f0ac6a5Smrg
36836fae4e5dSmrghpux9* | hpux10* | hpux11*)
36846fae4e5dSmrg  # Give a soname corresponding to the major version so that dld.sl refuses to
36856fae4e5dSmrg  # link against other versions.
36866fae4e5dSmrg  version_type=sunos
36876fae4e5dSmrg  need_lib_prefix=no
36886fae4e5dSmrg  need_version=no
36896fae4e5dSmrg  case $host_cpu in
36906fae4e5dSmrg  ia64*)
36916fae4e5dSmrg    shrext_cmds='.so'
36926fae4e5dSmrg    hardcode_into_libs=yes
36936fae4e5dSmrg    dynamic_linker="$host_os dld.so"
36946fae4e5dSmrg    shlibpath_var=LD_LIBRARY_PATH
36956fae4e5dSmrg    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
36966fae4e5dSmrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
36976fae4e5dSmrg    soname_spec='${libname}${release}${shared_ext}$major'
36986fae4e5dSmrg    if test "X$HPUX_IA64_MODE" = X32; then
36996fae4e5dSmrg      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
37006fae4e5dSmrg    else
37016fae4e5dSmrg      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
37026fae4e5dSmrg    fi
37036fae4e5dSmrg    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
37046fae4e5dSmrg    ;;
37056fae4e5dSmrg  hppa*64*)
37066fae4e5dSmrg    shrext_cmds='.sl'
37076fae4e5dSmrg    hardcode_into_libs=yes
37086fae4e5dSmrg    dynamic_linker="$host_os dld.sl"
37096fae4e5dSmrg    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
37106fae4e5dSmrg    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
37116fae4e5dSmrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
37126fae4e5dSmrg    soname_spec='${libname}${release}${shared_ext}$major'
37136fae4e5dSmrg    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
37146fae4e5dSmrg    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
37156fae4e5dSmrg    ;;
37166fae4e5dSmrg  *)
37176fae4e5dSmrg    shrext_cmds='.sl'
37186fae4e5dSmrg    dynamic_linker="$host_os dld.sl"
37196fae4e5dSmrg    shlibpath_var=SHLIB_PATH
37206fae4e5dSmrg    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
37216fae4e5dSmrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
37226fae4e5dSmrg    soname_spec='${libname}${release}${shared_ext}$major'
37231f0ac6a5Smrg    ;;
37241f0ac6a5Smrg  esac
37256fae4e5dSmrg  # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
37266fae4e5dSmrg  postinstall_cmds='chmod 555 $lib'
37276fae4e5dSmrg  # or fails outright, so override atomically:
37286fae4e5dSmrg  install_override_mode=555
37296fae4e5dSmrg  ;;
37301f0ac6a5Smrg
37316fae4e5dSmrginterix[[3-9]]*)
373289c04b6cSmrg  version_type=linux # correct to gnu/linux during the next big refactor
37336fae4e5dSmrg  need_lib_prefix=no
37346fae4e5dSmrg  need_version=no
37356fae4e5dSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
37366fae4e5dSmrg  soname_spec='${libname}${release}${shared_ext}$major'
37376fae4e5dSmrg  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
37386fae4e5dSmrg  shlibpath_var=LD_LIBRARY_PATH
37396fae4e5dSmrg  shlibpath_overrides_runpath=no
37406fae4e5dSmrg  hardcode_into_libs=yes
37416fae4e5dSmrg  ;;
37421f0ac6a5Smrg
37436fae4e5dSmrgirix5* | irix6* | nonstopux*)
37446fae4e5dSmrg  case $host_os in
37456fae4e5dSmrg    nonstopux*) version_type=nonstopux ;;
37466fae4e5dSmrg    *)
37476fae4e5dSmrg	if test "$lt_cv_prog_gnu_ld" = yes; then
374889c04b6cSmrg		version_type=linux # correct to gnu/linux during the next big refactor
37496fae4e5dSmrg	else
37506fae4e5dSmrg		version_type=irix
37516fae4e5dSmrg	fi ;;
37521f0ac6a5Smrg  esac
37536fae4e5dSmrg  need_lib_prefix=no
37546fae4e5dSmrg  need_version=no
37556fae4e5dSmrg  soname_spec='${libname}${release}${shared_ext}$major'
37566fae4e5dSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
37576fae4e5dSmrg  case $host_os in
37586fae4e5dSmrg  irix5* | nonstopux*)
37596fae4e5dSmrg    libsuff= shlibsuff=
37606fae4e5dSmrg    ;;
37616fae4e5dSmrg  *)
37626fae4e5dSmrg    case $LD in # libtool.m4 will add one of these switches to LD
37636fae4e5dSmrg    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
37646fae4e5dSmrg      libsuff= shlibsuff= libmagic=32-bit;;
37656fae4e5dSmrg    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
37666fae4e5dSmrg      libsuff=32 shlibsuff=N32 libmagic=N32;;
37676fae4e5dSmrg    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
37686fae4e5dSmrg      libsuff=64 shlibsuff=64 libmagic=64-bit;;
37696fae4e5dSmrg    *) libsuff= shlibsuff= libmagic=never-match;;
37706fae4e5dSmrg    esac
37716fae4e5dSmrg    ;;
37726fae4e5dSmrg  esac
37736fae4e5dSmrg  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
37746fae4e5dSmrg  shlibpath_overrides_runpath=no
37756fae4e5dSmrg  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
37766fae4e5dSmrg  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
37776fae4e5dSmrg  hardcode_into_libs=yes
37786fae4e5dSmrg  ;;
37791f0ac6a5Smrg
37806fae4e5dSmrg# No shared lib support for Linux oldld, aout, or coff.
37816fae4e5dSmrglinux*oldld* | linux*aout* | linux*coff*)
37826fae4e5dSmrg  dynamic_linker=no
37836fae4e5dSmrg  ;;
37841f0ac6a5Smrg
378589c04b6cSmrg# This must be glibc/ELF.
37866fae4e5dSmrglinux* | k*bsd*-gnu | kopensolaris*-gnu)
378789c04b6cSmrg  version_type=linux # correct to gnu/linux during the next big refactor
37886fae4e5dSmrg  need_lib_prefix=no
37896fae4e5dSmrg  need_version=no
37906fae4e5dSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
37916fae4e5dSmrg  soname_spec='${libname}${release}${shared_ext}$major'
37926fae4e5dSmrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
37936fae4e5dSmrg  shlibpath_var=LD_LIBRARY_PATH
37946fae4e5dSmrg  shlibpath_overrides_runpath=no
37951f0ac6a5Smrg
37966fae4e5dSmrg  # Some binutils ld are patched to set DT_RUNPATH
37976fae4e5dSmrg  AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
37986fae4e5dSmrg    [lt_cv_shlibpath_overrides_runpath=no
37996fae4e5dSmrg    save_LDFLAGS=$LDFLAGS
38006fae4e5dSmrg    save_libdir=$libdir
38016fae4e5dSmrg    eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
38026fae4e5dSmrg	 LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
38036fae4e5dSmrg    AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
38046fae4e5dSmrg      [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
38056fae4e5dSmrg	 [lt_cv_shlibpath_overrides_runpath=yes])])
38066fae4e5dSmrg    LDFLAGS=$save_LDFLAGS
38076fae4e5dSmrg    libdir=$save_libdir
38086fae4e5dSmrg    ])
38096fae4e5dSmrg  shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
38101f0ac6a5Smrg
38116fae4e5dSmrg  # This implies no fast_install, which is unacceptable.
38126fae4e5dSmrg  # Some rework will be needed to allow for fast_install
38136fae4e5dSmrg  # before this can be enabled.
38146fae4e5dSmrg  hardcode_into_libs=yes
38156fae4e5dSmrg
38166fae4e5dSmrg  # Append ld.so.conf contents to the search path
38176fae4e5dSmrg  if test -f /etc/ld.so.conf; then
38186fae4e5dSmrg    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' ' '`
38196fae4e5dSmrg    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
38201f0ac6a5Smrg  fi
38211f0ac6a5Smrg
38226fae4e5dSmrg  # We used to test for /lib/ld.so.1 and disable shared libraries on
38236fae4e5dSmrg  # powerpc, because MkLinux only supported shared libraries with the
38246fae4e5dSmrg  # GNU dynamic linker.  Since this was broken with cross compilers,
38256fae4e5dSmrg  # most powerpc-linux boxes support dynamic linking these days and
38266fae4e5dSmrg  # people can always --disable-shared, the test was removed, and we
38276fae4e5dSmrg  # assume the GNU/Linux dynamic linker is in use.
38286fae4e5dSmrg  dynamic_linker='GNU/Linux ld.so'
38296fae4e5dSmrg  ;;
38301f0ac6a5Smrg
38316fae4e5dSmrgnetbsd*)
38326fae4e5dSmrg  version_type=sunos
38336fae4e5dSmrg  need_lib_prefix=no
38346fae4e5dSmrg  need_version=no
38356fae4e5dSmrg  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
38366fae4e5dSmrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
38376fae4e5dSmrg    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
38386fae4e5dSmrg    dynamic_linker='NetBSD (a.out) ld.so'
38396fae4e5dSmrg  else
38406fae4e5dSmrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
38416fae4e5dSmrg    soname_spec='${libname}${release}${shared_ext}$major'
38426fae4e5dSmrg    dynamic_linker='NetBSD ld.elf_so'
38436fae4e5dSmrg  fi
38446fae4e5dSmrg  shlibpath_var=LD_LIBRARY_PATH
38456fae4e5dSmrg  shlibpath_overrides_runpath=yes
38466fae4e5dSmrg  hardcode_into_libs=yes
38476fae4e5dSmrg  ;;
38481f0ac6a5Smrg
38496fae4e5dSmrgnewsos6)
385089c04b6cSmrg  version_type=linux # correct to gnu/linux during the next big refactor
38516fae4e5dSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
38526fae4e5dSmrg  shlibpath_var=LD_LIBRARY_PATH
38536fae4e5dSmrg  shlibpath_overrides_runpath=yes
38546fae4e5dSmrg  ;;
38551f0ac6a5Smrg
38566fae4e5dSmrg*nto* | *qnx*)
38576fae4e5dSmrg  version_type=qnx
38586fae4e5dSmrg  need_lib_prefix=no
38596fae4e5dSmrg  need_version=no
38606fae4e5dSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
38616fae4e5dSmrg  soname_spec='${libname}${release}${shared_ext}$major'
38626fae4e5dSmrg  shlibpath_var=LD_LIBRARY_PATH
38636fae4e5dSmrg  shlibpath_overrides_runpath=no
38646fae4e5dSmrg  hardcode_into_libs=yes
38656fae4e5dSmrg  dynamic_linker='ldqnx.so'
38666fae4e5dSmrg  ;;
38671f0ac6a5Smrg
38686fae4e5dSmrgopenbsd*)
38696fae4e5dSmrg  version_type=sunos
38706fae4e5dSmrg  sys_lib_dlsearch_path_spec="/usr/lib"
38716fae4e5dSmrg  need_lib_prefix=no
38726fae4e5dSmrg  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
38736fae4e5dSmrg  case $host_os in
38746fae4e5dSmrg    openbsd3.3 | openbsd3.3.*)	need_version=yes ;;
38756fae4e5dSmrg    *)				need_version=no  ;;
38766fae4e5dSmrg  esac
38776fae4e5dSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
38786fae4e5dSmrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
38796fae4e5dSmrg  shlibpath_var=LD_LIBRARY_PATH
38806fae4e5dSmrg  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
38816fae4e5dSmrg    case $host_os in
38826fae4e5dSmrg      openbsd2.[[89]] | openbsd2.[[89]].*)
38836fae4e5dSmrg	shlibpath_overrides_runpath=no
38846fae4e5dSmrg	;;
38856fae4e5dSmrg      *)
38866fae4e5dSmrg	shlibpath_overrides_runpath=yes
38876fae4e5dSmrg	;;
38886fae4e5dSmrg      esac
38891f0ac6a5Smrg  else
38906fae4e5dSmrg    shlibpath_overrides_runpath=yes
38911f0ac6a5Smrg  fi
38926fae4e5dSmrg  ;;
38931f0ac6a5Smrg
38946fae4e5dSmrgos2*)
38956fae4e5dSmrg  libname_spec='$name'
38966fae4e5dSmrg  shrext_cmds=".dll"
38976fae4e5dSmrg  need_lib_prefix=no
38986fae4e5dSmrg  library_names_spec='$libname${shared_ext} $libname.a'
38996fae4e5dSmrg  dynamic_linker='OS/2 ld.exe'
39006fae4e5dSmrg  shlibpath_var=LIBPATH
39016fae4e5dSmrg  ;;
39021f0ac6a5Smrg
39036fae4e5dSmrgosf3* | osf4* | osf5*)
39046fae4e5dSmrg  version_type=osf
39056fae4e5dSmrg  need_lib_prefix=no
39066fae4e5dSmrg  need_version=no
39076fae4e5dSmrg  soname_spec='${libname}${release}${shared_ext}$major'
39086fae4e5dSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
39096fae4e5dSmrg  shlibpath_var=LD_LIBRARY_PATH
39106fae4e5dSmrg  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
39116fae4e5dSmrg  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
39126fae4e5dSmrg  ;;
39131f0ac6a5Smrg
39146fae4e5dSmrgrdos*)
39156fae4e5dSmrg  dynamic_linker=no
39166fae4e5dSmrg  ;;
39171f0ac6a5Smrg
39186fae4e5dSmrgsolaris*)
391989c04b6cSmrg  version_type=linux # correct to gnu/linux during the next big refactor
39206fae4e5dSmrg  need_lib_prefix=no
39216fae4e5dSmrg  need_version=no
39226fae4e5dSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
39236fae4e5dSmrg  soname_spec='${libname}${release}${shared_ext}$major'
39246fae4e5dSmrg  shlibpath_var=LD_LIBRARY_PATH
39256fae4e5dSmrg  shlibpath_overrides_runpath=yes
39266fae4e5dSmrg  hardcode_into_libs=yes
39276fae4e5dSmrg  # ldd complains unless libraries are executable
39286fae4e5dSmrg  postinstall_cmds='chmod +x $lib'
39296fae4e5dSmrg  ;;
39301f0ac6a5Smrg
39316fae4e5dSmrgsunos4*)
39326fae4e5dSmrg  version_type=sunos
39336fae4e5dSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
39346fae4e5dSmrg  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
39356fae4e5dSmrg  shlibpath_var=LD_LIBRARY_PATH
39366fae4e5dSmrg  shlibpath_overrides_runpath=yes
39376fae4e5dSmrg  if test "$with_gnu_ld" = yes; then
39386fae4e5dSmrg    need_lib_prefix=no
39391f0ac6a5Smrg  fi
39406fae4e5dSmrg  need_version=yes
39416fae4e5dSmrg  ;;
39421f0ac6a5Smrg
39436fae4e5dSmrgsysv4 | sysv4.3*)
394489c04b6cSmrg  version_type=linux # correct to gnu/linux during the next big refactor
39456fae4e5dSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
39461f0ac6a5Smrg  soname_spec='${libname}${release}${shared_ext}$major'
39476fae4e5dSmrg  shlibpath_var=LD_LIBRARY_PATH
39486fae4e5dSmrg  case $host_vendor in
39496fae4e5dSmrg    sni)
39506fae4e5dSmrg      shlibpath_overrides_runpath=no
39516fae4e5dSmrg      need_lib_prefix=no
39526fae4e5dSmrg      runpath_var=LD_RUN_PATH
39536fae4e5dSmrg      ;;
39546fae4e5dSmrg    siemens)
39556fae4e5dSmrg      need_lib_prefix=no
39566fae4e5dSmrg      ;;
39576fae4e5dSmrg    motorola)
39586fae4e5dSmrg      need_lib_prefix=no
39596fae4e5dSmrg      need_version=no
39606fae4e5dSmrg      shlibpath_overrides_runpath=no
39616fae4e5dSmrg      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
39626fae4e5dSmrg      ;;
39636fae4e5dSmrg  esac
39641f0ac6a5Smrg  ;;
39651f0ac6a5Smrg
39666fae4e5dSmrgsysv4*MP*)
39676fae4e5dSmrg  if test -d /usr/nec ;then
396889c04b6cSmrg    version_type=linux # correct to gnu/linux during the next big refactor
39696fae4e5dSmrg    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
39706fae4e5dSmrg    soname_spec='$libname${shared_ext}.$major'
39716fae4e5dSmrg    shlibpath_var=LD_LIBRARY_PATH
39726fae4e5dSmrg  fi
39736fae4e5dSmrg  ;;
39746fae4e5dSmrg
39756fae4e5dSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
39766fae4e5dSmrg  version_type=freebsd-elf
39771f0ac6a5Smrg  need_lib_prefix=no
39781f0ac6a5Smrg  need_version=no
39796fae4e5dSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
39806fae4e5dSmrg  soname_spec='${libname}${release}${shared_ext}$major'
39816fae4e5dSmrg  shlibpath_var=LD_LIBRARY_PATH
39826fae4e5dSmrg  shlibpath_overrides_runpath=yes
39831f0ac6a5Smrg  hardcode_into_libs=yes
39846fae4e5dSmrg  if test "$with_gnu_ld" = yes; then
39856fae4e5dSmrg    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
39861f0ac6a5Smrg  else
39876fae4e5dSmrg    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
39881f0ac6a5Smrg    case $host_os in
39896fae4e5dSmrg      sco3.2v5*)
39906fae4e5dSmrg        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
39916fae4e5dSmrg	;;
39921f0ac6a5Smrg    esac
39931f0ac6a5Smrg  fi
39946fae4e5dSmrg  sys_lib_dlsearch_path_spec='/usr/lib'
39951f0ac6a5Smrg  ;;
39961f0ac6a5Smrg
39976fae4e5dSmrgtpf*)
39986fae4e5dSmrg  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
399989c04b6cSmrg  version_type=linux # correct to gnu/linux during the next big refactor
40006fae4e5dSmrg  need_lib_prefix=no
40016fae4e5dSmrg  need_version=no
40026fae4e5dSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
40036fae4e5dSmrg  shlibpath_var=LD_LIBRARY_PATH
40046fae4e5dSmrg  shlibpath_overrides_runpath=no
40056fae4e5dSmrg  hardcode_into_libs=yes
40061f0ac6a5Smrg  ;;
40071f0ac6a5Smrg
40086fae4e5dSmrguts4*)
400989c04b6cSmrg  version_type=linux # correct to gnu/linux during the next big refactor
40101f0ac6a5Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
40111f0ac6a5Smrg  soname_spec='${libname}${release}${shared_ext}$major'
40121f0ac6a5Smrg  shlibpath_var=LD_LIBRARY_PATH
40131f0ac6a5Smrg  ;;
40141f0ac6a5Smrg
40156fae4e5dSmrg*)
40166fae4e5dSmrg  dynamic_linker=no
40176fae4e5dSmrg  ;;
40186fae4e5dSmrgesac
40196fae4e5dSmrgAC_MSG_RESULT([$dynamic_linker])
40206fae4e5dSmrgtest "$dynamic_linker" = no && can_build_shared=no
40211f0ac6a5Smrg
40226fae4e5dSmrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var"
40236fae4e5dSmrgif test "$GCC" = yes; then
40246fae4e5dSmrg  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
40256fae4e5dSmrgfi
40261f0ac6a5Smrg
40276fae4e5dSmrgif test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
40286fae4e5dSmrg  sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
40296fae4e5dSmrgfi
40306fae4e5dSmrgif test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
40316fae4e5dSmrg  sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
40326fae4e5dSmrgfi
40331f0ac6a5Smrg
40346fae4e5dSmrg_LT_DECL([], [variables_saved_for_relink], [1],
40356fae4e5dSmrg    [Variables whose values should be saved in libtool wrapper scripts and
40366fae4e5dSmrg    restored at link time])
40376fae4e5dSmrg_LT_DECL([], [need_lib_prefix], [0],
40386fae4e5dSmrg    [Do we need the "lib" prefix for modules?])
40396fae4e5dSmrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
40406fae4e5dSmrg_LT_DECL([], [version_type], [0], [Library versioning type])
40416fae4e5dSmrg_LT_DECL([], [runpath_var], [0],  [Shared library runtime path variable])
40426fae4e5dSmrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
40436fae4e5dSmrg_LT_DECL([], [shlibpath_overrides_runpath], [0],
40446fae4e5dSmrg    [Is shlibpath searched before the hard-coded library search path?])
40456fae4e5dSmrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix])
40466fae4e5dSmrg_LT_DECL([], [library_names_spec], [1],
40476fae4e5dSmrg    [[List of archive names.  First name is the real one, the rest are links.
40486fae4e5dSmrg    The last name is the one that the linker finds with -lNAME]])
40496fae4e5dSmrg_LT_DECL([], [soname_spec], [1],
40506fae4e5dSmrg    [[The coded name of the library, if different from the real name]])
40516fae4e5dSmrg_LT_DECL([], [install_override_mode], [1],
40526fae4e5dSmrg    [Permission mode override for installation of shared libraries])
40536fae4e5dSmrg_LT_DECL([], [postinstall_cmds], [2],
40546fae4e5dSmrg    [Command to use after installation of a shared archive])
40556fae4e5dSmrg_LT_DECL([], [postuninstall_cmds], [2],
40566fae4e5dSmrg    [Command to use after uninstallation of a shared archive])
40576fae4e5dSmrg_LT_DECL([], [finish_cmds], [2],
40586fae4e5dSmrg    [Commands used to finish a libtool library installation in a directory])
40596fae4e5dSmrg_LT_DECL([], [finish_eval], [1],
40606fae4e5dSmrg    [[As "finish_cmds", except a single script fragment to be evaled but
40616fae4e5dSmrg    not shown]])
40626fae4e5dSmrg_LT_DECL([], [hardcode_into_libs], [0],
40636fae4e5dSmrg    [Whether we should hardcode library paths into libraries])
40646fae4e5dSmrg_LT_DECL([], [sys_lib_search_path_spec], [2],
40656fae4e5dSmrg    [Compile-time system search path for libraries])
40666fae4e5dSmrg_LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
40676fae4e5dSmrg    [Run-time system search path for libraries])
40686fae4e5dSmrg])# _LT_SYS_DYNAMIC_LINKER
40691f0ac6a5Smrg
40706fae4e5dSmrg
40716fae4e5dSmrg# _LT_PATH_TOOL_PREFIX(TOOL)
40726fae4e5dSmrg# --------------------------
40736fae4e5dSmrg# find a file program which can recognize shared library
40746fae4e5dSmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX],
40756fae4e5dSmrg[m4_require([_LT_DECL_EGREP])dnl
40766fae4e5dSmrgAC_MSG_CHECKING([for $1])
40776fae4e5dSmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
40786fae4e5dSmrg[case $MAGIC_CMD in
40796fae4e5dSmrg[[\\/*] |  ?:[\\/]*])
40806fae4e5dSmrg  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
40811f0ac6a5Smrg  ;;
40826fae4e5dSmrg*)
40836fae4e5dSmrg  lt_save_MAGIC_CMD="$MAGIC_CMD"
40846fae4e5dSmrg  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
40856fae4e5dSmrgdnl $ac_dummy forces splitting on constant user-supplied paths.
40866fae4e5dSmrgdnl POSIX.2 word splitting is done only on the output of word expansions,
40876fae4e5dSmrgdnl not every word.  This closes a longstanding sh security hole.
40886fae4e5dSmrg  ac_dummy="m4_if([$2], , $PATH, [$2])"
40896fae4e5dSmrg  for ac_dir in $ac_dummy; do
40906fae4e5dSmrg    IFS="$lt_save_ifs"
40916fae4e5dSmrg    test -z "$ac_dir" && ac_dir=.
40926fae4e5dSmrg    if test -f $ac_dir/$1; then
40936fae4e5dSmrg      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
40946fae4e5dSmrg      if test -n "$file_magic_test_file"; then
40956fae4e5dSmrg	case $deplibs_check_method in
40966fae4e5dSmrg	"file_magic "*)
40976fae4e5dSmrg	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
40986fae4e5dSmrg	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
40996fae4e5dSmrg	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
41006fae4e5dSmrg	    $EGREP "$file_magic_regex" > /dev/null; then
41016fae4e5dSmrg	    :
41026fae4e5dSmrg	  else
41036fae4e5dSmrg	    cat <<_LT_EOF 1>&2
41041f0ac6a5Smrg
41056fae4e5dSmrg*** Warning: the command libtool uses to detect shared libraries,
41066fae4e5dSmrg*** $file_magic_cmd, produces output that libtool cannot recognize.
41076fae4e5dSmrg*** The result is that libtool may fail to recognize shared libraries
41086fae4e5dSmrg*** as such.  This will affect the creation of libtool libraries that
41096fae4e5dSmrg*** depend on shared libraries, but programs linked with such libtool
41106fae4e5dSmrg*** libraries will work regardless of this problem.  Nevertheless, you
41116fae4e5dSmrg*** may want to report the problem to your system manager and/or to
41126fae4e5dSmrg*** bug-libtool@gnu.org
41136fae4e5dSmrg
41146fae4e5dSmrg_LT_EOF
41156fae4e5dSmrg	  fi ;;
41166fae4e5dSmrg	esac
41176fae4e5dSmrg      fi
41186fae4e5dSmrg      break
41196fae4e5dSmrg    fi
41206fae4e5dSmrg  done
41216fae4e5dSmrg  IFS="$lt_save_ifs"
41226fae4e5dSmrg  MAGIC_CMD="$lt_save_MAGIC_CMD"
41231f0ac6a5Smrg  ;;
41246fae4e5dSmrgesac])
41256fae4e5dSmrgMAGIC_CMD="$lt_cv_path_MAGIC_CMD"
41266fae4e5dSmrgif test -n "$MAGIC_CMD"; then
41276fae4e5dSmrg  AC_MSG_RESULT($MAGIC_CMD)
41286fae4e5dSmrgelse
41296fae4e5dSmrg  AC_MSG_RESULT(no)
41306fae4e5dSmrgfi
41316fae4e5dSmrg_LT_DECL([], [MAGIC_CMD], [0],
41326fae4e5dSmrg	 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
41336fae4e5dSmrg])# _LT_PATH_TOOL_PREFIX
41341f0ac6a5Smrg
41356fae4e5dSmrg# Old name:
41366fae4e5dSmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
41376fae4e5dSmrgdnl aclocal-1.4 backwards compatibility:
41386fae4e5dSmrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
41396fae4e5dSmrg
41406fae4e5dSmrg
41416fae4e5dSmrg# _LT_PATH_MAGIC
41426fae4e5dSmrg# --------------
41436fae4e5dSmrg# find a file program which can recognize a shared library
41446fae4e5dSmrgm4_defun([_LT_PATH_MAGIC],
41456fae4e5dSmrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
41466fae4e5dSmrgif test -z "$lt_cv_path_MAGIC_CMD"; then
41476fae4e5dSmrg  if test -n "$ac_tool_prefix"; then
41486fae4e5dSmrg    _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
41491f0ac6a5Smrg  else
41506fae4e5dSmrg    MAGIC_CMD=:
41511f0ac6a5Smrg  fi
41526fae4e5dSmrgfi
41536fae4e5dSmrg])# _LT_PATH_MAGIC
41541f0ac6a5Smrg
41551f0ac6a5Smrg
41566fae4e5dSmrg# LT_PATH_LD
41576fae4e5dSmrg# ----------
41586fae4e5dSmrg# find the pathname to the GNU or non-GNU linker
41596fae4e5dSmrgAC_DEFUN([LT_PATH_LD],
41606fae4e5dSmrg[AC_REQUIRE([AC_PROG_CC])dnl
41616fae4e5dSmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl
41626fae4e5dSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl
41636fae4e5dSmrgm4_require([_LT_DECL_SED])dnl
41646fae4e5dSmrgm4_require([_LT_DECL_EGREP])dnl
41656fae4e5dSmrgm4_require([_LT_PROG_ECHO_BACKSLASH])dnl
41661f0ac6a5Smrg
41676fae4e5dSmrgAC_ARG_WITH([gnu-ld],
41686fae4e5dSmrg    [AS_HELP_STRING([--with-gnu-ld],
41696fae4e5dSmrg	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
41706fae4e5dSmrg    [test "$withval" = no || with_gnu_ld=yes],
41716fae4e5dSmrg    [with_gnu_ld=no])dnl
41721f0ac6a5Smrg
41736fae4e5dSmrgac_prog=ld
41746fae4e5dSmrgif test "$GCC" = yes; then
41756fae4e5dSmrg  # Check if gcc -print-prog-name=ld gives a path.
41766fae4e5dSmrg  AC_MSG_CHECKING([for ld used by $CC])
41776fae4e5dSmrg  case $host in
41786fae4e5dSmrg  *-*-mingw*)
41796fae4e5dSmrg    # gcc leaves a trailing carriage return which upsets mingw
41806fae4e5dSmrg    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
41816fae4e5dSmrg  *)
41826fae4e5dSmrg    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
41831f0ac6a5Smrg  esac
41846fae4e5dSmrg  case $ac_prog in
41856fae4e5dSmrg    # Accept absolute paths.
41866fae4e5dSmrg    [[\\/]]* | ?:[[\\/]]*)
41876fae4e5dSmrg      re_direlt='/[[^/]][[^/]]*/\.\./'
41886fae4e5dSmrg      # Canonicalize the pathname of ld
41896fae4e5dSmrg      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
41906fae4e5dSmrg      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
41916fae4e5dSmrg	ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
41926fae4e5dSmrg      done
41936fae4e5dSmrg      test -z "$LD" && LD="$ac_prog"
41946fae4e5dSmrg      ;;
41956fae4e5dSmrg  "")
41966fae4e5dSmrg    # If it fails, then pretend we aren't using GCC.
41976fae4e5dSmrg    ac_prog=ld
41981f0ac6a5Smrg    ;;
41991f0ac6a5Smrg  *)
42006fae4e5dSmrg    # If it is relative, then search for the first ld in PATH.
42016fae4e5dSmrg    with_gnu_ld=unknown
42021f0ac6a5Smrg    ;;
42031f0ac6a5Smrg  esac
42046fae4e5dSmrgelif test "$with_gnu_ld" = yes; then
42056fae4e5dSmrg  AC_MSG_CHECKING([for GNU ld])
42066fae4e5dSmrgelse
42076fae4e5dSmrg  AC_MSG_CHECKING([for non-GNU ld])
42086fae4e5dSmrgfi
42096fae4e5dSmrgAC_CACHE_VAL(lt_cv_path_LD,
42106fae4e5dSmrg[if test -z "$LD"; then
42116fae4e5dSmrg  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
42126fae4e5dSmrg  for ac_dir in $PATH; do
42136fae4e5dSmrg    IFS="$lt_save_ifs"
42146fae4e5dSmrg    test -z "$ac_dir" && ac_dir=.
42156fae4e5dSmrg    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
42166fae4e5dSmrg      lt_cv_path_LD="$ac_dir/$ac_prog"
42176fae4e5dSmrg      # Check to see if the program is GNU ld.  I'd rather use --version,
42186fae4e5dSmrg      # but apparently some variants of GNU ld only accept -v.
42196fae4e5dSmrg      # Break only if it was the GNU/non-GNU ld that we prefer.
42206fae4e5dSmrg      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
42216fae4e5dSmrg      *GNU* | *'with BFD'*)
42226fae4e5dSmrg	test "$with_gnu_ld" != no && break
42236fae4e5dSmrg	;;
42246fae4e5dSmrg      *)
42256fae4e5dSmrg	test "$with_gnu_ld" != yes && break
42266fae4e5dSmrg	;;
42276fae4e5dSmrg      esac
42286fae4e5dSmrg    fi
42296fae4e5dSmrg  done
42306fae4e5dSmrg  IFS="$lt_save_ifs"
42316fae4e5dSmrgelse
42326fae4e5dSmrg  lt_cv_path_LD="$LD" # Let the user override the test with a path.
42336fae4e5dSmrgfi])
42346fae4e5dSmrgLD="$lt_cv_path_LD"
42356fae4e5dSmrgif test -n "$LD"; then
42366fae4e5dSmrg  AC_MSG_RESULT($LD)
42376fae4e5dSmrgelse
42386fae4e5dSmrg  AC_MSG_RESULT(no)
42396fae4e5dSmrgfi
42406fae4e5dSmrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
42416fae4e5dSmrg_LT_PATH_LD_GNU
42426fae4e5dSmrgAC_SUBST([LD])
42439c9ff80cSmrg
42446fae4e5dSmrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
42456fae4e5dSmrg])# LT_PATH_LD
42461f0ac6a5Smrg
42476fae4e5dSmrg# Old names:
42486fae4e5dSmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
42496fae4e5dSmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
42506fae4e5dSmrgdnl aclocal-1.4 backwards compatibility:
42516fae4e5dSmrgdnl AC_DEFUN([AM_PROG_LD], [])
42526fae4e5dSmrgdnl AC_DEFUN([AC_PROG_LD], [])
42531f0ac6a5Smrg
42541f0ac6a5Smrg
42556fae4e5dSmrg# _LT_PATH_LD_GNU
42566fae4e5dSmrg#- --------------
42576fae4e5dSmrgm4_defun([_LT_PATH_LD_GNU],
42586fae4e5dSmrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
42596fae4e5dSmrg[# I'd rather use --version here, but apparently some GNU lds only accept -v.
42606fae4e5dSmrgcase `$LD -v 2>&1 </dev/null` in
42616fae4e5dSmrg*GNU* | *'with BFD'*)
42626fae4e5dSmrg  lt_cv_prog_gnu_ld=yes
42631f0ac6a5Smrg  ;;
42646fae4e5dSmrg*)
42656fae4e5dSmrg  lt_cv_prog_gnu_ld=no
42661f0ac6a5Smrg  ;;
42676fae4e5dSmrgesac])
42686fae4e5dSmrgwith_gnu_ld=$lt_cv_prog_gnu_ld
42696fae4e5dSmrg])# _LT_PATH_LD_GNU
42701f0ac6a5Smrg
42711f0ac6a5Smrg
42726fae4e5dSmrg# _LT_CMD_RELOAD
42736fae4e5dSmrg# --------------
42746fae4e5dSmrg# find reload flag for linker
42756fae4e5dSmrg#   -- PORTME Some linkers may need a different reload flag.
42766fae4e5dSmrgm4_defun([_LT_CMD_RELOAD],
42776fae4e5dSmrg[AC_CACHE_CHECK([for $LD option to reload object files],
42786fae4e5dSmrg  lt_cv_ld_reload_flag,
42796fae4e5dSmrg  [lt_cv_ld_reload_flag='-r'])
42806fae4e5dSmrgreload_flag=$lt_cv_ld_reload_flag
42816fae4e5dSmrgcase $reload_flag in
42826fae4e5dSmrg"" | " "*) ;;
42836fae4e5dSmrg*) reload_flag=" $reload_flag" ;;
42846fae4e5dSmrgesac
42856fae4e5dSmrgreload_cmds='$LD$reload_flag -o $output$reload_objs'
42866fae4e5dSmrgcase $host_os in
42876fae4e5dSmrg  cygwin* | mingw* | pw32* | cegcc*)
42886fae4e5dSmrg    if test "$GCC" != yes; then
42896fae4e5dSmrg      reload_cmds=false
42906fae4e5dSmrg    fi
42916fae4e5dSmrg    ;;
42926fae4e5dSmrg  darwin*)
42936fae4e5dSmrg    if test "$GCC" = yes; then
42946fae4e5dSmrg      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
42956fae4e5dSmrg    else
42966fae4e5dSmrg      reload_cmds='$LD$reload_flag -o $output$reload_objs'
42976fae4e5dSmrg    fi
42986fae4e5dSmrg    ;;
42996fae4e5dSmrgesac
43006fae4e5dSmrg_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
43016fae4e5dSmrg_LT_TAGDECL([], [reload_cmds], [2])dnl
43026fae4e5dSmrg])# _LT_CMD_RELOAD
43036fae4e5dSmrg
43046fae4e5dSmrg
43056fae4e5dSmrg# _LT_CHECK_MAGIC_METHOD
43066fae4e5dSmrg# ----------------------
43076fae4e5dSmrg# how to check for library dependencies
43086fae4e5dSmrg#  -- PORTME fill in with the dynamic library characteristics
43096fae4e5dSmrgm4_defun([_LT_CHECK_MAGIC_METHOD],
43106fae4e5dSmrg[m4_require([_LT_DECL_EGREP])
43116fae4e5dSmrgm4_require([_LT_DECL_OBJDUMP])
43126fae4e5dSmrgAC_CACHE_CHECK([how to recognize dependent libraries],
43136fae4e5dSmrglt_cv_deplibs_check_method,
43146fae4e5dSmrg[lt_cv_file_magic_cmd='$MAGIC_CMD'
43156fae4e5dSmrglt_cv_file_magic_test_file=
43166fae4e5dSmrglt_cv_deplibs_check_method='unknown'
43176fae4e5dSmrg# Need to set the preceding variable on all platforms that support
43186fae4e5dSmrg# interlibrary dependencies.
43196fae4e5dSmrg# 'none' -- dependencies not supported.
43206fae4e5dSmrg# `unknown' -- same as none, but documents that we really don't know.
43216fae4e5dSmrg# 'pass_all' -- all dependencies passed with no checks.
43226fae4e5dSmrg# 'test_compile' -- check by making test program.
43236fae4e5dSmrg# 'file_magic [[regex]]' -- check by looking for files in library path
43246fae4e5dSmrg# which responds to the $file_magic_cmd with a given extended regex.
43256fae4e5dSmrg# If you have `file' or equivalent on your system and you're not sure
43266fae4e5dSmrg# whether `pass_all' will *always* work, you probably want this one.
43276fae4e5dSmrg
43286fae4e5dSmrgcase $host_os in
43296fae4e5dSmrgaix[[4-9]]*)
43306fae4e5dSmrg  lt_cv_deplibs_check_method=pass_all
43316fae4e5dSmrg  ;;
43326fae4e5dSmrg
43336fae4e5dSmrgbeos*)
43346fae4e5dSmrg  lt_cv_deplibs_check_method=pass_all
43356fae4e5dSmrg  ;;
43366fae4e5dSmrg
43376fae4e5dSmrgbsdi[[45]]*)
43386fae4e5dSmrg  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
43396fae4e5dSmrg  lt_cv_file_magic_cmd='/usr/bin/file -L'
43406fae4e5dSmrg  lt_cv_file_magic_test_file=/shlib/libc.so
43416fae4e5dSmrg  ;;
43426fae4e5dSmrg
43436fae4e5dSmrgcygwin*)
43446fae4e5dSmrg  # func_win32_libid is a shell function defined in ltmain.sh
43456fae4e5dSmrg  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
43466fae4e5dSmrg  lt_cv_file_magic_cmd='func_win32_libid'
43476fae4e5dSmrg  ;;
43486fae4e5dSmrg
43496fae4e5dSmrgmingw* | pw32*)
43506fae4e5dSmrg  # Base MSYS/MinGW do not provide the 'file' command needed by
43516fae4e5dSmrg  # func_win32_libid shell function, so use a weaker test based on 'objdump',
43526fae4e5dSmrg  # unless we find 'file', for example because we are cross-compiling.
43536fae4e5dSmrg  # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
43546fae4e5dSmrg  if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
43556fae4e5dSmrg    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
43566fae4e5dSmrg    lt_cv_file_magic_cmd='func_win32_libid'
43571f0ac6a5Smrg  else
43586fae4e5dSmrg    # Keep this pattern in sync with the one in func_win32_libid.
43596fae4e5dSmrg    lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
43606fae4e5dSmrg    lt_cv_file_magic_cmd='$OBJDUMP -f'
43611f0ac6a5Smrg  fi
43621f0ac6a5Smrg  ;;
43631f0ac6a5Smrg
43646fae4e5dSmrgcegcc*)
43656fae4e5dSmrg  # use the weaker test based on 'objdump'. See mingw*.
43666fae4e5dSmrg  lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
43676fae4e5dSmrg  lt_cv_file_magic_cmd='$OBJDUMP -f'
43681f0ac6a5Smrg  ;;
43691f0ac6a5Smrg
43706fae4e5dSmrgdarwin* | rhapsody*)
43716fae4e5dSmrg  lt_cv_deplibs_check_method=pass_all
43721f0ac6a5Smrg  ;;
43731f0ac6a5Smrg
43746fae4e5dSmrgfreebsd* | dragonfly*)
43756fae4e5dSmrg  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
43766fae4e5dSmrg    case $host_cpu in
43776fae4e5dSmrg    i*86 )
43786fae4e5dSmrg      # Not sure whether the presence of OpenBSD here was a mistake.
43796fae4e5dSmrg      # Let's accept both of them until this is cleared up.
43806fae4e5dSmrg      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
43816fae4e5dSmrg      lt_cv_file_magic_cmd=/usr/bin/file
43826fae4e5dSmrg      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
43836fae4e5dSmrg      ;;
43846fae4e5dSmrg    esac
43856fae4e5dSmrg  else
43866fae4e5dSmrg    lt_cv_deplibs_check_method=pass_all
43876fae4e5dSmrg  fi
4388e5410a46Smrg  ;;
4389e5410a46Smrg
43906fae4e5dSmrggnu*)
43916fae4e5dSmrg  lt_cv_deplibs_check_method=pass_all
43921f0ac6a5Smrg  ;;
43931f0ac6a5Smrg
43946fae4e5dSmrghaiku*)
43956fae4e5dSmrg  lt_cv_deplibs_check_method=pass_all
43961f0ac6a5Smrg  ;;
43971f0ac6a5Smrg
43986fae4e5dSmrghpux10.20* | hpux11*)
43996fae4e5dSmrg  lt_cv_file_magic_cmd=/usr/bin/file
44006fae4e5dSmrg  case $host_cpu in
44016fae4e5dSmrg  ia64*)
44026fae4e5dSmrg    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
44036fae4e5dSmrg    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
44046fae4e5dSmrg    ;;
44056fae4e5dSmrg  hppa*64*)
44066fae4e5dSmrg    [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]']
44076fae4e5dSmrg    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
44086fae4e5dSmrg    ;;
44096fae4e5dSmrg  *)
44106fae4e5dSmrg    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
44116fae4e5dSmrg    lt_cv_file_magic_test_file=/usr/lib/libc.sl
44126fae4e5dSmrg    ;;
44131f0ac6a5Smrg  esac
44141f0ac6a5Smrg  ;;
44151f0ac6a5Smrg
44166fae4e5dSmrginterix[[3-9]]*)
44176fae4e5dSmrg  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
44186fae4e5dSmrg  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
44191f0ac6a5Smrg  ;;
44201f0ac6a5Smrg
44216fae4e5dSmrgirix5* | irix6* | nonstopux*)
44226fae4e5dSmrg  case $LD in
44236fae4e5dSmrg  *-32|*"-32 ") libmagic=32-bit;;
44246fae4e5dSmrg  *-n32|*"-n32 ") libmagic=N32;;
44256fae4e5dSmrg  *-64|*"-64 ") libmagic=64-bit;;
44266fae4e5dSmrg  *) libmagic=never-match;;
44276fae4e5dSmrg  esac
44286fae4e5dSmrg  lt_cv_deplibs_check_method=pass_all
44296fae4e5dSmrg  ;;
44306fae4e5dSmrg
443189c04b6cSmrg# This must be glibc/ELF.
44326fae4e5dSmrglinux* | k*bsd*-gnu | kopensolaris*-gnu)
44336fae4e5dSmrg  lt_cv_deplibs_check_method=pass_all
44346fae4e5dSmrg  ;;
44356fae4e5dSmrg
44366fae4e5dSmrgnetbsd*)
44376fae4e5dSmrg  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
44386fae4e5dSmrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
44391f0ac6a5Smrg  else
44406fae4e5dSmrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
44411f0ac6a5Smrg  fi
44421f0ac6a5Smrg  ;;
44431f0ac6a5Smrg
44446fae4e5dSmrgnewos6*)
44456fae4e5dSmrg  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
44466fae4e5dSmrg  lt_cv_file_magic_cmd=/usr/bin/file
44476fae4e5dSmrg  lt_cv_file_magic_test_file=/usr/lib/libnls.so
44489c9ff80cSmrg  ;;
44499c9ff80cSmrg
44506fae4e5dSmrg*nto* | *qnx*)
44516fae4e5dSmrg  lt_cv_deplibs_check_method=pass_all
44521f0ac6a5Smrg  ;;
44531f0ac6a5Smrg
44546fae4e5dSmrgopenbsd*)
44556fae4e5dSmrg  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
44566fae4e5dSmrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
44576fae4e5dSmrg  else
44586fae4e5dSmrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
44596fae4e5dSmrg  fi
44601f0ac6a5Smrg  ;;
44611f0ac6a5Smrg
44626fae4e5dSmrgosf3* | osf4* | osf5*)
44636fae4e5dSmrg  lt_cv_deplibs_check_method=pass_all
44646fae4e5dSmrg  ;;
44651f0ac6a5Smrg
44666fae4e5dSmrgrdos*)
44676fae4e5dSmrg  lt_cv_deplibs_check_method=pass_all
44686fae4e5dSmrg  ;;
44691f0ac6a5Smrg
44706fae4e5dSmrgsolaris*)
44716fae4e5dSmrg  lt_cv_deplibs_check_method=pass_all
44726fae4e5dSmrg  ;;
44739c9ff80cSmrg
44746fae4e5dSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
44756fae4e5dSmrg  lt_cv_deplibs_check_method=pass_all
44766fae4e5dSmrg  ;;
44779c9ff80cSmrg
44786fae4e5dSmrgsysv4 | sysv4.3*)
44796fae4e5dSmrg  case $host_vendor in
44806fae4e5dSmrg  motorola)
44816fae4e5dSmrg    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]]'
44826fae4e5dSmrg    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
44836fae4e5dSmrg    ;;
44846fae4e5dSmrg  ncr)
44856fae4e5dSmrg    lt_cv_deplibs_check_method=pass_all
44866fae4e5dSmrg    ;;
44876fae4e5dSmrg  sequent)
44886fae4e5dSmrg    lt_cv_file_magic_cmd='/bin/file'
44896fae4e5dSmrg    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
44906fae4e5dSmrg    ;;
44916fae4e5dSmrg  sni)
44926fae4e5dSmrg    lt_cv_file_magic_cmd='/bin/file'
44936fae4e5dSmrg    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
44946fae4e5dSmrg    lt_cv_file_magic_test_file=/lib/libc.so
44956fae4e5dSmrg    ;;
44966fae4e5dSmrg  siemens)
44976fae4e5dSmrg    lt_cv_deplibs_check_method=pass_all
44986fae4e5dSmrg    ;;
44996fae4e5dSmrg  pc)
45006fae4e5dSmrg    lt_cv_deplibs_check_method=pass_all
45016fae4e5dSmrg    ;;
45026fae4e5dSmrg  esac
45039c9ff80cSmrg  ;;
45041f0ac6a5Smrg
45056fae4e5dSmrgtpf*)
45066fae4e5dSmrg  lt_cv_deplibs_check_method=pass_all
45076fae4e5dSmrg  ;;
45086fae4e5dSmrgesac
45096fae4e5dSmrg])
45101f0ac6a5Smrg
45116fae4e5dSmrgfile_magic_glob=
45126fae4e5dSmrgwant_nocaseglob=no
45136fae4e5dSmrgif test "$build" = "$host"; then
45146fae4e5dSmrg  case $host_os in
45156fae4e5dSmrg  mingw* | pw32*)
45166fae4e5dSmrg    if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
45176fae4e5dSmrg      want_nocaseglob=yes
45186fae4e5dSmrg    else
45196fae4e5dSmrg      file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
45201f0ac6a5Smrg    fi
45216fae4e5dSmrg    ;;
45226fae4e5dSmrg  esac
45231f0ac6a5Smrgfi
45241f0ac6a5Smrg
45256fae4e5dSmrgfile_magic_cmd=$lt_cv_file_magic_cmd
45266fae4e5dSmrgdeplibs_check_method=$lt_cv_deplibs_check_method
45276fae4e5dSmrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown
45281f0ac6a5Smrg
45296fae4e5dSmrg_LT_DECL([], [deplibs_check_method], [1],
45306fae4e5dSmrg    [Method to check whether dependent libraries are shared objects])
45316fae4e5dSmrg_LT_DECL([], [file_magic_cmd], [1],
45326fae4e5dSmrg    [Command to use when deplibs_check_method = "file_magic"])
45336fae4e5dSmrg_LT_DECL([], [file_magic_glob], [1],
45346fae4e5dSmrg    [How to find potential files when deplibs_check_method = "file_magic"])
45356fae4e5dSmrg_LT_DECL([], [want_nocaseglob], [1],
45366fae4e5dSmrg    [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
45376fae4e5dSmrg])# _LT_CHECK_MAGIC_METHOD
45389c9ff80cSmrg
45396fae4e5dSmrg
45406fae4e5dSmrg# LT_PATH_NM
45416fae4e5dSmrg# ----------
45426fae4e5dSmrg# find the pathname to a BSD- or MS-compatible name lister
45436fae4e5dSmrgAC_DEFUN([LT_PATH_NM],
45446fae4e5dSmrg[AC_REQUIRE([AC_PROG_CC])dnl
45456fae4e5dSmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
45466fae4e5dSmrg[if test -n "$NM"; then
45476fae4e5dSmrg  # Let the user override the test.
45486fae4e5dSmrg  lt_cv_path_NM="$NM"
45496fae4e5dSmrgelse
45506fae4e5dSmrg  lt_nm_to_check="${ac_tool_prefix}nm"
45516fae4e5dSmrg  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
45526fae4e5dSmrg    lt_nm_to_check="$lt_nm_to_check nm"
45536fae4e5dSmrg  fi
45546fae4e5dSmrg  for lt_tmp_nm in $lt_nm_to_check; do
45556fae4e5dSmrg    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
45566fae4e5dSmrg    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
45576fae4e5dSmrg      IFS="$lt_save_ifs"
45586fae4e5dSmrg      test -z "$ac_dir" && ac_dir=.
45596fae4e5dSmrg      tmp_nm="$ac_dir/$lt_tmp_nm"
45606fae4e5dSmrg      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
45616fae4e5dSmrg	# Check to see if the nm accepts a BSD-compat flag.
45626fae4e5dSmrg	# Adding the `sed 1q' prevents false positives on HP-UX, which says:
45636fae4e5dSmrg	#   nm: unknown option "B" ignored
45646fae4e5dSmrg	# Tru64's nm complains that /dev/null is an invalid object file
45656fae4e5dSmrg	case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
45666fae4e5dSmrg	*/dev/null* | *'Invalid file or object type'*)
45676fae4e5dSmrg	  lt_cv_path_NM="$tmp_nm -B"
45686fae4e5dSmrg	  break
45696fae4e5dSmrg	  ;;
45706fae4e5dSmrg	*)
45716fae4e5dSmrg	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
45726fae4e5dSmrg	  */dev/null*)
45736fae4e5dSmrg	    lt_cv_path_NM="$tmp_nm -p"
45746fae4e5dSmrg	    break
45756fae4e5dSmrg	    ;;
45766fae4e5dSmrg	  *)
45776fae4e5dSmrg	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
45786fae4e5dSmrg	    continue # so that we can try to find one that supports BSD flags
45796fae4e5dSmrg	    ;;
45806fae4e5dSmrg	  esac
45816fae4e5dSmrg	  ;;
45826fae4e5dSmrg	esac
45836fae4e5dSmrg      fi
45846fae4e5dSmrg    done
45856fae4e5dSmrg    IFS="$lt_save_ifs"
45866fae4e5dSmrg  done
45876fae4e5dSmrg  : ${lt_cv_path_NM=no}
45886fae4e5dSmrgfi])
45896fae4e5dSmrgif test "$lt_cv_path_NM" != "no"; then
45906fae4e5dSmrg  NM="$lt_cv_path_NM"
45916fae4e5dSmrgelse
45926fae4e5dSmrg  # Didn't find any BSD compatible name lister, look for dumpbin.
45936fae4e5dSmrg  if test -n "$DUMPBIN"; then :
45946fae4e5dSmrg    # Let the user override the test.
45951f0ac6a5Smrg  else
45966fae4e5dSmrg    AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
45976fae4e5dSmrg    case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
45986fae4e5dSmrg    *COFF*)
45996fae4e5dSmrg      DUMPBIN="$DUMPBIN -symbols"
46006fae4e5dSmrg      ;;
46016fae4e5dSmrg    *)
46026fae4e5dSmrg      DUMPBIN=:
46036fae4e5dSmrg      ;;
46046fae4e5dSmrg    esac
46056fae4e5dSmrg  fi
46066fae4e5dSmrg  AC_SUBST([DUMPBIN])
46076fae4e5dSmrg  if test "$DUMPBIN" != ":"; then
46086fae4e5dSmrg    NM="$DUMPBIN"
46091f0ac6a5Smrg  fi
46101f0ac6a5Smrgfi
46116fae4e5dSmrgtest -z "$NM" && NM=nm
46126fae4e5dSmrgAC_SUBST([NM])
46136fae4e5dSmrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
46141f0ac6a5Smrg
46156fae4e5dSmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
46166fae4e5dSmrg  [lt_cv_nm_interface="BSD nm"
46176fae4e5dSmrg  echo "int some_variable = 0;" > conftest.$ac_ext
46186fae4e5dSmrg  (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
46196fae4e5dSmrg  (eval "$ac_compile" 2>conftest.err)
46206fae4e5dSmrg  cat conftest.err >&AS_MESSAGE_LOG_FD
46216fae4e5dSmrg  (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
46226fae4e5dSmrg  (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
46236fae4e5dSmrg  cat conftest.err >&AS_MESSAGE_LOG_FD
46246fae4e5dSmrg  (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
46256fae4e5dSmrg  cat conftest.out >&AS_MESSAGE_LOG_FD
46266fae4e5dSmrg  if $GREP 'External.*some_variable' conftest.out > /dev/null; then
46276fae4e5dSmrg    lt_cv_nm_interface="MS dumpbin"
46286fae4e5dSmrg  fi
46296fae4e5dSmrg  rm -f conftest*])
46306fae4e5dSmrg])# LT_PATH_NM
46319c9ff80cSmrg
46326fae4e5dSmrg# Old names:
46336fae4e5dSmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
46346fae4e5dSmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
46356fae4e5dSmrgdnl aclocal-1.4 backwards compatibility:
46366fae4e5dSmrgdnl AC_DEFUN([AM_PROG_NM], [])
46376fae4e5dSmrgdnl AC_DEFUN([AC_PROG_NM], [])
46389c9ff80cSmrg
46396fae4e5dSmrg# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
46406fae4e5dSmrg# --------------------------------
46416fae4e5dSmrg# how to determine the name of the shared library
46426fae4e5dSmrg# associated with a specific link library.
46436fae4e5dSmrg#  -- PORTME fill in with the dynamic library characteristics
46446fae4e5dSmrgm4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
46456fae4e5dSmrg[m4_require([_LT_DECL_EGREP])
46466fae4e5dSmrgm4_require([_LT_DECL_OBJDUMP])
46476fae4e5dSmrgm4_require([_LT_DECL_DLLTOOL])
46486fae4e5dSmrgAC_CACHE_CHECK([how to associate runtime and link libraries],
46496fae4e5dSmrglt_cv_sharedlib_from_linklib_cmd,
46506fae4e5dSmrg[lt_cv_sharedlib_from_linklib_cmd='unknown'
46516fae4e5dSmrg
46526fae4e5dSmrgcase $host_os in
46536fae4e5dSmrgcygwin* | mingw* | pw32* | cegcc*)
46546fae4e5dSmrg  # two different shell functions defined in ltmain.sh
46556fae4e5dSmrg  # decide which to use based on capabilities of $DLLTOOL
46566fae4e5dSmrg  case `$DLLTOOL --help 2>&1` in
46576fae4e5dSmrg  *--identify-strict*)
46586fae4e5dSmrg    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
46591f0ac6a5Smrg    ;;
46601f0ac6a5Smrg  *)
46616fae4e5dSmrg    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
46621f0ac6a5Smrg    ;;
46631f0ac6a5Smrg  esac
46641f0ac6a5Smrg  ;;
46651f0ac6a5Smrg*)
46666fae4e5dSmrg  # fallback: assume linklib IS sharedlib
46676fae4e5dSmrg  lt_cv_sharedlib_from_linklib_cmd="$ECHO"
46681f0ac6a5Smrg  ;;
46691f0ac6a5Smrgesac
46706fae4e5dSmrg])
46716fae4e5dSmrgsharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
46726fae4e5dSmrgtest -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
46731f0ac6a5Smrg
46746fae4e5dSmrg_LT_DECL([], [sharedlib_from_linklib_cmd], [1],
46756fae4e5dSmrg    [Command to associate shared and link libraries])
46766fae4e5dSmrg])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
46771f0ac6a5Smrg
46781f0ac6a5Smrg
46796fae4e5dSmrg# _LT_PATH_MANIFEST_TOOL
46806fae4e5dSmrg# ----------------------
46816fae4e5dSmrg# locate the manifest tool
46826fae4e5dSmrgm4_defun([_LT_PATH_MANIFEST_TOOL],
46836fae4e5dSmrg[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
46846fae4e5dSmrgtest -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
46856fae4e5dSmrgAC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
46866fae4e5dSmrg  [lt_cv_path_mainfest_tool=no
46876fae4e5dSmrg  echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
46886fae4e5dSmrg  $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
46896fae4e5dSmrg  cat conftest.err >&AS_MESSAGE_LOG_FD
46906fae4e5dSmrg  if $GREP 'Manifest Tool' conftest.out > /dev/null; then
46916fae4e5dSmrg    lt_cv_path_mainfest_tool=yes
46926fae4e5dSmrg  fi
46936fae4e5dSmrg  rm -f conftest*])
46946fae4e5dSmrgif test "x$lt_cv_path_mainfest_tool" != xyes; then
46956fae4e5dSmrg  MANIFEST_TOOL=:
46966fae4e5dSmrgfi
46976fae4e5dSmrg_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
46986fae4e5dSmrg])# _LT_PATH_MANIFEST_TOOL
46991f0ac6a5Smrg
47001f0ac6a5Smrg
47016fae4e5dSmrg# LT_LIB_M
47026fae4e5dSmrg# --------
47036fae4e5dSmrg# check for math library
47046fae4e5dSmrgAC_DEFUN([LT_LIB_M],
47056fae4e5dSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
47066fae4e5dSmrgLIBM=
47076fae4e5dSmrgcase $host in
47086fae4e5dSmrg*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
47096fae4e5dSmrg  # These system don't have libm, or don't need it
47101f0ac6a5Smrg  ;;
47116fae4e5dSmrg*-ncr-sysv4.3*)
47126fae4e5dSmrg  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
47136fae4e5dSmrg  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
47141f0ac6a5Smrg  ;;
47156fae4e5dSmrg*)
47166fae4e5dSmrg  AC_CHECK_LIB(m, cos, LIBM="-lm")
47171f0ac6a5Smrg  ;;
47186fae4e5dSmrgesac
47196fae4e5dSmrgAC_SUBST([LIBM])
47206fae4e5dSmrg])# LT_LIB_M
47211f0ac6a5Smrg
47226fae4e5dSmrg# Old name:
47236fae4e5dSmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
47246fae4e5dSmrgdnl aclocal-1.4 backwards compatibility:
47256fae4e5dSmrgdnl AC_DEFUN([AC_CHECK_LIBM], [])
47269c9ff80cSmrg
47271f0ac6a5Smrg
47286fae4e5dSmrg# _LT_COMPILER_NO_RTTI([TAGNAME])
47296fae4e5dSmrg# -------------------------------
47306fae4e5dSmrgm4_defun([_LT_COMPILER_NO_RTTI],
47316fae4e5dSmrg[m4_require([_LT_TAG_COMPILER])dnl
47321f0ac6a5Smrg
47336fae4e5dSmrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
47341f0ac6a5Smrg
47356fae4e5dSmrgif test "$GCC" = yes; then
47366fae4e5dSmrg  case $cc_basename in
47376fae4e5dSmrg  nvcc*)
47386fae4e5dSmrg    _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
47391f0ac6a5Smrg  *)
47406fae4e5dSmrg    _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
47411f0ac6a5Smrg  esac
47421f0ac6a5Smrg
47439c9ff80cSmrg  _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
47449c9ff80cSmrg    lt_cv_prog_compiler_rtti_exceptions,
47459c9ff80cSmrg    [-fno-rtti -fno-exceptions], [],
47469c9ff80cSmrg    [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
47479c9ff80cSmrgfi
47489c9ff80cSmrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
47499c9ff80cSmrg	[Compiler flag to turn off builtin functions])
47509c9ff80cSmrg])# _LT_COMPILER_NO_RTTI
47511f0ac6a5Smrg
47521f0ac6a5Smrg
47539c9ff80cSmrg# _LT_CMD_GLOBAL_SYMBOLS
47549c9ff80cSmrg# ----------------------
47559c9ff80cSmrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS],
47569c9ff80cSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
47579c9ff80cSmrgAC_REQUIRE([AC_PROG_CC])dnl
47586fae4e5dSmrgAC_REQUIRE([AC_PROG_AWK])dnl
47599c9ff80cSmrgAC_REQUIRE([LT_PATH_NM])dnl
47609c9ff80cSmrgAC_REQUIRE([LT_PATH_LD])dnl
47619c9ff80cSmrgm4_require([_LT_DECL_SED])dnl
47629c9ff80cSmrgm4_require([_LT_DECL_EGREP])dnl
47639c9ff80cSmrgm4_require([_LT_TAG_COMPILER])dnl
47641f0ac6a5Smrg
47659c9ff80cSmrg# Check for command to grab the raw symbol name followed by C symbol from nm.
47669c9ff80cSmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object])
47679c9ff80cSmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
47681f0ac6a5Smrg[
47699c9ff80cSmrg# These are sane defaults that work on at least a few old systems.
47709c9ff80cSmrg# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
47711f0ac6a5Smrg
47729c9ff80cSmrg# Character class describing NM global symbol codes.
47739c9ff80cSmrgsymcode='[[BCDEGRST]]'
47741f0ac6a5Smrg
47759c9ff80cSmrg# Regexp to match symbols that can be accessed directly from C.
47769c9ff80cSmrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
47771f0ac6a5Smrg
47789c9ff80cSmrg# Define system-specific variables.
47799c9ff80cSmrgcase $host_os in
47809c9ff80cSmrgaix*)
47819c9ff80cSmrg  symcode='[[BCDT]]'
47829c9ff80cSmrg  ;;
47839c9ff80cSmrgcygwin* | mingw* | pw32* | cegcc*)
47849c9ff80cSmrg  symcode='[[ABCDGISTW]]'
47859c9ff80cSmrg  ;;
47869c9ff80cSmrghpux*)
47879c9ff80cSmrg  if test "$host_cpu" = ia64; then
47889c9ff80cSmrg    symcode='[[ABCDEGRST]]'
47899c9ff80cSmrg  fi
47909c9ff80cSmrg  ;;
47919c9ff80cSmrgirix* | nonstopux*)
47929c9ff80cSmrg  symcode='[[BCDEGRST]]'
47939c9ff80cSmrg  ;;
47949c9ff80cSmrgosf*)
47959c9ff80cSmrg  symcode='[[BCDEGQRST]]'
47969c9ff80cSmrg  ;;
47979c9ff80cSmrgsolaris*)
47989c9ff80cSmrg  symcode='[[BDRT]]'
47999c9ff80cSmrg  ;;
48009c9ff80cSmrgsco3.2v5*)
48019c9ff80cSmrg  symcode='[[DT]]'
48029c9ff80cSmrg  ;;
48039c9ff80cSmrgsysv4.2uw2*)
48049c9ff80cSmrg  symcode='[[DT]]'
48059c9ff80cSmrg  ;;
48069c9ff80cSmrgsysv5* | sco5v6* | unixware* | OpenUNIX*)
48079c9ff80cSmrg  symcode='[[ABDT]]'
48089c9ff80cSmrg  ;;
48099c9ff80cSmrgsysv4)
48109c9ff80cSmrg  symcode='[[DFNSTU]]'
48119c9ff80cSmrg  ;;
48129c9ff80cSmrgesac
48131f0ac6a5Smrg
48149c9ff80cSmrg# If we're using GNU nm, then use its standard symbol codes.
48159c9ff80cSmrgcase `$NM -V 2>&1` in
48169c9ff80cSmrg*GNU* | *'with BFD'*)
48179c9ff80cSmrg  symcode='[[ABCDGIRSTW]]' ;;
48189c9ff80cSmrgesac
48191f0ac6a5Smrg
48209c9ff80cSmrg# Transform an extracted symbol line into a proper C declaration.
48219c9ff80cSmrg# Some systems (esp. on ia64) link data and code symbols differently,
48229c9ff80cSmrg# so use this general approach.
48239c9ff80cSmrglt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
48241f0ac6a5Smrg
48259c9ff80cSmrg# Transform an extracted symbol line into symbol name and symbol address
48266fae4e5dSmrglt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p'"
48276fae4e5dSmrglt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"lib\2\", (void *) \&\2},/p'"
48281f0ac6a5Smrg
48299c9ff80cSmrg# Handle CRLF in mingw tool chain
48309c9ff80cSmrgopt_cr=
48319c9ff80cSmrgcase $build_os in
48329c9ff80cSmrgmingw*)
48339c9ff80cSmrg  opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
48349c9ff80cSmrg  ;;
48359c9ff80cSmrgesac
48361f0ac6a5Smrg
48379c9ff80cSmrg# Try without a prefix underscore, then with it.
48389c9ff80cSmrgfor ac_symprfx in "" "_"; do
48391f0ac6a5Smrg
48409c9ff80cSmrg  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
48419c9ff80cSmrg  symxfrm="\\1 $ac_symprfx\\2 \\2"
48421f0ac6a5Smrg
48439c9ff80cSmrg  # Write the raw and C identifiers.
48449c9ff80cSmrg  if test "$lt_cv_nm_interface" = "MS dumpbin"; then
48459c9ff80cSmrg    # Fake it for dumpbin and say T for any non-static function
48469c9ff80cSmrg    # and D for any global variable.
48479c9ff80cSmrg    # Also find C++ and __fastcall symbols from MSVC++,
48489c9ff80cSmrg    # which start with @ or ?.
48499c9ff80cSmrg    lt_cv_sys_global_symbol_pipe="$AWK ['"\
48509c9ff80cSmrg"     {last_section=section; section=\$ 3};"\
485189c04b6cSmrg"     /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
48529c9ff80cSmrg"     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
48539c9ff80cSmrg"     \$ 0!~/External *\|/{next};"\
48549c9ff80cSmrg"     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
48559c9ff80cSmrg"     {if(hide[section]) next};"\
48569c9ff80cSmrg"     {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
48579c9ff80cSmrg"     {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
48589c9ff80cSmrg"     s[1]~/^[@?]/{print s[1], s[1]; next};"\
48599c9ff80cSmrg"     s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
48609c9ff80cSmrg"     ' prfx=^$ac_symprfx]"
48619c9ff80cSmrg  else
48629c9ff80cSmrg    lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[	 ]]\($symcode$symcode*\)[[	 ]][[	 ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
48631f0ac6a5Smrg  fi
48646fae4e5dSmrg  lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
48651f0ac6a5Smrg
48669c9ff80cSmrg  # Check to see that the pipe works correctly.
48679c9ff80cSmrg  pipe_works=no
48681f0ac6a5Smrg
48699c9ff80cSmrg  rm -f conftest*
48709c9ff80cSmrg  cat > conftest.$ac_ext <<_LT_EOF
48719c9ff80cSmrg#ifdef __cplusplus
48729c9ff80cSmrgextern "C" {
48739c9ff80cSmrg#endif
48749c9ff80cSmrgchar nm_test_var;
48759c9ff80cSmrgvoid nm_test_func(void);
48769c9ff80cSmrgvoid nm_test_func(void){}
48779c9ff80cSmrg#ifdef __cplusplus
48789c9ff80cSmrg}
48799c9ff80cSmrg#endif
48809c9ff80cSmrgint main(){nm_test_var='a';nm_test_func();return(0);}
48819c9ff80cSmrg_LT_EOF
48821f0ac6a5Smrg
48839c9ff80cSmrg  if AC_TRY_EVAL(ac_compile); then
48849c9ff80cSmrg    # Now try to grab the symbols.
48859c9ff80cSmrg    nlist=conftest.nm
48866fae4e5dSmrg    if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
48879c9ff80cSmrg      # Try sorting and uniquifying the output.
48889c9ff80cSmrg      if sort "$nlist" | uniq > "$nlist"T; then
48899c9ff80cSmrg	mv -f "$nlist"T "$nlist"
48909c9ff80cSmrg      else
48919c9ff80cSmrg	rm -f "$nlist"T
48929c9ff80cSmrg      fi
48931f0ac6a5Smrg
48949c9ff80cSmrg      # Make sure that we snagged all the symbols we need.
48959c9ff80cSmrg      if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
48969c9ff80cSmrg	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
48979c9ff80cSmrg	  cat <<_LT_EOF > conftest.$ac_ext
48986fae4e5dSmrg/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
48996fae4e5dSmrg#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
49006fae4e5dSmrg/* DATA imports from DLLs on WIN32 con't be const, because runtime
49016fae4e5dSmrg   relocations are performed -- see ld's documentation on pseudo-relocs.  */
49026fae4e5dSmrg# define LT@&t@_DLSYM_CONST
49036fae4e5dSmrg#elif defined(__osf__)
49046fae4e5dSmrg/* This system does not cope well with relocations in const data.  */
49056fae4e5dSmrg# define LT@&t@_DLSYM_CONST
49066fae4e5dSmrg#else
49076fae4e5dSmrg# define LT@&t@_DLSYM_CONST const
49086fae4e5dSmrg#endif
49096fae4e5dSmrg
49109c9ff80cSmrg#ifdef __cplusplus
49119c9ff80cSmrgextern "C" {
49129c9ff80cSmrg#endif
49131f0ac6a5Smrg
49149c9ff80cSmrg_LT_EOF
49159c9ff80cSmrg	  # Now generate the symbol file.
49169c9ff80cSmrg	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
49171f0ac6a5Smrg
49189c9ff80cSmrg	  cat <<_LT_EOF >> conftest.$ac_ext
49191f0ac6a5Smrg
49209c9ff80cSmrg/* The mapping between symbol names and symbols.  */
49216fae4e5dSmrgLT@&t@_DLSYM_CONST struct {
49229c9ff80cSmrg  const char *name;
49239c9ff80cSmrg  void       *address;
49249c9ff80cSmrg}
49259c9ff80cSmrglt__PROGRAM__LTX_preloaded_symbols[[]] =
49269c9ff80cSmrg{
49279c9ff80cSmrg  { "@PROGRAM@", (void *) 0 },
49289c9ff80cSmrg_LT_EOF
49299c9ff80cSmrg	  $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
49309c9ff80cSmrg	  cat <<\_LT_EOF >> conftest.$ac_ext
49319c9ff80cSmrg  {0, (void *) 0}
49329c9ff80cSmrg};
49331f0ac6a5Smrg
49349c9ff80cSmrg/* This works around a problem in FreeBSD linker */
49359c9ff80cSmrg#ifdef FREEBSD_WORKAROUND
49369c9ff80cSmrgstatic const void *lt_preloaded_setup() {
49379c9ff80cSmrg  return lt__PROGRAM__LTX_preloaded_symbols;
49389c9ff80cSmrg}
49399c9ff80cSmrg#endif
49401f0ac6a5Smrg
49419c9ff80cSmrg#ifdef __cplusplus
49429c9ff80cSmrg}
49439c9ff80cSmrg#endif
49449c9ff80cSmrg_LT_EOF
49459c9ff80cSmrg	  # Now try linking the two files.
49469c9ff80cSmrg	  mv conftest.$ac_objext conftstm.$ac_objext
49476fae4e5dSmrg	  lt_globsym_save_LIBS=$LIBS
49486fae4e5dSmrg	  lt_globsym_save_CFLAGS=$CFLAGS
49499c9ff80cSmrg	  LIBS="conftstm.$ac_objext"
49509c9ff80cSmrg	  CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
49519c9ff80cSmrg	  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
49529c9ff80cSmrg	    pipe_works=yes
49539c9ff80cSmrg	  fi
49546fae4e5dSmrg	  LIBS=$lt_globsym_save_LIBS
49556fae4e5dSmrg	  CFLAGS=$lt_globsym_save_CFLAGS
49569c9ff80cSmrg	else
49579c9ff80cSmrg	  echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
49589c9ff80cSmrg	fi
49599c9ff80cSmrg      else
49609c9ff80cSmrg	echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
49619c9ff80cSmrg      fi
49621f0ac6a5Smrg    else
49639c9ff80cSmrg      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
49641f0ac6a5Smrg    fi
49651f0ac6a5Smrg  else
49669c9ff80cSmrg    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
49679c9ff80cSmrg    cat conftest.$ac_ext >&5
49681f0ac6a5Smrg  fi
49699c9ff80cSmrg  rm -rf conftest* conftst*
49701f0ac6a5Smrg
49719c9ff80cSmrg  # Do not use the global_symbol_pipe unless it works.
49729c9ff80cSmrg  if test "$pipe_works" = yes; then
49739c9ff80cSmrg    break
49749c9ff80cSmrg  else
49759c9ff80cSmrg    lt_cv_sys_global_symbol_pipe=
49769c9ff80cSmrg  fi
49776fae4e5dSmrgdone
49786fae4e5dSmrg])
49796fae4e5dSmrgif test -z "$lt_cv_sys_global_symbol_pipe"; then
49806fae4e5dSmrg  lt_cv_sys_global_symbol_to_cdecl=
49816fae4e5dSmrgfi
49826fae4e5dSmrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
49836fae4e5dSmrg  AC_MSG_RESULT(failed)
49846fae4e5dSmrgelse
49856fae4e5dSmrg  AC_MSG_RESULT(ok)
49866fae4e5dSmrgfi
49876fae4e5dSmrg
49886fae4e5dSmrg# Response file support.
49896fae4e5dSmrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then
49906fae4e5dSmrg  nm_file_list_spec='@'
49916fae4e5dSmrgelif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
49926fae4e5dSmrg  nm_file_list_spec='@'
49936fae4e5dSmrgfi
49946fae4e5dSmrg
49956fae4e5dSmrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
49966fae4e5dSmrg    [Take the output of nm and produce a listing of raw symbols and C names])
49976fae4e5dSmrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
49986fae4e5dSmrg    [Transform the output of nm in a proper C declaration])
49996fae4e5dSmrg_LT_DECL([global_symbol_to_c_name_address],
50006fae4e5dSmrg    [lt_cv_sys_global_symbol_to_c_name_address], [1],
50016fae4e5dSmrg    [Transform the output of nm in a C name address pair])
50026fae4e5dSmrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix],
50036fae4e5dSmrg    [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
50046fae4e5dSmrg    [Transform the output of nm in a C name address pair when lib prefix is needed])
50056fae4e5dSmrg_LT_DECL([], [nm_file_list_spec], [1],
50066fae4e5dSmrg    [Specify filename containing input files for $NM])
50076fae4e5dSmrg]) # _LT_CMD_GLOBAL_SYMBOLS
50086fae4e5dSmrg
50096fae4e5dSmrg
50106fae4e5dSmrg# _LT_COMPILER_PIC([TAGNAME])
50116fae4e5dSmrg# ---------------------------
50126fae4e5dSmrgm4_defun([_LT_COMPILER_PIC],
50136fae4e5dSmrg[m4_require([_LT_TAG_COMPILER])dnl
50146fae4e5dSmrg_LT_TAGVAR(lt_prog_compiler_wl, $1)=
50156fae4e5dSmrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=
50166fae4e5dSmrg_LT_TAGVAR(lt_prog_compiler_static, $1)=
50176fae4e5dSmrg
50186fae4e5dSmrgm4_if([$1], [CXX], [
50196fae4e5dSmrg  # C++ specific cases for pic, static, wl, etc.
50206fae4e5dSmrg  if test "$GXX" = yes; then
50216fae4e5dSmrg    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
50226fae4e5dSmrg    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
50236fae4e5dSmrg
50246fae4e5dSmrg    case $host_os in
50256fae4e5dSmrg    aix*)
50266fae4e5dSmrg      # All AIX code is PIC.
50276fae4e5dSmrg      if test "$host_cpu" = ia64; then
50286fae4e5dSmrg	# AIX 5 now supports IA64 processor
50296fae4e5dSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
50306fae4e5dSmrg      fi
50316fae4e5dSmrg      ;;
50326fae4e5dSmrg
50336fae4e5dSmrg    amigaos*)
50346fae4e5dSmrg      case $host_cpu in
50356fae4e5dSmrg      powerpc)
50366fae4e5dSmrg            # see comment about AmigaOS4 .so support
50376fae4e5dSmrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
50386fae4e5dSmrg        ;;
50396fae4e5dSmrg      m68k)
50406fae4e5dSmrg            # FIXME: we need at least 68020 code to build shared libraries, but
50416fae4e5dSmrg            # adding the `-m68020' flag to GCC prevents building anything better,
50426fae4e5dSmrg            # like `-m68040'.
50436fae4e5dSmrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
50446fae4e5dSmrg        ;;
50456fae4e5dSmrg      esac
50466fae4e5dSmrg      ;;
50476fae4e5dSmrg
50486fae4e5dSmrg    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
50496fae4e5dSmrg      # PIC is the default for these OSes.
50506fae4e5dSmrg      ;;
50516fae4e5dSmrg    mingw* | cygwin* | os2* | pw32* | cegcc*)
50526fae4e5dSmrg      # This hack is so that the source file can tell whether it is being
50536fae4e5dSmrg      # built for inclusion in a dll (and should export symbols for example).
50546fae4e5dSmrg      # Although the cygwin gcc ignores -fPIC, still need this for old-style
50556fae4e5dSmrg      # (--disable-auto-import) libraries
50566fae4e5dSmrg      m4_if([$1], [GCJ], [],
50576fae4e5dSmrg	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
50586fae4e5dSmrg      ;;
50596fae4e5dSmrg    darwin* | rhapsody*)
50606fae4e5dSmrg      # PIC is the default on this platform
50616fae4e5dSmrg      # Common symbols not allowed in MH_DYLIB files
50626fae4e5dSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
50636fae4e5dSmrg      ;;
50646fae4e5dSmrg    *djgpp*)
50656fae4e5dSmrg      # DJGPP does not support shared libraries at all
50666fae4e5dSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)=
50676fae4e5dSmrg      ;;
50686fae4e5dSmrg    haiku*)
50696fae4e5dSmrg      # PIC is the default for Haiku.
50706fae4e5dSmrg      # The "-static" flag exists, but is broken.
50716fae4e5dSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)=
50726fae4e5dSmrg      ;;
50736fae4e5dSmrg    interix[[3-9]]*)
50746fae4e5dSmrg      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
50756fae4e5dSmrg      # Instead, we relocate shared libraries at runtime.
50766fae4e5dSmrg      ;;
50776fae4e5dSmrg    sysv4*MP*)
50786fae4e5dSmrg      if test -d /usr/nec; then
50796fae4e5dSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
50806fae4e5dSmrg      fi
50816fae4e5dSmrg      ;;
50826fae4e5dSmrg    hpux*)
50836fae4e5dSmrg      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
50846fae4e5dSmrg      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
50856fae4e5dSmrg      # sets the default TLS model and affects inlining.
50866fae4e5dSmrg      case $host_cpu in
50876fae4e5dSmrg      hppa*64*)
50886fae4e5dSmrg	;;
50896fae4e5dSmrg      *)
50906fae4e5dSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
50916fae4e5dSmrg	;;
50926fae4e5dSmrg      esac
50936fae4e5dSmrg      ;;
50946fae4e5dSmrg    *qnx* | *nto*)
50956fae4e5dSmrg      # QNX uses GNU C++, but need to define -shared option too, otherwise
50966fae4e5dSmrg      # it will coredump.
50976fae4e5dSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
50986fae4e5dSmrg      ;;
50996fae4e5dSmrg    *)
51006fae4e5dSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
51016fae4e5dSmrg      ;;
51026fae4e5dSmrg    esac
51036fae4e5dSmrg  else
51046fae4e5dSmrg    case $host_os in
51056fae4e5dSmrg      aix[[4-9]]*)
51066fae4e5dSmrg	# All AIX code is PIC.
51076fae4e5dSmrg	if test "$host_cpu" = ia64; then
51086fae4e5dSmrg	  # AIX 5 now supports IA64 processor
51096fae4e5dSmrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
51106fae4e5dSmrg	else
51116fae4e5dSmrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
51126fae4e5dSmrg	fi
51136fae4e5dSmrg	;;
51146fae4e5dSmrg      chorus*)
51156fae4e5dSmrg	case $cc_basename in
51166fae4e5dSmrg	cxch68*)
51176fae4e5dSmrg	  # Green Hills C++ Compiler
51186fae4e5dSmrg	  # _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"
51196fae4e5dSmrg	  ;;
51206fae4e5dSmrg	esac
51216fae4e5dSmrg	;;
51226fae4e5dSmrg      mingw* | cygwin* | os2* | pw32* | cegcc*)
51236fae4e5dSmrg	# This hack is so that the source file can tell whether it is being
51246fae4e5dSmrg	# built for inclusion in a dll (and should export symbols for example).
51256fae4e5dSmrg	m4_if([$1], [GCJ], [],
51266fae4e5dSmrg	  [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
51276fae4e5dSmrg	;;
51286fae4e5dSmrg      dgux*)
51296fae4e5dSmrg	case $cc_basename in
51306fae4e5dSmrg	  ec++*)
51316fae4e5dSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
51326fae4e5dSmrg	    ;;
51336fae4e5dSmrg	  ghcx*)
51346fae4e5dSmrg	    # Green Hills C++ Compiler
51356fae4e5dSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
51366fae4e5dSmrg	    ;;
51376fae4e5dSmrg	  *)
51386fae4e5dSmrg	    ;;
51396fae4e5dSmrg	esac
51406fae4e5dSmrg	;;
51416fae4e5dSmrg      freebsd* | dragonfly*)
51426fae4e5dSmrg	# FreeBSD uses GNU C++
51436fae4e5dSmrg	;;
51446fae4e5dSmrg      hpux9* | hpux10* | hpux11*)
51456fae4e5dSmrg	case $cc_basename in
51466fae4e5dSmrg	  CC*)
51476fae4e5dSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
51486fae4e5dSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
51496fae4e5dSmrg	    if test "$host_cpu" != ia64; then
51506fae4e5dSmrg	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
51516fae4e5dSmrg	    fi
51526fae4e5dSmrg	    ;;
51536fae4e5dSmrg	  aCC*)
51546fae4e5dSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
51556fae4e5dSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
51566fae4e5dSmrg	    case $host_cpu in
51576fae4e5dSmrg	    hppa*64*|ia64*)
51586fae4e5dSmrg	      # +Z the default
51596fae4e5dSmrg	      ;;
51606fae4e5dSmrg	    *)
51616fae4e5dSmrg	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
51626fae4e5dSmrg	      ;;
51636fae4e5dSmrg	    esac
51646fae4e5dSmrg	    ;;
51656fae4e5dSmrg	  *)
51666fae4e5dSmrg	    ;;
51676fae4e5dSmrg	esac
51686fae4e5dSmrg	;;
51696fae4e5dSmrg      interix*)
51706fae4e5dSmrg	# This is c89, which is MS Visual C++ (no shared libs)
51716fae4e5dSmrg	# Anyone wants to do a port?
51726fae4e5dSmrg	;;
51736fae4e5dSmrg      irix5* | irix6* | nonstopux*)
51746fae4e5dSmrg	case $cc_basename in
51756fae4e5dSmrg	  CC*)
51766fae4e5dSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
51776fae4e5dSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
51786fae4e5dSmrg	    # CC pic flag -KPIC is the default.
51796fae4e5dSmrg	    ;;
51806fae4e5dSmrg	  *)
51816fae4e5dSmrg	    ;;
51826fae4e5dSmrg	esac
51836fae4e5dSmrg	;;
51846fae4e5dSmrg      linux* | k*bsd*-gnu | kopensolaris*-gnu)
51856fae4e5dSmrg	case $cc_basename in
51866fae4e5dSmrg	  KCC*)
51876fae4e5dSmrg	    # KAI C++ Compiler
51886fae4e5dSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
51896fae4e5dSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
51906fae4e5dSmrg	    ;;
51916fae4e5dSmrg	  ecpc* )
51926fae4e5dSmrg	    # old Intel C++ for x86_64 which still supported -KPIC.
51936fae4e5dSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
51946fae4e5dSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
51956fae4e5dSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
51966fae4e5dSmrg	    ;;
51976fae4e5dSmrg	  icpc* )
51986fae4e5dSmrg	    # Intel C++, used to be incompatible with GCC.
51996fae4e5dSmrg	    # ICC 10 doesn't accept -KPIC any more.
52006fae4e5dSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
52016fae4e5dSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
52026fae4e5dSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
52036fae4e5dSmrg	    ;;
52046fae4e5dSmrg	  pgCC* | pgcpp*)
52056fae4e5dSmrg	    # Portland Group C++ compiler
52066fae4e5dSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
52076fae4e5dSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
52086fae4e5dSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
52096fae4e5dSmrg	    ;;
52106fae4e5dSmrg	  cxx*)
52116fae4e5dSmrg	    # Compaq C++
52126fae4e5dSmrg	    # Make sure the PIC flag is empty.  It appears that all Alpha
52136fae4e5dSmrg	    # Linux and Compaq Tru64 Unix objects are PIC.
52146fae4e5dSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
52156fae4e5dSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
52166fae4e5dSmrg	    ;;
52176fae4e5dSmrg	  xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
52186fae4e5dSmrg	    # IBM XL 8.0, 9.0 on PPC and BlueGene
52196fae4e5dSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
52206fae4e5dSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
52216fae4e5dSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
52226fae4e5dSmrg	    ;;
52236fae4e5dSmrg	  *)
52246fae4e5dSmrg	    case `$CC -V 2>&1 | sed 5q` in
52256fae4e5dSmrg	    *Sun\ C*)
52266fae4e5dSmrg	      # Sun C++ 5.9
52276fae4e5dSmrg	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
52286fae4e5dSmrg	      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
52296fae4e5dSmrg	      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
52306fae4e5dSmrg	      ;;
52316fae4e5dSmrg	    esac
52326fae4e5dSmrg	    ;;
52336fae4e5dSmrg	esac
52346fae4e5dSmrg	;;
52356fae4e5dSmrg      lynxos*)
52366fae4e5dSmrg	;;
52376fae4e5dSmrg      m88k*)
52386fae4e5dSmrg	;;
52396fae4e5dSmrg      mvs*)
52406fae4e5dSmrg	case $cc_basename in
52416fae4e5dSmrg	  cxx*)
52426fae4e5dSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
52436fae4e5dSmrg	    ;;
52446fae4e5dSmrg	  *)
52456fae4e5dSmrg	    ;;
52466fae4e5dSmrg	esac
52476fae4e5dSmrg	;;
52486fae4e5dSmrg      netbsd*)
52496fae4e5dSmrg	;;
52506fae4e5dSmrg      *qnx* | *nto*)
52516fae4e5dSmrg        # QNX uses GNU C++, but need to define -shared option too, otherwise
52526fae4e5dSmrg        # it will coredump.
52536fae4e5dSmrg        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
52546fae4e5dSmrg        ;;
52556fae4e5dSmrg      osf3* | osf4* | osf5*)
52566fae4e5dSmrg	case $cc_basename in
52576fae4e5dSmrg	  KCC*)
52586fae4e5dSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
52596fae4e5dSmrg	    ;;
52606fae4e5dSmrg	  RCC*)
52616fae4e5dSmrg	    # Rational C++ 2.4.1
52626fae4e5dSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
52636fae4e5dSmrg	    ;;
52646fae4e5dSmrg	  cxx*)
52656fae4e5dSmrg	    # Digital/Compaq C++
52666fae4e5dSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
52676fae4e5dSmrg	    # Make sure the PIC flag is empty.  It appears that all Alpha
52686fae4e5dSmrg	    # Linux and Compaq Tru64 Unix objects are PIC.
52696fae4e5dSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
52706fae4e5dSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
52716fae4e5dSmrg	    ;;
52726fae4e5dSmrg	  *)
52736fae4e5dSmrg	    ;;
52746fae4e5dSmrg	esac
52756fae4e5dSmrg	;;
52766fae4e5dSmrg      psos*)
52776fae4e5dSmrg	;;
52786fae4e5dSmrg      solaris*)
52796fae4e5dSmrg	case $cc_basename in
52806fae4e5dSmrg	  CC* | sunCC*)
52816fae4e5dSmrg	    # Sun C++ 4.2, 5.x and Centerline C++
52826fae4e5dSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
52836fae4e5dSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
52846fae4e5dSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
52856fae4e5dSmrg	    ;;
52866fae4e5dSmrg	  gcx*)
52876fae4e5dSmrg	    # Green Hills C++ Compiler
52886fae4e5dSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
52896fae4e5dSmrg	    ;;
52906fae4e5dSmrg	  *)
52916fae4e5dSmrg	    ;;
52926fae4e5dSmrg	esac
52936fae4e5dSmrg	;;
52946fae4e5dSmrg      sunos4*)
52956fae4e5dSmrg	case $cc_basename in
52966fae4e5dSmrg	  CC*)
52976fae4e5dSmrg	    # Sun C++ 4.x
52986fae4e5dSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
52996fae4e5dSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
53006fae4e5dSmrg	    ;;
53016fae4e5dSmrg	  lcc*)
53026fae4e5dSmrg	    # Lucid
53036fae4e5dSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
53046fae4e5dSmrg	    ;;
53056fae4e5dSmrg	  *)
53066fae4e5dSmrg	    ;;
53076fae4e5dSmrg	esac
53086fae4e5dSmrg	;;
53096fae4e5dSmrg      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
53106fae4e5dSmrg	case $cc_basename in
53116fae4e5dSmrg	  CC*)
53126fae4e5dSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
53136fae4e5dSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
53146fae4e5dSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
53156fae4e5dSmrg	    ;;
53166fae4e5dSmrg	esac
53176fae4e5dSmrg	;;
53186fae4e5dSmrg      tandem*)
53196fae4e5dSmrg	case $cc_basename in
53206fae4e5dSmrg	  NCC*)
53216fae4e5dSmrg	    # NonStop-UX NCC 3.20
53226fae4e5dSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
53236fae4e5dSmrg	    ;;
53246fae4e5dSmrg	  *)
53256fae4e5dSmrg	    ;;
53266fae4e5dSmrg	esac
53276fae4e5dSmrg	;;
53286fae4e5dSmrg      vxworks*)
53296fae4e5dSmrg	;;
53306fae4e5dSmrg      *)
53316fae4e5dSmrg	_LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
53326fae4e5dSmrg	;;
53336fae4e5dSmrg    esac
53346fae4e5dSmrg  fi
53356fae4e5dSmrg],
53366fae4e5dSmrg[
53376fae4e5dSmrg  if test "$GCC" = yes; then
53389c9ff80cSmrg    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
53399c9ff80cSmrg    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
53401f0ac6a5Smrg
53419c9ff80cSmrg    case $host_os in
53426fae4e5dSmrg      aix*)
53439c9ff80cSmrg      # All AIX code is PIC.
53441f0ac6a5Smrg      if test "$host_cpu" = ia64; then
53459c9ff80cSmrg	# AIX 5 now supports IA64 processor
53469c9ff80cSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
53471f0ac6a5Smrg      fi
53489c9ff80cSmrg      ;;
53491f0ac6a5Smrg
53509c9ff80cSmrg    amigaos*)
53519c9ff80cSmrg      case $host_cpu in
53529c9ff80cSmrg      powerpc)
53539c9ff80cSmrg            # see comment about AmigaOS4 .so support
53549c9ff80cSmrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
53559c9ff80cSmrg        ;;
53569c9ff80cSmrg      m68k)
53579c9ff80cSmrg            # FIXME: we need at least 68020 code to build shared libraries, but
53589c9ff80cSmrg            # adding the `-m68020' flag to GCC prevents building anything better,
53599c9ff80cSmrg            # like `-m68040'.
53609c9ff80cSmrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
53611f0ac6a5Smrg        ;;
53629c9ff80cSmrg      esac
53639c9ff80cSmrg      ;;
53641f0ac6a5Smrg
53659c9ff80cSmrg    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
53669c9ff80cSmrg      # PIC is the default for these OSes.
53679c9ff80cSmrg      ;;
53686fae4e5dSmrg
53696fae4e5dSmrg    mingw* | cygwin* | pw32* | os2* | cegcc*)
53709c9ff80cSmrg      # This hack is so that the source file can tell whether it is being
53719c9ff80cSmrg      # built for inclusion in a dll (and should export symbols for example).
53729c9ff80cSmrg      # Although the cygwin gcc ignores -fPIC, still need this for old-style
53739c9ff80cSmrg      # (--disable-auto-import) libraries
53749c9ff80cSmrg      m4_if([$1], [GCJ], [],
53759c9ff80cSmrg	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
53769c9ff80cSmrg      ;;
53776fae4e5dSmrg
53789c9ff80cSmrg    darwin* | rhapsody*)
53799c9ff80cSmrg      # PIC is the default on this platform
53809c9ff80cSmrg      # Common symbols not allowed in MH_DYLIB files
53819c9ff80cSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
53829c9ff80cSmrg      ;;
53836fae4e5dSmrg
53846fae4e5dSmrg    haiku*)
53856fae4e5dSmrg      # PIC is the default for Haiku.
53866fae4e5dSmrg      # The "-static" flag exists, but is broken.
53876fae4e5dSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)=
53886fae4e5dSmrg      ;;
53896fae4e5dSmrg
53906fae4e5dSmrg    hpux*)
53916fae4e5dSmrg      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
53926fae4e5dSmrg      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
53936fae4e5dSmrg      # sets the default TLS model and affects inlining.
53946fae4e5dSmrg      case $host_cpu in
53956fae4e5dSmrg      hppa*64*)
53966fae4e5dSmrg	# +Z the default
53976fae4e5dSmrg	;;
53986fae4e5dSmrg      *)
53996fae4e5dSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
54006fae4e5dSmrg	;;
54016fae4e5dSmrg      esac
54026fae4e5dSmrg      ;;
54036fae4e5dSmrg
54046fae4e5dSmrg    interix[[3-9]]*)
54056fae4e5dSmrg      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
54066fae4e5dSmrg      # Instead, we relocate shared libraries at runtime.
54076fae4e5dSmrg      ;;
54086fae4e5dSmrg
54096fae4e5dSmrg    msdosdjgpp*)
54106fae4e5dSmrg      # Just because we use GCC doesn't mean we suddenly get shared libraries
54116fae4e5dSmrg      # on systems that don't support them.
54126fae4e5dSmrg      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
54136fae4e5dSmrg      enable_shared=no
54146fae4e5dSmrg      ;;
54156fae4e5dSmrg
54166fae4e5dSmrg    *nto* | *qnx*)
54176fae4e5dSmrg      # QNX uses GNU C++, but need to define -shared option too, otherwise
54186fae4e5dSmrg      # it will coredump.
54196fae4e5dSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
54206fae4e5dSmrg      ;;
54216fae4e5dSmrg
54226fae4e5dSmrg    sysv4*MP*)
54236fae4e5dSmrg      if test -d /usr/nec; then
54246fae4e5dSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
54256fae4e5dSmrg      fi
54266fae4e5dSmrg      ;;
54276fae4e5dSmrg
54286fae4e5dSmrg    *)
54296fae4e5dSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
54306fae4e5dSmrg      ;;
54316fae4e5dSmrg    esac
54326fae4e5dSmrg
54336fae4e5dSmrg    case $cc_basename in
54346fae4e5dSmrg    nvcc*) # Cuda Compiler Driver 2.2
54356fae4e5dSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
543689c04b6cSmrg      if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
543789c04b6cSmrg        _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)"
543889c04b6cSmrg      fi
54396fae4e5dSmrg      ;;
54406fae4e5dSmrg    esac
54416fae4e5dSmrg  else
54426fae4e5dSmrg    # PORTME Check for flag to pass linker flags through the system compiler.
54436fae4e5dSmrg    case $host_os in
54446fae4e5dSmrg    aix*)
54456fae4e5dSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
54466fae4e5dSmrg      if test "$host_cpu" = ia64; then
54476fae4e5dSmrg	# AIX 5 now supports IA64 processor
54486fae4e5dSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
54496fae4e5dSmrg      else
54506fae4e5dSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
54516fae4e5dSmrg      fi
54526fae4e5dSmrg      ;;
54536fae4e5dSmrg
54546fae4e5dSmrg    mingw* | cygwin* | pw32* | os2* | cegcc*)
54556fae4e5dSmrg      # This hack is so that the source file can tell whether it is being
54566fae4e5dSmrg      # built for inclusion in a dll (and should export symbols for example).
54576fae4e5dSmrg      m4_if([$1], [GCJ], [],
54586fae4e5dSmrg	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
54596fae4e5dSmrg      ;;
54606fae4e5dSmrg
54616fae4e5dSmrg    hpux9* | hpux10* | hpux11*)
54626fae4e5dSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
54636fae4e5dSmrg      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
54646fae4e5dSmrg      # not for PA HP-UX.
54656fae4e5dSmrg      case $host_cpu in
54666fae4e5dSmrg      hppa*64*|ia64*)
54676fae4e5dSmrg	# +Z the default
54686fae4e5dSmrg	;;
54696fae4e5dSmrg      *)
54706fae4e5dSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
54716fae4e5dSmrg	;;
54726fae4e5dSmrg      esac
54736fae4e5dSmrg      # Is there a better lt_prog_compiler_static that works with the bundled CC?
54746fae4e5dSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
54756fae4e5dSmrg      ;;
54766fae4e5dSmrg
54776fae4e5dSmrg    irix5* | irix6* | nonstopux*)
54786fae4e5dSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
54796fae4e5dSmrg      # PIC (with -KPIC) is the default.
54806fae4e5dSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
54816fae4e5dSmrg      ;;
54826fae4e5dSmrg
54836fae4e5dSmrg    linux* | k*bsd*-gnu | kopensolaris*-gnu)
54846fae4e5dSmrg      case $cc_basename in
54856fae4e5dSmrg      # old Intel for x86_64 which still supported -KPIC.
54866fae4e5dSmrg      ecc*)
54876fae4e5dSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
54886fae4e5dSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
54896fae4e5dSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
54906fae4e5dSmrg        ;;
54916fae4e5dSmrg      # icc used to be incompatible with GCC.
54926fae4e5dSmrg      # ICC 10 doesn't accept -KPIC any more.
54936fae4e5dSmrg      icc* | ifort*)
54946fae4e5dSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
54956fae4e5dSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
54966fae4e5dSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
54976fae4e5dSmrg        ;;
54986fae4e5dSmrg      # Lahey Fortran 8.1.
54996fae4e5dSmrg      lf95*)
55006fae4e5dSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
55016fae4e5dSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
55026fae4e5dSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
55036fae4e5dSmrg	;;
55046fae4e5dSmrg      nagfor*)
55056fae4e5dSmrg	# NAG Fortran compiler
55066fae4e5dSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
55076fae4e5dSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
55086fae4e5dSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
55096fae4e5dSmrg	;;
55106fae4e5dSmrg      pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
55116fae4e5dSmrg        # Portland Group compilers (*not* the Pentium gcc compiler,
55126fae4e5dSmrg	# which looks to be a dead project)
55136fae4e5dSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
55146fae4e5dSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
55156fae4e5dSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
55166fae4e5dSmrg        ;;
55176fae4e5dSmrg      ccc*)
55186fae4e5dSmrg        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
55196fae4e5dSmrg        # All Alpha code is PIC.
55206fae4e5dSmrg        _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
55216fae4e5dSmrg        ;;
55226fae4e5dSmrg      xl* | bgxl* | bgf* | mpixl*)
55236fae4e5dSmrg	# IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
55246fae4e5dSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
55256fae4e5dSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
55266fae4e5dSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
55276fae4e5dSmrg	;;
55286fae4e5dSmrg      *)
55296fae4e5dSmrg	case `$CC -V 2>&1 | sed 5q` in
553089c04b6cSmrg	*Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*)
55316fae4e5dSmrg	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
55326fae4e5dSmrg	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
55336fae4e5dSmrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
55346fae4e5dSmrg	  _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
55356fae4e5dSmrg	  ;;
553689c04b6cSmrg	*Sun\ F* | *Sun*Fortran*)
553789c04b6cSmrg	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
553889c04b6cSmrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
553989c04b6cSmrg	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
554089c04b6cSmrg	  ;;
55416fae4e5dSmrg	*Sun\ C*)
55426fae4e5dSmrg	  # Sun C 5.9
55436fae4e5dSmrg	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
55446fae4e5dSmrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
55456fae4e5dSmrg	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
55466fae4e5dSmrg	  ;;
554789c04b6cSmrg        *Intel*\ [[CF]]*Compiler*)
554889c04b6cSmrg	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
554989c04b6cSmrg	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
555089c04b6cSmrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
555189c04b6cSmrg	  ;;
555289c04b6cSmrg	*Portland\ Group*)
555389c04b6cSmrg	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
555489c04b6cSmrg	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
555589c04b6cSmrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
555689c04b6cSmrg	  ;;
55576fae4e5dSmrg	esac
55586fae4e5dSmrg	;;
55596fae4e5dSmrg      esac
55606fae4e5dSmrg      ;;
55616fae4e5dSmrg
55626fae4e5dSmrg    newsos6)
55636fae4e5dSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
55646fae4e5dSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
55656fae4e5dSmrg      ;;
55666fae4e5dSmrg
55676fae4e5dSmrg    *nto* | *qnx*)
55686fae4e5dSmrg      # QNX uses GNU C++, but need to define -shared option too, otherwise
55696fae4e5dSmrg      # it will coredump.
55706fae4e5dSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
55716fae4e5dSmrg      ;;
55726fae4e5dSmrg
55736fae4e5dSmrg    osf3* | osf4* | osf5*)
55746fae4e5dSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
55756fae4e5dSmrg      # All OSF/1 code is PIC.
55766fae4e5dSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
55776fae4e5dSmrg      ;;
55786fae4e5dSmrg
55796fae4e5dSmrg    rdos*)
55806fae4e5dSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
55816fae4e5dSmrg      ;;
55826fae4e5dSmrg
55836fae4e5dSmrg    solaris*)
55846fae4e5dSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
55856fae4e5dSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
55866fae4e5dSmrg      case $cc_basename in
55876fae4e5dSmrg      f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
55886fae4e5dSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
55896fae4e5dSmrg      *)
55906fae4e5dSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
55916fae4e5dSmrg      esac
55926fae4e5dSmrg      ;;
55936fae4e5dSmrg
55946fae4e5dSmrg    sunos4*)
55956fae4e5dSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
55966fae4e5dSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
55976fae4e5dSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
55989c9ff80cSmrg      ;;
55996fae4e5dSmrg
56006fae4e5dSmrg    sysv4 | sysv4.2uw2* | sysv4.3*)
56016fae4e5dSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
56026fae4e5dSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
56036fae4e5dSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
56049c9ff80cSmrg      ;;
56056fae4e5dSmrg
56069c9ff80cSmrg    sysv4*MP*)
56076fae4e5dSmrg      if test -d /usr/nec ;then
56086fae4e5dSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
56096fae4e5dSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
56109c9ff80cSmrg      fi
56119c9ff80cSmrg      ;;
56126fae4e5dSmrg
56136fae4e5dSmrg    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
56146fae4e5dSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
56156fae4e5dSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
56166fae4e5dSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
56171f0ac6a5Smrg      ;;
56186fae4e5dSmrg
56196fae4e5dSmrg    unicos*)
56206fae4e5dSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
56216fae4e5dSmrg      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
56226fae4e5dSmrg      ;;
56236fae4e5dSmrg
56246fae4e5dSmrg    uts4*)
56256fae4e5dSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
56266fae4e5dSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
56271f0ac6a5Smrg      ;;
56286fae4e5dSmrg
56291f0ac6a5Smrg    *)
56306fae4e5dSmrg      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
56311f0ac6a5Smrg      ;;
56321f0ac6a5Smrg    esac
56336fae4e5dSmrg  fi
56346fae4e5dSmrg])
56356fae4e5dSmrgcase $host_os in
56366fae4e5dSmrg  # For platforms which do not support PIC, -DPIC is meaningless:
56376fae4e5dSmrg  *djgpp*)
56386fae4e5dSmrg    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
56396fae4e5dSmrg    ;;
56406fae4e5dSmrg  *)
56416fae4e5dSmrg    _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
56426fae4e5dSmrg    ;;
56436fae4e5dSmrgesac
56446fae4e5dSmrg
56456fae4e5dSmrgAC_CACHE_CHECK([for $compiler option to produce PIC],
56466fae4e5dSmrg  [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
56476fae4e5dSmrg  [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
56486fae4e5dSmrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
56496fae4e5dSmrg
56506fae4e5dSmrg#
56516fae4e5dSmrg# Check to make sure the PIC flag actually works.
56526fae4e5dSmrg#
56536fae4e5dSmrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
56546fae4e5dSmrg  _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
56556fae4e5dSmrg    [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
56566fae4e5dSmrg    [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
56576fae4e5dSmrg    [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
56586fae4e5dSmrg     "" | " "*) ;;
56596fae4e5dSmrg     *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
56606fae4e5dSmrg     esac],
56616fae4e5dSmrg    [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
56626fae4e5dSmrg     _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
56636fae4e5dSmrgfi
56646fae4e5dSmrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
56656fae4e5dSmrg	[Additional compiler flags for building library objects])
56666fae4e5dSmrg
56676fae4e5dSmrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
56686fae4e5dSmrg	[How to pass a linker flag through the compiler])
56696fae4e5dSmrg#
56706fae4e5dSmrg# Check to make sure the static flag actually works.
56716fae4e5dSmrg#
56726fae4e5dSmrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
56736fae4e5dSmrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
56746fae4e5dSmrg  _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
56756fae4e5dSmrg  $lt_tmp_static_flag,
56766fae4e5dSmrg  [],
56776fae4e5dSmrg  [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
56786fae4e5dSmrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
56796fae4e5dSmrg	[Compiler flag to prevent dynamic linking])
56806fae4e5dSmrg])# _LT_COMPILER_PIC
56816fae4e5dSmrg
56826fae4e5dSmrg
56836fae4e5dSmrg# _LT_LINKER_SHLIBS([TAGNAME])
56846fae4e5dSmrg# ----------------------------
56856fae4e5dSmrg# See if the linker supports building shared libraries.
56866fae4e5dSmrgm4_defun([_LT_LINKER_SHLIBS],
56876fae4e5dSmrg[AC_REQUIRE([LT_PATH_LD])dnl
56886fae4e5dSmrgAC_REQUIRE([LT_PATH_NM])dnl
56896fae4e5dSmrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl
56906fae4e5dSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
56916fae4e5dSmrgm4_require([_LT_DECL_EGREP])dnl
56926fae4e5dSmrgm4_require([_LT_DECL_SED])dnl
56936fae4e5dSmrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
56946fae4e5dSmrgm4_require([_LT_TAG_COMPILER])dnl
56956fae4e5dSmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
56966fae4e5dSmrgm4_if([$1], [CXX], [
56976fae4e5dSmrg  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
56986fae4e5dSmrg  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
56996fae4e5dSmrg  case $host_os in
57006fae4e5dSmrg  aix[[4-9]]*)
57016fae4e5dSmrg    # If we're using GNU nm, then we don't want the "-C" option.
57026fae4e5dSmrg    # -C means demangle to AIX nm, but means don't demangle with GNU nm
57036fae4e5dSmrg    # Also, AIX nm treats weak defined symbols like other global defined
57046fae4e5dSmrg    # symbols, whereas GNU nm marks them as "W".
57056fae4e5dSmrg    if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
57066fae4e5dSmrg      _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
57076fae4e5dSmrg    else
57086fae4e5dSmrg      _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
57096fae4e5dSmrg    fi
57106fae4e5dSmrg    ;;
57116fae4e5dSmrg  pw32*)
57126fae4e5dSmrg    _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
57136fae4e5dSmrg    ;;
57146fae4e5dSmrg  cygwin* | mingw* | cegcc*)
57156fae4e5dSmrg    case $cc_basename in
571689c04b6cSmrg    cl*)
571789c04b6cSmrg      _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
571889c04b6cSmrg      ;;
57196fae4e5dSmrg    *)
57206fae4e5dSmrg      _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'
57216fae4e5dSmrg      _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
57226fae4e5dSmrg      ;;
57236fae4e5dSmrg    esac
57246fae4e5dSmrg    ;;
57256fae4e5dSmrg  *)
57266fae4e5dSmrg    _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
57276fae4e5dSmrg    ;;
57286fae4e5dSmrg  esac
57296fae4e5dSmrg], [
57306fae4e5dSmrg  runpath_var=
57316fae4e5dSmrg  _LT_TAGVAR(allow_undefined_flag, $1)=
57326fae4e5dSmrg  _LT_TAGVAR(always_export_symbols, $1)=no
57336fae4e5dSmrg  _LT_TAGVAR(archive_cmds, $1)=
57346fae4e5dSmrg  _LT_TAGVAR(archive_expsym_cmds, $1)=
57356fae4e5dSmrg  _LT_TAGVAR(compiler_needs_object, $1)=no
57366fae4e5dSmrg  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
57376fae4e5dSmrg  _LT_TAGVAR(export_dynamic_flag_spec, $1)=
57386fae4e5dSmrg  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
57396fae4e5dSmrg  _LT_TAGVAR(hardcode_automatic, $1)=no
57406fae4e5dSmrg  _LT_TAGVAR(hardcode_direct, $1)=no
57416fae4e5dSmrg  _LT_TAGVAR(hardcode_direct_absolute, $1)=no
57426fae4e5dSmrg  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
57436fae4e5dSmrg  _LT_TAGVAR(hardcode_libdir_separator, $1)=
57446fae4e5dSmrg  _LT_TAGVAR(hardcode_minus_L, $1)=no
57456fae4e5dSmrg  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
57466fae4e5dSmrg  _LT_TAGVAR(inherit_rpath, $1)=no
57476fae4e5dSmrg  _LT_TAGVAR(link_all_deplibs, $1)=unknown
57486fae4e5dSmrg  _LT_TAGVAR(module_cmds, $1)=
57496fae4e5dSmrg  _LT_TAGVAR(module_expsym_cmds, $1)=
57506fae4e5dSmrg  _LT_TAGVAR(old_archive_from_new_cmds, $1)=
57516fae4e5dSmrg  _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
57526fae4e5dSmrg  _LT_TAGVAR(thread_safe_flag_spec, $1)=
57536fae4e5dSmrg  _LT_TAGVAR(whole_archive_flag_spec, $1)=
57546fae4e5dSmrg  # include_expsyms should be a list of space-separated symbols to be *always*
57556fae4e5dSmrg  # included in the symbol list
57566fae4e5dSmrg  _LT_TAGVAR(include_expsyms, $1)=
57576fae4e5dSmrg  # exclude_expsyms can be an extended regexp of symbols to exclude
57586fae4e5dSmrg  # it will be wrapped by ` (' and `)$', so one must not match beginning or
57596fae4e5dSmrg  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
57606fae4e5dSmrg  # as well as any symbol that contains `d'.
57616fae4e5dSmrg  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
57626fae4e5dSmrg  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
57636fae4e5dSmrg  # platforms (ab)use it in PIC code, but their linkers get confused if
57646fae4e5dSmrg  # the symbol is explicitly referenced.  Since portable code cannot
57656fae4e5dSmrg  # rely on this symbol name, it's probably fine to never include it in
57666fae4e5dSmrg  # preloaded symbol tables.
57676fae4e5dSmrg  # Exclude shared library initialization/finalization symbols.
57686fae4e5dSmrgdnl Note also adjust exclude_expsyms for C++ above.
57696fae4e5dSmrg  extract_expsyms_cmds=
57706fae4e5dSmrg
57716fae4e5dSmrg  case $host_os in
57726fae4e5dSmrg  cygwin* | mingw* | pw32* | cegcc*)
57736fae4e5dSmrg    # FIXME: the MSVC++ port hasn't been tested in a loooong time
57746fae4e5dSmrg    # When not using gcc, we currently assume that we are using
57756fae4e5dSmrg    # Microsoft Visual C++.
57766fae4e5dSmrg    if test "$GCC" != yes; then
57776fae4e5dSmrg      with_gnu_ld=no
57786fae4e5dSmrg    fi
57796fae4e5dSmrg    ;;
57806fae4e5dSmrg  interix*)
57816fae4e5dSmrg    # we just hope/assume this is gcc and not c89 (= MSVC++)
57826fae4e5dSmrg    with_gnu_ld=yes
57836fae4e5dSmrg    ;;
57846fae4e5dSmrg  openbsd*)
57856fae4e5dSmrg    with_gnu_ld=no
57866fae4e5dSmrg    ;;
57876fae4e5dSmrg  esac
57886fae4e5dSmrg
57896fae4e5dSmrg  _LT_TAGVAR(ld_shlibs, $1)=yes
57906fae4e5dSmrg
57916fae4e5dSmrg  # On some targets, GNU ld is compatible enough with the native linker
57926fae4e5dSmrg  # that we're better off using the native interface for both.
57936fae4e5dSmrg  lt_use_gnu_ld_interface=no
57946fae4e5dSmrg  if test "$with_gnu_ld" = yes; then
57956fae4e5dSmrg    case $host_os in
57966fae4e5dSmrg      aix*)
57976fae4e5dSmrg	# The AIX port of GNU ld has always aspired to compatibility
57986fae4e5dSmrg	# with the native linker.  However, as the warning in the GNU ld
57996fae4e5dSmrg	# block says, versions before 2.19.5* couldn't really create working
58006fae4e5dSmrg	# shared libraries, regardless of the interface used.
58016fae4e5dSmrg	case `$LD -v 2>&1` in
58026fae4e5dSmrg	  *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
58036fae4e5dSmrg	  *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
58046fae4e5dSmrg	  *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
58059c9ff80cSmrg	  *)
58066fae4e5dSmrg	    lt_use_gnu_ld_interface=yes
58079c9ff80cSmrg	    ;;
58089c9ff80cSmrg	esac
58091f0ac6a5Smrg	;;
58106fae4e5dSmrg      *)
58116fae4e5dSmrg	lt_use_gnu_ld_interface=yes
58121f0ac6a5Smrg	;;
58136fae4e5dSmrg    esac
58146fae4e5dSmrg  fi
58156fae4e5dSmrg
58166fae4e5dSmrg  if test "$lt_use_gnu_ld_interface" = yes; then
58176fae4e5dSmrg    # If archive_cmds runs LD, not CC, wlarc should be empty
58186fae4e5dSmrg    wlarc='${wl}'
58196fae4e5dSmrg
58206fae4e5dSmrg    # Set some defaults for GNU ld with shared library support. These
58216fae4e5dSmrg    # are reset later if shared libraries are not supported. Putting them
58226fae4e5dSmrg    # here allows them to be overridden if necessary.
58236fae4e5dSmrg    runpath_var=LD_RUN_PATH
58246fae4e5dSmrg    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
58256fae4e5dSmrg    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
58266fae4e5dSmrg    # ancient GNU ld didn't support --whole-archive et. al.
58276fae4e5dSmrg    if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
58286fae4e5dSmrg      _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
58296fae4e5dSmrg    else
58306fae4e5dSmrg      _LT_TAGVAR(whole_archive_flag_spec, $1)=
58316fae4e5dSmrg    fi
58326fae4e5dSmrg    supports_anon_versioning=no
58336fae4e5dSmrg    case `$LD -v 2>&1` in
58346fae4e5dSmrg      *GNU\ gold*) supports_anon_versioning=yes ;;
58356fae4e5dSmrg      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
58366fae4e5dSmrg      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
58376fae4e5dSmrg      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
58386fae4e5dSmrg      *\ 2.11.*) ;; # other 2.11 versions
58396fae4e5dSmrg      *) supports_anon_versioning=yes ;;
58406fae4e5dSmrg    esac
58416fae4e5dSmrg
58426fae4e5dSmrg    # See if GNU ld supports shared libraries.
58436fae4e5dSmrg    case $host_os in
58446fae4e5dSmrg    aix[[3-9]]*)
58456fae4e5dSmrg      # On AIX/PPC, the GNU linker is very broken
58466fae4e5dSmrg      if test "$host_cpu" != ia64; then
58476fae4e5dSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
58486fae4e5dSmrg	cat <<_LT_EOF 1>&2
58496fae4e5dSmrg
58506fae4e5dSmrg*** Warning: the GNU linker, at least up to release 2.19, is reported
58516fae4e5dSmrg*** to be unable to reliably create shared libraries on AIX.
58526fae4e5dSmrg*** Therefore, libtool is disabling shared libraries support.  If you
58536fae4e5dSmrg*** really care for shared libraries, you may want to install binutils
58546fae4e5dSmrg*** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
58556fae4e5dSmrg*** You will then need to restart the configuration process.
58566fae4e5dSmrg
58576fae4e5dSmrg_LT_EOF
58586fae4e5dSmrg      fi
58596fae4e5dSmrg      ;;
58606fae4e5dSmrg
58616fae4e5dSmrg    amigaos*)
58626fae4e5dSmrg      case $host_cpu in
58636fae4e5dSmrg      powerpc)
58646fae4e5dSmrg            # see comment about AmigaOS4 .so support
58656fae4e5dSmrg            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
58666fae4e5dSmrg            _LT_TAGVAR(archive_expsym_cmds, $1)=''
58679c9ff80cSmrg        ;;
58686fae4e5dSmrg      m68k)
58696fae4e5dSmrg            _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)'
58706fae4e5dSmrg            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
58716fae4e5dSmrg            _LT_TAGVAR(hardcode_minus_L, $1)=yes
58726fae4e5dSmrg        ;;
58736fae4e5dSmrg      esac
58746fae4e5dSmrg      ;;
58756fae4e5dSmrg
58766fae4e5dSmrg    beos*)
58776fae4e5dSmrg      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
58786fae4e5dSmrg	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
58796fae4e5dSmrg	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
58806fae4e5dSmrg	# support --undefined.  This deserves some investigation.  FIXME
58816fae4e5dSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
58826fae4e5dSmrg      else
58836fae4e5dSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
58846fae4e5dSmrg      fi
58856fae4e5dSmrg      ;;
58866fae4e5dSmrg
58876fae4e5dSmrg    cygwin* | mingw* | pw32* | cegcc*)
58886fae4e5dSmrg      # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
58896fae4e5dSmrg      # as there is no search path for DLLs.
58906fae4e5dSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
58916fae4e5dSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
58926fae4e5dSmrg      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
58936fae4e5dSmrg      _LT_TAGVAR(always_export_symbols, $1)=no
58946fae4e5dSmrg      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
58956fae4e5dSmrg      _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'
58966fae4e5dSmrg      _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
58976fae4e5dSmrg
58986fae4e5dSmrg      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
58996fae4e5dSmrg        _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'
59006fae4e5dSmrg	# If the export-symbols file already is a .def file (1st line
59016fae4e5dSmrg	# is EXPORTS), use it as is; otherwise, prepend...
59026fae4e5dSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
59036fae4e5dSmrg	  cp $export_symbols $output_objdir/$soname.def;
59046fae4e5dSmrg	else
59056fae4e5dSmrg	  echo EXPORTS > $output_objdir/$soname.def;
59066fae4e5dSmrg	  cat $export_symbols >> $output_objdir/$soname.def;
59076fae4e5dSmrg	fi~
59086fae4e5dSmrg	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
59096fae4e5dSmrg      else
59106fae4e5dSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
59116fae4e5dSmrg      fi
59126fae4e5dSmrg      ;;
59136fae4e5dSmrg
59146fae4e5dSmrg    haiku*)
59156fae4e5dSmrg      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
59166fae4e5dSmrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
59176fae4e5dSmrg      ;;
59186fae4e5dSmrg
59196fae4e5dSmrg    interix[[3-9]]*)
59206fae4e5dSmrg      _LT_TAGVAR(hardcode_direct, $1)=no
59216fae4e5dSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
59226fae4e5dSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
59236fae4e5dSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
59246fae4e5dSmrg      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
59256fae4e5dSmrg      # Instead, shared libraries are loaded at an image base (0x10000000 by
59266fae4e5dSmrg      # default) and relocated if they conflict, which is a slow very memory
59276fae4e5dSmrg      # consuming and fragmenting process.  To avoid this, we pick a random,
59286fae4e5dSmrg      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
59296fae4e5dSmrg      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
59306fae4e5dSmrg      _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'
59316fae4e5dSmrg      _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'
59326fae4e5dSmrg      ;;
59336fae4e5dSmrg
59346fae4e5dSmrg    gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
59356fae4e5dSmrg      tmp_diet=no
59366fae4e5dSmrg      if test "$host_os" = linux-dietlibc; then
59379c9ff80cSmrg	case $cc_basename in
59386fae4e5dSmrg	  diet\ *) tmp_diet=yes;;	# linux-dietlibc with static linking (!diet-dyn)
59391f0ac6a5Smrg	esac
59406fae4e5dSmrg      fi
59416fae4e5dSmrg      if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
59426fae4e5dSmrg	 && test "$tmp_diet" = no
59436fae4e5dSmrg      then
59446fae4e5dSmrg	tmp_addflag=' $pic_flag'
59456fae4e5dSmrg	tmp_sharedflag='-shared'
59466fae4e5dSmrg	case $cc_basename,$host_cpu in
59476fae4e5dSmrg        pgcc*)				# Portland Group C compiler
59486fae4e5dSmrg	  _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'
59496fae4e5dSmrg	  tmp_addflag=' $pic_flag'
59506fae4e5dSmrg	  ;;
59516fae4e5dSmrg	pgf77* | pgf90* | pgf95* | pgfortran*)
59526fae4e5dSmrg					# Portland Group f77 and f90 compilers
59536fae4e5dSmrg	  _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'
59546fae4e5dSmrg	  tmp_addflag=' $pic_flag -Mnomain' ;;
59556fae4e5dSmrg	ecc*,ia64* | icc*,ia64*)	# Intel C compiler on ia64
59566fae4e5dSmrg	  tmp_addflag=' -i_dynamic' ;;
59576fae4e5dSmrg	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
59586fae4e5dSmrg	  tmp_addflag=' -i_dynamic -nofor_main' ;;
59596fae4e5dSmrg	ifc* | ifort*)			# Intel Fortran compiler
59606fae4e5dSmrg	  tmp_addflag=' -nofor_main' ;;
59616fae4e5dSmrg	lf95*)				# Lahey Fortran 8.1
59626fae4e5dSmrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)=
59636fae4e5dSmrg	  tmp_sharedflag='--shared' ;;
59646fae4e5dSmrg	xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
59656fae4e5dSmrg	  tmp_sharedflag='-qmkshrobj'
59666fae4e5dSmrg	  tmp_addflag= ;;
59676fae4e5dSmrg	nvcc*)	# Cuda Compiler Driver 2.2
59686fae4e5dSmrg	  _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'
59696fae4e5dSmrg	  _LT_TAGVAR(compiler_needs_object, $1)=yes
59706fae4e5dSmrg	  ;;
59719c9ff80cSmrg	esac
59726fae4e5dSmrg	case `$CC -V 2>&1 | sed 5q` in
59736fae4e5dSmrg	*Sun\ C*)			# Sun C 5.9
59746fae4e5dSmrg	  _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'
59756fae4e5dSmrg	  _LT_TAGVAR(compiler_needs_object, $1)=yes
59766fae4e5dSmrg	  tmp_sharedflag='-G' ;;
59776fae4e5dSmrg	*Sun\ F*)			# Sun Fortran 8.3
59786fae4e5dSmrg	  tmp_sharedflag='-G' ;;
59799c9ff80cSmrg	esac
59806fae4e5dSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
59816fae4e5dSmrg
59826fae4e5dSmrg        if test "x$supports_anon_versioning" = xyes; then
59836fae4e5dSmrg          _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
59846fae4e5dSmrg	    cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
59856fae4e5dSmrg	    echo "local: *; };" >> $output_objdir/$libname.ver~
59866fae4e5dSmrg	    $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
59876fae4e5dSmrg        fi
59886fae4e5dSmrg
59899c9ff80cSmrg	case $cc_basename in
59906fae4e5dSmrg	xlf* | bgf* | bgxlf* | mpixlf*)
59916fae4e5dSmrg	  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
59926fae4e5dSmrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
599389c04b6cSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
59946fae4e5dSmrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
59956fae4e5dSmrg	  if test "x$supports_anon_versioning" = xyes; then
59966fae4e5dSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
59976fae4e5dSmrg	      cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
59986fae4e5dSmrg	      echo "local: *; };" >> $output_objdir/$libname.ver~
59996fae4e5dSmrg	      $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
60006fae4e5dSmrg	  fi
60016fae4e5dSmrg	  ;;
60029c9ff80cSmrg	esac
60036fae4e5dSmrg      else
60046fae4e5dSmrg        _LT_TAGVAR(ld_shlibs, $1)=no
60056fae4e5dSmrg      fi
60066fae4e5dSmrg      ;;
60076fae4e5dSmrg
60086fae4e5dSmrg    netbsd*)
60096fae4e5dSmrg      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
60106fae4e5dSmrg	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
60116fae4e5dSmrg	wlarc=
60126fae4e5dSmrg      else
60136fae4e5dSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
60146fae4e5dSmrg	_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'
60156fae4e5dSmrg      fi
60166fae4e5dSmrg      ;;
60176fae4e5dSmrg
60186fae4e5dSmrg    solaris*)
60196fae4e5dSmrg      if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
60206fae4e5dSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
60216fae4e5dSmrg	cat <<_LT_EOF 1>&2
60226fae4e5dSmrg
60236fae4e5dSmrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably
60246fae4e5dSmrg*** create shared libraries on Solaris systems.  Therefore, libtool
60256fae4e5dSmrg*** is disabling shared libraries support.  We urge you to upgrade GNU
60266fae4e5dSmrg*** binutils to release 2.9.1 or newer.  Another option is to modify
60276fae4e5dSmrg*** your PATH or compiler configuration so that the native linker is
60286fae4e5dSmrg*** used, and then restart.
60296fae4e5dSmrg
60306fae4e5dSmrg_LT_EOF
60316fae4e5dSmrg      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
60326fae4e5dSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
60336fae4e5dSmrg	_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'
60346fae4e5dSmrg      else
60356fae4e5dSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
60366fae4e5dSmrg      fi
60376fae4e5dSmrg      ;;
60386fae4e5dSmrg
60396fae4e5dSmrg    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
60406fae4e5dSmrg      case `$LD -v 2>&1` in
60416fae4e5dSmrg        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
60426fae4e5dSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
60436fae4e5dSmrg	cat <<_LT_EOF 1>&2
60446fae4e5dSmrg
60456fae4e5dSmrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
60466fae4e5dSmrg*** reliably create shared libraries on SCO systems.  Therefore, libtool
60476fae4e5dSmrg*** is disabling shared libraries support.  We urge you to upgrade GNU
60486fae4e5dSmrg*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
60496fae4e5dSmrg*** your PATH or compiler configuration so that the native linker is
60506fae4e5dSmrg*** used, and then restart.
60516fae4e5dSmrg
60526fae4e5dSmrg_LT_EOF
60531f0ac6a5Smrg	;;
60546fae4e5dSmrg	*)
60556fae4e5dSmrg	  # For security reasons, it is highly recommended that you always
60566fae4e5dSmrg	  # use absolute paths for naming shared libraries, and exclude the
60576fae4e5dSmrg	  # DT_RUNPATH tag from executables and libraries.  But doing so
60586fae4e5dSmrg	  # requires that you compile everything twice, which is a pain.
60596fae4e5dSmrg	  if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
60606fae4e5dSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
60616fae4e5dSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
60626fae4e5dSmrg	    _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'
60636fae4e5dSmrg	  else
60646fae4e5dSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
60656fae4e5dSmrg	  fi
60661f0ac6a5Smrg	;;
60676fae4e5dSmrg      esac
60686fae4e5dSmrg      ;;
60696fae4e5dSmrg
60706fae4e5dSmrg    sunos4*)
60716fae4e5dSmrg      _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
60726fae4e5dSmrg      wlarc=
60736fae4e5dSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
60746fae4e5dSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
60756fae4e5dSmrg      ;;
60766fae4e5dSmrg
60776fae4e5dSmrg    *)
60786fae4e5dSmrg      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
60796fae4e5dSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
60806fae4e5dSmrg	_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'
60816fae4e5dSmrg      else
60826fae4e5dSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
60836fae4e5dSmrg      fi
60846fae4e5dSmrg      ;;
60851f0ac6a5Smrg    esac
60861f0ac6a5Smrg
60876fae4e5dSmrg    if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
60886fae4e5dSmrg      runpath_var=
60896fae4e5dSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
60906fae4e5dSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)=
60916fae4e5dSmrg      _LT_TAGVAR(whole_archive_flag_spec, $1)=
60926fae4e5dSmrg    fi
60936fae4e5dSmrg  else
60946fae4e5dSmrg    # PORTME fill in a description of your system's linker (not GNU ld)
60959c9ff80cSmrg    case $host_os in
60966fae4e5dSmrg    aix3*)
60976fae4e5dSmrg      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
60986fae4e5dSmrg      _LT_TAGVAR(always_export_symbols, $1)=yes
60996fae4e5dSmrg      _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'
61006fae4e5dSmrg      # Note: this linker hardcodes the directories in LIBPATH if there
61016fae4e5dSmrg      # are no directories specified by -L.
61026fae4e5dSmrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
61036fae4e5dSmrg      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
61046fae4e5dSmrg	# Neither direct hardcoding nor static linking is supported with a
61056fae4e5dSmrg	# broken collect2.
61066fae4e5dSmrg	_LT_TAGVAR(hardcode_direct, $1)=unsupported
61076fae4e5dSmrg      fi
61086fae4e5dSmrg      ;;
61096fae4e5dSmrg
61106fae4e5dSmrg    aix[[4-9]]*)
61119c9ff80cSmrg      if test "$host_cpu" = ia64; then
61126fae4e5dSmrg	# On IA64, the linker does run time linking by default, so we don't
61136fae4e5dSmrg	# have to do anything special.
61146fae4e5dSmrg	aix_use_runtimelinking=no
61156fae4e5dSmrg	exp_sym_flag='-Bexport'
61166fae4e5dSmrg	no_entry_flag=""
61176fae4e5dSmrg      else
61186fae4e5dSmrg	# If we're using GNU nm, then we don't want the "-C" option.
61196fae4e5dSmrg	# -C means demangle to AIX nm, but means don't demangle with GNU nm
61206fae4e5dSmrg	# Also, AIX nm treats weak defined symbols like other global
61216fae4e5dSmrg	# defined symbols, whereas GNU nm marks them as "W".
61226fae4e5dSmrg	if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
61236fae4e5dSmrg	  _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
61246fae4e5dSmrg	else
61256fae4e5dSmrg	  _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
61266fae4e5dSmrg	fi
61276fae4e5dSmrg	aix_use_runtimelinking=no
61286fae4e5dSmrg
61296fae4e5dSmrg	# Test if we are trying to use run time linking or normal
61306fae4e5dSmrg	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
61316fae4e5dSmrg	# need to do runtime linking.
61326fae4e5dSmrg	case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
61336fae4e5dSmrg	  for ld_flag in $LDFLAGS; do
61346fae4e5dSmrg	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
61356fae4e5dSmrg	    aix_use_runtimelinking=yes
61366fae4e5dSmrg	    break
61376fae4e5dSmrg	  fi
61386fae4e5dSmrg	  done
61396fae4e5dSmrg	  ;;
61406fae4e5dSmrg	esac
61416fae4e5dSmrg
61426fae4e5dSmrg	exp_sym_flag='-bexport'
61436fae4e5dSmrg	no_entry_flag='-bnoentry'
61446fae4e5dSmrg      fi
61456fae4e5dSmrg
61466fae4e5dSmrg      # When large executables or shared objects are built, AIX ld can
61476fae4e5dSmrg      # have problems creating the table of contents.  If linking a library
61486fae4e5dSmrg      # or program results in "error TOC overflow" add -mminimal-toc to
61496fae4e5dSmrg      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
61506fae4e5dSmrg      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
61516fae4e5dSmrg
61526fae4e5dSmrg      _LT_TAGVAR(archive_cmds, $1)=''
61536fae4e5dSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
61546fae4e5dSmrg      _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
61556fae4e5dSmrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
61566fae4e5dSmrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
61576fae4e5dSmrg      _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
61586fae4e5dSmrg
61596fae4e5dSmrg      if test "$GCC" = yes; then
61606fae4e5dSmrg	case $host_os in aix4.[[012]]|aix4.[[012]].*)
61616fae4e5dSmrg	# We only want to do this on AIX 4.2 and lower, the check
61626fae4e5dSmrg	# below for broken collect2 doesn't work under 4.3+
61636fae4e5dSmrg	  collect2name=`${CC} -print-prog-name=collect2`
61646fae4e5dSmrg	  if test -f "$collect2name" &&
61656fae4e5dSmrg	   strings "$collect2name" | $GREP resolve_lib_name >/dev/null
61666fae4e5dSmrg	  then
61676fae4e5dSmrg	  # We have reworked collect2
61686fae4e5dSmrg	  :
61696fae4e5dSmrg	  else
61706fae4e5dSmrg	  # We have old collect2
61716fae4e5dSmrg	  _LT_TAGVAR(hardcode_direct, $1)=unsupported
61726fae4e5dSmrg	  # It fails to find uninstalled libraries when the uninstalled
61736fae4e5dSmrg	  # path is not listed in the libpath.  Setting hardcode_minus_L
61746fae4e5dSmrg	  # to unsupported forces relinking
61756fae4e5dSmrg	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
61766fae4e5dSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
61776fae4e5dSmrg	  _LT_TAGVAR(hardcode_libdir_separator, $1)=
61786fae4e5dSmrg	  fi
61796fae4e5dSmrg	  ;;
61806fae4e5dSmrg	esac
61816fae4e5dSmrg	shared_flag='-shared'
61826fae4e5dSmrg	if test "$aix_use_runtimelinking" = yes; then
61836fae4e5dSmrg	  shared_flag="$shared_flag "'${wl}-G'
61846fae4e5dSmrg	fi
61856fae4e5dSmrg      else
61866fae4e5dSmrg	# not using gcc
61876fae4e5dSmrg	if test "$host_cpu" = ia64; then
61886fae4e5dSmrg	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
61896fae4e5dSmrg	# chokes on -Wl,-G. The following line is correct:
61906fae4e5dSmrg	  shared_flag='-G'
61916fae4e5dSmrg	else
61926fae4e5dSmrg	  if test "$aix_use_runtimelinking" = yes; then
61936fae4e5dSmrg	    shared_flag='${wl}-G'
61946fae4e5dSmrg	  else
61956fae4e5dSmrg	    shared_flag='${wl}-bM:SRE'
61966fae4e5dSmrg	  fi
61976fae4e5dSmrg	fi
61986fae4e5dSmrg      fi
61996fae4e5dSmrg
62006fae4e5dSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
62016fae4e5dSmrg      # It seems that -bexpall does not export symbols beginning with
62026fae4e5dSmrg      # underscore (_), so it is better to generate a list of symbols to export.
62036fae4e5dSmrg      _LT_TAGVAR(always_export_symbols, $1)=yes
62046fae4e5dSmrg      if test "$aix_use_runtimelinking" = yes; then
62056fae4e5dSmrg	# Warning - without using the other runtime loading flags (-brtl),
62066fae4e5dSmrg	# -berok will link without error, but may produce a broken library.
62076fae4e5dSmrg	_LT_TAGVAR(allow_undefined_flag, $1)='-berok'
62086fae4e5dSmrg        # Determine the default libpath from the value encoded in an
62096fae4e5dSmrg        # empty executable.
62106fae4e5dSmrg        _LT_SYS_MODULE_PATH_AIX([$1])
62116fae4e5dSmrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
62126fae4e5dSmrg        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
62136fae4e5dSmrg      else
62146fae4e5dSmrg	if test "$host_cpu" = ia64; then
62156fae4e5dSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
62166fae4e5dSmrg	  _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
62176fae4e5dSmrg	  _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"
62186fae4e5dSmrg	else
62196fae4e5dSmrg	 # Determine the default libpath from the value encoded in an
62206fae4e5dSmrg	 # empty executable.
62216fae4e5dSmrg	 _LT_SYS_MODULE_PATH_AIX([$1])
62226fae4e5dSmrg	 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
62236fae4e5dSmrg	  # Warning - without using the other run time loading flags,
62246fae4e5dSmrg	  # -berok will link without error, but may produce a broken library.
62256fae4e5dSmrg	  _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
62266fae4e5dSmrg	  _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
62276fae4e5dSmrg	  if test "$with_gnu_ld" = yes; then
62286fae4e5dSmrg	    # We only use this code for GNU lds that support --whole-archive.
62296fae4e5dSmrg	    _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
62306fae4e5dSmrg	  else
62316fae4e5dSmrg	    # Exported symbols can be pulled into shared objects from archives
62326fae4e5dSmrg	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
62336fae4e5dSmrg	  fi
62346fae4e5dSmrg	  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
62356fae4e5dSmrg	  # This is similar to how AIX traditionally builds its shared libraries.
62366fae4e5dSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
62376fae4e5dSmrg	fi
62389c9ff80cSmrg      fi
62399c9ff80cSmrg      ;;
62401f0ac6a5Smrg
62419c9ff80cSmrg    amigaos*)
62429c9ff80cSmrg      case $host_cpu in
62439c9ff80cSmrg      powerpc)
62449c9ff80cSmrg            # see comment about AmigaOS4 .so support
62456fae4e5dSmrg            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
62466fae4e5dSmrg            _LT_TAGVAR(archive_expsym_cmds, $1)=''
62479c9ff80cSmrg        ;;
62489c9ff80cSmrg      m68k)
62496fae4e5dSmrg            _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)'
62506fae4e5dSmrg            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
62516fae4e5dSmrg            _LT_TAGVAR(hardcode_minus_L, $1)=yes
62529c9ff80cSmrg        ;;
62539c9ff80cSmrg      esac
62549c9ff80cSmrg      ;;
62551f0ac6a5Smrg
62566fae4e5dSmrg    bsdi[[45]]*)
62576fae4e5dSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
62589c9ff80cSmrg      ;;
62591f0ac6a5Smrg
62606fae4e5dSmrg    cygwin* | mingw* | pw32* | cegcc*)
62616fae4e5dSmrg      # When not using gcc, we currently assume that we are using
62626fae4e5dSmrg      # Microsoft Visual C++.
62636fae4e5dSmrg      # hardcode_libdir_flag_spec is actually meaningless, as there is
62646fae4e5dSmrg      # no search path for DLLs.
62656fae4e5dSmrg      case $cc_basename in
62666fae4e5dSmrg      cl*)
62676fae4e5dSmrg	# Native MSVC
62686fae4e5dSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
62696fae4e5dSmrg	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
62706fae4e5dSmrg	_LT_TAGVAR(always_export_symbols, $1)=yes
62716fae4e5dSmrg	_LT_TAGVAR(file_list_spec, $1)='@'
62726fae4e5dSmrg	# Tell ltmain to make .lib files, not .a files.
62736fae4e5dSmrg	libext=lib
62746fae4e5dSmrg	# Tell ltmain to make .dll files, not .so files.
62756fae4e5dSmrg	shrext_cmds=".dll"
62766fae4e5dSmrg	# FIXME: Setting linknames here is a bad hack.
62776fae4e5dSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
62786fae4e5dSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
62796fae4e5dSmrg	    sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
62806fae4e5dSmrg	  else
62816fae4e5dSmrg	    sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
62826fae4e5dSmrg	  fi~
62836fae4e5dSmrg	  $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
62846fae4e5dSmrg	  linknames='
62856fae4e5dSmrg	# The linker will not automatically build a static lib if we build a DLL.
62866fae4e5dSmrg	# _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
62876fae4e5dSmrg	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
628889c04b6cSmrg	_LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
62896fae4e5dSmrg	_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'
62906fae4e5dSmrg	# Don't use ranlib
62916fae4e5dSmrg	_LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
62926fae4e5dSmrg	_LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
62936fae4e5dSmrg	  lt_tool_outputfile="@TOOL_OUTPUT@"~
62946fae4e5dSmrg	  case $lt_outputfile in
62956fae4e5dSmrg	    *.exe|*.EXE) ;;
62966fae4e5dSmrg	    *)
62976fae4e5dSmrg	      lt_outputfile="$lt_outputfile.exe"
62986fae4e5dSmrg	      lt_tool_outputfile="$lt_tool_outputfile.exe"
62996fae4e5dSmrg	      ;;
63006fae4e5dSmrg	  esac~
63016fae4e5dSmrg	  if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
63026fae4e5dSmrg	    $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
63036fae4e5dSmrg	    $RM "$lt_outputfile.manifest";
63046fae4e5dSmrg	  fi'
63059c9ff80cSmrg	;;
63069c9ff80cSmrg      *)
63076fae4e5dSmrg	# Assume MSVC wrapper
63086fae4e5dSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
63096fae4e5dSmrg	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
63106fae4e5dSmrg	# Tell ltmain to make .lib files, not .a files.
63116fae4e5dSmrg	libext=lib
63126fae4e5dSmrg	# Tell ltmain to make .dll files, not .so files.
63136fae4e5dSmrg	shrext_cmds=".dll"
63146fae4e5dSmrg	# FIXME: Setting linknames here is a bad hack.
63156fae4e5dSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
63166fae4e5dSmrg	# The linker will automatically build a .lib file if we build a DLL.
63176fae4e5dSmrg	_LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
63186fae4e5dSmrg	# FIXME: Should let the user specify the lib program.
63196fae4e5dSmrg	_LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
63206fae4e5dSmrg	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
63219c9ff80cSmrg	;;
63229c9ff80cSmrg      esac
63239c9ff80cSmrg      ;;
63241f0ac6a5Smrg
63256fae4e5dSmrg    darwin* | rhapsody*)
63266fae4e5dSmrg      _LT_DARWIN_LINKER_FEATURES($1)
63279c9ff80cSmrg      ;;
63281f0ac6a5Smrg
63296fae4e5dSmrg    dgux*)
63306fae4e5dSmrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
63316fae4e5dSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
63326fae4e5dSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
63339c9ff80cSmrg      ;;
63341f0ac6a5Smrg
63356fae4e5dSmrg    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
63366fae4e5dSmrg    # support.  Future versions do this automatically, but an explicit c++rt0.o
63376fae4e5dSmrg    # does not break anything, and helps significantly (at the cost of a little
63386fae4e5dSmrg    # extra space).
63396fae4e5dSmrg    freebsd2.2*)
63406fae4e5dSmrg      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
63416fae4e5dSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
63426fae4e5dSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
63436fae4e5dSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
63449c9ff80cSmrg      ;;
63451f0ac6a5Smrg
63466fae4e5dSmrg    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
634789c04b6cSmrg    freebsd2.*)
63486fae4e5dSmrg      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
63496fae4e5dSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
63506fae4e5dSmrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
63516fae4e5dSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
63529c9ff80cSmrg      ;;
63531f0ac6a5Smrg
63546fae4e5dSmrg    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
63556fae4e5dSmrg    freebsd* | dragonfly*)
63566fae4e5dSmrg      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
63576fae4e5dSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
63586fae4e5dSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
63596fae4e5dSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
63609c9ff80cSmrg      ;;
63611f0ac6a5Smrg
63626fae4e5dSmrg    hpux9*)
63636fae4e5dSmrg      if test "$GCC" = yes; then
63646fae4e5dSmrg	_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 $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
63656fae4e5dSmrg      else
63666fae4e5dSmrg	_LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
63676fae4e5dSmrg      fi
63686fae4e5dSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
63696fae4e5dSmrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
63706fae4e5dSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
63716fae4e5dSmrg
63726fae4e5dSmrg      # hardcode_minus_L: Not really in the search PATH,
63736fae4e5dSmrg      # but as the default location of the library.
63746fae4e5dSmrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
63756fae4e5dSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
63769c9ff80cSmrg      ;;
63771f0ac6a5Smrg
63786fae4e5dSmrg    hpux10*)
63796fae4e5dSmrg      if test "$GCC" = yes && test "$with_gnu_ld" = no; then
63806fae4e5dSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
63816fae4e5dSmrg      else
63826fae4e5dSmrg	_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
63836fae4e5dSmrg      fi
63846fae4e5dSmrg      if test "$with_gnu_ld" = no; then
63856fae4e5dSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
63866fae4e5dSmrg	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
63876fae4e5dSmrg	_LT_TAGVAR(hardcode_direct, $1)=yes
63886fae4e5dSmrg	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
63896fae4e5dSmrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
63906fae4e5dSmrg	# hardcode_minus_L: Not really in the search PATH,
63916fae4e5dSmrg	# but as the default location of the library.
63926fae4e5dSmrg	_LT_TAGVAR(hardcode_minus_L, $1)=yes
63936fae4e5dSmrg      fi
63949c9ff80cSmrg      ;;
63951f0ac6a5Smrg
63966fae4e5dSmrg    hpux11*)
63976fae4e5dSmrg      if test "$GCC" = yes && test "$with_gnu_ld" = no; then
63986fae4e5dSmrg	case $host_cpu in
63996fae4e5dSmrg	hppa*64*)
64006fae4e5dSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
64016fae4e5dSmrg	  ;;
64026fae4e5dSmrg	ia64*)
64036fae4e5dSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
64046fae4e5dSmrg	  ;;
64056fae4e5dSmrg	*)
64066fae4e5dSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
64076fae4e5dSmrg	  ;;
64086fae4e5dSmrg	esac
64096fae4e5dSmrg      else
64106fae4e5dSmrg	case $host_cpu in
64116fae4e5dSmrg	hppa*64*)
64126fae4e5dSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
64136fae4e5dSmrg	  ;;
64146fae4e5dSmrg	ia64*)
64156fae4e5dSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
64166fae4e5dSmrg	  ;;
64176fae4e5dSmrg	*)
64186fae4e5dSmrg	m4_if($1, [], [
64196fae4e5dSmrg	  # Older versions of the 11.00 compiler do not understand -b yet
64206fae4e5dSmrg	  # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
64216fae4e5dSmrg	  _LT_LINKER_OPTION([if $CC understands -b],
64226fae4e5dSmrg	    _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
64236fae4e5dSmrg	    [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
64246fae4e5dSmrg	    [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
64256fae4e5dSmrg	  [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
64269c9ff80cSmrg	  ;;
64276fae4e5dSmrg	esac
64286fae4e5dSmrg      fi
64296fae4e5dSmrg      if test "$with_gnu_ld" = no; then
64306fae4e5dSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
64316fae4e5dSmrg	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
64326fae4e5dSmrg
64336fae4e5dSmrg	case $host_cpu in
64346fae4e5dSmrg	hppa*64*|ia64*)
64356fae4e5dSmrg	  _LT_TAGVAR(hardcode_direct, $1)=no
64366fae4e5dSmrg	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
64376fae4e5dSmrg	  ;;
64386fae4e5dSmrg	*)
64396fae4e5dSmrg	  _LT_TAGVAR(hardcode_direct, $1)=yes
64406fae4e5dSmrg	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
64416fae4e5dSmrg	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
64426fae4e5dSmrg
64436fae4e5dSmrg	  # hardcode_minus_L: Not really in the search PATH,
64446fae4e5dSmrg	  # but as the default location of the library.
64456fae4e5dSmrg	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
64469c9ff80cSmrg	  ;;
64479c9ff80cSmrg	esac
64486fae4e5dSmrg      fi
64496fae4e5dSmrg      ;;
64506fae4e5dSmrg
64516fae4e5dSmrg    irix5* | irix6* | nonstopux*)
64526fae4e5dSmrg      if test "$GCC" = yes; then
64536fae4e5dSmrg	_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'
64546fae4e5dSmrg	# Try to use the -exported_symbol ld option, if it does not
64556fae4e5dSmrg	# work, assume that -exports_file does not work either and
64566fae4e5dSmrg	# implicitly export all symbols.
64576fae4e5dSmrg	# This should be the same for all languages, so no per-tag cache variable.
64586fae4e5dSmrg	AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
64596fae4e5dSmrg	  [lt_cv_irix_exported_symbol],
64606fae4e5dSmrg	  [save_LDFLAGS="$LDFLAGS"
64616fae4e5dSmrg	   LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
64626fae4e5dSmrg	   AC_LINK_IFELSE(
64636fae4e5dSmrg	     [AC_LANG_SOURCE(
64646fae4e5dSmrg	        [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
64656fae4e5dSmrg			      [C++], [[int foo (void) { return 0; }]],
64666fae4e5dSmrg			      [Fortran 77], [[
64676fae4e5dSmrg      subroutine foo
64686fae4e5dSmrg      end]],
64696fae4e5dSmrg			      [Fortran], [[
64706fae4e5dSmrg      subroutine foo
64716fae4e5dSmrg      end]])])],
64726fae4e5dSmrg	      [lt_cv_irix_exported_symbol=yes],
64736fae4e5dSmrg	      [lt_cv_irix_exported_symbol=no])
64746fae4e5dSmrg           LDFLAGS="$save_LDFLAGS"])
64756fae4e5dSmrg	if test "$lt_cv_irix_exported_symbol" = yes; then
64766fae4e5dSmrg          _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'
64776fae4e5dSmrg	fi
64786fae4e5dSmrg      else
64796fae4e5dSmrg	_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'
64806fae4e5dSmrg	_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'
64816fae4e5dSmrg      fi
64826fae4e5dSmrg      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
64836fae4e5dSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
64846fae4e5dSmrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
64856fae4e5dSmrg      _LT_TAGVAR(inherit_rpath, $1)=yes
64866fae4e5dSmrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
64876fae4e5dSmrg      ;;
64886fae4e5dSmrg
64896fae4e5dSmrg    netbsd*)
64906fae4e5dSmrg      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
64916fae4e5dSmrg	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
64926fae4e5dSmrg      else
64936fae4e5dSmrg	_LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
64946fae4e5dSmrg      fi
64956fae4e5dSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
64966fae4e5dSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
64976fae4e5dSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
64989c9ff80cSmrg      ;;
64991f0ac6a5Smrg
65009c9ff80cSmrg    newsos6)
65016fae4e5dSmrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
65026fae4e5dSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
65036fae4e5dSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
65046fae4e5dSmrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
65056fae4e5dSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
65069c9ff80cSmrg      ;;
6507e5410a46Smrg
65089c9ff80cSmrg    *nto* | *qnx*)
65099c9ff80cSmrg      ;;
65101f0ac6a5Smrg
65116fae4e5dSmrg    openbsd*)
65126fae4e5dSmrg      if test -f /usr/libexec/ld.so; then
65136fae4e5dSmrg	_LT_TAGVAR(hardcode_direct, $1)=yes
65146fae4e5dSmrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
65156fae4e5dSmrg	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
65166fae4e5dSmrg	if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
65176fae4e5dSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
65186fae4e5dSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
65196fae4e5dSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
65206fae4e5dSmrg	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
65216fae4e5dSmrg	else
65226fae4e5dSmrg	  case $host_os in
65236fae4e5dSmrg	   openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
65246fae4e5dSmrg	     _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
65256fae4e5dSmrg	     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
65266fae4e5dSmrg	     ;;
65276fae4e5dSmrg	   *)
65286fae4e5dSmrg	     _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
65296fae4e5dSmrg	     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
65306fae4e5dSmrg	     ;;
65316fae4e5dSmrg	  esac
65326fae4e5dSmrg	fi
65336fae4e5dSmrg      else
65346fae4e5dSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
65356fae4e5dSmrg      fi
6536e5410a46Smrg      ;;
6537e5410a46Smrg
65386fae4e5dSmrg    os2*)
65396fae4e5dSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
65406fae4e5dSmrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
65416fae4e5dSmrg      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
65426fae4e5dSmrg      _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
65436fae4e5dSmrg      _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
65446fae4e5dSmrg      ;;
65456fae4e5dSmrg
65466fae4e5dSmrg    osf3*)
65476fae4e5dSmrg      if test "$GCC" = yes; then
65486fae4e5dSmrg	_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
65496fae4e5dSmrg	_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'
65506fae4e5dSmrg      else
65516fae4e5dSmrg	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
65526fae4e5dSmrg	_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'
65536fae4e5dSmrg      fi
65546fae4e5dSmrg      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
65556fae4e5dSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
65566fae4e5dSmrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
65576fae4e5dSmrg      ;;
65586fae4e5dSmrg
65596fae4e5dSmrg    osf4* | osf5*)	# as osf3* with the addition of -msym flag
65606fae4e5dSmrg      if test "$GCC" = yes; then
65616fae4e5dSmrg	_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
65626fae4e5dSmrg	_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'
65636fae4e5dSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
65646fae4e5dSmrg      else
65656fae4e5dSmrg	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
65666fae4e5dSmrg	_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'
65676fae4e5dSmrg	_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~
65686fae4e5dSmrg	$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'
65696fae4e5dSmrg
65706fae4e5dSmrg	# Both c and cxx compiler support -rpath directly
65716fae4e5dSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
65726fae4e5dSmrg      fi
65736fae4e5dSmrg      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
65746fae4e5dSmrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6575e5410a46Smrg      ;;
6576e5410a46Smrg
65779c9ff80cSmrg    solaris*)
65786fae4e5dSmrg      _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
65796fae4e5dSmrg      if test "$GCC" = yes; then
65806fae4e5dSmrg	wlarc='${wl}'
65816fae4e5dSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
65826fae4e5dSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
65836fae4e5dSmrg	  $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'
65846fae4e5dSmrg      else
65856fae4e5dSmrg	case `$CC -V 2>&1` in
65866fae4e5dSmrg	*"Compilers 5.0"*)
65876fae4e5dSmrg	  wlarc=''
65886fae4e5dSmrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
65896fae4e5dSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
65906fae4e5dSmrg	  $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
65916fae4e5dSmrg	  ;;
65926fae4e5dSmrg	*)
65936fae4e5dSmrg	  wlarc='${wl}'
65946fae4e5dSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
65956fae4e5dSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
65966fae4e5dSmrg	  $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
65976fae4e5dSmrg	  ;;
65986fae4e5dSmrg	esac
65996fae4e5dSmrg      fi
66006fae4e5dSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
66016fae4e5dSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
66026fae4e5dSmrg      case $host_os in
66036fae4e5dSmrg      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
66049c9ff80cSmrg      *)
66056fae4e5dSmrg	# The compiler driver will combine and reorder linker options,
66066fae4e5dSmrg	# but understands `-z linker_flag'.  GCC discards it without `$wl',
66076fae4e5dSmrg	# but is careful enough not to reorder.
66086fae4e5dSmrg	# Supported since Solaris 2.6 (maybe 2.5.1?)
66096fae4e5dSmrg	if test "$GCC" = yes; then
66106fae4e5dSmrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
66116fae4e5dSmrg	else
66126fae4e5dSmrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
66136fae4e5dSmrg	fi
66146fae4e5dSmrg	;;
66159c9ff80cSmrg      esac
66166fae4e5dSmrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
66179c9ff80cSmrg      ;;
66181f0ac6a5Smrg
66199c9ff80cSmrg    sunos4*)
66206fae4e5dSmrg      if test "x$host_vendor" = xsequent; then
66216fae4e5dSmrg	# Use $CC to link under sequent, because it throws in some extra .o
66226fae4e5dSmrg	# files that make .init and .fini sections work.
66236fae4e5dSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
66246fae4e5dSmrg      else
66256fae4e5dSmrg	_LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
66266fae4e5dSmrg      fi
66276fae4e5dSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
66286fae4e5dSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
66296fae4e5dSmrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
66306fae4e5dSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
66319c9ff80cSmrg      ;;
66321f0ac6a5Smrg
66336fae4e5dSmrg    sysv4)
66346fae4e5dSmrg      case $host_vendor in
66356fae4e5dSmrg	sni)
66366fae4e5dSmrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
66376fae4e5dSmrg	  _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
66386fae4e5dSmrg	;;
66396fae4e5dSmrg	siemens)
66406fae4e5dSmrg	  ## LD is ld it makes a PLAMLIB
66416fae4e5dSmrg	  ## CC just makes a GrossModule.
66426fae4e5dSmrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
66436fae4e5dSmrg	  _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
66446fae4e5dSmrg	  _LT_TAGVAR(hardcode_direct, $1)=no
66456fae4e5dSmrg        ;;
66466fae4e5dSmrg	motorola)
66476fae4e5dSmrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
66486fae4e5dSmrg	  _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
66496fae4e5dSmrg	;;
66506fae4e5dSmrg      esac
66516fae4e5dSmrg      runpath_var='LD_RUN_PATH'
66526fae4e5dSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
66536fae4e5dSmrg      ;;
66546fae4e5dSmrg
66556fae4e5dSmrg    sysv4.3*)
66566fae4e5dSmrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
66576fae4e5dSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
66586fae4e5dSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
66599c9ff80cSmrg      ;;
66601f0ac6a5Smrg
66619c9ff80cSmrg    sysv4*MP*)
66626fae4e5dSmrg      if test -d /usr/nec; then
66636fae4e5dSmrg	_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
66646fae4e5dSmrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
66656fae4e5dSmrg	runpath_var=LD_RUN_PATH
66666fae4e5dSmrg	hardcode_runpath_var=yes
66676fae4e5dSmrg	_LT_TAGVAR(ld_shlibs, $1)=yes
66689c9ff80cSmrg      fi
66699c9ff80cSmrg      ;;
66701f0ac6a5Smrg
66716fae4e5dSmrg    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
66726fae4e5dSmrg      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
66736fae4e5dSmrg      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
66746fae4e5dSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
66756fae4e5dSmrg      runpath_var='LD_RUN_PATH'
66766fae4e5dSmrg
66776fae4e5dSmrg      if test "$GCC" = yes; then
66786fae4e5dSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
66796fae4e5dSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
66806fae4e5dSmrg      else
66816fae4e5dSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
66826fae4e5dSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
66836fae4e5dSmrg      fi
66849c9ff80cSmrg      ;;
66851f0ac6a5Smrg
66866fae4e5dSmrg    sysv5* | sco3.2v5* | sco5v6*)
66876fae4e5dSmrg      # Note: We can NOT use -z defs as we might desire, because we do not
66886fae4e5dSmrg      # link with -lc, and that would cause any symbols used from libc to
66896fae4e5dSmrg      # always be unresolved, which means just about no library would
66906fae4e5dSmrg      # ever link correctly.  If we're not using GNU ld we use -z text
66916fae4e5dSmrg      # though, which does catch some bad symbols but isn't as heavy-handed
66926fae4e5dSmrg      # as -z defs.
66936fae4e5dSmrg      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
66946fae4e5dSmrg      _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
66956fae4e5dSmrg      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
66966fae4e5dSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
66976fae4e5dSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
66986fae4e5dSmrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
66996fae4e5dSmrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
67006fae4e5dSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
67016fae4e5dSmrg      runpath_var='LD_RUN_PATH'
67026fae4e5dSmrg
67036fae4e5dSmrg      if test "$GCC" = yes; then
67046fae4e5dSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
67056fae4e5dSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
67066fae4e5dSmrg      else
67076fae4e5dSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
67086fae4e5dSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
67096fae4e5dSmrg      fi
67109c9ff80cSmrg      ;;
67111f0ac6a5Smrg
67129c9ff80cSmrg    uts4*)
67136fae4e5dSmrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
67146fae4e5dSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
67156fae4e5dSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
67169c9ff80cSmrg      ;;
67171f0ac6a5Smrg
67189c9ff80cSmrg    *)
67196fae4e5dSmrg      _LT_TAGVAR(ld_shlibs, $1)=no
67209c9ff80cSmrg      ;;
67219c9ff80cSmrg    esac
67226fae4e5dSmrg
67236fae4e5dSmrg    if test x$host_vendor = xsni; then
67246fae4e5dSmrg      case $host in
67256fae4e5dSmrg      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
67266fae4e5dSmrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
67276fae4e5dSmrg	;;
67286fae4e5dSmrg      esac
67296fae4e5dSmrg    fi
67309c9ff80cSmrg  fi
67319c9ff80cSmrg])
67326fae4e5dSmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
67336fae4e5dSmrgtest "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
67341f0ac6a5Smrg
67356fae4e5dSmrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
67366fae4e5dSmrg
67376fae4e5dSmrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
67386fae4e5dSmrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
67396fae4e5dSmrg_LT_DECL([], [extract_expsyms_cmds], [2],
67406fae4e5dSmrg    [The commands to extract the exported symbol list from a shared archive])
67411f0ac6a5Smrg
67429c9ff80cSmrg#
67436fae4e5dSmrg# Do we need to explicitly link libc?
67449c9ff80cSmrg#
67456fae4e5dSmrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
67466fae4e5dSmrgx|xyes)
67476fae4e5dSmrg  # Assume -lc should be added
67486fae4e5dSmrg  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
67491f0ac6a5Smrg
67506fae4e5dSmrg  if test "$enable_shared" = yes && test "$GCC" = yes; then
67516fae4e5dSmrg    case $_LT_TAGVAR(archive_cmds, $1) in
67526fae4e5dSmrg    *'~'*)
67536fae4e5dSmrg      # FIXME: we may have to deal with multi-command sequences.
67546fae4e5dSmrg      ;;
67556fae4e5dSmrg    '$CC '*)
67566fae4e5dSmrg      # Test whether the compiler implicitly links with -lc since on some
67576fae4e5dSmrg      # systems, -lgcc has to come before -lc. If gcc already passes -lc
67586fae4e5dSmrg      # to ld, don't add -lc before -lgcc.
67596fae4e5dSmrg      AC_CACHE_CHECK([whether -lc should be explicitly linked in],
67606fae4e5dSmrg	[lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
67616fae4e5dSmrg	[$RM conftest*
67626fae4e5dSmrg	echo "$lt_simple_compile_test_code" > conftest.$ac_ext
67636fae4e5dSmrg
67646fae4e5dSmrg	if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
67656fae4e5dSmrg	  soname=conftest
67666fae4e5dSmrg	  lib=conftest
67676fae4e5dSmrg	  libobjs=conftest.$ac_objext
67686fae4e5dSmrg	  deplibs=
67696fae4e5dSmrg	  wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
67706fae4e5dSmrg	  pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
67716fae4e5dSmrg	  compiler_flags=-v
67726fae4e5dSmrg	  linker_flags=-v
67736fae4e5dSmrg	  verstring=
67746fae4e5dSmrg	  output_objdir=.
67756fae4e5dSmrg	  libname=conftest
67766fae4e5dSmrg	  lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
67776fae4e5dSmrg	  _LT_TAGVAR(allow_undefined_flag, $1)=
67786fae4e5dSmrg	  if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
67796fae4e5dSmrg	  then
67806fae4e5dSmrg	    lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
67816fae4e5dSmrg	  else
67826fae4e5dSmrg	    lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
67836fae4e5dSmrg	  fi
67846fae4e5dSmrg	  _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
67856fae4e5dSmrg	else
67866fae4e5dSmrg	  cat conftest.err 1>&5
67876fae4e5dSmrg	fi
67886fae4e5dSmrg	$RM conftest*
67896fae4e5dSmrg	])
67906fae4e5dSmrg      _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
67916fae4e5dSmrg      ;;
67926fae4e5dSmrg    esac
67936fae4e5dSmrg  fi
67949c9ff80cSmrg  ;;
67956fae4e5dSmrgesac
67961f0ac6a5Smrg
67976fae4e5dSmrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
67986fae4e5dSmrg    [Whether or not to add -lc for building shared libraries])
67996fae4e5dSmrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
68006fae4e5dSmrg    [enable_shared_with_static_runtimes], [0],
68016fae4e5dSmrg    [Whether or not to disallow shared libs when runtime libs are static])
68026fae4e5dSmrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1],
68036fae4e5dSmrg    [Compiler flag to allow reflexive dlopens])
68046fae4e5dSmrg_LT_TAGDECL([], [whole_archive_flag_spec], [1],
68056fae4e5dSmrg    [Compiler flag to generate shared objects directly from archives])
68066fae4e5dSmrg_LT_TAGDECL([], [compiler_needs_object], [1],
68076fae4e5dSmrg    [Whether the compiler copes with passing no objects directly])
68086fae4e5dSmrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2],
68096fae4e5dSmrg    [Create an old-style archive from a shared archive])
68106fae4e5dSmrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
68116fae4e5dSmrg    [Create a temporary old-style archive to link instead of a shared archive])
68126fae4e5dSmrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
68136fae4e5dSmrg_LT_TAGDECL([], [archive_expsym_cmds], [2])
68146fae4e5dSmrg_LT_TAGDECL([], [module_cmds], [2],
68156fae4e5dSmrg    [Commands used to build a loadable module if different from building
68166fae4e5dSmrg    a shared archive.])
68176fae4e5dSmrg_LT_TAGDECL([], [module_expsym_cmds], [2])
68186fae4e5dSmrg_LT_TAGDECL([], [with_gnu_ld], [1],
68196fae4e5dSmrg    [Whether we are building with GNU ld or not])
68206fae4e5dSmrg_LT_TAGDECL([], [allow_undefined_flag], [1],
68216fae4e5dSmrg    [Flag that allows shared libraries with undefined symbols to be built])
68226fae4e5dSmrg_LT_TAGDECL([], [no_undefined_flag], [1],
68236fae4e5dSmrg    [Flag that enforces no undefined symbols])
68246fae4e5dSmrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
68256fae4e5dSmrg    [Flag to hardcode $libdir into a binary during linking.
68266fae4e5dSmrg    This must work even if $libdir does not exist])
68276fae4e5dSmrg_LT_TAGDECL([], [hardcode_libdir_separator], [1],
68286fae4e5dSmrg    [Whether we need a single "-rpath" flag with a separated argument])
68296fae4e5dSmrg_LT_TAGDECL([], [hardcode_direct], [0],
68306fae4e5dSmrg    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
68316fae4e5dSmrg    DIR into the resulting binary])
68326fae4e5dSmrg_LT_TAGDECL([], [hardcode_direct_absolute], [0],
68336fae4e5dSmrg    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
68346fae4e5dSmrg    DIR into the resulting binary and the resulting library dependency is
68356fae4e5dSmrg    "absolute", i.e impossible to change by setting ${shlibpath_var} if the
68366fae4e5dSmrg    library is relocated])
68376fae4e5dSmrg_LT_TAGDECL([], [hardcode_minus_L], [0],
68386fae4e5dSmrg    [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
68396fae4e5dSmrg    into the resulting binary])
68406fae4e5dSmrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0],
68416fae4e5dSmrg    [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
68426fae4e5dSmrg    into the resulting binary])
68436fae4e5dSmrg_LT_TAGDECL([], [hardcode_automatic], [0],
68446fae4e5dSmrg    [Set to "yes" if building a shared library automatically hardcodes DIR
68456fae4e5dSmrg    into the library and all subsequent libraries and executables linked
68466fae4e5dSmrg    against it])
68476fae4e5dSmrg_LT_TAGDECL([], [inherit_rpath], [0],
68486fae4e5dSmrg    [Set to yes if linker adds runtime paths of dependent libraries
68496fae4e5dSmrg    to runtime path list])
68506fae4e5dSmrg_LT_TAGDECL([], [link_all_deplibs], [0],
68516fae4e5dSmrg    [Whether libtool must link a program against all its dependency libraries])
68526fae4e5dSmrg_LT_TAGDECL([], [always_export_symbols], [0],
68536fae4e5dSmrg    [Set to "yes" if exported symbols are required])
68546fae4e5dSmrg_LT_TAGDECL([], [export_symbols_cmds], [2],
68556fae4e5dSmrg    [The commands to list exported symbols])
68566fae4e5dSmrg_LT_TAGDECL([], [exclude_expsyms], [1],
68576fae4e5dSmrg    [Symbols that should not be listed in the preloaded symbols])
68586fae4e5dSmrg_LT_TAGDECL([], [include_expsyms], [1],
68596fae4e5dSmrg    [Symbols that must always be exported])
68606fae4e5dSmrg_LT_TAGDECL([], [prelink_cmds], [2],
68616fae4e5dSmrg    [Commands necessary for linking programs (against libraries) with templates])
68626fae4e5dSmrg_LT_TAGDECL([], [postlink_cmds], [2],
68636fae4e5dSmrg    [Commands necessary for finishing linking programs])
68646fae4e5dSmrg_LT_TAGDECL([], [file_list_spec], [1],
68656fae4e5dSmrg    [Specify filename containing input files])
68666fae4e5dSmrgdnl FIXME: Not yet implemented
68676fae4e5dSmrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
68686fae4e5dSmrgdnl    [Compiler flag to generate thread safe objects])
68696fae4e5dSmrg])# _LT_LINKER_SHLIBS
68701f0ac6a5Smrg
68711f0ac6a5Smrg
68726fae4e5dSmrg# _LT_LANG_C_CONFIG([TAG])
68736fae4e5dSmrg# ------------------------
68746fae4e5dSmrg# Ensure that the configuration variables for a C compiler are suitably
68756fae4e5dSmrg# defined.  These variables are subsequently used by _LT_CONFIG to write
68766fae4e5dSmrg# the compiler configuration to `libtool'.
68776fae4e5dSmrgm4_defun([_LT_LANG_C_CONFIG],
68786fae4e5dSmrg[m4_require([_LT_DECL_EGREP])dnl
68796fae4e5dSmrglt_save_CC="$CC"
68806fae4e5dSmrgAC_LANG_PUSH(C)
68811f0ac6a5Smrg
68826fae4e5dSmrg# Source file extension for C test sources.
68836fae4e5dSmrgac_ext=c
68841f0ac6a5Smrg
68856fae4e5dSmrg# Object file extension for compiled C test sources.
68866fae4e5dSmrgobjext=o
68876fae4e5dSmrg_LT_TAGVAR(objext, $1)=$objext
68881f0ac6a5Smrg
68896fae4e5dSmrg# Code to be used in simple compile tests
68906fae4e5dSmrglt_simple_compile_test_code="int some_variable = 0;"
68911f0ac6a5Smrg
68926fae4e5dSmrg# Code to be used in simple link tests
68936fae4e5dSmrglt_simple_link_test_code='int main(){return(0);}'
68941f0ac6a5Smrg
68956fae4e5dSmrg_LT_TAG_COMPILER
68966fae4e5dSmrg# Save the default compiler, since it gets overwritten when the other
68976fae4e5dSmrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
68986fae4e5dSmrgcompiler_DEFAULT=$CC
68991f0ac6a5Smrg
69006fae4e5dSmrg# save warnings/boilerplate of simple test code
69016fae4e5dSmrg_LT_COMPILER_BOILERPLATE
69026fae4e5dSmrg_LT_LINKER_BOILERPLATE
69039c9ff80cSmrg
69046fae4e5dSmrgif test -n "$compiler"; then
69056fae4e5dSmrg  _LT_COMPILER_NO_RTTI($1)
69066fae4e5dSmrg  _LT_COMPILER_PIC($1)
69076fae4e5dSmrg  _LT_COMPILER_C_O($1)
69086fae4e5dSmrg  _LT_COMPILER_FILE_LOCKS($1)
69096fae4e5dSmrg  _LT_LINKER_SHLIBS($1)
69106fae4e5dSmrg  _LT_SYS_DYNAMIC_LINKER($1)
69116fae4e5dSmrg  _LT_LINKER_HARDCODE_LIBPATH($1)
69126fae4e5dSmrg  LT_SYS_DLOPEN_SELF
69136fae4e5dSmrg  _LT_CMD_STRIPLIB
69141f0ac6a5Smrg
69156fae4e5dSmrg  # Report which library types will actually be built
69166fae4e5dSmrg  AC_MSG_CHECKING([if libtool supports shared libraries])
69176fae4e5dSmrg  AC_MSG_RESULT([$can_build_shared])
69181f0ac6a5Smrg
69196fae4e5dSmrg  AC_MSG_CHECKING([whether to build shared libraries])
69206fae4e5dSmrg  test "$can_build_shared" = "no" && enable_shared=no
69211f0ac6a5Smrg
69226fae4e5dSmrg  # On AIX, shared libraries and static libraries use the same namespace, and
69236fae4e5dSmrg  # are all built from PIC.
69246fae4e5dSmrg  case $host_os in
69256fae4e5dSmrg  aix3*)
69266fae4e5dSmrg    test "$enable_shared" = yes && enable_static=no
69276fae4e5dSmrg    if test -n "$RANLIB"; then
69286fae4e5dSmrg      archive_cmds="$archive_cmds~\$RANLIB \$lib"
69296fae4e5dSmrg      postinstall_cmds='$RANLIB $lib'
69306fae4e5dSmrg    fi
69316fae4e5dSmrg    ;;
69321f0ac6a5Smrg
69336fae4e5dSmrg  aix[[4-9]]*)
69346fae4e5dSmrg    if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
69356fae4e5dSmrg      test "$enable_shared" = yes && enable_static=no
69366fae4e5dSmrg    fi
69376fae4e5dSmrg    ;;
69386fae4e5dSmrg  esac
69396fae4e5dSmrg  AC_MSG_RESULT([$enable_shared])
69401f0ac6a5Smrg
69416fae4e5dSmrg  AC_MSG_CHECKING([whether to build static libraries])
69426fae4e5dSmrg  # Make sure either enable_shared or enable_static is yes.
69436fae4e5dSmrg  test "$enable_shared" = yes || enable_static=yes
69446fae4e5dSmrg  AC_MSG_RESULT([$enable_static])
69451f0ac6a5Smrg
69466fae4e5dSmrg  _LT_CONFIG($1)
69476fae4e5dSmrgfi
69486fae4e5dSmrgAC_LANG_POP
69496fae4e5dSmrgCC="$lt_save_CC"
69506fae4e5dSmrg])# _LT_LANG_C_CONFIG
69511f0ac6a5Smrg
69521f0ac6a5Smrg
69536fae4e5dSmrg# _LT_LANG_CXX_CONFIG([TAG])
69546fae4e5dSmrg# --------------------------
69556fae4e5dSmrg# Ensure that the configuration variables for a C++ compiler are suitably
69566fae4e5dSmrg# defined.  These variables are subsequently used by _LT_CONFIG to write
69576fae4e5dSmrg# the compiler configuration to `libtool'.
69586fae4e5dSmrgm4_defun([_LT_LANG_CXX_CONFIG],
69596fae4e5dSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
69606fae4e5dSmrgm4_require([_LT_DECL_EGREP])dnl
69616fae4e5dSmrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl
69626fae4e5dSmrgif test -n "$CXX" && ( test "X$CXX" != "Xno" &&
69636fae4e5dSmrg    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
69646fae4e5dSmrg    (test "X$CXX" != "Xg++"))) ; then
69656fae4e5dSmrg  AC_PROG_CXXCPP
69666fae4e5dSmrgelse
69676fae4e5dSmrg  _lt_caught_CXX_error=yes
69686fae4e5dSmrgfi
69691f0ac6a5Smrg
69706fae4e5dSmrgAC_LANG_PUSH(C++)
69716fae4e5dSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
69726fae4e5dSmrg_LT_TAGVAR(allow_undefined_flag, $1)=
69736fae4e5dSmrg_LT_TAGVAR(always_export_symbols, $1)=no
69746fae4e5dSmrg_LT_TAGVAR(archive_expsym_cmds, $1)=
69756fae4e5dSmrg_LT_TAGVAR(compiler_needs_object, $1)=no
69766fae4e5dSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)=
69776fae4e5dSmrg_LT_TAGVAR(hardcode_direct, $1)=no
69786fae4e5dSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no
69796fae4e5dSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
69806fae4e5dSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)=
69816fae4e5dSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no
69826fae4e5dSmrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
69836fae4e5dSmrg_LT_TAGVAR(hardcode_automatic, $1)=no
69846fae4e5dSmrg_LT_TAGVAR(inherit_rpath, $1)=no
69856fae4e5dSmrg_LT_TAGVAR(module_cmds, $1)=
69866fae4e5dSmrg_LT_TAGVAR(module_expsym_cmds, $1)=
69876fae4e5dSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown
69886fae4e5dSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
69896fae4e5dSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag
69906fae4e5dSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
69916fae4e5dSmrg_LT_TAGVAR(no_undefined_flag, $1)=
69926fae4e5dSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)=
69936fae4e5dSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
69941f0ac6a5Smrg
69956fae4e5dSmrg# Source file extension for C++ test sources.
69966fae4e5dSmrgac_ext=cpp
69971f0ac6a5Smrg
69986fae4e5dSmrg# Object file extension for compiled C++ test sources.
69996fae4e5dSmrgobjext=o
70006fae4e5dSmrg_LT_TAGVAR(objext, $1)=$objext
70011f0ac6a5Smrg
70026fae4e5dSmrg# No sense in running all these tests if we already determined that
70036fae4e5dSmrg# the CXX compiler isn't working.  Some variables (like enable_shared)
70046fae4e5dSmrg# are currently assumed to apply to all compilers on this platform,
70056fae4e5dSmrg# and will be corrupted by setting them based on a non-working compiler.
70066fae4e5dSmrgif test "$_lt_caught_CXX_error" != yes; then
70076fae4e5dSmrg  # Code to be used in simple compile tests
70086fae4e5dSmrg  lt_simple_compile_test_code="int some_variable = 0;"
70099c9ff80cSmrg
70106fae4e5dSmrg  # Code to be used in simple link tests
70116fae4e5dSmrg  lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
70121f0ac6a5Smrg
70136fae4e5dSmrg  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
70146fae4e5dSmrg  _LT_TAG_COMPILER
70151f0ac6a5Smrg
70166fae4e5dSmrg  # save warnings/boilerplate of simple test code
70176fae4e5dSmrg  _LT_COMPILER_BOILERPLATE
70186fae4e5dSmrg  _LT_LINKER_BOILERPLATE
70191f0ac6a5Smrg
70206fae4e5dSmrg  # Allow CC to be a program name with arguments.
70216fae4e5dSmrg  lt_save_CC=$CC
70226fae4e5dSmrg  lt_save_CFLAGS=$CFLAGS
70236fae4e5dSmrg  lt_save_LD=$LD
70246fae4e5dSmrg  lt_save_GCC=$GCC
70256fae4e5dSmrg  GCC=$GXX
70266fae4e5dSmrg  lt_save_with_gnu_ld=$with_gnu_ld
70276fae4e5dSmrg  lt_save_path_LD=$lt_cv_path_LD
70286fae4e5dSmrg  if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
70296fae4e5dSmrg    lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
70306fae4e5dSmrg  else
70316fae4e5dSmrg    $as_unset lt_cv_prog_gnu_ld
70326fae4e5dSmrg  fi
70336fae4e5dSmrg  if test -n "${lt_cv_path_LDCXX+set}"; then
70346fae4e5dSmrg    lt_cv_path_LD=$lt_cv_path_LDCXX
70356fae4e5dSmrg  else
70366fae4e5dSmrg    $as_unset lt_cv_path_LD
70376fae4e5dSmrg  fi
70386fae4e5dSmrg  test -z "${LDCXX+set}" || LD=$LDCXX
70396fae4e5dSmrg  CC=${CXX-"c++"}
70406fae4e5dSmrg  CFLAGS=$CXXFLAGS
70416fae4e5dSmrg  compiler=$CC
70426fae4e5dSmrg  _LT_TAGVAR(compiler, $1)=$CC
70436fae4e5dSmrg  _LT_CC_BASENAME([$compiler])
70441f0ac6a5Smrg
70456fae4e5dSmrg  if test -n "$compiler"; then
70466fae4e5dSmrg    # We don't want -fno-exception when compiling C++ code, so set the
70476fae4e5dSmrg    # no_builtin_flag separately
70486fae4e5dSmrg    if test "$GXX" = yes; then
70496fae4e5dSmrg      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
70506fae4e5dSmrg    else
70516fae4e5dSmrg      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
70526fae4e5dSmrg    fi
70531f0ac6a5Smrg
70546fae4e5dSmrg    if test "$GXX" = yes; then
70556fae4e5dSmrg      # Set up default GNU C++ configuration
70561f0ac6a5Smrg
70576fae4e5dSmrg      LT_PATH_LD
70581f0ac6a5Smrg
70596fae4e5dSmrg      # Check if GNU C++ uses GNU ld as the underlying linker, since the
70606fae4e5dSmrg      # archiving commands below assume that GNU ld is being used.
70616fae4e5dSmrg      if test "$with_gnu_ld" = yes; then
70626fae4e5dSmrg        _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
70636fae4e5dSmrg        _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'
70641f0ac6a5Smrg
70656fae4e5dSmrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
70666fae4e5dSmrg        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
70671f0ac6a5Smrg
70686fae4e5dSmrg        # If archive_cmds runs LD, not CC, wlarc should be empty
70696fae4e5dSmrg        # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
70706fae4e5dSmrg        #     investigate it a little bit more. (MM)
70716fae4e5dSmrg        wlarc='${wl}'
70721f0ac6a5Smrg
70736fae4e5dSmrg        # ancient GNU ld didn't support --whole-archive et. al.
70746fae4e5dSmrg        if eval "`$CC -print-prog-name=ld` --help 2>&1" |
70756fae4e5dSmrg	  $GREP 'no-whole-archive' > /dev/null; then
70766fae4e5dSmrg          _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
70776fae4e5dSmrg        else
70786fae4e5dSmrg          _LT_TAGVAR(whole_archive_flag_spec, $1)=
70796fae4e5dSmrg        fi
70806fae4e5dSmrg      else
70816fae4e5dSmrg        with_gnu_ld=no
70826fae4e5dSmrg        wlarc=
70831f0ac6a5Smrg
70846fae4e5dSmrg        # A generic and very simple default shared library creation
70856fae4e5dSmrg        # command for GNU C++ for the case where it uses the native
70866fae4e5dSmrg        # linker, instead of GNU ld.  If possible, this setting should
70876fae4e5dSmrg        # overridden to take advantage of the native linker features on
70886fae4e5dSmrg        # the platform it is being used on.
70896fae4e5dSmrg        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
70906fae4e5dSmrg      fi
70911f0ac6a5Smrg
70926fae4e5dSmrg      # Commands to make compiler produce verbose output that lists
70936fae4e5dSmrg      # what "hidden" libraries, object files and flags are used when
70946fae4e5dSmrg      # linking a shared library.
70956fae4e5dSmrg      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
70961f0ac6a5Smrg
70976fae4e5dSmrg    else
70986fae4e5dSmrg      GXX=no
70996fae4e5dSmrg      with_gnu_ld=no
71006fae4e5dSmrg      wlarc=
71016fae4e5dSmrg    fi
71021f0ac6a5Smrg
71036fae4e5dSmrg    # PORTME: fill in a description of your system's C++ link characteristics
71046fae4e5dSmrg    AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
71056fae4e5dSmrg    _LT_TAGVAR(ld_shlibs, $1)=yes
71066fae4e5dSmrg    case $host_os in
71076fae4e5dSmrg      aix3*)
71086fae4e5dSmrg        # FIXME: insert proper C++ library support
71096fae4e5dSmrg        _LT_TAGVAR(ld_shlibs, $1)=no
71106fae4e5dSmrg        ;;
71116fae4e5dSmrg      aix[[4-9]]*)
71126fae4e5dSmrg        if test "$host_cpu" = ia64; then
71136fae4e5dSmrg          # On IA64, the linker does run time linking by default, so we don't
71146fae4e5dSmrg          # have to do anything special.
71156fae4e5dSmrg          aix_use_runtimelinking=no
71166fae4e5dSmrg          exp_sym_flag='-Bexport'
71176fae4e5dSmrg          no_entry_flag=""
71186fae4e5dSmrg        else
71196fae4e5dSmrg          aix_use_runtimelinking=no
71201f0ac6a5Smrg
71216fae4e5dSmrg          # Test if we are trying to use run time linking or normal
71226fae4e5dSmrg          # AIX style linking. If -brtl is somewhere in LDFLAGS, we
71236fae4e5dSmrg          # need to do runtime linking.
71246fae4e5dSmrg          case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
71256fae4e5dSmrg	    for ld_flag in $LDFLAGS; do
71266fae4e5dSmrg	      case $ld_flag in
71276fae4e5dSmrg	      *-brtl*)
71286fae4e5dSmrg	        aix_use_runtimelinking=yes
71296fae4e5dSmrg	        break
71306fae4e5dSmrg	        ;;
71316fae4e5dSmrg	      esac
71326fae4e5dSmrg	    done
71336fae4e5dSmrg	    ;;
71346fae4e5dSmrg          esac
71351f0ac6a5Smrg
71366fae4e5dSmrg          exp_sym_flag='-bexport'
71376fae4e5dSmrg          no_entry_flag='-bnoentry'
71386fae4e5dSmrg        fi
71391f0ac6a5Smrg
71406fae4e5dSmrg        # When large executables or shared objects are built, AIX ld can
71416fae4e5dSmrg        # have problems creating the table of contents.  If linking a library
71426fae4e5dSmrg        # or program results in "error TOC overflow" add -mminimal-toc to
71436fae4e5dSmrg        # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
71446fae4e5dSmrg        # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
71451f0ac6a5Smrg
71466fae4e5dSmrg        _LT_TAGVAR(archive_cmds, $1)=''
71476fae4e5dSmrg        _LT_TAGVAR(hardcode_direct, $1)=yes
71486fae4e5dSmrg        _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
71496fae4e5dSmrg        _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
71506fae4e5dSmrg        _LT_TAGVAR(link_all_deplibs, $1)=yes
71516fae4e5dSmrg        _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
71521f0ac6a5Smrg
71536fae4e5dSmrg        if test "$GXX" = yes; then
71546fae4e5dSmrg          case $host_os in aix4.[[012]]|aix4.[[012]].*)
71556fae4e5dSmrg          # We only want to do this on AIX 4.2 and lower, the check
71566fae4e5dSmrg          # below for broken collect2 doesn't work under 4.3+
71576fae4e5dSmrg	  collect2name=`${CC} -print-prog-name=collect2`
71586fae4e5dSmrg	  if test -f "$collect2name" &&
71596fae4e5dSmrg	     strings "$collect2name" | $GREP resolve_lib_name >/dev/null
71606fae4e5dSmrg	  then
71616fae4e5dSmrg	    # We have reworked collect2
71626fae4e5dSmrg	    :
71636fae4e5dSmrg	  else
71646fae4e5dSmrg	    # We have old collect2
71656fae4e5dSmrg	    _LT_TAGVAR(hardcode_direct, $1)=unsupported
71666fae4e5dSmrg	    # It fails to find uninstalled libraries when the uninstalled
71676fae4e5dSmrg	    # path is not listed in the libpath.  Setting hardcode_minus_L
71686fae4e5dSmrg	    # to unsupported forces relinking
71696fae4e5dSmrg	    _LT_TAGVAR(hardcode_minus_L, $1)=yes
71706fae4e5dSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
71716fae4e5dSmrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=
71726fae4e5dSmrg	  fi
71736fae4e5dSmrg          esac
71746fae4e5dSmrg          shared_flag='-shared'
71756fae4e5dSmrg	  if test "$aix_use_runtimelinking" = yes; then
71766fae4e5dSmrg	    shared_flag="$shared_flag "'${wl}-G'
71776fae4e5dSmrg	  fi
71786fae4e5dSmrg        else
71796fae4e5dSmrg          # not using gcc
71806fae4e5dSmrg          if test "$host_cpu" = ia64; then
71816fae4e5dSmrg	  # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
71826fae4e5dSmrg	  # chokes on -Wl,-G. The following line is correct:
71836fae4e5dSmrg	  shared_flag='-G'
71846fae4e5dSmrg          else
71856fae4e5dSmrg	    if test "$aix_use_runtimelinking" = yes; then
71866fae4e5dSmrg	      shared_flag='${wl}-G'
71876fae4e5dSmrg	    else
71886fae4e5dSmrg	      shared_flag='${wl}-bM:SRE'
71896fae4e5dSmrg	    fi
71906fae4e5dSmrg          fi
71916fae4e5dSmrg        fi
71921f0ac6a5Smrg
71936fae4e5dSmrg        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
71946fae4e5dSmrg        # It seems that -bexpall does not export symbols beginning with
71956fae4e5dSmrg        # underscore (_), so it is better to generate a list of symbols to
71966fae4e5dSmrg	# export.
71976fae4e5dSmrg        _LT_TAGVAR(always_export_symbols, $1)=yes
71986fae4e5dSmrg        if test "$aix_use_runtimelinking" = yes; then
71996fae4e5dSmrg          # Warning - without using the other runtime loading flags (-brtl),
72006fae4e5dSmrg          # -berok will link without error, but may produce a broken library.
72016fae4e5dSmrg          _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
72026fae4e5dSmrg          # Determine the default libpath from the value encoded in an empty
72036fae4e5dSmrg          # executable.
72046fae4e5dSmrg          _LT_SYS_MODULE_PATH_AIX([$1])
72056fae4e5dSmrg          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
72061f0ac6a5Smrg
72076fae4e5dSmrg          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
72086fae4e5dSmrg        else
72096fae4e5dSmrg          if test "$host_cpu" = ia64; then
72106fae4e5dSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
72116fae4e5dSmrg	    _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
72126fae4e5dSmrg	    _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"
72136fae4e5dSmrg          else
72146fae4e5dSmrg	    # Determine the default libpath from the value encoded in an
72156fae4e5dSmrg	    # empty executable.
72166fae4e5dSmrg	    _LT_SYS_MODULE_PATH_AIX([$1])
72176fae4e5dSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
72186fae4e5dSmrg	    # Warning - without using the other run time loading flags,
72196fae4e5dSmrg	    # -berok will link without error, but may produce a broken library.
72206fae4e5dSmrg	    _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
72216fae4e5dSmrg	    _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
72226fae4e5dSmrg	    if test "$with_gnu_ld" = yes; then
72236fae4e5dSmrg	      # We only use this code for GNU lds that support --whole-archive.
72246fae4e5dSmrg	      _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
72256fae4e5dSmrg	    else
72266fae4e5dSmrg	      # Exported symbols can be pulled into shared objects from archives
72276fae4e5dSmrg	      _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
72286fae4e5dSmrg	    fi
72296fae4e5dSmrg	    _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
72306fae4e5dSmrg	    # This is similar to how AIX traditionally builds its shared
72316fae4e5dSmrg	    # libraries.
72326fae4e5dSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
72336fae4e5dSmrg          fi
72346fae4e5dSmrg        fi
72356fae4e5dSmrg        ;;
72366fae4e5dSmrg
72376fae4e5dSmrg      beos*)
72386fae4e5dSmrg	if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
72396fae4e5dSmrg	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
72406fae4e5dSmrg	  # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
72416fae4e5dSmrg	  # support --undefined.  This deserves some investigation.  FIXME
72426fae4e5dSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
72436fae4e5dSmrg	else
72446fae4e5dSmrg	  _LT_TAGVAR(ld_shlibs, $1)=no
72456fae4e5dSmrg	fi
72466fae4e5dSmrg	;;
72476fae4e5dSmrg
72486fae4e5dSmrg      chorus*)
72496fae4e5dSmrg        case $cc_basename in
72506fae4e5dSmrg          *)
72516fae4e5dSmrg	  # FIXME: insert proper C++ library support
72526fae4e5dSmrg	  _LT_TAGVAR(ld_shlibs, $1)=no
72539c9ff80cSmrg	  ;;
72546fae4e5dSmrg        esac
72556fae4e5dSmrg        ;;
72566fae4e5dSmrg
72576fae4e5dSmrg      cygwin* | mingw* | pw32* | cegcc*)
72586fae4e5dSmrg	case $GXX,$cc_basename in
72596fae4e5dSmrg	,cl* | no,cl*)
72606fae4e5dSmrg	  # Native MSVC
72616fae4e5dSmrg	  # hardcode_libdir_flag_spec is actually meaningless, as there is
72626fae4e5dSmrg	  # no search path for DLLs.
72636fae4e5dSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
72646fae4e5dSmrg	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
72656fae4e5dSmrg	  _LT_TAGVAR(always_export_symbols, $1)=yes
72666fae4e5dSmrg	  _LT_TAGVAR(file_list_spec, $1)='@'
72676fae4e5dSmrg	  # Tell ltmain to make .lib files, not .a files.
72686fae4e5dSmrg	  libext=lib
72696fae4e5dSmrg	  # Tell ltmain to make .dll files, not .so files.
72706fae4e5dSmrg	  shrext_cmds=".dll"
72716fae4e5dSmrg	  # FIXME: Setting linknames here is a bad hack.
72726fae4e5dSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
72736fae4e5dSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
72746fae4e5dSmrg	      $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
72756fae4e5dSmrg	    else
72766fae4e5dSmrg	      $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
72776fae4e5dSmrg	    fi~
72786fae4e5dSmrg	    $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
72796fae4e5dSmrg	    linknames='
72806fae4e5dSmrg	  # The linker will not automatically build a static lib if we build a DLL.
72816fae4e5dSmrg	  # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
72826fae4e5dSmrg	  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
72836fae4e5dSmrg	  # Don't use ranlib
72846fae4e5dSmrg	  _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
72856fae4e5dSmrg	  _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
72866fae4e5dSmrg	    lt_tool_outputfile="@TOOL_OUTPUT@"~
72876fae4e5dSmrg	    case $lt_outputfile in
72886fae4e5dSmrg	      *.exe|*.EXE) ;;
72896fae4e5dSmrg	      *)
72906fae4e5dSmrg		lt_outputfile="$lt_outputfile.exe"
72916fae4e5dSmrg		lt_tool_outputfile="$lt_tool_outputfile.exe"
72926fae4e5dSmrg		;;
72936fae4e5dSmrg	    esac~
72946fae4e5dSmrg	    func_to_tool_file "$lt_outputfile"~
72956fae4e5dSmrg	    if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
72966fae4e5dSmrg	      $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
72976fae4e5dSmrg	      $RM "$lt_outputfile.manifest";
72986fae4e5dSmrg	    fi'
72999c9ff80cSmrg	  ;;
73009c9ff80cSmrg	*)
73016fae4e5dSmrg	  # g++
73026fae4e5dSmrg	  # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
73036fae4e5dSmrg	  # as there is no search path for DLLs.
73046fae4e5dSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
73056fae4e5dSmrg	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
73066fae4e5dSmrg	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
73076fae4e5dSmrg	  _LT_TAGVAR(always_export_symbols, $1)=no
73086fae4e5dSmrg	  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
73096fae4e5dSmrg
73106fae4e5dSmrg	  if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
73116fae4e5dSmrg	    _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'
73126fae4e5dSmrg	    # If the export-symbols file already is a .def file (1st line
73136fae4e5dSmrg	    # is EXPORTS), use it as is; otherwise, prepend...
73146fae4e5dSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
73156fae4e5dSmrg	      cp $export_symbols $output_objdir/$soname.def;
73166fae4e5dSmrg	    else
73176fae4e5dSmrg	      echo EXPORTS > $output_objdir/$soname.def;
73186fae4e5dSmrg	      cat $export_symbols >> $output_objdir/$soname.def;
73196fae4e5dSmrg	    fi~
73206fae4e5dSmrg	    $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'
73216fae4e5dSmrg	  else
73226fae4e5dSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
73236fae4e5dSmrg	  fi
73249c9ff80cSmrg	  ;;
73259c9ff80cSmrg	esac
73266fae4e5dSmrg	;;
73276fae4e5dSmrg      darwin* | rhapsody*)
73286fae4e5dSmrg        _LT_DARWIN_LINKER_FEATURES($1)
73296fae4e5dSmrg	;;
73301f0ac6a5Smrg
73316fae4e5dSmrg      dgux*)
73326fae4e5dSmrg        case $cc_basename in
73336fae4e5dSmrg          ec++*)
73346fae4e5dSmrg	    # FIXME: insert proper C++ library support
73356fae4e5dSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
73366fae4e5dSmrg	    ;;
73376fae4e5dSmrg          ghcx*)
73386fae4e5dSmrg	    # Green Hills C++ Compiler
73396fae4e5dSmrg	    # FIXME: insert proper C++ library support
73406fae4e5dSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
73416fae4e5dSmrg	    ;;
73426fae4e5dSmrg          *)
73436fae4e5dSmrg	    # FIXME: insert proper C++ library support
73446fae4e5dSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
73456fae4e5dSmrg	    ;;
73466fae4e5dSmrg        esac
73476fae4e5dSmrg        ;;
73481f0ac6a5Smrg
734989c04b6cSmrg      freebsd2.*)
73506fae4e5dSmrg        # C++ shared libraries reported to be fairly broken before
73516fae4e5dSmrg	# switch to ELF
73526fae4e5dSmrg        _LT_TAGVAR(ld_shlibs, $1)=no
73536fae4e5dSmrg        ;;
73541f0ac6a5Smrg
73556fae4e5dSmrg      freebsd-elf*)
73566fae4e5dSmrg        _LT_TAGVAR(archive_cmds_need_lc, $1)=no
73576fae4e5dSmrg        ;;
73581f0ac6a5Smrg
73596fae4e5dSmrg      freebsd* | dragonfly*)
73606fae4e5dSmrg        # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
73616fae4e5dSmrg        # conventions
73626fae4e5dSmrg        _LT_TAGVAR(ld_shlibs, $1)=yes
73636fae4e5dSmrg        ;;
73641f0ac6a5Smrg
73656fae4e5dSmrg      gnu*)
73666fae4e5dSmrg        ;;
73671f0ac6a5Smrg
73686fae4e5dSmrg      haiku*)
73696fae4e5dSmrg        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
73706fae4e5dSmrg        _LT_TAGVAR(link_all_deplibs, $1)=yes
73716fae4e5dSmrg        ;;
73721f0ac6a5Smrg
73736fae4e5dSmrg      hpux9*)
73746fae4e5dSmrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
73756fae4e5dSmrg        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
73766fae4e5dSmrg        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
73776fae4e5dSmrg        _LT_TAGVAR(hardcode_direct, $1)=yes
73786fae4e5dSmrg        _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
73796fae4e5dSmrg				             # but as the default
73806fae4e5dSmrg				             # location of the library.
73816fae4e5dSmrg
73826fae4e5dSmrg        case $cc_basename in
73836fae4e5dSmrg          CC*)
73846fae4e5dSmrg            # FIXME: insert proper C++ library support
73856fae4e5dSmrg            _LT_TAGVAR(ld_shlibs, $1)=no
73866fae4e5dSmrg            ;;
73876fae4e5dSmrg          aCC*)
73886fae4e5dSmrg            _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 $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
73896fae4e5dSmrg            # Commands to make compiler produce verbose output that lists
73906fae4e5dSmrg            # what "hidden" libraries, object files and flags are used when
73916fae4e5dSmrg            # linking a shared library.
73926fae4e5dSmrg            #
73936fae4e5dSmrg            # There doesn't appear to be a way to prevent this compiler from
73946fae4e5dSmrg            # explicitly linking system object files so we need to strip them
73956fae4e5dSmrg            # from the output so that they don't get included in the library
73966fae4e5dSmrg            # dependencies.
73976fae4e5dSmrg            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"'
73986fae4e5dSmrg            ;;
73996fae4e5dSmrg          *)
74006fae4e5dSmrg            if test "$GXX" = yes; then
74016fae4e5dSmrg              _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 $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
74026fae4e5dSmrg            else
74036fae4e5dSmrg              # FIXME: insert proper C++ library support
74046fae4e5dSmrg              _LT_TAGVAR(ld_shlibs, $1)=no
74056fae4e5dSmrg            fi
74066fae4e5dSmrg            ;;
74076fae4e5dSmrg        esac
74086fae4e5dSmrg        ;;
74096fae4e5dSmrg
74106fae4e5dSmrg      hpux10*|hpux11*)
74116fae4e5dSmrg        if test $with_gnu_ld = no; then
74126fae4e5dSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
74136fae4e5dSmrg	  _LT_TAGVAR(hardcode_libdir_separator, $1)=:
74146fae4e5dSmrg
74156fae4e5dSmrg          case $host_cpu in
74166fae4e5dSmrg            hppa*64*|ia64*)
74176fae4e5dSmrg              ;;
74186fae4e5dSmrg            *)
74196fae4e5dSmrg	      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
74206fae4e5dSmrg              ;;
74216fae4e5dSmrg          esac
74226fae4e5dSmrg        fi
74236fae4e5dSmrg        case $host_cpu in
74246fae4e5dSmrg          hppa*64*|ia64*)
74256fae4e5dSmrg            _LT_TAGVAR(hardcode_direct, $1)=no
74266fae4e5dSmrg            _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
74276fae4e5dSmrg            ;;
74286fae4e5dSmrg          *)
74296fae4e5dSmrg            _LT_TAGVAR(hardcode_direct, $1)=yes
74306fae4e5dSmrg            _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
74316fae4e5dSmrg            _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
74326fae4e5dSmrg					         # but as the default
74336fae4e5dSmrg					         # location of the library.
74346fae4e5dSmrg            ;;
74356fae4e5dSmrg        esac
74366fae4e5dSmrg
74376fae4e5dSmrg        case $cc_basename in
74386fae4e5dSmrg          CC*)
74396fae4e5dSmrg	    # FIXME: insert proper C++ library support
74406fae4e5dSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
74416fae4e5dSmrg	    ;;
74426fae4e5dSmrg          aCC*)
74436fae4e5dSmrg	    case $host_cpu in
74446fae4e5dSmrg	      hppa*64*)
74456fae4e5dSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
74466fae4e5dSmrg	        ;;
74476fae4e5dSmrg	      ia64*)
74486fae4e5dSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
74496fae4e5dSmrg	        ;;
74506fae4e5dSmrg	      *)
74516fae4e5dSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
74526fae4e5dSmrg	        ;;
74536fae4e5dSmrg	    esac
74546fae4e5dSmrg	    # Commands to make compiler produce verbose output that lists
74556fae4e5dSmrg	    # what "hidden" libraries, object files and flags are used when
74566fae4e5dSmrg	    # linking a shared library.
74576fae4e5dSmrg	    #
74586fae4e5dSmrg	    # There doesn't appear to be a way to prevent this compiler from
74596fae4e5dSmrg	    # explicitly linking system object files so we need to strip them
74606fae4e5dSmrg	    # from the output so that they don't get included in the library
74616fae4e5dSmrg	    # dependencies.
74626fae4e5dSmrg	    output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-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"'
74636fae4e5dSmrg	    ;;
74646fae4e5dSmrg          *)
74656fae4e5dSmrg	    if test "$GXX" = yes; then
74666fae4e5dSmrg	      if test $with_gnu_ld = no; then
74676fae4e5dSmrg	        case $host_cpu in
74686fae4e5dSmrg	          hppa*64*)
74696fae4e5dSmrg	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
74706fae4e5dSmrg	            ;;
74716fae4e5dSmrg	          ia64*)
74726fae4e5dSmrg	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
74736fae4e5dSmrg	            ;;
74746fae4e5dSmrg	          *)
74756fae4e5dSmrg	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
74766fae4e5dSmrg	            ;;
74776fae4e5dSmrg	        esac
74786fae4e5dSmrg	      fi
74796fae4e5dSmrg	    else
74806fae4e5dSmrg	      # FIXME: insert proper C++ library support
74816fae4e5dSmrg	      _LT_TAGVAR(ld_shlibs, $1)=no
74826fae4e5dSmrg	    fi
74836fae4e5dSmrg	    ;;
74846fae4e5dSmrg        esac
74856fae4e5dSmrg        ;;
74866fae4e5dSmrg
74876fae4e5dSmrg      interix[[3-9]]*)
74886fae4e5dSmrg	_LT_TAGVAR(hardcode_direct, $1)=no
74899c9ff80cSmrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
74906fae4e5dSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
74916fae4e5dSmrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
74926fae4e5dSmrg	# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
74936fae4e5dSmrg	# Instead, shared libraries are loaded at an image base (0x10000000 by
74946fae4e5dSmrg	# default) and relocated if they conflict, which is a slow very memory
74956fae4e5dSmrg	# consuming and fragmenting process.  To avoid this, we pick a random,
74966fae4e5dSmrg	# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
74976fae4e5dSmrg	# time.  Moving up from 0x10000000 also allows more sbrk(2) space.
74986fae4e5dSmrg	_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'
74996fae4e5dSmrg	_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'
75006fae4e5dSmrg	;;
75016fae4e5dSmrg      irix5* | irix6*)
75026fae4e5dSmrg        case $cc_basename in
75036fae4e5dSmrg          CC*)
75046fae4e5dSmrg	    # SGI C++
75056fae4e5dSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
75061f0ac6a5Smrg
75076fae4e5dSmrg	    # Archives containing C++ object files must be created using
75086fae4e5dSmrg	    # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
75096fae4e5dSmrg	    # necessary to make sure instantiated templates are included
75106fae4e5dSmrg	    # in the archive.
75116fae4e5dSmrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
75126fae4e5dSmrg	    ;;
75136fae4e5dSmrg          *)
75146fae4e5dSmrg	    if test "$GXX" = yes; then
75156fae4e5dSmrg	      if test "$with_gnu_ld" = no; then
75166fae4e5dSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $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'
75176fae4e5dSmrg	      else
75186fae4e5dSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib'
75196fae4e5dSmrg	      fi
75206fae4e5dSmrg	    fi
75216fae4e5dSmrg	    _LT_TAGVAR(link_all_deplibs, $1)=yes
75226fae4e5dSmrg	    ;;
75236fae4e5dSmrg        esac
75246fae4e5dSmrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
75256fae4e5dSmrg        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
75266fae4e5dSmrg        _LT_TAGVAR(inherit_rpath, $1)=yes
75276fae4e5dSmrg        ;;
75281f0ac6a5Smrg
75296fae4e5dSmrg      linux* | k*bsd*-gnu | kopensolaris*-gnu)
75306fae4e5dSmrg        case $cc_basename in
75316fae4e5dSmrg          KCC*)
75326fae4e5dSmrg	    # Kuck and Associates, Inc. (KAI) C++ Compiler
75331f0ac6a5Smrg
75346fae4e5dSmrg	    # KCC will only create a shared library if the output file
75356fae4e5dSmrg	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
75366fae4e5dSmrg	    # to its proper name (with version) after linking.
75376fae4e5dSmrg	    _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
75386fae4e5dSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
75396fae4e5dSmrg	    # Commands to make compiler produce verbose output that lists
75406fae4e5dSmrg	    # what "hidden" libraries, object files and flags are used when
75416fae4e5dSmrg	    # linking a shared library.
75426fae4e5dSmrg	    #
75436fae4e5dSmrg	    # There doesn't appear to be a way to prevent this compiler from
75446fae4e5dSmrg	    # explicitly linking system object files so we need to strip them
75456fae4e5dSmrg	    # from the output so that they don't get included in the library
75466fae4e5dSmrg	    # dependencies.
75476fae4e5dSmrg	    output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
75481f0ac6a5Smrg
75496fae4e5dSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
75506fae4e5dSmrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
75511f0ac6a5Smrg
75526fae4e5dSmrg	    # Archives containing C++ object files must be created using
75536fae4e5dSmrg	    # "CC -Bstatic", where "CC" is the KAI C++ compiler.
75546fae4e5dSmrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
75556fae4e5dSmrg	    ;;
75566fae4e5dSmrg	  icpc* | ecpc* )
75576fae4e5dSmrg	    # Intel C++
75586fae4e5dSmrg	    with_gnu_ld=yes
75596fae4e5dSmrg	    # version 8.0 and above of icpc choke on multiply defined symbols
75606fae4e5dSmrg	    # if we add $predep_objects and $postdep_objects, however 7.1 and
75616fae4e5dSmrg	    # earlier do not add the objects themselves.
75626fae4e5dSmrg	    case `$CC -V 2>&1` in
75636fae4e5dSmrg	      *"Version 7."*)
75646fae4e5dSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
75656fae4e5dSmrg		_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
75666fae4e5dSmrg		;;
75676fae4e5dSmrg	      *)  # Version 8.0 or newer
75686fae4e5dSmrg	        tmp_idyn=
75696fae4e5dSmrg	        case $host_cpu in
75706fae4e5dSmrg		  ia64*) tmp_idyn=' -i_dynamic';;
75716fae4e5dSmrg		esac
75726fae4e5dSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
75736fae4e5dSmrg		_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
75746fae4e5dSmrg		;;
75756fae4e5dSmrg	    esac
75766fae4e5dSmrg	    _LT_TAGVAR(archive_cmds_need_lc, $1)=no
75776fae4e5dSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
75786fae4e5dSmrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
75796fae4e5dSmrg	    _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
75806fae4e5dSmrg	    ;;
75816fae4e5dSmrg          pgCC* | pgcpp*)
75826fae4e5dSmrg            # Portland Group C++ compiler
75836fae4e5dSmrg	    case `$CC -V` in
75846fae4e5dSmrg	    *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
75856fae4e5dSmrg	      _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
75866fae4e5dSmrg		rm -rf $tpldir~
75876fae4e5dSmrg		$CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
75886fae4e5dSmrg		compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
75896fae4e5dSmrg	      _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
75906fae4e5dSmrg		rm -rf $tpldir~
75916fae4e5dSmrg		$CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
75926fae4e5dSmrg		$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
75936fae4e5dSmrg		$RANLIB $oldlib'
75946fae4e5dSmrg	      _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
75956fae4e5dSmrg		rm -rf $tpldir~
75966fae4e5dSmrg		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
75976fae4e5dSmrg		$CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
75986fae4e5dSmrg	      _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
75996fae4e5dSmrg		rm -rf $tpldir~
76006fae4e5dSmrg		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
76016fae4e5dSmrg		$CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
76026fae4e5dSmrg	      ;;
76036fae4e5dSmrg	    *) # Version 6 and above use weak symbols
76046fae4e5dSmrg	      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
76056fae4e5dSmrg	      _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
76066fae4e5dSmrg	      ;;
76076fae4e5dSmrg	    esac
76081f0ac6a5Smrg
76096fae4e5dSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
76106fae4e5dSmrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
76116fae4e5dSmrg	    _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'
76126fae4e5dSmrg            ;;
76136fae4e5dSmrg	  cxx*)
76146fae4e5dSmrg	    # Compaq C++
76156fae4e5dSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
76166fae4e5dSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname  -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
76171f0ac6a5Smrg
76186fae4e5dSmrg	    runpath_var=LD_RUN_PATH
76196fae4e5dSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
76206fae4e5dSmrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
76211f0ac6a5Smrg
76226fae4e5dSmrg	    # Commands to make compiler produce verbose output that lists
76236fae4e5dSmrg	    # what "hidden" libraries, object files and flags are used when
76246fae4e5dSmrg	    # linking a shared library.
76256fae4e5dSmrg	    #
76266fae4e5dSmrg	    # There doesn't appear to be a way to prevent this compiler from
76276fae4e5dSmrg	    # explicitly linking system object files so we need to strip them
76286fae4e5dSmrg	    # from the output so that they don't get included in the library
76296fae4e5dSmrg	    # dependencies.
76306fae4e5dSmrg	    output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed'
76316fae4e5dSmrg	    ;;
76326fae4e5dSmrg	  xl* | mpixl* | bgxl*)
76336fae4e5dSmrg	    # IBM XL 8.0 on PPC, with GNU ld
76346fae4e5dSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
76356fae4e5dSmrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
76366fae4e5dSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
76376fae4e5dSmrg	    if test "x$supports_anon_versioning" = xyes; then
76386fae4e5dSmrg	      _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
76396fae4e5dSmrg		cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
76406fae4e5dSmrg		echo "local: *; };" >> $output_objdir/$libname.ver~
76416fae4e5dSmrg		$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
76426fae4e5dSmrg	    fi
76436fae4e5dSmrg	    ;;
76446fae4e5dSmrg	  *)
76456fae4e5dSmrg	    case `$CC -V 2>&1 | sed 5q` in
76466fae4e5dSmrg	    *Sun\ C*)
76476fae4e5dSmrg	      # Sun C++ 5.9
76486fae4e5dSmrg	      _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
76496fae4e5dSmrg	      _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
76506fae4e5dSmrg	      _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
76516fae4e5dSmrg	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
76526fae4e5dSmrg	      _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'
76536fae4e5dSmrg	      _LT_TAGVAR(compiler_needs_object, $1)=yes
76541f0ac6a5Smrg
76556fae4e5dSmrg	      # Not sure whether something based on
76566fae4e5dSmrg	      # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
76576fae4e5dSmrg	      # would be better.
76586fae4e5dSmrg	      output_verbose_link_cmd='func_echo_all'
76591f0ac6a5Smrg
76606fae4e5dSmrg	      # Archives containing C++ object files must be created using
76616fae4e5dSmrg	      # "CC -xar", where "CC" is the Sun C++ compiler.  This is
76626fae4e5dSmrg	      # necessary to make sure instantiated templates are included
76636fae4e5dSmrg	      # in the archive.
76646fae4e5dSmrg	      _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
76656fae4e5dSmrg	      ;;
76666fae4e5dSmrg	    esac
76676fae4e5dSmrg	    ;;
76686fae4e5dSmrg	esac
76696fae4e5dSmrg	;;
76701f0ac6a5Smrg
76716fae4e5dSmrg      lynxos*)
76726fae4e5dSmrg        # FIXME: insert proper C++ library support
76736fae4e5dSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
76746fae4e5dSmrg	;;
76751f0ac6a5Smrg
76766fae4e5dSmrg      m88k*)
76776fae4e5dSmrg        # FIXME: insert proper C++ library support
76786fae4e5dSmrg        _LT_TAGVAR(ld_shlibs, $1)=no
76796fae4e5dSmrg	;;
76801f0ac6a5Smrg
76816fae4e5dSmrg      mvs*)
76826fae4e5dSmrg        case $cc_basename in
76836fae4e5dSmrg          cxx*)
76846fae4e5dSmrg	    # FIXME: insert proper C++ library support
76856fae4e5dSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
76866fae4e5dSmrg	    ;;
76876fae4e5dSmrg	  *)
76886fae4e5dSmrg	    # FIXME: insert proper C++ library support
76896fae4e5dSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
76906fae4e5dSmrg	    ;;
76916fae4e5dSmrg	esac
76926fae4e5dSmrg	;;
76931f0ac6a5Smrg
76946fae4e5dSmrg      netbsd*)
76956fae4e5dSmrg        if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
76966fae4e5dSmrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
76976fae4e5dSmrg	  wlarc=
76986fae4e5dSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
76996fae4e5dSmrg	  _LT_TAGVAR(hardcode_direct, $1)=yes
77006fae4e5dSmrg	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
77016fae4e5dSmrg	fi
77026fae4e5dSmrg	# Workaround some broken pre-1.5 toolchains
77036fae4e5dSmrg	output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
77046fae4e5dSmrg	;;
77051f0ac6a5Smrg
77066fae4e5dSmrg      *nto* | *qnx*)
77076fae4e5dSmrg        _LT_TAGVAR(ld_shlibs, $1)=yes
77086fae4e5dSmrg	;;
77091f0ac6a5Smrg
77106fae4e5dSmrg      openbsd2*)
77116fae4e5dSmrg        # C++ shared libraries are fairly broken
77126fae4e5dSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
77139c9ff80cSmrg	;;
77141f0ac6a5Smrg
77156fae4e5dSmrg      openbsd*)
77166fae4e5dSmrg	if test -f /usr/libexec/ld.so; then
77176fae4e5dSmrg	  _LT_TAGVAR(hardcode_direct, $1)=yes
77186fae4e5dSmrg	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
77196fae4e5dSmrg	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
77206fae4e5dSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
77216fae4e5dSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
77226fae4e5dSmrg	  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
77236fae4e5dSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
77246fae4e5dSmrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
77256fae4e5dSmrg	    _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
77266fae4e5dSmrg	  fi
77276fae4e5dSmrg	  output_verbose_link_cmd=func_echo_all
77286fae4e5dSmrg	else
77296fae4e5dSmrg	  _LT_TAGVAR(ld_shlibs, $1)=no
77306fae4e5dSmrg	fi
77316fae4e5dSmrg	;;
77321f0ac6a5Smrg
77336fae4e5dSmrg      osf3* | osf4* | osf5*)
77346fae4e5dSmrg        case $cc_basename in
77356fae4e5dSmrg          KCC*)
77366fae4e5dSmrg	    # Kuck and Associates, Inc. (KAI) C++ Compiler
77371f0ac6a5Smrg
77386fae4e5dSmrg	    # KCC will only create a shared library if the output file
77396fae4e5dSmrg	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
77406fae4e5dSmrg	    # to its proper name (with version) after linking.
77416fae4e5dSmrg	    _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
77421f0ac6a5Smrg
77436fae4e5dSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
77446fae4e5dSmrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
77451f0ac6a5Smrg
77466fae4e5dSmrg	    # Archives containing C++ object files must be created using
77476fae4e5dSmrg	    # the KAI C++ compiler.
77486fae4e5dSmrg	    case $host in
77496fae4e5dSmrg	      osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
77506fae4e5dSmrg	      *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
77516fae4e5dSmrg	    esac
77526fae4e5dSmrg	    ;;
77536fae4e5dSmrg          RCC*)
77546fae4e5dSmrg	    # Rational C++ 2.4.1
77556fae4e5dSmrg	    # FIXME: insert proper C++ library support
77566fae4e5dSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
77576fae4e5dSmrg	    ;;
77586fae4e5dSmrg          cxx*)
77596fae4e5dSmrg	    case $host in
77606fae4e5dSmrg	      osf3*)
77616fae4e5dSmrg	        _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
77626fae4e5dSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
77636fae4e5dSmrg	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
77646fae4e5dSmrg		;;
77656fae4e5dSmrg	      *)
77666fae4e5dSmrg	        _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
77676fae4e5dSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
77686fae4e5dSmrg	        _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
77696fae4e5dSmrg	          echo "-hidden">> $lib.exp~
77706fae4e5dSmrg	          $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp  `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~
77716fae4e5dSmrg	          $RM $lib.exp'
77726fae4e5dSmrg	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
77736fae4e5dSmrg		;;
77746fae4e5dSmrg	    esac
77759c9ff80cSmrg
77766fae4e5dSmrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
77779c9ff80cSmrg
77786fae4e5dSmrg	    # Commands to make compiler produce verbose output that lists
77796fae4e5dSmrg	    # what "hidden" libraries, object files and flags are used when
77806fae4e5dSmrg	    # linking a shared library.
77816fae4e5dSmrg	    #
77826fae4e5dSmrg	    # There doesn't appear to be a way to prevent this compiler from
77836fae4e5dSmrg	    # explicitly linking system object files so we need to strip them
77846fae4e5dSmrg	    # from the output so that they don't get included in the library
77856fae4e5dSmrg	    # dependencies.
77866fae4e5dSmrg	    output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
77876fae4e5dSmrg	    ;;
77886fae4e5dSmrg	  *)
77896fae4e5dSmrg	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
77906fae4e5dSmrg	      _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
77916fae4e5dSmrg	      case $host in
77926fae4e5dSmrg	        osf3*)
77936fae4e5dSmrg	          _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $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'
77946fae4e5dSmrg		  ;;
77956fae4e5dSmrg	        *)
77966fae4e5dSmrg	          _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $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'
77976fae4e5dSmrg		  ;;
77986fae4e5dSmrg	      esac
77991f0ac6a5Smrg
78006fae4e5dSmrg	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
78016fae4e5dSmrg	      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
78021f0ac6a5Smrg
78036fae4e5dSmrg	      # Commands to make compiler produce verbose output that lists
78046fae4e5dSmrg	      # what "hidden" libraries, object files and flags are used when
78056fae4e5dSmrg	      # linking a shared library.
78066fae4e5dSmrg	      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
78071f0ac6a5Smrg
78086fae4e5dSmrg	    else
78096fae4e5dSmrg	      # FIXME: insert proper C++ library support
78106fae4e5dSmrg	      _LT_TAGVAR(ld_shlibs, $1)=no
78116fae4e5dSmrg	    fi
78126fae4e5dSmrg	    ;;
78136fae4e5dSmrg        esac
78146fae4e5dSmrg        ;;
78151f0ac6a5Smrg
78166fae4e5dSmrg      psos*)
78176fae4e5dSmrg        # FIXME: insert proper C++ library support
78186fae4e5dSmrg        _LT_TAGVAR(ld_shlibs, $1)=no
78196fae4e5dSmrg        ;;
78201f0ac6a5Smrg
78216fae4e5dSmrg      sunos4*)
78226fae4e5dSmrg        case $cc_basename in
78236fae4e5dSmrg          CC*)
78246fae4e5dSmrg	    # Sun C++ 4.x
78256fae4e5dSmrg	    # FIXME: insert proper C++ library support
78266fae4e5dSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
78276fae4e5dSmrg	    ;;
78286fae4e5dSmrg          lcc*)
78296fae4e5dSmrg	    # Lucid
78306fae4e5dSmrg	    # FIXME: insert proper C++ library support
78316fae4e5dSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
78326fae4e5dSmrg	    ;;
78336fae4e5dSmrg          *)
78346fae4e5dSmrg	    # FIXME: insert proper C++ library support
78356fae4e5dSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
78366fae4e5dSmrg	    ;;
78376fae4e5dSmrg        esac
78386fae4e5dSmrg        ;;
78391f0ac6a5Smrg
78406fae4e5dSmrg      solaris*)
78416fae4e5dSmrg        case $cc_basename in
78426fae4e5dSmrg          CC* | sunCC*)
78436fae4e5dSmrg	    # Sun C++ 4.2, 5.x and Centerline C++
78446fae4e5dSmrg            _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
78456fae4e5dSmrg	    _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
78466fae4e5dSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
78476fae4e5dSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
78486fae4e5dSmrg	      $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
78491f0ac6a5Smrg
78506fae4e5dSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
78516fae4e5dSmrg	    _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
78526fae4e5dSmrg	    case $host_os in
78536fae4e5dSmrg	      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
78546fae4e5dSmrg	      *)
78556fae4e5dSmrg		# The compiler driver will combine and reorder linker options,
78566fae4e5dSmrg		# but understands `-z linker_flag'.
78576fae4e5dSmrg	        # Supported since Solaris 2.6 (maybe 2.5.1?)
78586fae4e5dSmrg		_LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
78596fae4e5dSmrg	        ;;
78606fae4e5dSmrg	    esac
78616fae4e5dSmrg	    _LT_TAGVAR(link_all_deplibs, $1)=yes
78629c9ff80cSmrg
78636fae4e5dSmrg	    output_verbose_link_cmd='func_echo_all'
78649c9ff80cSmrg
78656fae4e5dSmrg	    # Archives containing C++ object files must be created using
78666fae4e5dSmrg	    # "CC -xar", where "CC" is the Sun C++ compiler.  This is
78676fae4e5dSmrg	    # necessary to make sure instantiated templates are included
78686fae4e5dSmrg	    # in the archive.
78696fae4e5dSmrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
78706fae4e5dSmrg	    ;;
78716fae4e5dSmrg          gcx*)
78726fae4e5dSmrg	    # Green Hills C++ Compiler
78736fae4e5dSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
78749c9ff80cSmrg
78756fae4e5dSmrg	    # The C++ compiler must be used to create the archive.
78766fae4e5dSmrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
78776fae4e5dSmrg	    ;;
78786fae4e5dSmrg          *)
78796fae4e5dSmrg	    # GNU C++ compiler with Solaris linker
78806fae4e5dSmrg	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
78816fae4e5dSmrg	      _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
78826fae4e5dSmrg	      if $CC --version | $GREP -v '^2\.7' > /dev/null; then
78836fae4e5dSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
78846fae4e5dSmrg	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
78856fae4e5dSmrg		  $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
78861f0ac6a5Smrg
78876fae4e5dSmrg	        # Commands to make compiler produce verbose output that lists
78886fae4e5dSmrg	        # what "hidden" libraries, object files and flags are used when
78896fae4e5dSmrg	        # linking a shared library.
78906fae4e5dSmrg	        output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
78916fae4e5dSmrg	      else
78926fae4e5dSmrg	        # g++ 2.7 appears to require `-G' NOT `-shared' on this
78936fae4e5dSmrg	        # platform.
78946fae4e5dSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
78956fae4e5dSmrg	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
78966fae4e5dSmrg		  $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
78971f0ac6a5Smrg
78986fae4e5dSmrg	        # Commands to make compiler produce verbose output that lists
78996fae4e5dSmrg	        # what "hidden" libraries, object files and flags are used when
79006fae4e5dSmrg	        # linking a shared library.
79016fae4e5dSmrg	        output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
79026fae4e5dSmrg	      fi
79031f0ac6a5Smrg
79046fae4e5dSmrg	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
79056fae4e5dSmrg	      case $host_os in
79066fae4e5dSmrg		solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
79076fae4e5dSmrg		*)
79086fae4e5dSmrg		  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
79096fae4e5dSmrg		  ;;
79106fae4e5dSmrg	      esac
79116fae4e5dSmrg	    fi
79126fae4e5dSmrg	    ;;
79136fae4e5dSmrg        esac
79146fae4e5dSmrg        ;;
79151f0ac6a5Smrg
79166fae4e5dSmrg    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
79176fae4e5dSmrg      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
79186fae4e5dSmrg      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
79196fae4e5dSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
79206fae4e5dSmrg      runpath_var='LD_RUN_PATH'
79211f0ac6a5Smrg
79226fae4e5dSmrg      case $cc_basename in
79236fae4e5dSmrg        CC*)
79246fae4e5dSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
79256fae4e5dSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
79266fae4e5dSmrg	  ;;
79276fae4e5dSmrg	*)
79286fae4e5dSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
79296fae4e5dSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
79306fae4e5dSmrg	  ;;
79316fae4e5dSmrg      esac
79326fae4e5dSmrg      ;;
79331f0ac6a5Smrg
79346fae4e5dSmrg      sysv5* | sco3.2v5* | sco5v6*)
79356fae4e5dSmrg	# Note: We can NOT use -z defs as we might desire, because we do not
79366fae4e5dSmrg	# link with -lc, and that would cause any symbols used from libc to
79376fae4e5dSmrg	# always be unresolved, which means just about no library would
79386fae4e5dSmrg	# ever link correctly.  If we're not using GNU ld we use -z text
79396fae4e5dSmrg	# though, which does catch some bad symbols but isn't as heavy-handed
79406fae4e5dSmrg	# as -z defs.
79416fae4e5dSmrg	_LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
79426fae4e5dSmrg	_LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
79436fae4e5dSmrg	_LT_TAGVAR(archive_cmds_need_lc, $1)=no
79446fae4e5dSmrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
79456fae4e5dSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
79466fae4e5dSmrg	_LT_TAGVAR(hardcode_libdir_separator, $1)=':'
79476fae4e5dSmrg	_LT_TAGVAR(link_all_deplibs, $1)=yes
79486fae4e5dSmrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
79496fae4e5dSmrg	runpath_var='LD_RUN_PATH'
79506fae4e5dSmrg
79516fae4e5dSmrg	case $cc_basename in
79526fae4e5dSmrg          CC*)
79536fae4e5dSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
79546fae4e5dSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
79556fae4e5dSmrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
79566fae4e5dSmrg	      '"$_LT_TAGVAR(old_archive_cmds, $1)"
79576fae4e5dSmrg	    _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
79586fae4e5dSmrg	      '"$_LT_TAGVAR(reload_cmds, $1)"
79596fae4e5dSmrg	    ;;
79606fae4e5dSmrg	  *)
79616fae4e5dSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
79626fae4e5dSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
79636fae4e5dSmrg	    ;;
79646fae4e5dSmrg	esac
79656fae4e5dSmrg      ;;
79666fae4e5dSmrg
79676fae4e5dSmrg      tandem*)
79686fae4e5dSmrg        case $cc_basename in
79696fae4e5dSmrg          NCC*)
79706fae4e5dSmrg	    # NonStop-UX NCC 3.20
79716fae4e5dSmrg	    # FIXME: insert proper C++ library support
79726fae4e5dSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
79736fae4e5dSmrg	    ;;
79746fae4e5dSmrg          *)
79756fae4e5dSmrg	    # FIXME: insert proper C++ library support
79766fae4e5dSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
79776fae4e5dSmrg	    ;;
79786fae4e5dSmrg        esac
79796fae4e5dSmrg        ;;
79806fae4e5dSmrg
79816fae4e5dSmrg      vxworks*)
79826fae4e5dSmrg        # FIXME: insert proper C++ library support
79836fae4e5dSmrg        _LT_TAGVAR(ld_shlibs, $1)=no
79846fae4e5dSmrg        ;;
79851f0ac6a5Smrg
79866fae4e5dSmrg      *)
79876fae4e5dSmrg        # FIXME: insert proper C++ library support
79886fae4e5dSmrg        _LT_TAGVAR(ld_shlibs, $1)=no
79896fae4e5dSmrg        ;;
79906fae4e5dSmrg    esac
79911f0ac6a5Smrg
79926fae4e5dSmrg    AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
79936fae4e5dSmrg    test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
79949c9ff80cSmrg
79956fae4e5dSmrg    _LT_TAGVAR(GCC, $1)="$GXX"
79966fae4e5dSmrg    _LT_TAGVAR(LD, $1)="$LD"
79971f0ac6a5Smrg
79986fae4e5dSmrg    ## CAVEAT EMPTOR:
79996fae4e5dSmrg    ## There is no encapsulation within the following macros, do not change
80006fae4e5dSmrg    ## the running order or otherwise move them around unless you know exactly
80016fae4e5dSmrg    ## what you are doing...
80026fae4e5dSmrg    _LT_SYS_HIDDEN_LIBDEPS($1)
80036fae4e5dSmrg    _LT_COMPILER_PIC($1)
80046fae4e5dSmrg    _LT_COMPILER_C_O($1)
80056fae4e5dSmrg    _LT_COMPILER_FILE_LOCKS($1)
80066fae4e5dSmrg    _LT_LINKER_SHLIBS($1)
80076fae4e5dSmrg    _LT_SYS_DYNAMIC_LINKER($1)
80086fae4e5dSmrg    _LT_LINKER_HARDCODE_LIBPATH($1)
8009e5410a46Smrg
80106fae4e5dSmrg    _LT_CONFIG($1)
80116fae4e5dSmrg  fi # test -n "$compiler"
80129c9ff80cSmrg
80136fae4e5dSmrg  CC=$lt_save_CC
80146fae4e5dSmrg  CFLAGS=$lt_save_CFLAGS
80156fae4e5dSmrg  LDCXX=$LD
80166fae4e5dSmrg  LD=$lt_save_LD
80176fae4e5dSmrg  GCC=$lt_save_GCC
80186fae4e5dSmrg  with_gnu_ld=$lt_save_with_gnu_ld
80196fae4e5dSmrg  lt_cv_path_LDCXX=$lt_cv_path_LD
80206fae4e5dSmrg  lt_cv_path_LD=$lt_save_path_LD
80216fae4e5dSmrg  lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
80226fae4e5dSmrg  lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
80236fae4e5dSmrgfi # test "$_lt_caught_CXX_error" != yes
80249c9ff80cSmrg
80256fae4e5dSmrgAC_LANG_POP
80266fae4e5dSmrg])# _LT_LANG_CXX_CONFIG
80279c9ff80cSmrg
80289c9ff80cSmrg
80296fae4e5dSmrg# _LT_FUNC_STRIPNAME_CNF
80306fae4e5dSmrg# ----------------------
80316fae4e5dSmrg# func_stripname_cnf prefix suffix name
80326fae4e5dSmrg# strip PREFIX and SUFFIX off of NAME.
80336fae4e5dSmrg# PREFIX and SUFFIX must not contain globbing or regex special
80346fae4e5dSmrg# characters, hashes, percent signs, but SUFFIX may contain a leading
80356fae4e5dSmrg# dot (in which case that matches only a dot).
80366fae4e5dSmrg#
80376fae4e5dSmrg# This function is identical to the (non-XSI) version of func_stripname,
80386fae4e5dSmrg# except this one can be used by m4 code that may be executed by configure,
80396fae4e5dSmrg# rather than the libtool script.
80406fae4e5dSmrgm4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
80416fae4e5dSmrgAC_REQUIRE([_LT_DECL_SED])
80426fae4e5dSmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
80436fae4e5dSmrgfunc_stripname_cnf ()
80446fae4e5dSmrg{
80456fae4e5dSmrg  case ${2} in
80466fae4e5dSmrg  .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
80476fae4e5dSmrg  *)  func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
80486fae4e5dSmrg  esac
80496fae4e5dSmrg} # func_stripname_cnf
80506fae4e5dSmrg])# _LT_FUNC_STRIPNAME_CNF
80519c9ff80cSmrg
80526fae4e5dSmrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
80536fae4e5dSmrg# ---------------------------------
80546fae4e5dSmrg# Figure out "hidden" library dependencies from verbose
80556fae4e5dSmrg# compiler output when linking a shared library.
80566fae4e5dSmrg# Parse the compiler output and extract the necessary
80576fae4e5dSmrg# objects, libraries and library flags.
80586fae4e5dSmrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS],
80596fae4e5dSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
80606fae4e5dSmrgAC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
80616fae4e5dSmrg# Dependencies to place before and after the object being linked:
80626fae4e5dSmrg_LT_TAGVAR(predep_objects, $1)=
80636fae4e5dSmrg_LT_TAGVAR(postdep_objects, $1)=
80646fae4e5dSmrg_LT_TAGVAR(predeps, $1)=
80656fae4e5dSmrg_LT_TAGVAR(postdeps, $1)=
80666fae4e5dSmrg_LT_TAGVAR(compiler_lib_search_path, $1)=
80671f0ac6a5Smrg
80686fae4e5dSmrgdnl we can't use the lt_simple_compile_test_code here,
80696fae4e5dSmrgdnl because it contains code intended for an executable,
80706fae4e5dSmrgdnl not a library.  It's possible we should let each
80716fae4e5dSmrgdnl tag define a new lt_????_link_test_code variable,
80726fae4e5dSmrgdnl but it's only used here...
80736fae4e5dSmrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
80746fae4e5dSmrgint a;
80756fae4e5dSmrgvoid foo (void) { a = 0; }
80766fae4e5dSmrg_LT_EOF
80776fae4e5dSmrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
80786fae4e5dSmrgclass Foo
80796fae4e5dSmrg{
80806fae4e5dSmrgpublic:
80816fae4e5dSmrg  Foo (void) { a = 0; }
80826fae4e5dSmrgprivate:
80836fae4e5dSmrg  int a;
80846fae4e5dSmrg};
80856fae4e5dSmrg_LT_EOF
80866fae4e5dSmrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
80876fae4e5dSmrg      subroutine foo
80886fae4e5dSmrg      implicit none
80896fae4e5dSmrg      integer*4 a
80906fae4e5dSmrg      a=0
80916fae4e5dSmrg      return
80926fae4e5dSmrg      end
80936fae4e5dSmrg_LT_EOF
80946fae4e5dSmrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
80956fae4e5dSmrg      subroutine foo
80966fae4e5dSmrg      implicit none
80976fae4e5dSmrg      integer a
80986fae4e5dSmrg      a=0
80996fae4e5dSmrg      return
81006fae4e5dSmrg      end
81016fae4e5dSmrg_LT_EOF
81026fae4e5dSmrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
81036fae4e5dSmrgpublic class foo {
81046fae4e5dSmrg  private int a;
81056fae4e5dSmrg  public void bar (void) {
81066fae4e5dSmrg    a = 0;
81076fae4e5dSmrg  }
81086fae4e5dSmrg};
81096fae4e5dSmrg_LT_EOF
811089c04b6cSmrg], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF
811189c04b6cSmrgpackage foo
811289c04b6cSmrgfunc foo() {
811389c04b6cSmrg}
811489c04b6cSmrg_LT_EOF
81156fae4e5dSmrg])
81161f0ac6a5Smrg
81176fae4e5dSmrg_lt_libdeps_save_CFLAGS=$CFLAGS
81186fae4e5dSmrgcase "$CC $CFLAGS " in #(
81196fae4e5dSmrg*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
81206fae4e5dSmrg*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
812189c04b6cSmrg*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
81226fae4e5dSmrgesac
81231f0ac6a5Smrg
81246fae4e5dSmrgdnl Parse the compiler output and extract the necessary
81256fae4e5dSmrgdnl objects, libraries and library flags.
81266fae4e5dSmrgif AC_TRY_EVAL(ac_compile); then
81276fae4e5dSmrg  # Parse the compiler output and extract the necessary
81286fae4e5dSmrg  # objects, libraries and library flags.
81291f0ac6a5Smrg
81306fae4e5dSmrg  # Sentinel used to keep track of whether or not we are before
81316fae4e5dSmrg  # the conftest object file.
81326fae4e5dSmrg  pre_test_object_deps_done=no
81331f0ac6a5Smrg
81346fae4e5dSmrg  for p in `eval "$output_verbose_link_cmd"`; do
81356fae4e5dSmrg    case ${prev}${p} in
81361f0ac6a5Smrg
81376fae4e5dSmrg    -L* | -R* | -l*)
81386fae4e5dSmrg       # Some compilers place space between "-{L,R}" and the path.
81396fae4e5dSmrg       # Remove the space.
81406fae4e5dSmrg       if test $p = "-L" ||
81416fae4e5dSmrg          test $p = "-R"; then
81426fae4e5dSmrg	 prev=$p
81436fae4e5dSmrg	 continue
81446fae4e5dSmrg       fi
81451f0ac6a5Smrg
81466fae4e5dSmrg       # Expand the sysroot to ease extracting the directories later.
81476fae4e5dSmrg       if test -z "$prev"; then
81486fae4e5dSmrg         case $p in
81496fae4e5dSmrg         -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
81506fae4e5dSmrg         -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
81516fae4e5dSmrg         -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
81526fae4e5dSmrg         esac
81536fae4e5dSmrg       fi
81546fae4e5dSmrg       case $p in
81556fae4e5dSmrg       =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
81566fae4e5dSmrg       esac
81576fae4e5dSmrg       if test "$pre_test_object_deps_done" = no; then
81586fae4e5dSmrg	 case ${prev} in
81596fae4e5dSmrg	 -L | -R)
81606fae4e5dSmrg	   # Internal compiler library paths should come after those
81616fae4e5dSmrg	   # provided the user.  The postdeps already come after the
81626fae4e5dSmrg	   # user supplied libs so there is no need to process them.
81636fae4e5dSmrg	   if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
81646fae4e5dSmrg	     _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
81656fae4e5dSmrg	   else
81666fae4e5dSmrg	     _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
81676fae4e5dSmrg	   fi
81686fae4e5dSmrg	   ;;
81696fae4e5dSmrg	 # The "-l" case would never come before the object being
81706fae4e5dSmrg	 # linked, so don't bother handling this case.
81716fae4e5dSmrg	 esac
81726fae4e5dSmrg       else
81736fae4e5dSmrg	 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
81746fae4e5dSmrg	   _LT_TAGVAR(postdeps, $1)="${prev}${p}"
81756fae4e5dSmrg	 else
81766fae4e5dSmrg	   _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
81776fae4e5dSmrg	 fi
81786fae4e5dSmrg       fi
81796fae4e5dSmrg       prev=
81806fae4e5dSmrg       ;;
81819c9ff80cSmrg
81826fae4e5dSmrg    *.lto.$objext) ;; # Ignore GCC LTO objects
81836fae4e5dSmrg    *.$objext)
81846fae4e5dSmrg       # This assumes that the test object file only shows up
81856fae4e5dSmrg       # once in the compiler output.
81866fae4e5dSmrg       if test "$p" = "conftest.$objext"; then
81876fae4e5dSmrg	 pre_test_object_deps_done=yes
81886fae4e5dSmrg	 continue
81896fae4e5dSmrg       fi
81901f0ac6a5Smrg
81916fae4e5dSmrg       if test "$pre_test_object_deps_done" = no; then
81926fae4e5dSmrg	 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
81936fae4e5dSmrg	   _LT_TAGVAR(predep_objects, $1)="$p"
81946fae4e5dSmrg	 else
81956fae4e5dSmrg	   _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
81966fae4e5dSmrg	 fi
81976fae4e5dSmrg       else
81986fae4e5dSmrg	 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
81996fae4e5dSmrg	   _LT_TAGVAR(postdep_objects, $1)="$p"
82006fae4e5dSmrg	 else
82016fae4e5dSmrg	   _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
82026fae4e5dSmrg	 fi
82036fae4e5dSmrg       fi
82046fae4e5dSmrg       ;;
82051f0ac6a5Smrg
82066fae4e5dSmrg    *) ;; # Ignore the rest.
82071f0ac6a5Smrg
82086fae4e5dSmrg    esac
82096fae4e5dSmrg  done
82109c9ff80cSmrg
82116fae4e5dSmrg  # Clean up.
82126fae4e5dSmrg  rm -f a.out a.exe
82136fae4e5dSmrgelse
82146fae4e5dSmrg  echo "libtool.m4: error: problem compiling $1 test program"
82156fae4e5dSmrgfi
82161f0ac6a5Smrg
82176fae4e5dSmrg$RM -f confest.$objext
82186fae4e5dSmrgCFLAGS=$_lt_libdeps_save_CFLAGS
82191f0ac6a5Smrg
82206fae4e5dSmrg# PORTME: override above test on systems where it is broken
82216fae4e5dSmrgm4_if([$1], [CXX],
82226fae4e5dSmrg[case $host_os in
82236fae4e5dSmrginterix[[3-9]]*)
82246fae4e5dSmrg  # Interix 3.5 installs completely hosed .la files for C++, so rather than
82256fae4e5dSmrg  # hack all around it, let's just trust "g++" to DTRT.
82266fae4e5dSmrg  _LT_TAGVAR(predep_objects,$1)=
82276fae4e5dSmrg  _LT_TAGVAR(postdep_objects,$1)=
82286fae4e5dSmrg  _LT_TAGVAR(postdeps,$1)=
82296fae4e5dSmrg  ;;
82309c9ff80cSmrg
82316fae4e5dSmrglinux*)
82326fae4e5dSmrg  case `$CC -V 2>&1 | sed 5q` in
82336fae4e5dSmrg  *Sun\ C*)
82346fae4e5dSmrg    # Sun C++ 5.9
82359c9ff80cSmrg
82366fae4e5dSmrg    # The more standards-conforming stlport4 library is
82376fae4e5dSmrg    # incompatible with the Cstd library. Avoid specifying
82386fae4e5dSmrg    # it if it's in CXXFLAGS. Ignore libCrun as
82396fae4e5dSmrg    # -library=stlport4 depends on it.
82406fae4e5dSmrg    case " $CXX $CXXFLAGS " in
82416fae4e5dSmrg    *" -library=stlport4 "*)
82426fae4e5dSmrg      solaris_use_stlport4=yes
82436fae4e5dSmrg      ;;
82446fae4e5dSmrg    esac
82451f0ac6a5Smrg
82466fae4e5dSmrg    if test "$solaris_use_stlport4" != yes; then
82476fae4e5dSmrg      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
82486fae4e5dSmrg    fi
82496fae4e5dSmrg    ;;
82506fae4e5dSmrg  esac
82516fae4e5dSmrg  ;;
82529c9ff80cSmrg
82536fae4e5dSmrgsolaris*)
82546fae4e5dSmrg  case $cc_basename in
82556fae4e5dSmrg  CC* | sunCC*)
82566fae4e5dSmrg    # The more standards-conforming stlport4 library is
82576fae4e5dSmrg    # incompatible with the Cstd library. Avoid specifying
82586fae4e5dSmrg    # it if it's in CXXFLAGS. Ignore libCrun as
82596fae4e5dSmrg    # -library=stlport4 depends on it.
82606fae4e5dSmrg    case " $CXX $CXXFLAGS " in
82616fae4e5dSmrg    *" -library=stlport4 "*)
82626fae4e5dSmrg      solaris_use_stlport4=yes
82636fae4e5dSmrg      ;;
82646fae4e5dSmrg    esac
82651f0ac6a5Smrg
82666fae4e5dSmrg    # Adding this requires a known-good setup of shared libraries for
82676fae4e5dSmrg    # Sun compiler versions before 5.6, else PIC objects from an old
82686fae4e5dSmrg    # archive will be linked into the output, leading to subtle bugs.
82696fae4e5dSmrg    if test "$solaris_use_stlport4" != yes; then
82706fae4e5dSmrg      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
82716fae4e5dSmrg    fi
82726fae4e5dSmrg    ;;
82736fae4e5dSmrg  esac
82746fae4e5dSmrg  ;;
82756fae4e5dSmrgesac
82766fae4e5dSmrg])
82771f0ac6a5Smrg
82786fae4e5dSmrgcase " $_LT_TAGVAR(postdeps, $1) " in
82796fae4e5dSmrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
82806fae4e5dSmrgesac
82816fae4e5dSmrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=
82826fae4e5dSmrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
82836fae4e5dSmrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
82846fae4e5dSmrgfi
82856fae4e5dSmrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1],
82866fae4e5dSmrg    [The directories searched by this compiler when creating a shared library])
82876fae4e5dSmrg_LT_TAGDECL([], [predep_objects], [1],
82886fae4e5dSmrg    [Dependencies to place before and after the objects being linked to
82896fae4e5dSmrg    create a shared library])
82906fae4e5dSmrg_LT_TAGDECL([], [postdep_objects], [1])
82916fae4e5dSmrg_LT_TAGDECL([], [predeps], [1])
82926fae4e5dSmrg_LT_TAGDECL([], [postdeps], [1])
82936fae4e5dSmrg_LT_TAGDECL([], [compiler_lib_search_path], [1],
82946fae4e5dSmrg    [The library search path used internally by the compiler when linking
82956fae4e5dSmrg    a shared library])
82966fae4e5dSmrg])# _LT_SYS_HIDDEN_LIBDEPS
82971f0ac6a5Smrg
82981f0ac6a5Smrg
82996fae4e5dSmrg# _LT_LANG_F77_CONFIG([TAG])
83006fae4e5dSmrg# --------------------------
83016fae4e5dSmrg# Ensure that the configuration variables for a Fortran 77 compiler are
83026fae4e5dSmrg# suitably defined.  These variables are subsequently used by _LT_CONFIG
83036fae4e5dSmrg# to write the compiler configuration to `libtool'.
83046fae4e5dSmrgm4_defun([_LT_LANG_F77_CONFIG],
83056fae4e5dSmrg[AC_LANG_PUSH(Fortran 77)
83066fae4e5dSmrgif test -z "$F77" || test "X$F77" = "Xno"; then
83076fae4e5dSmrg  _lt_disable_F77=yes
83086fae4e5dSmrgfi
83096fae4e5dSmrg
83106fae4e5dSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
83116fae4e5dSmrg_LT_TAGVAR(allow_undefined_flag, $1)=
83126fae4e5dSmrg_LT_TAGVAR(always_export_symbols, $1)=no
83136fae4e5dSmrg_LT_TAGVAR(archive_expsym_cmds, $1)=
83146fae4e5dSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)=
83156fae4e5dSmrg_LT_TAGVAR(hardcode_direct, $1)=no
83166fae4e5dSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no
83176fae4e5dSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
83186fae4e5dSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)=
83196fae4e5dSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no
83206fae4e5dSmrg_LT_TAGVAR(hardcode_automatic, $1)=no
83216fae4e5dSmrg_LT_TAGVAR(inherit_rpath, $1)=no
83226fae4e5dSmrg_LT_TAGVAR(module_cmds, $1)=
83236fae4e5dSmrg_LT_TAGVAR(module_expsym_cmds, $1)=
83246fae4e5dSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown
83256fae4e5dSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
83266fae4e5dSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag
83276fae4e5dSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
83286fae4e5dSmrg_LT_TAGVAR(no_undefined_flag, $1)=
83296fae4e5dSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)=
83306fae4e5dSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
83311f0ac6a5Smrg
83326fae4e5dSmrg# Source file extension for f77 test sources.
83336fae4e5dSmrgac_ext=f
83341f0ac6a5Smrg
83356fae4e5dSmrg# Object file extension for compiled f77 test sources.
83366fae4e5dSmrgobjext=o
83376fae4e5dSmrg_LT_TAGVAR(objext, $1)=$objext
83381f0ac6a5Smrg
83396fae4e5dSmrg# No sense in running all these tests if we already determined that
83406fae4e5dSmrg# the F77 compiler isn't working.  Some variables (like enable_shared)
83416fae4e5dSmrg# are currently assumed to apply to all compilers on this platform,
83426fae4e5dSmrg# and will be corrupted by setting them based on a non-working compiler.
83436fae4e5dSmrgif test "$_lt_disable_F77" != yes; then
83446fae4e5dSmrg  # Code to be used in simple compile tests
83456fae4e5dSmrg  lt_simple_compile_test_code="\
83466fae4e5dSmrg      subroutine t
83476fae4e5dSmrg      return
83486fae4e5dSmrg      end
83496fae4e5dSmrg"
83501f0ac6a5Smrg
83516fae4e5dSmrg  # Code to be used in simple link tests
83526fae4e5dSmrg  lt_simple_link_test_code="\
83536fae4e5dSmrg      program t
83546fae4e5dSmrg      end
83556fae4e5dSmrg"
83561f0ac6a5Smrg
83576fae4e5dSmrg  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
83586fae4e5dSmrg  _LT_TAG_COMPILER
83599c9ff80cSmrg
83606fae4e5dSmrg  # save warnings/boilerplate of simple test code
83616fae4e5dSmrg  _LT_COMPILER_BOILERPLATE
83626fae4e5dSmrg  _LT_LINKER_BOILERPLATE
83631f0ac6a5Smrg
83646fae4e5dSmrg  # Allow CC to be a program name with arguments.
83656fae4e5dSmrg  lt_save_CC="$CC"
83666fae4e5dSmrg  lt_save_GCC=$GCC
83676fae4e5dSmrg  lt_save_CFLAGS=$CFLAGS
83686fae4e5dSmrg  CC=${F77-"f77"}
83696fae4e5dSmrg  CFLAGS=$FFLAGS
83706fae4e5dSmrg  compiler=$CC
83716fae4e5dSmrg  _LT_TAGVAR(compiler, $1)=$CC
83726fae4e5dSmrg  _LT_CC_BASENAME([$compiler])
83736fae4e5dSmrg  GCC=$G77
83746fae4e5dSmrg  if test -n "$compiler"; then
83756fae4e5dSmrg    AC_MSG_CHECKING([if libtool supports shared libraries])
83766fae4e5dSmrg    AC_MSG_RESULT([$can_build_shared])
83779c9ff80cSmrg
83786fae4e5dSmrg    AC_MSG_CHECKING([whether to build shared libraries])
83796fae4e5dSmrg    test "$can_build_shared" = "no" && enable_shared=no
83809c9ff80cSmrg
83816fae4e5dSmrg    # On AIX, shared libraries and static libraries use the same namespace, and
83826fae4e5dSmrg    # are all built from PIC.
83836fae4e5dSmrg    case $host_os in
83846fae4e5dSmrg      aix3*)
83856fae4e5dSmrg        test "$enable_shared" = yes && enable_static=no
83866fae4e5dSmrg        if test -n "$RANLIB"; then
83876fae4e5dSmrg          archive_cmds="$archive_cmds~\$RANLIB \$lib"
83886fae4e5dSmrg          postinstall_cmds='$RANLIB $lib'
83896fae4e5dSmrg        fi
83906fae4e5dSmrg        ;;
83916fae4e5dSmrg      aix[[4-9]]*)
83926fae4e5dSmrg	if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
83936fae4e5dSmrg	  test "$enable_shared" = yes && enable_static=no
83946fae4e5dSmrg	fi
83959c9ff80cSmrg        ;;
83966fae4e5dSmrg    esac
83976fae4e5dSmrg    AC_MSG_RESULT([$enable_shared])
83981f0ac6a5Smrg
83996fae4e5dSmrg    AC_MSG_CHECKING([whether to build static libraries])
84006fae4e5dSmrg    # Make sure either enable_shared or enable_static is yes.
84016fae4e5dSmrg    test "$enable_shared" = yes || enable_static=yes
84026fae4e5dSmrg    AC_MSG_RESULT([$enable_static])
84039c9ff80cSmrg
84046fae4e5dSmrg    _LT_TAGVAR(GCC, $1)="$G77"
84056fae4e5dSmrg    _LT_TAGVAR(LD, $1)="$LD"
84066fae4e5dSmrg
84076fae4e5dSmrg    ## CAVEAT EMPTOR:
84086fae4e5dSmrg    ## There is no encapsulation within the following macros, do not change
84096fae4e5dSmrg    ## the running order or otherwise move them around unless you know exactly
84106fae4e5dSmrg    ## what you are doing...
84116fae4e5dSmrg    _LT_COMPILER_PIC($1)
84126fae4e5dSmrg    _LT_COMPILER_C_O($1)
84136fae4e5dSmrg    _LT_COMPILER_FILE_LOCKS($1)
84146fae4e5dSmrg    _LT_LINKER_SHLIBS($1)
84156fae4e5dSmrg    _LT_SYS_DYNAMIC_LINKER($1)
84166fae4e5dSmrg    _LT_LINKER_HARDCODE_LIBPATH($1)
84171f0ac6a5Smrg
84186fae4e5dSmrg    _LT_CONFIG($1)
84196fae4e5dSmrg  fi # test -n "$compiler"
84209c9ff80cSmrg
84216fae4e5dSmrg  GCC=$lt_save_GCC
84226fae4e5dSmrg  CC="$lt_save_CC"
84236fae4e5dSmrg  CFLAGS="$lt_save_CFLAGS"
84246fae4e5dSmrgfi # test "$_lt_disable_F77" != yes
84259c9ff80cSmrg
84266fae4e5dSmrgAC_LANG_POP
84276fae4e5dSmrg])# _LT_LANG_F77_CONFIG
84289c9ff80cSmrg
84291f0ac6a5Smrg
84306fae4e5dSmrg# _LT_LANG_FC_CONFIG([TAG])
84316fae4e5dSmrg# -------------------------
84326fae4e5dSmrg# Ensure that the configuration variables for a Fortran compiler are
84336fae4e5dSmrg# suitably defined.  These variables are subsequently used by _LT_CONFIG
84346fae4e5dSmrg# to write the compiler configuration to `libtool'.
84356fae4e5dSmrgm4_defun([_LT_LANG_FC_CONFIG],
84366fae4e5dSmrg[AC_LANG_PUSH(Fortran)
84371f0ac6a5Smrg
84386fae4e5dSmrgif test -z "$FC" || test "X$FC" = "Xno"; then
84396fae4e5dSmrg  _lt_disable_FC=yes
84406fae4e5dSmrgfi
84411f0ac6a5Smrg
84426fae4e5dSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
84436fae4e5dSmrg_LT_TAGVAR(allow_undefined_flag, $1)=
84446fae4e5dSmrg_LT_TAGVAR(always_export_symbols, $1)=no
84456fae4e5dSmrg_LT_TAGVAR(archive_expsym_cmds, $1)=
84466fae4e5dSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)=
84476fae4e5dSmrg_LT_TAGVAR(hardcode_direct, $1)=no
84486fae4e5dSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no
84496fae4e5dSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
84506fae4e5dSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)=
84516fae4e5dSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no
84526fae4e5dSmrg_LT_TAGVAR(hardcode_automatic, $1)=no
84536fae4e5dSmrg_LT_TAGVAR(inherit_rpath, $1)=no
84546fae4e5dSmrg_LT_TAGVAR(module_cmds, $1)=
84556fae4e5dSmrg_LT_TAGVAR(module_expsym_cmds, $1)=
84566fae4e5dSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown
84576fae4e5dSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
84586fae4e5dSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag
84596fae4e5dSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
84606fae4e5dSmrg_LT_TAGVAR(no_undefined_flag, $1)=
84616fae4e5dSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)=
84626fae4e5dSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
84639c9ff80cSmrg
84646fae4e5dSmrg# Source file extension for fc test sources.
84656fae4e5dSmrgac_ext=${ac_fc_srcext-f}
84669c9ff80cSmrg
84676fae4e5dSmrg# Object file extension for compiled fc test sources.
84686fae4e5dSmrgobjext=o
84696fae4e5dSmrg_LT_TAGVAR(objext, $1)=$objext
84701f0ac6a5Smrg
84716fae4e5dSmrg# No sense in running all these tests if we already determined that
84726fae4e5dSmrg# the FC compiler isn't working.  Some variables (like enable_shared)
84736fae4e5dSmrg# are currently assumed to apply to all compilers on this platform,
84746fae4e5dSmrg# and will be corrupted by setting them based on a non-working compiler.
84756fae4e5dSmrgif test "$_lt_disable_FC" != yes; then
84766fae4e5dSmrg  # Code to be used in simple compile tests
84776fae4e5dSmrg  lt_simple_compile_test_code="\
84786fae4e5dSmrg      subroutine t
84796fae4e5dSmrg      return
84806fae4e5dSmrg      end
84816fae4e5dSmrg"
84821f0ac6a5Smrg
84836fae4e5dSmrg  # Code to be used in simple link tests
84846fae4e5dSmrg  lt_simple_link_test_code="\
84856fae4e5dSmrg      program t
84866fae4e5dSmrg      end
84876fae4e5dSmrg"
84881f0ac6a5Smrg
84896fae4e5dSmrg  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
84906fae4e5dSmrg  _LT_TAG_COMPILER
84911f0ac6a5Smrg
84926fae4e5dSmrg  # save warnings/boilerplate of simple test code
84936fae4e5dSmrg  _LT_COMPILER_BOILERPLATE
84946fae4e5dSmrg  _LT_LINKER_BOILERPLATE
84951f0ac6a5Smrg
84966fae4e5dSmrg  # Allow CC to be a program name with arguments.
84976fae4e5dSmrg  lt_save_CC="$CC"
84986fae4e5dSmrg  lt_save_GCC=$GCC
84996fae4e5dSmrg  lt_save_CFLAGS=$CFLAGS
85006fae4e5dSmrg  CC=${FC-"f95"}
85016fae4e5dSmrg  CFLAGS=$FCFLAGS
85026fae4e5dSmrg  compiler=$CC
85036fae4e5dSmrg  GCC=$ac_cv_fc_compiler_gnu
85041f0ac6a5Smrg
85056fae4e5dSmrg  _LT_TAGVAR(compiler, $1)=$CC
85066fae4e5dSmrg  _LT_CC_BASENAME([$compiler])
85071f0ac6a5Smrg
85086fae4e5dSmrg  if test -n "$compiler"; then
85096fae4e5dSmrg    AC_MSG_CHECKING([if libtool supports shared libraries])
85106fae4e5dSmrg    AC_MSG_RESULT([$can_build_shared])
85116fae4e5dSmrg
85126fae4e5dSmrg    AC_MSG_CHECKING([whether to build shared libraries])
85136fae4e5dSmrg    test "$can_build_shared" = "no" && enable_shared=no
85146fae4e5dSmrg
85156fae4e5dSmrg    # On AIX, shared libraries and static libraries use the same namespace, and
85166fae4e5dSmrg    # are all built from PIC.
85176fae4e5dSmrg    case $host_os in
85186fae4e5dSmrg      aix3*)
85196fae4e5dSmrg        test "$enable_shared" = yes && enable_static=no
85206fae4e5dSmrg        if test -n "$RANLIB"; then
85216fae4e5dSmrg          archive_cmds="$archive_cmds~\$RANLIB \$lib"
85226fae4e5dSmrg          postinstall_cmds='$RANLIB $lib'
85236fae4e5dSmrg        fi
85246fae4e5dSmrg        ;;
85256fae4e5dSmrg      aix[[4-9]]*)
85266fae4e5dSmrg	if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
85276fae4e5dSmrg	  test "$enable_shared" = yes && enable_static=no
85289c9ff80cSmrg	fi
85296fae4e5dSmrg        ;;
85306fae4e5dSmrg    esac
85316fae4e5dSmrg    AC_MSG_RESULT([$enable_shared])
85321f0ac6a5Smrg
85336fae4e5dSmrg    AC_MSG_CHECKING([whether to build static libraries])
85346fae4e5dSmrg    # Make sure either enable_shared or enable_static is yes.
85356fae4e5dSmrg    test "$enable_shared" = yes || enable_static=yes
85366fae4e5dSmrg    AC_MSG_RESULT([$enable_static])
85379c9ff80cSmrg
85386fae4e5dSmrg    _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
85396fae4e5dSmrg    _LT_TAGVAR(LD, $1)="$LD"
85409c9ff80cSmrg
85416fae4e5dSmrg    ## CAVEAT EMPTOR:
85426fae4e5dSmrg    ## There is no encapsulation within the following macros, do not change
85436fae4e5dSmrg    ## the running order or otherwise move them around unless you know exactly
85446fae4e5dSmrg    ## what you are doing...
85456fae4e5dSmrg    _LT_SYS_HIDDEN_LIBDEPS($1)
85466fae4e5dSmrg    _LT_COMPILER_PIC($1)
85476fae4e5dSmrg    _LT_COMPILER_C_O($1)
85486fae4e5dSmrg    _LT_COMPILER_FILE_LOCKS($1)
85496fae4e5dSmrg    _LT_LINKER_SHLIBS($1)
85506fae4e5dSmrg    _LT_SYS_DYNAMIC_LINKER($1)
85516fae4e5dSmrg    _LT_LINKER_HARDCODE_LIBPATH($1)
85529c9ff80cSmrg
85536fae4e5dSmrg    _LT_CONFIG($1)
85546fae4e5dSmrg  fi # test -n "$compiler"
85551f0ac6a5Smrg
85566fae4e5dSmrg  GCC=$lt_save_GCC
85576fae4e5dSmrg  CC=$lt_save_CC
85586fae4e5dSmrg  CFLAGS=$lt_save_CFLAGS
85596fae4e5dSmrgfi # test "$_lt_disable_FC" != yes
85601f0ac6a5Smrg
85616fae4e5dSmrgAC_LANG_POP
85626fae4e5dSmrg])# _LT_LANG_FC_CONFIG
85639c9ff80cSmrg
85649c9ff80cSmrg
85656fae4e5dSmrg# _LT_LANG_GCJ_CONFIG([TAG])
85666fae4e5dSmrg# --------------------------
85676fae4e5dSmrg# Ensure that the configuration variables for the GNU Java Compiler compiler
85686fae4e5dSmrg# are suitably defined.  These variables are subsequently used by _LT_CONFIG
85696fae4e5dSmrg# to write the compiler configuration to `libtool'.
85706fae4e5dSmrgm4_defun([_LT_LANG_GCJ_CONFIG],
85716fae4e5dSmrg[AC_REQUIRE([LT_PROG_GCJ])dnl
85726fae4e5dSmrgAC_LANG_SAVE
85739c9ff80cSmrg
85746fae4e5dSmrg# Source file extension for Java test sources.
85756fae4e5dSmrgac_ext=java
85761f0ac6a5Smrg
85776fae4e5dSmrg# Object file extension for compiled Java test sources.
85786fae4e5dSmrgobjext=o
85796fae4e5dSmrg_LT_TAGVAR(objext, $1)=$objext
85801f0ac6a5Smrg
85816fae4e5dSmrg# Code to be used in simple compile tests
85826fae4e5dSmrglt_simple_compile_test_code="class foo {}"
85831f0ac6a5Smrg
85846fae4e5dSmrg# Code to be used in simple link tests
85856fae4e5dSmrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
85869c9ff80cSmrg
85876fae4e5dSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
85886fae4e5dSmrg_LT_TAG_COMPILER
85891f0ac6a5Smrg
85906fae4e5dSmrg# save warnings/boilerplate of simple test code
85916fae4e5dSmrg_LT_COMPILER_BOILERPLATE
85926fae4e5dSmrg_LT_LINKER_BOILERPLATE
85931f0ac6a5Smrg
85946fae4e5dSmrg# Allow CC to be a program name with arguments.
85956fae4e5dSmrglt_save_CC=$CC
85966fae4e5dSmrglt_save_CFLAGS=$CFLAGS
85976fae4e5dSmrglt_save_GCC=$GCC
85986fae4e5dSmrgGCC=yes
85996fae4e5dSmrgCC=${GCJ-"gcj"}
86006fae4e5dSmrgCFLAGS=$GCJFLAGS
86016fae4e5dSmrgcompiler=$CC
86026fae4e5dSmrg_LT_TAGVAR(compiler, $1)=$CC
86036fae4e5dSmrg_LT_TAGVAR(LD, $1)="$LD"
86046fae4e5dSmrg_LT_CC_BASENAME([$compiler])
86051f0ac6a5Smrg
86066fae4e5dSmrg# GCJ did not exist at the time GCC didn't implicitly link libc in.
86076fae4e5dSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
86089c9ff80cSmrg
86096fae4e5dSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
86106fae4e5dSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag
86116fae4e5dSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
86129c9ff80cSmrg
86136fae4e5dSmrgif test -n "$compiler"; then
86146fae4e5dSmrg  _LT_COMPILER_NO_RTTI($1)
86156fae4e5dSmrg  _LT_COMPILER_PIC($1)
86166fae4e5dSmrg  _LT_COMPILER_C_O($1)
86176fae4e5dSmrg  _LT_COMPILER_FILE_LOCKS($1)
86186fae4e5dSmrg  _LT_LINKER_SHLIBS($1)
86196fae4e5dSmrg  _LT_LINKER_HARDCODE_LIBPATH($1)
86209c9ff80cSmrg
86216fae4e5dSmrg  _LT_CONFIG($1)
86226fae4e5dSmrgfi
86231f0ac6a5Smrg
86246fae4e5dSmrgAC_LANG_RESTORE
86251f0ac6a5Smrg
86266fae4e5dSmrgGCC=$lt_save_GCC
86276fae4e5dSmrgCC=$lt_save_CC
86286fae4e5dSmrgCFLAGS=$lt_save_CFLAGS
86296fae4e5dSmrg])# _LT_LANG_GCJ_CONFIG
86301f0ac6a5Smrg
86311f0ac6a5Smrg
863289c04b6cSmrg# _LT_LANG_GO_CONFIG([TAG])
863389c04b6cSmrg# --------------------------
863489c04b6cSmrg# Ensure that the configuration variables for the GNU Go compiler
863589c04b6cSmrg# are suitably defined.  These variables are subsequently used by _LT_CONFIG
863689c04b6cSmrg# to write the compiler configuration to `libtool'.
863789c04b6cSmrgm4_defun([_LT_LANG_GO_CONFIG],
863889c04b6cSmrg[AC_REQUIRE([LT_PROG_GO])dnl
863989c04b6cSmrgAC_LANG_SAVE
864089c04b6cSmrg
864189c04b6cSmrg# Source file extension for Go test sources.
864289c04b6cSmrgac_ext=go
864389c04b6cSmrg
864489c04b6cSmrg# Object file extension for compiled Go test sources.
864589c04b6cSmrgobjext=o
864689c04b6cSmrg_LT_TAGVAR(objext, $1)=$objext
864789c04b6cSmrg
864889c04b6cSmrg# Code to be used in simple compile tests
864989c04b6cSmrglt_simple_compile_test_code="package main; func main() { }"
865089c04b6cSmrg
865189c04b6cSmrg# Code to be used in simple link tests
865289c04b6cSmrglt_simple_link_test_code='package main; func main() { }'
865389c04b6cSmrg
865489c04b6cSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
865589c04b6cSmrg_LT_TAG_COMPILER
865689c04b6cSmrg
865789c04b6cSmrg# save warnings/boilerplate of simple test code
865889c04b6cSmrg_LT_COMPILER_BOILERPLATE
865989c04b6cSmrg_LT_LINKER_BOILERPLATE
866089c04b6cSmrg
866189c04b6cSmrg# Allow CC to be a program name with arguments.
866289c04b6cSmrglt_save_CC=$CC
866389c04b6cSmrglt_save_CFLAGS=$CFLAGS
866489c04b6cSmrglt_save_GCC=$GCC
866589c04b6cSmrgGCC=yes
866689c04b6cSmrgCC=${GOC-"gccgo"}
866789c04b6cSmrgCFLAGS=$GOFLAGS
866889c04b6cSmrgcompiler=$CC
866989c04b6cSmrg_LT_TAGVAR(compiler, $1)=$CC
867089c04b6cSmrg_LT_TAGVAR(LD, $1)="$LD"
867189c04b6cSmrg_LT_CC_BASENAME([$compiler])
867289c04b6cSmrg
867389c04b6cSmrg# Go did not exist at the time GCC didn't implicitly link libc in.
867489c04b6cSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
867589c04b6cSmrg
867689c04b6cSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
867789c04b6cSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag
867889c04b6cSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
867989c04b6cSmrg
868089c04b6cSmrgif test -n "$compiler"; then
868189c04b6cSmrg  _LT_COMPILER_NO_RTTI($1)
868289c04b6cSmrg  _LT_COMPILER_PIC($1)
868389c04b6cSmrg  _LT_COMPILER_C_O($1)
868489c04b6cSmrg  _LT_COMPILER_FILE_LOCKS($1)
868589c04b6cSmrg  _LT_LINKER_SHLIBS($1)
868689c04b6cSmrg  _LT_LINKER_HARDCODE_LIBPATH($1)
868789c04b6cSmrg
868889c04b6cSmrg  _LT_CONFIG($1)
868989c04b6cSmrgfi
869089c04b6cSmrg
869189c04b6cSmrgAC_LANG_RESTORE
869289c04b6cSmrg
869389c04b6cSmrgGCC=$lt_save_GCC
869489c04b6cSmrgCC=$lt_save_CC
869589c04b6cSmrgCFLAGS=$lt_save_CFLAGS
869689c04b6cSmrg])# _LT_LANG_GO_CONFIG
869789c04b6cSmrg
869889c04b6cSmrg
86996fae4e5dSmrg# _LT_LANG_RC_CONFIG([TAG])
87006fae4e5dSmrg# -------------------------
87016fae4e5dSmrg# Ensure that the configuration variables for the Windows resource compiler
87026fae4e5dSmrg# are suitably defined.  These variables are subsequently used by _LT_CONFIG
87036fae4e5dSmrg# to write the compiler configuration to `libtool'.
87046fae4e5dSmrgm4_defun([_LT_LANG_RC_CONFIG],
87056fae4e5dSmrg[AC_REQUIRE([LT_PROG_RC])dnl
87066fae4e5dSmrgAC_LANG_SAVE
87071f0ac6a5Smrg
87086fae4e5dSmrg# Source file extension for RC test sources.
87096fae4e5dSmrgac_ext=rc
87101f0ac6a5Smrg
87116fae4e5dSmrg# Object file extension for compiled RC test sources.
87126fae4e5dSmrgobjext=o
87136fae4e5dSmrg_LT_TAGVAR(objext, $1)=$objext
87141f0ac6a5Smrg
87156fae4e5dSmrg# Code to be used in simple compile tests
87166fae4e5dSmrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
87171f0ac6a5Smrg
87186fae4e5dSmrg# Code to be used in simple link tests
87196fae4e5dSmrglt_simple_link_test_code="$lt_simple_compile_test_code"
87209c9ff80cSmrg
87216fae4e5dSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
87226fae4e5dSmrg_LT_TAG_COMPILER
87239c9ff80cSmrg
87246fae4e5dSmrg# save warnings/boilerplate of simple test code
87256fae4e5dSmrg_LT_COMPILER_BOILERPLATE
87266fae4e5dSmrg_LT_LINKER_BOILERPLATE
87279c9ff80cSmrg
87286fae4e5dSmrg# Allow CC to be a program name with arguments.
87296fae4e5dSmrglt_save_CC="$CC"
87306fae4e5dSmrglt_save_CFLAGS=$CFLAGS
87316fae4e5dSmrglt_save_GCC=$GCC
87326fae4e5dSmrgGCC=
87336fae4e5dSmrgCC=${RC-"windres"}
87346fae4e5dSmrgCFLAGS=
87356fae4e5dSmrgcompiler=$CC
87366fae4e5dSmrg_LT_TAGVAR(compiler, $1)=$CC
87376fae4e5dSmrg_LT_CC_BASENAME([$compiler])
87386fae4e5dSmrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
87399c9ff80cSmrg
87406fae4e5dSmrgif test -n "$compiler"; then
87416fae4e5dSmrg  :
87426fae4e5dSmrg  _LT_CONFIG($1)
87436fae4e5dSmrgfi
87441f0ac6a5Smrg
87456fae4e5dSmrgGCC=$lt_save_GCC
87466fae4e5dSmrgAC_LANG_RESTORE
87476fae4e5dSmrgCC=$lt_save_CC
87486fae4e5dSmrgCFLAGS=$lt_save_CFLAGS
87496fae4e5dSmrg])# _LT_LANG_RC_CONFIG
87501f0ac6a5Smrg
87511f0ac6a5Smrg
87526fae4e5dSmrg# LT_PROG_GCJ
87536fae4e5dSmrg# -----------
87546fae4e5dSmrgAC_DEFUN([LT_PROG_GCJ],
87556fae4e5dSmrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
87566fae4e5dSmrg  [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
87576fae4e5dSmrg    [AC_CHECK_TOOL(GCJ, gcj,)
87586fae4e5dSmrg      test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
87596fae4e5dSmrg      AC_SUBST(GCJFLAGS)])])[]dnl
87606fae4e5dSmrg])
87611f0ac6a5Smrg
87626fae4e5dSmrg# Old name:
87636fae4e5dSmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
87646fae4e5dSmrgdnl aclocal-1.4 backwards compatibility:
87656fae4e5dSmrgdnl AC_DEFUN([LT_AC_PROG_GCJ], [])
87666fae4e5dSmrg
87676fae4e5dSmrg
876889c04b6cSmrg# LT_PROG_GO
876989c04b6cSmrg# ----------
877089c04b6cSmrgAC_DEFUN([LT_PROG_GO],
877189c04b6cSmrg[AC_CHECK_TOOL(GOC, gccgo,)
877289c04b6cSmrg])
877389c04b6cSmrg
877489c04b6cSmrg
87756fae4e5dSmrg# LT_PROG_RC
87766fae4e5dSmrg# ----------
87776fae4e5dSmrgAC_DEFUN([LT_PROG_RC],
87786fae4e5dSmrg[AC_CHECK_TOOL(RC, windres,)
87791f0ac6a5Smrg])
87801f0ac6a5Smrg
87816fae4e5dSmrg# Old name:
87826fae4e5dSmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
87836fae4e5dSmrgdnl aclocal-1.4 backwards compatibility:
87846fae4e5dSmrgdnl AC_DEFUN([LT_AC_PROG_RC], [])
87851f0ac6a5Smrg
87861f0ac6a5Smrg
87876fae4e5dSmrg# _LT_DECL_EGREP
87886fae4e5dSmrg# --------------
87896fae4e5dSmrg# If we don't have a new enough Autoconf to choose the best grep
87906fae4e5dSmrg# available, choose the one first in the user's PATH.
87916fae4e5dSmrgm4_defun([_LT_DECL_EGREP],
87926fae4e5dSmrg[AC_REQUIRE([AC_PROG_EGREP])dnl
87936fae4e5dSmrgAC_REQUIRE([AC_PROG_FGREP])dnl
87946fae4e5dSmrgtest -z "$GREP" && GREP=grep
87956fae4e5dSmrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines])
87966fae4e5dSmrg_LT_DECL([], [EGREP], [1], [An ERE matcher])
87976fae4e5dSmrg_LT_DECL([], [FGREP], [1], [A literal string matcher])
87986fae4e5dSmrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
87996fae4e5dSmrgAC_SUBST([GREP])
88006fae4e5dSmrg])
88011f0ac6a5Smrg
88021f0ac6a5Smrg
88036fae4e5dSmrg# _LT_DECL_OBJDUMP
88046fae4e5dSmrg# --------------
88056fae4e5dSmrg# If we don't have a new enough Autoconf to choose the best objdump
88066fae4e5dSmrg# available, choose the one first in the user's PATH.
88076fae4e5dSmrgm4_defun([_LT_DECL_OBJDUMP],
88086fae4e5dSmrg[AC_CHECK_TOOL(OBJDUMP, objdump, false)
88096fae4e5dSmrgtest -z "$OBJDUMP" && OBJDUMP=objdump
88106fae4e5dSmrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
88116fae4e5dSmrgAC_SUBST([OBJDUMP])
88126fae4e5dSmrg])
88136fae4e5dSmrg
88146fae4e5dSmrg# _LT_DECL_DLLTOOL
88156fae4e5dSmrg# ----------------
88166fae4e5dSmrg# Ensure DLLTOOL variable is set.
88176fae4e5dSmrgm4_defun([_LT_DECL_DLLTOOL],
88186fae4e5dSmrg[AC_CHECK_TOOL(DLLTOOL, dlltool, false)
88196fae4e5dSmrgtest -z "$DLLTOOL" && DLLTOOL=dlltool
88206fae4e5dSmrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program])
88216fae4e5dSmrgAC_SUBST([DLLTOOL])
88226fae4e5dSmrg])
88239c9ff80cSmrg
88246fae4e5dSmrg# _LT_DECL_SED
88256fae4e5dSmrg# ------------
88266fae4e5dSmrg# Check for a fully-functional sed program, that truncates
88276fae4e5dSmrg# as few characters as possible.  Prefer GNU sed if found.
88286fae4e5dSmrgm4_defun([_LT_DECL_SED],
88296fae4e5dSmrg[AC_PROG_SED
88306fae4e5dSmrgtest -z "$SED" && SED=sed
88316fae4e5dSmrgXsed="$SED -e 1s/^X//"
88326fae4e5dSmrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output])
88336fae4e5dSmrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
88346fae4e5dSmrg    [Sed that helps us avoid accidentally triggering echo(1) options like -n])
88356fae4e5dSmrg])# _LT_DECL_SED
88361f0ac6a5Smrg
88376fae4e5dSmrgm4_ifndef([AC_PROG_SED], [
88386fae4e5dSmrg# NOTE: This macro has been submitted for inclusion into   #
88396fae4e5dSmrg#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
88406fae4e5dSmrg#  a released version of Autoconf we should remove this    #
88416fae4e5dSmrg#  macro and use it instead.                               #
88421f0ac6a5Smrg
88436fae4e5dSmrgm4_defun([AC_PROG_SED],
88446fae4e5dSmrg[AC_MSG_CHECKING([for a sed that does not truncate output])
88456fae4e5dSmrgAC_CACHE_VAL(lt_cv_path_SED,
88466fae4e5dSmrg[# Loop through the user's path and test for sed and gsed.
88476fae4e5dSmrg# Then use that list of sed's as ones to test for truncation.
88486fae4e5dSmrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
88496fae4e5dSmrgfor as_dir in $PATH
88506fae4e5dSmrgdo
88516fae4e5dSmrg  IFS=$as_save_IFS
88526fae4e5dSmrg  test -z "$as_dir" && as_dir=.
88536fae4e5dSmrg  for lt_ac_prog in sed gsed; do
88546fae4e5dSmrg    for ac_exec_ext in '' $ac_executable_extensions; do
88556fae4e5dSmrg      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
88566fae4e5dSmrg        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
88576fae4e5dSmrg      fi
88586fae4e5dSmrg    done
88596fae4e5dSmrg  done
88606fae4e5dSmrgdone
88616fae4e5dSmrgIFS=$as_save_IFS
88626fae4e5dSmrglt_ac_max=0
88636fae4e5dSmrglt_ac_count=0
88646fae4e5dSmrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris
88656fae4e5dSmrg# along with /bin/sed that truncates output.
88666fae4e5dSmrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
88676fae4e5dSmrg  test ! -f $lt_ac_sed && continue
88686fae4e5dSmrg  cat /dev/null > conftest.in
88696fae4e5dSmrg  lt_ac_count=0
88706fae4e5dSmrg  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
88716fae4e5dSmrg  # Check for GNU sed and select it if it is found.
88726fae4e5dSmrg  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
88736fae4e5dSmrg    lt_cv_path_SED=$lt_ac_sed
88746fae4e5dSmrg    break
88756fae4e5dSmrg  fi
88766fae4e5dSmrg  while true; do
88776fae4e5dSmrg    cat conftest.in conftest.in >conftest.tmp
88786fae4e5dSmrg    mv conftest.tmp conftest.in
88796fae4e5dSmrg    cp conftest.in conftest.nl
88806fae4e5dSmrg    echo >>conftest.nl
88816fae4e5dSmrg    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
88826fae4e5dSmrg    cmp -s conftest.out conftest.nl || break
88836fae4e5dSmrg    # 10000 chars as input seems more than enough
88846fae4e5dSmrg    test $lt_ac_count -gt 10 && break
88856fae4e5dSmrg    lt_ac_count=`expr $lt_ac_count + 1`
88866fae4e5dSmrg    if test $lt_ac_count -gt $lt_ac_max; then
88876fae4e5dSmrg      lt_ac_max=$lt_ac_count
88886fae4e5dSmrg      lt_cv_path_SED=$lt_ac_sed
88896fae4e5dSmrg    fi
88909c9ff80cSmrg  done
88916fae4e5dSmrgdone
88926fae4e5dSmrg])
88936fae4e5dSmrgSED=$lt_cv_path_SED
88946fae4e5dSmrgAC_SUBST([SED])
88956fae4e5dSmrgAC_MSG_RESULT([$SED])
88966fae4e5dSmrg])#AC_PROG_SED
88976fae4e5dSmrg])#m4_ifndef
88981f0ac6a5Smrg
88996fae4e5dSmrg# Old name:
89006fae4e5dSmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
89016fae4e5dSmrgdnl aclocal-1.4 backwards compatibility:
89026fae4e5dSmrgdnl AC_DEFUN([LT_AC_PROG_SED], [])
89031f0ac6a5Smrg
89041f0ac6a5Smrg
89056fae4e5dSmrg# _LT_CHECK_SHELL_FEATURES
89066fae4e5dSmrg# ------------------------
89076fae4e5dSmrg# Find out whether the shell is Bourne or XSI compatible,
89086fae4e5dSmrg# or has some other useful features.
89096fae4e5dSmrgm4_defun([_LT_CHECK_SHELL_FEATURES],
89106fae4e5dSmrg[AC_MSG_CHECKING([whether the shell understands some XSI constructs])
89116fae4e5dSmrg# Try some XSI features
89126fae4e5dSmrgxsi_shell=no
89136fae4e5dSmrg( _lt_dummy="a/b/c"
89146fae4e5dSmrg  test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
89156fae4e5dSmrg      = c,a/b,b/c, \
89166fae4e5dSmrg    && eval 'test $(( 1 + 1 )) -eq 2 \
89176fae4e5dSmrg    && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
89186fae4e5dSmrg  && xsi_shell=yes
89196fae4e5dSmrgAC_MSG_RESULT([$xsi_shell])
89206fae4e5dSmrg_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
89211f0ac6a5Smrg
89226fae4e5dSmrgAC_MSG_CHECKING([whether the shell understands "+="])
89236fae4e5dSmrglt_shell_append=no
89246fae4e5dSmrg( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
89256fae4e5dSmrg    >/dev/null 2>&1 \
89266fae4e5dSmrg  && lt_shell_append=yes
89276fae4e5dSmrgAC_MSG_RESULT([$lt_shell_append])
89286fae4e5dSmrg_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
89291f0ac6a5Smrg
89306fae4e5dSmrgif ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
89316fae4e5dSmrg  lt_unset=unset
89326fae4e5dSmrgelse
89336fae4e5dSmrg  lt_unset=false
89346fae4e5dSmrgfi
89356fae4e5dSmrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
89361f0ac6a5Smrg
89376fae4e5dSmrg# test EBCDIC or ASCII
89386fae4e5dSmrgcase `echo X|tr X '\101'` in
89396fae4e5dSmrg A) # ASCII based system
89406fae4e5dSmrg    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
89416fae4e5dSmrg  lt_SP2NL='tr \040 \012'
89426fae4e5dSmrg  lt_NL2SP='tr \015\012 \040\040'
89439c9ff80cSmrg  ;;
89446fae4e5dSmrg *) # EBCDIC based system
89456fae4e5dSmrg  lt_SP2NL='tr \100 \n'
89466fae4e5dSmrg  lt_NL2SP='tr \r\n \100\100'
89479c9ff80cSmrg  ;;
89489c9ff80cSmrgesac
89496fae4e5dSmrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
89506fae4e5dSmrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
89516fae4e5dSmrg])# _LT_CHECK_SHELL_FEATURES
89529c9ff80cSmrg
89539c9ff80cSmrg
89546fae4e5dSmrg# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY)
89556fae4e5dSmrg# ------------------------------------------------------
89566fae4e5dSmrg# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and
89576fae4e5dSmrg# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY.
89586fae4e5dSmrgm4_defun([_LT_PROG_FUNCTION_REPLACE],
89596fae4e5dSmrg[dnl {
89606fae4e5dSmrgsed -e '/^$1 ()$/,/^} # $1 /c\
89616fae4e5dSmrg$1 ()\
89626fae4e5dSmrg{\
89636fae4e5dSmrgm4_bpatsubsts([$2], [$], [\\], [^\([	 ]\)], [\\\1])
89646fae4e5dSmrg} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \
89656fae4e5dSmrg  && mv -f "$cfgfile.tmp" "$cfgfile" \
89666fae4e5dSmrg    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
89676fae4e5dSmrgtest 0 -eq $? || _lt_function_replace_fail=:
89686fae4e5dSmrg])
89691f0ac6a5Smrg
89701f0ac6a5Smrg
89716fae4e5dSmrg# _LT_PROG_REPLACE_SHELLFNS
89726fae4e5dSmrg# -------------------------
89736fae4e5dSmrg# Replace existing portable implementations of several shell functions with
89746fae4e5dSmrg# equivalent extended shell implementations where those features are available..
89756fae4e5dSmrgm4_defun([_LT_PROG_REPLACE_SHELLFNS],
89766fae4e5dSmrg[if test x"$xsi_shell" = xyes; then
89776fae4e5dSmrg  _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl
89786fae4e5dSmrg    case ${1} in
89796fae4e5dSmrg      */*) func_dirname_result="${1%/*}${2}" ;;
89806fae4e5dSmrg      *  ) func_dirname_result="${3}" ;;
89816fae4e5dSmrg    esac])
89826fae4e5dSmrg
89836fae4e5dSmrg  _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl
89846fae4e5dSmrg    func_basename_result="${1##*/}"])
89856fae4e5dSmrg
89866fae4e5dSmrg  _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl
89876fae4e5dSmrg    case ${1} in
89886fae4e5dSmrg      */*) func_dirname_result="${1%/*}${2}" ;;
89896fae4e5dSmrg      *  ) func_dirname_result="${3}" ;;
89906fae4e5dSmrg    esac
89916fae4e5dSmrg    func_basename_result="${1##*/}"])
89921f0ac6a5Smrg
89936fae4e5dSmrg  _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl
89946fae4e5dSmrg    # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
89956fae4e5dSmrg    # positional parameters, so assign one to ordinary parameter first.
89966fae4e5dSmrg    func_stripname_result=${3}
89976fae4e5dSmrg    func_stripname_result=${func_stripname_result#"${1}"}
89986fae4e5dSmrg    func_stripname_result=${func_stripname_result%"${2}"}])
89999c9ff80cSmrg
90006fae4e5dSmrg  _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl
90016fae4e5dSmrg    func_split_long_opt_name=${1%%=*}
90026fae4e5dSmrg    func_split_long_opt_arg=${1#*=}])
90039c9ff80cSmrg
90046fae4e5dSmrg  _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl
90056fae4e5dSmrg    func_split_short_opt_arg=${1#??}
90066fae4e5dSmrg    func_split_short_opt_name=${1%"$func_split_short_opt_arg"}])
90079c9ff80cSmrg
90086fae4e5dSmrg  _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl
90096fae4e5dSmrg    case ${1} in
90106fae4e5dSmrg      *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
90116fae4e5dSmrg      *)    func_lo2o_result=${1} ;;
90126fae4e5dSmrg    esac])
90139c9ff80cSmrg
90146fae4e5dSmrg  _LT_PROG_FUNCTION_REPLACE([func_xform], [    func_xform_result=${1%.*}.lo])
90159c9ff80cSmrg
90166fae4e5dSmrg  _LT_PROG_FUNCTION_REPLACE([func_arith], [    func_arith_result=$(( $[*] ))])
90179c9ff80cSmrg
90186fae4e5dSmrg  _LT_PROG_FUNCTION_REPLACE([func_len], [    func_len_result=${#1}])
90196fae4e5dSmrgfi
90209c9ff80cSmrg
90216fae4e5dSmrgif test x"$lt_shell_append" = xyes; then
90226fae4e5dSmrg  _LT_PROG_FUNCTION_REPLACE([func_append], [    eval "${1}+=\\${2}"])
90239c9ff80cSmrg
90246fae4e5dSmrg  _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl
90256fae4e5dSmrg    func_quote_for_eval "${2}"
90266fae4e5dSmrgdnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \
90276fae4e5dSmrg    eval "${1}+=\\\\ \\$func_quote_for_eval_result"])
90289c9ff80cSmrg
90296fae4e5dSmrg  # Save a `func_append' function call where possible by direct use of '+='
90306fae4e5dSmrg  sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
90316fae4e5dSmrg    && mv -f "$cfgfile.tmp" "$cfgfile" \
90326fae4e5dSmrg      || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
90336fae4e5dSmrg  test 0 -eq $? || _lt_function_replace_fail=:
90346fae4e5dSmrgelse
90356fae4e5dSmrg  # Save a `func_append' function call even when '+=' is not available
90366fae4e5dSmrg  sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
90376fae4e5dSmrg    && mv -f "$cfgfile.tmp" "$cfgfile" \
90386fae4e5dSmrg      || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
90396fae4e5dSmrg  test 0 -eq $? || _lt_function_replace_fail=:
90406fae4e5dSmrgfi
90419c9ff80cSmrg
90426fae4e5dSmrgif test x"$_lt_function_replace_fail" = x":"; then
90436fae4e5dSmrg  AC_MSG_WARN([Unable to substitute extended shell functions in $ofile])
90446fae4e5dSmrgfi
90456fae4e5dSmrg])
90466fae4e5dSmrg
90476fae4e5dSmrg# _LT_PATH_CONVERSION_FUNCTIONS
90486fae4e5dSmrg# -----------------------------
90496fae4e5dSmrg# Determine which file name conversion functions should be used by
90506fae4e5dSmrg# func_to_host_file (and, implicitly, by func_to_host_path).  These are needed
90516fae4e5dSmrg# for certain cross-compile configurations and native mingw.
90526fae4e5dSmrgm4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
90536fae4e5dSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
90546fae4e5dSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl
90556fae4e5dSmrgAC_MSG_CHECKING([how to convert $build file names to $host format])
90566fae4e5dSmrgAC_CACHE_VAL(lt_cv_to_host_file_cmd,
90576fae4e5dSmrg[case $host in
90586fae4e5dSmrg  *-*-mingw* )
90596fae4e5dSmrg    case $build in
90606fae4e5dSmrg      *-*-mingw* ) # actually msys
90616fae4e5dSmrg        lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
90621f0ac6a5Smrg        ;;
90636fae4e5dSmrg      *-*-cygwin* )
90646fae4e5dSmrg        lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
90656fae4e5dSmrg        ;;
90666fae4e5dSmrg      * ) # otherwise, assume *nix
90676fae4e5dSmrg        lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
90681f0ac6a5Smrg        ;;
90699c9ff80cSmrg    esac
90706fae4e5dSmrg    ;;
90716fae4e5dSmrg  *-*-cygwin* )
90726fae4e5dSmrg    case $build in
90736fae4e5dSmrg      *-*-mingw* ) # actually msys
90746fae4e5dSmrg        lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
90756fae4e5dSmrg        ;;
90766fae4e5dSmrg      *-*-cygwin* )
90776fae4e5dSmrg        lt_cv_to_host_file_cmd=func_convert_file_noop
90786fae4e5dSmrg        ;;
90796fae4e5dSmrg      * ) # otherwise, assume *nix
90806fae4e5dSmrg        lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
90816fae4e5dSmrg        ;;
90826fae4e5dSmrg    esac
90836fae4e5dSmrg    ;;
90846fae4e5dSmrg  * ) # unhandled hosts (and "normal" native builds)
90856fae4e5dSmrg    lt_cv_to_host_file_cmd=func_convert_file_noop
90866fae4e5dSmrg    ;;
90876fae4e5dSmrgesac
90886fae4e5dSmrg])
90896fae4e5dSmrgto_host_file_cmd=$lt_cv_to_host_file_cmd
90906fae4e5dSmrgAC_MSG_RESULT([$lt_cv_to_host_file_cmd])
90916fae4e5dSmrg_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
90926fae4e5dSmrg         [0], [convert $build file names to $host format])dnl
90936fae4e5dSmrg
90946fae4e5dSmrgAC_MSG_CHECKING([how to convert $build file names to toolchain format])
90956fae4e5dSmrgAC_CACHE_VAL(lt_cv_to_tool_file_cmd,
90966fae4e5dSmrg[#assume ordinary cross tools, or native build.
90976fae4e5dSmrglt_cv_to_tool_file_cmd=func_convert_file_noop
90986fae4e5dSmrgcase $host in
90996fae4e5dSmrg  *-*-mingw* )
91006fae4e5dSmrg    case $build in
91016fae4e5dSmrg      *-*-mingw* ) # actually msys
91026fae4e5dSmrg        lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
91036fae4e5dSmrg        ;;
91046fae4e5dSmrg    esac
91056fae4e5dSmrg    ;;
91066fae4e5dSmrgesac
91076fae4e5dSmrg])
91086fae4e5dSmrgto_tool_file_cmd=$lt_cv_to_tool_file_cmd
91096fae4e5dSmrgAC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
91106fae4e5dSmrg_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
91116fae4e5dSmrg         [0], [convert $build files to toolchain format])dnl
91126fae4e5dSmrg])# _LT_PATH_CONVERSION_FUNCTIONS
91139c9ff80cSmrg
91146fae4e5dSmrg# Helper functions for option handling.                    -*- Autoconf -*-
91156fae4e5dSmrg#
91166fae4e5dSmrg#   Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation,
91176fae4e5dSmrg#   Inc.
91186fae4e5dSmrg#   Written by Gary V. Vaughan, 2004
91196fae4e5dSmrg#
91206fae4e5dSmrg# This file is free software; the Free Software Foundation gives
91216fae4e5dSmrg# unlimited permission to copy and/or distribute it, with or without
91226fae4e5dSmrg# modifications, as long as this notice is preserved.
91239c9ff80cSmrg
91246fae4e5dSmrg# serial 7 ltoptions.m4
91259c9ff80cSmrg
91266fae4e5dSmrg# This is to help aclocal find these macros, as it can't see m4_define.
91276fae4e5dSmrgAC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
91289c9ff80cSmrg
91299c9ff80cSmrg
91306fae4e5dSmrg# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
91316fae4e5dSmrg# ------------------------------------------
91326fae4e5dSmrgm4_define([_LT_MANGLE_OPTION],
91336fae4e5dSmrg[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
91349c9ff80cSmrg
91359c9ff80cSmrg
91366fae4e5dSmrg# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
91376fae4e5dSmrg# ---------------------------------------
91386fae4e5dSmrg# Set option OPTION-NAME for macro MACRO-NAME, and if there is a
91396fae4e5dSmrg# matching handler defined, dispatch to it.  Other OPTION-NAMEs are
91406fae4e5dSmrg# saved as a flag.
91416fae4e5dSmrgm4_define([_LT_SET_OPTION],
91426fae4e5dSmrg[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
91436fae4e5dSmrgm4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
91446fae4e5dSmrg        _LT_MANGLE_DEFUN([$1], [$2]),
91456fae4e5dSmrg    [m4_warning([Unknown $1 option `$2'])])[]dnl
91466fae4e5dSmrg])
91479c9ff80cSmrg
91489c9ff80cSmrg
91496fae4e5dSmrg# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
91506fae4e5dSmrg# ------------------------------------------------------------
91516fae4e5dSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
91526fae4e5dSmrgm4_define([_LT_IF_OPTION],
91536fae4e5dSmrg[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
91549c9ff80cSmrg
91559c9ff80cSmrg
91566fae4e5dSmrg# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
91576fae4e5dSmrg# -------------------------------------------------------
91586fae4e5dSmrg# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
91596fae4e5dSmrg# are set.
91606fae4e5dSmrgm4_define([_LT_UNLESS_OPTIONS],
91616fae4e5dSmrg[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
91626fae4e5dSmrg	    [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
91636fae4e5dSmrg		      [m4_define([$0_found])])])[]dnl
91646fae4e5dSmrgm4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
91656fae4e5dSmrg])[]dnl
91666fae4e5dSmrg])
91679c9ff80cSmrg
91689c9ff80cSmrg
91696fae4e5dSmrg# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
91706fae4e5dSmrg# ----------------------------------------
91716fae4e5dSmrg# OPTION-LIST is a space-separated list of Libtool options associated
91726fae4e5dSmrg# with MACRO-NAME.  If any OPTION has a matching handler declared with
91736fae4e5dSmrg# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
91746fae4e5dSmrg# the unknown option and exit.
91756fae4e5dSmrgm4_defun([_LT_SET_OPTIONS],
91766fae4e5dSmrg[# Set options
91776fae4e5dSmrgm4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
91786fae4e5dSmrg    [_LT_SET_OPTION([$1], _LT_Option)])
91799c9ff80cSmrg
91806fae4e5dSmrgm4_if([$1],[LT_INIT],[
91816fae4e5dSmrg  dnl
91826fae4e5dSmrg  dnl Simply set some default values (i.e off) if boolean options were not
91836fae4e5dSmrg  dnl specified:
91846fae4e5dSmrg  _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
91856fae4e5dSmrg  ])
91866fae4e5dSmrg  _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
91876fae4e5dSmrg  ])
91886fae4e5dSmrg  dnl
91896fae4e5dSmrg  dnl If no reference was made to various pairs of opposing options, then
91906fae4e5dSmrg  dnl we run the default mode handler for the pair.  For example, if neither
91916fae4e5dSmrg  dnl `shared' nor `disable-shared' was passed, we enable building of shared
91926fae4e5dSmrg  dnl archives by default:
91936fae4e5dSmrg  _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
91946fae4e5dSmrg  _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
91956fae4e5dSmrg  _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
91966fae4e5dSmrg  _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
91976fae4e5dSmrg  		   [_LT_ENABLE_FAST_INSTALL])
91986fae4e5dSmrg  ])
91996fae4e5dSmrg])# _LT_SET_OPTIONS
92009c9ff80cSmrg
92019c9ff80cSmrg
92029c9ff80cSmrg
92036fae4e5dSmrg# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
92046fae4e5dSmrg# -----------------------------------------
92056fae4e5dSmrgm4_define([_LT_MANGLE_DEFUN],
92066fae4e5dSmrg[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
92079c9ff80cSmrg
92089c9ff80cSmrg
92096fae4e5dSmrg# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
92106fae4e5dSmrg# -----------------------------------------------
92116fae4e5dSmrgm4_define([LT_OPTION_DEFINE],
92126fae4e5dSmrg[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
92136fae4e5dSmrg])# LT_OPTION_DEFINE
92149c9ff80cSmrg
92159c9ff80cSmrg
92166fae4e5dSmrg# dlopen
92176fae4e5dSmrg# ------
92186fae4e5dSmrgLT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
92196fae4e5dSmrg])
92206fae4e5dSmrg
92216fae4e5dSmrgAU_DEFUN([AC_LIBTOOL_DLOPEN],
92226fae4e5dSmrg[_LT_SET_OPTION([LT_INIT], [dlopen])
92236fae4e5dSmrgAC_DIAGNOSE([obsolete],
92246fae4e5dSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you
92256fae4e5dSmrgput the `dlopen' option into LT_INIT's first parameter.])
92266fae4e5dSmrg])
92276fae4e5dSmrg
92286fae4e5dSmrgdnl aclocal-1.4 backwards compatibility:
92296fae4e5dSmrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
92309c9ff80cSmrg
92319c9ff80cSmrg
92326fae4e5dSmrg# win32-dll
92336fae4e5dSmrg# ---------
92346fae4e5dSmrg# Declare package support for building win32 dll's.
92356fae4e5dSmrgLT_OPTION_DEFINE([LT_INIT], [win32-dll],
92366fae4e5dSmrg[enable_win32_dll=yes
92379c9ff80cSmrg
92386fae4e5dSmrgcase $host in
92396fae4e5dSmrg*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
92406fae4e5dSmrg  AC_CHECK_TOOL(AS, as, false)
92416fae4e5dSmrg  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
92426fae4e5dSmrg  AC_CHECK_TOOL(OBJDUMP, objdump, false)
92436fae4e5dSmrg  ;;
92446fae4e5dSmrgesac
92459c9ff80cSmrg
92466fae4e5dSmrgtest -z "$AS" && AS=as
92476fae4e5dSmrg_LT_DECL([], [AS],      [1], [Assembler program])dnl
92489c9ff80cSmrg
92496fae4e5dSmrgtest -z "$DLLTOOL" && DLLTOOL=dlltool
92506fae4e5dSmrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl
92519c9ff80cSmrg
92526fae4e5dSmrgtest -z "$OBJDUMP" && OBJDUMP=objdump
92536fae4e5dSmrg_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl
92546fae4e5dSmrg])# win32-dll
92559c9ff80cSmrg
92566fae4e5dSmrgAU_DEFUN([AC_LIBTOOL_WIN32_DLL],
92576fae4e5dSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
92586fae4e5dSmrg_LT_SET_OPTION([LT_INIT], [win32-dll])
92596fae4e5dSmrgAC_DIAGNOSE([obsolete],
92606fae4e5dSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you
92616fae4e5dSmrgput the `win32-dll' option into LT_INIT's first parameter.])
92626fae4e5dSmrg])
92639c9ff80cSmrg
92646fae4e5dSmrgdnl aclocal-1.4 backwards compatibility:
92656fae4e5dSmrgdnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
92669c9ff80cSmrg
92679c9ff80cSmrg
92686fae4e5dSmrg# _LT_ENABLE_SHARED([DEFAULT])
92696fae4e5dSmrg# ----------------------------
92706fae4e5dSmrg# implement the --enable-shared flag, and supports the `shared' and
92716fae4e5dSmrg# `disable-shared' LT_INIT options.
92726fae4e5dSmrg# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
92736fae4e5dSmrgm4_define([_LT_ENABLE_SHARED],
92746fae4e5dSmrg[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
92756fae4e5dSmrgAC_ARG_ENABLE([shared],
92766fae4e5dSmrg    [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
92776fae4e5dSmrg	[build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
92786fae4e5dSmrg    [p=${PACKAGE-default}
92796fae4e5dSmrg    case $enableval in
92806fae4e5dSmrg    yes) enable_shared=yes ;;
92816fae4e5dSmrg    no) enable_shared=no ;;
92826fae4e5dSmrg    *)
92836fae4e5dSmrg      enable_shared=no
92846fae4e5dSmrg      # Look at the argument we got.  We use all the common list separators.
92856fae4e5dSmrg      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
92866fae4e5dSmrg      for pkg in $enableval; do
92876fae4e5dSmrg	IFS="$lt_save_ifs"
92886fae4e5dSmrg	if test "X$pkg" = "X$p"; then
92896fae4e5dSmrg	  enable_shared=yes
92906fae4e5dSmrg	fi
92916fae4e5dSmrg      done
92926fae4e5dSmrg      IFS="$lt_save_ifs"
92936fae4e5dSmrg      ;;
92946fae4e5dSmrg    esac],
92956fae4e5dSmrg    [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
92969c9ff80cSmrg
92976fae4e5dSmrg    _LT_DECL([build_libtool_libs], [enable_shared], [0],
92986fae4e5dSmrg	[Whether or not to build shared libraries])
92996fae4e5dSmrg])# _LT_ENABLE_SHARED
93009c9ff80cSmrg
93016fae4e5dSmrgLT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
93026fae4e5dSmrgLT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
93039c9ff80cSmrg
93046fae4e5dSmrg# Old names:
93056fae4e5dSmrgAC_DEFUN([AC_ENABLE_SHARED],
93066fae4e5dSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
93076fae4e5dSmrg])
93089c9ff80cSmrg
93096fae4e5dSmrgAC_DEFUN([AC_DISABLE_SHARED],
93106fae4e5dSmrg[_LT_SET_OPTION([LT_INIT], [disable-shared])
93116fae4e5dSmrg])
93129c9ff80cSmrg
93136fae4e5dSmrgAU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
93146fae4e5dSmrgAU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
93159c9ff80cSmrg
93166fae4e5dSmrgdnl aclocal-1.4 backwards compatibility:
93176fae4e5dSmrgdnl AC_DEFUN([AM_ENABLE_SHARED], [])
93186fae4e5dSmrgdnl AC_DEFUN([AM_DISABLE_SHARED], [])
93199c9ff80cSmrg
93201f0ac6a5Smrg
93211f0ac6a5Smrg
93226fae4e5dSmrg# _LT_ENABLE_STATIC([DEFAULT])
93236fae4e5dSmrg# ----------------------------
93246fae4e5dSmrg# implement the --enable-static flag, and support the `static' and
93256fae4e5dSmrg# `disable-static' LT_INIT options.
93266fae4e5dSmrg# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
93276fae4e5dSmrgm4_define([_LT_ENABLE_STATIC],
93286fae4e5dSmrg[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
93296fae4e5dSmrgAC_ARG_ENABLE([static],
93306fae4e5dSmrg    [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
93316fae4e5dSmrg	[build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
93326fae4e5dSmrg    [p=${PACKAGE-default}
93336fae4e5dSmrg    case $enableval in
93346fae4e5dSmrg    yes) enable_static=yes ;;
93356fae4e5dSmrg    no) enable_static=no ;;
93366fae4e5dSmrg    *)
93376fae4e5dSmrg     enable_static=no
93386fae4e5dSmrg      # Look at the argument we got.  We use all the common list separators.
93396fae4e5dSmrg      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
93406fae4e5dSmrg      for pkg in $enableval; do
93416fae4e5dSmrg	IFS="$lt_save_ifs"
93426fae4e5dSmrg	if test "X$pkg" = "X$p"; then
93436fae4e5dSmrg	  enable_static=yes
93446fae4e5dSmrg	fi
93456fae4e5dSmrg      done
93466fae4e5dSmrg      IFS="$lt_save_ifs"
93476fae4e5dSmrg      ;;
93486fae4e5dSmrg    esac],
93496fae4e5dSmrg    [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
9350e5410a46Smrg
93516fae4e5dSmrg    _LT_DECL([build_old_libs], [enable_static], [0],
93526fae4e5dSmrg	[Whether or not to build static libraries])
93536fae4e5dSmrg])# _LT_ENABLE_STATIC
93541f0ac6a5Smrg
93556fae4e5dSmrgLT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
93566fae4e5dSmrgLT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
93571f0ac6a5Smrg
93586fae4e5dSmrg# Old names:
93596fae4e5dSmrgAC_DEFUN([AC_ENABLE_STATIC],
93606fae4e5dSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
93616fae4e5dSmrg])
93621f0ac6a5Smrg
93636fae4e5dSmrgAC_DEFUN([AC_DISABLE_STATIC],
93646fae4e5dSmrg[_LT_SET_OPTION([LT_INIT], [disable-static])
93656fae4e5dSmrg])
93661f0ac6a5Smrg
93676fae4e5dSmrgAU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
93686fae4e5dSmrgAU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
93691f0ac6a5Smrg
93706fae4e5dSmrgdnl aclocal-1.4 backwards compatibility:
93716fae4e5dSmrgdnl AC_DEFUN([AM_ENABLE_STATIC], [])
93726fae4e5dSmrgdnl AC_DEFUN([AM_DISABLE_STATIC], [])
93731f0ac6a5Smrg
93741f0ac6a5Smrg
93751f0ac6a5Smrg
93766fae4e5dSmrg# _LT_ENABLE_FAST_INSTALL([DEFAULT])
93776fae4e5dSmrg# ----------------------------------
93786fae4e5dSmrg# implement the --enable-fast-install flag, and support the `fast-install'
93796fae4e5dSmrg# and `disable-fast-install' LT_INIT options.
93806fae4e5dSmrg# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
93816fae4e5dSmrgm4_define([_LT_ENABLE_FAST_INSTALL],
93826fae4e5dSmrg[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
93836fae4e5dSmrgAC_ARG_ENABLE([fast-install],
93846fae4e5dSmrg    [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
93856fae4e5dSmrg    [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
93866fae4e5dSmrg    [p=${PACKAGE-default}
93876fae4e5dSmrg    case $enableval in
93886fae4e5dSmrg    yes) enable_fast_install=yes ;;
93896fae4e5dSmrg    no) enable_fast_install=no ;;
93906fae4e5dSmrg    *)
93916fae4e5dSmrg      enable_fast_install=no
93926fae4e5dSmrg      # Look at the argument we got.  We use all the common list separators.
93936fae4e5dSmrg      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
93946fae4e5dSmrg      for pkg in $enableval; do
93956fae4e5dSmrg	IFS="$lt_save_ifs"
93966fae4e5dSmrg	if test "X$pkg" = "X$p"; then
93976fae4e5dSmrg	  enable_fast_install=yes
93986fae4e5dSmrg	fi
93996fae4e5dSmrg      done
94006fae4e5dSmrg      IFS="$lt_save_ifs"
94016fae4e5dSmrg      ;;
94026fae4e5dSmrg    esac],
94036fae4e5dSmrg    [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
94049c9ff80cSmrg
94056fae4e5dSmrg_LT_DECL([fast_install], [enable_fast_install], [0],
94066fae4e5dSmrg	 [Whether or not to optimize for fast installation])dnl
94076fae4e5dSmrg])# _LT_ENABLE_FAST_INSTALL
94089c9ff80cSmrg
94096fae4e5dSmrgLT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
94106fae4e5dSmrgLT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
94119c9ff80cSmrg
94126fae4e5dSmrg# Old names:
94136fae4e5dSmrgAU_DEFUN([AC_ENABLE_FAST_INSTALL],
94146fae4e5dSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
94156fae4e5dSmrgAC_DIAGNOSE([obsolete],
94166fae4e5dSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put
94176fae4e5dSmrgthe `fast-install' option into LT_INIT's first parameter.])
94186fae4e5dSmrg])
94199c9ff80cSmrg
94206fae4e5dSmrgAU_DEFUN([AC_DISABLE_FAST_INSTALL],
94216fae4e5dSmrg[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
94226fae4e5dSmrgAC_DIAGNOSE([obsolete],
94236fae4e5dSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put
94246fae4e5dSmrgthe `disable-fast-install' option into LT_INIT's first parameter.])
94256fae4e5dSmrg])
94269c9ff80cSmrg
94276fae4e5dSmrgdnl aclocal-1.4 backwards compatibility:
94286fae4e5dSmrgdnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
94296fae4e5dSmrgdnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
94301f0ac6a5Smrg
94319c9ff80cSmrg
94326fae4e5dSmrg# _LT_WITH_PIC([MODE])
94336fae4e5dSmrg# --------------------
94346fae4e5dSmrg# implement the --with-pic flag, and support the `pic-only' and `no-pic'
94356fae4e5dSmrg# LT_INIT options.
94366fae4e5dSmrg# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
94376fae4e5dSmrgm4_define([_LT_WITH_PIC],
94386fae4e5dSmrg[AC_ARG_WITH([pic],
943989c04b6cSmrg    [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@],
94406fae4e5dSmrg	[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
944189c04b6cSmrg    [lt_p=${PACKAGE-default}
944289c04b6cSmrg    case $withval in
944389c04b6cSmrg    yes|no) pic_mode=$withval ;;
944489c04b6cSmrg    *)
944589c04b6cSmrg      pic_mode=default
944689c04b6cSmrg      # Look at the argument we got.  We use all the common list separators.
944789c04b6cSmrg      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
944889c04b6cSmrg      for lt_pkg in $withval; do
944989c04b6cSmrg	IFS="$lt_save_ifs"
945089c04b6cSmrg	if test "X$lt_pkg" = "X$lt_p"; then
945189c04b6cSmrg	  pic_mode=yes
945289c04b6cSmrg	fi
945389c04b6cSmrg      done
945489c04b6cSmrg      IFS="$lt_save_ifs"
945589c04b6cSmrg      ;;
945689c04b6cSmrg    esac],
94576fae4e5dSmrg    [pic_mode=default])
94589c9ff80cSmrg
94596fae4e5dSmrgtest -z "$pic_mode" && pic_mode=m4_default([$1], [default])
94601f0ac6a5Smrg
94616fae4e5dSmrg_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
94626fae4e5dSmrg])# _LT_WITH_PIC
94631f0ac6a5Smrg
94646fae4e5dSmrgLT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
94656fae4e5dSmrgLT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
94661f0ac6a5Smrg
94676fae4e5dSmrg# Old name:
94686fae4e5dSmrgAU_DEFUN([AC_LIBTOOL_PICMODE],
94696fae4e5dSmrg[_LT_SET_OPTION([LT_INIT], [pic-only])
94706fae4e5dSmrgAC_DIAGNOSE([obsolete],
94716fae4e5dSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you
94726fae4e5dSmrgput the `pic-only' option into LT_INIT's first parameter.])
94739c9ff80cSmrg])
94741f0ac6a5Smrg
94759c9ff80cSmrgdnl aclocal-1.4 backwards compatibility:
94766fae4e5dSmrgdnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
94771f0ac6a5Smrg
94781f0ac6a5Smrg
94796fae4e5dSmrgm4_define([_LTDL_MODE], [])
94806fae4e5dSmrgLT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
94816fae4e5dSmrg		 [m4_define([_LTDL_MODE], [nonrecursive])])
94826fae4e5dSmrgLT_OPTION_DEFINE([LTDL_INIT], [recursive],
94836fae4e5dSmrg		 [m4_define([_LTDL_MODE], [recursive])])
94846fae4e5dSmrgLT_OPTION_DEFINE([LTDL_INIT], [subproject],
94856fae4e5dSmrg		 [m4_define([_LTDL_MODE], [subproject])])
94861f0ac6a5Smrg
94876fae4e5dSmrgm4_define([_LTDL_TYPE], [])
94886fae4e5dSmrgLT_OPTION_DEFINE([LTDL_INIT], [installable],
94896fae4e5dSmrg		 [m4_define([_LTDL_TYPE], [installable])])
94906fae4e5dSmrgLT_OPTION_DEFINE([LTDL_INIT], [convenience],
94916fae4e5dSmrg		 [m4_define([_LTDL_TYPE], [convenience])])
94921f0ac6a5Smrg
94936fae4e5dSmrg# ltsugar.m4 -- libtool m4 base layer.                         -*-Autoconf-*-
94946fae4e5dSmrg#
94956fae4e5dSmrg# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
94966fae4e5dSmrg# Written by Gary V. Vaughan, 2004
94976fae4e5dSmrg#
94986fae4e5dSmrg# This file is free software; the Free Software Foundation gives
94996fae4e5dSmrg# unlimited permission to copy and/or distribute it, with or without
95006fae4e5dSmrg# modifications, as long as this notice is preserved.
95011f0ac6a5Smrg
95026fae4e5dSmrg# serial 6 ltsugar.m4
95031f0ac6a5Smrg
95046fae4e5dSmrg# This is to help aclocal find these macros, as it can't see m4_define.
95056fae4e5dSmrgAC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
95069c9ff80cSmrg
95079c9ff80cSmrg
95086fae4e5dSmrg# lt_join(SEP, ARG1, [ARG2...])
95096fae4e5dSmrg# -----------------------------
95106fae4e5dSmrg# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
95116fae4e5dSmrg# associated separator.
95126fae4e5dSmrg# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
95136fae4e5dSmrg# versions in m4sugar had bugs.
95146fae4e5dSmrgm4_define([lt_join],
95156fae4e5dSmrg[m4_if([$#], [1], [],
95166fae4e5dSmrg       [$#], [2], [[$2]],
95176fae4e5dSmrg       [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
95186fae4e5dSmrgm4_define([_lt_join],
95196fae4e5dSmrg[m4_if([$#$2], [2], [],
95206fae4e5dSmrg       [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
95219c9ff80cSmrg
95226fae4e5dSmrg
95236fae4e5dSmrg# lt_car(LIST)
95246fae4e5dSmrg# lt_cdr(LIST)
95256fae4e5dSmrg# ------------
95266fae4e5dSmrg# Manipulate m4 lists.
95276fae4e5dSmrg# These macros are necessary as long as will still need to support
95286fae4e5dSmrg# Autoconf-2.59 which quotes differently.
95296fae4e5dSmrgm4_define([lt_car], [[$1]])
95306fae4e5dSmrgm4_define([lt_cdr],
95316fae4e5dSmrg[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
95326fae4e5dSmrg       [$#], 1, [],
95336fae4e5dSmrg       [m4_dquote(m4_shift($@))])])
95346fae4e5dSmrgm4_define([lt_unquote], $1)
95359c9ff80cSmrg
95369c9ff80cSmrg
95376fae4e5dSmrg# lt_append(MACRO-NAME, STRING, [SEPARATOR])
95386fae4e5dSmrg# ------------------------------------------
95396fae4e5dSmrg# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
95406fae4e5dSmrg# Note that neither SEPARATOR nor STRING are expanded; they are appended
95416fae4e5dSmrg# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
95426fae4e5dSmrg# No SEPARATOR is output if MACRO-NAME was previously undefined (different
95436fae4e5dSmrg# than defined and empty).
95446fae4e5dSmrg#
95456fae4e5dSmrg# This macro is needed until we can rely on Autoconf 2.62, since earlier
95466fae4e5dSmrg# versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
95476fae4e5dSmrgm4_define([lt_append],
95486fae4e5dSmrg[m4_define([$1],
95496fae4e5dSmrg	   m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
95509c9ff80cSmrg
95519c9ff80cSmrg
95529c9ff80cSmrg
95536fae4e5dSmrg# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
95546fae4e5dSmrg# ----------------------------------------------------------
95556fae4e5dSmrg# Produce a SEP delimited list of all paired combinations of elements of
95566fae4e5dSmrg# PREFIX-LIST with SUFFIX1 through SUFFIXn.  Each element of the list
95576fae4e5dSmrg# has the form PREFIXmINFIXSUFFIXn.
95586fae4e5dSmrg# Needed until we can rely on m4_combine added in Autoconf 2.62.
95596fae4e5dSmrgm4_define([lt_combine],
95606fae4e5dSmrg[m4_if(m4_eval([$# > 3]), [1],
95616fae4e5dSmrg       [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
95626fae4e5dSmrg[[m4_foreach([_Lt_prefix], [$2],
95636fae4e5dSmrg	     [m4_foreach([_Lt_suffix],
95646fae4e5dSmrg		]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
95656fae4e5dSmrg	[_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
95661f0ac6a5Smrg
95671f0ac6a5Smrg
95686fae4e5dSmrg# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
95696fae4e5dSmrg# -----------------------------------------------------------------------
95706fae4e5dSmrg# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
95716fae4e5dSmrg# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
95726fae4e5dSmrgm4_define([lt_if_append_uniq],
95736fae4e5dSmrg[m4_ifdef([$1],
95746fae4e5dSmrg	  [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
95756fae4e5dSmrg		 [lt_append([$1], [$2], [$3])$4],
95766fae4e5dSmrg		 [$5])],
95776fae4e5dSmrg	  [lt_append([$1], [$2], [$3])$4])])
95781f0ac6a5Smrg
95791f0ac6a5Smrg
95806fae4e5dSmrg# lt_dict_add(DICT, KEY, VALUE)
95816fae4e5dSmrg# -----------------------------
95826fae4e5dSmrgm4_define([lt_dict_add],
95836fae4e5dSmrg[m4_define([$1($2)], [$3])])
95841f0ac6a5Smrg
95851f0ac6a5Smrg
95866fae4e5dSmrg# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
95876fae4e5dSmrg# --------------------------------------------
95886fae4e5dSmrgm4_define([lt_dict_add_subkey],
95896fae4e5dSmrg[m4_define([$1($2:$3)], [$4])])
95901f0ac6a5Smrg
95911f0ac6a5Smrg
95926fae4e5dSmrg# lt_dict_fetch(DICT, KEY, [SUBKEY])
95936fae4e5dSmrg# ----------------------------------
95946fae4e5dSmrgm4_define([lt_dict_fetch],
95956fae4e5dSmrg[m4_ifval([$3],
95966fae4e5dSmrg	m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
95976fae4e5dSmrg    m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
95981f0ac6a5Smrg
95999c9ff80cSmrg
96006fae4e5dSmrg# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
96016fae4e5dSmrg# -----------------------------------------------------------------
96026fae4e5dSmrgm4_define([lt_if_dict_fetch],
96036fae4e5dSmrg[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
96046fae4e5dSmrg	[$5],
96056fae4e5dSmrg    [$6])])
96061f0ac6a5Smrg
96071f0ac6a5Smrg
96086fae4e5dSmrg# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
96096fae4e5dSmrg# --------------------------------------------------------------
96106fae4e5dSmrgm4_define([lt_dict_filter],
96116fae4e5dSmrg[m4_if([$5], [], [],
96126fae4e5dSmrg  [lt_join(m4_quote(m4_default([$4], [[, ]])),
96136fae4e5dSmrg           lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
96146fae4e5dSmrg		      [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
96156fae4e5dSmrg])
96161f0ac6a5Smrg
96176fae4e5dSmrg# ltversion.m4 -- version numbers			-*- Autoconf -*-
96186fae4e5dSmrg#
96196fae4e5dSmrg#   Copyright (C) 2004 Free Software Foundation, Inc.
96206fae4e5dSmrg#   Written by Scott James Remnant, 2004
96216fae4e5dSmrg#
96226fae4e5dSmrg# This file is free software; the Free Software Foundation gives
96236fae4e5dSmrg# unlimited permission to copy and/or distribute it, with or without
96246fae4e5dSmrg# modifications, as long as this notice is preserved.
96251f0ac6a5Smrg
96266fae4e5dSmrg# @configure_input@
96279c9ff80cSmrg
962889c04b6cSmrg# serial 3337 ltversion.m4
96296fae4e5dSmrg# This file is part of GNU Libtool
96301f0ac6a5Smrg
963189c04b6cSmrgm4_define([LT_PACKAGE_VERSION], [2.4.2])
963289c04b6cSmrgm4_define([LT_PACKAGE_REVISION], [1.3337])
96331f0ac6a5Smrg
96346fae4e5dSmrgAC_DEFUN([LTVERSION_VERSION],
963589c04b6cSmrg[macro_version='2.4.2'
963689c04b6cSmrgmacro_revision='1.3337'
96376fae4e5dSmrg_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
96386fae4e5dSmrg_LT_DECL(, macro_revision, 0)
96396fae4e5dSmrg])
96401f0ac6a5Smrg
96416fae4e5dSmrg# lt~obsolete.m4 -- aclocal satisfying obsolete definitions.    -*-Autoconf-*-
96426fae4e5dSmrg#
96436fae4e5dSmrg#   Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
96446fae4e5dSmrg#   Written by Scott James Remnant, 2004.
96456fae4e5dSmrg#
96466fae4e5dSmrg# This file is free software; the Free Software Foundation gives
96476fae4e5dSmrg# unlimited permission to copy and/or distribute it, with or without
96486fae4e5dSmrg# modifications, as long as this notice is preserved.
96491f0ac6a5Smrg
96506fae4e5dSmrg# serial 5 lt~obsolete.m4
96511f0ac6a5Smrg
96526fae4e5dSmrg# These exist entirely to fool aclocal when bootstrapping libtool.
96536fae4e5dSmrg#
96546fae4e5dSmrg# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
96556fae4e5dSmrg# which have later been changed to m4_define as they aren't part of the
96566fae4e5dSmrg# exported API, or moved to Autoconf or Automake where they belong.
96576fae4e5dSmrg#
96586fae4e5dSmrg# The trouble is, aclocal is a bit thick.  It'll see the old AC_DEFUN
96596fae4e5dSmrg# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
96606fae4e5dSmrg# using a macro with the same name in our local m4/libtool.m4 it'll
96616fae4e5dSmrg# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
96626fae4e5dSmrg# and doesn't know about Autoconf macros at all.)
96636fae4e5dSmrg#
96646fae4e5dSmrg# So we provide this file, which has a silly filename so it's always
96656fae4e5dSmrg# included after everything else.  This provides aclocal with the
96666fae4e5dSmrg# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
96676fae4e5dSmrg# because those macros already exist, or will be overwritten later.
96686fae4e5dSmrg# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 
96696fae4e5dSmrg#
96706fae4e5dSmrg# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
96716fae4e5dSmrg# Yes, that means every name once taken will need to remain here until
96726fae4e5dSmrg# we give up compatibility with versions before 1.7, at which point
96736fae4e5dSmrg# we need to keep only those names which we still refer to.
96741f0ac6a5Smrg
96756fae4e5dSmrg# This is to help aclocal find these macros, as it can't see m4_define.
96766fae4e5dSmrgAC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
96771f0ac6a5Smrg
96786fae4e5dSmrgm4_ifndef([AC_LIBTOOL_LINKER_OPTION],	[AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
96796fae4e5dSmrgm4_ifndef([AC_PROG_EGREP],		[AC_DEFUN([AC_PROG_EGREP])])
96806fae4e5dSmrgm4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH],	[AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
96816fae4e5dSmrgm4_ifndef([_LT_AC_SHELL_INIT],		[AC_DEFUN([_LT_AC_SHELL_INIT])])
96826fae4e5dSmrgm4_ifndef([_LT_AC_SYS_LIBPATH_AIX],	[AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
96836fae4e5dSmrgm4_ifndef([_LT_PROG_LTMAIN],		[AC_DEFUN([_LT_PROG_LTMAIN])])
96846fae4e5dSmrgm4_ifndef([_LT_AC_TAGVAR],		[AC_DEFUN([_LT_AC_TAGVAR])])
96856fae4e5dSmrgm4_ifndef([AC_LTDL_ENABLE_INSTALL],	[AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
96866fae4e5dSmrgm4_ifndef([AC_LTDL_PREOPEN],		[AC_DEFUN([AC_LTDL_PREOPEN])])
96876fae4e5dSmrgm4_ifndef([_LT_AC_SYS_COMPILER],	[AC_DEFUN([_LT_AC_SYS_COMPILER])])
96886fae4e5dSmrgm4_ifndef([_LT_AC_LOCK],		[AC_DEFUN([_LT_AC_LOCK])])
96896fae4e5dSmrgm4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE],	[AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
96906fae4e5dSmrgm4_ifndef([_LT_AC_TRY_DLOPEN_SELF],	[AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
96916fae4e5dSmrgm4_ifndef([AC_LIBTOOL_PROG_CC_C_O],	[AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
96926fae4e5dSmrgm4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
96936fae4e5dSmrgm4_ifndef([AC_LIBTOOL_OBJDIR],		[AC_DEFUN([AC_LIBTOOL_OBJDIR])])
96946fae4e5dSmrgm4_ifndef([AC_LTDL_OBJDIR],		[AC_DEFUN([AC_LTDL_OBJDIR])])
96956fae4e5dSmrgm4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
96966fae4e5dSmrgm4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP],	[AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
96976fae4e5dSmrgm4_ifndef([AC_PATH_MAGIC],		[AC_DEFUN([AC_PATH_MAGIC])])
96986fae4e5dSmrgm4_ifndef([AC_PROG_LD_GNU],		[AC_DEFUN([AC_PROG_LD_GNU])])
96996fae4e5dSmrgm4_ifndef([AC_PROG_LD_RELOAD_FLAG],	[AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
97006fae4e5dSmrgm4_ifndef([AC_DEPLIBS_CHECK_METHOD],	[AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
97016fae4e5dSmrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
97026fae4e5dSmrgm4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
97036fae4e5dSmrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
97046fae4e5dSmrgm4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS],	[AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
97056fae4e5dSmrgm4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP],	[AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
97066fae4e5dSmrgm4_ifndef([LT_AC_PROG_EGREP],		[AC_DEFUN([LT_AC_PROG_EGREP])])
97076fae4e5dSmrgm4_ifndef([LT_AC_PROG_SED],		[AC_DEFUN([LT_AC_PROG_SED])])
97086fae4e5dSmrgm4_ifndef([_LT_CC_BASENAME],		[AC_DEFUN([_LT_CC_BASENAME])])
97096fae4e5dSmrgm4_ifndef([_LT_COMPILER_BOILERPLATE],	[AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
97106fae4e5dSmrgm4_ifndef([_LT_LINKER_BOILERPLATE],	[AC_DEFUN([_LT_LINKER_BOILERPLATE])])
97116fae4e5dSmrgm4_ifndef([_AC_PROG_LIBTOOL],		[AC_DEFUN([_AC_PROG_LIBTOOL])])
97126fae4e5dSmrgm4_ifndef([AC_LIBTOOL_SETUP],		[AC_DEFUN([AC_LIBTOOL_SETUP])])
97136fae4e5dSmrgm4_ifndef([_LT_AC_CHECK_DLFCN],		[AC_DEFUN([_LT_AC_CHECK_DLFCN])])
97146fae4e5dSmrgm4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER],	[AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
97156fae4e5dSmrgm4_ifndef([_LT_AC_TAGCONFIG],		[AC_DEFUN([_LT_AC_TAGCONFIG])])
97166fae4e5dSmrgm4_ifndef([AC_DISABLE_FAST_INSTALL],	[AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
97176fae4e5dSmrgm4_ifndef([_LT_AC_LANG_CXX],		[AC_DEFUN([_LT_AC_LANG_CXX])])
97186fae4e5dSmrgm4_ifndef([_LT_AC_LANG_F77],		[AC_DEFUN([_LT_AC_LANG_F77])])
97196fae4e5dSmrgm4_ifndef([_LT_AC_LANG_GCJ],		[AC_DEFUN([_LT_AC_LANG_GCJ])])
97206fae4e5dSmrgm4_ifndef([AC_LIBTOOL_LANG_C_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
97216fae4e5dSmrgm4_ifndef([_LT_AC_LANG_C_CONFIG],	[AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
97226fae4e5dSmrgm4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
97236fae4e5dSmrgm4_ifndef([_LT_AC_LANG_CXX_CONFIG],	[AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
97246fae4e5dSmrgm4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
97256fae4e5dSmrgm4_ifndef([_LT_AC_LANG_F77_CONFIG],	[AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
97266fae4e5dSmrgm4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
97276fae4e5dSmrgm4_ifndef([_LT_AC_LANG_GCJ_CONFIG],	[AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
97286fae4e5dSmrgm4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
97296fae4e5dSmrgm4_ifndef([_LT_AC_LANG_RC_CONFIG],	[AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
97306fae4e5dSmrgm4_ifndef([AC_LIBTOOL_CONFIG],		[AC_DEFUN([AC_LIBTOOL_CONFIG])])
97316fae4e5dSmrgm4_ifndef([_LT_AC_FILE_LTDLL_C],	[AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
97326fae4e5dSmrgm4_ifndef([_LT_REQUIRED_DARWIN_CHECKS],	[AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
97336fae4e5dSmrgm4_ifndef([_LT_AC_PROG_CXXCPP],		[AC_DEFUN([_LT_AC_PROG_CXXCPP])])
97346fae4e5dSmrgm4_ifndef([_LT_PREPARE_SED_QUOTE_VARS],	[AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
97356fae4e5dSmrgm4_ifndef([_LT_PROG_ECHO_BACKSLASH],	[AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
97366fae4e5dSmrgm4_ifndef([_LT_PROG_F77],		[AC_DEFUN([_LT_PROG_F77])])
97376fae4e5dSmrgm4_ifndef([_LT_PROG_FC],		[AC_DEFUN([_LT_PROG_FC])])
97386fae4e5dSmrgm4_ifndef([_LT_PROG_CXX],		[AC_DEFUN([_LT_PROG_CXX])])
97396fae4e5dSmrg
974089c04b6cSmrg# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
974189c04b6cSmrg# 
974289c04b6cSmrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
974389c04b6cSmrg#
974489c04b6cSmrg# This program is free software; you can redistribute it and/or modify
974589c04b6cSmrg# it under the terms of the GNU General Public License as published by
974689c04b6cSmrg# the Free Software Foundation; either version 2 of the License, or
974789c04b6cSmrg# (at your option) any later version.
974889c04b6cSmrg#
974989c04b6cSmrg# This program is distributed in the hope that it will be useful, but
975089c04b6cSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of
975189c04b6cSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
975289c04b6cSmrg# General Public License for more details.
975389c04b6cSmrg#
975489c04b6cSmrg# You should have received a copy of the GNU General Public License
975589c04b6cSmrg# along with this program; if not, write to the Free Software
975689c04b6cSmrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
975789c04b6cSmrg#
975889c04b6cSmrg# As a special exception to the GNU General Public License, if you
975989c04b6cSmrg# distribute this file as part of a program that contains a
976089c04b6cSmrg# configuration script generated by Autoconf, you may include it under
976189c04b6cSmrg# the same distribution terms that you use for the rest of that program.
976289c04b6cSmrg
976389c04b6cSmrg# PKG_PROG_PKG_CONFIG([MIN-VERSION])
976489c04b6cSmrg# ----------------------------------
976589c04b6cSmrgAC_DEFUN([PKG_PROG_PKG_CONFIG],
976689c04b6cSmrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
976789c04b6cSmrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$])
976889c04b6cSmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
976989c04b6cSmrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
977089c04b6cSmrg	AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
977189c04b6cSmrgfi
977289c04b6cSmrgif test -n "$PKG_CONFIG"; then
977389c04b6cSmrg	_pkg_min_version=m4_default([$1], [0.9.0])
977489c04b6cSmrg	AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
977589c04b6cSmrg	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
977689c04b6cSmrg		AC_MSG_RESULT([yes])
977789c04b6cSmrg	else
977889c04b6cSmrg		AC_MSG_RESULT([no])
977989c04b6cSmrg		PKG_CONFIG=""
978089c04b6cSmrg	fi
978189c04b6cSmrg		
978289c04b6cSmrgfi[]dnl
978389c04b6cSmrg])# PKG_PROG_PKG_CONFIG
978489c04b6cSmrg
978589c04b6cSmrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
978689c04b6cSmrg#
978789c04b6cSmrg# Check to see whether a particular set of modules exists.  Similar
978889c04b6cSmrg# to PKG_CHECK_MODULES(), but does not set variables or print errors.
978989c04b6cSmrg#
979089c04b6cSmrg#
979189c04b6cSmrg# Similar to PKG_CHECK_MODULES, make sure that the first instance of
979289c04b6cSmrg# this or PKG_CHECK_MODULES is called, or make sure to call
979389c04b6cSmrg# PKG_CHECK_EXISTS manually
979489c04b6cSmrg# --------------------------------------------------------------
979589c04b6cSmrgAC_DEFUN([PKG_CHECK_EXISTS],
979689c04b6cSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
979789c04b6cSmrgif test -n "$PKG_CONFIG" && \
979889c04b6cSmrg    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
979989c04b6cSmrg  m4_ifval([$2], [$2], [:])
980089c04b6cSmrgm4_ifvaln([$3], [else
980189c04b6cSmrg  $3])dnl
980289c04b6cSmrgfi])
980389c04b6cSmrg
980489c04b6cSmrg
980589c04b6cSmrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
980689c04b6cSmrg# ---------------------------------------------
980789c04b6cSmrgm4_define([_PKG_CONFIG],
980889c04b6cSmrg[if test -n "$$1"; then
980989c04b6cSmrg    pkg_cv_[]$1="$$1"
981089c04b6cSmrg elif test -n "$PKG_CONFIG"; then
981189c04b6cSmrg    PKG_CHECK_EXISTS([$3],
981289c04b6cSmrg                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
981389c04b6cSmrg		     [pkg_failed=yes])
981489c04b6cSmrg else
981589c04b6cSmrg    pkg_failed=untried
981689c04b6cSmrgfi[]dnl
981789c04b6cSmrg])# _PKG_CONFIG
981889c04b6cSmrg
981989c04b6cSmrg# _PKG_SHORT_ERRORS_SUPPORTED
982089c04b6cSmrg# -----------------------------
982189c04b6cSmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
982289c04b6cSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
982389c04b6cSmrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
982489c04b6cSmrg        _pkg_short_errors_supported=yes
982589c04b6cSmrgelse
982689c04b6cSmrg        _pkg_short_errors_supported=no
982789c04b6cSmrgfi[]dnl
982889c04b6cSmrg])# _PKG_SHORT_ERRORS_SUPPORTED
982989c04b6cSmrg
983089c04b6cSmrg
983189c04b6cSmrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
983289c04b6cSmrg# [ACTION-IF-NOT-FOUND])
983389c04b6cSmrg#
983489c04b6cSmrg#
983589c04b6cSmrg# Note that if there is a possibility the first call to
983689c04b6cSmrg# PKG_CHECK_MODULES might not happen, you should be sure to include an
983789c04b6cSmrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
983889c04b6cSmrg#
983989c04b6cSmrg#
984089c04b6cSmrg# --------------------------------------------------------------
984189c04b6cSmrgAC_DEFUN([PKG_CHECK_MODULES],
984289c04b6cSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
984389c04b6cSmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
984489c04b6cSmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
984589c04b6cSmrg
984689c04b6cSmrgpkg_failed=no
984789c04b6cSmrgAC_MSG_CHECKING([for $1])
984889c04b6cSmrg
984989c04b6cSmrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
985089c04b6cSmrg_PKG_CONFIG([$1][_LIBS], [libs], [$2])
985189c04b6cSmrg
985289c04b6cSmrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
985389c04b6cSmrgand $1[]_LIBS to avoid the need to call pkg-config.
985489c04b6cSmrgSee the pkg-config man page for more details.])
985589c04b6cSmrg
985689c04b6cSmrgif test $pkg_failed = yes; then
985789c04b6cSmrg        _PKG_SHORT_ERRORS_SUPPORTED
985889c04b6cSmrg        if test $_pkg_short_errors_supported = yes; then
985989c04b6cSmrg	        $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
986089c04b6cSmrg        else 
986189c04b6cSmrg	        $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
986289c04b6cSmrg        fi
986389c04b6cSmrg	# Put the nasty error message in config.log where it belongs
986489c04b6cSmrg	echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
986589c04b6cSmrg
986689c04b6cSmrg	ifelse([$4], , [AC_MSG_ERROR(dnl
986789c04b6cSmrg[Package requirements ($2) were not met:
986889c04b6cSmrg
986989c04b6cSmrg$$1_PKG_ERRORS
987089c04b6cSmrg
987189c04b6cSmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you
987289c04b6cSmrginstalled software in a non-standard prefix.
987389c04b6cSmrg
987489c04b6cSmrg_PKG_TEXT
987589c04b6cSmrg])],
987689c04b6cSmrg		[AC_MSG_RESULT([no])
987789c04b6cSmrg                $4])
987889c04b6cSmrgelif test $pkg_failed = untried; then
987989c04b6cSmrg	ifelse([$4], , [AC_MSG_FAILURE(dnl
988089c04b6cSmrg[The pkg-config script could not be found or is too old.  Make sure it
988189c04b6cSmrgis in your PATH or set the PKG_CONFIG environment variable to the full
988289c04b6cSmrgpath to pkg-config.
988389c04b6cSmrg
988489c04b6cSmrg_PKG_TEXT
988589c04b6cSmrg
988689c04b6cSmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
988789c04b6cSmrg		[$4])
988889c04b6cSmrgelse
988989c04b6cSmrg	$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
989089c04b6cSmrg	$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
989189c04b6cSmrg        AC_MSG_RESULT([yes])
989289c04b6cSmrg	ifelse([$3], , :, [$3])
989389c04b6cSmrgfi[]dnl
989489c04b6cSmrg])# PKG_CHECK_MODULES
989589c04b6cSmrg
98966fae4e5dSmrgdnl xorg-macros.m4.  Generated from xorg-macros.m4.in xorgversion.m4 by configure.
98976fae4e5dSmrgdnl
98986fae4e5dSmrgdnl Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
9899b9867631Smrgdnl
99006fae4e5dSmrgdnl Permission is hereby granted, free of charge, to any person obtaining a
99016fae4e5dSmrgdnl copy of this software and associated documentation files (the "Software"),
99026fae4e5dSmrgdnl to deal in the Software without restriction, including without limitation
99036fae4e5dSmrgdnl the rights to use, copy, modify, merge, publish, distribute, sublicense,
99046fae4e5dSmrgdnl and/or sell copies of the Software, and to permit persons to whom the
99056fae4e5dSmrgdnl Software is furnished to do so, subject to the following conditions:
99066fae4e5dSmrgdnl
99076fae4e5dSmrgdnl The above copyright notice and this permission notice (including the next
99086fae4e5dSmrgdnl paragraph) shall be included in all copies or substantial portions of the
99096fae4e5dSmrgdnl Software.
99106fae4e5dSmrgdnl
99116fae4e5dSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
99126fae4e5dSmrgdnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
99136fae4e5dSmrgdnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
99146fae4e5dSmrgdnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
99156fae4e5dSmrgdnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
99166fae4e5dSmrgdnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
99176fae4e5dSmrgdnl DEALINGS IN THE SOFTWARE.
99181f0ac6a5Smrg
99196fae4e5dSmrg# XORG_MACROS_VERSION(required-version)
99206fae4e5dSmrg# -------------------------------------
99216fae4e5dSmrg# Minimum version: 1.1.0
99226fae4e5dSmrg#
99236fae4e5dSmrg# If you're using a macro added in Version 1.1 or newer, include this in
99246fae4e5dSmrg# your configure.ac with the minimum required version, such as:
99256fae4e5dSmrg# XORG_MACROS_VERSION(1.1)
99266fae4e5dSmrg#
99276fae4e5dSmrg# To ensure that this macro is defined, also add:
99286fae4e5dSmrg# m4_ifndef([XORG_MACROS_VERSION],
99296fae4e5dSmrg#     [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])])
99306fae4e5dSmrg#
99316fae4e5dSmrg#
9932b9867631Smrg# See the "minimum version" comment for each macro you use to see what
99336fae4e5dSmrg# version you require.
99346fae4e5dSmrgm4_defun([XORG_MACROS_VERSION],[
9935b9867631Smrgm4_define([vers_have], [1.19.0])
99366fae4e5dSmrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.])))
99376fae4e5dSmrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.])))
99386fae4e5dSmrgm4_if(m4_cmp(maj_have, maj_needed), 0,,
99396fae4e5dSmrg    [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])])
99406fae4e5dSmrgm4_if(m4_version_compare(vers_have, [$1]), -1,
99416fae4e5dSmrg    [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])])
99426fae4e5dSmrgm4_undefine([vers_have])
99436fae4e5dSmrgm4_undefine([maj_have])
99446fae4e5dSmrgm4_undefine([maj_needed])
99456fae4e5dSmrg]) # XORG_MACROS_VERSION
99461f0ac6a5Smrg
99476fae4e5dSmrg# XORG_PROG_RAWCPP()
99486fae4e5dSmrg# ------------------
99496fae4e5dSmrg# Minimum version: 1.0.0
99506fae4e5dSmrg#
99516fae4e5dSmrg# Find cpp program and necessary flags for use in pre-processing text files
99526fae4e5dSmrg# such as man pages and config files
99536fae4e5dSmrgAC_DEFUN([XORG_PROG_RAWCPP],[
99546fae4e5dSmrgAC_REQUIRE([AC_PROG_CPP])
9955b9867631SmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}],
99566fae4e5dSmrg   [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib])
99571f0ac6a5Smrg
99586fae4e5dSmrg# Check for flag to avoid builtin definitions - assumes unix is predefined,
99596fae4e5dSmrg# which is not the best choice for supporting other OS'es, but covers most
99606fae4e5dSmrg# of the ones we need for now.
99616fae4e5dSmrgAC_MSG_CHECKING([if $RAWCPP requires -undef])
99626fae4e5dSmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp redefine unix ?]])])
99636fae4e5dSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
99646fae4e5dSmrg	AC_MSG_RESULT([no])
99656fae4e5dSmrgelse
99666fae4e5dSmrg	if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
99676fae4e5dSmrg		RAWCPPFLAGS=-undef
99686fae4e5dSmrg		AC_MSG_RESULT([yes])
99696fae4e5dSmrg	# under Cygwin unix is still defined even with -undef
99706fae4e5dSmrg	elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
99716fae4e5dSmrg		RAWCPPFLAGS="-undef -ansi"
99726fae4e5dSmrg		AC_MSG_RESULT([yes, with -ansi])
99736fae4e5dSmrg	else
99746fae4e5dSmrg		AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef.  I don't know what to do.])
99756fae4e5dSmrg	fi
99766fae4e5dSmrgfi
99776fae4e5dSmrgrm -f conftest.$ac_ext
99781f0ac6a5Smrg
99796fae4e5dSmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional])
99806fae4e5dSmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve   "whitespace"?]])])
99816fae4e5dSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
99826fae4e5dSmrg	AC_MSG_RESULT([no])
99836fae4e5dSmrgelse
99846fae4e5dSmrg	if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
9985b9867631Smrg		TRADITIONALCPPFLAGS="-traditional"
99866fae4e5dSmrg		RAWCPPFLAGS="${RAWCPPFLAGS} -traditional"
99876fae4e5dSmrg		AC_MSG_RESULT([yes])
99886fae4e5dSmrg	else
99896fae4e5dSmrg		AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional.  I don't know what to do.])
99906fae4e5dSmrg	fi
99916fae4e5dSmrgfi
99926fae4e5dSmrgrm -f conftest.$ac_ext
99936fae4e5dSmrgAC_SUBST(RAWCPPFLAGS)
9994b9867631SmrgAC_SUBST(TRADITIONALCPPFLAGS)
99956fae4e5dSmrg]) # XORG_PROG_RAWCPP
99961f0ac6a5Smrg
99976fae4e5dSmrg# XORG_MANPAGE_SECTIONS()
99986fae4e5dSmrg# -----------------------
99996fae4e5dSmrg# Minimum version: 1.0.0
100009c9ff80cSmrg#
100016fae4e5dSmrg# Determine which sections man pages go in for the different man page types
100026fae4e5dSmrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files.
100036fae4e5dSmrg# Not sure if there's any better way than just hardcoding by OS name.
100046fae4e5dSmrg# Override default settings by setting environment variables
100056fae4e5dSmrg# Added MAN_SUBSTS in version 1.8
100066fae4e5dSmrg# Added AC_PROG_SED in version 1.8
100071f0ac6a5Smrg
100086fae4e5dSmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[
100096fae4e5dSmrgAC_REQUIRE([AC_CANONICAL_HOST])
100106fae4e5dSmrgAC_REQUIRE([AC_PROG_SED])
100119c9ff80cSmrg
100126fae4e5dSmrgif test x$APP_MAN_SUFFIX = x    ; then
100136fae4e5dSmrg    APP_MAN_SUFFIX=1
100146fae4e5dSmrgfi
100156fae4e5dSmrgif test x$APP_MAN_DIR = x    ; then
100166fae4e5dSmrg    APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)'
100176fae4e5dSmrgfi
100189c9ff80cSmrg
100196fae4e5dSmrgif test x$LIB_MAN_SUFFIX = x    ; then
100206fae4e5dSmrg    LIB_MAN_SUFFIX=3
100216fae4e5dSmrgfi
100226fae4e5dSmrgif test x$LIB_MAN_DIR = x    ; then
100236fae4e5dSmrg    LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)'
100246fae4e5dSmrgfi
100259c9ff80cSmrg
100266fae4e5dSmrgif test x$FILE_MAN_SUFFIX = x    ; then
100276fae4e5dSmrg    case $host_os in
100286fae4e5dSmrg	solaris*)	FILE_MAN_SUFFIX=4  ;;
100296fae4e5dSmrg	*)		FILE_MAN_SUFFIX=5  ;;
100306fae4e5dSmrg    esac
100316fae4e5dSmrgfi
100326fae4e5dSmrgif test x$FILE_MAN_DIR = x    ; then
100336fae4e5dSmrg    FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)'
100346fae4e5dSmrgfi
100359c9ff80cSmrg
100366fae4e5dSmrgif test x$MISC_MAN_SUFFIX = x    ; then
100376fae4e5dSmrg    case $host_os in
100386fae4e5dSmrg	solaris*)	MISC_MAN_SUFFIX=5  ;;
100396fae4e5dSmrg	*)		MISC_MAN_SUFFIX=7  ;;
100406fae4e5dSmrg    esac
100416fae4e5dSmrgfi
100426fae4e5dSmrgif test x$MISC_MAN_DIR = x    ; then
100436fae4e5dSmrg    MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)'
100446fae4e5dSmrgfi
100459c9ff80cSmrg
100466fae4e5dSmrgif test x$DRIVER_MAN_SUFFIX = x    ; then
100476fae4e5dSmrg    case $host_os in
100486fae4e5dSmrg	solaris*)	DRIVER_MAN_SUFFIX=7  ;;
100496fae4e5dSmrg	*)		DRIVER_MAN_SUFFIX=4  ;;
100506fae4e5dSmrg    esac
100516fae4e5dSmrgfi
100526fae4e5dSmrgif test x$DRIVER_MAN_DIR = x    ; then
100536fae4e5dSmrg    DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)'
100546fae4e5dSmrgfi
100559c9ff80cSmrg
100566fae4e5dSmrgif test x$ADMIN_MAN_SUFFIX = x    ; then
100576fae4e5dSmrg    case $host_os in
100586fae4e5dSmrg	solaris*)	ADMIN_MAN_SUFFIX=1m ;;
100596fae4e5dSmrg	*)		ADMIN_MAN_SUFFIX=8  ;;
100606fae4e5dSmrg    esac
100616fae4e5dSmrgfi
100626fae4e5dSmrgif test x$ADMIN_MAN_DIR = x    ; then
100636fae4e5dSmrg    ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)'
100646fae4e5dSmrgfi
100659c9ff80cSmrg
100669c9ff80cSmrg
100676fae4e5dSmrgAC_SUBST([APP_MAN_SUFFIX])
100686fae4e5dSmrgAC_SUBST([LIB_MAN_SUFFIX])
100696fae4e5dSmrgAC_SUBST([FILE_MAN_SUFFIX])
100706fae4e5dSmrgAC_SUBST([MISC_MAN_SUFFIX])
100716fae4e5dSmrgAC_SUBST([DRIVER_MAN_SUFFIX])
100726fae4e5dSmrgAC_SUBST([ADMIN_MAN_SUFFIX])
100736fae4e5dSmrgAC_SUBST([APP_MAN_DIR])
100746fae4e5dSmrgAC_SUBST([LIB_MAN_DIR])
100756fae4e5dSmrgAC_SUBST([FILE_MAN_DIR])
100766fae4e5dSmrgAC_SUBST([MISC_MAN_DIR])
100776fae4e5dSmrgAC_SUBST([DRIVER_MAN_DIR])
100786fae4e5dSmrgAC_SUBST([ADMIN_MAN_DIR])
100791f0ac6a5Smrg
100806fae4e5dSmrgXORG_MAN_PAGE="X Version 11"
100816fae4e5dSmrgAC_SUBST([XORG_MAN_PAGE])
100826fae4e5dSmrgMAN_SUBSTS="\
100836fae4e5dSmrg	-e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \
100846fae4e5dSmrg	-e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \
100856fae4e5dSmrg	-e 's|__xservername__|Xorg|g' \
100866fae4e5dSmrg	-e 's|__xconfigfile__|xorg.conf|g' \
100876fae4e5dSmrg	-e 's|__projectroot__|\$(prefix)|g' \
100886fae4e5dSmrg	-e 's|__apploaddir__|\$(appdefaultdir)|g' \
100896fae4e5dSmrg	-e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \
100906fae4e5dSmrg	-e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \
100916fae4e5dSmrg	-e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \
100926fae4e5dSmrg	-e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \
100936fae4e5dSmrg	-e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \
100946fae4e5dSmrg	-e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'"
100956fae4e5dSmrgAC_SUBST([MAN_SUBSTS])
100961f0ac6a5Smrg
100976fae4e5dSmrg]) # XORG_MANPAGE_SECTIONS
100989c9ff80cSmrg
100996fae4e5dSmrg# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION])
101006fae4e5dSmrg# ------------------------
101016fae4e5dSmrg# Minimum version: 1.7.0
101026fae4e5dSmrg#
101036fae4e5dSmrg# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent
101046fae4e5dSmrg# provided by xorg-sgml-doctools, if installed.
101056fae4e5dSmrgAC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[
101066fae4e5dSmrgAC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])])
101076fae4e5dSmrgXORG_SGML_PATH=
101086fae4e5dSmrgPKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])],
101096fae4e5dSmrg    [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`],
101106fae4e5dSmrg    [m4_ifval([$1],[:],
101116fae4e5dSmrg        [if test x"$cross_compiling" != x"yes" ; then
101126fae4e5dSmrg            AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent],
101136fae4e5dSmrg                          [XORG_SGML_PATH=$prefix/share/sgml])
101146fae4e5dSmrg         fi])
101156fae4e5dSmrg    ])
101161f0ac6a5Smrg
101176fae4e5dSmrg# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing
101186fae4e5dSmrg# the path and the name of the doc stylesheet
101196fae4e5dSmrgif test "x$XORG_SGML_PATH" != "x" ; then
101206fae4e5dSmrg   AC_MSG_RESULT([$XORG_SGML_PATH])
101216fae4e5dSmrg   STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11
101226fae4e5dSmrg   XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl
101236fae4e5dSmrgelse
101246fae4e5dSmrg   AC_MSG_RESULT([no])
101256fae4e5dSmrgfi
101261f0ac6a5Smrg
101276fae4e5dSmrgAC_SUBST(XORG_SGML_PATH)
101286fae4e5dSmrgAC_SUBST(STYLESHEET_SRCDIR)
101296fae4e5dSmrgAC_SUBST(XSL_STYLESHEET)
101306fae4e5dSmrgAM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"])
101316fae4e5dSmrg]) # XORG_CHECK_SGML_DOCTOOLS
101321f0ac6a5Smrg
101336fae4e5dSmrg# XORG_CHECK_LINUXDOC
101346fae4e5dSmrg# -------------------
101356fae4e5dSmrg# Minimum version: 1.0.0
101366fae4e5dSmrg#
101376fae4e5dSmrg# Defines the variable MAKE_TEXT if the necessary tools and
101386fae4e5dSmrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt.
101396fae4e5dSmrg# Whether or not the necessary tools and files are found can be checked
101406fae4e5dSmrg# with the AM_CONDITIONAL "BUILD_LINUXDOC"
101416fae4e5dSmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[
101426fae4e5dSmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS])
101436fae4e5dSmrgAC_REQUIRE([XORG_WITH_PS2PDF])
101441f0ac6a5Smrg
101456fae4e5dSmrgAC_PATH_PROG(LINUXDOC, linuxdoc)
101461f0ac6a5Smrg
101476fae4e5dSmrgAC_MSG_CHECKING([whether to build documentation])
101481f0ac6a5Smrg
101496fae4e5dSmrgif test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then
101506fae4e5dSmrg   BUILDDOC=yes
101516fae4e5dSmrgelse
101526fae4e5dSmrg   BUILDDOC=no
101536fae4e5dSmrgfi
101541f0ac6a5Smrg
101556fae4e5dSmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes])
101561f0ac6a5Smrg
101576fae4e5dSmrgAC_MSG_RESULT([$BUILDDOC])
101581f0ac6a5Smrg
101596fae4e5dSmrgAC_MSG_CHECKING([whether to build pdf documentation])
101601f0ac6a5Smrg
101616fae4e5dSmrgif test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then
101626fae4e5dSmrg   BUILDPDFDOC=yes
101636fae4e5dSmrgelse
101646fae4e5dSmrg   BUILDPDFDOC=no
101656fae4e5dSmrgfi
101661f0ac6a5Smrg
101676fae4e5dSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
101681f0ac6a5Smrg
101696fae4e5dSmrgAC_MSG_RESULT([$BUILDPDFDOC])
101701f0ac6a5Smrg
101716fae4e5dSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f"
101726fae4e5dSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps"
101736fae4e5dSmrgMAKE_PDF="$PS2PDF"
101746fae4e5dSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC  -B html --split=0"
101751f0ac6a5Smrg
101766fae4e5dSmrgAC_SUBST(MAKE_TEXT)
101776fae4e5dSmrgAC_SUBST(MAKE_PS)
101786fae4e5dSmrgAC_SUBST(MAKE_PDF)
101796fae4e5dSmrgAC_SUBST(MAKE_HTML)
101806fae4e5dSmrg]) # XORG_CHECK_LINUXDOC
101811f0ac6a5Smrg
101826fae4e5dSmrg# XORG_CHECK_DOCBOOK
101836fae4e5dSmrg# -------------------
101846fae4e5dSmrg# Minimum version: 1.0.0
101856fae4e5dSmrg#
101866fae4e5dSmrg# Checks for the ability to build output formats from SGML DocBook source.
101876fae4e5dSmrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC"
101886fae4e5dSmrg# indicates whether the necessary tools and files are found and, if set,
101896fae4e5dSmrg# $(MAKE_XXX) blah.sgml will produce blah.xxx.
101906fae4e5dSmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[
101916fae4e5dSmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS])
101921f0ac6a5Smrg
101936fae4e5dSmrgBUILDTXTDOC=no
101946fae4e5dSmrgBUILDPDFDOC=no
101956fae4e5dSmrgBUILDPSDOC=no
101966fae4e5dSmrgBUILDHTMLDOC=no
101971f0ac6a5Smrg
101986fae4e5dSmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps)
101996fae4e5dSmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf)
102006fae4e5dSmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html)
102016fae4e5dSmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt)
102021f0ac6a5Smrg
102036fae4e5dSmrgAC_MSG_CHECKING([whether to build text documentation])
102046fae4e5dSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x &&
102056fae4e5dSmrg   test x$BUILD_TXTDOC != xno; then
102066fae4e5dSmrg	BUILDTXTDOC=yes
102076fae4e5dSmrgfi
102086fae4e5dSmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes])
102096fae4e5dSmrgAC_MSG_RESULT([$BUILDTXTDOC])
102101f0ac6a5Smrg
102116fae4e5dSmrgAC_MSG_CHECKING([whether to build PDF documentation])
102126fae4e5dSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x &&
102136fae4e5dSmrg   test x$BUILD_PDFDOC != xno; then
102146fae4e5dSmrg	BUILDPDFDOC=yes
102156fae4e5dSmrgfi
102166fae4e5dSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
102176fae4e5dSmrgAC_MSG_RESULT([$BUILDPDFDOC])
102181f0ac6a5Smrg
102196fae4e5dSmrgAC_MSG_CHECKING([whether to build PostScript documentation])
102206fae4e5dSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x &&
102216fae4e5dSmrg   test x$BUILD_PSDOC != xno; then
102226fae4e5dSmrg	BUILDPSDOC=yes
102236fae4e5dSmrgfi
102246fae4e5dSmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes])
102256fae4e5dSmrgAC_MSG_RESULT([$BUILDPSDOC])
102261f0ac6a5Smrg
102276fae4e5dSmrgAC_MSG_CHECKING([whether to build HTML documentation])
102286fae4e5dSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x &&
102296fae4e5dSmrg   test x$BUILD_HTMLDOC != xno; then
102306fae4e5dSmrg	BUILDHTMLDOC=yes
102316fae4e5dSmrgfi
102326fae4e5dSmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes])
102336fae4e5dSmrgAC_MSG_RESULT([$BUILDHTMLDOC])
102341f0ac6a5Smrg
102356fae4e5dSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT"
102366fae4e5dSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS"
102376fae4e5dSmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF"
102386fae4e5dSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML"
102391f0ac6a5Smrg
102406fae4e5dSmrgAC_SUBST(MAKE_TEXT)
102416fae4e5dSmrgAC_SUBST(MAKE_PS)
102426fae4e5dSmrgAC_SUBST(MAKE_PDF)
102436fae4e5dSmrgAC_SUBST(MAKE_HTML)
102446fae4e5dSmrg]) # XORG_CHECK_DOCBOOK
102451f0ac6a5Smrg
102466fae4e5dSmrg# XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT])
102476fae4e5dSmrg# ----------------
102486fae4e5dSmrg# Minimum version: 1.5.0
102496fae4e5dSmrg# Minimum version for optional DEFAULT argument: 1.11.0
102506fae4e5dSmrg#
102516fae4e5dSmrg# Documentation tools are not always available on all platforms and sometimes
102526fae4e5dSmrg# not at the appropriate level. This macro enables a module to test for the
102536fae4e5dSmrg# presence of the tool and obtain it's path in separate variables. Coupled with
102546fae4e5dSmrg# the --with-xmlto option, it allows maximum flexibilty in making decisions
102556fae4e5dSmrg# as whether or not to use the xmlto package. When DEFAULT is not specified,
102566fae4e5dSmrg# --with-xmlto assumes 'auto'.
102576fae4e5dSmrg#
102586fae4e5dSmrg# Interface to module:
102596fae4e5dSmrg# HAVE_XMLTO: 	used in makefiles to conditionally generate documentation
102606fae4e5dSmrg# XMLTO:	returns the path of the xmlto program found
102616fae4e5dSmrg#		returns the path set by the user in the environment
102626fae4e5dSmrg# --with-xmlto:	'yes' user instructs the module to use xmlto
102636fae4e5dSmrg#		'no' user instructs the module not to use xmlto
102646fae4e5dSmrg#
102656fae4e5dSmrg# Added in version 1.10.0
102666fae4e5dSmrg# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation
102676fae4e5dSmrg#                  xmlto for text output requires either lynx, links, or w3m browsers
102686fae4e5dSmrg#
102696fae4e5dSmrg# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path.
102706fae4e5dSmrg#
102716fae4e5dSmrgAC_DEFUN([XORG_WITH_XMLTO],[
102726fae4e5dSmrgAC_ARG_VAR([XMLTO], [Path to xmlto command])
102736fae4e5dSmrgm4_define([_defopt], m4_default([$2], [auto]))
102746fae4e5dSmrgAC_ARG_WITH(xmlto,
102756fae4e5dSmrg	AS_HELP_STRING([--with-xmlto],
102766fae4e5dSmrg	   [Use xmlto to regenerate documentation (default: ]_defopt[)]),
102776fae4e5dSmrg	   [use_xmlto=$withval], [use_xmlto=]_defopt)
102786fae4e5dSmrgm4_undefine([_defopt])
102799c9ff80cSmrg
102806fae4e5dSmrgif test "x$use_xmlto" = x"auto"; then
102816fae4e5dSmrg   AC_PATH_PROG([XMLTO], [xmlto])
102826fae4e5dSmrg   if test "x$XMLTO" = "x"; then
102836fae4e5dSmrg        AC_MSG_WARN([xmlto not found - documentation targets will be skipped])
102846fae4e5dSmrg	have_xmlto=no
102856fae4e5dSmrg   else
102866fae4e5dSmrg        have_xmlto=yes
102876fae4e5dSmrg   fi
102886fae4e5dSmrgelif test "x$use_xmlto" = x"yes" ; then
102896fae4e5dSmrg   AC_PATH_PROG([XMLTO], [xmlto])
102906fae4e5dSmrg   if test "x$XMLTO" = "x"; then
102916fae4e5dSmrg        AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH])
102926fae4e5dSmrg   fi
102936fae4e5dSmrg   have_xmlto=yes
102946fae4e5dSmrgelif test "x$use_xmlto" = x"no" ; then
102956fae4e5dSmrg   if test "x$XMLTO" != "x"; then
102966fae4e5dSmrg      AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified])
102976fae4e5dSmrg   fi
102986fae4e5dSmrg   have_xmlto=no
102996fae4e5dSmrgelse
103006fae4e5dSmrg   AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no'])
103016fae4e5dSmrgfi
103026fae4e5dSmrg
103036fae4e5dSmrg# Test for a minimum version of xmlto, if provided.
103046fae4e5dSmrgm4_ifval([$1],
103056fae4e5dSmrg[if test "$have_xmlto" = yes; then
103066fae4e5dSmrg    # scrape the xmlto version
103076fae4e5dSmrg    AC_MSG_CHECKING([the xmlto version])
103086fae4e5dSmrg    xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3`
103096fae4e5dSmrg    AC_MSG_RESULT([$xmlto_version])
103106fae4e5dSmrg    AS_VERSION_COMPARE([$xmlto_version], [$1],
103116fae4e5dSmrg        [if test "x$use_xmlto" = xauto; then
103126fae4e5dSmrg            AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed])
103136fae4e5dSmrg            have_xmlto=no
103146fae4e5dSmrg        else
103156fae4e5dSmrg            AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed])
103166fae4e5dSmrg        fi])
103176fae4e5dSmrgfi])
103186fae4e5dSmrg
103196fae4e5dSmrg# Test for the ability of xmlto to generate a text target
103206fae4e5dSmrghave_xmlto_text=no
103216fae4e5dSmrgcat > conftest.xml << "EOF"
103226fae4e5dSmrgEOF
103236fae4e5dSmrgAS_IF([test "$have_xmlto" = yes],
103246fae4e5dSmrg      [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1],
103256fae4e5dSmrg             [have_xmlto_text=yes],
103266fae4e5dSmrg             [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])])
103276fae4e5dSmrgrm -f conftest.xml
103286fae4e5dSmrgAM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes])
103296fae4e5dSmrgAM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes])
103306fae4e5dSmrg]) # XORG_WITH_XMLTO
103316fae4e5dSmrg
103326fae4e5dSmrg# XORG_WITH_XSLTPROC([MIN-VERSION], [DEFAULT])
103336fae4e5dSmrg# --------------------------------------------
103346fae4e5dSmrg# Minimum version: 1.12.0
103356fae4e5dSmrg# Minimum version for optional DEFAULT argument: 1.12.0
103366fae4e5dSmrg#
103376fae4e5dSmrg# XSLT (Extensible Stylesheet Language Transformations) is a declarative,
103386fae4e5dSmrg# XML-based language used for the transformation of XML documents.
103396fae4e5dSmrg# The xsltproc command line tool is for applying XSLT stylesheets to XML documents.
103406fae4e5dSmrg# It is used under the cover by xmlto to generate html files from DocBook/XML.
103416fae4e5dSmrg# The XSLT processor is often used as a standalone tool for transformations.
103426fae4e5dSmrg# It should not be assumed that this tool is used only to work with documnetation.
103436fae4e5dSmrg# When DEFAULT is not specified, --with-xsltproc assumes 'auto'.
103446fae4e5dSmrg#
103456fae4e5dSmrg# Interface to module:
103466fae4e5dSmrg# HAVE_XSLTPROC: used in makefiles to conditionally generate documentation
103476fae4e5dSmrg# XSLTPROC:	 returns the path of the xsltproc program found
103486fae4e5dSmrg#		 returns the path set by the user in the environment
103496fae4e5dSmrg# --with-xsltproc: 'yes' user instructs the module to use xsltproc
103506fae4e5dSmrg#		  'no' user instructs the module not to use xsltproc
103516fae4e5dSmrg# have_xsltproc: returns yes if xsltproc found in PATH or no
103526fae4e5dSmrg#
103536fae4e5dSmrg# If the user sets the value of XSLTPROC, AC_PATH_PROG skips testing the path.
103546fae4e5dSmrg#
103556fae4e5dSmrgAC_DEFUN([XORG_WITH_XSLTPROC],[
103566fae4e5dSmrgAC_ARG_VAR([XSLTPROC], [Path to xsltproc command])
103576fae4e5dSmrg# Preserves the interface, should it be implemented later
103586fae4e5dSmrgm4_ifval([$1], [m4_warn([syntax], [Checking for xsltproc MIN-VERSION is not implemented])])
103596fae4e5dSmrgm4_define([_defopt], m4_default([$2], [auto]))
103606fae4e5dSmrgAC_ARG_WITH(xsltproc,
103616fae4e5dSmrg	AS_HELP_STRING([--with-xsltproc],
103626fae4e5dSmrg	   [Use xsltproc for the transformation of XML documents (default: ]_defopt[)]),
103636fae4e5dSmrg	   [use_xsltproc=$withval], [use_xsltproc=]_defopt)
103646fae4e5dSmrgm4_undefine([_defopt])
103656fae4e5dSmrg
103666fae4e5dSmrgif test "x$use_xsltproc" = x"auto"; then
103676fae4e5dSmrg   AC_PATH_PROG([XSLTPROC], [xsltproc])
103686fae4e5dSmrg   if test "x$XSLTPROC" = "x"; then
103696fae4e5dSmrg        AC_MSG_WARN([xsltproc not found - cannot transform XML documents])
103706fae4e5dSmrg	have_xsltproc=no
103716fae4e5dSmrg   else
103726fae4e5dSmrg        have_xsltproc=yes
103736fae4e5dSmrg   fi
103746fae4e5dSmrgelif test "x$use_xsltproc" = x"yes" ; then
103756fae4e5dSmrg   AC_PATH_PROG([XSLTPROC], [xsltproc])
103766fae4e5dSmrg   if test "x$XSLTPROC" = "x"; then
103776fae4e5dSmrg        AC_MSG_ERROR([--with-xsltproc=yes specified but xsltproc not found in PATH])
103786fae4e5dSmrg   fi
103796fae4e5dSmrg   have_xsltproc=yes
103806fae4e5dSmrgelif test "x$use_xsltproc" = x"no" ; then
103816fae4e5dSmrg   if test "x$XSLTPROC" != "x"; then
103826fae4e5dSmrg      AC_MSG_WARN([ignoring XSLTPROC environment variable since --with-xsltproc=no was specified])
103836fae4e5dSmrg   fi
103846fae4e5dSmrg   have_xsltproc=no
103856fae4e5dSmrgelse
103866fae4e5dSmrg   AC_MSG_ERROR([--with-xsltproc expects 'yes' or 'no'])
103876fae4e5dSmrgfi
103881f0ac6a5Smrg
103896fae4e5dSmrgAM_CONDITIONAL([HAVE_XSLTPROC], [test "$have_xsltproc" = yes])
103906fae4e5dSmrg]) # XORG_WITH_XSLTPROC
103911f0ac6a5Smrg
103926fae4e5dSmrg# XORG_WITH_PERL([MIN-VERSION], [DEFAULT])
103936fae4e5dSmrg# ----------------------------------------
103946fae4e5dSmrg# Minimum version: 1.15.0
103956fae4e5dSmrg#
103966fae4e5dSmrg# PERL (Practical Extraction and Report Language) is a language optimized for
103976fae4e5dSmrg# scanning arbitrary text files, extracting information from those text files,
103986fae4e5dSmrg# and printing reports based on that information.
103996fae4e5dSmrg#
104006fae4e5dSmrg# When DEFAULT is not specified, --with-perl assumes 'auto'.
104016fae4e5dSmrg#
104026fae4e5dSmrg# Interface to module:
104036fae4e5dSmrg# HAVE_PERL: used in makefiles to conditionally scan text files
104046fae4e5dSmrg# PERL:	     returns the path of the perl program found
104056fae4e5dSmrg#	     returns the path set by the user in the environment
104066fae4e5dSmrg# --with-perl: 'yes' user instructs the module to use perl
104076fae4e5dSmrg#	       'no' user instructs the module not to use perl
104086fae4e5dSmrg# have_perl: returns yes if perl found in PATH or no
104096fae4e5dSmrg#
104106fae4e5dSmrg# If the user sets the value of PERL, AC_PATH_PROG skips testing the path.
104116fae4e5dSmrg#
104126fae4e5dSmrgAC_DEFUN([XORG_WITH_PERL],[
104136fae4e5dSmrgAC_ARG_VAR([PERL], [Path to perl command])
104146fae4e5dSmrg# Preserves the interface, should it be implemented later
104156fae4e5dSmrgm4_ifval([$1], [m4_warn([syntax], [Checking for perl MIN-VERSION is not implemented])])
104166fae4e5dSmrgm4_define([_defopt], m4_default([$2], [auto]))
104176fae4e5dSmrgAC_ARG_WITH(perl,
104186fae4e5dSmrg	AS_HELP_STRING([--with-perl],
104196fae4e5dSmrg	   [Use perl for extracting information from files (default: ]_defopt[)]),
104206fae4e5dSmrg	   [use_perl=$withval], [use_perl=]_defopt)
104216fae4e5dSmrgm4_undefine([_defopt])
104226fae4e5dSmrg
104236fae4e5dSmrgif test "x$use_perl" = x"auto"; then
104246fae4e5dSmrg   AC_PATH_PROG([PERL], [perl])
104256fae4e5dSmrg   if test "x$PERL" = "x"; then
104266fae4e5dSmrg        AC_MSG_WARN([perl not found - cannot extract information and report])
104276fae4e5dSmrg	have_perl=no
104286fae4e5dSmrg   else
104296fae4e5dSmrg        have_perl=yes
104306fae4e5dSmrg   fi
104316fae4e5dSmrgelif test "x$use_perl" = x"yes" ; then
104326fae4e5dSmrg   AC_PATH_PROG([PERL], [perl])
104336fae4e5dSmrg   if test "x$PERL" = "x"; then
104346fae4e5dSmrg        AC_MSG_ERROR([--with-perl=yes specified but perl not found in PATH])
104356fae4e5dSmrg   fi
104366fae4e5dSmrg   have_perl=yes
104376fae4e5dSmrgelif test "x$use_perl" = x"no" ; then
104386fae4e5dSmrg   if test "x$PERL" != "x"; then
104396fae4e5dSmrg      AC_MSG_WARN([ignoring PERL environment variable since --with-perl=no was specified])
104406fae4e5dSmrg   fi
104416fae4e5dSmrg   have_perl=no
104426fae4e5dSmrgelse
104436fae4e5dSmrg   AC_MSG_ERROR([--with-perl expects 'yes' or 'no'])
104446fae4e5dSmrgfi
104451f0ac6a5Smrg
104466fae4e5dSmrgAM_CONDITIONAL([HAVE_PERL], [test "$have_perl" = yes])
104476fae4e5dSmrg]) # XORG_WITH_PERL
104481f0ac6a5Smrg
104496fae4e5dSmrg# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT])
104506fae4e5dSmrg# ----------------
104516fae4e5dSmrg# Minimum version: 1.5.0
104526fae4e5dSmrg# Minimum version for optional DEFAULT argument: 1.11.0
104536fae4e5dSmrg#
104546fae4e5dSmrg# Documentation tools are not always available on all platforms and sometimes
104556fae4e5dSmrg# not at the appropriate level. This macro enables a module to test for the
104566fae4e5dSmrg# presence of the tool and obtain it's path in separate variables. Coupled with
104576fae4e5dSmrg# the --with-asciidoc option, it allows maximum flexibilty in making decisions
104586fae4e5dSmrg# as whether or not to use the asciidoc package. When DEFAULT is not specified,
104596fae4e5dSmrg# --with-asciidoc assumes 'auto'.
104606fae4e5dSmrg#
104616fae4e5dSmrg# Interface to module:
104626fae4e5dSmrg# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation
104636fae4e5dSmrg# ASCIIDOC:	 returns the path of the asciidoc program found
104646fae4e5dSmrg#		 returns the path set by the user in the environment
104656fae4e5dSmrg# --with-asciidoc: 'yes' user instructs the module to use asciidoc
104666fae4e5dSmrg#		  'no' user instructs the module not to use asciidoc
104676fae4e5dSmrg#
104686fae4e5dSmrg# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path.
104696fae4e5dSmrg#
104706fae4e5dSmrgAC_DEFUN([XORG_WITH_ASCIIDOC],[
104716fae4e5dSmrgAC_ARG_VAR([ASCIIDOC], [Path to asciidoc command])
104726fae4e5dSmrgm4_define([_defopt], m4_default([$2], [auto]))
104736fae4e5dSmrgAC_ARG_WITH(asciidoc,
104746fae4e5dSmrg	AS_HELP_STRING([--with-asciidoc],
104756fae4e5dSmrg	   [Use asciidoc to regenerate documentation (default: ]_defopt[)]),
104766fae4e5dSmrg	   [use_asciidoc=$withval], [use_asciidoc=]_defopt)
104776fae4e5dSmrgm4_undefine([_defopt])
104781f0ac6a5Smrg
104796fae4e5dSmrgif test "x$use_asciidoc" = x"auto"; then
104806fae4e5dSmrg   AC_PATH_PROG([ASCIIDOC], [asciidoc])
104816fae4e5dSmrg   if test "x$ASCIIDOC" = "x"; then
104826fae4e5dSmrg        AC_MSG_WARN([asciidoc not found - documentation targets will be skipped])
104836fae4e5dSmrg	have_asciidoc=no
104846fae4e5dSmrg   else
104856fae4e5dSmrg        have_asciidoc=yes
104866fae4e5dSmrg   fi
104876fae4e5dSmrgelif test "x$use_asciidoc" = x"yes" ; then
104886fae4e5dSmrg   AC_PATH_PROG([ASCIIDOC], [asciidoc])
104896fae4e5dSmrg   if test "x$ASCIIDOC" = "x"; then
104906fae4e5dSmrg        AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH])
104916fae4e5dSmrg   fi
104926fae4e5dSmrg   have_asciidoc=yes
104936fae4e5dSmrgelif test "x$use_asciidoc" = x"no" ; then
104946fae4e5dSmrg   if test "x$ASCIIDOC" != "x"; then
104956fae4e5dSmrg      AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified])
104966fae4e5dSmrg   fi
104976fae4e5dSmrg   have_asciidoc=no
104986fae4e5dSmrgelse
104996fae4e5dSmrg   AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no'])
105006fae4e5dSmrgfi
105016fae4e5dSmrgm4_ifval([$1],
105026fae4e5dSmrg[if test "$have_asciidoc" = yes; then
105036fae4e5dSmrg    # scrape the asciidoc version
105046fae4e5dSmrg    AC_MSG_CHECKING([the asciidoc version])
105056fae4e5dSmrg    asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2`
105066fae4e5dSmrg    AC_MSG_RESULT([$asciidoc_version])
105076fae4e5dSmrg    AS_VERSION_COMPARE([$asciidoc_version], [$1],
105086fae4e5dSmrg        [if test "x$use_asciidoc" = xauto; then
105096fae4e5dSmrg            AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed])
105106fae4e5dSmrg            have_asciidoc=no
105116fae4e5dSmrg        else
105126fae4e5dSmrg            AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed])
105136fae4e5dSmrg        fi])
105146fae4e5dSmrgfi])
105156fae4e5dSmrgAM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes])
105166fae4e5dSmrg]) # XORG_WITH_ASCIIDOC
105171f0ac6a5Smrg
105186fae4e5dSmrg# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT])
10519b9867631Smrg# -------------------------------------------
105206fae4e5dSmrg# Minimum version: 1.5.0
105216fae4e5dSmrg# Minimum version for optional DEFAULT argument: 1.11.0
10522b9867631Smrg# Minimum version for optional DOT checking: 1.18.0
105236fae4e5dSmrg#
105246fae4e5dSmrg# Documentation tools are not always available on all platforms and sometimes
105256fae4e5dSmrg# not at the appropriate level. This macro enables a module to test for the
105266fae4e5dSmrg# presence of the tool and obtain it's path in separate variables. Coupled with
105276fae4e5dSmrg# the --with-doxygen option, it allows maximum flexibilty in making decisions
105286fae4e5dSmrg# as whether or not to use the doxygen package. When DEFAULT is not specified,
105296fae4e5dSmrg# --with-doxygen assumes 'auto'.
105306fae4e5dSmrg#
105316fae4e5dSmrg# Interface to module:
105326fae4e5dSmrg# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation
105336fae4e5dSmrg# DOXYGEN:	 returns the path of the doxygen program found
105346fae4e5dSmrg#		 returns the path set by the user in the environment
105356fae4e5dSmrg# --with-doxygen: 'yes' user instructs the module to use doxygen
105366fae4e5dSmrg#		  'no' user instructs the module not to use doxygen
105376fae4e5dSmrg#
105386fae4e5dSmrg# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path.
105396fae4e5dSmrg#
105406fae4e5dSmrgAC_DEFUN([XORG_WITH_DOXYGEN],[
105416fae4e5dSmrgAC_ARG_VAR([DOXYGEN], [Path to doxygen command])
10542b9867631SmrgAC_ARG_VAR([DOT], [Path to the dot graphics utility])
105436fae4e5dSmrgm4_define([_defopt], m4_default([$2], [auto]))
105446fae4e5dSmrgAC_ARG_WITH(doxygen,
105456fae4e5dSmrg	AS_HELP_STRING([--with-doxygen],
105466fae4e5dSmrg	   [Use doxygen to regenerate documentation (default: ]_defopt[)]),
105476fae4e5dSmrg	   [use_doxygen=$withval], [use_doxygen=]_defopt)
105486fae4e5dSmrgm4_undefine([_defopt])
105491f0ac6a5Smrg
105506fae4e5dSmrgif test "x$use_doxygen" = x"auto"; then
105516fae4e5dSmrg   AC_PATH_PROG([DOXYGEN], [doxygen])
105526fae4e5dSmrg   if test "x$DOXYGEN" = "x"; then
105536fae4e5dSmrg        AC_MSG_WARN([doxygen not found - documentation targets will be skipped])
105546fae4e5dSmrg	have_doxygen=no
105556fae4e5dSmrg   else
105566fae4e5dSmrg        have_doxygen=yes
105576fae4e5dSmrg   fi
105586fae4e5dSmrgelif test "x$use_doxygen" = x"yes" ; then
105596fae4e5dSmrg   AC_PATH_PROG([DOXYGEN], [doxygen])
105606fae4e5dSmrg   if test "x$DOXYGEN" = "x"; then
105616fae4e5dSmrg        AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH])
105626fae4e5dSmrg   fi
105636fae4e5dSmrg   have_doxygen=yes
105646fae4e5dSmrgelif test "x$use_doxygen" = x"no" ; then
105656fae4e5dSmrg   if test "x$DOXYGEN" != "x"; then
105666fae4e5dSmrg      AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified])
105676fae4e5dSmrg   fi
105686fae4e5dSmrg   have_doxygen=no
105696fae4e5dSmrgelse
105706fae4e5dSmrg   AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no'])
105716fae4e5dSmrgfi
105726fae4e5dSmrgm4_ifval([$1],
105736fae4e5dSmrg[if test "$have_doxygen" = yes; then
105746fae4e5dSmrg    # scrape the doxygen version
105756fae4e5dSmrg    AC_MSG_CHECKING([the doxygen version])
105766fae4e5dSmrg    doxygen_version=`$DOXYGEN --version 2>/dev/null`
105776fae4e5dSmrg    AC_MSG_RESULT([$doxygen_version])
105786fae4e5dSmrg    AS_VERSION_COMPARE([$doxygen_version], [$1],
105796fae4e5dSmrg        [if test "x$use_doxygen" = xauto; then
105806fae4e5dSmrg            AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed])
105816fae4e5dSmrg            have_doxygen=no
105826fae4e5dSmrg        else
105836fae4e5dSmrg            AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed])
105846fae4e5dSmrg        fi])
105856fae4e5dSmrgfi])
10586b9867631Smrg
10587b9867631Smrgdnl Check for DOT if we have doxygen. The caller decides if it is mandatory
10588b9867631Smrgdnl HAVE_DOT is a variable that can be used in your doxygen.in config file:
10589b9867631Smrgdnl 	HAVE_DOT = @HAVE_DOT@
10590b9867631SmrgHAVE_DOT=no
10591b9867631Smrgif test "x$have_doxygen" = "xyes"; then
10592b9867631Smrg  AC_PATH_PROG([DOT], [dot])
10593b9867631Smrg    if test "x$DOT" != "x"; then
10594b9867631Smrg      HAVE_DOT=yes
10595b9867631Smrg    fi
10596b9867631Smrgfi
10597b9867631Smrg
10598b9867631SmrgAC_SUBST([HAVE_DOT])
10599b9867631SmrgAM_CONDITIONAL([HAVE_DOT], [test "$HAVE_DOT" = "yes"])
106006fae4e5dSmrgAM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes])
106016fae4e5dSmrg]) # XORG_WITH_DOXYGEN
106029c9ff80cSmrg
106036fae4e5dSmrg# XORG_WITH_GROFF([DEFAULT])
106046fae4e5dSmrg# ----------------
106056fae4e5dSmrg# Minimum version: 1.6.0
106066fae4e5dSmrg# Minimum version for optional DEFAULT argument: 1.11.0
106076fae4e5dSmrg#
106086fae4e5dSmrg# Documentation tools are not always available on all platforms and sometimes
106096fae4e5dSmrg# not at the appropriate level. This macro enables a module to test for the
106106fae4e5dSmrg# presence of the tool and obtain it's path in separate variables. Coupled with
106116fae4e5dSmrg# the --with-groff option, it allows maximum flexibilty in making decisions
106126fae4e5dSmrg# as whether or not to use the groff package. When DEFAULT is not specified,
106136fae4e5dSmrg# --with-groff assumes 'auto'.
106146fae4e5dSmrg#
106156fae4e5dSmrg# Interface to module:
106166fae4e5dSmrg# HAVE_GROFF:	 used in makefiles to conditionally generate documentation
106176fae4e5dSmrg# HAVE_GROFF_MM: the memorandum macros (-mm) package
106186fae4e5dSmrg# HAVE_GROFF_MS: the -ms macros package
106196fae4e5dSmrg# GROFF:	 returns the path of the groff program found
106206fae4e5dSmrg#		 returns the path set by the user in the environment
106216fae4e5dSmrg# --with-groff:	 'yes' user instructs the module to use groff
106226fae4e5dSmrg#		 'no' user instructs the module not to use groff
106236fae4e5dSmrg#
106246fae4e5dSmrg# Added in version 1.9.0:
106256fae4e5dSmrg# HAVE_GROFF_HTML: groff has dependencies to output HTML format:
106266fae4e5dSmrg#		   pnmcut pnmcrop pnmtopng pnmtops from the netpbm package.
106276fae4e5dSmrg#		   psselect from the psutils package.
106286fae4e5dSmrg#		   the ghostcript package. Refer to the grohtml man pages
106296fae4e5dSmrg#
106306fae4e5dSmrg# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path.
106316fae4e5dSmrg#
106326fae4e5dSmrg# OS and distros often splits groff in a basic and full package, the former
106336fae4e5dSmrg# having the groff program and the later having devices, fonts and macros
106346fae4e5dSmrg# Checking for the groff executable is not enough.
106356fae4e5dSmrg#
106366fae4e5dSmrg# If macros are missing, we cannot assume that groff is useless, so we don't
106376fae4e5dSmrg# unset HAVE_GROFF or GROFF env variables.
106386fae4e5dSmrg# HAVE_GROFF_?? can never be true while HAVE_GROFF is false.
106396fae4e5dSmrg#
106406fae4e5dSmrgAC_DEFUN([XORG_WITH_GROFF],[
106416fae4e5dSmrgAC_ARG_VAR([GROFF], [Path to groff command])
106426fae4e5dSmrgm4_define([_defopt], m4_default([$1], [auto]))
106436fae4e5dSmrgAC_ARG_WITH(groff,
106446fae4e5dSmrg	AS_HELP_STRING([--with-groff],
106456fae4e5dSmrg	   [Use groff to regenerate documentation (default: ]_defopt[)]),
106466fae4e5dSmrg	   [use_groff=$withval], [use_groff=]_defopt)
106476fae4e5dSmrgm4_undefine([_defopt])
106489c9ff80cSmrg
106496fae4e5dSmrgif test "x$use_groff" = x"auto"; then
106506fae4e5dSmrg   AC_PATH_PROG([GROFF], [groff])
106516fae4e5dSmrg   if test "x$GROFF" = "x"; then
106526fae4e5dSmrg        AC_MSG_WARN([groff not found - documentation targets will be skipped])
106536fae4e5dSmrg	have_groff=no
106546fae4e5dSmrg   else
106556fae4e5dSmrg        have_groff=yes
106566fae4e5dSmrg   fi
106576fae4e5dSmrgelif test "x$use_groff" = x"yes" ; then
106586fae4e5dSmrg   AC_PATH_PROG([GROFF], [groff])
106596fae4e5dSmrg   if test "x$GROFF" = "x"; then
106606fae4e5dSmrg        AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH])
106616fae4e5dSmrg   fi
106626fae4e5dSmrg   have_groff=yes
106636fae4e5dSmrgelif test "x$use_groff" = x"no" ; then
106646fae4e5dSmrg   if test "x$GROFF" != "x"; then
106656fae4e5dSmrg      AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified])
106666fae4e5dSmrg   fi
106676fae4e5dSmrg   have_groff=no
106686fae4e5dSmrgelse
106696fae4e5dSmrg   AC_MSG_ERROR([--with-groff expects 'yes' or 'no'])
106706fae4e5dSmrgfi
106711f0ac6a5Smrg
106726fae4e5dSmrg# We have groff, test for the presence of the macro packages
106736fae4e5dSmrgif test "x$have_groff" = x"yes"; then
106746fae4e5dSmrg    AC_MSG_CHECKING([for ${GROFF} -ms macros])
106756fae4e5dSmrg    if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then
106766fae4e5dSmrg        groff_ms_works=yes
106776fae4e5dSmrg    else
106786fae4e5dSmrg        groff_ms_works=no
106796fae4e5dSmrg    fi
106806fae4e5dSmrg    AC_MSG_RESULT([$groff_ms_works])
106816fae4e5dSmrg    AC_MSG_CHECKING([for ${GROFF} -mm macros])
106826fae4e5dSmrg    if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then
106836fae4e5dSmrg        groff_mm_works=yes
106846fae4e5dSmrg    else
106856fae4e5dSmrg        groff_mm_works=no
106866fae4e5dSmrg    fi
106876fae4e5dSmrg    AC_MSG_RESULT([$groff_mm_works])
106886fae4e5dSmrgfi
106891f0ac6a5Smrg
106906fae4e5dSmrg# We have groff, test for HTML dependencies, one command per package
106916fae4e5dSmrgif test "x$have_groff" = x"yes"; then
106926fae4e5dSmrg   AC_PATH_PROGS(GS_PATH, [gs gswin32c])
106936fae4e5dSmrg   AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng])
106946fae4e5dSmrg   AC_PATH_PROG(PSSELECT_PATH, [psselect])
106956fae4e5dSmrg   if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then
106966fae4e5dSmrg      have_groff_html=yes
106976fae4e5dSmrg   else
106986fae4e5dSmrg      have_groff_html=no
106996fae4e5dSmrg      AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages])
107006fae4e5dSmrg   fi
107016fae4e5dSmrgfi
107021f0ac6a5Smrg
107036fae4e5dSmrg# Set Automake conditionals for Makefiles
107046fae4e5dSmrgAM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes])
107056fae4e5dSmrgAM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes])
107066fae4e5dSmrgAM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes])
107076fae4e5dSmrgAM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes])
107086fae4e5dSmrg]) # XORG_WITH_GROFF
107099c9ff80cSmrg
107106fae4e5dSmrg# XORG_WITH_FOP([MIN-VERSION], [DEFAULT])
107116fae4e5dSmrg# ---------------------------------------
107126fae4e5dSmrg# Minimum version: 1.6.0
107136fae4e5dSmrg# Minimum version for optional DEFAULT argument: 1.11.0
107146fae4e5dSmrg# Minimum version for optional MIN-VERSION argument: 1.15.0
107156fae4e5dSmrg#
107166fae4e5dSmrg# Documentation tools are not always available on all platforms and sometimes
107176fae4e5dSmrg# not at the appropriate level. This macro enables a module to test for the
107186fae4e5dSmrg# presence of the tool and obtain it's path in separate variables. Coupled with
107196fae4e5dSmrg# the --with-fop option, it allows maximum flexibilty in making decisions
107206fae4e5dSmrg# as whether or not to use the fop package. When DEFAULT is not specified,
107216fae4e5dSmrg# --with-fop assumes 'auto'.
107226fae4e5dSmrg#
107236fae4e5dSmrg# Interface to module:
107246fae4e5dSmrg# HAVE_FOP: 	used in makefiles to conditionally generate documentation
107256fae4e5dSmrg# FOP:	 	returns the path of the fop program found
107266fae4e5dSmrg#		returns the path set by the user in the environment
107276fae4e5dSmrg# --with-fop: 	'yes' user instructs the module to use fop
107286fae4e5dSmrg#		'no' user instructs the module not to use fop
107296fae4e5dSmrg#
107306fae4e5dSmrg# If the user sets the value of FOP, AC_PATH_PROG skips testing the path.
107316fae4e5dSmrg#
107326fae4e5dSmrgAC_DEFUN([XORG_WITH_FOP],[
107336fae4e5dSmrgAC_ARG_VAR([FOP], [Path to fop command])
107346fae4e5dSmrgm4_define([_defopt], m4_default([$2], [auto]))
107356fae4e5dSmrgAC_ARG_WITH(fop,
107366fae4e5dSmrg	AS_HELP_STRING([--with-fop],
107376fae4e5dSmrg	   [Use fop to regenerate documentation (default: ]_defopt[)]),
107386fae4e5dSmrg	   [use_fop=$withval], [use_fop=]_defopt)
107396fae4e5dSmrgm4_undefine([_defopt])
107409c9ff80cSmrg
107416fae4e5dSmrgif test "x$use_fop" = x"auto"; then
107426fae4e5dSmrg   AC_PATH_PROG([FOP], [fop])
107436fae4e5dSmrg   if test "x$FOP" = "x"; then
107446fae4e5dSmrg        AC_MSG_WARN([fop not found - documentation targets will be skipped])
107456fae4e5dSmrg	have_fop=no
107466fae4e5dSmrg   else
107476fae4e5dSmrg        have_fop=yes
107486fae4e5dSmrg   fi
107496fae4e5dSmrgelif test "x$use_fop" = x"yes" ; then
107506fae4e5dSmrg   AC_PATH_PROG([FOP], [fop])
107516fae4e5dSmrg   if test "x$FOP" = "x"; then
107526fae4e5dSmrg        AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH])
107536fae4e5dSmrg   fi
107546fae4e5dSmrg   have_fop=yes
107556fae4e5dSmrgelif test "x$use_fop" = x"no" ; then
107566fae4e5dSmrg   if test "x$FOP" != "x"; then
107576fae4e5dSmrg      AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified])
107586fae4e5dSmrg   fi
107596fae4e5dSmrg   have_fop=no
107606fae4e5dSmrgelse
107616fae4e5dSmrg   AC_MSG_ERROR([--with-fop expects 'yes' or 'no'])
107626fae4e5dSmrgfi
107631f0ac6a5Smrg
107646fae4e5dSmrg# Test for a minimum version of fop, if provided.
107656fae4e5dSmrgm4_ifval([$1],
107666fae4e5dSmrg[if test "$have_fop" = yes; then
107676fae4e5dSmrg    # scrape the fop version
107686fae4e5dSmrg    AC_MSG_CHECKING([for fop minimum version])
107696fae4e5dSmrg    fop_version=`$FOP -version 2>/dev/null | cut -d' ' -f3`
107706fae4e5dSmrg    AC_MSG_RESULT([$fop_version])
107716fae4e5dSmrg    AS_VERSION_COMPARE([$fop_version], [$1],
107726fae4e5dSmrg        [if test "x$use_fop" = xauto; then
107736fae4e5dSmrg            AC_MSG_WARN([fop version $fop_version found, but $1 needed])
107746fae4e5dSmrg            have_fop=no
107756fae4e5dSmrg        else
107766fae4e5dSmrg            AC_MSG_ERROR([fop version $fop_version found, but $1 needed])
107776fae4e5dSmrg        fi])
107786fae4e5dSmrgfi])
107796fae4e5dSmrgAM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes])
107806fae4e5dSmrg]) # XORG_WITH_FOP
107811f0ac6a5Smrg
10782b9867631Smrg# XORG_WITH_M4([MIN-VERSION])
10783b9867631Smrg# ---------------------------
10784b9867631Smrg# Minimum version: 1.19.0
10785b9867631Smrg#
10786b9867631Smrg# This macro attempts to locate an m4 macro processor which supports
10787b9867631Smrg# -I option and is only useful for modules relying on M4 in order to
10788b9867631Smrg# expand macros in source code files.
10789b9867631Smrg#
10790b9867631Smrg# Interface to module:
10791b9867631Smrg# M4:	 	returns the path of the m4 program found
10792b9867631Smrg#		returns the path set by the user in the environment
10793b9867631Smrg#
10794b9867631SmrgAC_DEFUN([XORG_WITH_M4], [
10795b9867631SmrgAC_CACHE_CHECK([for m4 that supports -I option], [ac_cv_path_M4],
10796b9867631Smrg   [AC_PATH_PROGS_FEATURE_CHECK([M4], [m4 gm4],
10797b9867631Smrg       [[$ac_path_M4 -I. /dev/null > /dev/null 2>&1 && \
10798b9867631Smrg         ac_cv_path_M4=$ac_path_M4 ac_path_M4_found=:]],
10799b9867631Smrg   [AC_MSG_ERROR([could not find m4 that supports -I option])],
10800b9867631Smrg   [$PATH:/usr/gnu/bin])])
10801b9867631Smrg
10802b9867631SmrgAC_SUBST([M4], [$ac_cv_path_M4])
10803b9867631Smrg]) # XORG_WITH_M4
10804b9867631Smrg
108056fae4e5dSmrg# XORG_WITH_PS2PDF([DEFAULT])
108066fae4e5dSmrg# ----------------
108076fae4e5dSmrg# Minimum version: 1.6.0
108086fae4e5dSmrg# Minimum version for optional DEFAULT argument: 1.11.0
108096fae4e5dSmrg#
108106fae4e5dSmrg# Documentation tools are not always available on all platforms and sometimes
108116fae4e5dSmrg# not at the appropriate level. This macro enables a module to test for the
108126fae4e5dSmrg# presence of the tool and obtain it's path in separate variables. Coupled with
108136fae4e5dSmrg# the --with-ps2pdf option, it allows maximum flexibilty in making decisions
108146fae4e5dSmrg# as whether or not to use the ps2pdf package. When DEFAULT is not specified,
108156fae4e5dSmrg# --with-ps2pdf assumes 'auto'.
108166fae4e5dSmrg#
108176fae4e5dSmrg# Interface to module:
108186fae4e5dSmrg# HAVE_PS2PDF: 	used in makefiles to conditionally generate documentation
108196fae4e5dSmrg# PS2PDF:	returns the path of the ps2pdf program found
108206fae4e5dSmrg#		returns the path set by the user in the environment
108216fae4e5dSmrg# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf
108226fae4e5dSmrg#		 'no' user instructs the module not to use ps2pdf
108236fae4e5dSmrg#
108246fae4e5dSmrg# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path.
108256fae4e5dSmrg#
108266fae4e5dSmrgAC_DEFUN([XORG_WITH_PS2PDF],[
108276fae4e5dSmrgAC_ARG_VAR([PS2PDF], [Path to ps2pdf command])
108286fae4e5dSmrgm4_define([_defopt], m4_default([$1], [auto]))
108296fae4e5dSmrgAC_ARG_WITH(ps2pdf,
108306fae4e5dSmrg	AS_HELP_STRING([--with-ps2pdf],
108316fae4e5dSmrg	   [Use ps2pdf to regenerate documentation (default: ]_defopt[)]),
108326fae4e5dSmrg	   [use_ps2pdf=$withval], [use_ps2pdf=]_defopt)
108336fae4e5dSmrgm4_undefine([_defopt])
108341f0ac6a5Smrg
108356fae4e5dSmrgif test "x$use_ps2pdf" = x"auto"; then
108366fae4e5dSmrg   AC_PATH_PROG([PS2PDF], [ps2pdf])
108376fae4e5dSmrg   if test "x$PS2PDF" = "x"; then
108386fae4e5dSmrg        AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped])
108396fae4e5dSmrg	have_ps2pdf=no
108406fae4e5dSmrg   else
108416fae4e5dSmrg        have_ps2pdf=yes
108426fae4e5dSmrg   fi
108436fae4e5dSmrgelif test "x$use_ps2pdf" = x"yes" ; then
108446fae4e5dSmrg   AC_PATH_PROG([PS2PDF], [ps2pdf])
108456fae4e5dSmrg   if test "x$PS2PDF" = "x"; then
108466fae4e5dSmrg        AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH])
108476fae4e5dSmrg   fi
108486fae4e5dSmrg   have_ps2pdf=yes
108496fae4e5dSmrgelif test "x$use_ps2pdf" = x"no" ; then
108506fae4e5dSmrg   if test "x$PS2PDF" != "x"; then
108516fae4e5dSmrg      AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified])
108526fae4e5dSmrg   fi
108536fae4e5dSmrg   have_ps2pdf=no
108546fae4e5dSmrgelse
108556fae4e5dSmrg   AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no'])
108566fae4e5dSmrgfi
108576fae4e5dSmrgAM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes])
108586fae4e5dSmrg]) # XORG_WITH_PS2PDF
10859e5410a46Smrg
108606fae4e5dSmrg# XORG_ENABLE_DOCS (enable_docs=yes)
108616fae4e5dSmrg# ----------------
108626fae4e5dSmrg# Minimum version: 1.6.0
108636fae4e5dSmrg#
108646fae4e5dSmrg# Documentation tools are not always available on all platforms and sometimes
108656fae4e5dSmrg# not at the appropriate level. This macro enables a builder to skip all
108666fae4e5dSmrg# documentation targets except traditional man pages.
108676fae4e5dSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides
108686fae4e5dSmrg# maximum flexibilty in controlling documentation building.
108696fae4e5dSmrg# Refer to:
108706fae4e5dSmrg# XORG_WITH_XMLTO         --with-xmlto
108716fae4e5dSmrg# XORG_WITH_ASCIIDOC      --with-asciidoc
108726fae4e5dSmrg# XORG_WITH_DOXYGEN       --with-doxygen
108736fae4e5dSmrg# XORG_WITH_FOP           --with-fop
108746fae4e5dSmrg# XORG_WITH_GROFF         --with-groff
108756fae4e5dSmrg# XORG_WITH_PS2PDF        --with-ps2pdf
108766fae4e5dSmrg#
108776fae4e5dSmrg# Interface to module:
108786fae4e5dSmrg# ENABLE_DOCS: 	  used in makefiles to conditionally generate documentation
108796fae4e5dSmrg# --enable-docs: 'yes' user instructs the module to generate docs
108806fae4e5dSmrg#		 'no' user instructs the module not to generate docs
108816fae4e5dSmrg# parm1:	specify the default value, yes or no.
108826fae4e5dSmrg#
108836fae4e5dSmrgAC_DEFUN([XORG_ENABLE_DOCS],[
108846fae4e5dSmrgm4_define([docs_default], m4_default([$1], [yes]))
108856fae4e5dSmrgAC_ARG_ENABLE(docs,
108866fae4e5dSmrg	AS_HELP_STRING([--enable-docs],
108876fae4e5dSmrg	   [Enable building the documentation (default: ]docs_default[)]),
108886fae4e5dSmrg	   [build_docs=$enableval], [build_docs=]docs_default)
108896fae4e5dSmrgm4_undefine([docs_default])
108906fae4e5dSmrgAM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes])
108916fae4e5dSmrgAC_MSG_CHECKING([whether to build documentation])
108926fae4e5dSmrgAC_MSG_RESULT([$build_docs])
108936fae4e5dSmrg]) # XORG_ENABLE_DOCS
10894e5410a46Smrg
108956fae4e5dSmrg# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes)
108966fae4e5dSmrg# ----------------
108976fae4e5dSmrg# Minimum version: 1.6.0
108986fae4e5dSmrg#
108996fae4e5dSmrg# This macro enables a builder to skip all developer documentation.
109006fae4e5dSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides
109016fae4e5dSmrg# maximum flexibilty in controlling documentation building.
109026fae4e5dSmrg# Refer to:
109036fae4e5dSmrg# XORG_WITH_XMLTO         --with-xmlto
109046fae4e5dSmrg# XORG_WITH_ASCIIDOC      --with-asciidoc
109056fae4e5dSmrg# XORG_WITH_DOXYGEN       --with-doxygen
109066fae4e5dSmrg# XORG_WITH_FOP           --with-fop
109076fae4e5dSmrg# XORG_WITH_GROFF         --with-groff
109086fae4e5dSmrg# XORG_WITH_PS2PDF        --with-ps2pdf
109096fae4e5dSmrg#
109106fae4e5dSmrg# Interface to module:
109116fae4e5dSmrg# ENABLE_DEVEL_DOCS:	used in makefiles to conditionally generate developer docs
109126fae4e5dSmrg# --enable-devel-docs:	'yes' user instructs the module to generate developer docs
109136fae4e5dSmrg#			'no' user instructs the module not to generate developer docs
109146fae4e5dSmrg# parm1:		specify the default value, yes or no.
109156fae4e5dSmrg#
109166fae4e5dSmrgAC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[
109176fae4e5dSmrgm4_define([devel_default], m4_default([$1], [yes]))
109186fae4e5dSmrgAC_ARG_ENABLE(devel-docs,
109196fae4e5dSmrg	AS_HELP_STRING([--enable-devel-docs],
109206fae4e5dSmrg	   [Enable building the developer documentation (default: ]devel_default[)]),
109216fae4e5dSmrg	   [build_devel_docs=$enableval], [build_devel_docs=]devel_default)
109226fae4e5dSmrgm4_undefine([devel_default])
109236fae4e5dSmrgAM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes])
109246fae4e5dSmrgAC_MSG_CHECKING([whether to build developer documentation])
109256fae4e5dSmrgAC_MSG_RESULT([$build_devel_docs])
109266fae4e5dSmrg]) # XORG_ENABLE_DEVEL_DOCS
10927e5410a46Smrg
109286fae4e5dSmrg# XORG_ENABLE_SPECS (enable_specs=yes)
109296fae4e5dSmrg# ----------------
109306fae4e5dSmrg# Minimum version: 1.6.0
109316fae4e5dSmrg#
109326fae4e5dSmrg# This macro enables a builder to skip all functional specification targets.
109336fae4e5dSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides
109346fae4e5dSmrg# maximum flexibilty in controlling documentation building.
109356fae4e5dSmrg# Refer to:
109366fae4e5dSmrg# XORG_WITH_XMLTO         --with-xmlto
109376fae4e5dSmrg# XORG_WITH_ASCIIDOC      --with-asciidoc
109386fae4e5dSmrg# XORG_WITH_DOXYGEN       --with-doxygen
109396fae4e5dSmrg# XORG_WITH_FOP           --with-fop
109406fae4e5dSmrg# XORG_WITH_GROFF         --with-groff
109416fae4e5dSmrg# XORG_WITH_PS2PDF        --with-ps2pdf
109426fae4e5dSmrg#
109436fae4e5dSmrg# Interface to module:
109446fae4e5dSmrg# ENABLE_SPECS:		used in makefiles to conditionally generate specs
109456fae4e5dSmrg# --enable-specs:	'yes' user instructs the module to generate specs
109466fae4e5dSmrg#			'no' user instructs the module not to generate specs
109476fae4e5dSmrg# parm1:		specify the default value, yes or no.
109486fae4e5dSmrg#
109496fae4e5dSmrgAC_DEFUN([XORG_ENABLE_SPECS],[
109506fae4e5dSmrgm4_define([spec_default], m4_default([$1], [yes]))
109516fae4e5dSmrgAC_ARG_ENABLE(specs,
109526fae4e5dSmrg	AS_HELP_STRING([--enable-specs],
109536fae4e5dSmrg	   [Enable building the specs (default: ]spec_default[)]),
109546fae4e5dSmrg	   [build_specs=$enableval], [build_specs=]spec_default)
109556fae4e5dSmrgm4_undefine([spec_default])
109566fae4e5dSmrgAM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes])
109576fae4e5dSmrgAC_MSG_CHECKING([whether to build functional specifications])
109586fae4e5dSmrgAC_MSG_RESULT([$build_specs])
109596fae4e5dSmrg]) # XORG_ENABLE_SPECS
10960e5410a46Smrg
109616fae4e5dSmrg# XORG_ENABLE_UNIT_TESTS (enable_unit_tests=auto)
109626fae4e5dSmrg# ----------------------------------------------
109636fae4e5dSmrg# Minimum version: 1.13.0
109646fae4e5dSmrg#
109656fae4e5dSmrg# This macro enables a builder to enable/disable unit testing
109666fae4e5dSmrg# It makes no assumption about the test cases implementation
109676fae4e5dSmrg# Test cases may or may not use Automake "Support for test suites"
109686fae4e5dSmrg# They may or may not use the software utility library GLib
109696fae4e5dSmrg#
109706fae4e5dSmrg# When used in conjunction with XORG_WITH_GLIB, use both AM_CONDITIONAL
109716fae4e5dSmrg# ENABLE_UNIT_TESTS and HAVE_GLIB. Not all unit tests may use glib.
109726fae4e5dSmrg# The variable enable_unit_tests is used by other macros in this file.
109736fae4e5dSmrg#
109746fae4e5dSmrg# Interface to module:
109756fae4e5dSmrg# ENABLE_UNIT_TESTS:	used in makefiles to conditionally build tests
109766fae4e5dSmrg# enable_unit_tests:    used in configure.ac for additional configuration
109776fae4e5dSmrg# --enable-unit-tests:	'yes' user instructs the module to build tests
109786fae4e5dSmrg#			'no' user instructs the module not to build tests
109796fae4e5dSmrg# parm1:		specify the default value, yes or no.
109806fae4e5dSmrg#
109816fae4e5dSmrgAC_DEFUN([XORG_ENABLE_UNIT_TESTS],[
109826fae4e5dSmrgAC_BEFORE([$0], [XORG_WITH_GLIB])
109836fae4e5dSmrgAC_BEFORE([$0], [XORG_LD_WRAP])
109846fae4e5dSmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS])
109856fae4e5dSmrgm4_define([_defopt], m4_default([$1], [auto]))
109866fae4e5dSmrgAC_ARG_ENABLE(unit-tests, AS_HELP_STRING([--enable-unit-tests],
109876fae4e5dSmrg	[Enable building unit test cases (default: ]_defopt[)]),
109886fae4e5dSmrg	[enable_unit_tests=$enableval], [enable_unit_tests=]_defopt)
109896fae4e5dSmrgm4_undefine([_defopt])
109906fae4e5dSmrgAM_CONDITIONAL(ENABLE_UNIT_TESTS, [test "x$enable_unit_tests" != xno])
109916fae4e5dSmrgAC_MSG_CHECKING([whether to build unit test cases])
109926fae4e5dSmrgAC_MSG_RESULT([$enable_unit_tests])
109936fae4e5dSmrg]) # XORG_ENABLE_UNIT_TESTS
109946fae4e5dSmrg
1099589c04b6cSmrg# XORG_ENABLE_INTEGRATION_TESTS (enable_unit_tests=auto)
1099689c04b6cSmrg# ------------------------------------------------------
1099789c04b6cSmrg# Minimum version: 1.17.0
1099889c04b6cSmrg#
1099989c04b6cSmrg# This macro enables a builder to enable/disable integration testing
1100089c04b6cSmrg# It makes no assumption about the test cases' implementation
1100189c04b6cSmrg# Test cases may or may not use Automake "Support for test suites"
1100289c04b6cSmrg#
1100389c04b6cSmrg# Please see XORG_ENABLE_UNIT_TESTS for unit test support. Unit test support
1100489c04b6cSmrg# usually requires less dependencies and may be built and run under less
1100589c04b6cSmrg# stringent environments than integration tests.
1100689c04b6cSmrg#
1100789c04b6cSmrg# Interface to module:
1100889c04b6cSmrg# ENABLE_INTEGRATION_TESTS:   used in makefiles to conditionally build tests
1100989c04b6cSmrg# enable_integration_tests:   used in configure.ac for additional configuration
1101089c04b6cSmrg# --enable-integration-tests: 'yes' user instructs the module to build tests
1101189c04b6cSmrg#                             'no' user instructs the module not to build tests
1101289c04b6cSmrg# parm1:                      specify the default value, yes or no.
1101389c04b6cSmrg#
1101489c04b6cSmrgAC_DEFUN([XORG_ENABLE_INTEGRATION_TESTS],[
1101589c04b6cSmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS])
1101689c04b6cSmrgm4_define([_defopt], m4_default([$1], [auto]))
1101789c04b6cSmrgAC_ARG_ENABLE(integration-tests, AS_HELP_STRING([--enable-integration-tests],
1101889c04b6cSmrg	[Enable building integration test cases (default: ]_defopt[)]),
1101989c04b6cSmrg	[enable_integration_tests=$enableval],
1102089c04b6cSmrg	[enable_integration_tests=]_defopt)
1102189c04b6cSmrgm4_undefine([_defopt])
1102289c04b6cSmrgAM_CONDITIONAL([ENABLE_INTEGRATION_TESTS],
1102389c04b6cSmrg	[test "x$enable_integration_tests" != xno])
1102489c04b6cSmrgAC_MSG_CHECKING([whether to build unit test cases])
1102589c04b6cSmrgAC_MSG_RESULT([$enable_integration_tests])
1102689c04b6cSmrg]) # XORG_ENABLE_INTEGRATION_TESTS
1102789c04b6cSmrg
110286fae4e5dSmrg# XORG_WITH_GLIB([MIN-VERSION], [DEFAULT])
110296fae4e5dSmrg# ----------------------------------------
110306fae4e5dSmrg# Minimum version: 1.13.0
110316fae4e5dSmrg#
110326fae4e5dSmrg# GLib is a library which provides advanced data structures and functions.
110336fae4e5dSmrg# This macro enables a module to test for the presence of Glib.
110346fae4e5dSmrg#
110356fae4e5dSmrg# When used with ENABLE_UNIT_TESTS, it is assumed GLib is used for unit testing.
110366fae4e5dSmrg# Otherwise the value of $enable_unit_tests is blank.
110376fae4e5dSmrg#
1103889c04b6cSmrg# Please see XORG_ENABLE_INTEGRATION_TESTS for integration test support. Unit
1103989c04b6cSmrg# test support usually requires less dependencies and may be built and run under
1104089c04b6cSmrg# less stringent environments than integration tests.
1104189c04b6cSmrg#
110426fae4e5dSmrg# Interface to module:
110436fae4e5dSmrg# HAVE_GLIB: used in makefiles to conditionally build targets
110446fae4e5dSmrg# with_glib: used in configure.ac to know if GLib has been found
110456fae4e5dSmrg# --with-glib:	'yes' user instructs the module to use glib
110466fae4e5dSmrg#		'no' user instructs the module not to use glib
110476fae4e5dSmrg#
110486fae4e5dSmrgAC_DEFUN([XORG_WITH_GLIB],[
110496fae4e5dSmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG])
110506fae4e5dSmrgm4_define([_defopt], m4_default([$2], [auto]))
110516fae4e5dSmrgAC_ARG_WITH(glib, AS_HELP_STRING([--with-glib],
110526fae4e5dSmrg	[Use GLib library for unit testing (default: ]_defopt[)]),
110536fae4e5dSmrg	[with_glib=$withval], [with_glib=]_defopt)
110546fae4e5dSmrgm4_undefine([_defopt])
110556fae4e5dSmrg
110566fae4e5dSmrghave_glib=no
110576fae4e5dSmrg# Do not probe GLib if user explicitly disabled unit testing
110586fae4e5dSmrgif test "x$enable_unit_tests" != x"no"; then
110596fae4e5dSmrg  # Do not probe GLib if user explicitly disabled it
110606fae4e5dSmrg  if test "x$with_glib" != x"no"; then
110616fae4e5dSmrg    m4_ifval(
110626fae4e5dSmrg      [$1],
110636fae4e5dSmrg      [PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $1], [have_glib=yes], [have_glib=no])],
110646fae4e5dSmrg      [PKG_CHECK_MODULES([GLIB], [glib-2.0], [have_glib=yes], [have_glib=no])]
110656fae4e5dSmrg    )
110666fae4e5dSmrg  fi
110676fae4e5dSmrgfi
110689c9ff80cSmrg
110696fae4e5dSmrg# Not having GLib when unit testing has been explicitly requested is an error
110706fae4e5dSmrgif test "x$enable_unit_tests" = x"yes"; then
110716fae4e5dSmrg  if test "x$have_glib" = x"no"; then
110726fae4e5dSmrg    AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found])
110736fae4e5dSmrg  fi
110746fae4e5dSmrgfi
110759c9ff80cSmrg
110766fae4e5dSmrg# Having unit testing disabled when GLib has been explicitly requested is an error
110776fae4e5dSmrgif test "x$enable_unit_tests" = x"no"; then
110786fae4e5dSmrg  if test "x$with_glib" = x"yes"; then
110796fae4e5dSmrg    AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found])
110806fae4e5dSmrg  fi
110816fae4e5dSmrgfi
110821f0ac6a5Smrg
110836fae4e5dSmrg# Not having GLib when it has been explicitly requested is an error
110846fae4e5dSmrgif test "x$with_glib" = x"yes"; then
110856fae4e5dSmrg  if test "x$have_glib" = x"no"; then
110866fae4e5dSmrg    AC_MSG_ERROR([--with-glib=yes specified but glib-2.0 not found])
110876fae4e5dSmrg  fi
110886fae4e5dSmrgfi
110891f0ac6a5Smrg
110906fae4e5dSmrgAM_CONDITIONAL([HAVE_GLIB], [test "$have_glib" = yes])
110916fae4e5dSmrg]) # XORG_WITH_GLIB
110921f0ac6a5Smrg
110936fae4e5dSmrg# XORG_LD_WRAP([required|optional])
110946fae4e5dSmrg# ---------------------------------
110956fae4e5dSmrg# Minimum version: 1.13.0
110966fae4e5dSmrg#
110976fae4e5dSmrg# Check if linker supports -wrap, passed via compiler flags
110986fae4e5dSmrg#
110996fae4e5dSmrg# When used with ENABLE_UNIT_TESTS, it is assumed -wrap is used for unit testing.
111006fae4e5dSmrg# Otherwise the value of $enable_unit_tests is blank.
111016fae4e5dSmrg#
111026fae4e5dSmrg# Argument added in 1.16.0 - default is "required", to match existing behavior
111036fae4e5dSmrg# of returning an error if enable_unit_tests is yes, and ld -wrap is not
111046fae4e5dSmrg# available, an argument of "optional" allows use when some unit tests require
111056fae4e5dSmrg# ld -wrap and others do not.
111066fae4e5dSmrg#
111076fae4e5dSmrgAC_DEFUN([XORG_LD_WRAP],[
111086fae4e5dSmrgXORG_CHECK_LINKER_FLAGS([-Wl,-wrap,exit],[have_ld_wrap=yes],[have_ld_wrap=no],
111096fae4e5dSmrg    [AC_LANG_PROGRAM([#include <stdlib.h>
111106fae4e5dSmrg                      void __wrap_exit(int status) { return; }],
111116fae4e5dSmrg                     [exit(0);])])
111126fae4e5dSmrg# Not having ld wrap when unit testing has been explicitly requested is an error
111136fae4e5dSmrgif test "x$enable_unit_tests" = x"yes" -a "x$1" != "xoptional"; then
111146fae4e5dSmrg  if test "x$have_ld_wrap" = x"no"; then
111156fae4e5dSmrg    AC_MSG_ERROR([--enable-unit-tests=yes specified but ld -wrap support is not available])
111166fae4e5dSmrg  fi
111176fae4e5dSmrgfi
111186fae4e5dSmrgAM_CONDITIONAL([HAVE_LD_WRAP], [test "$have_ld_wrap" = yes])
111196fae4e5dSmrg#
111206fae4e5dSmrg]) # XORG_LD_WRAP
111219c9ff80cSmrg
111226fae4e5dSmrg# XORG_CHECK_LINKER_FLAGS
111236fae4e5dSmrg# -----------------------
111246fae4e5dSmrg# SYNOPSIS
111256fae4e5dSmrg#
111266fae4e5dSmrg#   XORG_CHECK_LINKER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE], [PROGRAM-SOURCE])
111276fae4e5dSmrg#
111286fae4e5dSmrg# DESCRIPTION
111296fae4e5dSmrg#
111306fae4e5dSmrg#   Check whether the given linker FLAGS work with the current language's
111316fae4e5dSmrg#   linker, or whether they give an error.
111326fae4e5dSmrg#
111336fae4e5dSmrg#   ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on
111346fae4e5dSmrg#   success/failure.
111356fae4e5dSmrg#
111366fae4e5dSmrg#   PROGRAM-SOURCE is the program source to link with, if needed
111376fae4e5dSmrg#
111386fae4e5dSmrg#   NOTE: Based on AX_CHECK_COMPILER_FLAGS.
111396fae4e5dSmrg#
111406fae4e5dSmrg# LICENSE
111416fae4e5dSmrg#
111426fae4e5dSmrg#   Copyright (c) 2009 Mike Frysinger <vapier@gentoo.org>
111436fae4e5dSmrg#   Copyright (c) 2009 Steven G. Johnson <stevenj@alum.mit.edu>
111446fae4e5dSmrg#   Copyright (c) 2009 Matteo Frigo
111456fae4e5dSmrg#
111466fae4e5dSmrg#   This program is free software: you can redistribute it and/or modify it
111476fae4e5dSmrg#   under the terms of the GNU General Public License as published by the
111486fae4e5dSmrg#   Free Software Foundation, either version 3 of the License, or (at your
111496fae4e5dSmrg#   option) any later version.
111506fae4e5dSmrg#
111516fae4e5dSmrg#   This program is distributed in the hope that it will be useful, but
111526fae4e5dSmrg#   WITHOUT ANY WARRANTY; without even the implied warranty of
111536fae4e5dSmrg#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
111546fae4e5dSmrg#   Public License for more details.
111556fae4e5dSmrg#
111566fae4e5dSmrg#   You should have received a copy of the GNU General Public License along
111576fae4e5dSmrg#   with this program. If not, see <http://www.gnu.org/licenses/>.
111586fae4e5dSmrg#
111596fae4e5dSmrg#   As a special exception, the respective Autoconf Macro's copyright owner
111606fae4e5dSmrg#   gives unlimited permission to copy, distribute and modify the configure
111616fae4e5dSmrg#   scripts that are the output of Autoconf when processing the Macro. You
111626fae4e5dSmrg#   need not follow the terms of the GNU General Public License when using
111636fae4e5dSmrg#   or distributing such scripts, even though portions of the text of the
111646fae4e5dSmrg#   Macro appear in them. The GNU General Public License (GPL) does govern
111656fae4e5dSmrg#   all other use of the material that constitutes the Autoconf Macro.
111666fae4e5dSmrg#
111676fae4e5dSmrg#   This special exception to the GPL applies to versions of the Autoconf
111686fae4e5dSmrg#   Macro released by the Autoconf Archive. When you make and distribute a
111696fae4e5dSmrg#   modified version of the Autoconf Macro, you may extend this special
111706fae4e5dSmrg#   exception to the GPL to apply to your modified version as well.#
111716fae4e5dSmrgAC_DEFUN([XORG_CHECK_LINKER_FLAGS],
111726fae4e5dSmrg[AC_MSG_CHECKING([whether the linker accepts $1])
111736fae4e5dSmrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname:
111746fae4e5dSmrgAS_LITERAL_IF([$1],
111756fae4e5dSmrg  [AC_CACHE_VAL(AS_TR_SH(xorg_cv_linker_flags_[$1]), [
111766fae4e5dSmrg      ax_save_FLAGS=$LDFLAGS
111776fae4e5dSmrg      LDFLAGS="$1"
111786fae4e5dSmrg      AC_LINK_IFELSE([m4_default([$4],[AC_LANG_PROGRAM()])],
111796fae4e5dSmrg        AS_TR_SH(xorg_cv_linker_flags_[$1])=yes,
111806fae4e5dSmrg        AS_TR_SH(xorg_cv_linker_flags_[$1])=no)
111816fae4e5dSmrg      LDFLAGS=$ax_save_FLAGS])],
111826fae4e5dSmrg  [ax_save_FLAGS=$LDFLAGS
111836fae4e5dSmrg   LDFLAGS="$1"
111846fae4e5dSmrg   AC_LINK_IFELSE([AC_LANG_PROGRAM()],
111856fae4e5dSmrg     eval AS_TR_SH(xorg_cv_linker_flags_[$1])=yes,
111866fae4e5dSmrg     eval AS_TR_SH(xorg_cv_linker_flags_[$1])=no)
111876fae4e5dSmrg   LDFLAGS=$ax_save_FLAGS])
111886fae4e5dSmrgeval xorg_check_linker_flags=$AS_TR_SH(xorg_cv_linker_flags_[$1])
111896fae4e5dSmrgAC_MSG_RESULT($xorg_check_linker_flags)
111906fae4e5dSmrgif test "x$xorg_check_linker_flags" = xyes; then
111916fae4e5dSmrg	m4_default([$2], :)
111926fae4e5dSmrgelse
111936fae4e5dSmrg	m4_default([$3], :)
111946fae4e5dSmrgfi
111956fae4e5dSmrg]) # XORG_CHECK_LINKER_FLAGS
111969c9ff80cSmrg
111976fae4e5dSmrg# XORG_MEMORY_CHECK_FLAGS
111986fae4e5dSmrg# -----------------------
111996fae4e5dSmrg# Minimum version: 1.16.0
11200e5410a46Smrg#
112016fae4e5dSmrg# This macro attempts to find appropriate memory checking functionality
112026fae4e5dSmrg# for various platforms which unit testing code may use to catch various
112036fae4e5dSmrg# forms of memory allocation and access errors in testing.
11204e5410a46Smrg#
112056fae4e5dSmrg# Interface to module:
112066fae4e5dSmrg# XORG_MALLOC_DEBUG_ENV - environment variables to set to enable debugging
112076fae4e5dSmrg#                         Usually added to TESTS_ENVIRONMENT in Makefile.am
112086fae4e5dSmrg#
112096fae4e5dSmrg# If the user sets the value of XORG_MALLOC_DEBUG_ENV, it is used verbatim.
112106fae4e5dSmrg#
112116fae4e5dSmrgAC_DEFUN([XORG_MEMORY_CHECK_FLAGS],[
112121f0ac6a5Smrg
112136fae4e5dSmrgAC_REQUIRE([AC_CANONICAL_HOST])
112146fae4e5dSmrgAC_ARG_VAR([XORG_MALLOC_DEBUG_ENV],
112156fae4e5dSmrg           [Environment variables to enable memory checking in tests])
112161f0ac6a5Smrg
112176fae4e5dSmrg# Check for different types of support on different platforms
112186fae4e5dSmrgcase $host_os in
112196fae4e5dSmrg    solaris*)
112206fae4e5dSmrg        AC_CHECK_LIB([umem], [umem_alloc],
112216fae4e5dSmrg            [malloc_debug_env='LD_PRELOAD=libumem.so UMEM_DEBUG=default'])
112226fae4e5dSmrg        ;;
112236fae4e5dSmrg    *-gnu*) # GNU libc - Value is used as a single byte bit pattern,
112246fae4e5dSmrg        # both directly and inverted, so should not be 0 or 255.
112256fae4e5dSmrg        malloc_debug_env='MALLOC_PERTURB_=15'
112266fae4e5dSmrg        ;;
112276fae4e5dSmrg    darwin*)
112286fae4e5dSmrg        malloc_debug_env='MallocPreScribble=1 MallocScribble=1 DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib'
112296fae4e5dSmrg        ;;
112306fae4e5dSmrg    *bsd*)
112316fae4e5dSmrg        malloc_debug_env='MallocPreScribble=1 MallocScribble=1'
112326fae4e5dSmrg        ;;
112336fae4e5dSmrgesac
112341f0ac6a5Smrg
112356fae4e5dSmrg# User supplied flags override default flags
112366fae4e5dSmrgif test "x$XORG_MALLOC_DEBUG_ENV" != "x"; then
112376fae4e5dSmrg    malloc_debug_env="$XORG_MALLOC_DEBUG_ENV"
112386fae4e5dSmrgfi
112399c9ff80cSmrg
112406fae4e5dSmrgAC_SUBST([XORG_MALLOC_DEBUG_ENV],[$malloc_debug_env])
112416fae4e5dSmrg]) # XORG_WITH_LINT
112429c9ff80cSmrg
112436fae4e5dSmrg# XORG_CHECK_MALLOC_ZERO
112446fae4e5dSmrg# ----------------------
112456fae4e5dSmrg# Minimum version: 1.0.0
112466fae4e5dSmrg#
112476fae4e5dSmrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if
112486fae4e5dSmrg# malloc(0) returns NULL.  Packages should add one of these cflags to
112496fae4e5dSmrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them.
112506fae4e5dSmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[
112516fae4e5dSmrgAC_ARG_ENABLE(malloc0returnsnull,
112526fae4e5dSmrg	AS_HELP_STRING([--enable-malloc0returnsnull],
112536fae4e5dSmrg		       [malloc(0) returns NULL (default: auto)]),
112546fae4e5dSmrg	[MALLOC_ZERO_RETURNS_NULL=$enableval],
112556fae4e5dSmrg	[MALLOC_ZERO_RETURNS_NULL=auto])
112569c9ff80cSmrg
112576fae4e5dSmrgAC_MSG_CHECKING([whether malloc(0) returns NULL])
112586fae4e5dSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then
11259b9867631SmrgAC_CACHE_VAL([xorg_cv_malloc0_returns_null],
11260b9867631Smrg	[AC_RUN_IFELSE([AC_LANG_PROGRAM([
112616fae4e5dSmrg#include <stdlib.h>
112626fae4e5dSmrg],[
112636fae4e5dSmrg    char *m0, *r0, *c0, *p;
112646fae4e5dSmrg    m0 = malloc(0);
112656fae4e5dSmrg    p = malloc(10);
112666fae4e5dSmrg    r0 = realloc(p,0);
112676fae4e5dSmrg    c0 = calloc(0,10);
112686fae4e5dSmrg    exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1);
112696fae4e5dSmrg])],
11270b9867631Smrg		[xorg_cv_malloc0_returns_null=yes],
11271b9867631Smrg		[xorg_cv_malloc0_returns_null=no])])
11272b9867631SmrgMALLOC_ZERO_RETURNS_NULL=$xorg_cv_malloc0_returns_null
112736fae4e5dSmrgfi
112746fae4e5dSmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL])
112759c9ff80cSmrg
112766fae4e5dSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then
112776fae4e5dSmrg	MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL"
112786fae4e5dSmrg	XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS
112796fae4e5dSmrg	XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC"
112806fae4e5dSmrgelse
112816fae4e5dSmrg	MALLOC_ZERO_CFLAGS=""
112826fae4e5dSmrg	XMALLOC_ZERO_CFLAGS=""
112836fae4e5dSmrg	XTMALLOC_ZERO_CFLAGS=""
112846fae4e5dSmrgfi
112859c9ff80cSmrg
112866fae4e5dSmrgAC_SUBST([MALLOC_ZERO_CFLAGS])
112876fae4e5dSmrgAC_SUBST([XMALLOC_ZERO_CFLAGS])
112886fae4e5dSmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS])
112896fae4e5dSmrg]) # XORG_CHECK_MALLOC_ZERO
112906fae4e5dSmrg
112916fae4e5dSmrg# XORG_WITH_LINT()
112926fae4e5dSmrg# ----------------
112936fae4e5dSmrg# Minimum version: 1.1.0
112949c9ff80cSmrg#
112956fae4e5dSmrg# This macro enables the use of a tool that flags some suspicious and
112966fae4e5dSmrg# non-portable constructs (likely to be bugs) in C language source code.
112976fae4e5dSmrg# It will attempt to locate the tool and use appropriate options.
112986fae4e5dSmrg# There are various lint type tools on different platforms.
112996fae4e5dSmrg#
113006fae4e5dSmrg# Interface to module:
113016fae4e5dSmrg# LINT:		returns the path to the tool found on the platform
113026fae4e5dSmrg#		or the value set to LINT on the configure cmd line
113036fae4e5dSmrg#		also an Automake conditional
113046fae4e5dSmrg# LINT_FLAGS:	an Automake variable with appropriate flags
113056fae4e5dSmrg#
113066fae4e5dSmrg# --with-lint:	'yes' user instructs the module to use lint
113076fae4e5dSmrg#		'no' user instructs the module not to use lint (default)
113086fae4e5dSmrg#
113096fae4e5dSmrg# If the user sets the value of LINT, AC_PATH_PROG skips testing the path.
113106fae4e5dSmrg# If the user sets the value of LINT_FLAGS, they are used verbatim.
113116fae4e5dSmrg#
113126fae4e5dSmrgAC_DEFUN([XORG_WITH_LINT],[
113139c9ff80cSmrg
113146fae4e5dSmrgAC_ARG_VAR([LINT], [Path to a lint-style command])
113156fae4e5dSmrgAC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command])
113166fae4e5dSmrgAC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint],
113176fae4e5dSmrg		[Use a lint-style source code checker (default: disabled)])],
113186fae4e5dSmrg		[use_lint=$withval], [use_lint=no])
113199c9ff80cSmrg
113206fae4e5dSmrg# Obtain platform specific info like program name and options
113216fae4e5dSmrg# The lint program on FreeBSD and NetBSD is different from the one on Solaris
113226fae4e5dSmrgcase $host_os in
113236fae4e5dSmrg  *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*)
113246fae4e5dSmrg	lint_name=splint
113256fae4e5dSmrg	lint_options="-badflag"
113266fae4e5dSmrg	;;
113276fae4e5dSmrg  *freebsd* | *netbsd*)
113286fae4e5dSmrg	lint_name=lint
113296fae4e5dSmrg	lint_options="-u -b"
113306fae4e5dSmrg	;;
113316fae4e5dSmrg  *solaris*)
113326fae4e5dSmrg	lint_name=lint
113336fae4e5dSmrg	lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2"
113346fae4e5dSmrg	;;
113356fae4e5dSmrgesac
113369c9ff80cSmrg
113376fae4e5dSmrg# Test for the presence of the program (either guessed by the code or spelled out by the user)
113386fae4e5dSmrgif test "x$use_lint" = x"yes" ; then
113396fae4e5dSmrg   AC_PATH_PROG([LINT], [$lint_name])
113406fae4e5dSmrg   if test "x$LINT" = "x"; then
113416fae4e5dSmrg        AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH])
113426fae4e5dSmrg   fi
113436fae4e5dSmrgelif test "x$use_lint" = x"no" ; then
113446fae4e5dSmrg   if test "x$LINT" != "x"; then
113456fae4e5dSmrg      AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified])
113466fae4e5dSmrg   fi
113476fae4e5dSmrgelse
113486fae4e5dSmrg   AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.])
113496fae4e5dSmrgfi
113509c9ff80cSmrg
113516fae4e5dSmrg# User supplied flags override default flags
113526fae4e5dSmrgif test "x$LINT_FLAGS" != "x"; then
113536fae4e5dSmrg   lint_options=$LINT_FLAGS
113546fae4e5dSmrgfi
113559c9ff80cSmrg
113566fae4e5dSmrgAC_SUBST([LINT_FLAGS],[$lint_options])
113576fae4e5dSmrgAM_CONDITIONAL(LINT, [test "x$LINT" != x])
113586fae4e5dSmrg
113596fae4e5dSmrg]) # XORG_WITH_LINT
113606fae4e5dSmrg
113616fae4e5dSmrg# XORG_LINT_LIBRARY(LIBNAME)
113626fae4e5dSmrg# --------------------------
113636fae4e5dSmrg# Minimum version: 1.1.0
113646fae4e5dSmrg#
113656fae4e5dSmrg# Sets up flags for building lint libraries for checking programs that call
113666fae4e5dSmrg# functions in the library.
113676fae4e5dSmrg#
113686fae4e5dSmrg# Interface to module:
113696fae4e5dSmrg# LINTLIB		- Automake variable with the name of lint library file to make
113706fae4e5dSmrg# MAKE_LINT_LIB		- Automake conditional
113716fae4e5dSmrg#
113726fae4e5dSmrg# --enable-lint-library:  - 'yes' user instructs the module to created a lint library
113736fae4e5dSmrg#			  - 'no' user instructs the module not to create a lint library (default)
113746fae4e5dSmrg
113756fae4e5dSmrgAC_DEFUN([XORG_LINT_LIBRARY],[
113766fae4e5dSmrgAC_REQUIRE([XORG_WITH_LINT])
113776fae4e5dSmrgAC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library],
113786fae4e5dSmrg	[Create lint library (default: disabled)])],
113796fae4e5dSmrg	[make_lint_lib=$enableval], [make_lint_lib=no])
113806fae4e5dSmrg
113816fae4e5dSmrgif test "x$make_lint_lib" = x"yes" ; then
113826fae4e5dSmrg   LINTLIB=llib-l$1.ln
113836fae4e5dSmrg   if test "x$LINT" = "x"; then
113846fae4e5dSmrg        AC_MSG_ERROR([Cannot make lint library without --with-lint])
113856fae4e5dSmrg   fi
113866fae4e5dSmrgelif test "x$make_lint_lib" != x"no" ; then
113876fae4e5dSmrg   AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.])
113886fae4e5dSmrgfi
113899c9ff80cSmrg
113906fae4e5dSmrgAC_SUBST(LINTLIB)
113916fae4e5dSmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno])
113929c9ff80cSmrg
113936fae4e5dSmrg]) # XORG_LINT_LIBRARY
113941f0ac6a5Smrg
113956fae4e5dSmrg# XORG_COMPILER_BRAND
113966fae4e5dSmrg# -------------------
113976fae4e5dSmrg# Minimum version: 1.14.0
113986fae4e5dSmrg#
113996fae4e5dSmrg# Checks for various brands of compilers and sets flags as appropriate:
114006fae4e5dSmrg#   GNU gcc - relies on AC_PROG_CC (via AC_PROG_CC_C99) to set GCC to "yes"
114016fae4e5dSmrg#   GNU g++ - relies on AC_PROG_CXX to set GXX to "yes"
114026fae4e5dSmrg#   clang compiler - sets CLANGCC to "yes"
114036fae4e5dSmrg#   Intel compiler - sets INTELCC to "yes"
114046fae4e5dSmrg#   Sun/Oracle Solaris Studio cc - sets SUNCC to "yes"
114056fae4e5dSmrg#
114066fae4e5dSmrgAC_DEFUN([XORG_COMPILER_BRAND], [
114076fae4e5dSmrgAC_LANG_CASE(
114086fae4e5dSmrg	[C], [
114096fae4e5dSmrg		AC_REQUIRE([AC_PROG_CC_C99])
114106fae4e5dSmrg	],
114116fae4e5dSmrg	[C++], [
114126fae4e5dSmrg		AC_REQUIRE([AC_PROG_CXX])
114136fae4e5dSmrg	]
114146fae4e5dSmrg)
114156fae4e5dSmrgAC_CHECK_DECL([__clang__], [CLANGCC="yes"], [CLANGCC="no"])
114166fae4e5dSmrgAC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"])
114176fae4e5dSmrgAC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
114186fae4e5dSmrg]) # XORG_COMPILER_BRAND
11419e5410a46Smrg
114206fae4e5dSmrg# XORG_TESTSET_CFLAG(<variable>, <flag>, [<alternative flag>, ...])
114216fae4e5dSmrg# ---------------
114226fae4e5dSmrg# Minimum version: 1.16.0
114236fae4e5dSmrg#
114246fae4e5dSmrg# Test if the compiler works when passed the given flag as a command line argument.
114256fae4e5dSmrg# If it succeeds, the flag is appeneded to the given variable.  If not, it tries the
114266fae4e5dSmrg# next flag in the list until there are no more options.
114276fae4e5dSmrg#
114286fae4e5dSmrg# Note that this does not guarantee that the compiler supports the flag as some
114296fae4e5dSmrg# compilers will simply ignore arguments that they do not understand, but we do
114306fae4e5dSmrg# attempt to weed out false positives by using -Werror=unknown-warning-option and
114316fae4e5dSmrg# -Werror=unused-command-line-argument
114326fae4e5dSmrg#
114336fae4e5dSmrgAC_DEFUN([XORG_TESTSET_CFLAG], [
114346fae4e5dSmrgm4_if([$#], 0, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])])
114356fae4e5dSmrgm4_if([$#], 1, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])])
114366fae4e5dSmrg
114376fae4e5dSmrgAC_LANG_COMPILER_REQUIRE
114386fae4e5dSmrg
114396fae4e5dSmrgAC_LANG_CASE(
114406fae4e5dSmrg	[C], [
114416fae4e5dSmrg		AC_REQUIRE([AC_PROG_CC_C99])
114426fae4e5dSmrg		define([PREFIX], [C])
1144389c04b6cSmrg		define([CACHE_PREFIX], [cc])
1144489c04b6cSmrg		define([COMPILER], [$CC])
114456fae4e5dSmrg	],
114466fae4e5dSmrg	[C++], [
114476fae4e5dSmrg		define([PREFIX], [CXX])
1144889c04b6cSmrg		define([CACHE_PREFIX], [cxx])
1144989c04b6cSmrg		define([COMPILER], [$CXX])
114506fae4e5dSmrg	]
114516fae4e5dSmrg)
114521f0ac6a5Smrg
114536fae4e5dSmrg[xorg_testset_save_]PREFIX[FLAGS]="$PREFIX[FLAGS]"
114546fae4e5dSmrg
1145589c04b6cSmrgif test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "x" ; then
114566fae4e5dSmrg	PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option"
1145789c04b6cSmrg	AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unknown-warning-option],
1145889c04b6cSmrg			[xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option],
114596fae4e5dSmrg			AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])],
1146089c04b6cSmrg					  [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=yes],
1146189c04b6cSmrg					  [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=no]))
1146289c04b6cSmrg	[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]=$[xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option]
114636fae4e5dSmrg	PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]"
114646fae4e5dSmrgfi
114651f0ac6a5Smrg
1146689c04b6cSmrgif test "x$[xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]" = "x" ; then
1146789c04b6cSmrg	if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "xyes" ; then
114686fae4e5dSmrg		PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option"
114696fae4e5dSmrg	fi
114706fae4e5dSmrg	PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument"
1147189c04b6cSmrg	AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unused-command-line-argument],
1147289c04b6cSmrg			[xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument],
114736fae4e5dSmrg			AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])],
1147489c04b6cSmrg					  [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=yes],
1147589c04b6cSmrg					  [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=no]))
1147689c04b6cSmrg	[xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]=$[xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument]
114776fae4e5dSmrg	PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]"
114786fae4e5dSmrgfi
114791f0ac6a5Smrg
114806fae4e5dSmrgfound="no"
114816fae4e5dSmrgm4_foreach([flag], m4_cdr($@), [
114826fae4e5dSmrg	if test $found = "no" ; then
11483b9867631Smrg		if test "x$xorg_testset_]CACHE_PREFIX[_unknown_warning_option" = "xyes" ; then
114846fae4e5dSmrg			PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option"
114856fae4e5dSmrg		fi
114866fae4e5dSmrg
11487b9867631Smrg		if test "x$xorg_testset_]CACHE_PREFIX[_unused_command_line_argument" = "xyes" ; then
114886fae4e5dSmrg			PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument"
114896fae4e5dSmrg		fi
114906fae4e5dSmrg
114916fae4e5dSmrg		PREFIX[FLAGS]="$PREFIX[FLAGS] ]flag["
114926fae4e5dSmrg
114936fae4e5dSmrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname
1149489c04b6cSmrg		AC_MSG_CHECKING([if ]COMPILER[ supports ]flag[])
1149589c04b6cSmrg		cacheid=AS_TR_SH([xorg_cv_]CACHE_PREFIX[_flag_]flag[])
1149689c04b6cSmrg		AC_CACHE_VAL($cacheid,
114976fae4e5dSmrg			     [AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])],
1149889c04b6cSmrg					     [eval $cacheid=yes],
1149989c04b6cSmrg					     [eval $cacheid=no])])
115006fae4e5dSmrg
115016fae4e5dSmrg		PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]"
115026fae4e5dSmrg
1150389c04b6cSmrg		eval supported=\$$cacheid
115046fae4e5dSmrg		AC_MSG_RESULT([$supported])
115056fae4e5dSmrg		if test "$supported" = "yes" ; then
115066fae4e5dSmrg			$1="$$1 ]flag["
115076fae4e5dSmrg			found="yes"
115086fae4e5dSmrg		fi
115096fae4e5dSmrg	fi
115106fae4e5dSmrg])
115116fae4e5dSmrg]) # XORG_TESTSET_CFLAG
115121f0ac6a5Smrg
115136fae4e5dSmrg# XORG_COMPILER_FLAGS
115146fae4e5dSmrg# ---------------
115156fae4e5dSmrg# Minimum version: 1.16.0
115166fae4e5dSmrg#
115176fae4e5dSmrg# Defines BASE_CFLAGS or BASE_CXXFLAGS to contain a set of command line
115186fae4e5dSmrg# arguments supported by the selected compiler which do NOT alter the generated
115196fae4e5dSmrg# code.  These arguments will cause the compiler to print various warnings
115206fae4e5dSmrg# during compilation AND turn a conservative set of warnings into errors.
115216fae4e5dSmrg#
115226fae4e5dSmrg# The set of flags supported by BASE_CFLAGS and BASE_CXXFLAGS will grow in
115236fae4e5dSmrg# future versions of util-macros as options are added to new compilers.
115246fae4e5dSmrg#
115256fae4e5dSmrgAC_DEFUN([XORG_COMPILER_FLAGS], [
115266fae4e5dSmrgAC_REQUIRE([XORG_COMPILER_BRAND])
115276fae4e5dSmrg
115286fae4e5dSmrgAC_ARG_ENABLE(selective-werror,
115296fae4e5dSmrg              AS_HELP_STRING([--disable-selective-werror],
115306fae4e5dSmrg                             [Turn off selective compiler errors. (default: enabled)]),
115316fae4e5dSmrg              [SELECTIVE_WERROR=$enableval],
115326fae4e5dSmrg              [SELECTIVE_WERROR=yes])
115336fae4e5dSmrg
115346fae4e5dSmrgAC_LANG_CASE(
115356fae4e5dSmrg        [C], [
115366fae4e5dSmrg                define([PREFIX], [C])
115376fae4e5dSmrg        ],
115386fae4e5dSmrg        [C++], [
115396fae4e5dSmrg                define([PREFIX], [CXX])
115406fae4e5dSmrg        ]
115416fae4e5dSmrg)
115426fae4e5dSmrg# -v is too short to test reliably with XORG_TESTSET_CFLAG
115436fae4e5dSmrgif test "x$SUNCC" = "xyes"; then
115446fae4e5dSmrg    [BASE_]PREFIX[FLAGS]="-v"
115456fae4e5dSmrgelse
115466fae4e5dSmrg    [BASE_]PREFIX[FLAGS]=""
115476fae4e5dSmrgfi
115481f0ac6a5Smrg
115496fae4e5dSmrg# This chunk of warnings were those that existed in the legacy CWARNFLAGS
115506fae4e5dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wall])
115516fae4e5dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-arith])
115526fae4e5dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-declarations])
115536fae4e5dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wformat=2], [-Wformat])
115546fae4e5dSmrg
115556fae4e5dSmrgAC_LANG_CASE(
115566fae4e5dSmrg	[C], [
115576fae4e5dSmrg		XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wstrict-prototypes])
115586fae4e5dSmrg		XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-prototypes])
115596fae4e5dSmrg		XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnested-externs])
115606fae4e5dSmrg		XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wbad-function-cast])
11561b9867631Smrg		XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wold-style-definition], [-fd])
115626fae4e5dSmrg		XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wdeclaration-after-statement])
115636fae4e5dSmrg	]
115646fae4e5dSmrg)
115651f0ac6a5Smrg
115666fae4e5dSmrg# This chunk adds additional warnings that could catch undesired effects.
115676fae4e5dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wunused])
115686fae4e5dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wuninitialized])
115696fae4e5dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wshadow])
115706fae4e5dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-noreturn])
115716fae4e5dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-format-attribute])
115726fae4e5dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wredundant-decls])
11573b9867631SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op])
115746fae4e5dSmrg
115756fae4e5dSmrg# These are currently disabled because they are noisy.  They will be enabled
115766fae4e5dSmrg# in the future once the codebase is sufficiently modernized to silence
115776fae4e5dSmrg# them.  For now, I don't want them to drown out the other warnings.
115786fae4e5dSmrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses])
115796fae4e5dSmrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align])
11580b9867631Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual])
115816fae4e5dSmrg
115826fae4e5dSmrg# Turn some warnings into errors, so we don't accidently get successful builds
115836fae4e5dSmrg# when there are problems that should be fixed.
115846fae4e5dSmrg
115856fae4e5dSmrgif test "x$SELECTIVE_WERROR" = "xyes" ; then
115866fae4e5dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=implicit], [-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED])
115876fae4e5dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=nonnull])
115886fae4e5dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=init-self])
115896fae4e5dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=main])
115906fae4e5dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=missing-braces])
115916fae4e5dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=sequence-point])
115926fae4e5dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=return-type], [-errwarn=E_FUNC_HAS_NO_RETURN_STMT])
115936fae4e5dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=trigraphs])
115946fae4e5dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=array-bounds])
115956fae4e5dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=write-strings])
115966fae4e5dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=address])
115976fae4e5dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=int-to-pointer-cast], [-errwarn=E_BAD_PTR_INT_COMBINATION])
115986fae4e5dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=pointer-to-int-cast]) # Also -errwarn=E_BAD_PTR_INT_COMBINATION
115996fae4e5dSmrgelse
116006fae4e5dSmrgAC_MSG_WARN([You have chosen not to turn some select compiler warnings into errors.  This should not be necessary.  Please report why you needed to do so in a bug report at $PACKAGE_BUGREPORT])
116016fae4e5dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wimplicit])
116026fae4e5dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnonnull])
116036fae4e5dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Winit-self])
116046fae4e5dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmain])
116056fae4e5dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-braces])
116066fae4e5dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wsequence-point])
116076fae4e5dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wreturn-type])
116086fae4e5dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wtrigraphs])
116096fae4e5dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Warray-bounds])
116106fae4e5dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wwrite-strings])
116116fae4e5dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Waddress])
116126fae4e5dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wint-to-pointer-cast])
116136fae4e5dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-to-int-cast])
116146fae4e5dSmrgfi
116151f0ac6a5Smrg
116166fae4e5dSmrgAC_SUBST([BASE_]PREFIX[FLAGS])
116176fae4e5dSmrg]) # XORG_COMPILER_FLAGS
116186fae4e5dSmrg
116196fae4e5dSmrg# XORG_CWARNFLAGS
116206fae4e5dSmrg# ---------------
116216fae4e5dSmrg# Minimum version: 1.2.0
116226fae4e5dSmrg# Deprecated since: 1.16.0 (Use XORG_COMPILER_FLAGS instead)
116239c9ff80cSmrg#
116246fae4e5dSmrg# Defines CWARNFLAGS to enable C compiler warnings.
116259c9ff80cSmrg#
116266fae4e5dSmrg# This function is deprecated because it defines -fno-strict-aliasing
116276fae4e5dSmrg# which alters the code generated by the compiler.  If -fno-strict-aliasing
116286fae4e5dSmrg# is needed, then it should be added explicitly in the module when
116296fae4e5dSmrg# it is updated to use BASE_CFLAGS.
116306fae4e5dSmrg#
116316fae4e5dSmrgAC_DEFUN([XORG_CWARNFLAGS], [
116326fae4e5dSmrgAC_REQUIRE([XORG_COMPILER_FLAGS])
116336fae4e5dSmrgAC_REQUIRE([XORG_COMPILER_BRAND])
116346fae4e5dSmrgAC_LANG_CASE(
116356fae4e5dSmrg	[C], [
116366fae4e5dSmrg		CWARNFLAGS="$BASE_CFLAGS"
116376fae4e5dSmrg		if  test "x$GCC" = xyes ; then
116386fae4e5dSmrg		    CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing"
116396fae4e5dSmrg		fi
116406fae4e5dSmrg		AC_SUBST(CWARNFLAGS)
116416fae4e5dSmrg	]
116426fae4e5dSmrg)
116436fae4e5dSmrg]) # XORG_CWARNFLAGS
116441f0ac6a5Smrg
116456fae4e5dSmrg# XORG_STRICT_OPTION
116466fae4e5dSmrg# -----------------------
116476fae4e5dSmrg# Minimum version: 1.3.0
116486fae4e5dSmrg#
116496fae4e5dSmrg# Add configure option to enable strict compilation flags, such as treating
116506fae4e5dSmrg# warnings as fatal errors.
116516fae4e5dSmrg# If --enable-strict-compilation is passed to configure, adds strict flags to
116526fae4e5dSmrg# $BASE_CFLAGS or $BASE_CXXFLAGS and the deprecated $CWARNFLAGS.
116536fae4e5dSmrg#
116546fae4e5dSmrg# Starting in 1.14.0 also exports $STRICT_CFLAGS for use in other tests or
116556fae4e5dSmrg# when strict compilation is unconditionally desired.
116566fae4e5dSmrgAC_DEFUN([XORG_STRICT_OPTION], [
116576fae4e5dSmrgAC_REQUIRE([XORG_CWARNFLAGS])
116586fae4e5dSmrgAC_REQUIRE([XORG_COMPILER_FLAGS])
116591f0ac6a5Smrg
116606fae4e5dSmrgAC_ARG_ENABLE(strict-compilation,
116616fae4e5dSmrg			  AS_HELP_STRING([--enable-strict-compilation],
116626fae4e5dSmrg			  [Enable all warnings from compiler and make them errors (default: disabled)]),
116636fae4e5dSmrg			  [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no])
116641f0ac6a5Smrg
116656fae4e5dSmrgAC_LANG_CASE(
116666fae4e5dSmrg        [C], [
116676fae4e5dSmrg                define([PREFIX], [C])
116686fae4e5dSmrg        ],
116696fae4e5dSmrg        [C++], [
116706fae4e5dSmrg                define([PREFIX], [CXX])
116716fae4e5dSmrg        ]
116726fae4e5dSmrg)
116739c9ff80cSmrg
116746fae4e5dSmrg[STRICT_]PREFIX[FLAGS]=""
116756fae4e5dSmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-pedantic])
116766fae4e5dSmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror], [-errwarn])
116779c9ff80cSmrg
116786fae4e5dSmrg# Earlier versions of gcc (eg: 4.2) support -Werror=attributes, but do not
116796fae4e5dSmrg# activate it with -Werror, so we add it here explicitly.
116806fae4e5dSmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror=attributes])
116819c9ff80cSmrg
116826fae4e5dSmrgif test "x$STRICT_COMPILE" = "xyes"; then
116836fae4e5dSmrg    [BASE_]PREFIX[FLAGS]="$[BASE_]PREFIX[FLAGS] $[STRICT_]PREFIX[FLAGS]"
116846fae4e5dSmrg    AC_LANG_CASE([C], [CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"])
116856fae4e5dSmrgfi
116866fae4e5dSmrgAC_SUBST([STRICT_]PREFIX[FLAGS])
116876fae4e5dSmrgAC_SUBST([BASE_]PREFIX[FLAGS])
116886fae4e5dSmrgAC_LANG_CASE([C], AC_SUBST([CWARNFLAGS]))
116896fae4e5dSmrg]) # XORG_STRICT_OPTION
116909c9ff80cSmrg
116916fae4e5dSmrg# XORG_DEFAULT_OPTIONS
116926fae4e5dSmrg# --------------------
116936fae4e5dSmrg# Minimum version: 1.3.0
116949c9ff80cSmrg#
116956fae4e5dSmrg# Defines default options for X.Org modules.
116969c9ff80cSmrg#
116976fae4e5dSmrgAC_DEFUN([XORG_DEFAULT_OPTIONS], [
116986fae4e5dSmrgAC_REQUIRE([AC_PROG_INSTALL])
116996fae4e5dSmrgXORG_COMPILER_FLAGS
117006fae4e5dSmrgXORG_CWARNFLAGS
117016fae4e5dSmrgXORG_STRICT_OPTION
117026fae4e5dSmrgXORG_RELEASE_VERSION
117036fae4e5dSmrgXORG_CHANGELOG
117046fae4e5dSmrgXORG_INSTALL
117056fae4e5dSmrgXORG_MANPAGE_SECTIONS
117066fae4e5dSmrgm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])],
117076fae4e5dSmrg    [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])])
117086fae4e5dSmrg]) # XORG_DEFAULT_OPTIONS
117096fae4e5dSmrg
117106fae4e5dSmrg# XORG_INSTALL()
117116fae4e5dSmrg# ----------------
117126fae4e5dSmrg# Minimum version: 1.4.0
117139c9ff80cSmrg#
117146fae4e5dSmrg# Defines the variable INSTALL_CMD as the command to copy
117156fae4e5dSmrg# INSTALL from $prefix/share/util-macros.
117169c9ff80cSmrg#
117176fae4e5dSmrgAC_DEFUN([XORG_INSTALL], [
117186fae4e5dSmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG])
117196fae4e5dSmrgmacros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros`
117206fae4e5dSmrgINSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \
117216fae4e5dSmrgmv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \
117226fae4e5dSmrg|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \
117236fae4e5dSmrgecho 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)"
117246fae4e5dSmrgAC_SUBST([INSTALL_CMD])
117256fae4e5dSmrg]) # XORG_INSTALL
117266fae4e5dSmrgdnl Copyright 2005 Red Hat, Inc
117276fae4e5dSmrgdnl
117286fae4e5dSmrgdnl Permission to use, copy, modify, distribute, and sell this software and its
117296fae4e5dSmrgdnl documentation for any purpose is hereby granted without fee, provided that
117306fae4e5dSmrgdnl the above copyright notice appear in all copies and that both that
117316fae4e5dSmrgdnl copyright notice and this permission notice appear in supporting
117326fae4e5dSmrgdnl documentation.
117336fae4e5dSmrgdnl
117346fae4e5dSmrgdnl The above copyright notice and this permission notice shall be included
117356fae4e5dSmrgdnl in all copies or substantial portions of the Software.
117366fae4e5dSmrgdnl
117376fae4e5dSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
117386fae4e5dSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
117396fae4e5dSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
117406fae4e5dSmrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
117416fae4e5dSmrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
117426fae4e5dSmrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
117436fae4e5dSmrgdnl OTHER DEALINGS IN THE SOFTWARE.
117446fae4e5dSmrgdnl
117456fae4e5dSmrgdnl Except as contained in this notice, the name of the copyright holders shall
117466fae4e5dSmrgdnl not be used in advertising or otherwise to promote the sale, use or
117476fae4e5dSmrgdnl other dealings in this Software without prior written authorization
117486fae4e5dSmrgdnl from the copyright holders.
117496fae4e5dSmrgdnl
117509c9ff80cSmrg
117516fae4e5dSmrg# XORG_RELEASE_VERSION
117526fae4e5dSmrg# --------------------
117536fae4e5dSmrg# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use.
11754b9867631Smrg
117556fae4e5dSmrgAC_DEFUN([XORG_RELEASE_VERSION],[
117566fae4e5dSmrg	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR],
117576fae4e5dSmrg		[`echo $PACKAGE_VERSION | cut -d . -f 1`],
117586fae4e5dSmrg		[Major version of this package])
117596fae4e5dSmrg	PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1`
117606fae4e5dSmrg	if test "x$PVM" = "x"; then
117616fae4e5dSmrg		PVM="0"
117626fae4e5dSmrg	fi
117636fae4e5dSmrg	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR],
117646fae4e5dSmrg		[$PVM],
117656fae4e5dSmrg		[Minor version of this package])
117666fae4e5dSmrg	PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1`
117676fae4e5dSmrg	if test "x$PVP" = "x"; then
117686fae4e5dSmrg		PVP="0"
117696fae4e5dSmrg	fi
117706fae4e5dSmrg	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL],
117716fae4e5dSmrg		[$PVP],
117726fae4e5dSmrg		[Patch version of this package])
117736fae4e5dSmrg])
117749c9ff80cSmrg
117756fae4e5dSmrg# XORG_CHANGELOG()
117766fae4e5dSmrg# ----------------
117776fae4e5dSmrg# Minimum version: 1.2.0
117786fae4e5dSmrg#
117796fae4e5dSmrg# Defines the variable CHANGELOG_CMD as the command to generate
117806fae4e5dSmrg# ChangeLog from git.
117816fae4e5dSmrg#
117826fae4e5dSmrg#
117836fae4e5dSmrgAC_DEFUN([XORG_CHANGELOG], [
117846fae4e5dSmrgCHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \
117856fae4e5dSmrgmv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \
117866fae4e5dSmrg|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \
117876fae4e5dSmrgecho 'git directory not found: installing possibly empty changelog.' >&2)"
117886fae4e5dSmrgAC_SUBST([CHANGELOG_CMD])
117896fae4e5dSmrg]) # XORG_CHANGELOG
117901f0ac6a5Smrg
11791