aclocal.m4 revision 6fae4e5d
19c9ff80cSmrg# generated automatically by aclocal 1.11.1 -*- Autoconf -*-
21f0ac6a5Smrg
31f0ac6a5Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4e5410a46Smrg# 2005, 2006, 2007, 2008, 2009  Free Software Foundation, Inc.
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
14e5410a46Smrgm4_ifndef([AC_AUTOCONF_VERSION],
15e5410a46Smrg  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
166fae4e5dSmrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],,
176fae4e5dSmrg[m4_warning([this file was generated for autoconf 2.68.
18e5410a46SmrgYou have another version of autoconf.  It may work, but is not guaranteed to.
19e5410a46SmrgIf you have problems, you may need to regenerate the build system entirely.
20e5410a46SmrgTo do so, use the procedure documented by the package, typically `autoreconf'.])])
211f0ac6a5Smrg
22e5410a46Smrg# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
231f0ac6a5Smrg#
24e5410a46Smrg# This file is free software; the Free Software Foundation
25e5410a46Smrg# gives unlimited permission to copy and/or distribute it,
26e5410a46Smrg# with or without modifications, as long as this notice is preserved.
271f0ac6a5Smrg
28e5410a46Smrg# AM_AUTOMAKE_VERSION(VERSION)
29e5410a46Smrg# ----------------------------
30e5410a46Smrg# Automake X.Y traces this macro to ensure aclocal.m4 has been
31e5410a46Smrg# generated from the m4 files accompanying Automake X.Y.
32e5410a46Smrg# (This private macro should not be called outside this file.)
33e5410a46SmrgAC_DEFUN([AM_AUTOMAKE_VERSION],
34e5410a46Smrg[am__api_version='1.11'
35e5410a46Smrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
36e5410a46Smrgdnl require some minimum version.  Point them to the right macro.
379c9ff80cSmrgm4_if([$1], [1.11.1], [],
38e5410a46Smrg      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
39e5410a46Smrg])
401f0ac6a5Smrg
41e5410a46Smrg# _AM_AUTOCONF_VERSION(VERSION)
42e5410a46Smrg# -----------------------------
43e5410a46Smrg# aclocal traces this macro to find the Autoconf version.
44e5410a46Smrg# This is a private macro too.  Using m4_define simplifies
45e5410a46Smrg# the logic in aclocal, which can simply ignore this definition.
46e5410a46Smrgm4_define([_AM_AUTOCONF_VERSION], [])
471f0ac6a5Smrg
48e5410a46Smrg# AM_SET_CURRENT_AUTOMAKE_VERSION
49e5410a46Smrg# -------------------------------
50e5410a46Smrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
51e5410a46Smrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
52e5410a46SmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
539c9ff80cSmrg[AM_AUTOMAKE_VERSION([1.11.1])dnl
54e5410a46Smrgm4_ifndef([AC_AUTOCONF_VERSION],
55e5410a46Smrg  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
56e5410a46Smrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
571f0ac6a5Smrg
58e5410a46Smrg# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
591f0ac6a5Smrg
60e5410a46Smrg# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
61e5410a46Smrg#
62e5410a46Smrg# This file is free software; the Free Software Foundation
63e5410a46Smrg# gives unlimited permission to copy and/or distribute it,
64e5410a46Smrg# with or without modifications, as long as this notice is preserved.
651f0ac6a5Smrg
66e5410a46Smrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
67e5410a46Smrg# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
68e5410a46Smrg# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
691f0ac6a5Smrg#
70e5410a46Smrg# Of course, Automake must honor this variable whenever it calls a
71e5410a46Smrg# tool from the auxiliary directory.  The problem is that $srcdir (and
72e5410a46Smrg# therefore $ac_aux_dir as well) can be either absolute or relative,
73e5410a46Smrg# depending on how configure is run.  This is pretty annoying, since
74e5410a46Smrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top
75e5410a46Smrg# source directory, any form will work fine, but in subdirectories a
76e5410a46Smrg# relative path needs to be adjusted first.
771f0ac6a5Smrg#
78e5410a46Smrg# $ac_aux_dir/missing
79e5410a46Smrg#    fails when called from a subdirectory if $ac_aux_dir is relative
80e5410a46Smrg# $top_srcdir/$ac_aux_dir/missing
81e5410a46Smrg#    fails if $ac_aux_dir is absolute,
82e5410a46Smrg#    fails when called from a subdirectory in a VPATH build with
83e5410a46Smrg#          a relative $ac_aux_dir
841f0ac6a5Smrg#
85e5410a46Smrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
86e5410a46Smrg# are both prefixed by $srcdir.  In an in-source build this is usually
87e5410a46Smrg# harmless because $srcdir is `.', but things will broke when you
88e5410a46Smrg# start a VPATH build or use an absolute $srcdir.
891f0ac6a5Smrg#
90e5410a46Smrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
91e5410a46Smrg# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
92e5410a46Smrg#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
93e5410a46Smrg# and then we would define $MISSING as
94e5410a46Smrg#   MISSING="\${SHELL} $am_aux_dir/missing"
95e5410a46Smrg# This will work as long as MISSING is not called from configure, because
96e5410a46Smrg# unfortunately $(top_srcdir) has no meaning in configure.
97e5410a46Smrg# However there are other variables, like CC, which are often used in
98e5410a46Smrg# configure, and could therefore not use this "fixed" $ac_aux_dir.
99e5410a46Smrg#
100e5410a46Smrg# Another solution, used here, is to always expand $ac_aux_dir to an
101e5410a46Smrg# absolute PATH.  The drawback is that using absolute paths prevent a
102e5410a46Smrg# configured tree to be moved without reconfiguration.
1031f0ac6a5Smrg
104e5410a46SmrgAC_DEFUN([AM_AUX_DIR_EXPAND],
105e5410a46Smrg[dnl Rely on autoconf to set up CDPATH properly.
106e5410a46SmrgAC_PREREQ([2.50])dnl
107e5410a46Smrg# expand $ac_aux_dir to an absolute path
108e5410a46Smrgam_aux_dir=`cd $ac_aux_dir && pwd`
109e5410a46Smrg])
1101f0ac6a5Smrg
111e5410a46Smrg# AM_CONDITIONAL                                            -*- Autoconf -*-
1121f0ac6a5Smrg
113e5410a46Smrg# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
114e5410a46Smrg# Free Software Foundation, Inc.
115e5410a46Smrg#
116e5410a46Smrg# This file is free software; the Free Software Foundation
117e5410a46Smrg# gives unlimited permission to copy and/or distribute it,
118e5410a46Smrg# with or without modifications, as long as this notice is preserved.
1191f0ac6a5Smrg
120e5410a46Smrg# serial 9
1211f0ac6a5Smrg
122e5410a46Smrg# AM_CONDITIONAL(NAME, SHELL-CONDITION)
123e5410a46Smrg# -------------------------------------
124e5410a46Smrg# Define a conditional.
125e5410a46SmrgAC_DEFUN([AM_CONDITIONAL],
126e5410a46Smrg[AC_PREREQ(2.52)dnl
127e5410a46Smrg ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
128e5410a46Smrg	[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
129e5410a46SmrgAC_SUBST([$1_TRUE])dnl
130e5410a46SmrgAC_SUBST([$1_FALSE])dnl
131e5410a46Smrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl
132e5410a46Smrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl
133e5410a46Smrgm4_define([_AM_COND_VALUE_$1], [$2])dnl
134e5410a46Smrgif $2; then
135e5410a46Smrg  $1_TRUE=
136e5410a46Smrg  $1_FALSE='#'
137e5410a46Smrgelse
138e5410a46Smrg  $1_TRUE='#'
139e5410a46Smrg  $1_FALSE=
140e5410a46Smrgfi
141e5410a46SmrgAC_CONFIG_COMMANDS_PRE(
142e5410a46Smrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
143e5410a46Smrg  AC_MSG_ERROR([[conditional "$1" was never defined.
144e5410a46SmrgUsually this means the macro was only invoked conditionally.]])
145e5410a46Smrgfi])])
1461f0ac6a5Smrg
147e5410a46Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
148e5410a46Smrg# Free Software Foundation, Inc.
149e5410a46Smrg#
150e5410a46Smrg# This file is free software; the Free Software Foundation
151e5410a46Smrg# gives unlimited permission to copy and/or distribute it,
152e5410a46Smrg# with or without modifications, as long as this notice is preserved.
1531f0ac6a5Smrg
154e5410a46Smrg# serial 10
1551f0ac6a5Smrg
156e5410a46Smrg# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
157e5410a46Smrg# written in clear, in which case automake, when reading aclocal.m4,
158e5410a46Smrg# will think it sees a *use*, and therefore will trigger all it's
159e5410a46Smrg# C support machinery.  Also note that it means that autoscan, seeing
160e5410a46Smrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
1611f0ac6a5Smrg
1621f0ac6a5Smrg
163e5410a46Smrg# _AM_DEPENDENCIES(NAME)
164e5410a46Smrg# ----------------------
165e5410a46Smrg# See how the compiler implements dependency checking.
166e5410a46Smrg# NAME is "CC", "CXX", "GCJ", or "OBJC".
167e5410a46Smrg# We try a few techniques and use that to set a single cache variable.
168e5410a46Smrg#
169e5410a46Smrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
170e5410a46Smrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
171e5410a46Smrg# dependency, and given that the user is not expected to run this macro,
172e5410a46Smrg# just rely on AC_PROG_CC.
173e5410a46SmrgAC_DEFUN([_AM_DEPENDENCIES],
174e5410a46Smrg[AC_REQUIRE([AM_SET_DEPDIR])dnl
175e5410a46SmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
176e5410a46SmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl
177e5410a46SmrgAC_REQUIRE([AM_DEP_TRACK])dnl
1781f0ac6a5Smrg
179e5410a46Smrgifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
180e5410a46Smrg       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
181e5410a46Smrg       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
182e5410a46Smrg       [$1], UPC,  [depcc="$UPC"  am_compiler_list=],
183e5410a46Smrg       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
184e5410a46Smrg                   [depcc="$$1"   am_compiler_list=])
1851f0ac6a5Smrg
186e5410a46SmrgAC_CACHE_CHECK([dependency style of $depcc],
187e5410a46Smrg               [am_cv_$1_dependencies_compiler_type],
188e5410a46Smrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
189e5410a46Smrg  # We make a subdir and do the tests there.  Otherwise we can end up
190e5410a46Smrg  # making bogus files that we don't know about and never remove.  For
191e5410a46Smrg  # instance it was reported that on HP-UX the gcc test will end up
192e5410a46Smrg  # making a dummy file named `D' -- because `-MD' means `put the output
193e5410a46Smrg  # in D'.
194e5410a46Smrg  mkdir conftest.dir
195e5410a46Smrg  # Copy depcomp to subdir because otherwise we won't find it if we're
196e5410a46Smrg  # using a relative directory.
197e5410a46Smrg  cp "$am_depcomp" conftest.dir
198e5410a46Smrg  cd conftest.dir
199e5410a46Smrg  # We will build objects and dependencies in a subdirectory because
200e5410a46Smrg  # it helps to detect inapplicable dependency modes.  For instance
201e5410a46Smrg  # both Tru64's cc and ICC support -MD to output dependencies as a
202e5410a46Smrg  # side effect of compilation, but ICC will put the dependencies in
203e5410a46Smrg  # the current directory while Tru64 will put them in the object
204e5410a46Smrg  # directory.
205e5410a46Smrg  mkdir sub
2061f0ac6a5Smrg
207e5410a46Smrg  am_cv_$1_dependencies_compiler_type=none
208e5410a46Smrg  if test "$am_compiler_list" = ""; then
209e5410a46Smrg     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
210e5410a46Smrg  fi
211e5410a46Smrg  am__universal=false
212e5410a46Smrg  m4_case([$1], [CC],
213e5410a46Smrg    [case " $depcc " in #(
214e5410a46Smrg     *\ -arch\ *\ -arch\ *) am__universal=true ;;
215e5410a46Smrg     esac],
216e5410a46Smrg    [CXX],
217e5410a46Smrg    [case " $depcc " in #(
218e5410a46Smrg     *\ -arch\ *\ -arch\ *) am__universal=true ;;
219e5410a46Smrg     esac])
2201f0ac6a5Smrg
221e5410a46Smrg  for depmode in $am_compiler_list; do
222e5410a46Smrg    # Setup a source with many dependencies, because some compilers
223e5410a46Smrg    # like to wrap large dependency lists on column 80 (with \), and
224e5410a46Smrg    # we should not choose a depcomp mode which is confused by this.
225e5410a46Smrg    #
226e5410a46Smrg    # We need to recreate these files for each test, as the compiler may
227e5410a46Smrg    # overwrite some of them when testing with obscure command lines.
228e5410a46Smrg    # This happens at least with the AIX C compiler.
229e5410a46Smrg    : > sub/conftest.c
230e5410a46Smrg    for i in 1 2 3 4 5 6; do
231e5410a46Smrg      echo '#include "conftst'$i'.h"' >> sub/conftest.c
232e5410a46Smrg      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
233e5410a46Smrg      # Solaris 8's {/usr,}/bin/sh.
234e5410a46Smrg      touch sub/conftst$i.h
235e5410a46Smrg    done
236e5410a46Smrg    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
237e5410a46Smrg
238e5410a46Smrg    # We check with `-c' and `-o' for the sake of the "dashmstdout"
239e5410a46Smrg    # mode.  It turns out that the SunPro C++ compiler does not properly
240e5410a46Smrg    # handle `-M -o', and we need to detect this.  Also, some Intel
241e5410a46Smrg    # versions had trouble with output in subdirs
242e5410a46Smrg    am__obj=sub/conftest.${OBJEXT-o}
243e5410a46Smrg    am__minus_obj="-o $am__obj"
244e5410a46Smrg    case $depmode in
245e5410a46Smrg    gcc)
246e5410a46Smrg      # This depmode causes a compiler race in universal mode.
247e5410a46Smrg      test "$am__universal" = false || continue
248e5410a46Smrg      ;;
249e5410a46Smrg    nosideeffect)
250e5410a46Smrg      # after this tag, mechanisms are not by side-effect, so they'll
251e5410a46Smrg      # only be used when explicitly requested
252e5410a46Smrg      if test "x$enable_dependency_tracking" = xyes; then
253e5410a46Smrg	continue
254e5410a46Smrg      else
255e5410a46Smrg	break
256e5410a46Smrg      fi
257e5410a46Smrg      ;;
258e5410a46Smrg    msvisualcpp | msvcmsys)
259e5410a46Smrg      # This compiler won't grok `-c -o', but also, the minuso test has
260e5410a46Smrg      # not run yet.  These depmodes are late enough in the game, and
261e5410a46Smrg      # so weak that their functioning should not be impacted.
262e5410a46Smrg      am__obj=conftest.${OBJEXT-o}
263e5410a46Smrg      am__minus_obj=
264e5410a46Smrg      ;;
265e5410a46Smrg    none) break ;;
266e5410a46Smrg    esac
267e5410a46Smrg    if depmode=$depmode \
268e5410a46Smrg       source=sub/conftest.c object=$am__obj \
269e5410a46Smrg       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
270e5410a46Smrg       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
271e5410a46Smrg         >/dev/null 2>conftest.err &&
272e5410a46Smrg       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
273e5410a46Smrg       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
274e5410a46Smrg       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
275e5410a46Smrg       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
276e5410a46Smrg      # icc doesn't choke on unknown options, it will just issue warnings
277e5410a46Smrg      # or remarks (even with -Werror).  So we grep stderr for any message
278e5410a46Smrg      # that says an option was ignored or not supported.
279e5410a46Smrg      # When given -MP, icc 7.0 and 7.1 complain thusly:
280e5410a46Smrg      #   icc: Command line warning: ignoring option '-M'; no argument required
281e5410a46Smrg      # The diagnosis changed in icc 8.0:
282e5410a46Smrg      #   icc: Command line remark: option '-MP' not supported
283e5410a46Smrg      if (grep 'ignoring option' conftest.err ||
284e5410a46Smrg          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
285e5410a46Smrg        am_cv_$1_dependencies_compiler_type=$depmode
286e5410a46Smrg        break
287e5410a46Smrg      fi
288e5410a46Smrg    fi
289e5410a46Smrg  done
290e5410a46Smrg
291e5410a46Smrg  cd ..
292e5410a46Smrg  rm -rf conftest.dir
2931f0ac6a5Smrgelse
294e5410a46Smrg  am_cv_$1_dependencies_compiler_type=none
2951f0ac6a5Smrgfi
296e5410a46Smrg])
297e5410a46SmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
298e5410a46SmrgAM_CONDITIONAL([am__fastdep$1], [
299e5410a46Smrg  test "x$enable_dependency_tracking" != xno \
300e5410a46Smrg  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
301e5410a46Smrg])
3021f0ac6a5Smrg
303e5410a46Smrg
304e5410a46Smrg# AM_SET_DEPDIR
305e5410a46Smrg# -------------
306e5410a46Smrg# Choose a directory name for dependency files.
307e5410a46Smrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES
308e5410a46SmrgAC_DEFUN([AM_SET_DEPDIR],
309e5410a46Smrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
310e5410a46SmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
311e5410a46Smrg])
312e5410a46Smrg
313e5410a46Smrg
314e5410a46Smrg# AM_DEP_TRACK
315e5410a46Smrg# ------------
316e5410a46SmrgAC_DEFUN([AM_DEP_TRACK],
317e5410a46Smrg[AC_ARG_ENABLE(dependency-tracking,
318e5410a46Smrg[  --disable-dependency-tracking  speeds up one-time build
319e5410a46Smrg  --enable-dependency-tracking   do not reject slow dependency extractors])
320e5410a46Smrgif test "x$enable_dependency_tracking" != xno; then
321e5410a46Smrg  am_depcomp="$ac_aux_dir/depcomp"
322e5410a46Smrg  AMDEPBACKSLASH='\'
3231f0ac6a5Smrgfi
324e5410a46SmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
325e5410a46SmrgAC_SUBST([AMDEPBACKSLASH])dnl
326e5410a46Smrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
327e5410a46Smrg])
3281f0ac6a5Smrg
329e5410a46Smrg# Generate code to set up dependency tracking.              -*- Autoconf -*-
330e5410a46Smrg
331e5410a46Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
332e5410a46Smrg# Free Software Foundation, Inc.
3331f0ac6a5Smrg#
334e5410a46Smrg# This file is free software; the Free Software Foundation
335e5410a46Smrg# gives unlimited permission to copy and/or distribute it,
336e5410a46Smrg# with or without modifications, as long as this notice is preserved.
3371f0ac6a5Smrg
338e5410a46Smrg#serial 5
3391f0ac6a5Smrg
340e5410a46Smrg# _AM_OUTPUT_DEPENDENCY_COMMANDS
341e5410a46Smrg# ------------------------------
342e5410a46SmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
343e5410a46Smrg[{
344e5410a46Smrg  # Autoconf 2.62 quotes --file arguments for eval, but not when files
345e5410a46Smrg  # are listed without --file.  Let's play safe and only enable the eval
346e5410a46Smrg  # if we detect the quoting.
347e5410a46Smrg  case $CONFIG_FILES in
348e5410a46Smrg  *\'*) eval set x "$CONFIG_FILES" ;;
349e5410a46Smrg  *)   set x $CONFIG_FILES ;;
350e5410a46Smrg  esac
351e5410a46Smrg  shift
352e5410a46Smrg  for mf
353e5410a46Smrg  do
354e5410a46Smrg    # Strip MF so we end up with the name of the file.
355e5410a46Smrg    mf=`echo "$mf" | sed -e 's/:.*$//'`
356e5410a46Smrg    # Check whether this is an Automake generated Makefile or not.
357e5410a46Smrg    # We used to match only the files named `Makefile.in', but
358e5410a46Smrg    # some people rename them; so instead we look at the file content.
359e5410a46Smrg    # Grep'ing the first line is not enough: some people post-process
360e5410a46Smrg    # each Makefile.in and add a new line on top of each file to say so.
361e5410a46Smrg    # Grep'ing the whole file is not good either: AIX grep has a line
362e5410a46Smrg    # limit of 2048, but all sed's we know have understand at least 4000.
363e5410a46Smrg    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
364e5410a46Smrg      dirpart=`AS_DIRNAME("$mf")`
365e5410a46Smrg    else
366e5410a46Smrg      continue
367e5410a46Smrg    fi
368e5410a46Smrg    # Extract the definition of DEPDIR, am__include, and am__quote
369e5410a46Smrg    # from the Makefile without running `make'.
370e5410a46Smrg    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
371e5410a46Smrg    test -z "$DEPDIR" && continue
372e5410a46Smrg    am__include=`sed -n 's/^am__include = //p' < "$mf"`
373e5410a46Smrg    test -z "am__include" && continue
374e5410a46Smrg    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
375e5410a46Smrg    # When using ansi2knr, U may be empty or an underscore; expand it
376e5410a46Smrg    U=`sed -n 's/^U = //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" | \
383e5410a46Smrg	 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/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
401e5410a46Smrg# 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
411e5410a46Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
412e5410a46Smrg# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
413e5410a46Smrg#
414e5410a46Smrg# This file is free software; the Free Software Foundation
415e5410a46Smrg# gives unlimited permission to copy and/or distribute it,
416e5410a46Smrg# with or without modifications, as long as this notice is preserved.
417e5410a46Smrg
418e5410a46Smrg# serial 16
419e5410a46Smrg
420e5410a46Smrg# This macro actually does too much.  Some checks are only needed if
421e5410a46Smrg# your package does certain things.  But this isn't really a big deal.
422e5410a46Smrg
423e5410a46Smrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
424e5410a46Smrg# AM_INIT_AUTOMAKE([OPTIONS])
425e5410a46Smrg# -----------------------------------------------
426e5410a46Smrg# The call with PACKAGE and VERSION arguments is the old style
427e5410a46Smrg# call (pre autoconf-2.50), which is being phased out.  PACKAGE
428e5410a46Smrg# and VERSION should now be passed to AC_INIT and removed from
429e5410a46Smrg# the call to AM_INIT_AUTOMAKE.
430e5410a46Smrg# We support both call styles for the transition.  After
431e5410a46Smrg# the next Automake release, Autoconf can make the AC_INIT
432e5410a46Smrg# arguments mandatory, and then we can depend on a new Autoconf
433e5410a46Smrg# release and drop the old call support.
434e5410a46SmrgAC_DEFUN([AM_INIT_AUTOMAKE],
435e5410a46Smrg[AC_PREREQ([2.62])dnl
436e5410a46Smrgdnl Autoconf wants to disallow AM_ names.  We explicitly allow
437e5410a46Smrgdnl the ones we care about.
438e5410a46Smrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
439e5410a46SmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
440e5410a46SmrgAC_REQUIRE([AC_PROG_INSTALL])dnl
441e5410a46Smrgif test "`cd $srcdir && pwd`" != "`pwd`"; then
442e5410a46Smrg  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
443e5410a46Smrg  # is not polluted with repeated "-I."
444e5410a46Smrg  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
445e5410a46Smrg  # test to see if srcdir already configured
446e5410a46Smrg  if test -f $srcdir/config.status; then
447e5410a46Smrg    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
448e5410a46Smrg  fi
4491f0ac6a5Smrgfi
450e5410a46Smrg
451e5410a46Smrg# test whether we have cygpath
452e5410a46Smrgif test -z "$CYGPATH_W"; then
453e5410a46Smrg  if (cygpath --version) >/dev/null 2>/dev/null; then
454e5410a46Smrg    CYGPATH_W='cygpath -w'
455e5410a46Smrg  else
456e5410a46Smrg    CYGPATH_W=echo
457e5410a46Smrg  fi
4581f0ac6a5Smrgfi
459e5410a46SmrgAC_SUBST([CYGPATH_W])
460e5410a46Smrg
461e5410a46Smrg# Define the identity of the package.
462e5410a46Smrgdnl Distinguish between old-style and new-style calls.
463e5410a46Smrgm4_ifval([$2],
464e5410a46Smrg[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
465e5410a46Smrg AC_SUBST([PACKAGE], [$1])dnl
466e5410a46Smrg AC_SUBST([VERSION], [$2])],
467e5410a46Smrg[_AM_SET_OPTIONS([$1])dnl
468e5410a46Smrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
469e5410a46Smrgm4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
470e5410a46Smrg  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
471e5410a46Smrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
472e5410a46Smrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
473e5410a46Smrg
474e5410a46Smrg_AM_IF_OPTION([no-define],,
475e5410a46Smrg[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
476e5410a46Smrg AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
477e5410a46Smrg
478e5410a46Smrg# Some tools Automake needs.
479e5410a46SmrgAC_REQUIRE([AM_SANITY_CHECK])dnl
480e5410a46SmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl
481e5410a46SmrgAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
482e5410a46SmrgAM_MISSING_PROG(AUTOCONF, autoconf)
483e5410a46SmrgAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
484e5410a46SmrgAM_MISSING_PROG(AUTOHEADER, autoheader)
485e5410a46SmrgAM_MISSING_PROG(MAKEINFO, makeinfo)
486e5410a46SmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl
487e5410a46SmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
488e5410a46SmrgAC_REQUIRE([AM_PROG_MKDIR_P])dnl
489e5410a46Smrg# We need awk for the "check" target.  The system "awk" is bad on
490e5410a46Smrg# some platforms.
491e5410a46SmrgAC_REQUIRE([AC_PROG_AWK])dnl
492e5410a46SmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl
493e5410a46SmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl
494e5410a46Smrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
495e5410a46Smrg	      [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
496e5410a46Smrg			     [_AM_PROG_TAR([v7])])])
497e5410a46Smrg_AM_IF_OPTION([no-dependencies],,
498e5410a46Smrg[AC_PROVIDE_IFELSE([AC_PROG_CC],
499e5410a46Smrg		  [_AM_DEPENDENCIES(CC)],
500e5410a46Smrg		  [define([AC_PROG_CC],
501e5410a46Smrg			  defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
502e5410a46SmrgAC_PROVIDE_IFELSE([AC_PROG_CXX],
503e5410a46Smrg		  [_AM_DEPENDENCIES(CXX)],
504e5410a46Smrg		  [define([AC_PROG_CXX],
505e5410a46Smrg			  defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
506e5410a46SmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC],
507e5410a46Smrg		  [_AM_DEPENDENCIES(OBJC)],
508e5410a46Smrg		  [define([AC_PROG_OBJC],
509e5410a46Smrg			  defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
510e5410a46Smrg])
511e5410a46Smrg_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
512e5410a46Smrgdnl The `parallel-tests' driver may need to know about EXEEXT, so add the
513e5410a46Smrgdnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This macro
514e5410a46Smrgdnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
515e5410a46SmrgAC_CONFIG_COMMANDS_PRE(dnl
516e5410a46Smrg[m4_provide_if([_AM_COMPILER_EXEEXT],
517e5410a46Smrg  [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
518e5410a46Smrg])
5191f0ac6a5Smrg
520e5410a46Smrgdnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
521e5410a46Smrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
522e5410a46Smrgdnl mangled by Autoconf and run in a shell conditional statement.
523e5410a46Smrgm4_define([_AC_COMPILER_EXEEXT],
524e5410a46Smrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
5251f0ac6a5Smrg
5261f0ac6a5Smrg
527e5410a46Smrg# When config.status generates a header, we must update the stamp-h file.
528e5410a46Smrg# This file resides in the same directory as the config header
529e5410a46Smrg# that is generated.  The stamp files are numbered to have different names.
5301f0ac6a5Smrg
531e5410a46Smrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
532e5410a46Smrg# loop where config.status creates the headers, so we can generate
533e5410a46Smrg# our stamp files there.
534e5410a46SmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
535e5410a46Smrg[# Compute $1's index in $config_headers.
536e5410a46Smrg_am_arg=$1
537e5410a46Smrg_am_stamp_count=1
538e5410a46Smrgfor _am_header in $config_headers :; do
539e5410a46Smrg  case $_am_header in
540e5410a46Smrg    $_am_arg | $_am_arg:* )
541e5410a46Smrg      break ;;
542e5410a46Smrg    * )
543e5410a46Smrg      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
544e5410a46Smrg  esac
545e5410a46Smrgdone
546e5410a46Smrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
5471f0ac6a5Smrg
548e5410a46Smrg# Copyright (C) 2001, 2003, 2005, 2008  Free Software Foundation, Inc.
5491f0ac6a5Smrg#
550e5410a46Smrg# This file is free software; the Free Software Foundation
551e5410a46Smrg# gives unlimited permission to copy and/or distribute it,
552e5410a46Smrg# with or without modifications, as long as this notice is preserved.
5531f0ac6a5Smrg
554e5410a46Smrg# AM_PROG_INSTALL_SH
555e5410a46Smrg# ------------------
556e5410a46Smrg# Define $install_sh.
557e5410a46SmrgAC_DEFUN([AM_PROG_INSTALL_SH],
558e5410a46Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
559e5410a46Smrgif test x"${install_sh}" != xset; then
560e5410a46Smrg  case $am_aux_dir in
561e5410a46Smrg  *\ * | *\	*)
562e5410a46Smrg    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
563e5410a46Smrg  *)
564e5410a46Smrg    install_sh="\${SHELL} $am_aux_dir/install-sh"
565e5410a46Smrg  esac
566e5410a46Smrgfi
567e5410a46SmrgAC_SUBST(install_sh)])
5681f0ac6a5Smrg
569e5410a46Smrg# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
570e5410a46Smrg#
571e5410a46Smrg# This file is free software; the Free Software Foundation
572e5410a46Smrg# gives unlimited permission to copy and/or distribute it,
573e5410a46Smrg# with or without modifications, as long as this notice is preserved.
5741f0ac6a5Smrg
575e5410a46Smrg# serial 2
5761f0ac6a5Smrg
577e5410a46Smrg# Check whether the underlying file-system supports filenames
578e5410a46Smrg# with a leading dot.  For instance MS-DOS doesn't.
579e5410a46SmrgAC_DEFUN([AM_SET_LEADING_DOT],
580e5410a46Smrg[rm -rf .tst 2>/dev/null
581e5410a46Smrgmkdir .tst 2>/dev/null
582e5410a46Smrgif test -d .tst; then
583e5410a46Smrg  am__leading_dot=.
5841f0ac6a5Smrgelse
585e5410a46Smrg  am__leading_dot=_
5861f0ac6a5Smrgfi
587e5410a46Smrgrmdir .tst 2>/dev/null
588e5410a46SmrgAC_SUBST([am__leading_dot])])
5891f0ac6a5Smrg
590e5410a46Smrg# Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
591e5410a46Smrg# From Jim Meyering
5921f0ac6a5Smrg
593e5410a46Smrg# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008
594e5410a46Smrg# Free Software Foundation, Inc.
595e5410a46Smrg#
596e5410a46Smrg# This file is free software; the Free Software Foundation
597e5410a46Smrg# gives unlimited permission to copy and/or distribute it,
598e5410a46Smrg# with or without modifications, as long as this notice is preserved.
5991f0ac6a5Smrg
600e5410a46Smrg# serial 5
6011f0ac6a5Smrg
602e5410a46Smrg# AM_MAINTAINER_MODE([DEFAULT-MODE])
603e5410a46Smrg# ----------------------------------
604e5410a46Smrg# Control maintainer-specific portions of Makefiles.
605e5410a46Smrg# Default is to disable them, unless `enable' is passed literally.
606e5410a46Smrg# For symmetry, `disable' may be passed as well.  Anyway, the user
607e5410a46Smrg# can override the default with the --enable/--disable switch.
608e5410a46SmrgAC_DEFUN([AM_MAINTAINER_MODE],
609e5410a46Smrg[m4_case(m4_default([$1], [disable]),
610e5410a46Smrg       [enable], [m4_define([am_maintainer_other], [disable])],
611e5410a46Smrg       [disable], [m4_define([am_maintainer_other], [enable])],
612e5410a46Smrg       [m4_define([am_maintainer_other], [enable])
613e5410a46Smrg        m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
614e5410a46SmrgAC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles])
615e5410a46Smrg  dnl maintainer-mode's default is 'disable' unless 'enable' is passed
616e5410a46Smrg  AC_ARG_ENABLE([maintainer-mode],
617e5410a46Smrg[  --][am_maintainer_other][-maintainer-mode  am_maintainer_other make rules and dependencies not useful
618e5410a46Smrg			  (and sometimes confusing) to the casual installer],
619e5410a46Smrg      [USE_MAINTAINER_MODE=$enableval],
620e5410a46Smrg      [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
621e5410a46Smrg  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
622e5410a46Smrg  AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
623e5410a46Smrg  MAINT=$MAINTAINER_MODE_TRUE
624e5410a46Smrg  AC_SUBST([MAINT])dnl
625e5410a46Smrg]
626e5410a46Smrg)
6271f0ac6a5Smrg
628e5410a46SmrgAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
6291f0ac6a5Smrg
630e5410a46Smrg# Check to see how 'make' treats includes.	            -*- Autoconf -*-
6311f0ac6a5Smrg
632e5410a46Smrg# Copyright (C) 2001, 2002, 2003, 2005, 2009  Free Software Foundation, Inc.
633e5410a46Smrg#
634e5410a46Smrg# This file is free software; the Free Software Foundation
635e5410a46Smrg# gives unlimited permission to copy and/or distribute it,
636e5410a46Smrg# with or without modifications, as long as this notice is preserved.
6371f0ac6a5Smrg
638e5410a46Smrg# serial 4
6391f0ac6a5Smrg
640e5410a46Smrg# AM_MAKE_INCLUDE()
641e5410a46Smrg# -----------------
642e5410a46Smrg# Check to see how make treats includes.
643e5410a46SmrgAC_DEFUN([AM_MAKE_INCLUDE],
644e5410a46Smrg[am_make=${MAKE-make}
645e5410a46Smrgcat > confinc << 'END'
646e5410a46Smrgam__doit:
647e5410a46Smrg	@echo this is the am__doit target
648e5410a46Smrg.PHONY: am__doit
649e5410a46SmrgEND
650e5410a46Smrg# If we don't find an include directive, just comment out the code.
651e5410a46SmrgAC_MSG_CHECKING([for style of include used by $am_make])
652e5410a46Smrgam__include="#"
653e5410a46Smrgam__quote=
654e5410a46Smrg_am_result=none
655e5410a46Smrg# First try GNU make style include.
656e5410a46Smrgecho "include confinc" > confmf
657e5410a46Smrg# Ignore all kinds of additional output from `make'.
658e5410a46Smrgcase `$am_make -s -f confmf 2> /dev/null` in #(
659e5410a46Smrg*the\ am__doit\ target*)
660e5410a46Smrg  am__include=include
661e5410a46Smrg  am__quote=
662e5410a46Smrg  _am_result=GNU
663e5410a46Smrg  ;;
664e5410a46Smrgesac
665e5410a46Smrg# Now try BSD make style include.
666e5410a46Smrgif test "$am__include" = "#"; then
667e5410a46Smrg   echo '.include "confinc"' > confmf
668e5410a46Smrg   case `$am_make -s -f confmf 2> /dev/null` in #(
669e5410a46Smrg   *the\ am__doit\ target*)
670e5410a46Smrg     am__include=.include
671e5410a46Smrg     am__quote="\""
672e5410a46Smrg     _am_result=BSD
673e5410a46Smrg     ;;
674e5410a46Smrg   esac
675e5410a46Smrgfi
676e5410a46SmrgAC_SUBST([am__include])
677e5410a46SmrgAC_SUBST([am__quote])
678e5410a46SmrgAC_MSG_RESULT([$_am_result])
679e5410a46Smrgrm -f confinc confmf
680e5410a46Smrg])
681e5410a46Smrg
682e5410a46Smrg# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
683e5410a46Smrg
684e5410a46Smrg# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
685e5410a46Smrg# Free Software Foundation, Inc.
6861f0ac6a5Smrg#
687e5410a46Smrg# This file is free software; the Free Software Foundation
688e5410a46Smrg# gives unlimited permission to copy and/or distribute it,
689e5410a46Smrg# with or without modifications, as long as this notice is preserved.
6901f0ac6a5Smrg
691e5410a46Smrg# serial 6
6921f0ac6a5Smrg
693e5410a46Smrg# AM_MISSING_PROG(NAME, PROGRAM)
694e5410a46Smrg# ------------------------------
695e5410a46SmrgAC_DEFUN([AM_MISSING_PROG],
696e5410a46Smrg[AC_REQUIRE([AM_MISSING_HAS_RUN])
697e5410a46Smrg$1=${$1-"${am_missing_run}$2"}
698e5410a46SmrgAC_SUBST($1)])
6991f0ac6a5Smrg
7001f0ac6a5Smrg
701e5410a46Smrg# AM_MISSING_HAS_RUN
702e5410a46Smrg# ------------------
703e5410a46Smrg# Define MISSING if not defined so far and test if it supports --run.
704e5410a46Smrg# If it does, set am_missing_run to use it, otherwise, to nothing.
705e5410a46SmrgAC_DEFUN([AM_MISSING_HAS_RUN],
706e5410a46Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
707e5410a46SmrgAC_REQUIRE_AUX_FILE([missing])dnl
708e5410a46Smrgif test x"${MISSING+set}" != xset; then
709e5410a46Smrg  case $am_aux_dir in
710e5410a46Smrg  *\ * | *\	*)
711e5410a46Smrg    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
712e5410a46Smrg  *)
713e5410a46Smrg    MISSING="\${SHELL} $am_aux_dir/missing" ;;
714e5410a46Smrg  esac
7151f0ac6a5Smrgfi
716e5410a46Smrg# Use eval to expand $SHELL
717e5410a46Smrgif eval "$MISSING --run true"; then
718e5410a46Smrg  am_missing_run="$MISSING --run "
719e5410a46Smrgelse
720e5410a46Smrg  am_missing_run=
721e5410a46Smrg  AC_MSG_WARN([`missing' script is too old or missing])
7221f0ac6a5Smrgfi
723e5410a46Smrg])
724e5410a46Smrg
725e5410a46Smrg# Copyright (C) 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
726e5410a46Smrg#
727e5410a46Smrg# This file is free software; the Free Software Foundation
728e5410a46Smrg# gives unlimited permission to copy and/or distribute it,
729e5410a46Smrg# with or without modifications, as long as this notice is preserved.
730e5410a46Smrg
731e5410a46Smrg# AM_PROG_MKDIR_P
732e5410a46Smrg# ---------------
733e5410a46Smrg# Check for `mkdir -p'.
734e5410a46SmrgAC_DEFUN([AM_PROG_MKDIR_P],
735e5410a46Smrg[AC_PREREQ([2.60])dnl
736e5410a46SmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl
737e5410a46Smrgdnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
738e5410a46Smrgdnl while keeping a definition of mkdir_p for backward compatibility.
739e5410a46Smrgdnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
740e5410a46Smrgdnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
741e5410a46Smrgdnl Makefile.ins that do not define MKDIR_P, so we do our own
742e5410a46Smrgdnl adjustment using top_builddir (which is defined more often than
743e5410a46Smrgdnl MKDIR_P).
744e5410a46SmrgAC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
745e5410a46Smrgcase $mkdir_p in
746e5410a46Smrg  [[\\/$]]* | ?:[[\\/]]*) ;;
747e5410a46Smrg  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
748e5410a46Smrgesac
749e5410a46Smrg])
750e5410a46Smrg
751e5410a46Smrg# Helper functions for option handling.                     -*- Autoconf -*-
7521f0ac6a5Smrg
753e5410a46Smrg# Copyright (C) 2001, 2002, 2003, 2005, 2008  Free Software Foundation, Inc.
754e5410a46Smrg#
755e5410a46Smrg# This file is free software; the Free Software Foundation
756e5410a46Smrg# gives unlimited permission to copy and/or distribute it,
757e5410a46Smrg# with or without modifications, as long as this notice is preserved.
7581f0ac6a5Smrg
759e5410a46Smrg# serial 4
7601f0ac6a5Smrg
761e5410a46Smrg# _AM_MANGLE_OPTION(NAME)
762e5410a46Smrg# -----------------------
763e5410a46SmrgAC_DEFUN([_AM_MANGLE_OPTION],
764e5410a46Smrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
7651f0ac6a5Smrg
766e5410a46Smrg# _AM_SET_OPTION(NAME)
767e5410a46Smrg# ------------------------------
768e5410a46Smrg# Set option NAME.  Presently that only means defining a flag for this option.
769e5410a46SmrgAC_DEFUN([_AM_SET_OPTION],
770e5410a46Smrg[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
7711f0ac6a5Smrg
772e5410a46Smrg# _AM_SET_OPTIONS(OPTIONS)
773e5410a46Smrg# ----------------------------------
774e5410a46Smrg# OPTIONS is a space-separated list of Automake options.
775e5410a46SmrgAC_DEFUN([_AM_SET_OPTIONS],
776e5410a46Smrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
7771f0ac6a5Smrg
778e5410a46Smrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
779e5410a46Smrg# -------------------------------------------
780e5410a46Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
781e5410a46SmrgAC_DEFUN([_AM_IF_OPTION],
782e5410a46Smrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
7831f0ac6a5Smrg
784e5410a46Smrg# Check to make sure that the build environment is sane.    -*- Autoconf -*-
7851f0ac6a5Smrg
786e5410a46Smrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
787e5410a46Smrg# Free Software Foundation, Inc.
7881f0ac6a5Smrg#
789e5410a46Smrg# This file is free software; the Free Software Foundation
790e5410a46Smrg# gives unlimited permission to copy and/or distribute it,
791e5410a46Smrg# with or without modifications, as long as this notice is preserved.
7921f0ac6a5Smrg
793e5410a46Smrg# serial 5
7941f0ac6a5Smrg
795e5410a46Smrg# AM_SANITY_CHECK
796e5410a46Smrg# ---------------
797e5410a46SmrgAC_DEFUN([AM_SANITY_CHECK],
798e5410a46Smrg[AC_MSG_CHECKING([whether build environment is sane])
799e5410a46Smrg# Just in case
800e5410a46Smrgsleep 1
801e5410a46Smrgecho timestamp > conftest.file
802e5410a46Smrg# Reject unsafe characters in $srcdir or the absolute working directory
803e5410a46Smrg# name.  Accept space and tab only in the latter.
804e5410a46Smrgam_lf='
805e5410a46Smrg'
806e5410a46Smrgcase `pwd` in
807e5410a46Smrg  *[[\\\"\#\$\&\'\`$am_lf]]*)
808e5410a46Smrg    AC_MSG_ERROR([unsafe absolute working directory name]);;
809e5410a46Smrgesac
810e5410a46Smrgcase $srcdir in
811e5410a46Smrg  *[[\\\"\#\$\&\'\`$am_lf\ \	]]*)
812e5410a46Smrg    AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
813e5410a46Smrgesac
8141f0ac6a5Smrg
815e5410a46Smrg# Do `set' in a subshell so we don't clobber the current shell's
816e5410a46Smrg# arguments.  Must try -L first in case configure is actually a
817e5410a46Smrg# symlink; some systems play weird games with the mod time of symlinks
818e5410a46Smrg# (eg FreeBSD returns the mod time of the symlink's containing
819e5410a46Smrg# directory).
820e5410a46Smrgif (
821e5410a46Smrg   set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
822e5410a46Smrg   if test "$[*]" = "X"; then
823e5410a46Smrg      # -L didn't work.
824e5410a46Smrg      set X `ls -t "$srcdir/configure" conftest.file`
825e5410a46Smrg   fi
826e5410a46Smrg   rm -f conftest.file
827e5410a46Smrg   if test "$[*]" != "X $srcdir/configure conftest.file" \
828e5410a46Smrg      && test "$[*]" != "X conftest.file $srcdir/configure"; then
8291f0ac6a5Smrg
830e5410a46Smrg      # If neither matched, then we have a broken ls.  This can happen
831e5410a46Smrg      # if, for instance, CONFIG_SHELL is bash and it inherits a
832e5410a46Smrg      # broken ls alias from the environment.  This has actually
833e5410a46Smrg      # happened.  Such a system could not be considered "sane".
834e5410a46Smrg      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
835e5410a46Smrgalias in your environment])
836e5410a46Smrg   fi
8371f0ac6a5Smrg
838e5410a46Smrg   test "$[2]" = conftest.file
839e5410a46Smrg   )
840e5410a46Smrgthen
841e5410a46Smrg   # Ok.
842e5410a46Smrg   :
843e5410a46Smrgelse
844e5410a46Smrg   AC_MSG_ERROR([newly created file is older than distributed files!
845e5410a46SmrgCheck your system clock])
8461f0ac6a5Smrgfi
847e5410a46SmrgAC_MSG_RESULT(yes)])
8481f0ac6a5Smrg
849e5410a46Smrg# Copyright (C) 2009  Free Software Foundation, Inc.
850e5410a46Smrg#
851e5410a46Smrg# This file is free software; the Free Software Foundation
852e5410a46Smrg# gives unlimited permission to copy and/or distribute it,
853e5410a46Smrg# with or without modifications, as long as this notice is preserved.
8541f0ac6a5Smrg
855e5410a46Smrg# serial 1
8561f0ac6a5Smrg
857e5410a46Smrg# AM_SILENT_RULES([DEFAULT])
858e5410a46Smrg# --------------------------
859e5410a46Smrg# Enable less verbose build rules; with the default set to DEFAULT
860e5410a46Smrg# (`yes' being less verbose, `no' or empty being verbose).
861e5410a46SmrgAC_DEFUN([AM_SILENT_RULES],
862e5410a46Smrg[AC_ARG_ENABLE([silent-rules],
863e5410a46Smrg[  --enable-silent-rules          less verbose build output (undo: `make V=1')
864e5410a46Smrg  --disable-silent-rules         verbose build output (undo: `make V=0')])
865e5410a46Smrgcase $enable_silent_rules in
866e5410a46Smrgyes) AM_DEFAULT_VERBOSITY=0;;
867e5410a46Smrgno)  AM_DEFAULT_VERBOSITY=1;;
868e5410a46Smrg*)   AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
869e5410a46Smrgesac
870e5410a46SmrgAC_SUBST([AM_DEFAULT_VERBOSITY])dnl
871e5410a46SmrgAM_BACKSLASH='\'
872e5410a46SmrgAC_SUBST([AM_BACKSLASH])dnl
873e5410a46Smrg_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
8741f0ac6a5Smrg])
8751f0ac6a5Smrg
876e5410a46Smrg# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
877e5410a46Smrg#
878e5410a46Smrg# This file is free software; the Free Software Foundation
879e5410a46Smrg# gives unlimited permission to copy and/or distribute it,
880e5410a46Smrg# with or without modifications, as long as this notice is preserved.
881e5410a46Smrg
882e5410a46Smrg# AM_PROG_INSTALL_STRIP
883e5410a46Smrg# ---------------------
884e5410a46Smrg# One issue with vendor `install' (even GNU) is that you can't
885e5410a46Smrg# specify the program used to strip binaries.  This is especially
886e5410a46Smrg# annoying in cross-compiling environments, where the build's strip
887e5410a46Smrg# is unlikely to handle the host's binaries.
888e5410a46Smrg# Fortunately install-sh will honor a STRIPPROG variable, so we
889e5410a46Smrg# always use install-sh in `make install-strip', and initialize
890e5410a46Smrg# STRIPPROG with the value of the STRIP variable (set by the user).
891e5410a46SmrgAC_DEFUN([AM_PROG_INSTALL_STRIP],
892e5410a46Smrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
893e5410a46Smrg# Installed binaries are usually stripped using `strip' when the user
894e5410a46Smrg# run `make install-strip'.  However `strip' might not be the right
895e5410a46Smrg# tool to use in cross-compilation environments, therefore Automake
896e5410a46Smrg# will honor the `STRIP' environment variable to overrule this program.
897e5410a46Smrgdnl Don't test for $cross_compiling = yes, because it might be `maybe'.
898e5410a46Smrgif test "$cross_compiling" != no; then
899e5410a46Smrg  AC_CHECK_TOOL([STRIP], [strip], :)
900e5410a46Smrgfi
901e5410a46SmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
902e5410a46SmrgAC_SUBST([INSTALL_STRIP_PROGRAM])])
903e5410a46Smrg
904e5410a46Smrg# Copyright (C) 2006, 2008  Free Software Foundation, Inc.
9051f0ac6a5Smrg#
9061f0ac6a5Smrg# This file is free software; the Free Software Foundation
9071f0ac6a5Smrg# gives unlimited permission to copy and/or distribute it,
9081f0ac6a5Smrg# with or without modifications, as long as this notice is preserved.
9091f0ac6a5Smrg
910e5410a46Smrg# serial 2
9111f0ac6a5Smrg
912e5410a46Smrg# _AM_SUBST_NOTMAKE(VARIABLE)
913e5410a46Smrg# ---------------------------
914e5410a46Smrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
915e5410a46Smrg# This macro is traced by Automake.
916e5410a46SmrgAC_DEFUN([_AM_SUBST_NOTMAKE])
9171f0ac6a5Smrg
918e5410a46Smrg# AM_SUBST_NOTMAKE(VARIABLE)
919e5410a46Smrg# ---------------------------
920e5410a46Smrg# Public sister of _AM_SUBST_NOTMAKE.
921e5410a46SmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
9221f0ac6a5Smrg
923e5410a46Smrg# Check how to create a tarball.                            -*- Autoconf -*-
9241f0ac6a5Smrg
925e5410a46Smrg# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
9261f0ac6a5Smrg#
9271f0ac6a5Smrg# This file is free software; the Free Software Foundation
9281f0ac6a5Smrg# gives unlimited permission to copy and/or distribute it,
9291f0ac6a5Smrg# with or without modifications, as long as this notice is preserved.
9301f0ac6a5Smrg
931e5410a46Smrg# serial 2
932e5410a46Smrg
933e5410a46Smrg# _AM_PROG_TAR(FORMAT)
934e5410a46Smrg# --------------------
935e5410a46Smrg# Check how to create a tarball in format FORMAT.
936e5410a46Smrg# FORMAT should be one of `v7', `ustar', or `pax'.
9371f0ac6a5Smrg#
938e5410a46Smrg# Substitute a variable $(am__tar) that is a command
939e5410a46Smrg# writing to stdout a FORMAT-tarball containing the directory
940e5410a46Smrg# $tardir.
941e5410a46Smrg#     tardir=directory && $(am__tar) > result.tar
9421f0ac6a5Smrg#
943e5410a46Smrg# Substitute a variable $(am__untar) that extract such
944e5410a46Smrg# a tarball read from stdin.
945e5410a46Smrg#     $(am__untar) < result.tar
946e5410a46SmrgAC_DEFUN([_AM_PROG_TAR],
947e5410a46Smrg[# Always define AMTAR for backward compatibility.
948e5410a46SmrgAM_MISSING_PROG([AMTAR], [tar])
949e5410a46Smrgm4_if([$1], [v7],
950e5410a46Smrg     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
951e5410a46Smrg     [m4_case([$1], [ustar],, [pax],,
952e5410a46Smrg              [m4_fatal([Unknown tar format])])
953e5410a46SmrgAC_MSG_CHECKING([how to create a $1 tar archive])
954e5410a46Smrg# Loop over all known methods to create a tar archive until one works.
955e5410a46Smrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
956e5410a46Smrg_am_tools=${am_cv_prog_tar_$1-$_am_tools}
957e5410a46Smrg# Do not fold the above two line into one, because Tru64 sh and
958e5410a46Smrg# Solaris sh will not grok spaces in the rhs of `-'.
959e5410a46Smrgfor _am_tool in $_am_tools
960e5410a46Smrgdo
961e5410a46Smrg  case $_am_tool in
962e5410a46Smrg  gnutar)
963e5410a46Smrg    for _am_tar in tar gnutar gtar;
964e5410a46Smrg    do
965e5410a46Smrg      AM_RUN_LOG([$_am_tar --version]) && break
966e5410a46Smrg    done
967e5410a46Smrg    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
968e5410a46Smrg    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
969e5410a46Smrg    am__untar="$_am_tar -xf -"
970e5410a46Smrg    ;;
971e5410a46Smrg  plaintar)
972e5410a46Smrg    # Must skip GNU tar: if it does not support --format= it doesn't create
973e5410a46Smrg    # ustar tarball either.
974e5410a46Smrg    (tar --version) >/dev/null 2>&1 && continue
975e5410a46Smrg    am__tar='tar chf - "$$tardir"'
976e5410a46Smrg    am__tar_='tar chf - "$tardir"'
977e5410a46Smrg    am__untar='tar xf -'
978e5410a46Smrg    ;;
979e5410a46Smrg  pax)
980e5410a46Smrg    am__tar='pax -L -x $1 -w "$$tardir"'
981e5410a46Smrg    am__tar_='pax -L -x $1 -w "$tardir"'
982e5410a46Smrg    am__untar='pax -r'
983e5410a46Smrg    ;;
984e5410a46Smrg  cpio)
985e5410a46Smrg    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
986e5410a46Smrg    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
987e5410a46Smrg    am__untar='cpio -i -H $1 -d'
988e5410a46Smrg    ;;
989e5410a46Smrg  none)
990e5410a46Smrg    am__tar=false
991e5410a46Smrg    am__tar_=false
992e5410a46Smrg    am__untar=false
993e5410a46Smrg    ;;
994e5410a46Smrg  esac
995e5410a46Smrg
996e5410a46Smrg  # If the value was cached, stop now.  We just wanted to have am__tar
997e5410a46Smrg  # and am__untar set.
998e5410a46Smrg  test -n "${am_cv_prog_tar_$1}" && break
999e5410a46Smrg
1000e5410a46Smrg  # tar/untar a dummy directory, and stop if the command works
1001e5410a46Smrg  rm -rf conftest.dir
1002e5410a46Smrg  mkdir conftest.dir
1003e5410a46Smrg  echo GrepMe > conftest.dir/file
1004e5410a46Smrg  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
1005e5410a46Smrg  rm -rf conftest.dir
1006e5410a46Smrg  if test -s conftest.tar; then
1007e5410a46Smrg    AM_RUN_LOG([$am__untar <conftest.tar])
1008e5410a46Smrg    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
1009e5410a46Smrg  fi
1010e5410a46Smrgdone
1011e5410a46Smrgrm -rf conftest.dir
1012e5410a46Smrg
1013e5410a46SmrgAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
1014e5410a46SmrgAC_MSG_RESULT([$am_cv_prog_tar_$1])])
1015e5410a46SmrgAC_SUBST([am__tar])
1016e5410a46SmrgAC_SUBST([am__untar])
1017e5410a46Smrg]) # _AM_PROG_TAR
1018e5410a46Smrg
10196fae4e5dSmrg# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
10206fae4e5dSmrg# 
10216fae4e5dSmrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
10221f0ac6a5Smrg#
10236fae4e5dSmrg# This program is free software; you can redistribute it and/or modify
10246fae4e5dSmrg# it under the terms of the GNU General Public License as published by
10256fae4e5dSmrg# the Free Software Foundation; either version 2 of the License, or
10266fae4e5dSmrg# (at your option) any later version.
10271f0ac6a5Smrg#
10286fae4e5dSmrg# This program is distributed in the hope that it will be useful, but
10296fae4e5dSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of
10306fae4e5dSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
10316fae4e5dSmrg# General Public License for more details.
1032e5410a46Smrg#
10336fae4e5dSmrg# You should have received a copy of the GNU General Public License
10346fae4e5dSmrg# along with this program; if not, write to the Free Software
10356fae4e5dSmrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
1036e5410a46Smrg#
10376fae4e5dSmrg# As a special exception to the GNU General Public License, if you
10386fae4e5dSmrg# distribute this file as part of a program that contains a
10396fae4e5dSmrg# configuration script generated by Autoconf, you may include it under
10406fae4e5dSmrg# the same distribution terms that you use for the rest of that program.
10411f0ac6a5Smrg
10426fae4e5dSmrg# PKG_PROG_PKG_CONFIG([MIN-VERSION])
10436fae4e5dSmrg# ----------------------------------
10446fae4e5dSmrgAC_DEFUN([PKG_PROG_PKG_CONFIG],
10456fae4e5dSmrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
10466fae4e5dSmrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$])
10476fae4e5dSmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
10486fae4e5dSmrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10496fae4e5dSmrg	AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
1050e5410a46Smrgfi
10516fae4e5dSmrgif test -n "$PKG_CONFIG"; then
10526fae4e5dSmrg	_pkg_min_version=m4_default([$1], [0.9.0])
10536fae4e5dSmrg	AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
10546fae4e5dSmrg	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
1055e5410a46Smrg		AC_MSG_RESULT([yes])
1056e5410a46Smrg	else
10576fae4e5dSmrg		AC_MSG_RESULT([no])
10586fae4e5dSmrg		PKG_CONFIG=""
1059e5410a46Smrg	fi
10606fae4e5dSmrg		
10616fae4e5dSmrgfi[]dnl
10626fae4e5dSmrg])# PKG_PROG_PKG_CONFIG
10631f0ac6a5Smrg
10646fae4e5dSmrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
10651f0ac6a5Smrg#
10666fae4e5dSmrg# Check to see whether a particular set of modules exists.  Similar
10676fae4e5dSmrg# to PKG_CHECK_MODULES(), but does not set variables or print errors.
10686fae4e5dSmrg#
10696fae4e5dSmrg#
10706fae4e5dSmrg# Similar to PKG_CHECK_MODULES, make sure that the first instance of
10716fae4e5dSmrg# this or PKG_CHECK_MODULES is called, or make sure to call
10726fae4e5dSmrg# PKG_CHECK_EXISTS manually
10736fae4e5dSmrg# --------------------------------------------------------------
10746fae4e5dSmrgAC_DEFUN([PKG_CHECK_EXISTS],
10756fae4e5dSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
10766fae4e5dSmrgif test -n "$PKG_CONFIG" && \
10776fae4e5dSmrg    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
10786fae4e5dSmrg  m4_ifval([$2], [$2], [:])
10796fae4e5dSmrgm4_ifvaln([$3], [else
10806fae4e5dSmrg  $3])dnl
10816fae4e5dSmrgfi])
10821f0ac6a5Smrg
10831f0ac6a5Smrg
10846fae4e5dSmrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
10856fae4e5dSmrg# ---------------------------------------------
10866fae4e5dSmrgm4_define([_PKG_CONFIG],
10876fae4e5dSmrg[if test -n "$$1"; then
10886fae4e5dSmrg    pkg_cv_[]$1="$$1"
10896fae4e5dSmrg elif test -n "$PKG_CONFIG"; then
10906fae4e5dSmrg    PKG_CHECK_EXISTS([$3],
10916fae4e5dSmrg                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
10926fae4e5dSmrg		     [pkg_failed=yes])
10936fae4e5dSmrg else
10946fae4e5dSmrg    pkg_failed=untried
10956fae4e5dSmrgfi[]dnl
10966fae4e5dSmrg])# _PKG_CONFIG
10971f0ac6a5Smrg
10986fae4e5dSmrg# _PKG_SHORT_ERRORS_SUPPORTED
10996fae4e5dSmrg# -----------------------------
11006fae4e5dSmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
11016fae4e5dSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
11026fae4e5dSmrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
11036fae4e5dSmrg        _pkg_short_errors_supported=yes
11046fae4e5dSmrgelse
11056fae4e5dSmrg        _pkg_short_errors_supported=no
11066fae4e5dSmrgfi[]dnl
11076fae4e5dSmrg])# _PKG_SHORT_ERRORS_SUPPORTED
11081f0ac6a5Smrg
11091f0ac6a5Smrg
11106fae4e5dSmrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
11116fae4e5dSmrg# [ACTION-IF-NOT-FOUND])
11126fae4e5dSmrg#
11136fae4e5dSmrg#
11146fae4e5dSmrg# Note that if there is a possibility the first call to
11156fae4e5dSmrg# PKG_CHECK_MODULES might not happen, you should be sure to include an
11166fae4e5dSmrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
11176fae4e5dSmrg#
11186fae4e5dSmrg#
11196fae4e5dSmrg# --------------------------------------------------------------
11206fae4e5dSmrgAC_DEFUN([PKG_CHECK_MODULES],
11216fae4e5dSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
11226fae4e5dSmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
11236fae4e5dSmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
11241f0ac6a5Smrg
11256fae4e5dSmrgpkg_failed=no
11266fae4e5dSmrgAC_MSG_CHECKING([for $1])
11271f0ac6a5Smrg
11286fae4e5dSmrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
11296fae4e5dSmrg_PKG_CONFIG([$1][_LIBS], [libs], [$2])
11301f0ac6a5Smrg
11316fae4e5dSmrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
11326fae4e5dSmrgand $1[]_LIBS to avoid the need to call pkg-config.
11336fae4e5dSmrgSee the pkg-config man page for more details.])
11341f0ac6a5Smrg
11356fae4e5dSmrgif test $pkg_failed = yes; then
11366fae4e5dSmrg        _PKG_SHORT_ERRORS_SUPPORTED
11376fae4e5dSmrg        if test $_pkg_short_errors_supported = yes; then
11386fae4e5dSmrg	        $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
11396fae4e5dSmrg        else 
11406fae4e5dSmrg	        $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
11416fae4e5dSmrg        fi
11426fae4e5dSmrg	# Put the nasty error message in config.log where it belongs
11436fae4e5dSmrg	echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
11449c9ff80cSmrg
11456fae4e5dSmrg	ifelse([$4], , [AC_MSG_ERROR(dnl
11466fae4e5dSmrg[Package requirements ($2) were not met:
11479c9ff80cSmrg
11486fae4e5dSmrg$$1_PKG_ERRORS
11491f0ac6a5Smrg
11506fae4e5dSmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you
11516fae4e5dSmrginstalled software in a non-standard prefix.
11529c9ff80cSmrg
11536fae4e5dSmrg_PKG_TEXT
11546fae4e5dSmrg])],
11556fae4e5dSmrg		[AC_MSG_RESULT([no])
11566fae4e5dSmrg                $4])
11576fae4e5dSmrgelif test $pkg_failed = untried; then
11586fae4e5dSmrg	ifelse([$4], , [AC_MSG_FAILURE(dnl
11596fae4e5dSmrg[The pkg-config script could not be found or is too old.  Make sure it
11606fae4e5dSmrgis in your PATH or set the PKG_CONFIG environment variable to the full
11616fae4e5dSmrgpath to pkg-config.
11626fae4e5dSmrg
11636fae4e5dSmrg_PKG_TEXT
11646fae4e5dSmrg
11656fae4e5dSmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
11666fae4e5dSmrg		[$4])
11679c9ff80cSmrgelse
11686fae4e5dSmrg	$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
11696fae4e5dSmrg	$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
11706fae4e5dSmrg        AC_MSG_RESULT([yes])
11716fae4e5dSmrg	ifelse([$3], , :, [$3])
11726fae4e5dSmrgfi[]dnl
11736fae4e5dSmrg])# PKG_CHECK_MODULES
11749c9ff80cSmrg
11756fae4e5dSmrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
11766fae4e5dSmrg#
11776fae4e5dSmrg#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
11786fae4e5dSmrg#                 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
11796fae4e5dSmrg#                 Inc.
11806fae4e5dSmrg#   Written by Gordon Matzigkeit, 1996
11816fae4e5dSmrg#
11826fae4e5dSmrg# This file is free software; the Free Software Foundation gives
11836fae4e5dSmrg# unlimited permission to copy and/or distribute it, with or without
11846fae4e5dSmrg# modifications, as long as this notice is preserved.
11859c9ff80cSmrg
11866fae4e5dSmrgm4_define([_LT_COPYING], [dnl
11876fae4e5dSmrg#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
11886fae4e5dSmrg#                 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
11896fae4e5dSmrg#                 Inc.
11906fae4e5dSmrg#   Written by Gordon Matzigkeit, 1996
1191e5410a46Smrg#
11926fae4e5dSmrg#   This file is part of GNU Libtool.
11936fae4e5dSmrg#
11946fae4e5dSmrg# GNU Libtool is free software; you can redistribute it and/or
11956fae4e5dSmrg# modify it under the terms of the GNU General Public License as
11966fae4e5dSmrg# published by the Free Software Foundation; either version 2 of
11976fae4e5dSmrg# the License, or (at your option) any later version.
11986fae4e5dSmrg#
11996fae4e5dSmrg# As a special exception to the GNU General Public License,
12006fae4e5dSmrg# if you distribute this file as part of a program or library that
12016fae4e5dSmrg# is built using GNU Libtool, you may include this file under the
12026fae4e5dSmrg# same distribution terms that you use for the rest of that program.
12036fae4e5dSmrg#
12046fae4e5dSmrg# GNU Libtool is distributed in the hope that it will be useful,
12056fae4e5dSmrg# but WITHOUT ANY WARRANTY; without even the implied warranty of
12066fae4e5dSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12076fae4e5dSmrg# GNU General Public License for more details.
12086fae4e5dSmrg#
12096fae4e5dSmrg# You should have received a copy of the GNU General Public License
12106fae4e5dSmrg# along with GNU Libtool; see the file COPYING.  If not, a copy
12116fae4e5dSmrg# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
12126fae4e5dSmrg# obtained by writing to the Free Software Foundation, Inc.,
12136fae4e5dSmrg# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
12146fae4e5dSmrg])
12151f0ac6a5Smrg
12166fae4e5dSmrg# serial 57 LT_INIT
12171f0ac6a5Smrg
12181f0ac6a5Smrg
12196fae4e5dSmrg# LT_PREREQ(VERSION)
12206fae4e5dSmrg# ------------------
12216fae4e5dSmrg# Complain and exit if this libtool version is less that VERSION.
12226fae4e5dSmrgm4_defun([LT_PREREQ],
12236fae4e5dSmrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
12246fae4e5dSmrg       [m4_default([$3],
12256fae4e5dSmrg		   [m4_fatal([Libtool version $1 or higher is required],
12266fae4e5dSmrg		             63)])],
12276fae4e5dSmrg       [$2])])
12281f0ac6a5Smrg
1229e5410a46Smrg
12306fae4e5dSmrg# _LT_CHECK_BUILDDIR
12316fae4e5dSmrg# ------------------
12326fae4e5dSmrg# Complain if the absolute build directory name contains unusual characters
12336fae4e5dSmrgm4_defun([_LT_CHECK_BUILDDIR],
12346fae4e5dSmrg[case `pwd` in
12356fae4e5dSmrg  *\ * | *\	*)
12366fae4e5dSmrg    AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
12376fae4e5dSmrgesac
12386fae4e5dSmrg])
1239e5410a46Smrg
12401f0ac6a5Smrg
12416fae4e5dSmrg# LT_INIT([OPTIONS])
12426fae4e5dSmrg# ------------------
12436fae4e5dSmrgAC_DEFUN([LT_INIT],
12446fae4e5dSmrg[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
12456fae4e5dSmrgAC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
12466fae4e5dSmrgAC_BEFORE([$0], [LT_LANG])dnl
12476fae4e5dSmrgAC_BEFORE([$0], [LT_OUTPUT])dnl
12486fae4e5dSmrgAC_BEFORE([$0], [LTDL_INIT])dnl
12496fae4e5dSmrgm4_require([_LT_CHECK_BUILDDIR])dnl
12501f0ac6a5Smrg
12516fae4e5dSmrgdnl Autoconf doesn't catch unexpanded LT_ macros by default:
12526fae4e5dSmrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
12536fae4e5dSmrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
12546fae4e5dSmrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
12556fae4e5dSmrgdnl unless we require an AC_DEFUNed macro:
12566fae4e5dSmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl
12576fae4e5dSmrgAC_REQUIRE([LTSUGAR_VERSION])dnl
12586fae4e5dSmrgAC_REQUIRE([LTVERSION_VERSION])dnl
12596fae4e5dSmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl
12606fae4e5dSmrgm4_require([_LT_PROG_LTMAIN])dnl
12611f0ac6a5Smrg
12626fae4e5dSmrg_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
12631f0ac6a5Smrg
12646fae4e5dSmrgdnl Parse OPTIONS
12656fae4e5dSmrg_LT_SET_OPTIONS([$0], [$1])
12661f0ac6a5Smrg
12676fae4e5dSmrg# This can be used to rebuild libtool when needed
12686fae4e5dSmrgLIBTOOL_DEPS="$ltmain"
12691f0ac6a5Smrg
12706fae4e5dSmrg# Always use our own libtool.
12716fae4e5dSmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool'
12726fae4e5dSmrgAC_SUBST(LIBTOOL)dnl
12739c9ff80cSmrg
12746fae4e5dSmrg_LT_SETUP
12751f0ac6a5Smrg
12766fae4e5dSmrg# Only expand once:
12776fae4e5dSmrgm4_define([LT_INIT])
12786fae4e5dSmrg])# LT_INIT
12791f0ac6a5Smrg
12806fae4e5dSmrg# Old names:
12816fae4e5dSmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
12826fae4e5dSmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
12836fae4e5dSmrgdnl aclocal-1.4 backwards compatibility:
12846fae4e5dSmrgdnl AC_DEFUN([AC_PROG_LIBTOOL], [])
12856fae4e5dSmrgdnl AC_DEFUN([AM_PROG_LIBTOOL], [])
12861f0ac6a5Smrg
12871f0ac6a5Smrg
12886fae4e5dSmrg# _LT_CC_BASENAME(CC)
12896fae4e5dSmrg# -------------------
12906fae4e5dSmrg# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
12916fae4e5dSmrgm4_defun([_LT_CC_BASENAME],
12926fae4e5dSmrg[for cc_temp in $1""; do
12936fae4e5dSmrg  case $cc_temp in
12946fae4e5dSmrg    compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
12956fae4e5dSmrg    distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
12966fae4e5dSmrg    \-*) ;;
12976fae4e5dSmrg    *) break;;
12986fae4e5dSmrg  esac
12996fae4e5dSmrgdone
13006fae4e5dSmrgcc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
13016fae4e5dSmrg])
13021f0ac6a5Smrg
13031f0ac6a5Smrg
13046fae4e5dSmrg# _LT_FILEUTILS_DEFAULTS
13056fae4e5dSmrg# ----------------------
13066fae4e5dSmrg# It is okay to use these file commands and assume they have been set
13076fae4e5dSmrg# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
13086fae4e5dSmrgm4_defun([_LT_FILEUTILS_DEFAULTS],
13096fae4e5dSmrg[: ${CP="cp -f"}
13106fae4e5dSmrg: ${MV="mv -f"}
13116fae4e5dSmrg: ${RM="rm -f"}
13126fae4e5dSmrg])# _LT_FILEUTILS_DEFAULTS
1313e5410a46Smrg
1314e5410a46Smrg
13156fae4e5dSmrg# _LT_SETUP
13166fae4e5dSmrg# ---------
13176fae4e5dSmrgm4_defun([_LT_SETUP],
13186fae4e5dSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
13196fae4e5dSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl
13206fae4e5dSmrgAC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
13216fae4e5dSmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
13229c9ff80cSmrg
13236fae4e5dSmrg_LT_DECL([], [host_alias], [0], [The host system])dnl
13246fae4e5dSmrg_LT_DECL([], [host], [0])dnl
13256fae4e5dSmrg_LT_DECL([], [host_os], [0])dnl
13266fae4e5dSmrgdnl
13276fae4e5dSmrg_LT_DECL([], [build_alias], [0], [The build system])dnl
13286fae4e5dSmrg_LT_DECL([], [build], [0])dnl
13296fae4e5dSmrg_LT_DECL([], [build_os], [0])dnl
13306fae4e5dSmrgdnl
13316fae4e5dSmrgAC_REQUIRE([AC_PROG_CC])dnl
13326fae4e5dSmrgAC_REQUIRE([LT_PATH_LD])dnl
13336fae4e5dSmrgAC_REQUIRE([LT_PATH_NM])dnl
13346fae4e5dSmrgdnl
13356fae4e5dSmrgAC_REQUIRE([AC_PROG_LN_S])dnl
13366fae4e5dSmrgtest -z "$LN_S" && LN_S="ln -s"
13376fae4e5dSmrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
13386fae4e5dSmrgdnl
13396fae4e5dSmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl
13406fae4e5dSmrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
13416fae4e5dSmrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
13426fae4e5dSmrgdnl
13436fae4e5dSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
13446fae4e5dSmrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl
13456fae4e5dSmrgm4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
13466fae4e5dSmrgm4_require([_LT_CMD_RELOAD])dnl
13476fae4e5dSmrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl
13486fae4e5dSmrgm4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
13496fae4e5dSmrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl
13506fae4e5dSmrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
13516fae4e5dSmrgm4_require([_LT_WITH_SYSROOT])dnl
13526fae4e5dSmrg
13536fae4e5dSmrg_LT_CONFIG_LIBTOOL_INIT([
13546fae4e5dSmrg# See if we are running on zsh, and set the options which allow our
13556fae4e5dSmrg# commands through without removal of \ escapes INIT.
13566fae4e5dSmrgif test -n "\${ZSH_VERSION+set}" ; then
13576fae4e5dSmrg   setopt NO_GLOB_SUBST
13586fae4e5dSmrgfi
13596fae4e5dSmrg])
13606fae4e5dSmrgif test -n "${ZSH_VERSION+set}" ; then
13616fae4e5dSmrg   setopt NO_GLOB_SUBST
13629c9ff80cSmrgfi
13639c9ff80cSmrg
13646fae4e5dSmrg_LT_CHECK_OBJDIR
13659c9ff80cSmrg
13666fae4e5dSmrgm4_require([_LT_TAG_COMPILER])dnl
13679c9ff80cSmrg
13686fae4e5dSmrgcase $host_os in
13696fae4e5dSmrgaix3*)
13706fae4e5dSmrg  # AIX sometimes has problems with the GCC collect2 program.  For some
13716fae4e5dSmrg  # reason, if we set the COLLECT_NAMES environment variable, the problems
13726fae4e5dSmrg  # vanish in a puff of smoke.
13736fae4e5dSmrg  if test "X${COLLECT_NAMES+set}" != Xset; then
13746fae4e5dSmrg    COLLECT_NAMES=
13756fae4e5dSmrg    export COLLECT_NAMES
13766fae4e5dSmrg  fi
13776fae4e5dSmrg  ;;
13786fae4e5dSmrgesac
13799c9ff80cSmrg
13806fae4e5dSmrg# Global variables:
13816fae4e5dSmrgofile=libtool
13826fae4e5dSmrgcan_build_shared=yes
13839c9ff80cSmrg
13846fae4e5dSmrg# All known linkers require a `.a' archive for static linking (except MSVC,
13856fae4e5dSmrg# which needs '.lib').
13866fae4e5dSmrglibext=a
13879c9ff80cSmrg
13886fae4e5dSmrgwith_gnu_ld="$lt_cv_prog_gnu_ld"
13899c9ff80cSmrg
13906fae4e5dSmrgold_CC="$CC"
13916fae4e5dSmrgold_CFLAGS="$CFLAGS"
13929c9ff80cSmrg
13936fae4e5dSmrg# Set sane defaults for various variables
13946fae4e5dSmrgtest -z "$CC" && CC=cc
13956fae4e5dSmrgtest -z "$LTCC" && LTCC=$CC
13966fae4e5dSmrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
13976fae4e5dSmrgtest -z "$LD" && LD=ld
13986fae4e5dSmrgtest -z "$ac_objext" && ac_objext=o
13999c9ff80cSmrg
14006fae4e5dSmrg_LT_CC_BASENAME([$compiler])
14019c9ff80cSmrg
14026fae4e5dSmrg# Only perform the check for file, if the check method requires it
14036fae4e5dSmrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file
14046fae4e5dSmrgcase $deplibs_check_method in
14056fae4e5dSmrgfile_magic*)
14066fae4e5dSmrg  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
14076fae4e5dSmrg    _LT_PATH_MAGIC
14086fae4e5dSmrg  fi
14096fae4e5dSmrg  ;;
14106fae4e5dSmrgesac
14119c9ff80cSmrg
14126fae4e5dSmrg# Use C for the default configuration in the libtool script
14136fae4e5dSmrgLT_SUPPORTED_TAG([CC])
14146fae4e5dSmrg_LT_LANG_C_CONFIG
14156fae4e5dSmrg_LT_LANG_DEFAULT_CONFIG
14166fae4e5dSmrg_LT_CONFIG_COMMANDS
14176fae4e5dSmrg])# _LT_SETUP
14189c9ff80cSmrg
14199c9ff80cSmrg
14206fae4e5dSmrg# _LT_PREPARE_SED_QUOTE_VARS
14216fae4e5dSmrg# --------------------------
14226fae4e5dSmrg# Define a few sed substitution that help us do robust quoting.
14236fae4e5dSmrgm4_defun([_LT_PREPARE_SED_QUOTE_VARS],
14246fae4e5dSmrg[# Backslashify metacharacters that are still active within
14256fae4e5dSmrg# double-quoted strings.
14266fae4e5dSmrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
14279c9ff80cSmrg
14286fae4e5dSmrg# Same as above, but do not quote variable references.
14296fae4e5dSmrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g'
1430e5410a46Smrg
14316fae4e5dSmrg# Sed substitution to delay expansion of an escaped shell variable in a
14326fae4e5dSmrg# double_quote_subst'ed string.
14336fae4e5dSmrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
14341f0ac6a5Smrg
14356fae4e5dSmrg# Sed substitution to delay expansion of an escaped single quote.
14366fae4e5dSmrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
14371f0ac6a5Smrg
14386fae4e5dSmrg# Sed substitution to avoid accidental globbing in evaled expressions
14396fae4e5dSmrgno_glob_subst='s/\*/\\\*/g'
14406fae4e5dSmrg])
14411f0ac6a5Smrg
14426fae4e5dSmrg# _LT_PROG_LTMAIN
14436fae4e5dSmrg# ---------------
14446fae4e5dSmrg# Note that this code is called both from `configure', and `config.status'
14456fae4e5dSmrg# now that we use AC_CONFIG_COMMANDS to generate libtool.  Notably,
14466fae4e5dSmrg# `config.status' has no value for ac_aux_dir unless we are using Automake,
14476fae4e5dSmrg# so we pass a copy along to make sure it has a sensible value anyway.
14486fae4e5dSmrgm4_defun([_LT_PROG_LTMAIN],
14496fae4e5dSmrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
14506fae4e5dSmrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
14516fae4e5dSmrgltmain="$ac_aux_dir/ltmain.sh"
14526fae4e5dSmrg])# _LT_PROG_LTMAIN
14531f0ac6a5Smrg
14549c9ff80cSmrg
14559c9ff80cSmrg
14566fae4e5dSmrg# So that we can recreate a full libtool script including additional
14576fae4e5dSmrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
14586fae4e5dSmrg# in macros and then make a single call at the end using the `libtool'
14596fae4e5dSmrg# label.
14609c9ff80cSmrg
14611f0ac6a5Smrg
14626fae4e5dSmrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
14636fae4e5dSmrg# ----------------------------------------
14646fae4e5dSmrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
14656fae4e5dSmrgm4_define([_LT_CONFIG_LIBTOOL_INIT],
14666fae4e5dSmrg[m4_ifval([$1],
14676fae4e5dSmrg          [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
14686fae4e5dSmrg                     [$1
14696fae4e5dSmrg])])])
14701f0ac6a5Smrg
14716fae4e5dSmrg# Initialize.
14726fae4e5dSmrgm4_define([_LT_OUTPUT_LIBTOOL_INIT])
14731f0ac6a5Smrg
14741f0ac6a5Smrg
14756fae4e5dSmrg# _LT_CONFIG_LIBTOOL([COMMANDS])
14766fae4e5dSmrg# ------------------------------
14776fae4e5dSmrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
14786fae4e5dSmrgm4_define([_LT_CONFIG_LIBTOOL],
14796fae4e5dSmrg[m4_ifval([$1],
14806fae4e5dSmrg          [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
14816fae4e5dSmrg                     [$1
14826fae4e5dSmrg])])])
14839c9ff80cSmrg
14846fae4e5dSmrg# Initialize.
14856fae4e5dSmrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
14869c9ff80cSmrg
1487e5410a46Smrg
14886fae4e5dSmrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
14896fae4e5dSmrg# -----------------------------------------------------
14906fae4e5dSmrgm4_defun([_LT_CONFIG_SAVE_COMMANDS],
14916fae4e5dSmrg[_LT_CONFIG_LIBTOOL([$1])
14926fae4e5dSmrg_LT_CONFIG_LIBTOOL_INIT([$2])
14936fae4e5dSmrg])
1494e5410a46Smrg
14951f0ac6a5Smrg
14966fae4e5dSmrg# _LT_FORMAT_COMMENT([COMMENT])
14976fae4e5dSmrg# -----------------------------
14986fae4e5dSmrg# Add leading comment marks to the start of each line, and a trailing
14996fae4e5dSmrg# full-stop to the whole comment if one is not present already.
15006fae4e5dSmrgm4_define([_LT_FORMAT_COMMENT],
15016fae4e5dSmrg[m4_ifval([$1], [
15026fae4e5dSmrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
15036fae4e5dSmrg              [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
15046fae4e5dSmrg)])
1505e5410a46Smrg
15061f0ac6a5Smrg
15071f0ac6a5Smrg
15081f0ac6a5Smrg
15091f0ac6a5Smrg
15106fae4e5dSmrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
15116fae4e5dSmrg# -------------------------------------------------------------------
15126fae4e5dSmrg# CONFIGNAME is the name given to the value in the libtool script.
15136fae4e5dSmrg# VARNAME is the (base) name used in the configure script.
15146fae4e5dSmrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
15156fae4e5dSmrg# VARNAME.  Any other value will be used directly.
15166fae4e5dSmrgm4_define([_LT_DECL],
15176fae4e5dSmrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
15186fae4e5dSmrg    [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
15196fae4e5dSmrg	[m4_ifval([$1], [$1], [$2])])
15206fae4e5dSmrg    lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
15216fae4e5dSmrg    m4_ifval([$4],
15226fae4e5dSmrg	[lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
15236fae4e5dSmrg    lt_dict_add_subkey([lt_decl_dict], [$2],
15246fae4e5dSmrg	[tagged?], [m4_ifval([$5], [yes], [no])])])
15256fae4e5dSmrg])
15261f0ac6a5Smrg
15271f0ac6a5Smrg
15286fae4e5dSmrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
15296fae4e5dSmrg# --------------------------------------------------------
15306fae4e5dSmrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
15311f0ac6a5Smrg
15321f0ac6a5Smrg
15336fae4e5dSmrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
15346fae4e5dSmrg# ------------------------------------------------
15356fae4e5dSmrgm4_define([lt_decl_tag_varnames],
15366fae4e5dSmrg[_lt_decl_filter([tagged?], [yes], $@)])
15371f0ac6a5Smrg
15381f0ac6a5Smrg
15396fae4e5dSmrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
15406fae4e5dSmrg# ---------------------------------------------------------
15416fae4e5dSmrgm4_define([_lt_decl_filter],
15426fae4e5dSmrg[m4_case([$#],
15436fae4e5dSmrg  [0], [m4_fatal([$0: too few arguments: $#])],
15446fae4e5dSmrg  [1], [m4_fatal([$0: too few arguments: $#: $1])],
15456fae4e5dSmrg  [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
15466fae4e5dSmrg  [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
15476fae4e5dSmrg  [lt_dict_filter([lt_decl_dict], $@)])[]dnl
15486fae4e5dSmrg])
15491f0ac6a5Smrg
15501f0ac6a5Smrg
15516fae4e5dSmrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
15526fae4e5dSmrg# --------------------------------------------------
15536fae4e5dSmrgm4_define([lt_decl_quote_varnames],
15546fae4e5dSmrg[_lt_decl_filter([value], [1], $@)])
15551f0ac6a5Smrg
15569c9ff80cSmrg
15576fae4e5dSmrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
15586fae4e5dSmrg# ---------------------------------------------------
15596fae4e5dSmrgm4_define([lt_decl_dquote_varnames],
15606fae4e5dSmrg[_lt_decl_filter([value], [2], $@)])
15619c9ff80cSmrg
15629c9ff80cSmrg
15636fae4e5dSmrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
15646fae4e5dSmrg# ---------------------------------------------------
15656fae4e5dSmrgm4_define([lt_decl_varnames_tagged],
15666fae4e5dSmrg[m4_assert([$# <= 2])dnl
15676fae4e5dSmrg_$0(m4_quote(m4_default([$1], [[, ]])),
15686fae4e5dSmrg    m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
15696fae4e5dSmrg    m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
15706fae4e5dSmrgm4_define([_lt_decl_varnames_tagged],
15716fae4e5dSmrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
15729c9ff80cSmrg
15739c9ff80cSmrg
15746fae4e5dSmrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
15756fae4e5dSmrg# ------------------------------------------------
15766fae4e5dSmrgm4_define([lt_decl_all_varnames],
15776fae4e5dSmrg[_$0(m4_quote(m4_default([$1], [[, ]])),
15786fae4e5dSmrg     m4_if([$2], [],
15796fae4e5dSmrg	   m4_quote(lt_decl_varnames),
15806fae4e5dSmrg	m4_quote(m4_shift($@))))[]dnl
15816fae4e5dSmrg])
15826fae4e5dSmrgm4_define([_lt_decl_all_varnames],
15836fae4e5dSmrg[lt_join($@, lt_decl_varnames_tagged([$1],
15846fae4e5dSmrg			lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
15856fae4e5dSmrg])
15869c9ff80cSmrg
15879c9ff80cSmrg
15886fae4e5dSmrg# _LT_CONFIG_STATUS_DECLARE([VARNAME])
15896fae4e5dSmrg# ------------------------------------
15906fae4e5dSmrg# Quote a variable value, and forward it to `config.status' so that its
15916fae4e5dSmrg# declaration there will have the same value as in `configure'.  VARNAME
15926fae4e5dSmrg# must have a single quote delimited value for this to work.
15936fae4e5dSmrgm4_define([_LT_CONFIG_STATUS_DECLARE],
15946fae4e5dSmrg[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
15959c9ff80cSmrg
15969c9ff80cSmrg
15976fae4e5dSmrg# _LT_CONFIG_STATUS_DECLARATIONS
15986fae4e5dSmrg# ------------------------------
15996fae4e5dSmrg# We delimit libtool config variables with single quotes, so when
16006fae4e5dSmrg# we write them to config.status, we have to be sure to quote all
16016fae4e5dSmrg# embedded single quotes properly.  In configure, this macro expands
16026fae4e5dSmrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
16039c9ff80cSmrg#
16046fae4e5dSmrg#    <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
16056fae4e5dSmrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
16066fae4e5dSmrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
16076fae4e5dSmrg    [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
16086fae4e5dSmrg
16096fae4e5dSmrg
16106fae4e5dSmrg# _LT_LIBTOOL_TAGS
16116fae4e5dSmrg# ----------------
16126fae4e5dSmrg# Output comment and list of tags supported by the script
16136fae4e5dSmrgm4_defun([_LT_LIBTOOL_TAGS],
16146fae4e5dSmrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
16156fae4e5dSmrgavailable_tags="_LT_TAGS"dnl
16169c9ff80cSmrg])
16179c9ff80cSmrg
16189c9ff80cSmrg
16196fae4e5dSmrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
16206fae4e5dSmrg# -----------------------------------
16216fae4e5dSmrg# Extract the dictionary values for VARNAME (optionally with TAG) and
16226fae4e5dSmrg# expand to a commented shell variable setting:
16236fae4e5dSmrg#
16246fae4e5dSmrg#    # Some comment about what VAR is for.
16256fae4e5dSmrg#    visible_name=$lt_internal_name
16266fae4e5dSmrgm4_define([_LT_LIBTOOL_DECLARE],
16276fae4e5dSmrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
16286fae4e5dSmrg					   [description])))[]dnl
16296fae4e5dSmrgm4_pushdef([_libtool_name],
16306fae4e5dSmrg    m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
16316fae4e5dSmrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
16326fae4e5dSmrg    [0], [_libtool_name=[$]$1],
16336fae4e5dSmrg    [1], [_libtool_name=$lt_[]$1],
16346fae4e5dSmrg    [2], [_libtool_name=$lt_[]$1],
16356fae4e5dSmrg    [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
16366fae4e5dSmrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
16376fae4e5dSmrg])
16389c9ff80cSmrg
16399c9ff80cSmrg
16406fae4e5dSmrg# _LT_LIBTOOL_CONFIG_VARS
16416fae4e5dSmrg# -----------------------
16426fae4e5dSmrg# Produce commented declarations of non-tagged libtool config variables
16436fae4e5dSmrg# suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
16446fae4e5dSmrg# script.  Tagged libtool config variables (even for the LIBTOOL CONFIG
16456fae4e5dSmrg# section) are produced by _LT_LIBTOOL_TAG_VARS.
16466fae4e5dSmrgm4_defun([_LT_LIBTOOL_CONFIG_VARS],
16476fae4e5dSmrg[m4_foreach([_lt_var],
16486fae4e5dSmrg    m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
16496fae4e5dSmrg    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
16509c9ff80cSmrg
16519c9ff80cSmrg
16526fae4e5dSmrg# _LT_LIBTOOL_TAG_VARS(TAG)
16536fae4e5dSmrg# -------------------------
16546fae4e5dSmrgm4_define([_LT_LIBTOOL_TAG_VARS],
16556fae4e5dSmrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
16566fae4e5dSmrg    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
16579c9ff80cSmrg
16589c9ff80cSmrg
16596fae4e5dSmrg# _LT_TAGVAR(VARNAME, [TAGNAME])
16606fae4e5dSmrg# ------------------------------
16616fae4e5dSmrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
16629c9ff80cSmrg
16639c9ff80cSmrg
16646fae4e5dSmrg# _LT_CONFIG_COMMANDS
16656fae4e5dSmrg# -------------------
16666fae4e5dSmrg# Send accumulated output to $CONFIG_STATUS.  Thanks to the lists of
16676fae4e5dSmrg# variables for single and double quote escaping we saved from calls
16686fae4e5dSmrg# to _LT_DECL, we can put quote escaped variables declarations
16696fae4e5dSmrg# into `config.status', and then the shell code to quote escape them in
16706fae4e5dSmrg# for loops in `config.status'.  Finally, any additional code accumulated
16716fae4e5dSmrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
16726fae4e5dSmrgm4_defun([_LT_CONFIG_COMMANDS],
16736fae4e5dSmrg[AC_PROVIDE_IFELSE([LT_OUTPUT],
16746fae4e5dSmrg	dnl If the libtool generation code has been placed in $CONFIG_LT,
16756fae4e5dSmrg	dnl instead of duplicating it all over again into config.status,
16766fae4e5dSmrg	dnl then we will have config.status run $CONFIG_LT later, so it
16776fae4e5dSmrg	dnl needs to know what name is stored there:
16786fae4e5dSmrg        [AC_CONFIG_COMMANDS([libtool],
16796fae4e5dSmrg            [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
16806fae4e5dSmrg    dnl If the libtool generation code is destined for config.status,
16816fae4e5dSmrg    dnl expand the accumulated commands and init code now:
16826fae4e5dSmrg    [AC_CONFIG_COMMANDS([libtool],
16836fae4e5dSmrg        [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
16846fae4e5dSmrg])#_LT_CONFIG_COMMANDS
16859c9ff80cSmrg
16869c9ff80cSmrg
16876fae4e5dSmrg# Initialize.
16886fae4e5dSmrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
16896fae4e5dSmrg[
16909c9ff80cSmrg
16916fae4e5dSmrg# The HP-UX ksh and POSIX shell print the target directory to stdout
16926fae4e5dSmrg# if CDPATH is set.
16936fae4e5dSmrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
16949c9ff80cSmrg
16956fae4e5dSmrgsed_quote_subst='$sed_quote_subst'
16966fae4e5dSmrgdouble_quote_subst='$double_quote_subst'
16976fae4e5dSmrgdelay_variable_subst='$delay_variable_subst'
16986fae4e5dSmrg_LT_CONFIG_STATUS_DECLARATIONS
16996fae4e5dSmrgLTCC='$LTCC'
17006fae4e5dSmrgLTCFLAGS='$LTCFLAGS'
17016fae4e5dSmrgcompiler='$compiler_DEFAULT'
17029c9ff80cSmrg
17036fae4e5dSmrg# A function that is used when there is no print builtin or printf.
17046fae4e5dSmrgfunc_fallback_echo ()
17056fae4e5dSmrg{
17066fae4e5dSmrg  eval 'cat <<_LTECHO_EOF
17076fae4e5dSmrg\$[]1
17086fae4e5dSmrg_LTECHO_EOF'
17096fae4e5dSmrg}
17109c9ff80cSmrg
17116fae4e5dSmrg# Quote evaled strings.
17126fae4e5dSmrgfor var in lt_decl_all_varnames([[ \
17136fae4e5dSmrg]], lt_decl_quote_varnames); do
17146fae4e5dSmrg    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
17156fae4e5dSmrg    *[[\\\\\\\`\\"\\\$]]*)
17166fae4e5dSmrg      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
17176fae4e5dSmrg      ;;
17186fae4e5dSmrg    *)
17196fae4e5dSmrg      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
17206fae4e5dSmrg      ;;
17216fae4e5dSmrg    esac
17229c9ff80cSmrgdone
17239c9ff80cSmrg
17246fae4e5dSmrg# Double-quote double-evaled strings.
17256fae4e5dSmrgfor var in lt_decl_all_varnames([[ \
17266fae4e5dSmrg]], lt_decl_dquote_varnames); do
17276fae4e5dSmrg    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
17286fae4e5dSmrg    *[[\\\\\\\`\\"\\\$]]*)
17296fae4e5dSmrg      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
17306fae4e5dSmrg      ;;
17316fae4e5dSmrg    *)
17326fae4e5dSmrg      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
17336fae4e5dSmrg      ;;
17346fae4e5dSmrg    esac
17356fae4e5dSmrgdone
17369c9ff80cSmrg
17376fae4e5dSmrg_LT_OUTPUT_LIBTOOL_INIT
17386fae4e5dSmrg])
17399c9ff80cSmrg
17406fae4e5dSmrg# _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
17416fae4e5dSmrg# ------------------------------------
17426fae4e5dSmrg# Generate a child script FILE with all initialization necessary to
17436fae4e5dSmrg# reuse the environment learned by the parent script, and make the
17446fae4e5dSmrg# file executable.  If COMMENT is supplied, it is inserted after the
17456fae4e5dSmrg# `#!' sequence but before initialization text begins.  After this
17466fae4e5dSmrg# macro, additional text can be appended to FILE to form the body of
17476fae4e5dSmrg# the child script.  The macro ends with non-zero status if the
17486fae4e5dSmrg# file could not be fully written (such as if the disk is full).
17496fae4e5dSmrgm4_ifdef([AS_INIT_GENERATED],
17506fae4e5dSmrg[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
17516fae4e5dSmrg[m4_defun([_LT_GENERATED_FILE_INIT],
17526fae4e5dSmrg[m4_require([AS_PREPARE])]dnl
17536fae4e5dSmrg[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
17546fae4e5dSmrg[lt_write_fail=0
17556fae4e5dSmrgcat >$1 <<_ASEOF || lt_write_fail=1
17566fae4e5dSmrg#! $SHELL
17576fae4e5dSmrg# Generated by $as_me.
17586fae4e5dSmrg$2
17596fae4e5dSmrgSHELL=\${CONFIG_SHELL-$SHELL}
17606fae4e5dSmrgexport SHELL
17616fae4e5dSmrg_ASEOF
17626fae4e5dSmrgcat >>$1 <<\_ASEOF || lt_write_fail=1
17636fae4e5dSmrgAS_SHELL_SANITIZE
17646fae4e5dSmrg_AS_PREPARE
17656fae4e5dSmrgexec AS_MESSAGE_FD>&1
17666fae4e5dSmrg_ASEOF
17676fae4e5dSmrgtest $lt_write_fail = 0 && chmod +x $1[]dnl
17686fae4e5dSmrgm4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
17691f0ac6a5Smrg
17706fae4e5dSmrg# LT_OUTPUT
17716fae4e5dSmrg# ---------
17726fae4e5dSmrg# This macro allows early generation of the libtool script (before
17736fae4e5dSmrg# AC_OUTPUT is called), incase it is used in configure for compilation
17746fae4e5dSmrg# tests.
17756fae4e5dSmrgAC_DEFUN([LT_OUTPUT],
17766fae4e5dSmrg[: ${CONFIG_LT=./config.lt}
17776fae4e5dSmrgAC_MSG_NOTICE([creating $CONFIG_LT])
17786fae4e5dSmrg_LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
17796fae4e5dSmrg[# Run this file to recreate a libtool stub with the current configuration.])
17801f0ac6a5Smrg
17816fae4e5dSmrgcat >>"$CONFIG_LT" <<\_LTEOF
17826fae4e5dSmrglt_cl_silent=false
17836fae4e5dSmrgexec AS_MESSAGE_LOG_FD>>config.log
17846fae4e5dSmrg{
17856fae4e5dSmrg  echo
17866fae4e5dSmrg  AS_BOX([Running $as_me.])
17876fae4e5dSmrg} >&AS_MESSAGE_LOG_FD
17881f0ac6a5Smrg
17896fae4e5dSmrglt_cl_help="\
17906fae4e5dSmrg\`$as_me' creates a local libtool stub from the current configuration,
17916fae4e5dSmrgfor use in further configure time tests before the real libtool is
17926fae4e5dSmrggenerated.
17931f0ac6a5Smrg
17946fae4e5dSmrgUsage: $[0] [[OPTIONS]]
17951f0ac6a5Smrg
17966fae4e5dSmrg  -h, --help      print this help, then exit
17976fae4e5dSmrg  -V, --version   print version number, then exit
17986fae4e5dSmrg  -q, --quiet     do not print progress messages
17996fae4e5dSmrg  -d, --debug     don't remove temporary files
18001f0ac6a5Smrg
18016fae4e5dSmrgReport bugs to <bug-libtool@gnu.org>."
18029c9ff80cSmrg
18036fae4e5dSmrglt_cl_version="\
18046fae4e5dSmrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
18056fae4e5dSmrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
18066fae4e5dSmrgconfigured by $[0], generated by m4_PACKAGE_STRING.
18071f0ac6a5Smrg
18086fae4e5dSmrgCopyright (C) 2010 Free Software Foundation, Inc.
18096fae4e5dSmrgThis config.lt script is free software; the Free Software Foundation
18106fae4e5dSmrggives unlimited permision to copy, distribute and modify it."
18111f0ac6a5Smrg
18126fae4e5dSmrgwhile test $[#] != 0
18136fae4e5dSmrgdo
18146fae4e5dSmrg  case $[1] in
18156fae4e5dSmrg    --version | --v* | -V )
18166fae4e5dSmrg      echo "$lt_cl_version"; exit 0 ;;
18176fae4e5dSmrg    --help | --h* | -h )
18186fae4e5dSmrg      echo "$lt_cl_help"; exit 0 ;;
18196fae4e5dSmrg    --debug | --d* | -d )
18206fae4e5dSmrg      debug=: ;;
18216fae4e5dSmrg    --quiet | --q* | --silent | --s* | -q )
18226fae4e5dSmrg      lt_cl_silent=: ;;
18231f0ac6a5Smrg
18246fae4e5dSmrg    -*) AC_MSG_ERROR([unrecognized option: $[1]
18256fae4e5dSmrgTry \`$[0] --help' for more information.]) ;;
18261f0ac6a5Smrg
18276fae4e5dSmrg    *) AC_MSG_ERROR([unrecognized argument: $[1]
18286fae4e5dSmrgTry \`$[0] --help' for more information.]) ;;
18296fae4e5dSmrg  esac
18306fae4e5dSmrg  shift
18316fae4e5dSmrgdone
18321f0ac6a5Smrg
18336fae4e5dSmrgif $lt_cl_silent; then
18346fae4e5dSmrg  exec AS_MESSAGE_FD>/dev/null
18356fae4e5dSmrgfi
18366fae4e5dSmrg_LTEOF
18371f0ac6a5Smrg
18386fae4e5dSmrgcat >>"$CONFIG_LT" <<_LTEOF
18396fae4e5dSmrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
18406fae4e5dSmrg_LTEOF
18411f0ac6a5Smrg
18426fae4e5dSmrgcat >>"$CONFIG_LT" <<\_LTEOF
18436fae4e5dSmrgAC_MSG_NOTICE([creating $ofile])
18446fae4e5dSmrg_LT_OUTPUT_LIBTOOL_COMMANDS
18456fae4e5dSmrgAS_EXIT(0)
18466fae4e5dSmrg_LTEOF
18476fae4e5dSmrgchmod +x "$CONFIG_LT"
18481f0ac6a5Smrg
18496fae4e5dSmrg# configure is writing to config.log, but config.lt does its own redirection,
18506fae4e5dSmrg# appending to config.log, which fails on DOS, as config.log is still kept
18516fae4e5dSmrg# open by configure.  Here we exec the FD to /dev/null, effectively closing
18526fae4e5dSmrg# config.log, so it can be properly (re)opened and appended to by config.lt.
18536fae4e5dSmrglt_cl_success=:
18546fae4e5dSmrgtest "$silent" = yes &&
18556fae4e5dSmrg  lt_config_lt_args="$lt_config_lt_args --quiet"
18566fae4e5dSmrgexec AS_MESSAGE_LOG_FD>/dev/null
18576fae4e5dSmrg$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
18586fae4e5dSmrgexec AS_MESSAGE_LOG_FD>>config.log
18596fae4e5dSmrg$lt_cl_success || AS_EXIT(1)
18606fae4e5dSmrg])# LT_OUTPUT
1861e5410a46Smrg
18621f0ac6a5Smrg
18636fae4e5dSmrg# _LT_CONFIG(TAG)
18649c9ff80cSmrg# ---------------
18656fae4e5dSmrg# If TAG is the built-in tag, create an initial libtool script with a
18666fae4e5dSmrg# default configuration from the untagged config vars.  Otherwise add code
18676fae4e5dSmrg# to config.status for appending the configuration named by TAG from the
18686fae4e5dSmrg# matching tagged config vars.
18696fae4e5dSmrgm4_defun([_LT_CONFIG],
18706fae4e5dSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
18716fae4e5dSmrg_LT_CONFIG_SAVE_COMMANDS([
18726fae4e5dSmrg  m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
18736fae4e5dSmrg  m4_if(_LT_TAG, [C], [
18746fae4e5dSmrg    # See if we are running on zsh, and set the options which allow our
18756fae4e5dSmrg    # commands through without removal of \ escapes.
18766fae4e5dSmrg    if test -n "${ZSH_VERSION+set}" ; then
18776fae4e5dSmrg      setopt NO_GLOB_SUBST
18786fae4e5dSmrg    fi
18791f0ac6a5Smrg
18806fae4e5dSmrg    cfgfile="${ofile}T"
18816fae4e5dSmrg    trap "$RM \"$cfgfile\"; exit 1" 1 2 15
18826fae4e5dSmrg    $RM "$cfgfile"
18831f0ac6a5Smrg
18846fae4e5dSmrg    cat <<_LT_EOF >> "$cfgfile"
18856fae4e5dSmrg#! $SHELL
18861f0ac6a5Smrg
18876fae4e5dSmrg# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
18886fae4e5dSmrg# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
18896fae4e5dSmrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
18906fae4e5dSmrg# NOTE: Changes made to this file will be lost: look at ltmain.sh.
18916fae4e5dSmrg#
18926fae4e5dSmrg_LT_COPYING
18936fae4e5dSmrg_LT_LIBTOOL_TAGS
18941f0ac6a5Smrg
18956fae4e5dSmrg# ### BEGIN LIBTOOL CONFIG
18966fae4e5dSmrg_LT_LIBTOOL_CONFIG_VARS
18976fae4e5dSmrg_LT_LIBTOOL_TAG_VARS
18986fae4e5dSmrg# ### END LIBTOOL CONFIG
18991f0ac6a5Smrg
19006fae4e5dSmrg_LT_EOF
19011f0ac6a5Smrg
19026fae4e5dSmrg  case $host_os in
19036fae4e5dSmrg  aix3*)
19046fae4e5dSmrg    cat <<\_LT_EOF >> "$cfgfile"
19056fae4e5dSmrg# AIX sometimes has problems with the GCC collect2 program.  For some
19066fae4e5dSmrg# reason, if we set the COLLECT_NAMES environment variable, the problems
19076fae4e5dSmrg# vanish in a puff of smoke.
19086fae4e5dSmrgif test "X${COLLECT_NAMES+set}" != Xset; then
19096fae4e5dSmrg  COLLECT_NAMES=
19106fae4e5dSmrg  export COLLECT_NAMES
19116fae4e5dSmrgfi
19126fae4e5dSmrg_LT_EOF
19136fae4e5dSmrg    ;;
19146fae4e5dSmrg  esac
19151f0ac6a5Smrg
19166fae4e5dSmrg  _LT_PROG_LTMAIN
19171f0ac6a5Smrg
19186fae4e5dSmrg  # We use sed instead of cat because bash on DJGPP gets confused if
19196fae4e5dSmrg  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
19206fae4e5dSmrg  # text mode, it properly converts lines to CR/LF.  This bash problem
19216fae4e5dSmrg  # is reportedly fixed, but why not run on old versions too?
19226fae4e5dSmrg  sed '$q' "$ltmain" >> "$cfgfile" \
19236fae4e5dSmrg     || (rm -f "$cfgfile"; exit 1)
19249c9ff80cSmrg
19256fae4e5dSmrg  _LT_PROG_REPLACE_SHELLFNS
19269c9ff80cSmrg
19276fae4e5dSmrg   mv -f "$cfgfile" "$ofile" ||
19286fae4e5dSmrg    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
19296fae4e5dSmrg  chmod +x "$ofile"
19306fae4e5dSmrg],
19316fae4e5dSmrg[cat <<_LT_EOF >> "$ofile"
19329c9ff80cSmrg
19336fae4e5dSmrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
19346fae4e5dSmrgdnl in a comment (ie after a #).
19356fae4e5dSmrg# ### BEGIN LIBTOOL TAG CONFIG: $1
19366fae4e5dSmrg_LT_LIBTOOL_TAG_VARS(_LT_TAG)
19376fae4e5dSmrg# ### END LIBTOOL TAG CONFIG: $1
19386fae4e5dSmrg_LT_EOF
19396fae4e5dSmrg])dnl /m4_if
19406fae4e5dSmrg],
19416fae4e5dSmrg[m4_if([$1], [], [
19426fae4e5dSmrg    PACKAGE='$PACKAGE'
19436fae4e5dSmrg    VERSION='$VERSION'
19446fae4e5dSmrg    TIMESTAMP='$TIMESTAMP'
19456fae4e5dSmrg    RM='$RM'
19466fae4e5dSmrg    ofile='$ofile'], [])
19476fae4e5dSmrg])dnl /_LT_CONFIG_SAVE_COMMANDS
19486fae4e5dSmrg])# _LT_CONFIG
19499c9ff80cSmrg
19509c9ff80cSmrg
19516fae4e5dSmrg# LT_SUPPORTED_TAG(TAG)
19526fae4e5dSmrg# ---------------------
19536fae4e5dSmrg# Trace this macro to discover what tags are supported by the libtool
19546fae4e5dSmrg# --tag option, using:
19556fae4e5dSmrg#    autoconf --trace 'LT_SUPPORTED_TAG:$1'
19566fae4e5dSmrgAC_DEFUN([LT_SUPPORTED_TAG], [])
19579c9ff80cSmrg
19589c9ff80cSmrg
19596fae4e5dSmrg# C support is built-in for now
19606fae4e5dSmrgm4_define([_LT_LANG_C_enabled], [])
19616fae4e5dSmrgm4_define([_LT_TAGS], [])
19629c9ff80cSmrg
19631f0ac6a5Smrg
19646fae4e5dSmrg# LT_LANG(LANG)
19656fae4e5dSmrg# -------------
19666fae4e5dSmrg# Enable libtool support for the given language if not already enabled.
19676fae4e5dSmrgAC_DEFUN([LT_LANG],
19686fae4e5dSmrg[AC_BEFORE([$0], [LT_OUTPUT])dnl
19696fae4e5dSmrgm4_case([$1],
19706fae4e5dSmrg  [C],			[_LT_LANG(C)],
19716fae4e5dSmrg  [C++],		[_LT_LANG(CXX)],
19726fae4e5dSmrg  [Java],		[_LT_LANG(GCJ)],
19736fae4e5dSmrg  [Fortran 77],		[_LT_LANG(F77)],
19746fae4e5dSmrg  [Fortran],		[_LT_LANG(FC)],
19756fae4e5dSmrg  [Windows Resource],	[_LT_LANG(RC)],
19766fae4e5dSmrg  [m4_ifdef([_LT_LANG_]$1[_CONFIG],
19776fae4e5dSmrg    [_LT_LANG($1)],
19786fae4e5dSmrg    [m4_fatal([$0: unsupported language: "$1"])])])dnl
19796fae4e5dSmrg])# LT_LANG
19801f0ac6a5Smrg
19811f0ac6a5Smrg
19826fae4e5dSmrg# _LT_LANG(LANGNAME)
19836fae4e5dSmrg# ------------------
19846fae4e5dSmrgm4_defun([_LT_LANG],
19856fae4e5dSmrg[m4_ifdef([_LT_LANG_]$1[_enabled], [],
19866fae4e5dSmrg  [LT_SUPPORTED_TAG([$1])dnl
19876fae4e5dSmrg  m4_append([_LT_TAGS], [$1 ])dnl
19886fae4e5dSmrg  m4_define([_LT_LANG_]$1[_enabled], [])dnl
19896fae4e5dSmrg  _LT_LANG_$1_CONFIG($1)])dnl
19906fae4e5dSmrg])# _LT_LANG
19911f0ac6a5Smrg
19921f0ac6a5Smrg
19936fae4e5dSmrg# _LT_LANG_DEFAULT_CONFIG
19946fae4e5dSmrg# -----------------------
19956fae4e5dSmrgm4_defun([_LT_LANG_DEFAULT_CONFIG],
19966fae4e5dSmrg[AC_PROVIDE_IFELSE([AC_PROG_CXX],
19976fae4e5dSmrg  [LT_LANG(CXX)],
19986fae4e5dSmrg  [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
1999e5410a46Smrg
20006fae4e5dSmrgAC_PROVIDE_IFELSE([AC_PROG_F77],
20016fae4e5dSmrg  [LT_LANG(F77)],
20026fae4e5dSmrg  [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
20031f0ac6a5Smrg
20046fae4e5dSmrgAC_PROVIDE_IFELSE([AC_PROG_FC],
20056fae4e5dSmrg  [LT_LANG(FC)],
20066fae4e5dSmrg  [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
20071f0ac6a5Smrg
20086fae4e5dSmrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
20096fae4e5dSmrgdnl pulling things in needlessly.
20106fae4e5dSmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ],
20116fae4e5dSmrg  [LT_LANG(GCJ)],
20126fae4e5dSmrg  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
20136fae4e5dSmrg    [LT_LANG(GCJ)],
20146fae4e5dSmrg    [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
20156fae4e5dSmrg      [LT_LANG(GCJ)],
20166fae4e5dSmrg      [m4_ifdef([AC_PROG_GCJ],
20176fae4e5dSmrg	[m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
20186fae4e5dSmrg       m4_ifdef([A][M_PROG_GCJ],
20196fae4e5dSmrg	[m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
20206fae4e5dSmrg       m4_ifdef([LT_PROG_GCJ],
20216fae4e5dSmrg	[m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
20229c9ff80cSmrg
20236fae4e5dSmrgAC_PROVIDE_IFELSE([LT_PROG_RC],
20246fae4e5dSmrg  [LT_LANG(RC)],
20256fae4e5dSmrg  [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
20266fae4e5dSmrg])# _LT_LANG_DEFAULT_CONFIG
20279c9ff80cSmrg
20286fae4e5dSmrg# Obsolete macros:
20296fae4e5dSmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
20306fae4e5dSmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
20316fae4e5dSmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
20326fae4e5dSmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
20336fae4e5dSmrgAU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
20346fae4e5dSmrgdnl aclocal-1.4 backwards compatibility:
20356fae4e5dSmrgdnl AC_DEFUN([AC_LIBTOOL_CXX], [])
20366fae4e5dSmrgdnl AC_DEFUN([AC_LIBTOOL_F77], [])
20376fae4e5dSmrgdnl AC_DEFUN([AC_LIBTOOL_FC], [])
20386fae4e5dSmrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
20396fae4e5dSmrgdnl AC_DEFUN([AC_LIBTOOL_RC], [])
20409c9ff80cSmrg
20419c9ff80cSmrg
20426fae4e5dSmrg# _LT_TAG_COMPILER
20436fae4e5dSmrg# ----------------
20446fae4e5dSmrgm4_defun([_LT_TAG_COMPILER],
20456fae4e5dSmrg[AC_REQUIRE([AC_PROG_CC])dnl
20469c9ff80cSmrg
20476fae4e5dSmrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
20486fae4e5dSmrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
20496fae4e5dSmrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
20506fae4e5dSmrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
20519c9ff80cSmrg
20526fae4e5dSmrg# If no C compiler was specified, use CC.
20536fae4e5dSmrgLTCC=${LTCC-"$CC"}
20549c9ff80cSmrg
20556fae4e5dSmrg# If no C compiler flags were specified, use CFLAGS.
20566fae4e5dSmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"}
20579c9ff80cSmrg
20586fae4e5dSmrg# Allow CC to be a program name with arguments.
20596fae4e5dSmrgcompiler=$CC
20606fae4e5dSmrg])# _LT_TAG_COMPILER
20619c9ff80cSmrg
20629c9ff80cSmrg
20636fae4e5dSmrg# _LT_COMPILER_BOILERPLATE
20646fae4e5dSmrg# ------------------------
20656fae4e5dSmrg# Check for compiler boilerplate output or warnings with
20666fae4e5dSmrg# the simple compiler test code.
20676fae4e5dSmrgm4_defun([_LT_COMPILER_BOILERPLATE],
20686fae4e5dSmrg[m4_require([_LT_DECL_SED])dnl
20696fae4e5dSmrgac_outfile=conftest.$ac_objext
20706fae4e5dSmrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext
20716fae4e5dSmrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
20726fae4e5dSmrg_lt_compiler_boilerplate=`cat conftest.err`
20736fae4e5dSmrg$RM conftest*
20746fae4e5dSmrg])# _LT_COMPILER_BOILERPLATE
20759c9ff80cSmrg
20769c9ff80cSmrg
20776fae4e5dSmrg# _LT_LINKER_BOILERPLATE
20786fae4e5dSmrg# ----------------------
20796fae4e5dSmrg# Check for linker boilerplate output or warnings with
20806fae4e5dSmrg# the simple link test code.
20816fae4e5dSmrgm4_defun([_LT_LINKER_BOILERPLATE],
20826fae4e5dSmrg[m4_require([_LT_DECL_SED])dnl
20836fae4e5dSmrgac_outfile=conftest.$ac_objext
20846fae4e5dSmrgecho "$lt_simple_link_test_code" >conftest.$ac_ext
20856fae4e5dSmrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
20866fae4e5dSmrg_lt_linker_boilerplate=`cat conftest.err`
20876fae4e5dSmrg$RM -r conftest*
20886fae4e5dSmrg])# _LT_LINKER_BOILERPLATE
20899c9ff80cSmrg
20906fae4e5dSmrg# _LT_REQUIRED_DARWIN_CHECKS
20916fae4e5dSmrg# -------------------------
20926fae4e5dSmrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
20936fae4e5dSmrg  case $host_os in
20946fae4e5dSmrg    rhapsody* | darwin*)
20956fae4e5dSmrg    AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
20966fae4e5dSmrg    AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
20976fae4e5dSmrg    AC_CHECK_TOOL([LIPO], [lipo], [:])
20986fae4e5dSmrg    AC_CHECK_TOOL([OTOOL], [otool], [:])
20996fae4e5dSmrg    AC_CHECK_TOOL([OTOOL64], [otool64], [:])
21006fae4e5dSmrg    _LT_DECL([], [DSYMUTIL], [1],
21016fae4e5dSmrg      [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
21026fae4e5dSmrg    _LT_DECL([], [NMEDIT], [1],
21036fae4e5dSmrg      [Tool to change global to local symbols on Mac OS X])
21046fae4e5dSmrg    _LT_DECL([], [LIPO], [1],
21056fae4e5dSmrg      [Tool to manipulate fat objects and archives on Mac OS X])
21066fae4e5dSmrg    _LT_DECL([], [OTOOL], [1],
21076fae4e5dSmrg      [ldd/readelf like tool for Mach-O binaries on Mac OS X])
21086fae4e5dSmrg    _LT_DECL([], [OTOOL64], [1],
21096fae4e5dSmrg      [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
21109c9ff80cSmrg
21116fae4e5dSmrg    AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
21126fae4e5dSmrg      [lt_cv_apple_cc_single_mod=no
21136fae4e5dSmrg      if test -z "${LT_MULTI_MODULE}"; then
21146fae4e5dSmrg	# By default we will add the -single_module flag. You can override
21156fae4e5dSmrg	# by either setting the environment variable LT_MULTI_MODULE
21166fae4e5dSmrg	# non-empty at configure time, or by adding -multi_module to the
21176fae4e5dSmrg	# link flags.
21186fae4e5dSmrg	rm -rf libconftest.dylib*
21196fae4e5dSmrg	echo "int foo(void){return 1;}" > conftest.c
21206fae4e5dSmrg	echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
21216fae4e5dSmrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
21226fae4e5dSmrg	$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
21236fae4e5dSmrg	  -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
21246fae4e5dSmrg        _lt_result=$?
21256fae4e5dSmrg	if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
21266fae4e5dSmrg	  lt_cv_apple_cc_single_mod=yes
21276fae4e5dSmrg	else
21286fae4e5dSmrg	  cat conftest.err >&AS_MESSAGE_LOG_FD
21296fae4e5dSmrg	fi
21306fae4e5dSmrg	rm -rf libconftest.dylib*
21316fae4e5dSmrg	rm -f conftest.*
21326fae4e5dSmrg      fi])
21336fae4e5dSmrg    AC_CACHE_CHECK([for -exported_symbols_list linker flag],
21346fae4e5dSmrg      [lt_cv_ld_exported_symbols_list],
21356fae4e5dSmrg      [lt_cv_ld_exported_symbols_list=no
21366fae4e5dSmrg      save_LDFLAGS=$LDFLAGS
21376fae4e5dSmrg      echo "_main" > conftest.sym
21386fae4e5dSmrg      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
21396fae4e5dSmrg      AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
21406fae4e5dSmrg	[lt_cv_ld_exported_symbols_list=yes],
21416fae4e5dSmrg	[lt_cv_ld_exported_symbols_list=no])
21426fae4e5dSmrg	LDFLAGS="$save_LDFLAGS"
21436fae4e5dSmrg    ])
21446fae4e5dSmrg    AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
21456fae4e5dSmrg      [lt_cv_ld_force_load=no
21466fae4e5dSmrg      cat > conftest.c << _LT_EOF
21476fae4e5dSmrgint forced_loaded() { return 2;}
21486fae4e5dSmrg_LT_EOF
21496fae4e5dSmrg      echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
21506fae4e5dSmrg      $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
21516fae4e5dSmrg      echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
21526fae4e5dSmrg      $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
21536fae4e5dSmrg      echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
21546fae4e5dSmrg      $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
21556fae4e5dSmrg      cat > conftest.c << _LT_EOF
21566fae4e5dSmrgint main() { return 0;}
21576fae4e5dSmrg_LT_EOF
21586fae4e5dSmrg      echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
21596fae4e5dSmrg      $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
21606fae4e5dSmrg      _lt_result=$?
21616fae4e5dSmrg      if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then
21626fae4e5dSmrg	lt_cv_ld_force_load=yes
21636fae4e5dSmrg      else
21646fae4e5dSmrg	cat conftest.err >&AS_MESSAGE_LOG_FD
21656fae4e5dSmrg      fi
21666fae4e5dSmrg        rm -f conftest.err libconftest.a conftest conftest.c
21676fae4e5dSmrg        rm -rf conftest.dSYM
21686fae4e5dSmrg    ])
21696fae4e5dSmrg    case $host_os in
21706fae4e5dSmrg    rhapsody* | darwin1.[[012]])
21716fae4e5dSmrg      _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
21726fae4e5dSmrg    darwin1.*)
21736fae4e5dSmrg      _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
21746fae4e5dSmrg    darwin*) # darwin 5.x on
21756fae4e5dSmrg      # if running on 10.5 or later, the deployment target defaults
21766fae4e5dSmrg      # to the OS version, if on x86, and 10.4, the deployment
21776fae4e5dSmrg      # target defaults to 10.4. Don't you love it?
21786fae4e5dSmrg      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
21796fae4e5dSmrg	10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
21806fae4e5dSmrg	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
21816fae4e5dSmrg	10.[[012]]*)
21826fae4e5dSmrg	  _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
21836fae4e5dSmrg	10.*)
21846fae4e5dSmrg	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
21856fae4e5dSmrg      esac
21866fae4e5dSmrg    ;;
21876fae4e5dSmrg  esac
21886fae4e5dSmrg    if test "$lt_cv_apple_cc_single_mod" = "yes"; then
21896fae4e5dSmrg      _lt_dar_single_mod='$single_module'
21906fae4e5dSmrg    fi
21916fae4e5dSmrg    if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
21926fae4e5dSmrg      _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
21936fae4e5dSmrg    else
21946fae4e5dSmrg      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
21956fae4e5dSmrg    fi
21966fae4e5dSmrg    if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
21976fae4e5dSmrg      _lt_dsymutil='~$DSYMUTIL $lib || :'
21986fae4e5dSmrg    else
21996fae4e5dSmrg      _lt_dsymutil=
22006fae4e5dSmrg    fi
22016fae4e5dSmrg    ;;
22026fae4e5dSmrg  esac
22039c9ff80cSmrg])
22049c9ff80cSmrg
22059c9ff80cSmrg
22066fae4e5dSmrg# _LT_DARWIN_LINKER_FEATURES
22076fae4e5dSmrg# --------------------------
22086fae4e5dSmrg# Checks for linker and compiler features on darwin
22096fae4e5dSmrgm4_defun([_LT_DARWIN_LINKER_FEATURES],
22106fae4e5dSmrg[
22116fae4e5dSmrg  m4_require([_LT_REQUIRED_DARWIN_CHECKS])
22126fae4e5dSmrg  _LT_TAGVAR(archive_cmds_need_lc, $1)=no
22136fae4e5dSmrg  _LT_TAGVAR(hardcode_direct, $1)=no
22146fae4e5dSmrg  _LT_TAGVAR(hardcode_automatic, $1)=yes
22156fae4e5dSmrg  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
22166fae4e5dSmrg  if test "$lt_cv_ld_force_load" = "yes"; then
22176fae4e5dSmrg    _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\"`'
22186fae4e5dSmrg  else
22196fae4e5dSmrg    _LT_TAGVAR(whole_archive_flag_spec, $1)=''
22206fae4e5dSmrg  fi
22216fae4e5dSmrg  _LT_TAGVAR(link_all_deplibs, $1)=yes
22226fae4e5dSmrg  _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
22236fae4e5dSmrg  case $cc_basename in
22246fae4e5dSmrg     ifort*) _lt_dar_can_shared=yes ;;
22256fae4e5dSmrg     *) _lt_dar_can_shared=$GCC ;;
22266fae4e5dSmrg  esac
22276fae4e5dSmrg  if test "$_lt_dar_can_shared" = "yes"; then
22286fae4e5dSmrg    output_verbose_link_cmd=func_echo_all
22296fae4e5dSmrg    _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}"
22306fae4e5dSmrg    _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
22316fae4e5dSmrg    _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}"
22326fae4e5dSmrg    _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}"
22336fae4e5dSmrg    m4_if([$1], [CXX],
22346fae4e5dSmrg[   if test "$lt_cv_apple_cc_single_mod" != "yes"; then
22356fae4e5dSmrg      _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}"
22366fae4e5dSmrg      _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}"
22376fae4e5dSmrg    fi
22386fae4e5dSmrg],[])
22396fae4e5dSmrg  else
22406fae4e5dSmrg  _LT_TAGVAR(ld_shlibs, $1)=no
22416fae4e5dSmrg  fi
22426fae4e5dSmrg])
22439c9ff80cSmrg
22446fae4e5dSmrg# _LT_SYS_MODULE_PATH_AIX([TAGNAME])
22456fae4e5dSmrg# ----------------------------------
22466fae4e5dSmrg# Links a minimal program and checks the executable
22476fae4e5dSmrg# for the system default hardcoded library path. In most cases,
22486fae4e5dSmrg# this is /usr/lib:/lib, but when the MPI compilers are used
22496fae4e5dSmrg# the location of the communication and MPI libs are included too.
22506fae4e5dSmrg# If we don't find anything, use the default library path according
22516fae4e5dSmrg# to the aix ld manual.
22526fae4e5dSmrg# Store the results from the different compilers for each TAGNAME.
22536fae4e5dSmrg# Allow to override them for all tags through lt_cv_aix_libpath.
22546fae4e5dSmrgm4_defun([_LT_SYS_MODULE_PATH_AIX],
22556fae4e5dSmrg[m4_require([_LT_DECL_SED])dnl
22566fae4e5dSmrgif test "${lt_cv_aix_libpath+set}" = set; then
22576fae4e5dSmrg  aix_libpath=$lt_cv_aix_libpath
22586fae4e5dSmrgelse
22596fae4e5dSmrg  AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
22606fae4e5dSmrg  [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
22616fae4e5dSmrg  lt_aix_libpath_sed='[
22626fae4e5dSmrg      /Import File Strings/,/^$/ {
22636fae4e5dSmrg	  /^0/ {
22646fae4e5dSmrg	      s/^0  *\([^ ]*\) *$/\1/
22656fae4e5dSmrg	      p
22666fae4e5dSmrg	  }
22676fae4e5dSmrg      }]'
22686fae4e5dSmrg  _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
22696fae4e5dSmrg  # Check for a 64-bit object if we didn't find anything.
22706fae4e5dSmrg  if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
22716fae4e5dSmrg    _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
22726fae4e5dSmrg  fi],[])
22736fae4e5dSmrg  if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
22746fae4e5dSmrg    _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib"
22756fae4e5dSmrg  fi
22766fae4e5dSmrg  ])
22776fae4e5dSmrg  aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
22786fae4e5dSmrgfi
22796fae4e5dSmrg])# _LT_SYS_MODULE_PATH_AIX
22809c9ff80cSmrg
22819c9ff80cSmrg
22826fae4e5dSmrg# _LT_SHELL_INIT(ARG)
22839c9ff80cSmrg# -------------------
22846fae4e5dSmrgm4_define([_LT_SHELL_INIT],
22856fae4e5dSmrg[m4_divert_text([M4SH-INIT], [$1
22866fae4e5dSmrg])])# _LT_SHELL_INIT
22879c9ff80cSmrg
22889c9ff80cSmrg
22899c9ff80cSmrg
22906fae4e5dSmrg# _LT_PROG_ECHO_BACKSLASH
22916fae4e5dSmrg# -----------------------
22926fae4e5dSmrg# Find how we can fake an echo command that does not interpret backslash.
22936fae4e5dSmrg# In particular, with Autoconf 2.60 or later we add some code to the start
22946fae4e5dSmrg# of the generated configure script which will find a shell with a builtin
22956fae4e5dSmrg# printf (which we can use as an echo command).
22966fae4e5dSmrgm4_defun([_LT_PROG_ECHO_BACKSLASH],
22976fae4e5dSmrg[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
22986fae4e5dSmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
22996fae4e5dSmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
23006fae4e5dSmrg
23016fae4e5dSmrgAC_MSG_CHECKING([how to print strings])
23026fae4e5dSmrg# Test print first, because it will be a builtin if present.
23036fae4e5dSmrgif test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
23046fae4e5dSmrg   test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
23056fae4e5dSmrg  ECHO='print -r --'
23066fae4e5dSmrgelif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
23076fae4e5dSmrg  ECHO='printf %s\n'
23086fae4e5dSmrgelse
23096fae4e5dSmrg  # Use this function as a fallback that always works.
23106fae4e5dSmrg  func_fallback_echo ()
23116fae4e5dSmrg  {
23126fae4e5dSmrg    eval 'cat <<_LTECHO_EOF
23136fae4e5dSmrg$[]1
23146fae4e5dSmrg_LTECHO_EOF'
23156fae4e5dSmrg  }
23166fae4e5dSmrg  ECHO='func_fallback_echo'
23176fae4e5dSmrgfi
23189c9ff80cSmrg
23196fae4e5dSmrg# func_echo_all arg...
23206fae4e5dSmrg# Invoke $ECHO with all args, space-separated.
23216fae4e5dSmrgfunc_echo_all ()
23226fae4e5dSmrg{
23236fae4e5dSmrg    $ECHO "$*" 
23246fae4e5dSmrg}
23259c9ff80cSmrg
23266fae4e5dSmrgcase "$ECHO" in
23276fae4e5dSmrg  printf*) AC_MSG_RESULT([printf]) ;;
23286fae4e5dSmrg  print*) AC_MSG_RESULT([print -r]) ;;
23296fae4e5dSmrg  *) AC_MSG_RESULT([cat]) ;;
23309c9ff80cSmrgesac
23319c9ff80cSmrg
23326fae4e5dSmrgm4_ifdef([_AS_DETECT_SUGGESTED],
23336fae4e5dSmrg[_AS_DETECT_SUGGESTED([
23346fae4e5dSmrg  test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
23356fae4e5dSmrg    ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
23366fae4e5dSmrg    ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
23376fae4e5dSmrg    ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
23386fae4e5dSmrg    PATH=/empty FPATH=/empty; export PATH FPATH
23396fae4e5dSmrg    test "X`printf %s $ECHO`" = "X$ECHO" \
23406fae4e5dSmrg      || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
23419c9ff80cSmrg
23426fae4e5dSmrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
23436fae4e5dSmrg_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
23446fae4e5dSmrg])# _LT_PROG_ECHO_BACKSLASH
23459c9ff80cSmrg
23469c9ff80cSmrg
23476fae4e5dSmrg# _LT_WITH_SYSROOT
23486fae4e5dSmrg# ----------------
23496fae4e5dSmrgAC_DEFUN([_LT_WITH_SYSROOT],
23506fae4e5dSmrg[AC_MSG_CHECKING([for sysroot])
23516fae4e5dSmrgAC_ARG_WITH([sysroot],
23526fae4e5dSmrg[  --with-sysroot[=DIR] Search for dependent libraries within DIR
23536fae4e5dSmrg                        (or the compiler's sysroot if not specified).],
23546fae4e5dSmrg[], [with_sysroot=no])
23556fae4e5dSmrg
23566fae4e5dSmrgdnl lt_sysroot will always be passed unquoted.  We quote it here
23576fae4e5dSmrgdnl in case the user passed a directory name.
23586fae4e5dSmrglt_sysroot=
23596fae4e5dSmrgcase ${with_sysroot} in #(
23606fae4e5dSmrg yes)
23616fae4e5dSmrg   if test "$GCC" = yes; then
23626fae4e5dSmrg     lt_sysroot=`$CC --print-sysroot 2>/dev/null`
23636fae4e5dSmrg   fi
23646fae4e5dSmrg   ;; #(
23656fae4e5dSmrg /*)
23666fae4e5dSmrg   lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
23676fae4e5dSmrg   ;; #(
23686fae4e5dSmrg no|'')
23696fae4e5dSmrg   ;; #(
23706fae4e5dSmrg *)
23716fae4e5dSmrg   AC_MSG_RESULT([${with_sysroot}])
23726fae4e5dSmrg   AC_MSG_ERROR([The sysroot must be an absolute path.])
23736fae4e5dSmrg   ;;
23746fae4e5dSmrgesac
23759c9ff80cSmrg
23766fae4e5dSmrg AC_MSG_RESULT([${lt_sysroot:-no}])
23776fae4e5dSmrg_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
23786fae4e5dSmrg[dependent libraries, and in which our libraries should be installed.])])
23799c9ff80cSmrg
23806fae4e5dSmrg# _LT_ENABLE_LOCK
23816fae4e5dSmrg# ---------------
23826fae4e5dSmrgm4_defun([_LT_ENABLE_LOCK],
23836fae4e5dSmrg[AC_ARG_ENABLE([libtool-lock],
23846fae4e5dSmrg  [AS_HELP_STRING([--disable-libtool-lock],
23856fae4e5dSmrg    [avoid locking (might break parallel builds)])])
23866fae4e5dSmrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
23879c9ff80cSmrg
23886fae4e5dSmrg# Some flags need to be propagated to the compiler or linker for good
23896fae4e5dSmrg# libtool support.
23906fae4e5dSmrgcase $host in
23916fae4e5dSmrgia64-*-hpux*)
23926fae4e5dSmrg  # Find out which ABI we are using.
23936fae4e5dSmrg  echo 'int i;' > conftest.$ac_ext
23946fae4e5dSmrg  if AC_TRY_EVAL(ac_compile); then
23956fae4e5dSmrg    case `/usr/bin/file conftest.$ac_objext` in
23966fae4e5dSmrg      *ELF-32*)
23976fae4e5dSmrg	HPUX_IA64_MODE="32"
23986fae4e5dSmrg	;;
23996fae4e5dSmrg      *ELF-64*)
24006fae4e5dSmrg	HPUX_IA64_MODE="64"
24016fae4e5dSmrg	;;
24026fae4e5dSmrg    esac
24036fae4e5dSmrg  fi
24046fae4e5dSmrg  rm -rf conftest*
24056fae4e5dSmrg  ;;
24066fae4e5dSmrg*-*-irix6*)
24076fae4e5dSmrg  # Find out which ABI we are using.
24086fae4e5dSmrg  echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
24096fae4e5dSmrg  if AC_TRY_EVAL(ac_compile); then
24106fae4e5dSmrg    if test "$lt_cv_prog_gnu_ld" = yes; then
24116fae4e5dSmrg      case `/usr/bin/file conftest.$ac_objext` in
24126fae4e5dSmrg	*32-bit*)
24136fae4e5dSmrg	  LD="${LD-ld} -melf32bsmip"
24146fae4e5dSmrg	  ;;
24156fae4e5dSmrg	*N32*)
24166fae4e5dSmrg	  LD="${LD-ld} -melf32bmipn32"
24176fae4e5dSmrg	  ;;
24186fae4e5dSmrg	*64-bit*)
24196fae4e5dSmrg	  LD="${LD-ld} -melf64bmip"
24206fae4e5dSmrg	;;
24216fae4e5dSmrg      esac
24226fae4e5dSmrg    else
24236fae4e5dSmrg      case `/usr/bin/file conftest.$ac_objext` in
24246fae4e5dSmrg	*32-bit*)
24256fae4e5dSmrg	  LD="${LD-ld} -32"
24266fae4e5dSmrg	  ;;
24276fae4e5dSmrg	*N32*)
24286fae4e5dSmrg	  LD="${LD-ld} -n32"
24296fae4e5dSmrg	  ;;
24306fae4e5dSmrg	*64-bit*)
24316fae4e5dSmrg	  LD="${LD-ld} -64"
24326fae4e5dSmrg	  ;;
24336fae4e5dSmrg      esac
24346fae4e5dSmrg    fi
24356fae4e5dSmrg  fi
24366fae4e5dSmrg  rm -rf conftest*
24376fae4e5dSmrg  ;;
24389c9ff80cSmrg
24396fae4e5dSmrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
24406fae4e5dSmrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*)
24416fae4e5dSmrg  # Find out which ABI we are using.
24426fae4e5dSmrg  echo 'int i;' > conftest.$ac_ext
24436fae4e5dSmrg  if AC_TRY_EVAL(ac_compile); then
24446fae4e5dSmrg    case `/usr/bin/file conftest.o` in
24456fae4e5dSmrg      *32-bit*)
24466fae4e5dSmrg	case $host in
24476fae4e5dSmrg	  x86_64-*kfreebsd*-gnu)
24486fae4e5dSmrg	    LD="${LD-ld} -m elf_i386_fbsd"
24496fae4e5dSmrg	    ;;
24506fae4e5dSmrg	  x86_64-*linux*)
24516fae4e5dSmrg	    LD="${LD-ld} -m elf_i386"
24526fae4e5dSmrg	    ;;
24536fae4e5dSmrg	  ppc64-*linux*|powerpc64-*linux*)
24546fae4e5dSmrg	    LD="${LD-ld} -m elf32ppclinux"
24556fae4e5dSmrg	    ;;
24566fae4e5dSmrg	  s390x-*linux*)
24576fae4e5dSmrg	    LD="${LD-ld} -m elf_s390"
24586fae4e5dSmrg	    ;;
24596fae4e5dSmrg	  sparc64-*linux*)
24606fae4e5dSmrg	    LD="${LD-ld} -m elf32_sparc"
24616fae4e5dSmrg	    ;;
24626fae4e5dSmrg	esac
24636fae4e5dSmrg	;;
24646fae4e5dSmrg      *64-bit*)
24656fae4e5dSmrg	case $host in
24666fae4e5dSmrg	  x86_64-*kfreebsd*-gnu)
24676fae4e5dSmrg	    LD="${LD-ld} -m elf_x86_64_fbsd"
24686fae4e5dSmrg	    ;;
24696fae4e5dSmrg	  x86_64-*linux*)
24706fae4e5dSmrg	    LD="${LD-ld} -m elf_x86_64"
24716fae4e5dSmrg	    ;;
24726fae4e5dSmrg	  ppc*-*linux*|powerpc*-*linux*)
24736fae4e5dSmrg	    LD="${LD-ld} -m elf64ppc"
24746fae4e5dSmrg	    ;;
24756fae4e5dSmrg	  s390*-*linux*|s390*-*tpf*)
24766fae4e5dSmrg	    LD="${LD-ld} -m elf64_s390"
24776fae4e5dSmrg	    ;;
24786fae4e5dSmrg	  sparc*-*linux*)
24796fae4e5dSmrg	    LD="${LD-ld} -m elf64_sparc"
24806fae4e5dSmrg	    ;;
24816fae4e5dSmrg	esac
24826fae4e5dSmrg	;;
24836fae4e5dSmrg    esac
24846fae4e5dSmrg  fi
24856fae4e5dSmrg  rm -rf conftest*
24866fae4e5dSmrg  ;;
24879c9ff80cSmrg
24886fae4e5dSmrg*-*-sco3.2v5*)
24896fae4e5dSmrg  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
24906fae4e5dSmrg  SAVE_CFLAGS="$CFLAGS"
24916fae4e5dSmrg  CFLAGS="$CFLAGS -belf"
24926fae4e5dSmrg  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
24936fae4e5dSmrg    [AC_LANG_PUSH(C)
24946fae4e5dSmrg     AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
24956fae4e5dSmrg     AC_LANG_POP])
24966fae4e5dSmrg  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
24976fae4e5dSmrg    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
24986fae4e5dSmrg    CFLAGS="$SAVE_CFLAGS"
24996fae4e5dSmrg  fi
25006fae4e5dSmrg  ;;
25016fae4e5dSmrgsparc*-*solaris*)
25026fae4e5dSmrg  # Find out which ABI we are using.
25036fae4e5dSmrg  echo 'int i;' > conftest.$ac_ext
25046fae4e5dSmrg  if AC_TRY_EVAL(ac_compile); then
25056fae4e5dSmrg    case `/usr/bin/file conftest.o` in
25066fae4e5dSmrg    *64-bit*)
25076fae4e5dSmrg      case $lt_cv_prog_gnu_ld in
25086fae4e5dSmrg      yes*) LD="${LD-ld} -m elf64_sparc" ;;
25096fae4e5dSmrg      *)
25106fae4e5dSmrg	if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
25116fae4e5dSmrg	  LD="${LD-ld} -64"
25126fae4e5dSmrg	fi
25136fae4e5dSmrg	;;
25146fae4e5dSmrg      esac
25156fae4e5dSmrg      ;;
25166fae4e5dSmrg    esac
25176fae4e5dSmrg  fi
25186fae4e5dSmrg  rm -rf conftest*
25196fae4e5dSmrg  ;;
25206fae4e5dSmrgesac
25219c9ff80cSmrg
25226fae4e5dSmrgneed_locks="$enable_libtool_lock"
25236fae4e5dSmrg])# _LT_ENABLE_LOCK
25249c9ff80cSmrg
25259c9ff80cSmrg
25266fae4e5dSmrg# _LT_PROG_AR
25276fae4e5dSmrg# -----------
25286fae4e5dSmrgm4_defun([_LT_PROG_AR],
25296fae4e5dSmrg[AC_CHECK_TOOLS(AR, [ar], false)
25306fae4e5dSmrg: ${AR=ar}
25316fae4e5dSmrg: ${AR_FLAGS=cru}
25326fae4e5dSmrg_LT_DECL([], [AR], [1], [The archiver])
25336fae4e5dSmrg_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
25346fae4e5dSmrg
25356fae4e5dSmrgAC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
25366fae4e5dSmrg  [lt_cv_ar_at_file=no
25376fae4e5dSmrg   AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
25386fae4e5dSmrg     [echo conftest.$ac_objext > conftest.lst
25396fae4e5dSmrg      lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
25406fae4e5dSmrg      AC_TRY_EVAL([lt_ar_try])
25416fae4e5dSmrg      if test "$ac_status" -eq 0; then
25426fae4e5dSmrg	# Ensure the archiver fails upon bogus file names.
25436fae4e5dSmrg	rm -f conftest.$ac_objext libconftest.a
25446fae4e5dSmrg	AC_TRY_EVAL([lt_ar_try])
25456fae4e5dSmrg	if test "$ac_status" -ne 0; then
25466fae4e5dSmrg          lt_cv_ar_at_file=@
25476fae4e5dSmrg        fi
25486fae4e5dSmrg      fi
25496fae4e5dSmrg      rm -f conftest.* libconftest.a
25506fae4e5dSmrg     ])
25516fae4e5dSmrg  ])
25529c9ff80cSmrg
25536fae4e5dSmrgif test "x$lt_cv_ar_at_file" = xno; then
25546fae4e5dSmrg  archiver_list_spec=
25556fae4e5dSmrgelse
25566fae4e5dSmrg  archiver_list_spec=$lt_cv_ar_at_file
25579c9ff80cSmrgfi
25586fae4e5dSmrg_LT_DECL([], [archiver_list_spec], [1],
25596fae4e5dSmrg  [How to feed a file listing to the archiver])
25606fae4e5dSmrg])# _LT_PROG_AR
25619c9ff80cSmrg
25629c9ff80cSmrg
25636fae4e5dSmrg# _LT_CMD_OLD_ARCHIVE
25646fae4e5dSmrg# -------------------
25656fae4e5dSmrgm4_defun([_LT_CMD_OLD_ARCHIVE],
25666fae4e5dSmrg[_LT_PROG_AR
25679c9ff80cSmrg
25686fae4e5dSmrgAC_CHECK_TOOL(STRIP, strip, :)
25696fae4e5dSmrgtest -z "$STRIP" && STRIP=:
25706fae4e5dSmrg_LT_DECL([], [STRIP], [1], [A symbol stripping program])
25719c9ff80cSmrg
25726fae4e5dSmrgAC_CHECK_TOOL(RANLIB, ranlib, :)
25736fae4e5dSmrgtest -z "$RANLIB" && RANLIB=:
25746fae4e5dSmrg_LT_DECL([], [RANLIB], [1],
25756fae4e5dSmrg    [Commands used to install an old-style archive])
25769c9ff80cSmrg
25776fae4e5dSmrg# Determine commands to create old-style static archives.
25786fae4e5dSmrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
25796fae4e5dSmrgold_postinstall_cmds='chmod 644 $oldlib'
25806fae4e5dSmrgold_postuninstall_cmds=
25819c9ff80cSmrg
25826fae4e5dSmrgif test -n "$RANLIB"; then
25836fae4e5dSmrg  case $host_os in
25846fae4e5dSmrg  openbsd*)
25856fae4e5dSmrg    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
25866fae4e5dSmrg    ;;
25876fae4e5dSmrg  *)
25886fae4e5dSmrg    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
25896fae4e5dSmrg    ;;
25906fae4e5dSmrg  esac
25916fae4e5dSmrg  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
25926fae4e5dSmrgfi
25939c9ff80cSmrg
25946fae4e5dSmrgcase $host_os in
25956fae4e5dSmrg  darwin*)
25966fae4e5dSmrg    lock_old_archive_extraction=yes ;;
25976fae4e5dSmrg  *)
25986fae4e5dSmrg    lock_old_archive_extraction=no ;;
25996fae4e5dSmrgesac
26006fae4e5dSmrg_LT_DECL([], [old_postinstall_cmds], [2])
26016fae4e5dSmrg_LT_DECL([], [old_postuninstall_cmds], [2])
26026fae4e5dSmrg_LT_TAGDECL([], [old_archive_cmds], [2],
26036fae4e5dSmrg    [Commands used to build an old-style archive])
26046fae4e5dSmrg_LT_DECL([], [lock_old_archive_extraction], [0],
26056fae4e5dSmrg    [Whether to use a lock for old archive extraction])
26066fae4e5dSmrg])# _LT_CMD_OLD_ARCHIVE
26079c9ff80cSmrg
26089c9ff80cSmrg
26096fae4e5dSmrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
26106fae4e5dSmrg#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
26116fae4e5dSmrg# ----------------------------------------------------------------
26126fae4e5dSmrg# Check whether the given compiler option works
26136fae4e5dSmrgAC_DEFUN([_LT_COMPILER_OPTION],
26146fae4e5dSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
26156fae4e5dSmrgm4_require([_LT_DECL_SED])dnl
26166fae4e5dSmrgAC_CACHE_CHECK([$1], [$2],
26176fae4e5dSmrg  [$2=no
26186fae4e5dSmrg   m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
26196fae4e5dSmrg   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
26206fae4e5dSmrg   lt_compiler_flag="$3"
26216fae4e5dSmrg   # Insert the option either (1) after the last *FLAGS variable, or
26226fae4e5dSmrg   # (2) before a word containing "conftest.", or (3) at the end.
26236fae4e5dSmrg   # Note that $ac_compile itself does not contain backslashes and begins
26246fae4e5dSmrg   # with a dollar sign (not a hyphen), so the echo should work correctly.
26256fae4e5dSmrg   # The option is referenced via a variable to avoid confusing sed.
26266fae4e5dSmrg   lt_compile=`echo "$ac_compile" | $SED \
26276fae4e5dSmrg   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
26286fae4e5dSmrg   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
26296fae4e5dSmrg   -e 's:$: $lt_compiler_flag:'`
26306fae4e5dSmrg   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
26316fae4e5dSmrg   (eval "$lt_compile" 2>conftest.err)
26326fae4e5dSmrg   ac_status=$?
26336fae4e5dSmrg   cat conftest.err >&AS_MESSAGE_LOG_FD
26346fae4e5dSmrg   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
26356fae4e5dSmrg   if (exit $ac_status) && test -s "$ac_outfile"; then
26366fae4e5dSmrg     # The compiler can only warn and ignore the option if not recognized
26376fae4e5dSmrg     # So say no if there are warnings other than the usual output.
26386fae4e5dSmrg     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
26396fae4e5dSmrg     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
26406fae4e5dSmrg     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
26416fae4e5dSmrg       $2=yes
26426fae4e5dSmrg     fi
26436fae4e5dSmrg   fi
26446fae4e5dSmrg   $RM conftest*
26456fae4e5dSmrg])
26469c9ff80cSmrg
26476fae4e5dSmrgif test x"[$]$2" = xyes; then
26486fae4e5dSmrg    m4_if([$5], , :, [$5])
26496fae4e5dSmrgelse
26506fae4e5dSmrg    m4_if([$6], , :, [$6])
26519c9ff80cSmrgfi
26526fae4e5dSmrg])# _LT_COMPILER_OPTION
26539c9ff80cSmrg
26546fae4e5dSmrg# Old name:
26556fae4e5dSmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
26566fae4e5dSmrgdnl aclocal-1.4 backwards compatibility:
26576fae4e5dSmrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
26589c9ff80cSmrg
26599c9ff80cSmrg
26606fae4e5dSmrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
26616fae4e5dSmrg#                  [ACTION-SUCCESS], [ACTION-FAILURE])
26626fae4e5dSmrg# ----------------------------------------------------
26636fae4e5dSmrg# Check whether the given linker option works
26646fae4e5dSmrgAC_DEFUN([_LT_LINKER_OPTION],
26656fae4e5dSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
26666fae4e5dSmrgm4_require([_LT_DECL_SED])dnl
26676fae4e5dSmrgAC_CACHE_CHECK([$1], [$2],
26686fae4e5dSmrg  [$2=no
26696fae4e5dSmrg   save_LDFLAGS="$LDFLAGS"
26706fae4e5dSmrg   LDFLAGS="$LDFLAGS $3"
26716fae4e5dSmrg   echo "$lt_simple_link_test_code" > conftest.$ac_ext
26726fae4e5dSmrg   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
26736fae4e5dSmrg     # The linker can only warn and ignore the option if not recognized
26746fae4e5dSmrg     # So say no if there are warnings
26756fae4e5dSmrg     if test -s conftest.err; then
26766fae4e5dSmrg       # Append any errors to the config.log.
26776fae4e5dSmrg       cat conftest.err 1>&AS_MESSAGE_LOG_FD
26786fae4e5dSmrg       $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
26796fae4e5dSmrg       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
26806fae4e5dSmrg       if diff conftest.exp conftest.er2 >/dev/null; then
26816fae4e5dSmrg         $2=yes
26826fae4e5dSmrg       fi
26836fae4e5dSmrg     else
26846fae4e5dSmrg       $2=yes
26856fae4e5dSmrg     fi
26866fae4e5dSmrg   fi
26876fae4e5dSmrg   $RM -r conftest*
26886fae4e5dSmrg   LDFLAGS="$save_LDFLAGS"
26896fae4e5dSmrg])
26909c9ff80cSmrg
26916fae4e5dSmrgif test x"[$]$2" = xyes; then
26926fae4e5dSmrg    m4_if([$4], , :, [$4])
26936fae4e5dSmrgelse
26946fae4e5dSmrg    m4_if([$5], , :, [$5])
26956fae4e5dSmrgfi
26966fae4e5dSmrg])# _LT_LINKER_OPTION
26979c9ff80cSmrg
26986fae4e5dSmrg# Old name:
26996fae4e5dSmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
27006fae4e5dSmrgdnl aclocal-1.4 backwards compatibility:
27016fae4e5dSmrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
27029c9ff80cSmrg
27039c9ff80cSmrg
27046fae4e5dSmrg# LT_CMD_MAX_LEN
27056fae4e5dSmrg#---------------
27066fae4e5dSmrgAC_DEFUN([LT_CMD_MAX_LEN],
27076fae4e5dSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
27086fae4e5dSmrg# find the maximum length of command line arguments
27096fae4e5dSmrgAC_MSG_CHECKING([the maximum length of command line arguments])
27106fae4e5dSmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
27116fae4e5dSmrg  i=0
27126fae4e5dSmrg  teststring="ABCD"
27139c9ff80cSmrg
27146fae4e5dSmrg  case $build_os in
27156fae4e5dSmrg  msdosdjgpp*)
27166fae4e5dSmrg    # On DJGPP, this test can blow up pretty badly due to problems in libc
27176fae4e5dSmrg    # (any single argument exceeding 2000 bytes causes a buffer overrun
27186fae4e5dSmrg    # during glob expansion).  Even if it were fixed, the result of this
27196fae4e5dSmrg    # check would be larger than it should be.
27206fae4e5dSmrg    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
27216fae4e5dSmrg    ;;
27229c9ff80cSmrg
27236fae4e5dSmrg  gnu*)
27246fae4e5dSmrg    # Under GNU Hurd, this test is not required because there is
27256fae4e5dSmrg    # no limit to the length of command line arguments.
27266fae4e5dSmrg    # Libtool will interpret -1 as no limit whatsoever
27276fae4e5dSmrg    lt_cv_sys_max_cmd_len=-1;
27286fae4e5dSmrg    ;;
27299c9ff80cSmrg
27306fae4e5dSmrg  cygwin* | mingw* | cegcc*)
27316fae4e5dSmrg    # On Win9x/ME, this test blows up -- it succeeds, but takes
27326fae4e5dSmrg    # about 5 minutes as the teststring grows exponentially.
27336fae4e5dSmrg    # Worse, since 9x/ME are not pre-emptively multitasking,
27346fae4e5dSmrg    # you end up with a "frozen" computer, even though with patience
27356fae4e5dSmrg    # the test eventually succeeds (with a max line length of 256k).
27366fae4e5dSmrg    # Instead, let's just punt: use the minimum linelength reported by
27376fae4e5dSmrg    # all of the supported platforms: 8192 (on NT/2K/XP).
27386fae4e5dSmrg    lt_cv_sys_max_cmd_len=8192;
27396fae4e5dSmrg    ;;
27409c9ff80cSmrg
27416fae4e5dSmrg  mint*)
27426fae4e5dSmrg    # On MiNT this can take a long time and run out of memory.
27436fae4e5dSmrg    lt_cv_sys_max_cmd_len=8192;
27446fae4e5dSmrg    ;;
27459c9ff80cSmrg
27466fae4e5dSmrg  amigaos*)
27476fae4e5dSmrg    # On AmigaOS with pdksh, this test takes hours, literally.
27486fae4e5dSmrg    # So we just punt and use a minimum line length of 8192.
27496fae4e5dSmrg    lt_cv_sys_max_cmd_len=8192;
27506fae4e5dSmrg    ;;
27519c9ff80cSmrg
27526fae4e5dSmrg  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
27536fae4e5dSmrg    # This has been around since 386BSD, at least.  Likely further.
27546fae4e5dSmrg    if test -x /sbin/sysctl; then
27556fae4e5dSmrg      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
27566fae4e5dSmrg    elif test -x /usr/sbin/sysctl; then
27576fae4e5dSmrg      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
27586fae4e5dSmrg    else
27596fae4e5dSmrg      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
27606fae4e5dSmrg    fi
27616fae4e5dSmrg    # And add a safety zone
27626fae4e5dSmrg    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
27636fae4e5dSmrg    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
27646fae4e5dSmrg    ;;
27659c9ff80cSmrg
27666fae4e5dSmrg  interix*)
27676fae4e5dSmrg    # We know the value 262144 and hardcode it with a safety zone (like BSD)
27686fae4e5dSmrg    lt_cv_sys_max_cmd_len=196608
27696fae4e5dSmrg    ;;
27709c9ff80cSmrg
27716fae4e5dSmrg  osf*)
27726fae4e5dSmrg    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
27736fae4e5dSmrg    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
27746fae4e5dSmrg    # nice to cause kernel panics so lets avoid the loop below.
27756fae4e5dSmrg    # First set a reasonable default.
27766fae4e5dSmrg    lt_cv_sys_max_cmd_len=16384
27776fae4e5dSmrg    #
27786fae4e5dSmrg    if test -x /sbin/sysconfig; then
27796fae4e5dSmrg      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
27806fae4e5dSmrg        *1*) lt_cv_sys_max_cmd_len=-1 ;;
27819c9ff80cSmrg      esac
27829c9ff80cSmrg    fi
27836fae4e5dSmrg    ;;
27846fae4e5dSmrg  sco3.2v5*)
27856fae4e5dSmrg    lt_cv_sys_max_cmd_len=102400
27866fae4e5dSmrg    ;;
27876fae4e5dSmrg  sysv5* | sco5v6* | sysv4.2uw2*)
27886fae4e5dSmrg    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
27896fae4e5dSmrg    if test -n "$kargmax"; then
27906fae4e5dSmrg      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[	 ]]//'`
27919c9ff80cSmrg    else
27926fae4e5dSmrg      lt_cv_sys_max_cmd_len=32768
27939c9ff80cSmrg    fi
27946fae4e5dSmrg    ;;
27956fae4e5dSmrg  *)
27966fae4e5dSmrg    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
27976fae4e5dSmrg    if test -n "$lt_cv_sys_max_cmd_len"; then
27986fae4e5dSmrg      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
27996fae4e5dSmrg      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
28009c9ff80cSmrg    else
28016fae4e5dSmrg      # Make teststring a little bigger before we do anything with it.
28026fae4e5dSmrg      # a 1K string should be a reasonable start.
28036fae4e5dSmrg      for i in 1 2 3 4 5 6 7 8 ; do
28046fae4e5dSmrg        teststring=$teststring$teststring
28056fae4e5dSmrg      done
28066fae4e5dSmrg      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
28076fae4e5dSmrg      # If test is not a shell built-in, we'll probably end up computing a
28086fae4e5dSmrg      # maximum length that is only half of the actual maximum length, but
28096fae4e5dSmrg      # we can't tell.
28106fae4e5dSmrg      while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \
28116fae4e5dSmrg	         = "X$teststring$teststring"; } >/dev/null 2>&1 &&
28126fae4e5dSmrg	      test $i != 17 # 1/2 MB should be enough
28136fae4e5dSmrg      do
28146fae4e5dSmrg        i=`expr $i + 1`
28156fae4e5dSmrg        teststring=$teststring$teststring
28166fae4e5dSmrg      done
28176fae4e5dSmrg      # Only check the string length outside the loop.
28186fae4e5dSmrg      lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
28196fae4e5dSmrg      teststring=
28206fae4e5dSmrg      # Add a significant safety factor because C++ compilers can tack on
28216fae4e5dSmrg      # massive amounts of additional arguments before passing them to the
28226fae4e5dSmrg      # linker.  It appears as though 1/2 is a usable value.
28236fae4e5dSmrg      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
28249c9ff80cSmrg    fi
28259c9ff80cSmrg    ;;
28269c9ff80cSmrg  esac
28279c9ff80cSmrg])
28286fae4e5dSmrgif test -n $lt_cv_sys_max_cmd_len ; then
28296fae4e5dSmrg  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
28306fae4e5dSmrgelse
28316fae4e5dSmrg  AC_MSG_RESULT(none)
28326fae4e5dSmrgfi
28336fae4e5dSmrgmax_cmd_len=$lt_cv_sys_max_cmd_len
28346fae4e5dSmrg_LT_DECL([], [max_cmd_len], [0],
28356fae4e5dSmrg    [What is the maximum length of a command?])
28366fae4e5dSmrg])# LT_CMD_MAX_LEN
28379c9ff80cSmrg
28386fae4e5dSmrg# Old name:
28396fae4e5dSmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
28406fae4e5dSmrgdnl aclocal-1.4 backwards compatibility:
28416fae4e5dSmrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
28429c9ff80cSmrg
28439c9ff80cSmrg
28446fae4e5dSmrg# _LT_HEADER_DLFCN
28456fae4e5dSmrg# ----------------
28466fae4e5dSmrgm4_defun([_LT_HEADER_DLFCN],
28476fae4e5dSmrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
28486fae4e5dSmrg])# _LT_HEADER_DLFCN
28499c9ff80cSmrg
28509c9ff80cSmrg
28516fae4e5dSmrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
28526fae4e5dSmrg#                      ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
28536fae4e5dSmrg# ----------------------------------------------------------------
28546fae4e5dSmrgm4_defun([_LT_TRY_DLOPEN_SELF],
28556fae4e5dSmrg[m4_require([_LT_HEADER_DLFCN])dnl
28566fae4e5dSmrgif test "$cross_compiling" = yes; then :
28576fae4e5dSmrg  [$4]
28586fae4e5dSmrgelse
28596fae4e5dSmrg  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
28606fae4e5dSmrg  lt_status=$lt_dlunknown
28616fae4e5dSmrg  cat > conftest.$ac_ext <<_LT_EOF
28626fae4e5dSmrg[#line $LINENO "configure"
28636fae4e5dSmrg#include "confdefs.h"
28641f0ac6a5Smrg
28656fae4e5dSmrg#if HAVE_DLFCN_H
28666fae4e5dSmrg#include <dlfcn.h>
28676fae4e5dSmrg#endif
28681f0ac6a5Smrg
28696fae4e5dSmrg#include <stdio.h>
28701f0ac6a5Smrg
28716fae4e5dSmrg#ifdef RTLD_GLOBAL
28726fae4e5dSmrg#  define LT_DLGLOBAL		RTLD_GLOBAL
28736fae4e5dSmrg#else
28746fae4e5dSmrg#  ifdef DL_GLOBAL
28756fae4e5dSmrg#    define LT_DLGLOBAL		DL_GLOBAL
28766fae4e5dSmrg#  else
28776fae4e5dSmrg#    define LT_DLGLOBAL		0
28786fae4e5dSmrg#  endif
28796fae4e5dSmrg#endif
28801f0ac6a5Smrg
28816fae4e5dSmrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
28826fae4e5dSmrg   find out it does not work in some platform. */
28836fae4e5dSmrg#ifndef LT_DLLAZY_OR_NOW
28846fae4e5dSmrg#  ifdef RTLD_LAZY
28856fae4e5dSmrg#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
28866fae4e5dSmrg#  else
28876fae4e5dSmrg#    ifdef DL_LAZY
28886fae4e5dSmrg#      define LT_DLLAZY_OR_NOW		DL_LAZY
28896fae4e5dSmrg#    else
28906fae4e5dSmrg#      ifdef RTLD_NOW
28916fae4e5dSmrg#        define LT_DLLAZY_OR_NOW	RTLD_NOW
28926fae4e5dSmrg#      else
28936fae4e5dSmrg#        ifdef DL_NOW
28946fae4e5dSmrg#          define LT_DLLAZY_OR_NOW	DL_NOW
28956fae4e5dSmrg#        else
28966fae4e5dSmrg#          define LT_DLLAZY_OR_NOW	0
28976fae4e5dSmrg#        endif
28986fae4e5dSmrg#      endif
28996fae4e5dSmrg#    endif
29006fae4e5dSmrg#  endif
29016fae4e5dSmrg#endif
29026fae4e5dSmrg
29036fae4e5dSmrg/* When -fvisbility=hidden is used, assume the code has been annotated
29046fae4e5dSmrg   correspondingly for the symbols needed.  */
29056fae4e5dSmrg#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
29066fae4e5dSmrgint fnord () __attribute__((visibility("default")));
29076fae4e5dSmrg#endif
29086fae4e5dSmrg
29096fae4e5dSmrgint fnord () { return 42; }
29106fae4e5dSmrgint main ()
29116fae4e5dSmrg{
29126fae4e5dSmrg  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
29136fae4e5dSmrg  int status = $lt_dlunknown;
29146fae4e5dSmrg
29156fae4e5dSmrg  if (self)
29166fae4e5dSmrg    {
29176fae4e5dSmrg      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
29186fae4e5dSmrg      else
29196fae4e5dSmrg        {
29206fae4e5dSmrg	  if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
29216fae4e5dSmrg          else puts (dlerror ());
29226fae4e5dSmrg	}
29236fae4e5dSmrg      /* dlclose (self); */
29246fae4e5dSmrg    }
29256fae4e5dSmrg  else
29266fae4e5dSmrg    puts (dlerror ());
29276fae4e5dSmrg
29286fae4e5dSmrg  return status;
29296fae4e5dSmrg}]
29309c9ff80cSmrg_LT_EOF
29316fae4e5dSmrg  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
29326fae4e5dSmrg    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
29336fae4e5dSmrg    lt_status=$?
29346fae4e5dSmrg    case x$lt_status in
29356fae4e5dSmrg      x$lt_dlno_uscore) $1 ;;
29366fae4e5dSmrg      x$lt_dlneed_uscore) $2 ;;
29376fae4e5dSmrg      x$lt_dlunknown|x*) $3 ;;
29386fae4e5dSmrg    esac
29396fae4e5dSmrg  else :
29406fae4e5dSmrg    # compilation failed
29416fae4e5dSmrg    $3
29426fae4e5dSmrg  fi
29431f0ac6a5Smrgfi
29446fae4e5dSmrgrm -fr conftest*
29456fae4e5dSmrg])# _LT_TRY_DLOPEN_SELF
29461f0ac6a5Smrg
29471f0ac6a5Smrg
29486fae4e5dSmrg# LT_SYS_DLOPEN_SELF
29496fae4e5dSmrg# ------------------
29506fae4e5dSmrgAC_DEFUN([LT_SYS_DLOPEN_SELF],
29516fae4e5dSmrg[m4_require([_LT_HEADER_DLFCN])dnl
29526fae4e5dSmrgif test "x$enable_dlopen" != xyes; then
29536fae4e5dSmrg  enable_dlopen=unknown
29546fae4e5dSmrg  enable_dlopen_self=unknown
29556fae4e5dSmrg  enable_dlopen_self_static=unknown
29566fae4e5dSmrgelse
29576fae4e5dSmrg  lt_cv_dlopen=no
29586fae4e5dSmrg  lt_cv_dlopen_libs=
29591f0ac6a5Smrg
29606fae4e5dSmrg  case $host_os in
29616fae4e5dSmrg  beos*)
29626fae4e5dSmrg    lt_cv_dlopen="load_add_on"
29636fae4e5dSmrg    lt_cv_dlopen_libs=
29646fae4e5dSmrg    lt_cv_dlopen_self=yes
29656fae4e5dSmrg    ;;
29669c9ff80cSmrg
29676fae4e5dSmrg  mingw* | pw32* | cegcc*)
29686fae4e5dSmrg    lt_cv_dlopen="LoadLibrary"
29696fae4e5dSmrg    lt_cv_dlopen_libs=
29706fae4e5dSmrg    ;;
29711f0ac6a5Smrg
29726fae4e5dSmrg  cygwin*)
29736fae4e5dSmrg    lt_cv_dlopen="dlopen"
29746fae4e5dSmrg    lt_cv_dlopen_libs=
29756fae4e5dSmrg    ;;
29761f0ac6a5Smrg
29776fae4e5dSmrg  darwin*)
29786fae4e5dSmrg  # if libdl is installed we need to link against it
29796fae4e5dSmrg    AC_CHECK_LIB([dl], [dlopen],
29806fae4e5dSmrg		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
29816fae4e5dSmrg    lt_cv_dlopen="dyld"
29826fae4e5dSmrg    lt_cv_dlopen_libs=
29836fae4e5dSmrg    lt_cv_dlopen_self=yes
29846fae4e5dSmrg    ])
29856fae4e5dSmrg    ;;
29861f0ac6a5Smrg
29876fae4e5dSmrg  *)
29886fae4e5dSmrg    AC_CHECK_FUNC([shl_load],
29896fae4e5dSmrg	  [lt_cv_dlopen="shl_load"],
29906fae4e5dSmrg      [AC_CHECK_LIB([dld], [shl_load],
29916fae4e5dSmrg	    [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
29926fae4e5dSmrg	[AC_CHECK_FUNC([dlopen],
29936fae4e5dSmrg	      [lt_cv_dlopen="dlopen"],
29946fae4e5dSmrg	  [AC_CHECK_LIB([dl], [dlopen],
29956fae4e5dSmrg		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
29966fae4e5dSmrg	    [AC_CHECK_LIB([svld], [dlopen],
29976fae4e5dSmrg		  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
29986fae4e5dSmrg	      [AC_CHECK_LIB([dld], [dld_link],
29996fae4e5dSmrg		    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
30006fae4e5dSmrg	      ])
30016fae4e5dSmrg	    ])
30026fae4e5dSmrg	  ])
30036fae4e5dSmrg	])
30046fae4e5dSmrg      ])
30056fae4e5dSmrg    ;;
30066fae4e5dSmrg  esac
30076fae4e5dSmrg
30086fae4e5dSmrg  if test "x$lt_cv_dlopen" != xno; then
30096fae4e5dSmrg    enable_dlopen=yes
30106fae4e5dSmrg  else
30116fae4e5dSmrg    enable_dlopen=no
30121f0ac6a5Smrg  fi
30131f0ac6a5Smrg
30146fae4e5dSmrg  case $lt_cv_dlopen in
30156fae4e5dSmrg  dlopen)
30166fae4e5dSmrg    save_CPPFLAGS="$CPPFLAGS"
30176fae4e5dSmrg    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
30181f0ac6a5Smrg
30196fae4e5dSmrg    save_LDFLAGS="$LDFLAGS"
30206fae4e5dSmrg    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
30211f0ac6a5Smrg
30226fae4e5dSmrg    save_LIBS="$LIBS"
30236fae4e5dSmrg    LIBS="$lt_cv_dlopen_libs $LIBS"
30241f0ac6a5Smrg
30256fae4e5dSmrg    AC_CACHE_CHECK([whether a program can dlopen itself],
30266fae4e5dSmrg	  lt_cv_dlopen_self, [dnl
30276fae4e5dSmrg	  _LT_TRY_DLOPEN_SELF(
30286fae4e5dSmrg	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
30296fae4e5dSmrg	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
30306fae4e5dSmrg    ])
30311f0ac6a5Smrg
30326fae4e5dSmrg    if test "x$lt_cv_dlopen_self" = xyes; then
30336fae4e5dSmrg      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
30346fae4e5dSmrg      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
30356fae4e5dSmrg	  lt_cv_dlopen_self_static, [dnl
30366fae4e5dSmrg	  _LT_TRY_DLOPEN_SELF(
30376fae4e5dSmrg	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
30386fae4e5dSmrg	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
30396fae4e5dSmrg      ])
30409c9ff80cSmrg    fi
30411f0ac6a5Smrg
30426fae4e5dSmrg    CPPFLAGS="$save_CPPFLAGS"
30436fae4e5dSmrg    LDFLAGS="$save_LDFLAGS"
30446fae4e5dSmrg    LIBS="$save_LIBS"
30456fae4e5dSmrg    ;;
30466fae4e5dSmrg  esac
30479c9ff80cSmrg
30486fae4e5dSmrg  case $lt_cv_dlopen_self in
30496fae4e5dSmrg  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
30506fae4e5dSmrg  *) enable_dlopen_self=unknown ;;
30516fae4e5dSmrg  esac
30521f0ac6a5Smrg
30536fae4e5dSmrg  case $lt_cv_dlopen_self_static in
30546fae4e5dSmrg  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
30556fae4e5dSmrg  *) enable_dlopen_self_static=unknown ;;
30569c9ff80cSmrg  esac
30579c9ff80cSmrgfi
30586fae4e5dSmrg_LT_DECL([dlopen_support], [enable_dlopen], [0],
30596fae4e5dSmrg	 [Whether dlopen is supported])
30606fae4e5dSmrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
30616fae4e5dSmrg	 [Whether dlopen of programs is supported])
30626fae4e5dSmrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
30636fae4e5dSmrg	 [Whether dlopen of statically linked programs is supported])
30646fae4e5dSmrg])# LT_SYS_DLOPEN_SELF
30656fae4e5dSmrg
30666fae4e5dSmrg# Old name:
30676fae4e5dSmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
30686fae4e5dSmrgdnl aclocal-1.4 backwards compatibility:
30696fae4e5dSmrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
30701f0ac6a5Smrg
30711f0ac6a5Smrg
30726fae4e5dSmrg# _LT_COMPILER_C_O([TAGNAME])
30736fae4e5dSmrg# ---------------------------
30746fae4e5dSmrg# Check to see if options -c and -o are simultaneously supported by compiler.
30756fae4e5dSmrg# This macro does not hard code the compiler like AC_PROG_CC_C_O.
30766fae4e5dSmrgm4_defun([_LT_COMPILER_C_O],
30776fae4e5dSmrg[m4_require([_LT_DECL_SED])dnl
30786fae4e5dSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
30796fae4e5dSmrgm4_require([_LT_TAG_COMPILER])dnl
30806fae4e5dSmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
30816fae4e5dSmrg  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
30826fae4e5dSmrg  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
30836fae4e5dSmrg   $RM -r conftest 2>/dev/null
30846fae4e5dSmrg   mkdir conftest
30856fae4e5dSmrg   cd conftest
30866fae4e5dSmrg   mkdir out
3087e5410a46Smrg   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
30886fae4e5dSmrg
30896fae4e5dSmrg   lt_compiler_flag="-o out/conftest2.$ac_objext"
30901f0ac6a5Smrg   # Insert the option either (1) after the last *FLAGS variable, or
30911f0ac6a5Smrg   # (2) before a word containing "conftest.", or (3) at the end.
30921f0ac6a5Smrg   # Note that $ac_compile itself does not contain backslashes and begins
30931f0ac6a5Smrg   # with a dollar sign (not a hyphen), so the echo should work correctly.
30941f0ac6a5Smrg   lt_compile=`echo "$ac_compile" | $SED \
30951f0ac6a5Smrg   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
30961f0ac6a5Smrg   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
30971f0ac6a5Smrg   -e 's:$: $lt_compiler_flag:'`
30986fae4e5dSmrg   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
30996fae4e5dSmrg   (eval "$lt_compile" 2>out/conftest.err)
31001f0ac6a5Smrg   ac_status=$?
31016fae4e5dSmrg   cat out/conftest.err >&AS_MESSAGE_LOG_FD
31026fae4e5dSmrg   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
31036fae4e5dSmrg   if (exit $ac_status) && test -s out/conftest2.$ac_objext
31046fae4e5dSmrg   then
31051f0ac6a5Smrg     # The compiler can only warn and ignore the option if not recognized
31066fae4e5dSmrg     # So say no if there are warnings
31076fae4e5dSmrg     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
31086fae4e5dSmrg     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
31096fae4e5dSmrg     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
31106fae4e5dSmrg       _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
31111f0ac6a5Smrg     fi
31121f0ac6a5Smrg   fi
31136fae4e5dSmrg   chmod u+w . 2>&AS_MESSAGE_LOG_FD
31146fae4e5dSmrg   $RM conftest*
31156fae4e5dSmrg   # SGI C++ compiler will create directory out/ii_files/ for
31166fae4e5dSmrg   # template instantiation
31176fae4e5dSmrg   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
31186fae4e5dSmrg   $RM out/* && rmdir out
31196fae4e5dSmrg   cd ..
31206fae4e5dSmrg   $RM -r conftest
31219c9ff80cSmrg   $RM conftest*
31221f0ac6a5Smrg])
31236fae4e5dSmrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
31246fae4e5dSmrg	[Does compiler simultaneously support -c and -o options?])
31256fae4e5dSmrg])# _LT_COMPILER_C_O
31261f0ac6a5Smrg
31279c9ff80cSmrg
31286fae4e5dSmrg# _LT_COMPILER_FILE_LOCKS([TAGNAME])
31296fae4e5dSmrg# ----------------------------------
31306fae4e5dSmrg# Check to see if we can do hard links to lock some files if needed
31316fae4e5dSmrgm4_defun([_LT_COMPILER_FILE_LOCKS],
31326fae4e5dSmrg[m4_require([_LT_ENABLE_LOCK])dnl
31336fae4e5dSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
31346fae4e5dSmrg_LT_COMPILER_C_O([$1])
31351f0ac6a5Smrg
31366fae4e5dSmrghard_links="nottested"
31376fae4e5dSmrgif test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
31386fae4e5dSmrg  # do not overwrite the value of need_locks provided by the user
31396fae4e5dSmrg  AC_MSG_CHECKING([if we can lock with hard links])
31406fae4e5dSmrg  hard_links=yes
31416fae4e5dSmrg  $RM conftest*
31426fae4e5dSmrg  ln conftest.a conftest.b 2>/dev/null && hard_links=no
31436fae4e5dSmrg  touch conftest.a
31446fae4e5dSmrg  ln conftest.a conftest.b 2>&5 || hard_links=no
31456fae4e5dSmrg  ln conftest.a conftest.b 2>/dev/null && hard_links=no
31466fae4e5dSmrg  AC_MSG_RESULT([$hard_links])
31476fae4e5dSmrg  if test "$hard_links" = no; then
31486fae4e5dSmrg    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
31496fae4e5dSmrg    need_locks=warn
31506fae4e5dSmrg  fi
31511f0ac6a5Smrgelse
31526fae4e5dSmrg  need_locks=no
31531f0ac6a5Smrgfi
31546fae4e5dSmrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
31556fae4e5dSmrg])# _LT_COMPILER_FILE_LOCKS
31561f0ac6a5Smrg
31571f0ac6a5Smrg
31586fae4e5dSmrg# _LT_CHECK_OBJDIR
31596fae4e5dSmrg# ----------------
31606fae4e5dSmrgm4_defun([_LT_CHECK_OBJDIR],
31616fae4e5dSmrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
31626fae4e5dSmrg[rm -f .libs 2>/dev/null
31636fae4e5dSmrgmkdir .libs 2>/dev/null
31646fae4e5dSmrgif test -d .libs; then
31656fae4e5dSmrg  lt_cv_objdir=.libs
31666fae4e5dSmrgelse
31676fae4e5dSmrg  # MS-DOS does not allow filenames that begin with a dot.
31686fae4e5dSmrg  lt_cv_objdir=_libs
31696fae4e5dSmrgfi
31706fae4e5dSmrgrmdir .libs 2>/dev/null])
31716fae4e5dSmrgobjdir=$lt_cv_objdir
31726fae4e5dSmrg_LT_DECL([], [objdir], [0],
31736fae4e5dSmrg         [The name of the directory that contains temporary libtool files])dnl
31746fae4e5dSmrgm4_pattern_allow([LT_OBJDIR])dnl
31756fae4e5dSmrgAC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
31766fae4e5dSmrg  [Define to the sub-directory in which libtool stores uninstalled libraries.])
31776fae4e5dSmrg])# _LT_CHECK_OBJDIR
31789c9ff80cSmrg
31791f0ac6a5Smrg
31806fae4e5dSmrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
31816fae4e5dSmrg# --------------------------------------
31826fae4e5dSmrg# Check hardcoding attributes.
31836fae4e5dSmrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH],
31846fae4e5dSmrg[AC_MSG_CHECKING([how to hardcode library paths into programs])
31856fae4e5dSmrg_LT_TAGVAR(hardcode_action, $1)=
31866fae4e5dSmrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
31876fae4e5dSmrg   test -n "$_LT_TAGVAR(runpath_var, $1)" ||
31886fae4e5dSmrg   test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
31891f0ac6a5Smrg
31906fae4e5dSmrg  # We can hardcode non-existent directories.
31916fae4e5dSmrg  if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
31926fae4e5dSmrg     # If the only mechanism to avoid hardcoding is shlibpath_var, we
31936fae4e5dSmrg     # have to relink, otherwise we might link with an installed library
31946fae4e5dSmrg     # when we should be linking with a yet-to-be-installed one
31956fae4e5dSmrg     ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
31966fae4e5dSmrg     test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
31976fae4e5dSmrg    # Linking always hardcodes the temporary library directory.
31986fae4e5dSmrg    _LT_TAGVAR(hardcode_action, $1)=relink
31996fae4e5dSmrg  else
32006fae4e5dSmrg    # We can link without hardcoding, and we can hardcode nonexisting dirs.
32016fae4e5dSmrg    _LT_TAGVAR(hardcode_action, $1)=immediate
32026fae4e5dSmrg  fi
32036fae4e5dSmrgelse
32046fae4e5dSmrg  # We cannot hardcode anything, or else we can only hardcode existing
32056fae4e5dSmrg  # directories.
32066fae4e5dSmrg  _LT_TAGVAR(hardcode_action, $1)=unsupported
32076fae4e5dSmrgfi
32086fae4e5dSmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
32091f0ac6a5Smrg
32106fae4e5dSmrgif test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
32116fae4e5dSmrg   test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
32126fae4e5dSmrg  # Fast installation is not supported
32136fae4e5dSmrg  enable_fast_install=no
32146fae4e5dSmrgelif test "$shlibpath_overrides_runpath" = yes ||
32156fae4e5dSmrg     test "$enable_shared" = no; then
32166fae4e5dSmrg  # Fast installation is not necessary
32176fae4e5dSmrg  enable_fast_install=needless
32186fae4e5dSmrgfi
32196fae4e5dSmrg_LT_TAGDECL([], [hardcode_action], [0],
32206fae4e5dSmrg    [How to hardcode a shared library path into an executable])
32216fae4e5dSmrg])# _LT_LINKER_HARDCODE_LIBPATH
32221f0ac6a5Smrg
32231f0ac6a5Smrg
32246fae4e5dSmrg# _LT_CMD_STRIPLIB
32256fae4e5dSmrg# ----------------
32266fae4e5dSmrgm4_defun([_LT_CMD_STRIPLIB],
32276fae4e5dSmrg[m4_require([_LT_DECL_EGREP])
32286fae4e5dSmrgstriplib=
32296fae4e5dSmrgold_striplib=
32306fae4e5dSmrgAC_MSG_CHECKING([whether stripping libraries is possible])
32316fae4e5dSmrgif test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
32326fae4e5dSmrg  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
32336fae4e5dSmrg  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
32346fae4e5dSmrg  AC_MSG_RESULT([yes])
32356fae4e5dSmrgelse
32366fae4e5dSmrg# FIXME - insert some real tests, host_os isn't really good enough
32376fae4e5dSmrg  case $host_os in
32386fae4e5dSmrg  darwin*)
32396fae4e5dSmrg    if test -n "$STRIP" ; then
32406fae4e5dSmrg      striplib="$STRIP -x"
32416fae4e5dSmrg      old_striplib="$STRIP -S"
32426fae4e5dSmrg      AC_MSG_RESULT([yes])
32431f0ac6a5Smrg    else
32446fae4e5dSmrg      AC_MSG_RESULT([no])
32451f0ac6a5Smrg    fi
32461f0ac6a5Smrg    ;;
32476fae4e5dSmrg  *)
32486fae4e5dSmrg    AC_MSG_RESULT([no])
32491f0ac6a5Smrg    ;;
32506fae4e5dSmrg  esac
32516fae4e5dSmrgfi
32526fae4e5dSmrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
32536fae4e5dSmrg_LT_DECL([], [striplib], [1])
32546fae4e5dSmrg])# _LT_CMD_STRIPLIB
32551f0ac6a5Smrg
32566fae4e5dSmrg
32576fae4e5dSmrg# _LT_SYS_DYNAMIC_LINKER([TAG])
32586fae4e5dSmrg# -----------------------------
32596fae4e5dSmrg# PORTME Fill in your ld.so characteristics
32606fae4e5dSmrgm4_defun([_LT_SYS_DYNAMIC_LINKER],
32616fae4e5dSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
32626fae4e5dSmrgm4_require([_LT_DECL_EGREP])dnl
32636fae4e5dSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
32646fae4e5dSmrgm4_require([_LT_DECL_OBJDUMP])dnl
32656fae4e5dSmrgm4_require([_LT_DECL_SED])dnl
32666fae4e5dSmrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl
32676fae4e5dSmrgAC_MSG_CHECKING([dynamic linker characteristics])
32686fae4e5dSmrgm4_if([$1],
32696fae4e5dSmrg	[], [
32706fae4e5dSmrgif test "$GCC" = yes; then
32716fae4e5dSmrg  case $host_os in
32726fae4e5dSmrg    darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
32736fae4e5dSmrg    *) lt_awk_arg="/^libraries:/" ;;
32746fae4e5dSmrg  esac
32756fae4e5dSmrg  case $host_os in
32766fae4e5dSmrg    mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;;
32776fae4e5dSmrg    *) lt_sed_strip_eq="s,=/,/,g" ;;
32786fae4e5dSmrg  esac
32796fae4e5dSmrg  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
32806fae4e5dSmrg  case $lt_search_path_spec in
32816fae4e5dSmrg  *\;*)
32826fae4e5dSmrg    # if the path contains ";" then we assume it to be the separator
32836fae4e5dSmrg    # otherwise default to the standard path separator (i.e. ":") - it is
32846fae4e5dSmrg    # assumed that no part of a normal pathname contains ";" but that should
32856fae4e5dSmrg    # okay in the real world where ";" in dirpaths is itself problematic.
32866fae4e5dSmrg    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
32871f0ac6a5Smrg    ;;
32881f0ac6a5Smrg  *)
32896fae4e5dSmrg    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
32906fae4e5dSmrg    ;;
32916fae4e5dSmrg  esac
32926fae4e5dSmrg  # Ok, now we have the path, separated by spaces, we can step through it
32936fae4e5dSmrg  # and add multilib dir if necessary.
32946fae4e5dSmrg  lt_tmp_lt_search_path_spec=
32956fae4e5dSmrg  lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
32966fae4e5dSmrg  for lt_sys_path in $lt_search_path_spec; do
32976fae4e5dSmrg    if test -d "$lt_sys_path/$lt_multi_os_dir"; then
32986fae4e5dSmrg      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
3299e5410a46Smrg    else
33006fae4e5dSmrg      test -d "$lt_sys_path" && \
33016fae4e5dSmrg	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
3302e5410a46Smrg    fi
33036fae4e5dSmrg  done
33046fae4e5dSmrg  lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
33056fae4e5dSmrgBEGIN {RS=" "; FS="/|\n";} {
33066fae4e5dSmrg  lt_foo="";
33076fae4e5dSmrg  lt_count=0;
33086fae4e5dSmrg  for (lt_i = NF; lt_i > 0; lt_i--) {
33096fae4e5dSmrg    if ($lt_i != "" && $lt_i != ".") {
33106fae4e5dSmrg      if ($lt_i == "..") {
33116fae4e5dSmrg        lt_count++;
33126fae4e5dSmrg      } else {
33136fae4e5dSmrg        if (lt_count == 0) {
33146fae4e5dSmrg          lt_foo="/" $lt_i lt_foo;
33156fae4e5dSmrg        } else {
33166fae4e5dSmrg          lt_count--;
33176fae4e5dSmrg        }
33186fae4e5dSmrg      }
33196fae4e5dSmrg    }
33206fae4e5dSmrg  }
33216fae4e5dSmrg  if (lt_foo != "") { lt_freq[[lt_foo]]++; }
33226fae4e5dSmrg  if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
33236fae4e5dSmrg}'`
33246fae4e5dSmrg  # AWK program above erroneously prepends '/' to C:/dos/paths
33256fae4e5dSmrg  # for these hosts.
33266fae4e5dSmrg  case $host_os in
33276fae4e5dSmrg    mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
33286fae4e5dSmrg      $SED 's,/\([[A-Za-z]]:\),\1,g'` ;;
33291f0ac6a5Smrg  esac
33306fae4e5dSmrg  sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
33311f0ac6a5Smrgelse
33326fae4e5dSmrg  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
33336fae4e5dSmrgfi])
33346fae4e5dSmrglibrary_names_spec=
33356fae4e5dSmrglibname_spec='lib$name'
33366fae4e5dSmrgsoname_spec=
33376fae4e5dSmrgshrext_cmds=".so"
33386fae4e5dSmrgpostinstall_cmds=
33396fae4e5dSmrgpostuninstall_cmds=
33406fae4e5dSmrgfinish_cmds=
33416fae4e5dSmrgfinish_eval=
33426fae4e5dSmrgshlibpath_var=
33436fae4e5dSmrgshlibpath_overrides_runpath=unknown
33446fae4e5dSmrgversion_type=none
33456fae4e5dSmrgdynamic_linker="$host_os ld.so"
33466fae4e5dSmrgsys_lib_dlsearch_path_spec="/lib /usr/lib"
33476fae4e5dSmrgneed_lib_prefix=unknown
33486fae4e5dSmrghardcode_into_libs=no
33491f0ac6a5Smrg
33506fae4e5dSmrg# when you set need_version to no, make sure it does not cause -set_version
33516fae4e5dSmrg# flags to be left without arguments
33526fae4e5dSmrgneed_version=unknown
33531f0ac6a5Smrg
33546fae4e5dSmrgcase $host_os in
33556fae4e5dSmrgaix3*)
33566fae4e5dSmrg  version_type=linux
33576fae4e5dSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
33586fae4e5dSmrg  shlibpath_var=LIBPATH
33591f0ac6a5Smrg
33606fae4e5dSmrg  # AIX 3 has no versioning support, so we append a major version to the name.
33616fae4e5dSmrg  soname_spec='${libname}${release}${shared_ext}$major'
33626fae4e5dSmrg  ;;
33631f0ac6a5Smrg
33646fae4e5dSmrgaix[[4-9]]*)
33656fae4e5dSmrg  version_type=linux
33666fae4e5dSmrg  need_lib_prefix=no
33676fae4e5dSmrg  need_version=no
33686fae4e5dSmrg  hardcode_into_libs=yes
33696fae4e5dSmrg  if test "$host_cpu" = ia64; then
33706fae4e5dSmrg    # AIX 5 supports IA64
33716fae4e5dSmrg    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
33726fae4e5dSmrg    shlibpath_var=LD_LIBRARY_PATH
33731f0ac6a5Smrg  else
33746fae4e5dSmrg    # With GCC up to 2.95.x, collect2 would create an import file
33756fae4e5dSmrg    # for dependence libraries.  The import file would start with
33766fae4e5dSmrg    # the line `#! .'.  This would cause the generated library to
33776fae4e5dSmrg    # depend on `.', always an invalid library.  This was fixed in
33786fae4e5dSmrg    # development snapshots of GCC prior to 3.0.
33796fae4e5dSmrg    case $host_os in
33806fae4e5dSmrg      aix4 | aix4.[[01]] | aix4.[[01]].*)
33816fae4e5dSmrg      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
33826fae4e5dSmrg	   echo ' yes '
33836fae4e5dSmrg	   echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
33846fae4e5dSmrg	:
33856fae4e5dSmrg      else
33866fae4e5dSmrg	can_build_shared=no
33876fae4e5dSmrg      fi
33886fae4e5dSmrg      ;;
33891f0ac6a5Smrg    esac
33906fae4e5dSmrg    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
33916fae4e5dSmrg    # soname into executable. Probably we can add versioning support to
33926fae4e5dSmrg    # collect2, so additional links can be useful in future.
33936fae4e5dSmrg    if test "$aix_use_runtimelinking" = yes; then
33946fae4e5dSmrg      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
33956fae4e5dSmrg      # instead of lib<name>.a to let people know that these are not
33966fae4e5dSmrg      # typical AIX shared libraries.
33976fae4e5dSmrg      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
33986fae4e5dSmrg    else
33996fae4e5dSmrg      # We preserve .a as extension for shared libraries through AIX4.2
34006fae4e5dSmrg      # and later when we are not doing run time linking.
34016fae4e5dSmrg      library_names_spec='${libname}${release}.a $libname.a'
34026fae4e5dSmrg      soname_spec='${libname}${release}${shared_ext}$major'
34036fae4e5dSmrg    fi
34046fae4e5dSmrg    shlibpath_var=LIBPATH
34051f0ac6a5Smrg  fi
34066fae4e5dSmrg  ;;
34071f0ac6a5Smrg
34086fae4e5dSmrgamigaos*)
34096fae4e5dSmrg  case $host_cpu in
34106fae4e5dSmrg  powerpc)
34116fae4e5dSmrg    # Since July 2007 AmigaOS4 officially supports .so libraries.
34126fae4e5dSmrg    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
34136fae4e5dSmrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
34146fae4e5dSmrg    ;;
34156fae4e5dSmrg  m68k)
34166fae4e5dSmrg    library_names_spec='$libname.ixlibrary $libname.a'
34176fae4e5dSmrg    # Create ${libname}_ixlibrary.a entries in /sys/libs.
34186fae4e5dSmrg    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'
34196fae4e5dSmrg    ;;
34206fae4e5dSmrg  esac
34216fae4e5dSmrg  ;;
34221f0ac6a5Smrg
34236fae4e5dSmrgbeos*)
34246fae4e5dSmrg  library_names_spec='${libname}${shared_ext}'
34256fae4e5dSmrg  dynamic_linker="$host_os ld.so"
34266fae4e5dSmrg  shlibpath_var=LIBRARY_PATH
34276fae4e5dSmrg  ;;
34281f0ac6a5Smrg
34296fae4e5dSmrgbsdi[[45]]*)
34306fae4e5dSmrg  version_type=linux
34316fae4e5dSmrg  need_version=no
34326fae4e5dSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
34336fae4e5dSmrg  soname_spec='${libname}${release}${shared_ext}$major'
34346fae4e5dSmrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
34356fae4e5dSmrg  shlibpath_var=LD_LIBRARY_PATH
34366fae4e5dSmrg  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
34376fae4e5dSmrg  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
34386fae4e5dSmrg  # the default ld.so.conf also contains /usr/contrib/lib and
34396fae4e5dSmrg  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
34406fae4e5dSmrg  # libtool to hard-code these into programs
34416fae4e5dSmrg  ;;
34421f0ac6a5Smrg
34436fae4e5dSmrgcygwin* | mingw* | pw32* | cegcc*)
34446fae4e5dSmrg  version_type=windows
34456fae4e5dSmrg  shrext_cmds=".dll"
34466fae4e5dSmrg  need_version=no
34476fae4e5dSmrg  need_lib_prefix=no
34481f0ac6a5Smrg
34496fae4e5dSmrg  case $GCC,$cc_basename in
34506fae4e5dSmrg  yes,*)
34516fae4e5dSmrg    # gcc
34526fae4e5dSmrg    library_names_spec='$libname.dll.a'
34536fae4e5dSmrg    # DLL is installed to $(libdir)/../bin by postinstall_cmds
34546fae4e5dSmrg    postinstall_cmds='base_file=`basename \${file}`~
34556fae4e5dSmrg      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
34566fae4e5dSmrg      dldir=$destdir/`dirname \$dlpath`~
34576fae4e5dSmrg      test -d \$dldir || mkdir -p \$dldir~
34586fae4e5dSmrg      $install_prog $dir/$dlname \$dldir/$dlname~
34596fae4e5dSmrg      chmod a+x \$dldir/$dlname~
34606fae4e5dSmrg      if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
34616fae4e5dSmrg        eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
34626fae4e5dSmrg      fi'
34636fae4e5dSmrg    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
34646fae4e5dSmrg      dlpath=$dir/\$dldll~
34656fae4e5dSmrg       $RM \$dlpath'
34666fae4e5dSmrg    shlibpath_overrides_runpath=yes
34671f0ac6a5Smrg
34686fae4e5dSmrg    case $host_os in
34696fae4e5dSmrg    cygwin*)
34706fae4e5dSmrg      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
34716fae4e5dSmrg      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
34726fae4e5dSmrgm4_if([$1], [],[
34736fae4e5dSmrg      sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
34746fae4e5dSmrg      ;;
34756fae4e5dSmrg    mingw* | cegcc*)
34766fae4e5dSmrg      # MinGW DLLs use traditional 'lib' prefix
34776fae4e5dSmrg      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
34786fae4e5dSmrg      ;;
34796fae4e5dSmrg    pw32*)
34806fae4e5dSmrg      # pw32 DLLs use 'pw' prefix rather than 'lib'
34816fae4e5dSmrg      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
34826fae4e5dSmrg      ;;
34836fae4e5dSmrg    esac
34846fae4e5dSmrg    dynamic_linker='Win32 ld.exe'
34856fae4e5dSmrg    ;;
34866fae4e5dSmrg
34876fae4e5dSmrg  *,cl*)
34886fae4e5dSmrg    # Native MSVC
34896fae4e5dSmrg    libname_spec='$name'
34906fae4e5dSmrg    soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
34916fae4e5dSmrg    library_names_spec='${libname}.dll.lib'
34926fae4e5dSmrg
34936fae4e5dSmrg    case $build_os in
34946fae4e5dSmrg    mingw*)
34956fae4e5dSmrg      sys_lib_search_path_spec=
34966fae4e5dSmrg      lt_save_ifs=$IFS
34976fae4e5dSmrg      IFS=';'
34986fae4e5dSmrg      for lt_path in $LIB
34996fae4e5dSmrg      do
35006fae4e5dSmrg        IFS=$lt_save_ifs
35016fae4e5dSmrg        # Let DOS variable expansion print the short 8.3 style file name.
35026fae4e5dSmrg        lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
35036fae4e5dSmrg        sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
35046fae4e5dSmrg      done
35056fae4e5dSmrg      IFS=$lt_save_ifs
35066fae4e5dSmrg      # Convert to MSYS style.
35076fae4e5dSmrg      sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
35086fae4e5dSmrg      ;;
35096fae4e5dSmrg    cygwin*)
35106fae4e5dSmrg      # Convert to unix form, then to dos form, then back to unix form
35116fae4e5dSmrg      # but this time dos style (no spaces!) so that the unix form looks
35126fae4e5dSmrg      # like /cygdrive/c/PROGRA~1:/cygdr...
35136fae4e5dSmrg      sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
35146fae4e5dSmrg      sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
35156fae4e5dSmrg      sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
35166fae4e5dSmrg      ;;
35176fae4e5dSmrg    *)
35186fae4e5dSmrg      sys_lib_search_path_spec="$LIB"
35196fae4e5dSmrg      if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
35206fae4e5dSmrg        # It is most probably a Windows format PATH.
35216fae4e5dSmrg        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
35226fae4e5dSmrg      else
35236fae4e5dSmrg        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
35246fae4e5dSmrg      fi
35256fae4e5dSmrg      # FIXME: find the short name or the path components, as spaces are
35266fae4e5dSmrg      # common. (e.g. "Program Files" -> "PROGRA~1")
35276fae4e5dSmrg      ;;
35286fae4e5dSmrg    esac
35296fae4e5dSmrg
35306fae4e5dSmrg    # DLL is installed to $(libdir)/../bin by postinstall_cmds
35316fae4e5dSmrg    postinstall_cmds='base_file=`basename \${file}`~
35326fae4e5dSmrg      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
35336fae4e5dSmrg      dldir=$destdir/`dirname \$dlpath`~
35346fae4e5dSmrg      test -d \$dldir || mkdir -p \$dldir~
35356fae4e5dSmrg      $install_prog $dir/$dlname \$dldir/$dlname'
35366fae4e5dSmrg    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
35376fae4e5dSmrg      dlpath=$dir/\$dldll~
35386fae4e5dSmrg       $RM \$dlpath'
35396fae4e5dSmrg    shlibpath_overrides_runpath=yes
35406fae4e5dSmrg    dynamic_linker='Win32 link.exe'
35419c9ff80cSmrg    ;;
35421f0ac6a5Smrg
35431f0ac6a5Smrg  *)
35446fae4e5dSmrg    # Assume MSVC wrapper
35456fae4e5dSmrg    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
35466fae4e5dSmrg    dynamic_linker='Win32 ld.exe'
35471f0ac6a5Smrg    ;;
35481f0ac6a5Smrg  esac
35496fae4e5dSmrg  # FIXME: first we should search . and the directory the executable is in
35506fae4e5dSmrg  shlibpath_var=PATH
35516fae4e5dSmrg  ;;
35521f0ac6a5Smrg
35536fae4e5dSmrgdarwin* | rhapsody*)
35546fae4e5dSmrg  dynamic_linker="$host_os dyld"
35556fae4e5dSmrg  version_type=darwin
35566fae4e5dSmrg  need_lib_prefix=no
35576fae4e5dSmrg  need_version=no
35586fae4e5dSmrg  library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
35596fae4e5dSmrg  soname_spec='${libname}${release}${major}$shared_ext'
35606fae4e5dSmrg  shlibpath_overrides_runpath=yes
35616fae4e5dSmrg  shlibpath_var=DYLD_LIBRARY_PATH
35626fae4e5dSmrg  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
35636fae4e5dSmrgm4_if([$1], [],[
35646fae4e5dSmrg  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
35656fae4e5dSmrg  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
35666fae4e5dSmrg  ;;
35671f0ac6a5Smrg
35686fae4e5dSmrgdgux*)
35696fae4e5dSmrg  version_type=linux
35706fae4e5dSmrg  need_lib_prefix=no
35716fae4e5dSmrg  need_version=no
35726fae4e5dSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
35736fae4e5dSmrg  soname_spec='${libname}${release}${shared_ext}$major'
35746fae4e5dSmrg  shlibpath_var=LD_LIBRARY_PATH
35756fae4e5dSmrg  ;;
35761f0ac6a5Smrg
35776fae4e5dSmrgfreebsd1*)
35786fae4e5dSmrg  dynamic_linker=no
35796fae4e5dSmrg  ;;
35801f0ac6a5Smrg
35816fae4e5dSmrgfreebsd* | dragonfly*)
35826fae4e5dSmrg  # DragonFly does not have aout.  When/if they implement a new
35836fae4e5dSmrg  # versioning mechanism, adjust this.
35846fae4e5dSmrg  if test -x /usr/bin/objformat; then
35856fae4e5dSmrg    objformat=`/usr/bin/objformat`
35866fae4e5dSmrg  else
35876fae4e5dSmrg    case $host_os in
35886fae4e5dSmrg    freebsd[[123]]*) objformat=aout ;;
35896fae4e5dSmrg    *) objformat=elf ;;
35906fae4e5dSmrg    esac
35916fae4e5dSmrg  fi
35926fae4e5dSmrg  version_type=freebsd-$objformat
35936fae4e5dSmrg  case $version_type in
35946fae4e5dSmrg    freebsd-elf*)
35956fae4e5dSmrg      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
35966fae4e5dSmrg      need_version=no
35976fae4e5dSmrg      need_lib_prefix=no
35986fae4e5dSmrg      ;;
35996fae4e5dSmrg    freebsd-*)
36006fae4e5dSmrg      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
36016fae4e5dSmrg      need_version=yes
36026fae4e5dSmrg      ;;
36036fae4e5dSmrg  esac
36046fae4e5dSmrg  shlibpath_var=LD_LIBRARY_PATH
36056fae4e5dSmrg  case $host_os in
36066fae4e5dSmrg  freebsd2*)
36076fae4e5dSmrg    shlibpath_overrides_runpath=yes
36086fae4e5dSmrg    ;;
36096fae4e5dSmrg  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
36106fae4e5dSmrg    shlibpath_overrides_runpath=yes
36116fae4e5dSmrg    hardcode_into_libs=yes
36126fae4e5dSmrg    ;;
36136fae4e5dSmrg  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
36146fae4e5dSmrg  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
36156fae4e5dSmrg    shlibpath_overrides_runpath=no
36166fae4e5dSmrg    hardcode_into_libs=yes
36176fae4e5dSmrg    ;;
36186fae4e5dSmrg  *) # from 4.6 on, and DragonFly
36196fae4e5dSmrg    shlibpath_overrides_runpath=yes
36206fae4e5dSmrg    hardcode_into_libs=yes
36216fae4e5dSmrg    ;;
36226fae4e5dSmrg  esac
36236fae4e5dSmrg  ;;
36241f0ac6a5Smrg
36256fae4e5dSmrggnu*)
36266fae4e5dSmrg  version_type=linux
36276fae4e5dSmrg  need_lib_prefix=no
36286fae4e5dSmrg  need_version=no
36296fae4e5dSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
36306fae4e5dSmrg  soname_spec='${libname}${release}${shared_ext}$major'
36316fae4e5dSmrg  shlibpath_var=LD_LIBRARY_PATH
36326fae4e5dSmrg  hardcode_into_libs=yes
36336fae4e5dSmrg  ;;
36341f0ac6a5Smrg
36356fae4e5dSmrghaiku*)
36366fae4e5dSmrg  version_type=linux
36376fae4e5dSmrg  need_lib_prefix=no
36386fae4e5dSmrg  need_version=no
36396fae4e5dSmrg  dynamic_linker="$host_os runtime_loader"
36406fae4e5dSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
36416fae4e5dSmrg  soname_spec='${libname}${release}${shared_ext}$major'
36426fae4e5dSmrg  shlibpath_var=LIBRARY_PATH
36436fae4e5dSmrg  shlibpath_overrides_runpath=yes
36446fae4e5dSmrg  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
36456fae4e5dSmrg  hardcode_into_libs=yes
36466fae4e5dSmrg  ;;
36471f0ac6a5Smrg
36486fae4e5dSmrghpux9* | hpux10* | hpux11*)
36496fae4e5dSmrg  # Give a soname corresponding to the major version so that dld.sl refuses to
36506fae4e5dSmrg  # link against other versions.
36516fae4e5dSmrg  version_type=sunos
36526fae4e5dSmrg  need_lib_prefix=no
36536fae4e5dSmrg  need_version=no
36546fae4e5dSmrg  case $host_cpu in
36556fae4e5dSmrg  ia64*)
36566fae4e5dSmrg    shrext_cmds='.so'
36576fae4e5dSmrg    hardcode_into_libs=yes
36586fae4e5dSmrg    dynamic_linker="$host_os dld.so"
36596fae4e5dSmrg    shlibpath_var=LD_LIBRARY_PATH
36606fae4e5dSmrg    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
36616fae4e5dSmrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
36626fae4e5dSmrg    soname_spec='${libname}${release}${shared_ext}$major'
36636fae4e5dSmrg    if test "X$HPUX_IA64_MODE" = X32; then
36646fae4e5dSmrg      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
36656fae4e5dSmrg    else
36666fae4e5dSmrg      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
36676fae4e5dSmrg    fi
36686fae4e5dSmrg    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
36696fae4e5dSmrg    ;;
36706fae4e5dSmrg  hppa*64*)
36716fae4e5dSmrg    shrext_cmds='.sl'
36726fae4e5dSmrg    hardcode_into_libs=yes
36736fae4e5dSmrg    dynamic_linker="$host_os dld.sl"
36746fae4e5dSmrg    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
36756fae4e5dSmrg    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
36766fae4e5dSmrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
36776fae4e5dSmrg    soname_spec='${libname}${release}${shared_ext}$major'
36786fae4e5dSmrg    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
36796fae4e5dSmrg    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
36806fae4e5dSmrg    ;;
36816fae4e5dSmrg  *)
36826fae4e5dSmrg    shrext_cmds='.sl'
36836fae4e5dSmrg    dynamic_linker="$host_os dld.sl"
36846fae4e5dSmrg    shlibpath_var=SHLIB_PATH
36856fae4e5dSmrg    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
36866fae4e5dSmrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
36876fae4e5dSmrg    soname_spec='${libname}${release}${shared_ext}$major'
36881f0ac6a5Smrg    ;;
36891f0ac6a5Smrg  esac
36906fae4e5dSmrg  # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
36916fae4e5dSmrg  postinstall_cmds='chmod 555 $lib'
36926fae4e5dSmrg  # or fails outright, so override atomically:
36936fae4e5dSmrg  install_override_mode=555
36946fae4e5dSmrg  ;;
36951f0ac6a5Smrg
36966fae4e5dSmrginterix[[3-9]]*)
36976fae4e5dSmrg  version_type=linux
36986fae4e5dSmrg  need_lib_prefix=no
36996fae4e5dSmrg  need_version=no
37006fae4e5dSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
37016fae4e5dSmrg  soname_spec='${libname}${release}${shared_ext}$major'
37026fae4e5dSmrg  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
37036fae4e5dSmrg  shlibpath_var=LD_LIBRARY_PATH
37046fae4e5dSmrg  shlibpath_overrides_runpath=no
37056fae4e5dSmrg  hardcode_into_libs=yes
37066fae4e5dSmrg  ;;
37071f0ac6a5Smrg
37086fae4e5dSmrgirix5* | irix6* | nonstopux*)
37096fae4e5dSmrg  case $host_os in
37106fae4e5dSmrg    nonstopux*) version_type=nonstopux ;;
37116fae4e5dSmrg    *)
37126fae4e5dSmrg	if test "$lt_cv_prog_gnu_ld" = yes; then
37136fae4e5dSmrg		version_type=linux
37146fae4e5dSmrg	else
37156fae4e5dSmrg		version_type=irix
37166fae4e5dSmrg	fi ;;
37171f0ac6a5Smrg  esac
37186fae4e5dSmrg  need_lib_prefix=no
37196fae4e5dSmrg  need_version=no
37206fae4e5dSmrg  soname_spec='${libname}${release}${shared_ext}$major'
37216fae4e5dSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
37226fae4e5dSmrg  case $host_os in
37236fae4e5dSmrg  irix5* | nonstopux*)
37246fae4e5dSmrg    libsuff= shlibsuff=
37256fae4e5dSmrg    ;;
37266fae4e5dSmrg  *)
37276fae4e5dSmrg    case $LD in # libtool.m4 will add one of these switches to LD
37286fae4e5dSmrg    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
37296fae4e5dSmrg      libsuff= shlibsuff= libmagic=32-bit;;
37306fae4e5dSmrg    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
37316fae4e5dSmrg      libsuff=32 shlibsuff=N32 libmagic=N32;;
37326fae4e5dSmrg    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
37336fae4e5dSmrg      libsuff=64 shlibsuff=64 libmagic=64-bit;;
37346fae4e5dSmrg    *) libsuff= shlibsuff= libmagic=never-match;;
37356fae4e5dSmrg    esac
37366fae4e5dSmrg    ;;
37376fae4e5dSmrg  esac
37386fae4e5dSmrg  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
37396fae4e5dSmrg  shlibpath_overrides_runpath=no
37406fae4e5dSmrg  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
37416fae4e5dSmrg  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
37426fae4e5dSmrg  hardcode_into_libs=yes
37436fae4e5dSmrg  ;;
37441f0ac6a5Smrg
37456fae4e5dSmrg# No shared lib support for Linux oldld, aout, or coff.
37466fae4e5dSmrglinux*oldld* | linux*aout* | linux*coff*)
37476fae4e5dSmrg  dynamic_linker=no
37486fae4e5dSmrg  ;;
37491f0ac6a5Smrg
37506fae4e5dSmrg# This must be Linux ELF.
37516fae4e5dSmrglinux* | k*bsd*-gnu | kopensolaris*-gnu)
37526fae4e5dSmrg  version_type=linux
37536fae4e5dSmrg  need_lib_prefix=no
37546fae4e5dSmrg  need_version=no
37556fae4e5dSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
37566fae4e5dSmrg  soname_spec='${libname}${release}${shared_ext}$major'
37576fae4e5dSmrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
37586fae4e5dSmrg  shlibpath_var=LD_LIBRARY_PATH
37596fae4e5dSmrg  shlibpath_overrides_runpath=no
37601f0ac6a5Smrg
37616fae4e5dSmrg  # Some binutils ld are patched to set DT_RUNPATH
37626fae4e5dSmrg  AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
37636fae4e5dSmrg    [lt_cv_shlibpath_overrides_runpath=no
37646fae4e5dSmrg    save_LDFLAGS=$LDFLAGS
37656fae4e5dSmrg    save_libdir=$libdir
37666fae4e5dSmrg    eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
37676fae4e5dSmrg	 LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
37686fae4e5dSmrg    AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
37696fae4e5dSmrg      [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
37706fae4e5dSmrg	 [lt_cv_shlibpath_overrides_runpath=yes])])
37716fae4e5dSmrg    LDFLAGS=$save_LDFLAGS
37726fae4e5dSmrg    libdir=$save_libdir
37736fae4e5dSmrg    ])
37746fae4e5dSmrg  shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
37751f0ac6a5Smrg
37766fae4e5dSmrg  # This implies no fast_install, which is unacceptable.
37776fae4e5dSmrg  # Some rework will be needed to allow for fast_install
37786fae4e5dSmrg  # before this can be enabled.
37796fae4e5dSmrg  hardcode_into_libs=yes
37806fae4e5dSmrg
37816fae4e5dSmrg  # Append ld.so.conf contents to the search path
37826fae4e5dSmrg  if test -f /etc/ld.so.conf; then
37836fae4e5dSmrg    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' ' '`
37846fae4e5dSmrg    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
37851f0ac6a5Smrg  fi
37861f0ac6a5Smrg
37876fae4e5dSmrg  # We used to test for /lib/ld.so.1 and disable shared libraries on
37886fae4e5dSmrg  # powerpc, because MkLinux only supported shared libraries with the
37896fae4e5dSmrg  # GNU dynamic linker.  Since this was broken with cross compilers,
37906fae4e5dSmrg  # most powerpc-linux boxes support dynamic linking these days and
37916fae4e5dSmrg  # people can always --disable-shared, the test was removed, and we
37926fae4e5dSmrg  # assume the GNU/Linux dynamic linker is in use.
37936fae4e5dSmrg  dynamic_linker='GNU/Linux ld.so'
37946fae4e5dSmrg  ;;
37951f0ac6a5Smrg
37966fae4e5dSmrgnetbsd*)
37976fae4e5dSmrg  version_type=sunos
37986fae4e5dSmrg  need_lib_prefix=no
37996fae4e5dSmrg  need_version=no
38006fae4e5dSmrg  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
38016fae4e5dSmrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
38026fae4e5dSmrg    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
38036fae4e5dSmrg    dynamic_linker='NetBSD (a.out) ld.so'
38046fae4e5dSmrg  else
38056fae4e5dSmrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
38066fae4e5dSmrg    soname_spec='${libname}${release}${shared_ext}$major'
38076fae4e5dSmrg    dynamic_linker='NetBSD ld.elf_so'
38086fae4e5dSmrg  fi
38096fae4e5dSmrg  shlibpath_var=LD_LIBRARY_PATH
38106fae4e5dSmrg  shlibpath_overrides_runpath=yes
38116fae4e5dSmrg  hardcode_into_libs=yes
38126fae4e5dSmrg  ;;
38131f0ac6a5Smrg
38146fae4e5dSmrgnewsos6)
38156fae4e5dSmrg  version_type=linux
38166fae4e5dSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
38176fae4e5dSmrg  shlibpath_var=LD_LIBRARY_PATH
38186fae4e5dSmrg  shlibpath_overrides_runpath=yes
38196fae4e5dSmrg  ;;
38201f0ac6a5Smrg
38216fae4e5dSmrg*nto* | *qnx*)
38226fae4e5dSmrg  version_type=qnx
38236fae4e5dSmrg  need_lib_prefix=no
38246fae4e5dSmrg  need_version=no
38256fae4e5dSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
38266fae4e5dSmrg  soname_spec='${libname}${release}${shared_ext}$major'
38276fae4e5dSmrg  shlibpath_var=LD_LIBRARY_PATH
38286fae4e5dSmrg  shlibpath_overrides_runpath=no
38296fae4e5dSmrg  hardcode_into_libs=yes
38306fae4e5dSmrg  dynamic_linker='ldqnx.so'
38316fae4e5dSmrg  ;;
38321f0ac6a5Smrg
38336fae4e5dSmrgopenbsd*)
38346fae4e5dSmrg  version_type=sunos
38356fae4e5dSmrg  sys_lib_dlsearch_path_spec="/usr/lib"
38366fae4e5dSmrg  need_lib_prefix=no
38376fae4e5dSmrg  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
38386fae4e5dSmrg  case $host_os in
38396fae4e5dSmrg    openbsd3.3 | openbsd3.3.*)	need_version=yes ;;
38406fae4e5dSmrg    *)				need_version=no  ;;
38416fae4e5dSmrg  esac
38426fae4e5dSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
38436fae4e5dSmrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
38446fae4e5dSmrg  shlibpath_var=LD_LIBRARY_PATH
38456fae4e5dSmrg  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
38466fae4e5dSmrg    case $host_os in
38476fae4e5dSmrg      openbsd2.[[89]] | openbsd2.[[89]].*)
38486fae4e5dSmrg	shlibpath_overrides_runpath=no
38496fae4e5dSmrg	;;
38506fae4e5dSmrg      *)
38516fae4e5dSmrg	shlibpath_overrides_runpath=yes
38526fae4e5dSmrg	;;
38536fae4e5dSmrg      esac
38541f0ac6a5Smrg  else
38556fae4e5dSmrg    shlibpath_overrides_runpath=yes
38561f0ac6a5Smrg  fi
38576fae4e5dSmrg  ;;
38581f0ac6a5Smrg
38596fae4e5dSmrgos2*)
38606fae4e5dSmrg  libname_spec='$name'
38616fae4e5dSmrg  shrext_cmds=".dll"
38626fae4e5dSmrg  need_lib_prefix=no
38636fae4e5dSmrg  library_names_spec='$libname${shared_ext} $libname.a'
38646fae4e5dSmrg  dynamic_linker='OS/2 ld.exe'
38656fae4e5dSmrg  shlibpath_var=LIBPATH
38666fae4e5dSmrg  ;;
38671f0ac6a5Smrg
38686fae4e5dSmrgosf3* | osf4* | osf5*)
38696fae4e5dSmrg  version_type=osf
38706fae4e5dSmrg  need_lib_prefix=no
38716fae4e5dSmrg  need_version=no
38726fae4e5dSmrg  soname_spec='${libname}${release}${shared_ext}$major'
38736fae4e5dSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
38746fae4e5dSmrg  shlibpath_var=LD_LIBRARY_PATH
38756fae4e5dSmrg  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
38766fae4e5dSmrg  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
38776fae4e5dSmrg  ;;
38781f0ac6a5Smrg
38796fae4e5dSmrgrdos*)
38806fae4e5dSmrg  dynamic_linker=no
38816fae4e5dSmrg  ;;
38821f0ac6a5Smrg
38836fae4e5dSmrgsolaris*)
38846fae4e5dSmrg  version_type=linux
38856fae4e5dSmrg  need_lib_prefix=no
38866fae4e5dSmrg  need_version=no
38876fae4e5dSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
38886fae4e5dSmrg  soname_spec='${libname}${release}${shared_ext}$major'
38896fae4e5dSmrg  shlibpath_var=LD_LIBRARY_PATH
38906fae4e5dSmrg  shlibpath_overrides_runpath=yes
38916fae4e5dSmrg  hardcode_into_libs=yes
38926fae4e5dSmrg  # ldd complains unless libraries are executable
38936fae4e5dSmrg  postinstall_cmds='chmod +x $lib'
38946fae4e5dSmrg  ;;
38951f0ac6a5Smrg
38966fae4e5dSmrgsunos4*)
38976fae4e5dSmrg  version_type=sunos
38986fae4e5dSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
38996fae4e5dSmrg  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
39006fae4e5dSmrg  shlibpath_var=LD_LIBRARY_PATH
39016fae4e5dSmrg  shlibpath_overrides_runpath=yes
39026fae4e5dSmrg  if test "$with_gnu_ld" = yes; then
39036fae4e5dSmrg    need_lib_prefix=no
39041f0ac6a5Smrg  fi
39056fae4e5dSmrg  need_version=yes
39066fae4e5dSmrg  ;;
39071f0ac6a5Smrg
39086fae4e5dSmrgsysv4 | sysv4.3*)
39091f0ac6a5Smrg  version_type=linux
39106fae4e5dSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
39111f0ac6a5Smrg  soname_spec='${libname}${release}${shared_ext}$major'
39126fae4e5dSmrg  shlibpath_var=LD_LIBRARY_PATH
39136fae4e5dSmrg  case $host_vendor in
39146fae4e5dSmrg    sni)
39156fae4e5dSmrg      shlibpath_overrides_runpath=no
39166fae4e5dSmrg      need_lib_prefix=no
39176fae4e5dSmrg      runpath_var=LD_RUN_PATH
39186fae4e5dSmrg      ;;
39196fae4e5dSmrg    siemens)
39206fae4e5dSmrg      need_lib_prefix=no
39216fae4e5dSmrg      ;;
39226fae4e5dSmrg    motorola)
39236fae4e5dSmrg      need_lib_prefix=no
39246fae4e5dSmrg      need_version=no
39256fae4e5dSmrg      shlibpath_overrides_runpath=no
39266fae4e5dSmrg      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
39276fae4e5dSmrg      ;;
39286fae4e5dSmrg  esac
39291f0ac6a5Smrg  ;;
39301f0ac6a5Smrg
39316fae4e5dSmrgsysv4*MP*)
39326fae4e5dSmrg  if test -d /usr/nec ;then
39336fae4e5dSmrg    version_type=linux
39346fae4e5dSmrg    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
39356fae4e5dSmrg    soname_spec='$libname${shared_ext}.$major'
39366fae4e5dSmrg    shlibpath_var=LD_LIBRARY_PATH
39376fae4e5dSmrg  fi
39386fae4e5dSmrg  ;;
39396fae4e5dSmrg
39406fae4e5dSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
39416fae4e5dSmrg  version_type=freebsd-elf
39421f0ac6a5Smrg  need_lib_prefix=no
39431f0ac6a5Smrg  need_version=no
39446fae4e5dSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
39456fae4e5dSmrg  soname_spec='${libname}${release}${shared_ext}$major'
39466fae4e5dSmrg  shlibpath_var=LD_LIBRARY_PATH
39476fae4e5dSmrg  shlibpath_overrides_runpath=yes
39481f0ac6a5Smrg  hardcode_into_libs=yes
39496fae4e5dSmrg  if test "$with_gnu_ld" = yes; then
39506fae4e5dSmrg    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
39511f0ac6a5Smrg  else
39526fae4e5dSmrg    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
39531f0ac6a5Smrg    case $host_os in
39546fae4e5dSmrg      sco3.2v5*)
39556fae4e5dSmrg        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
39566fae4e5dSmrg	;;
39571f0ac6a5Smrg    esac
39581f0ac6a5Smrg  fi
39596fae4e5dSmrg  sys_lib_dlsearch_path_spec='/usr/lib'
39601f0ac6a5Smrg  ;;
39611f0ac6a5Smrg
39626fae4e5dSmrgtpf*)
39636fae4e5dSmrg  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
39646fae4e5dSmrg  version_type=linux
39656fae4e5dSmrg  need_lib_prefix=no
39666fae4e5dSmrg  need_version=no
39676fae4e5dSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
39686fae4e5dSmrg  shlibpath_var=LD_LIBRARY_PATH
39696fae4e5dSmrg  shlibpath_overrides_runpath=no
39706fae4e5dSmrg  hardcode_into_libs=yes
39711f0ac6a5Smrg  ;;
39721f0ac6a5Smrg
39736fae4e5dSmrguts4*)
39741f0ac6a5Smrg  version_type=linux
39751f0ac6a5Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
39761f0ac6a5Smrg  soname_spec='${libname}${release}${shared_ext}$major'
39771f0ac6a5Smrg  shlibpath_var=LD_LIBRARY_PATH
39781f0ac6a5Smrg  ;;
39791f0ac6a5Smrg
39806fae4e5dSmrg*)
39816fae4e5dSmrg  dynamic_linker=no
39826fae4e5dSmrg  ;;
39836fae4e5dSmrgesac
39846fae4e5dSmrgAC_MSG_RESULT([$dynamic_linker])
39856fae4e5dSmrgtest "$dynamic_linker" = no && can_build_shared=no
39861f0ac6a5Smrg
39876fae4e5dSmrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var"
39886fae4e5dSmrgif test "$GCC" = yes; then
39896fae4e5dSmrg  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
39906fae4e5dSmrgfi
39911f0ac6a5Smrg
39926fae4e5dSmrgif test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
39936fae4e5dSmrg  sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
39946fae4e5dSmrgfi
39956fae4e5dSmrgif test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
39966fae4e5dSmrg  sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
39976fae4e5dSmrgfi
39981f0ac6a5Smrg
39996fae4e5dSmrg_LT_DECL([], [variables_saved_for_relink], [1],
40006fae4e5dSmrg    [Variables whose values should be saved in libtool wrapper scripts and
40016fae4e5dSmrg    restored at link time])
40026fae4e5dSmrg_LT_DECL([], [need_lib_prefix], [0],
40036fae4e5dSmrg    [Do we need the "lib" prefix for modules?])
40046fae4e5dSmrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
40056fae4e5dSmrg_LT_DECL([], [version_type], [0], [Library versioning type])
40066fae4e5dSmrg_LT_DECL([], [runpath_var], [0],  [Shared library runtime path variable])
40076fae4e5dSmrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
40086fae4e5dSmrg_LT_DECL([], [shlibpath_overrides_runpath], [0],
40096fae4e5dSmrg    [Is shlibpath searched before the hard-coded library search path?])
40106fae4e5dSmrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix])
40116fae4e5dSmrg_LT_DECL([], [library_names_spec], [1],
40126fae4e5dSmrg    [[List of archive names.  First name is the real one, the rest are links.
40136fae4e5dSmrg    The last name is the one that the linker finds with -lNAME]])
40146fae4e5dSmrg_LT_DECL([], [soname_spec], [1],
40156fae4e5dSmrg    [[The coded name of the library, if different from the real name]])
40166fae4e5dSmrg_LT_DECL([], [install_override_mode], [1],
40176fae4e5dSmrg    [Permission mode override for installation of shared libraries])
40186fae4e5dSmrg_LT_DECL([], [postinstall_cmds], [2],
40196fae4e5dSmrg    [Command to use after installation of a shared archive])
40206fae4e5dSmrg_LT_DECL([], [postuninstall_cmds], [2],
40216fae4e5dSmrg    [Command to use after uninstallation of a shared archive])
40226fae4e5dSmrg_LT_DECL([], [finish_cmds], [2],
40236fae4e5dSmrg    [Commands used to finish a libtool library installation in a directory])
40246fae4e5dSmrg_LT_DECL([], [finish_eval], [1],
40256fae4e5dSmrg    [[As "finish_cmds", except a single script fragment to be evaled but
40266fae4e5dSmrg    not shown]])
40276fae4e5dSmrg_LT_DECL([], [hardcode_into_libs], [0],
40286fae4e5dSmrg    [Whether we should hardcode library paths into libraries])
40296fae4e5dSmrg_LT_DECL([], [sys_lib_search_path_spec], [2],
40306fae4e5dSmrg    [Compile-time system search path for libraries])
40316fae4e5dSmrg_LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
40326fae4e5dSmrg    [Run-time system search path for libraries])
40336fae4e5dSmrg])# _LT_SYS_DYNAMIC_LINKER
40341f0ac6a5Smrg
40356fae4e5dSmrg
40366fae4e5dSmrg# _LT_PATH_TOOL_PREFIX(TOOL)
40376fae4e5dSmrg# --------------------------
40386fae4e5dSmrg# find a file program which can recognize shared library
40396fae4e5dSmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX],
40406fae4e5dSmrg[m4_require([_LT_DECL_EGREP])dnl
40416fae4e5dSmrgAC_MSG_CHECKING([for $1])
40426fae4e5dSmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
40436fae4e5dSmrg[case $MAGIC_CMD in
40446fae4e5dSmrg[[\\/*] |  ?:[\\/]*])
40456fae4e5dSmrg  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
40461f0ac6a5Smrg  ;;
40476fae4e5dSmrg*)
40486fae4e5dSmrg  lt_save_MAGIC_CMD="$MAGIC_CMD"
40496fae4e5dSmrg  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
40506fae4e5dSmrgdnl $ac_dummy forces splitting on constant user-supplied paths.
40516fae4e5dSmrgdnl POSIX.2 word splitting is done only on the output of word expansions,
40526fae4e5dSmrgdnl not every word.  This closes a longstanding sh security hole.
40536fae4e5dSmrg  ac_dummy="m4_if([$2], , $PATH, [$2])"
40546fae4e5dSmrg  for ac_dir in $ac_dummy; do
40556fae4e5dSmrg    IFS="$lt_save_ifs"
40566fae4e5dSmrg    test -z "$ac_dir" && ac_dir=.
40576fae4e5dSmrg    if test -f $ac_dir/$1; then
40586fae4e5dSmrg      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
40596fae4e5dSmrg      if test -n "$file_magic_test_file"; then
40606fae4e5dSmrg	case $deplibs_check_method in
40616fae4e5dSmrg	"file_magic "*)
40626fae4e5dSmrg	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
40636fae4e5dSmrg	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
40646fae4e5dSmrg	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
40656fae4e5dSmrg	    $EGREP "$file_magic_regex" > /dev/null; then
40666fae4e5dSmrg	    :
40676fae4e5dSmrg	  else
40686fae4e5dSmrg	    cat <<_LT_EOF 1>&2
40691f0ac6a5Smrg
40706fae4e5dSmrg*** Warning: the command libtool uses to detect shared libraries,
40716fae4e5dSmrg*** $file_magic_cmd, produces output that libtool cannot recognize.
40726fae4e5dSmrg*** The result is that libtool may fail to recognize shared libraries
40736fae4e5dSmrg*** as such.  This will affect the creation of libtool libraries that
40746fae4e5dSmrg*** depend on shared libraries, but programs linked with such libtool
40756fae4e5dSmrg*** libraries will work regardless of this problem.  Nevertheless, you
40766fae4e5dSmrg*** may want to report the problem to your system manager and/or to
40776fae4e5dSmrg*** bug-libtool@gnu.org
40786fae4e5dSmrg
40796fae4e5dSmrg_LT_EOF
40806fae4e5dSmrg	  fi ;;
40816fae4e5dSmrg	esac
40826fae4e5dSmrg      fi
40836fae4e5dSmrg      break
40846fae4e5dSmrg    fi
40856fae4e5dSmrg  done
40866fae4e5dSmrg  IFS="$lt_save_ifs"
40876fae4e5dSmrg  MAGIC_CMD="$lt_save_MAGIC_CMD"
40881f0ac6a5Smrg  ;;
40896fae4e5dSmrgesac])
40906fae4e5dSmrgMAGIC_CMD="$lt_cv_path_MAGIC_CMD"
40916fae4e5dSmrgif test -n "$MAGIC_CMD"; then
40926fae4e5dSmrg  AC_MSG_RESULT($MAGIC_CMD)
40936fae4e5dSmrgelse
40946fae4e5dSmrg  AC_MSG_RESULT(no)
40956fae4e5dSmrgfi
40966fae4e5dSmrg_LT_DECL([], [MAGIC_CMD], [0],
40976fae4e5dSmrg	 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
40986fae4e5dSmrg])# _LT_PATH_TOOL_PREFIX
40991f0ac6a5Smrg
41006fae4e5dSmrg# Old name:
41016fae4e5dSmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
41026fae4e5dSmrgdnl aclocal-1.4 backwards compatibility:
41036fae4e5dSmrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
41046fae4e5dSmrg
41056fae4e5dSmrg
41066fae4e5dSmrg# _LT_PATH_MAGIC
41076fae4e5dSmrg# --------------
41086fae4e5dSmrg# find a file program which can recognize a shared library
41096fae4e5dSmrgm4_defun([_LT_PATH_MAGIC],
41106fae4e5dSmrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
41116fae4e5dSmrgif test -z "$lt_cv_path_MAGIC_CMD"; then
41126fae4e5dSmrg  if test -n "$ac_tool_prefix"; then
41136fae4e5dSmrg    _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
41141f0ac6a5Smrg  else
41156fae4e5dSmrg    MAGIC_CMD=:
41161f0ac6a5Smrg  fi
41176fae4e5dSmrgfi
41186fae4e5dSmrg])# _LT_PATH_MAGIC
41191f0ac6a5Smrg
41201f0ac6a5Smrg
41216fae4e5dSmrg# LT_PATH_LD
41226fae4e5dSmrg# ----------
41236fae4e5dSmrg# find the pathname to the GNU or non-GNU linker
41246fae4e5dSmrgAC_DEFUN([LT_PATH_LD],
41256fae4e5dSmrg[AC_REQUIRE([AC_PROG_CC])dnl
41266fae4e5dSmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl
41276fae4e5dSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl
41286fae4e5dSmrgm4_require([_LT_DECL_SED])dnl
41296fae4e5dSmrgm4_require([_LT_DECL_EGREP])dnl
41306fae4e5dSmrgm4_require([_LT_PROG_ECHO_BACKSLASH])dnl
41311f0ac6a5Smrg
41326fae4e5dSmrgAC_ARG_WITH([gnu-ld],
41336fae4e5dSmrg    [AS_HELP_STRING([--with-gnu-ld],
41346fae4e5dSmrg	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
41356fae4e5dSmrg    [test "$withval" = no || with_gnu_ld=yes],
41366fae4e5dSmrg    [with_gnu_ld=no])dnl
41371f0ac6a5Smrg
41386fae4e5dSmrgac_prog=ld
41396fae4e5dSmrgif test "$GCC" = yes; then
41406fae4e5dSmrg  # Check if gcc -print-prog-name=ld gives a path.
41416fae4e5dSmrg  AC_MSG_CHECKING([for ld used by $CC])
41426fae4e5dSmrg  case $host in
41436fae4e5dSmrg  *-*-mingw*)
41446fae4e5dSmrg    # gcc leaves a trailing carriage return which upsets mingw
41456fae4e5dSmrg    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
41466fae4e5dSmrg  *)
41476fae4e5dSmrg    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
41481f0ac6a5Smrg  esac
41496fae4e5dSmrg  case $ac_prog in
41506fae4e5dSmrg    # Accept absolute paths.
41516fae4e5dSmrg    [[\\/]]* | ?:[[\\/]]*)
41526fae4e5dSmrg      re_direlt='/[[^/]][[^/]]*/\.\./'
41536fae4e5dSmrg      # Canonicalize the pathname of ld
41546fae4e5dSmrg      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
41556fae4e5dSmrg      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
41566fae4e5dSmrg	ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
41576fae4e5dSmrg      done
41586fae4e5dSmrg      test -z "$LD" && LD="$ac_prog"
41596fae4e5dSmrg      ;;
41606fae4e5dSmrg  "")
41616fae4e5dSmrg    # If it fails, then pretend we aren't using GCC.
41626fae4e5dSmrg    ac_prog=ld
41631f0ac6a5Smrg    ;;
41641f0ac6a5Smrg  *)
41656fae4e5dSmrg    # If it is relative, then search for the first ld in PATH.
41666fae4e5dSmrg    with_gnu_ld=unknown
41671f0ac6a5Smrg    ;;
41681f0ac6a5Smrg  esac
41696fae4e5dSmrgelif test "$with_gnu_ld" = yes; then
41706fae4e5dSmrg  AC_MSG_CHECKING([for GNU ld])
41716fae4e5dSmrgelse
41726fae4e5dSmrg  AC_MSG_CHECKING([for non-GNU ld])
41736fae4e5dSmrgfi
41746fae4e5dSmrgAC_CACHE_VAL(lt_cv_path_LD,
41756fae4e5dSmrg[if test -z "$LD"; then
41766fae4e5dSmrg  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
41776fae4e5dSmrg  for ac_dir in $PATH; do
41786fae4e5dSmrg    IFS="$lt_save_ifs"
41796fae4e5dSmrg    test -z "$ac_dir" && ac_dir=.
41806fae4e5dSmrg    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
41816fae4e5dSmrg      lt_cv_path_LD="$ac_dir/$ac_prog"
41826fae4e5dSmrg      # Check to see if the program is GNU ld.  I'd rather use --version,
41836fae4e5dSmrg      # but apparently some variants of GNU ld only accept -v.
41846fae4e5dSmrg      # Break only if it was the GNU/non-GNU ld that we prefer.
41856fae4e5dSmrg      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
41866fae4e5dSmrg      *GNU* | *'with BFD'*)
41876fae4e5dSmrg	test "$with_gnu_ld" != no && break
41886fae4e5dSmrg	;;
41896fae4e5dSmrg      *)
41906fae4e5dSmrg	test "$with_gnu_ld" != yes && break
41916fae4e5dSmrg	;;
41926fae4e5dSmrg      esac
41936fae4e5dSmrg    fi
41946fae4e5dSmrg  done
41956fae4e5dSmrg  IFS="$lt_save_ifs"
41966fae4e5dSmrgelse
41976fae4e5dSmrg  lt_cv_path_LD="$LD" # Let the user override the test with a path.
41986fae4e5dSmrgfi])
41996fae4e5dSmrgLD="$lt_cv_path_LD"
42006fae4e5dSmrgif test -n "$LD"; then
42016fae4e5dSmrg  AC_MSG_RESULT($LD)
42026fae4e5dSmrgelse
42036fae4e5dSmrg  AC_MSG_RESULT(no)
42046fae4e5dSmrgfi
42056fae4e5dSmrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
42066fae4e5dSmrg_LT_PATH_LD_GNU
42076fae4e5dSmrgAC_SUBST([LD])
42089c9ff80cSmrg
42096fae4e5dSmrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
42106fae4e5dSmrg])# LT_PATH_LD
42111f0ac6a5Smrg
42126fae4e5dSmrg# Old names:
42136fae4e5dSmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
42146fae4e5dSmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
42156fae4e5dSmrgdnl aclocal-1.4 backwards compatibility:
42166fae4e5dSmrgdnl AC_DEFUN([AM_PROG_LD], [])
42176fae4e5dSmrgdnl AC_DEFUN([AC_PROG_LD], [])
42181f0ac6a5Smrg
42191f0ac6a5Smrg
42206fae4e5dSmrg# _LT_PATH_LD_GNU
42216fae4e5dSmrg#- --------------
42226fae4e5dSmrgm4_defun([_LT_PATH_LD_GNU],
42236fae4e5dSmrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
42246fae4e5dSmrg[# I'd rather use --version here, but apparently some GNU lds only accept -v.
42256fae4e5dSmrgcase `$LD -v 2>&1 </dev/null` in
42266fae4e5dSmrg*GNU* | *'with BFD'*)
42276fae4e5dSmrg  lt_cv_prog_gnu_ld=yes
42281f0ac6a5Smrg  ;;
42296fae4e5dSmrg*)
42306fae4e5dSmrg  lt_cv_prog_gnu_ld=no
42311f0ac6a5Smrg  ;;
42326fae4e5dSmrgesac])
42336fae4e5dSmrgwith_gnu_ld=$lt_cv_prog_gnu_ld
42346fae4e5dSmrg])# _LT_PATH_LD_GNU
42351f0ac6a5Smrg
42361f0ac6a5Smrg
42376fae4e5dSmrg# _LT_CMD_RELOAD
42386fae4e5dSmrg# --------------
42396fae4e5dSmrg# find reload flag for linker
42406fae4e5dSmrg#   -- PORTME Some linkers may need a different reload flag.
42416fae4e5dSmrgm4_defun([_LT_CMD_RELOAD],
42426fae4e5dSmrg[AC_CACHE_CHECK([for $LD option to reload object files],
42436fae4e5dSmrg  lt_cv_ld_reload_flag,
42446fae4e5dSmrg  [lt_cv_ld_reload_flag='-r'])
42456fae4e5dSmrgreload_flag=$lt_cv_ld_reload_flag
42466fae4e5dSmrgcase $reload_flag in
42476fae4e5dSmrg"" | " "*) ;;
42486fae4e5dSmrg*) reload_flag=" $reload_flag" ;;
42496fae4e5dSmrgesac
42506fae4e5dSmrgreload_cmds='$LD$reload_flag -o $output$reload_objs'
42516fae4e5dSmrgcase $host_os in
42526fae4e5dSmrg  cygwin* | mingw* | pw32* | cegcc*)
42536fae4e5dSmrg    if test "$GCC" != yes; then
42546fae4e5dSmrg      reload_cmds=false
42556fae4e5dSmrg    fi
42566fae4e5dSmrg    ;;
42576fae4e5dSmrg  darwin*)
42586fae4e5dSmrg    if test "$GCC" = yes; then
42596fae4e5dSmrg      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
42606fae4e5dSmrg    else
42616fae4e5dSmrg      reload_cmds='$LD$reload_flag -o $output$reload_objs'
42626fae4e5dSmrg    fi
42636fae4e5dSmrg    ;;
42646fae4e5dSmrgesac
42656fae4e5dSmrg_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
42666fae4e5dSmrg_LT_TAGDECL([], [reload_cmds], [2])dnl
42676fae4e5dSmrg])# _LT_CMD_RELOAD
42686fae4e5dSmrg
42696fae4e5dSmrg
42706fae4e5dSmrg# _LT_CHECK_MAGIC_METHOD
42716fae4e5dSmrg# ----------------------
42726fae4e5dSmrg# how to check for library dependencies
42736fae4e5dSmrg#  -- PORTME fill in with the dynamic library characteristics
42746fae4e5dSmrgm4_defun([_LT_CHECK_MAGIC_METHOD],
42756fae4e5dSmrg[m4_require([_LT_DECL_EGREP])
42766fae4e5dSmrgm4_require([_LT_DECL_OBJDUMP])
42776fae4e5dSmrgAC_CACHE_CHECK([how to recognize dependent libraries],
42786fae4e5dSmrglt_cv_deplibs_check_method,
42796fae4e5dSmrg[lt_cv_file_magic_cmd='$MAGIC_CMD'
42806fae4e5dSmrglt_cv_file_magic_test_file=
42816fae4e5dSmrglt_cv_deplibs_check_method='unknown'
42826fae4e5dSmrg# Need to set the preceding variable on all platforms that support
42836fae4e5dSmrg# interlibrary dependencies.
42846fae4e5dSmrg# 'none' -- dependencies not supported.
42856fae4e5dSmrg# `unknown' -- same as none, but documents that we really don't know.
42866fae4e5dSmrg# 'pass_all' -- all dependencies passed with no checks.
42876fae4e5dSmrg# 'test_compile' -- check by making test program.
42886fae4e5dSmrg# 'file_magic [[regex]]' -- check by looking for files in library path
42896fae4e5dSmrg# which responds to the $file_magic_cmd with a given extended regex.
42906fae4e5dSmrg# If you have `file' or equivalent on your system and you're not sure
42916fae4e5dSmrg# whether `pass_all' will *always* work, you probably want this one.
42926fae4e5dSmrg
42936fae4e5dSmrgcase $host_os in
42946fae4e5dSmrgaix[[4-9]]*)
42956fae4e5dSmrg  lt_cv_deplibs_check_method=pass_all
42966fae4e5dSmrg  ;;
42976fae4e5dSmrg
42986fae4e5dSmrgbeos*)
42996fae4e5dSmrg  lt_cv_deplibs_check_method=pass_all
43006fae4e5dSmrg  ;;
43016fae4e5dSmrg
43026fae4e5dSmrgbsdi[[45]]*)
43036fae4e5dSmrg  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
43046fae4e5dSmrg  lt_cv_file_magic_cmd='/usr/bin/file -L'
43056fae4e5dSmrg  lt_cv_file_magic_test_file=/shlib/libc.so
43066fae4e5dSmrg  ;;
43076fae4e5dSmrg
43086fae4e5dSmrgcygwin*)
43096fae4e5dSmrg  # func_win32_libid is a shell function defined in ltmain.sh
43106fae4e5dSmrg  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
43116fae4e5dSmrg  lt_cv_file_magic_cmd='func_win32_libid'
43126fae4e5dSmrg  ;;
43136fae4e5dSmrg
43146fae4e5dSmrgmingw* | pw32*)
43156fae4e5dSmrg  # Base MSYS/MinGW do not provide the 'file' command needed by
43166fae4e5dSmrg  # func_win32_libid shell function, so use a weaker test based on 'objdump',
43176fae4e5dSmrg  # unless we find 'file', for example because we are cross-compiling.
43186fae4e5dSmrg  # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
43196fae4e5dSmrg  if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
43206fae4e5dSmrg    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
43216fae4e5dSmrg    lt_cv_file_magic_cmd='func_win32_libid'
43221f0ac6a5Smrg  else
43236fae4e5dSmrg    # Keep this pattern in sync with the one in func_win32_libid.
43246fae4e5dSmrg    lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
43256fae4e5dSmrg    lt_cv_file_magic_cmd='$OBJDUMP -f'
43261f0ac6a5Smrg  fi
43271f0ac6a5Smrg  ;;
43281f0ac6a5Smrg
43296fae4e5dSmrgcegcc*)
43306fae4e5dSmrg  # use the weaker test based on 'objdump'. See mingw*.
43316fae4e5dSmrg  lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
43326fae4e5dSmrg  lt_cv_file_magic_cmd='$OBJDUMP -f'
43331f0ac6a5Smrg  ;;
43341f0ac6a5Smrg
43356fae4e5dSmrgdarwin* | rhapsody*)
43366fae4e5dSmrg  lt_cv_deplibs_check_method=pass_all
43371f0ac6a5Smrg  ;;
43381f0ac6a5Smrg
43396fae4e5dSmrgfreebsd* | dragonfly*)
43406fae4e5dSmrg  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
43416fae4e5dSmrg    case $host_cpu in
43426fae4e5dSmrg    i*86 )
43436fae4e5dSmrg      # Not sure whether the presence of OpenBSD here was a mistake.
43446fae4e5dSmrg      # Let's accept both of them until this is cleared up.
43456fae4e5dSmrg      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
43466fae4e5dSmrg      lt_cv_file_magic_cmd=/usr/bin/file
43476fae4e5dSmrg      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
43486fae4e5dSmrg      ;;
43496fae4e5dSmrg    esac
43506fae4e5dSmrg  else
43516fae4e5dSmrg    lt_cv_deplibs_check_method=pass_all
43526fae4e5dSmrg  fi
4353e5410a46Smrg  ;;
4354e5410a46Smrg
43556fae4e5dSmrggnu*)
43566fae4e5dSmrg  lt_cv_deplibs_check_method=pass_all
43571f0ac6a5Smrg  ;;
43581f0ac6a5Smrg
43596fae4e5dSmrghaiku*)
43606fae4e5dSmrg  lt_cv_deplibs_check_method=pass_all
43611f0ac6a5Smrg  ;;
43621f0ac6a5Smrg
43636fae4e5dSmrghpux10.20* | hpux11*)
43646fae4e5dSmrg  lt_cv_file_magic_cmd=/usr/bin/file
43656fae4e5dSmrg  case $host_cpu in
43666fae4e5dSmrg  ia64*)
43676fae4e5dSmrg    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
43686fae4e5dSmrg    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
43696fae4e5dSmrg    ;;
43706fae4e5dSmrg  hppa*64*)
43716fae4e5dSmrg    [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]']
43726fae4e5dSmrg    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
43736fae4e5dSmrg    ;;
43746fae4e5dSmrg  *)
43756fae4e5dSmrg    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
43766fae4e5dSmrg    lt_cv_file_magic_test_file=/usr/lib/libc.sl
43776fae4e5dSmrg    ;;
43781f0ac6a5Smrg  esac
43791f0ac6a5Smrg  ;;
43801f0ac6a5Smrg
43816fae4e5dSmrginterix[[3-9]]*)
43826fae4e5dSmrg  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
43836fae4e5dSmrg  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
43841f0ac6a5Smrg  ;;
43851f0ac6a5Smrg
43866fae4e5dSmrgirix5* | irix6* | nonstopux*)
43876fae4e5dSmrg  case $LD in
43886fae4e5dSmrg  *-32|*"-32 ") libmagic=32-bit;;
43896fae4e5dSmrg  *-n32|*"-n32 ") libmagic=N32;;
43906fae4e5dSmrg  *-64|*"-64 ") libmagic=64-bit;;
43916fae4e5dSmrg  *) libmagic=never-match;;
43926fae4e5dSmrg  esac
43936fae4e5dSmrg  lt_cv_deplibs_check_method=pass_all
43946fae4e5dSmrg  ;;
43956fae4e5dSmrg
43966fae4e5dSmrg# This must be Linux ELF.
43976fae4e5dSmrglinux* | k*bsd*-gnu | kopensolaris*-gnu)
43986fae4e5dSmrg  lt_cv_deplibs_check_method=pass_all
43996fae4e5dSmrg  ;;
44006fae4e5dSmrg
44016fae4e5dSmrgnetbsd*)
44026fae4e5dSmrg  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
44036fae4e5dSmrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
44041f0ac6a5Smrg  else
44056fae4e5dSmrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
44061f0ac6a5Smrg  fi
44071f0ac6a5Smrg  ;;
44081f0ac6a5Smrg
44096fae4e5dSmrgnewos6*)
44106fae4e5dSmrg  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
44116fae4e5dSmrg  lt_cv_file_magic_cmd=/usr/bin/file
44126fae4e5dSmrg  lt_cv_file_magic_test_file=/usr/lib/libnls.so
44139c9ff80cSmrg  ;;
44149c9ff80cSmrg
44156fae4e5dSmrg*nto* | *qnx*)
44166fae4e5dSmrg  lt_cv_deplibs_check_method=pass_all
44171f0ac6a5Smrg  ;;
44181f0ac6a5Smrg
44196fae4e5dSmrgopenbsd*)
44206fae4e5dSmrg  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
44216fae4e5dSmrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
44226fae4e5dSmrg  else
44236fae4e5dSmrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
44246fae4e5dSmrg  fi
44251f0ac6a5Smrg  ;;
44261f0ac6a5Smrg
44276fae4e5dSmrgosf3* | osf4* | osf5*)
44286fae4e5dSmrg  lt_cv_deplibs_check_method=pass_all
44296fae4e5dSmrg  ;;
44301f0ac6a5Smrg
44316fae4e5dSmrgrdos*)
44326fae4e5dSmrg  lt_cv_deplibs_check_method=pass_all
44336fae4e5dSmrg  ;;
44341f0ac6a5Smrg
44356fae4e5dSmrgsolaris*)
44366fae4e5dSmrg  lt_cv_deplibs_check_method=pass_all
44376fae4e5dSmrg  ;;
44389c9ff80cSmrg
44396fae4e5dSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
44406fae4e5dSmrg  lt_cv_deplibs_check_method=pass_all
44416fae4e5dSmrg  ;;
44429c9ff80cSmrg
44436fae4e5dSmrgsysv4 | sysv4.3*)
44446fae4e5dSmrg  case $host_vendor in
44456fae4e5dSmrg  motorola)
44466fae4e5dSmrg    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]]'
44476fae4e5dSmrg    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
44486fae4e5dSmrg    ;;
44496fae4e5dSmrg  ncr)
44506fae4e5dSmrg    lt_cv_deplibs_check_method=pass_all
44516fae4e5dSmrg    ;;
44526fae4e5dSmrg  sequent)
44536fae4e5dSmrg    lt_cv_file_magic_cmd='/bin/file'
44546fae4e5dSmrg    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
44556fae4e5dSmrg    ;;
44566fae4e5dSmrg  sni)
44576fae4e5dSmrg    lt_cv_file_magic_cmd='/bin/file'
44586fae4e5dSmrg    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
44596fae4e5dSmrg    lt_cv_file_magic_test_file=/lib/libc.so
44606fae4e5dSmrg    ;;
44616fae4e5dSmrg  siemens)
44626fae4e5dSmrg    lt_cv_deplibs_check_method=pass_all
44636fae4e5dSmrg    ;;
44646fae4e5dSmrg  pc)
44656fae4e5dSmrg    lt_cv_deplibs_check_method=pass_all
44666fae4e5dSmrg    ;;
44676fae4e5dSmrg  esac
44689c9ff80cSmrg  ;;
44691f0ac6a5Smrg
44706fae4e5dSmrgtpf*)
44716fae4e5dSmrg  lt_cv_deplibs_check_method=pass_all
44726fae4e5dSmrg  ;;
44736fae4e5dSmrgesac
44746fae4e5dSmrg])
44751f0ac6a5Smrg
44766fae4e5dSmrgfile_magic_glob=
44776fae4e5dSmrgwant_nocaseglob=no
44786fae4e5dSmrgif test "$build" = "$host"; then
44796fae4e5dSmrg  case $host_os in
44806fae4e5dSmrg  mingw* | pw32*)
44816fae4e5dSmrg    if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
44826fae4e5dSmrg      want_nocaseglob=yes
44836fae4e5dSmrg    else
44846fae4e5dSmrg      file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
44851f0ac6a5Smrg    fi
44866fae4e5dSmrg    ;;
44876fae4e5dSmrg  esac
44881f0ac6a5Smrgfi
44891f0ac6a5Smrg
44906fae4e5dSmrgfile_magic_cmd=$lt_cv_file_magic_cmd
44916fae4e5dSmrgdeplibs_check_method=$lt_cv_deplibs_check_method
44926fae4e5dSmrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown
44931f0ac6a5Smrg
44946fae4e5dSmrg_LT_DECL([], [deplibs_check_method], [1],
44956fae4e5dSmrg    [Method to check whether dependent libraries are shared objects])
44966fae4e5dSmrg_LT_DECL([], [file_magic_cmd], [1],
44976fae4e5dSmrg    [Command to use when deplibs_check_method = "file_magic"])
44986fae4e5dSmrg_LT_DECL([], [file_magic_glob], [1],
44996fae4e5dSmrg    [How to find potential files when deplibs_check_method = "file_magic"])
45006fae4e5dSmrg_LT_DECL([], [want_nocaseglob], [1],
45016fae4e5dSmrg    [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
45026fae4e5dSmrg])# _LT_CHECK_MAGIC_METHOD
45039c9ff80cSmrg
45046fae4e5dSmrg
45056fae4e5dSmrg# LT_PATH_NM
45066fae4e5dSmrg# ----------
45076fae4e5dSmrg# find the pathname to a BSD- or MS-compatible name lister
45086fae4e5dSmrgAC_DEFUN([LT_PATH_NM],
45096fae4e5dSmrg[AC_REQUIRE([AC_PROG_CC])dnl
45106fae4e5dSmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
45116fae4e5dSmrg[if test -n "$NM"; then
45126fae4e5dSmrg  # Let the user override the test.
45136fae4e5dSmrg  lt_cv_path_NM="$NM"
45146fae4e5dSmrgelse
45156fae4e5dSmrg  lt_nm_to_check="${ac_tool_prefix}nm"
45166fae4e5dSmrg  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
45176fae4e5dSmrg    lt_nm_to_check="$lt_nm_to_check nm"
45186fae4e5dSmrg  fi
45196fae4e5dSmrg  for lt_tmp_nm in $lt_nm_to_check; do
45206fae4e5dSmrg    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
45216fae4e5dSmrg    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
45226fae4e5dSmrg      IFS="$lt_save_ifs"
45236fae4e5dSmrg      test -z "$ac_dir" && ac_dir=.
45246fae4e5dSmrg      tmp_nm="$ac_dir/$lt_tmp_nm"
45256fae4e5dSmrg      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
45266fae4e5dSmrg	# Check to see if the nm accepts a BSD-compat flag.
45276fae4e5dSmrg	# Adding the `sed 1q' prevents false positives on HP-UX, which says:
45286fae4e5dSmrg	#   nm: unknown option "B" ignored
45296fae4e5dSmrg	# Tru64's nm complains that /dev/null is an invalid object file
45306fae4e5dSmrg	case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
45316fae4e5dSmrg	*/dev/null* | *'Invalid file or object type'*)
45326fae4e5dSmrg	  lt_cv_path_NM="$tmp_nm -B"
45336fae4e5dSmrg	  break
45346fae4e5dSmrg	  ;;
45356fae4e5dSmrg	*)
45366fae4e5dSmrg	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
45376fae4e5dSmrg	  */dev/null*)
45386fae4e5dSmrg	    lt_cv_path_NM="$tmp_nm -p"
45396fae4e5dSmrg	    break
45406fae4e5dSmrg	    ;;
45416fae4e5dSmrg	  *)
45426fae4e5dSmrg	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
45436fae4e5dSmrg	    continue # so that we can try to find one that supports BSD flags
45446fae4e5dSmrg	    ;;
45456fae4e5dSmrg	  esac
45466fae4e5dSmrg	  ;;
45476fae4e5dSmrg	esac
45486fae4e5dSmrg      fi
45496fae4e5dSmrg    done
45506fae4e5dSmrg    IFS="$lt_save_ifs"
45516fae4e5dSmrg  done
45526fae4e5dSmrg  : ${lt_cv_path_NM=no}
45536fae4e5dSmrgfi])
45546fae4e5dSmrgif test "$lt_cv_path_NM" != "no"; then
45556fae4e5dSmrg  NM="$lt_cv_path_NM"
45566fae4e5dSmrgelse
45576fae4e5dSmrg  # Didn't find any BSD compatible name lister, look for dumpbin.
45586fae4e5dSmrg  if test -n "$DUMPBIN"; then :
45596fae4e5dSmrg    # Let the user override the test.
45601f0ac6a5Smrg  else
45616fae4e5dSmrg    AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
45626fae4e5dSmrg    case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
45636fae4e5dSmrg    *COFF*)
45646fae4e5dSmrg      DUMPBIN="$DUMPBIN -symbols"
45656fae4e5dSmrg      ;;
45666fae4e5dSmrg    *)
45676fae4e5dSmrg      DUMPBIN=:
45686fae4e5dSmrg      ;;
45696fae4e5dSmrg    esac
45706fae4e5dSmrg  fi
45716fae4e5dSmrg  AC_SUBST([DUMPBIN])
45726fae4e5dSmrg  if test "$DUMPBIN" != ":"; then
45736fae4e5dSmrg    NM="$DUMPBIN"
45741f0ac6a5Smrg  fi
45751f0ac6a5Smrgfi
45766fae4e5dSmrgtest -z "$NM" && NM=nm
45776fae4e5dSmrgAC_SUBST([NM])
45786fae4e5dSmrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
45791f0ac6a5Smrg
45806fae4e5dSmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
45816fae4e5dSmrg  [lt_cv_nm_interface="BSD nm"
45826fae4e5dSmrg  echo "int some_variable = 0;" > conftest.$ac_ext
45836fae4e5dSmrg  (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
45846fae4e5dSmrg  (eval "$ac_compile" 2>conftest.err)
45856fae4e5dSmrg  cat conftest.err >&AS_MESSAGE_LOG_FD
45866fae4e5dSmrg  (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
45876fae4e5dSmrg  (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
45886fae4e5dSmrg  cat conftest.err >&AS_MESSAGE_LOG_FD
45896fae4e5dSmrg  (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
45906fae4e5dSmrg  cat conftest.out >&AS_MESSAGE_LOG_FD
45916fae4e5dSmrg  if $GREP 'External.*some_variable' conftest.out > /dev/null; then
45926fae4e5dSmrg    lt_cv_nm_interface="MS dumpbin"
45936fae4e5dSmrg  fi
45946fae4e5dSmrg  rm -f conftest*])
45956fae4e5dSmrg])# LT_PATH_NM
45969c9ff80cSmrg
45976fae4e5dSmrg# Old names:
45986fae4e5dSmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
45996fae4e5dSmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
46006fae4e5dSmrgdnl aclocal-1.4 backwards compatibility:
46016fae4e5dSmrgdnl AC_DEFUN([AM_PROG_NM], [])
46026fae4e5dSmrgdnl AC_DEFUN([AC_PROG_NM], [])
46039c9ff80cSmrg
46046fae4e5dSmrg# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
46056fae4e5dSmrg# --------------------------------
46066fae4e5dSmrg# how to determine the name of the shared library
46076fae4e5dSmrg# associated with a specific link library.
46086fae4e5dSmrg#  -- PORTME fill in with the dynamic library characteristics
46096fae4e5dSmrgm4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
46106fae4e5dSmrg[m4_require([_LT_DECL_EGREP])
46116fae4e5dSmrgm4_require([_LT_DECL_OBJDUMP])
46126fae4e5dSmrgm4_require([_LT_DECL_DLLTOOL])
46136fae4e5dSmrgAC_CACHE_CHECK([how to associate runtime and link libraries],
46146fae4e5dSmrglt_cv_sharedlib_from_linklib_cmd,
46156fae4e5dSmrg[lt_cv_sharedlib_from_linklib_cmd='unknown'
46166fae4e5dSmrg
46176fae4e5dSmrgcase $host_os in
46186fae4e5dSmrgcygwin* | mingw* | pw32* | cegcc*)
46196fae4e5dSmrg  # two different shell functions defined in ltmain.sh
46206fae4e5dSmrg  # decide which to use based on capabilities of $DLLTOOL
46216fae4e5dSmrg  case `$DLLTOOL --help 2>&1` in
46226fae4e5dSmrg  *--identify-strict*)
46236fae4e5dSmrg    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
46241f0ac6a5Smrg    ;;
46251f0ac6a5Smrg  *)
46266fae4e5dSmrg    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
46271f0ac6a5Smrg    ;;
46281f0ac6a5Smrg  esac
46291f0ac6a5Smrg  ;;
46301f0ac6a5Smrg*)
46316fae4e5dSmrg  # fallback: assume linklib IS sharedlib
46326fae4e5dSmrg  lt_cv_sharedlib_from_linklib_cmd="$ECHO"
46331f0ac6a5Smrg  ;;
46341f0ac6a5Smrgesac
46356fae4e5dSmrg])
46366fae4e5dSmrgsharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
46376fae4e5dSmrgtest -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
46381f0ac6a5Smrg
46396fae4e5dSmrg_LT_DECL([], [sharedlib_from_linklib_cmd], [1],
46406fae4e5dSmrg    [Command to associate shared and link libraries])
46416fae4e5dSmrg])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
46421f0ac6a5Smrg
46431f0ac6a5Smrg
46446fae4e5dSmrg# _LT_PATH_MANIFEST_TOOL
46456fae4e5dSmrg# ----------------------
46466fae4e5dSmrg# locate the manifest tool
46476fae4e5dSmrgm4_defun([_LT_PATH_MANIFEST_TOOL],
46486fae4e5dSmrg[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
46496fae4e5dSmrgtest -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
46506fae4e5dSmrgAC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
46516fae4e5dSmrg  [lt_cv_path_mainfest_tool=no
46526fae4e5dSmrg  echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
46536fae4e5dSmrg  $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
46546fae4e5dSmrg  cat conftest.err >&AS_MESSAGE_LOG_FD
46556fae4e5dSmrg  if $GREP 'Manifest Tool' conftest.out > /dev/null; then
46566fae4e5dSmrg    lt_cv_path_mainfest_tool=yes
46576fae4e5dSmrg  fi
46586fae4e5dSmrg  rm -f conftest*])
46596fae4e5dSmrgif test "x$lt_cv_path_mainfest_tool" != xyes; then
46606fae4e5dSmrg  MANIFEST_TOOL=:
46616fae4e5dSmrgfi
46626fae4e5dSmrg_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
46636fae4e5dSmrg])# _LT_PATH_MANIFEST_TOOL
46641f0ac6a5Smrg
46651f0ac6a5Smrg
46666fae4e5dSmrg# LT_LIB_M
46676fae4e5dSmrg# --------
46686fae4e5dSmrg# check for math library
46696fae4e5dSmrgAC_DEFUN([LT_LIB_M],
46706fae4e5dSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
46716fae4e5dSmrgLIBM=
46726fae4e5dSmrgcase $host in
46736fae4e5dSmrg*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
46746fae4e5dSmrg  # These system don't have libm, or don't need it
46751f0ac6a5Smrg  ;;
46766fae4e5dSmrg*-ncr-sysv4.3*)
46776fae4e5dSmrg  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
46786fae4e5dSmrg  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
46791f0ac6a5Smrg  ;;
46806fae4e5dSmrg*)
46816fae4e5dSmrg  AC_CHECK_LIB(m, cos, LIBM="-lm")
46821f0ac6a5Smrg  ;;
46836fae4e5dSmrgesac
46846fae4e5dSmrgAC_SUBST([LIBM])
46856fae4e5dSmrg])# LT_LIB_M
46861f0ac6a5Smrg
46876fae4e5dSmrg# Old name:
46886fae4e5dSmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
46896fae4e5dSmrgdnl aclocal-1.4 backwards compatibility:
46906fae4e5dSmrgdnl AC_DEFUN([AC_CHECK_LIBM], [])
46919c9ff80cSmrg
46921f0ac6a5Smrg
46936fae4e5dSmrg# _LT_COMPILER_NO_RTTI([TAGNAME])
46946fae4e5dSmrg# -------------------------------
46956fae4e5dSmrgm4_defun([_LT_COMPILER_NO_RTTI],
46966fae4e5dSmrg[m4_require([_LT_TAG_COMPILER])dnl
46971f0ac6a5Smrg
46986fae4e5dSmrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
46991f0ac6a5Smrg
47006fae4e5dSmrgif test "$GCC" = yes; then
47016fae4e5dSmrg  case $cc_basename in
47026fae4e5dSmrg  nvcc*)
47036fae4e5dSmrg    _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
47041f0ac6a5Smrg  *)
47056fae4e5dSmrg    _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
47061f0ac6a5Smrg  esac
47071f0ac6a5Smrg
47089c9ff80cSmrg  _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
47099c9ff80cSmrg    lt_cv_prog_compiler_rtti_exceptions,
47109c9ff80cSmrg    [-fno-rtti -fno-exceptions], [],
47119c9ff80cSmrg    [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
47129c9ff80cSmrgfi
47139c9ff80cSmrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
47149c9ff80cSmrg	[Compiler flag to turn off builtin functions])
47159c9ff80cSmrg])# _LT_COMPILER_NO_RTTI
47161f0ac6a5Smrg
47171f0ac6a5Smrg
47189c9ff80cSmrg# _LT_CMD_GLOBAL_SYMBOLS
47199c9ff80cSmrg# ----------------------
47209c9ff80cSmrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS],
47219c9ff80cSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
47229c9ff80cSmrgAC_REQUIRE([AC_PROG_CC])dnl
47236fae4e5dSmrgAC_REQUIRE([AC_PROG_AWK])dnl
47249c9ff80cSmrgAC_REQUIRE([LT_PATH_NM])dnl
47259c9ff80cSmrgAC_REQUIRE([LT_PATH_LD])dnl
47269c9ff80cSmrgm4_require([_LT_DECL_SED])dnl
47279c9ff80cSmrgm4_require([_LT_DECL_EGREP])dnl
47289c9ff80cSmrgm4_require([_LT_TAG_COMPILER])dnl
47291f0ac6a5Smrg
47309c9ff80cSmrg# Check for command to grab the raw symbol name followed by C symbol from nm.
47319c9ff80cSmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object])
47329c9ff80cSmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
47331f0ac6a5Smrg[
47349c9ff80cSmrg# These are sane defaults that work on at least a few old systems.
47359c9ff80cSmrg# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
47361f0ac6a5Smrg
47379c9ff80cSmrg# Character class describing NM global symbol codes.
47389c9ff80cSmrgsymcode='[[BCDEGRST]]'
47391f0ac6a5Smrg
47409c9ff80cSmrg# Regexp to match symbols that can be accessed directly from C.
47419c9ff80cSmrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
47421f0ac6a5Smrg
47439c9ff80cSmrg# Define system-specific variables.
47449c9ff80cSmrgcase $host_os in
47459c9ff80cSmrgaix*)
47469c9ff80cSmrg  symcode='[[BCDT]]'
47479c9ff80cSmrg  ;;
47489c9ff80cSmrgcygwin* | mingw* | pw32* | cegcc*)
47499c9ff80cSmrg  symcode='[[ABCDGISTW]]'
47509c9ff80cSmrg  ;;
47519c9ff80cSmrghpux*)
47529c9ff80cSmrg  if test "$host_cpu" = ia64; then
47539c9ff80cSmrg    symcode='[[ABCDEGRST]]'
47549c9ff80cSmrg  fi
47559c9ff80cSmrg  ;;
47569c9ff80cSmrgirix* | nonstopux*)
47579c9ff80cSmrg  symcode='[[BCDEGRST]]'
47589c9ff80cSmrg  ;;
47599c9ff80cSmrgosf*)
47609c9ff80cSmrg  symcode='[[BCDEGQRST]]'
47619c9ff80cSmrg  ;;
47629c9ff80cSmrgsolaris*)
47639c9ff80cSmrg  symcode='[[BDRT]]'
47649c9ff80cSmrg  ;;
47659c9ff80cSmrgsco3.2v5*)
47669c9ff80cSmrg  symcode='[[DT]]'
47679c9ff80cSmrg  ;;
47689c9ff80cSmrgsysv4.2uw2*)
47699c9ff80cSmrg  symcode='[[DT]]'
47709c9ff80cSmrg  ;;
47719c9ff80cSmrgsysv5* | sco5v6* | unixware* | OpenUNIX*)
47729c9ff80cSmrg  symcode='[[ABDT]]'
47739c9ff80cSmrg  ;;
47749c9ff80cSmrgsysv4)
47759c9ff80cSmrg  symcode='[[DFNSTU]]'
47769c9ff80cSmrg  ;;
47779c9ff80cSmrgesac
47781f0ac6a5Smrg
47799c9ff80cSmrg# If we're using GNU nm, then use its standard symbol codes.
47809c9ff80cSmrgcase `$NM -V 2>&1` in
47819c9ff80cSmrg*GNU* | *'with BFD'*)
47829c9ff80cSmrg  symcode='[[ABCDGIRSTW]]' ;;
47839c9ff80cSmrgesac
47841f0ac6a5Smrg
47859c9ff80cSmrg# Transform an extracted symbol line into a proper C declaration.
47869c9ff80cSmrg# Some systems (esp. on ia64) link data and code symbols differently,
47879c9ff80cSmrg# so use this general approach.
47889c9ff80cSmrglt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
47891f0ac6a5Smrg
47909c9ff80cSmrg# Transform an extracted symbol line into symbol name and symbol address
47916fae4e5dSmrglt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p'"
47926fae4e5dSmrglt_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'"
47931f0ac6a5Smrg
47949c9ff80cSmrg# Handle CRLF in mingw tool chain
47959c9ff80cSmrgopt_cr=
47969c9ff80cSmrgcase $build_os in
47979c9ff80cSmrgmingw*)
47989c9ff80cSmrg  opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
47999c9ff80cSmrg  ;;
48009c9ff80cSmrgesac
48011f0ac6a5Smrg
48029c9ff80cSmrg# Try without a prefix underscore, then with it.
48039c9ff80cSmrgfor ac_symprfx in "" "_"; do
48041f0ac6a5Smrg
48059c9ff80cSmrg  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
48069c9ff80cSmrg  symxfrm="\\1 $ac_symprfx\\2 \\2"
48071f0ac6a5Smrg
48089c9ff80cSmrg  # Write the raw and C identifiers.
48099c9ff80cSmrg  if test "$lt_cv_nm_interface" = "MS dumpbin"; then
48109c9ff80cSmrg    # Fake it for dumpbin and say T for any non-static function
48119c9ff80cSmrg    # and D for any global variable.
48129c9ff80cSmrg    # Also find C++ and __fastcall symbols from MSVC++,
48139c9ff80cSmrg    # which start with @ or ?.
48149c9ff80cSmrg    lt_cv_sys_global_symbol_pipe="$AWK ['"\
48159c9ff80cSmrg"     {last_section=section; section=\$ 3};"\
48169c9ff80cSmrg"     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
48179c9ff80cSmrg"     \$ 0!~/External *\|/{next};"\
48189c9ff80cSmrg"     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
48199c9ff80cSmrg"     {if(hide[section]) next};"\
48209c9ff80cSmrg"     {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
48219c9ff80cSmrg"     {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
48229c9ff80cSmrg"     s[1]~/^[@?]/{print s[1], s[1]; next};"\
48239c9ff80cSmrg"     s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
48249c9ff80cSmrg"     ' prfx=^$ac_symprfx]"
48259c9ff80cSmrg  else
48269c9ff80cSmrg    lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[	 ]]\($symcode$symcode*\)[[	 ]][[	 ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
48271f0ac6a5Smrg  fi
48286fae4e5dSmrg  lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
48291f0ac6a5Smrg
48309c9ff80cSmrg  # Check to see that the pipe works correctly.
48319c9ff80cSmrg  pipe_works=no
48321f0ac6a5Smrg
48339c9ff80cSmrg  rm -f conftest*
48349c9ff80cSmrg  cat > conftest.$ac_ext <<_LT_EOF
48359c9ff80cSmrg#ifdef __cplusplus
48369c9ff80cSmrgextern "C" {
48379c9ff80cSmrg#endif
48389c9ff80cSmrgchar nm_test_var;
48399c9ff80cSmrgvoid nm_test_func(void);
48409c9ff80cSmrgvoid nm_test_func(void){}
48419c9ff80cSmrg#ifdef __cplusplus
48429c9ff80cSmrg}
48439c9ff80cSmrg#endif
48449c9ff80cSmrgint main(){nm_test_var='a';nm_test_func();return(0);}
48459c9ff80cSmrg_LT_EOF
48461f0ac6a5Smrg
48479c9ff80cSmrg  if AC_TRY_EVAL(ac_compile); then
48489c9ff80cSmrg    # Now try to grab the symbols.
48499c9ff80cSmrg    nlist=conftest.nm
48506fae4e5dSmrg    if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
48519c9ff80cSmrg      # Try sorting and uniquifying the output.
48529c9ff80cSmrg      if sort "$nlist" | uniq > "$nlist"T; then
48539c9ff80cSmrg	mv -f "$nlist"T "$nlist"
48549c9ff80cSmrg      else
48559c9ff80cSmrg	rm -f "$nlist"T
48569c9ff80cSmrg      fi
48571f0ac6a5Smrg
48589c9ff80cSmrg      # Make sure that we snagged all the symbols we need.
48599c9ff80cSmrg      if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
48609c9ff80cSmrg	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
48619c9ff80cSmrg	  cat <<_LT_EOF > conftest.$ac_ext
48626fae4e5dSmrg/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
48636fae4e5dSmrg#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
48646fae4e5dSmrg/* DATA imports from DLLs on WIN32 con't be const, because runtime
48656fae4e5dSmrg   relocations are performed -- see ld's documentation on pseudo-relocs.  */
48666fae4e5dSmrg# define LT@&t@_DLSYM_CONST
48676fae4e5dSmrg#elif defined(__osf__)
48686fae4e5dSmrg/* This system does not cope well with relocations in const data.  */
48696fae4e5dSmrg# define LT@&t@_DLSYM_CONST
48706fae4e5dSmrg#else
48716fae4e5dSmrg# define LT@&t@_DLSYM_CONST const
48726fae4e5dSmrg#endif
48736fae4e5dSmrg
48749c9ff80cSmrg#ifdef __cplusplus
48759c9ff80cSmrgextern "C" {
48769c9ff80cSmrg#endif
48771f0ac6a5Smrg
48789c9ff80cSmrg_LT_EOF
48799c9ff80cSmrg	  # Now generate the symbol file.
48809c9ff80cSmrg	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
48811f0ac6a5Smrg
48829c9ff80cSmrg	  cat <<_LT_EOF >> conftest.$ac_ext
48831f0ac6a5Smrg
48849c9ff80cSmrg/* The mapping between symbol names and symbols.  */
48856fae4e5dSmrgLT@&t@_DLSYM_CONST struct {
48869c9ff80cSmrg  const char *name;
48879c9ff80cSmrg  void       *address;
48889c9ff80cSmrg}
48899c9ff80cSmrglt__PROGRAM__LTX_preloaded_symbols[[]] =
48909c9ff80cSmrg{
48919c9ff80cSmrg  { "@PROGRAM@", (void *) 0 },
48929c9ff80cSmrg_LT_EOF
48939c9ff80cSmrg	  $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
48949c9ff80cSmrg	  cat <<\_LT_EOF >> conftest.$ac_ext
48959c9ff80cSmrg  {0, (void *) 0}
48969c9ff80cSmrg};
48971f0ac6a5Smrg
48989c9ff80cSmrg/* This works around a problem in FreeBSD linker */
48999c9ff80cSmrg#ifdef FREEBSD_WORKAROUND
49009c9ff80cSmrgstatic const void *lt_preloaded_setup() {
49019c9ff80cSmrg  return lt__PROGRAM__LTX_preloaded_symbols;
49029c9ff80cSmrg}
49039c9ff80cSmrg#endif
49041f0ac6a5Smrg
49059c9ff80cSmrg#ifdef __cplusplus
49069c9ff80cSmrg}
49079c9ff80cSmrg#endif
49089c9ff80cSmrg_LT_EOF
49099c9ff80cSmrg	  # Now try linking the two files.
49109c9ff80cSmrg	  mv conftest.$ac_objext conftstm.$ac_objext
49116fae4e5dSmrg	  lt_globsym_save_LIBS=$LIBS
49126fae4e5dSmrg	  lt_globsym_save_CFLAGS=$CFLAGS
49139c9ff80cSmrg	  LIBS="conftstm.$ac_objext"
49149c9ff80cSmrg	  CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
49159c9ff80cSmrg	  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
49169c9ff80cSmrg	    pipe_works=yes
49179c9ff80cSmrg	  fi
49186fae4e5dSmrg	  LIBS=$lt_globsym_save_LIBS
49196fae4e5dSmrg	  CFLAGS=$lt_globsym_save_CFLAGS
49209c9ff80cSmrg	else
49219c9ff80cSmrg	  echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
49229c9ff80cSmrg	fi
49239c9ff80cSmrg      else
49249c9ff80cSmrg	echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
49259c9ff80cSmrg      fi
49261f0ac6a5Smrg    else
49279c9ff80cSmrg      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
49281f0ac6a5Smrg    fi
49291f0ac6a5Smrg  else
49309c9ff80cSmrg    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
49319c9ff80cSmrg    cat conftest.$ac_ext >&5
49321f0ac6a5Smrg  fi
49339c9ff80cSmrg  rm -rf conftest* conftst*
49341f0ac6a5Smrg
49359c9ff80cSmrg  # Do not use the global_symbol_pipe unless it works.
49369c9ff80cSmrg  if test "$pipe_works" = yes; then
49379c9ff80cSmrg    break
49389c9ff80cSmrg  else
49399c9ff80cSmrg    lt_cv_sys_global_symbol_pipe=
49409c9ff80cSmrg  fi
49416fae4e5dSmrgdone
49426fae4e5dSmrg])
49436fae4e5dSmrgif test -z "$lt_cv_sys_global_symbol_pipe"; then
49446fae4e5dSmrg  lt_cv_sys_global_symbol_to_cdecl=
49456fae4e5dSmrgfi
49466fae4e5dSmrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
49476fae4e5dSmrg  AC_MSG_RESULT(failed)
49486fae4e5dSmrgelse
49496fae4e5dSmrg  AC_MSG_RESULT(ok)
49506fae4e5dSmrgfi
49516fae4e5dSmrg
49526fae4e5dSmrg# Response file support.
49536fae4e5dSmrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then
49546fae4e5dSmrg  nm_file_list_spec='@'
49556fae4e5dSmrgelif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
49566fae4e5dSmrg  nm_file_list_spec='@'
49576fae4e5dSmrgfi
49586fae4e5dSmrg
49596fae4e5dSmrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
49606fae4e5dSmrg    [Take the output of nm and produce a listing of raw symbols and C names])
49616fae4e5dSmrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
49626fae4e5dSmrg    [Transform the output of nm in a proper C declaration])
49636fae4e5dSmrg_LT_DECL([global_symbol_to_c_name_address],
49646fae4e5dSmrg    [lt_cv_sys_global_symbol_to_c_name_address], [1],
49656fae4e5dSmrg    [Transform the output of nm in a C name address pair])
49666fae4e5dSmrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix],
49676fae4e5dSmrg    [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
49686fae4e5dSmrg    [Transform the output of nm in a C name address pair when lib prefix is needed])
49696fae4e5dSmrg_LT_DECL([], [nm_file_list_spec], [1],
49706fae4e5dSmrg    [Specify filename containing input files for $NM])
49716fae4e5dSmrg]) # _LT_CMD_GLOBAL_SYMBOLS
49726fae4e5dSmrg
49736fae4e5dSmrg
49746fae4e5dSmrg# _LT_COMPILER_PIC([TAGNAME])
49756fae4e5dSmrg# ---------------------------
49766fae4e5dSmrgm4_defun([_LT_COMPILER_PIC],
49776fae4e5dSmrg[m4_require([_LT_TAG_COMPILER])dnl
49786fae4e5dSmrg_LT_TAGVAR(lt_prog_compiler_wl, $1)=
49796fae4e5dSmrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=
49806fae4e5dSmrg_LT_TAGVAR(lt_prog_compiler_static, $1)=
49816fae4e5dSmrg
49826fae4e5dSmrgm4_if([$1], [CXX], [
49836fae4e5dSmrg  # C++ specific cases for pic, static, wl, etc.
49846fae4e5dSmrg  if test "$GXX" = yes; then
49856fae4e5dSmrg    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
49866fae4e5dSmrg    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
49876fae4e5dSmrg
49886fae4e5dSmrg    case $host_os in
49896fae4e5dSmrg    aix*)
49906fae4e5dSmrg      # All AIX code is PIC.
49916fae4e5dSmrg      if test "$host_cpu" = ia64; then
49926fae4e5dSmrg	# AIX 5 now supports IA64 processor
49936fae4e5dSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
49946fae4e5dSmrg      fi
49956fae4e5dSmrg      ;;
49966fae4e5dSmrg
49976fae4e5dSmrg    amigaos*)
49986fae4e5dSmrg      case $host_cpu in
49996fae4e5dSmrg      powerpc)
50006fae4e5dSmrg            # see comment about AmigaOS4 .so support
50016fae4e5dSmrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
50026fae4e5dSmrg        ;;
50036fae4e5dSmrg      m68k)
50046fae4e5dSmrg            # FIXME: we need at least 68020 code to build shared libraries, but
50056fae4e5dSmrg            # adding the `-m68020' flag to GCC prevents building anything better,
50066fae4e5dSmrg            # like `-m68040'.
50076fae4e5dSmrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
50086fae4e5dSmrg        ;;
50096fae4e5dSmrg      esac
50106fae4e5dSmrg      ;;
50116fae4e5dSmrg
50126fae4e5dSmrg    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
50136fae4e5dSmrg      # PIC is the default for these OSes.
50146fae4e5dSmrg      ;;
50156fae4e5dSmrg    mingw* | cygwin* | os2* | pw32* | cegcc*)
50166fae4e5dSmrg      # This hack is so that the source file can tell whether it is being
50176fae4e5dSmrg      # built for inclusion in a dll (and should export symbols for example).
50186fae4e5dSmrg      # Although the cygwin gcc ignores -fPIC, still need this for old-style
50196fae4e5dSmrg      # (--disable-auto-import) libraries
50206fae4e5dSmrg      m4_if([$1], [GCJ], [],
50216fae4e5dSmrg	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
50226fae4e5dSmrg      ;;
50236fae4e5dSmrg    darwin* | rhapsody*)
50246fae4e5dSmrg      # PIC is the default on this platform
50256fae4e5dSmrg      # Common symbols not allowed in MH_DYLIB files
50266fae4e5dSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
50276fae4e5dSmrg      ;;
50286fae4e5dSmrg    *djgpp*)
50296fae4e5dSmrg      # DJGPP does not support shared libraries at all
50306fae4e5dSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)=
50316fae4e5dSmrg      ;;
50326fae4e5dSmrg    haiku*)
50336fae4e5dSmrg      # PIC is the default for Haiku.
50346fae4e5dSmrg      # The "-static" flag exists, but is broken.
50356fae4e5dSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)=
50366fae4e5dSmrg      ;;
50376fae4e5dSmrg    interix[[3-9]]*)
50386fae4e5dSmrg      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
50396fae4e5dSmrg      # Instead, we relocate shared libraries at runtime.
50406fae4e5dSmrg      ;;
50416fae4e5dSmrg    sysv4*MP*)
50426fae4e5dSmrg      if test -d /usr/nec; then
50436fae4e5dSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
50446fae4e5dSmrg      fi
50456fae4e5dSmrg      ;;
50466fae4e5dSmrg    hpux*)
50476fae4e5dSmrg      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
50486fae4e5dSmrg      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
50496fae4e5dSmrg      # sets the default TLS model and affects inlining.
50506fae4e5dSmrg      case $host_cpu in
50516fae4e5dSmrg      hppa*64*)
50526fae4e5dSmrg	;;
50536fae4e5dSmrg      *)
50546fae4e5dSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
50556fae4e5dSmrg	;;
50566fae4e5dSmrg      esac
50576fae4e5dSmrg      ;;
50586fae4e5dSmrg    *qnx* | *nto*)
50596fae4e5dSmrg      # QNX uses GNU C++, but need to define -shared option too, otherwise
50606fae4e5dSmrg      # it will coredump.
50616fae4e5dSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
50626fae4e5dSmrg      ;;
50636fae4e5dSmrg    *)
50646fae4e5dSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
50656fae4e5dSmrg      ;;
50666fae4e5dSmrg    esac
50676fae4e5dSmrg  else
50686fae4e5dSmrg    case $host_os in
50696fae4e5dSmrg      aix[[4-9]]*)
50706fae4e5dSmrg	# All AIX code is PIC.
50716fae4e5dSmrg	if test "$host_cpu" = ia64; then
50726fae4e5dSmrg	  # AIX 5 now supports IA64 processor
50736fae4e5dSmrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
50746fae4e5dSmrg	else
50756fae4e5dSmrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
50766fae4e5dSmrg	fi
50776fae4e5dSmrg	;;
50786fae4e5dSmrg      chorus*)
50796fae4e5dSmrg	case $cc_basename in
50806fae4e5dSmrg	cxch68*)
50816fae4e5dSmrg	  # Green Hills C++ Compiler
50826fae4e5dSmrg	  # _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"
50836fae4e5dSmrg	  ;;
50846fae4e5dSmrg	esac
50856fae4e5dSmrg	;;
50866fae4e5dSmrg      mingw* | cygwin* | os2* | pw32* | cegcc*)
50876fae4e5dSmrg	# This hack is so that the source file can tell whether it is being
50886fae4e5dSmrg	# built for inclusion in a dll (and should export symbols for example).
50896fae4e5dSmrg	m4_if([$1], [GCJ], [],
50906fae4e5dSmrg	  [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
50916fae4e5dSmrg	;;
50926fae4e5dSmrg      dgux*)
50936fae4e5dSmrg	case $cc_basename in
50946fae4e5dSmrg	  ec++*)
50956fae4e5dSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
50966fae4e5dSmrg	    ;;
50976fae4e5dSmrg	  ghcx*)
50986fae4e5dSmrg	    # Green Hills C++ Compiler
50996fae4e5dSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
51006fae4e5dSmrg	    ;;
51016fae4e5dSmrg	  *)
51026fae4e5dSmrg	    ;;
51036fae4e5dSmrg	esac
51046fae4e5dSmrg	;;
51056fae4e5dSmrg      freebsd* | dragonfly*)
51066fae4e5dSmrg	# FreeBSD uses GNU C++
51076fae4e5dSmrg	;;
51086fae4e5dSmrg      hpux9* | hpux10* | hpux11*)
51096fae4e5dSmrg	case $cc_basename in
51106fae4e5dSmrg	  CC*)
51116fae4e5dSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
51126fae4e5dSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
51136fae4e5dSmrg	    if test "$host_cpu" != ia64; then
51146fae4e5dSmrg	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
51156fae4e5dSmrg	    fi
51166fae4e5dSmrg	    ;;
51176fae4e5dSmrg	  aCC*)
51186fae4e5dSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
51196fae4e5dSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
51206fae4e5dSmrg	    case $host_cpu in
51216fae4e5dSmrg	    hppa*64*|ia64*)
51226fae4e5dSmrg	      # +Z the default
51236fae4e5dSmrg	      ;;
51246fae4e5dSmrg	    *)
51256fae4e5dSmrg	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
51266fae4e5dSmrg	      ;;
51276fae4e5dSmrg	    esac
51286fae4e5dSmrg	    ;;
51296fae4e5dSmrg	  *)
51306fae4e5dSmrg	    ;;
51316fae4e5dSmrg	esac
51326fae4e5dSmrg	;;
51336fae4e5dSmrg      interix*)
51346fae4e5dSmrg	# This is c89, which is MS Visual C++ (no shared libs)
51356fae4e5dSmrg	# Anyone wants to do a port?
51366fae4e5dSmrg	;;
51376fae4e5dSmrg      irix5* | irix6* | nonstopux*)
51386fae4e5dSmrg	case $cc_basename in
51396fae4e5dSmrg	  CC*)
51406fae4e5dSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
51416fae4e5dSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
51426fae4e5dSmrg	    # CC pic flag -KPIC is the default.
51436fae4e5dSmrg	    ;;
51446fae4e5dSmrg	  *)
51456fae4e5dSmrg	    ;;
51466fae4e5dSmrg	esac
51476fae4e5dSmrg	;;
51486fae4e5dSmrg      linux* | k*bsd*-gnu | kopensolaris*-gnu)
51496fae4e5dSmrg	case $cc_basename in
51506fae4e5dSmrg	  KCC*)
51516fae4e5dSmrg	    # KAI C++ Compiler
51526fae4e5dSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
51536fae4e5dSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
51546fae4e5dSmrg	    ;;
51556fae4e5dSmrg	  ecpc* )
51566fae4e5dSmrg	    # old Intel C++ for x86_64 which still supported -KPIC.
51576fae4e5dSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
51586fae4e5dSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
51596fae4e5dSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
51606fae4e5dSmrg	    ;;
51616fae4e5dSmrg	  icpc* )
51626fae4e5dSmrg	    # Intel C++, used to be incompatible with GCC.
51636fae4e5dSmrg	    # ICC 10 doesn't accept -KPIC any more.
51646fae4e5dSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
51656fae4e5dSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
51666fae4e5dSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
51676fae4e5dSmrg	    ;;
51686fae4e5dSmrg	  pgCC* | pgcpp*)
51696fae4e5dSmrg	    # Portland Group C++ compiler
51706fae4e5dSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
51716fae4e5dSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
51726fae4e5dSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
51736fae4e5dSmrg	    ;;
51746fae4e5dSmrg	  cxx*)
51756fae4e5dSmrg	    # Compaq C++
51766fae4e5dSmrg	    # Make sure the PIC flag is empty.  It appears that all Alpha
51776fae4e5dSmrg	    # Linux and Compaq Tru64 Unix objects are PIC.
51786fae4e5dSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
51796fae4e5dSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
51806fae4e5dSmrg	    ;;
51816fae4e5dSmrg	  xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
51826fae4e5dSmrg	    # IBM XL 8.0, 9.0 on PPC and BlueGene
51836fae4e5dSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
51846fae4e5dSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
51856fae4e5dSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
51866fae4e5dSmrg	    ;;
51876fae4e5dSmrg	  *)
51886fae4e5dSmrg	    case `$CC -V 2>&1 | sed 5q` in
51896fae4e5dSmrg	    *Sun\ C*)
51906fae4e5dSmrg	      # Sun C++ 5.9
51916fae4e5dSmrg	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
51926fae4e5dSmrg	      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
51936fae4e5dSmrg	      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
51946fae4e5dSmrg	      ;;
51956fae4e5dSmrg	    esac
51966fae4e5dSmrg	    ;;
51976fae4e5dSmrg	esac
51986fae4e5dSmrg	;;
51996fae4e5dSmrg      lynxos*)
52006fae4e5dSmrg	;;
52016fae4e5dSmrg      m88k*)
52026fae4e5dSmrg	;;
52036fae4e5dSmrg      mvs*)
52046fae4e5dSmrg	case $cc_basename in
52056fae4e5dSmrg	  cxx*)
52066fae4e5dSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
52076fae4e5dSmrg	    ;;
52086fae4e5dSmrg	  *)
52096fae4e5dSmrg	    ;;
52106fae4e5dSmrg	esac
52116fae4e5dSmrg	;;
52126fae4e5dSmrg      netbsd*)
52136fae4e5dSmrg	;;
52146fae4e5dSmrg      *qnx* | *nto*)
52156fae4e5dSmrg        # QNX uses GNU C++, but need to define -shared option too, otherwise
52166fae4e5dSmrg        # it will coredump.
52176fae4e5dSmrg        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
52186fae4e5dSmrg        ;;
52196fae4e5dSmrg      osf3* | osf4* | osf5*)
52206fae4e5dSmrg	case $cc_basename in
52216fae4e5dSmrg	  KCC*)
52226fae4e5dSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
52236fae4e5dSmrg	    ;;
52246fae4e5dSmrg	  RCC*)
52256fae4e5dSmrg	    # Rational C++ 2.4.1
52266fae4e5dSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
52276fae4e5dSmrg	    ;;
52286fae4e5dSmrg	  cxx*)
52296fae4e5dSmrg	    # Digital/Compaq C++
52306fae4e5dSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
52316fae4e5dSmrg	    # Make sure the PIC flag is empty.  It appears that all Alpha
52326fae4e5dSmrg	    # Linux and Compaq Tru64 Unix objects are PIC.
52336fae4e5dSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
52346fae4e5dSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
52356fae4e5dSmrg	    ;;
52366fae4e5dSmrg	  *)
52376fae4e5dSmrg	    ;;
52386fae4e5dSmrg	esac
52396fae4e5dSmrg	;;
52406fae4e5dSmrg      psos*)
52416fae4e5dSmrg	;;
52426fae4e5dSmrg      solaris*)
52436fae4e5dSmrg	case $cc_basename in
52446fae4e5dSmrg	  CC* | sunCC*)
52456fae4e5dSmrg	    # Sun C++ 4.2, 5.x and Centerline C++
52466fae4e5dSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
52476fae4e5dSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
52486fae4e5dSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
52496fae4e5dSmrg	    ;;
52506fae4e5dSmrg	  gcx*)
52516fae4e5dSmrg	    # Green Hills C++ Compiler
52526fae4e5dSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
52536fae4e5dSmrg	    ;;
52546fae4e5dSmrg	  *)
52556fae4e5dSmrg	    ;;
52566fae4e5dSmrg	esac
52576fae4e5dSmrg	;;
52586fae4e5dSmrg      sunos4*)
52596fae4e5dSmrg	case $cc_basename in
52606fae4e5dSmrg	  CC*)
52616fae4e5dSmrg	    # Sun C++ 4.x
52626fae4e5dSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
52636fae4e5dSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
52646fae4e5dSmrg	    ;;
52656fae4e5dSmrg	  lcc*)
52666fae4e5dSmrg	    # Lucid
52676fae4e5dSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
52686fae4e5dSmrg	    ;;
52696fae4e5dSmrg	  *)
52706fae4e5dSmrg	    ;;
52716fae4e5dSmrg	esac
52726fae4e5dSmrg	;;
52736fae4e5dSmrg      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
52746fae4e5dSmrg	case $cc_basename in
52756fae4e5dSmrg	  CC*)
52766fae4e5dSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
52776fae4e5dSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
52786fae4e5dSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
52796fae4e5dSmrg	    ;;
52806fae4e5dSmrg	esac
52816fae4e5dSmrg	;;
52826fae4e5dSmrg      tandem*)
52836fae4e5dSmrg	case $cc_basename in
52846fae4e5dSmrg	  NCC*)
52856fae4e5dSmrg	    # NonStop-UX NCC 3.20
52866fae4e5dSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
52876fae4e5dSmrg	    ;;
52886fae4e5dSmrg	  *)
52896fae4e5dSmrg	    ;;
52906fae4e5dSmrg	esac
52916fae4e5dSmrg	;;
52926fae4e5dSmrg      vxworks*)
52936fae4e5dSmrg	;;
52946fae4e5dSmrg      *)
52956fae4e5dSmrg	_LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
52966fae4e5dSmrg	;;
52976fae4e5dSmrg    esac
52986fae4e5dSmrg  fi
52996fae4e5dSmrg],
53006fae4e5dSmrg[
53016fae4e5dSmrg  if test "$GCC" = yes; then
53029c9ff80cSmrg    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
53039c9ff80cSmrg    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
53041f0ac6a5Smrg
53059c9ff80cSmrg    case $host_os in
53066fae4e5dSmrg      aix*)
53079c9ff80cSmrg      # All AIX code is PIC.
53081f0ac6a5Smrg      if test "$host_cpu" = ia64; then
53099c9ff80cSmrg	# AIX 5 now supports IA64 processor
53109c9ff80cSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
53111f0ac6a5Smrg      fi
53129c9ff80cSmrg      ;;
53131f0ac6a5Smrg
53149c9ff80cSmrg    amigaos*)
53159c9ff80cSmrg      case $host_cpu in
53169c9ff80cSmrg      powerpc)
53179c9ff80cSmrg            # see comment about AmigaOS4 .so support
53189c9ff80cSmrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
53199c9ff80cSmrg        ;;
53209c9ff80cSmrg      m68k)
53219c9ff80cSmrg            # FIXME: we need at least 68020 code to build shared libraries, but
53229c9ff80cSmrg            # adding the `-m68020' flag to GCC prevents building anything better,
53239c9ff80cSmrg            # like `-m68040'.
53249c9ff80cSmrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
53251f0ac6a5Smrg        ;;
53269c9ff80cSmrg      esac
53279c9ff80cSmrg      ;;
53281f0ac6a5Smrg
53299c9ff80cSmrg    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
53309c9ff80cSmrg      # PIC is the default for these OSes.
53319c9ff80cSmrg      ;;
53326fae4e5dSmrg
53336fae4e5dSmrg    mingw* | cygwin* | pw32* | os2* | cegcc*)
53349c9ff80cSmrg      # This hack is so that the source file can tell whether it is being
53359c9ff80cSmrg      # built for inclusion in a dll (and should export symbols for example).
53369c9ff80cSmrg      # Although the cygwin gcc ignores -fPIC, still need this for old-style
53379c9ff80cSmrg      # (--disable-auto-import) libraries
53389c9ff80cSmrg      m4_if([$1], [GCJ], [],
53399c9ff80cSmrg	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
53409c9ff80cSmrg      ;;
53416fae4e5dSmrg
53429c9ff80cSmrg    darwin* | rhapsody*)
53439c9ff80cSmrg      # PIC is the default on this platform
53449c9ff80cSmrg      # Common symbols not allowed in MH_DYLIB files
53459c9ff80cSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
53469c9ff80cSmrg      ;;
53476fae4e5dSmrg
53486fae4e5dSmrg    haiku*)
53496fae4e5dSmrg      # PIC is the default for Haiku.
53506fae4e5dSmrg      # The "-static" flag exists, but is broken.
53516fae4e5dSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)=
53526fae4e5dSmrg      ;;
53536fae4e5dSmrg
53546fae4e5dSmrg    hpux*)
53556fae4e5dSmrg      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
53566fae4e5dSmrg      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
53576fae4e5dSmrg      # sets the default TLS model and affects inlining.
53586fae4e5dSmrg      case $host_cpu in
53596fae4e5dSmrg      hppa*64*)
53606fae4e5dSmrg	# +Z the default
53616fae4e5dSmrg	;;
53626fae4e5dSmrg      *)
53636fae4e5dSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
53646fae4e5dSmrg	;;
53656fae4e5dSmrg      esac
53666fae4e5dSmrg      ;;
53676fae4e5dSmrg
53686fae4e5dSmrg    interix[[3-9]]*)
53696fae4e5dSmrg      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
53706fae4e5dSmrg      # Instead, we relocate shared libraries at runtime.
53716fae4e5dSmrg      ;;
53726fae4e5dSmrg
53736fae4e5dSmrg    msdosdjgpp*)
53746fae4e5dSmrg      # Just because we use GCC doesn't mean we suddenly get shared libraries
53756fae4e5dSmrg      # on systems that don't support them.
53766fae4e5dSmrg      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
53776fae4e5dSmrg      enable_shared=no
53786fae4e5dSmrg      ;;
53796fae4e5dSmrg
53806fae4e5dSmrg    *nto* | *qnx*)
53816fae4e5dSmrg      # QNX uses GNU C++, but need to define -shared option too, otherwise
53826fae4e5dSmrg      # it will coredump.
53836fae4e5dSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
53846fae4e5dSmrg      ;;
53856fae4e5dSmrg
53866fae4e5dSmrg    sysv4*MP*)
53876fae4e5dSmrg      if test -d /usr/nec; then
53886fae4e5dSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
53896fae4e5dSmrg      fi
53906fae4e5dSmrg      ;;
53916fae4e5dSmrg
53926fae4e5dSmrg    *)
53936fae4e5dSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
53946fae4e5dSmrg      ;;
53956fae4e5dSmrg    esac
53966fae4e5dSmrg
53976fae4e5dSmrg    case $cc_basename in
53986fae4e5dSmrg    nvcc*) # Cuda Compiler Driver 2.2
53996fae4e5dSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
54006fae4e5dSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Xcompiler -fPIC'
54016fae4e5dSmrg      ;;
54026fae4e5dSmrg    esac
54036fae4e5dSmrg  else
54046fae4e5dSmrg    # PORTME Check for flag to pass linker flags through the system compiler.
54056fae4e5dSmrg    case $host_os in
54066fae4e5dSmrg    aix*)
54076fae4e5dSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
54086fae4e5dSmrg      if test "$host_cpu" = ia64; then
54096fae4e5dSmrg	# AIX 5 now supports IA64 processor
54106fae4e5dSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
54116fae4e5dSmrg      else
54126fae4e5dSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
54136fae4e5dSmrg      fi
54146fae4e5dSmrg      ;;
54156fae4e5dSmrg
54166fae4e5dSmrg    mingw* | cygwin* | pw32* | os2* | cegcc*)
54176fae4e5dSmrg      # This hack is so that the source file can tell whether it is being
54186fae4e5dSmrg      # built for inclusion in a dll (and should export symbols for example).
54196fae4e5dSmrg      m4_if([$1], [GCJ], [],
54206fae4e5dSmrg	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
54216fae4e5dSmrg      ;;
54226fae4e5dSmrg
54236fae4e5dSmrg    hpux9* | hpux10* | hpux11*)
54246fae4e5dSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
54256fae4e5dSmrg      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
54266fae4e5dSmrg      # not for PA HP-UX.
54276fae4e5dSmrg      case $host_cpu in
54286fae4e5dSmrg      hppa*64*|ia64*)
54296fae4e5dSmrg	# +Z the default
54306fae4e5dSmrg	;;
54316fae4e5dSmrg      *)
54326fae4e5dSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
54336fae4e5dSmrg	;;
54346fae4e5dSmrg      esac
54356fae4e5dSmrg      # Is there a better lt_prog_compiler_static that works with the bundled CC?
54366fae4e5dSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
54376fae4e5dSmrg      ;;
54386fae4e5dSmrg
54396fae4e5dSmrg    irix5* | irix6* | nonstopux*)
54406fae4e5dSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
54416fae4e5dSmrg      # PIC (with -KPIC) is the default.
54426fae4e5dSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
54436fae4e5dSmrg      ;;
54446fae4e5dSmrg
54456fae4e5dSmrg    linux* | k*bsd*-gnu | kopensolaris*-gnu)
54466fae4e5dSmrg      case $cc_basename in
54476fae4e5dSmrg      # old Intel for x86_64 which still supported -KPIC.
54486fae4e5dSmrg      ecc*)
54496fae4e5dSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
54506fae4e5dSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
54516fae4e5dSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
54526fae4e5dSmrg        ;;
54536fae4e5dSmrg      # icc used to be incompatible with GCC.
54546fae4e5dSmrg      # ICC 10 doesn't accept -KPIC any more.
54556fae4e5dSmrg      icc* | ifort*)
54566fae4e5dSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
54576fae4e5dSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
54586fae4e5dSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
54596fae4e5dSmrg        ;;
54606fae4e5dSmrg      # Lahey Fortran 8.1.
54616fae4e5dSmrg      lf95*)
54626fae4e5dSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
54636fae4e5dSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
54646fae4e5dSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
54656fae4e5dSmrg	;;
54666fae4e5dSmrg      nagfor*)
54676fae4e5dSmrg	# NAG Fortran compiler
54686fae4e5dSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
54696fae4e5dSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
54706fae4e5dSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
54716fae4e5dSmrg	;;
54726fae4e5dSmrg      pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
54736fae4e5dSmrg        # Portland Group compilers (*not* the Pentium gcc compiler,
54746fae4e5dSmrg	# which looks to be a dead project)
54756fae4e5dSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
54766fae4e5dSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
54776fae4e5dSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
54786fae4e5dSmrg        ;;
54796fae4e5dSmrg      ccc*)
54806fae4e5dSmrg        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
54816fae4e5dSmrg        # All Alpha code is PIC.
54826fae4e5dSmrg        _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
54836fae4e5dSmrg        ;;
54846fae4e5dSmrg      xl* | bgxl* | bgf* | mpixl*)
54856fae4e5dSmrg	# IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
54866fae4e5dSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
54876fae4e5dSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
54886fae4e5dSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
54896fae4e5dSmrg	;;
54906fae4e5dSmrg      *)
54916fae4e5dSmrg	case `$CC -V 2>&1 | sed 5q` in
54926fae4e5dSmrg	*Sun\ F* | *Sun*Fortran*)
54936fae4e5dSmrg	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
54946fae4e5dSmrg	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
54956fae4e5dSmrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
54966fae4e5dSmrg	  _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
54976fae4e5dSmrg	  ;;
54986fae4e5dSmrg	*Sun\ C*)
54996fae4e5dSmrg	  # Sun C 5.9
55006fae4e5dSmrg	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
55016fae4e5dSmrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
55026fae4e5dSmrg	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
55036fae4e5dSmrg	  ;;
55046fae4e5dSmrg	esac
55056fae4e5dSmrg	;;
55066fae4e5dSmrg      esac
55076fae4e5dSmrg      ;;
55086fae4e5dSmrg
55096fae4e5dSmrg    newsos6)
55106fae4e5dSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
55116fae4e5dSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
55126fae4e5dSmrg      ;;
55136fae4e5dSmrg
55146fae4e5dSmrg    *nto* | *qnx*)
55156fae4e5dSmrg      # QNX uses GNU C++, but need to define -shared option too, otherwise
55166fae4e5dSmrg      # it will coredump.
55176fae4e5dSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
55186fae4e5dSmrg      ;;
55196fae4e5dSmrg
55206fae4e5dSmrg    osf3* | osf4* | osf5*)
55216fae4e5dSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
55226fae4e5dSmrg      # All OSF/1 code is PIC.
55236fae4e5dSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
55246fae4e5dSmrg      ;;
55256fae4e5dSmrg
55266fae4e5dSmrg    rdos*)
55276fae4e5dSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
55286fae4e5dSmrg      ;;
55296fae4e5dSmrg
55306fae4e5dSmrg    solaris*)
55316fae4e5dSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
55326fae4e5dSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
55336fae4e5dSmrg      case $cc_basename in
55346fae4e5dSmrg      f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
55356fae4e5dSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
55366fae4e5dSmrg      *)
55376fae4e5dSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
55386fae4e5dSmrg      esac
55396fae4e5dSmrg      ;;
55406fae4e5dSmrg
55416fae4e5dSmrg    sunos4*)
55426fae4e5dSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
55436fae4e5dSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
55446fae4e5dSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
55459c9ff80cSmrg      ;;
55466fae4e5dSmrg
55476fae4e5dSmrg    sysv4 | sysv4.2uw2* | sysv4.3*)
55486fae4e5dSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
55496fae4e5dSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
55506fae4e5dSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
55519c9ff80cSmrg      ;;
55526fae4e5dSmrg
55539c9ff80cSmrg    sysv4*MP*)
55546fae4e5dSmrg      if test -d /usr/nec ;then
55556fae4e5dSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
55566fae4e5dSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
55579c9ff80cSmrg      fi
55589c9ff80cSmrg      ;;
55596fae4e5dSmrg
55606fae4e5dSmrg    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
55616fae4e5dSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
55626fae4e5dSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
55636fae4e5dSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
55641f0ac6a5Smrg      ;;
55656fae4e5dSmrg
55666fae4e5dSmrg    unicos*)
55676fae4e5dSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
55686fae4e5dSmrg      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
55696fae4e5dSmrg      ;;
55706fae4e5dSmrg
55716fae4e5dSmrg    uts4*)
55726fae4e5dSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
55736fae4e5dSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
55741f0ac6a5Smrg      ;;
55756fae4e5dSmrg
55761f0ac6a5Smrg    *)
55776fae4e5dSmrg      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
55781f0ac6a5Smrg      ;;
55791f0ac6a5Smrg    esac
55806fae4e5dSmrg  fi
55816fae4e5dSmrg])
55826fae4e5dSmrgcase $host_os in
55836fae4e5dSmrg  # For platforms which do not support PIC, -DPIC is meaningless:
55846fae4e5dSmrg  *djgpp*)
55856fae4e5dSmrg    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
55866fae4e5dSmrg    ;;
55876fae4e5dSmrg  *)
55886fae4e5dSmrg    _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
55896fae4e5dSmrg    ;;
55906fae4e5dSmrgesac
55916fae4e5dSmrg
55926fae4e5dSmrgAC_CACHE_CHECK([for $compiler option to produce PIC],
55936fae4e5dSmrg  [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
55946fae4e5dSmrg  [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
55956fae4e5dSmrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
55966fae4e5dSmrg
55976fae4e5dSmrg#
55986fae4e5dSmrg# Check to make sure the PIC flag actually works.
55996fae4e5dSmrg#
56006fae4e5dSmrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
56016fae4e5dSmrg  _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
56026fae4e5dSmrg    [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
56036fae4e5dSmrg    [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
56046fae4e5dSmrg    [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
56056fae4e5dSmrg     "" | " "*) ;;
56066fae4e5dSmrg     *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
56076fae4e5dSmrg     esac],
56086fae4e5dSmrg    [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
56096fae4e5dSmrg     _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
56106fae4e5dSmrgfi
56116fae4e5dSmrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
56126fae4e5dSmrg	[Additional compiler flags for building library objects])
56136fae4e5dSmrg
56146fae4e5dSmrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
56156fae4e5dSmrg	[How to pass a linker flag through the compiler])
56166fae4e5dSmrg#
56176fae4e5dSmrg# Check to make sure the static flag actually works.
56186fae4e5dSmrg#
56196fae4e5dSmrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
56206fae4e5dSmrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
56216fae4e5dSmrg  _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
56226fae4e5dSmrg  $lt_tmp_static_flag,
56236fae4e5dSmrg  [],
56246fae4e5dSmrg  [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
56256fae4e5dSmrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
56266fae4e5dSmrg	[Compiler flag to prevent dynamic linking])
56276fae4e5dSmrg])# _LT_COMPILER_PIC
56286fae4e5dSmrg
56296fae4e5dSmrg
56306fae4e5dSmrg# _LT_LINKER_SHLIBS([TAGNAME])
56316fae4e5dSmrg# ----------------------------
56326fae4e5dSmrg# See if the linker supports building shared libraries.
56336fae4e5dSmrgm4_defun([_LT_LINKER_SHLIBS],
56346fae4e5dSmrg[AC_REQUIRE([LT_PATH_LD])dnl
56356fae4e5dSmrgAC_REQUIRE([LT_PATH_NM])dnl
56366fae4e5dSmrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl
56376fae4e5dSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
56386fae4e5dSmrgm4_require([_LT_DECL_EGREP])dnl
56396fae4e5dSmrgm4_require([_LT_DECL_SED])dnl
56406fae4e5dSmrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
56416fae4e5dSmrgm4_require([_LT_TAG_COMPILER])dnl
56426fae4e5dSmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
56436fae4e5dSmrgm4_if([$1], [CXX], [
56446fae4e5dSmrg  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
56456fae4e5dSmrg  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
56466fae4e5dSmrg  case $host_os in
56476fae4e5dSmrg  aix[[4-9]]*)
56486fae4e5dSmrg    # If we're using GNU nm, then we don't want the "-C" option.
56496fae4e5dSmrg    # -C means demangle to AIX nm, but means don't demangle with GNU nm
56506fae4e5dSmrg    # Also, AIX nm treats weak defined symbols like other global defined
56516fae4e5dSmrg    # symbols, whereas GNU nm marks them as "W".
56526fae4e5dSmrg    if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
56536fae4e5dSmrg      _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'
56546fae4e5dSmrg    else
56556fae4e5dSmrg      _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'
56566fae4e5dSmrg    fi
56576fae4e5dSmrg    ;;
56586fae4e5dSmrg  pw32*)
56596fae4e5dSmrg    _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
56606fae4e5dSmrg    ;;
56616fae4e5dSmrg  cygwin* | mingw* | cegcc*)
56626fae4e5dSmrg    case $cc_basename in
56636fae4e5dSmrg    cl*) ;;
56646fae4e5dSmrg    *)
56656fae4e5dSmrg      _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'
56666fae4e5dSmrg      _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
56676fae4e5dSmrg      ;;
56686fae4e5dSmrg    esac
56696fae4e5dSmrg    ;;
56706fae4e5dSmrg  *)
56716fae4e5dSmrg    _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
56726fae4e5dSmrg    ;;
56736fae4e5dSmrg  esac
56746fae4e5dSmrg], [
56756fae4e5dSmrg  runpath_var=
56766fae4e5dSmrg  _LT_TAGVAR(allow_undefined_flag, $1)=
56776fae4e5dSmrg  _LT_TAGVAR(always_export_symbols, $1)=no
56786fae4e5dSmrg  _LT_TAGVAR(archive_cmds, $1)=
56796fae4e5dSmrg  _LT_TAGVAR(archive_expsym_cmds, $1)=
56806fae4e5dSmrg  _LT_TAGVAR(compiler_needs_object, $1)=no
56816fae4e5dSmrg  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
56826fae4e5dSmrg  _LT_TAGVAR(export_dynamic_flag_spec, $1)=
56836fae4e5dSmrg  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
56846fae4e5dSmrg  _LT_TAGVAR(hardcode_automatic, $1)=no
56856fae4e5dSmrg  _LT_TAGVAR(hardcode_direct, $1)=no
56866fae4e5dSmrg  _LT_TAGVAR(hardcode_direct_absolute, $1)=no
56876fae4e5dSmrg  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
56886fae4e5dSmrg  _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
56896fae4e5dSmrg  _LT_TAGVAR(hardcode_libdir_separator, $1)=
56906fae4e5dSmrg  _LT_TAGVAR(hardcode_minus_L, $1)=no
56916fae4e5dSmrg  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
56926fae4e5dSmrg  _LT_TAGVAR(inherit_rpath, $1)=no
56936fae4e5dSmrg  _LT_TAGVAR(link_all_deplibs, $1)=unknown
56946fae4e5dSmrg  _LT_TAGVAR(module_cmds, $1)=
56956fae4e5dSmrg  _LT_TAGVAR(module_expsym_cmds, $1)=
56966fae4e5dSmrg  _LT_TAGVAR(old_archive_from_new_cmds, $1)=
56976fae4e5dSmrg  _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
56986fae4e5dSmrg  _LT_TAGVAR(thread_safe_flag_spec, $1)=
56996fae4e5dSmrg  _LT_TAGVAR(whole_archive_flag_spec, $1)=
57006fae4e5dSmrg  # include_expsyms should be a list of space-separated symbols to be *always*
57016fae4e5dSmrg  # included in the symbol list
57026fae4e5dSmrg  _LT_TAGVAR(include_expsyms, $1)=
57036fae4e5dSmrg  # exclude_expsyms can be an extended regexp of symbols to exclude
57046fae4e5dSmrg  # it will be wrapped by ` (' and `)$', so one must not match beginning or
57056fae4e5dSmrg  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
57066fae4e5dSmrg  # as well as any symbol that contains `d'.
57076fae4e5dSmrg  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
57086fae4e5dSmrg  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
57096fae4e5dSmrg  # platforms (ab)use it in PIC code, but their linkers get confused if
57106fae4e5dSmrg  # the symbol is explicitly referenced.  Since portable code cannot
57116fae4e5dSmrg  # rely on this symbol name, it's probably fine to never include it in
57126fae4e5dSmrg  # preloaded symbol tables.
57136fae4e5dSmrg  # Exclude shared library initialization/finalization symbols.
57146fae4e5dSmrgdnl Note also adjust exclude_expsyms for C++ above.
57156fae4e5dSmrg  extract_expsyms_cmds=
57166fae4e5dSmrg
57176fae4e5dSmrg  case $host_os in
57186fae4e5dSmrg  cygwin* | mingw* | pw32* | cegcc*)
57196fae4e5dSmrg    # FIXME: the MSVC++ port hasn't been tested in a loooong time
57206fae4e5dSmrg    # When not using gcc, we currently assume that we are using
57216fae4e5dSmrg    # Microsoft Visual C++.
57226fae4e5dSmrg    if test "$GCC" != yes; then
57236fae4e5dSmrg      with_gnu_ld=no
57246fae4e5dSmrg    fi
57256fae4e5dSmrg    ;;
57266fae4e5dSmrg  interix*)
57276fae4e5dSmrg    # we just hope/assume this is gcc and not c89 (= MSVC++)
57286fae4e5dSmrg    with_gnu_ld=yes
57296fae4e5dSmrg    ;;
57306fae4e5dSmrg  openbsd*)
57316fae4e5dSmrg    with_gnu_ld=no
57326fae4e5dSmrg    ;;
57336fae4e5dSmrg  esac
57346fae4e5dSmrg
57356fae4e5dSmrg  _LT_TAGVAR(ld_shlibs, $1)=yes
57366fae4e5dSmrg
57376fae4e5dSmrg  # On some targets, GNU ld is compatible enough with the native linker
57386fae4e5dSmrg  # that we're better off using the native interface for both.
57396fae4e5dSmrg  lt_use_gnu_ld_interface=no
57406fae4e5dSmrg  if test "$with_gnu_ld" = yes; then
57416fae4e5dSmrg    case $host_os in
57426fae4e5dSmrg      aix*)
57436fae4e5dSmrg	# The AIX port of GNU ld has always aspired to compatibility
57446fae4e5dSmrg	# with the native linker.  However, as the warning in the GNU ld
57456fae4e5dSmrg	# block says, versions before 2.19.5* couldn't really create working
57466fae4e5dSmrg	# shared libraries, regardless of the interface used.
57476fae4e5dSmrg	case `$LD -v 2>&1` in
57486fae4e5dSmrg	  *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
57496fae4e5dSmrg	  *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
57506fae4e5dSmrg	  *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
57519c9ff80cSmrg	  *)
57526fae4e5dSmrg	    lt_use_gnu_ld_interface=yes
57539c9ff80cSmrg	    ;;
57549c9ff80cSmrg	esac
57551f0ac6a5Smrg	;;
57566fae4e5dSmrg      *)
57576fae4e5dSmrg	lt_use_gnu_ld_interface=yes
57581f0ac6a5Smrg	;;
57596fae4e5dSmrg    esac
57606fae4e5dSmrg  fi
57616fae4e5dSmrg
57626fae4e5dSmrg  if test "$lt_use_gnu_ld_interface" = yes; then
57636fae4e5dSmrg    # If archive_cmds runs LD, not CC, wlarc should be empty
57646fae4e5dSmrg    wlarc='${wl}'
57656fae4e5dSmrg
57666fae4e5dSmrg    # Set some defaults for GNU ld with shared library support. These
57676fae4e5dSmrg    # are reset later if shared libraries are not supported. Putting them
57686fae4e5dSmrg    # here allows them to be overridden if necessary.
57696fae4e5dSmrg    runpath_var=LD_RUN_PATH
57706fae4e5dSmrg    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
57716fae4e5dSmrg    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
57726fae4e5dSmrg    # ancient GNU ld didn't support --whole-archive et. al.
57736fae4e5dSmrg    if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
57746fae4e5dSmrg      _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
57756fae4e5dSmrg    else
57766fae4e5dSmrg      _LT_TAGVAR(whole_archive_flag_spec, $1)=
57776fae4e5dSmrg    fi
57786fae4e5dSmrg    supports_anon_versioning=no
57796fae4e5dSmrg    case `$LD -v 2>&1` in
57806fae4e5dSmrg      *GNU\ gold*) supports_anon_versioning=yes ;;
57816fae4e5dSmrg      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
57826fae4e5dSmrg      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
57836fae4e5dSmrg      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
57846fae4e5dSmrg      *\ 2.11.*) ;; # other 2.11 versions
57856fae4e5dSmrg      *) supports_anon_versioning=yes ;;
57866fae4e5dSmrg    esac
57876fae4e5dSmrg
57886fae4e5dSmrg    # See if GNU ld supports shared libraries.
57896fae4e5dSmrg    case $host_os in
57906fae4e5dSmrg    aix[[3-9]]*)
57916fae4e5dSmrg      # On AIX/PPC, the GNU linker is very broken
57926fae4e5dSmrg      if test "$host_cpu" != ia64; then
57936fae4e5dSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
57946fae4e5dSmrg	cat <<_LT_EOF 1>&2
57956fae4e5dSmrg
57966fae4e5dSmrg*** Warning: the GNU linker, at least up to release 2.19, is reported
57976fae4e5dSmrg*** to be unable to reliably create shared libraries on AIX.
57986fae4e5dSmrg*** Therefore, libtool is disabling shared libraries support.  If you
57996fae4e5dSmrg*** really care for shared libraries, you may want to install binutils
58006fae4e5dSmrg*** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
58016fae4e5dSmrg*** You will then need to restart the configuration process.
58026fae4e5dSmrg
58036fae4e5dSmrg_LT_EOF
58046fae4e5dSmrg      fi
58056fae4e5dSmrg      ;;
58066fae4e5dSmrg
58076fae4e5dSmrg    amigaos*)
58086fae4e5dSmrg      case $host_cpu in
58096fae4e5dSmrg      powerpc)
58106fae4e5dSmrg            # see comment about AmigaOS4 .so support
58116fae4e5dSmrg            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
58126fae4e5dSmrg            _LT_TAGVAR(archive_expsym_cmds, $1)=''
58139c9ff80cSmrg        ;;
58146fae4e5dSmrg      m68k)
58156fae4e5dSmrg            _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)'
58166fae4e5dSmrg            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
58176fae4e5dSmrg            _LT_TAGVAR(hardcode_minus_L, $1)=yes
58186fae4e5dSmrg        ;;
58196fae4e5dSmrg      esac
58206fae4e5dSmrg      ;;
58216fae4e5dSmrg
58226fae4e5dSmrg    beos*)
58236fae4e5dSmrg      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
58246fae4e5dSmrg	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
58256fae4e5dSmrg	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
58266fae4e5dSmrg	# support --undefined.  This deserves some investigation.  FIXME
58276fae4e5dSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
58286fae4e5dSmrg      else
58296fae4e5dSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
58306fae4e5dSmrg      fi
58316fae4e5dSmrg      ;;
58326fae4e5dSmrg
58336fae4e5dSmrg    cygwin* | mingw* | pw32* | cegcc*)
58346fae4e5dSmrg      # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
58356fae4e5dSmrg      # as there is no search path for DLLs.
58366fae4e5dSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
58376fae4e5dSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
58386fae4e5dSmrg      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
58396fae4e5dSmrg      _LT_TAGVAR(always_export_symbols, $1)=no
58406fae4e5dSmrg      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
58416fae4e5dSmrg      _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'
58426fae4e5dSmrg      _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
58436fae4e5dSmrg
58446fae4e5dSmrg      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
58456fae4e5dSmrg        _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'
58466fae4e5dSmrg	# If the export-symbols file already is a .def file (1st line
58476fae4e5dSmrg	# is EXPORTS), use it as is; otherwise, prepend...
58486fae4e5dSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
58496fae4e5dSmrg	  cp $export_symbols $output_objdir/$soname.def;
58506fae4e5dSmrg	else
58516fae4e5dSmrg	  echo EXPORTS > $output_objdir/$soname.def;
58526fae4e5dSmrg	  cat $export_symbols >> $output_objdir/$soname.def;
58536fae4e5dSmrg	fi~
58546fae4e5dSmrg	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
58556fae4e5dSmrg      else
58566fae4e5dSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
58576fae4e5dSmrg      fi
58586fae4e5dSmrg      ;;
58596fae4e5dSmrg
58606fae4e5dSmrg    haiku*)
58616fae4e5dSmrg      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
58626fae4e5dSmrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
58636fae4e5dSmrg      ;;
58646fae4e5dSmrg
58656fae4e5dSmrg    interix[[3-9]]*)
58666fae4e5dSmrg      _LT_TAGVAR(hardcode_direct, $1)=no
58676fae4e5dSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
58686fae4e5dSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
58696fae4e5dSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
58706fae4e5dSmrg      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
58716fae4e5dSmrg      # Instead, shared libraries are loaded at an image base (0x10000000 by
58726fae4e5dSmrg      # default) and relocated if they conflict, which is a slow very memory
58736fae4e5dSmrg      # consuming and fragmenting process.  To avoid this, we pick a random,
58746fae4e5dSmrg      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
58756fae4e5dSmrg      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
58766fae4e5dSmrg      _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'
58776fae4e5dSmrg      _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'
58786fae4e5dSmrg      ;;
58796fae4e5dSmrg
58806fae4e5dSmrg    gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
58816fae4e5dSmrg      tmp_diet=no
58826fae4e5dSmrg      if test "$host_os" = linux-dietlibc; then
58839c9ff80cSmrg	case $cc_basename in
58846fae4e5dSmrg	  diet\ *) tmp_diet=yes;;	# linux-dietlibc with static linking (!diet-dyn)
58851f0ac6a5Smrg	esac
58866fae4e5dSmrg      fi
58876fae4e5dSmrg      if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
58886fae4e5dSmrg	 && test "$tmp_diet" = no
58896fae4e5dSmrg      then
58906fae4e5dSmrg	tmp_addflag=' $pic_flag'
58916fae4e5dSmrg	tmp_sharedflag='-shared'
58926fae4e5dSmrg	case $cc_basename,$host_cpu in
58936fae4e5dSmrg        pgcc*)				# Portland Group C compiler
58946fae4e5dSmrg	  _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'
58956fae4e5dSmrg	  tmp_addflag=' $pic_flag'
58966fae4e5dSmrg	  ;;
58976fae4e5dSmrg	pgf77* | pgf90* | pgf95* | pgfortran*)
58986fae4e5dSmrg					# Portland Group f77 and f90 compilers
58996fae4e5dSmrg	  _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'
59006fae4e5dSmrg	  tmp_addflag=' $pic_flag -Mnomain' ;;
59016fae4e5dSmrg	ecc*,ia64* | icc*,ia64*)	# Intel C compiler on ia64
59026fae4e5dSmrg	  tmp_addflag=' -i_dynamic' ;;
59036fae4e5dSmrg	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
59046fae4e5dSmrg	  tmp_addflag=' -i_dynamic -nofor_main' ;;
59056fae4e5dSmrg	ifc* | ifort*)			# Intel Fortran compiler
59066fae4e5dSmrg	  tmp_addflag=' -nofor_main' ;;
59076fae4e5dSmrg	lf95*)				# Lahey Fortran 8.1
59086fae4e5dSmrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)=
59096fae4e5dSmrg	  tmp_sharedflag='--shared' ;;
59106fae4e5dSmrg	xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
59116fae4e5dSmrg	  tmp_sharedflag='-qmkshrobj'
59126fae4e5dSmrg	  tmp_addflag= ;;
59136fae4e5dSmrg	nvcc*)	# Cuda Compiler Driver 2.2
59146fae4e5dSmrg	  _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'
59156fae4e5dSmrg	  _LT_TAGVAR(compiler_needs_object, $1)=yes
59166fae4e5dSmrg	  ;;
59179c9ff80cSmrg	esac
59186fae4e5dSmrg	case `$CC -V 2>&1 | sed 5q` in
59196fae4e5dSmrg	*Sun\ C*)			# Sun C 5.9
59206fae4e5dSmrg	  _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'
59216fae4e5dSmrg	  _LT_TAGVAR(compiler_needs_object, $1)=yes
59226fae4e5dSmrg	  tmp_sharedflag='-G' ;;
59236fae4e5dSmrg	*Sun\ F*)			# Sun Fortran 8.3
59246fae4e5dSmrg	  tmp_sharedflag='-G' ;;
59259c9ff80cSmrg	esac
59266fae4e5dSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
59276fae4e5dSmrg
59286fae4e5dSmrg        if test "x$supports_anon_versioning" = xyes; then
59296fae4e5dSmrg          _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
59306fae4e5dSmrg	    cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
59316fae4e5dSmrg	    echo "local: *; };" >> $output_objdir/$libname.ver~
59326fae4e5dSmrg	    $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
59336fae4e5dSmrg        fi
59346fae4e5dSmrg
59359c9ff80cSmrg	case $cc_basename in
59366fae4e5dSmrg	xlf* | bgf* | bgxlf* | mpixlf*)
59376fae4e5dSmrg	  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
59386fae4e5dSmrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
59396fae4e5dSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
59406fae4e5dSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
59416fae4e5dSmrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
59426fae4e5dSmrg	  if test "x$supports_anon_versioning" = xyes; then
59436fae4e5dSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
59446fae4e5dSmrg	      cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
59456fae4e5dSmrg	      echo "local: *; };" >> $output_objdir/$libname.ver~
59466fae4e5dSmrg	      $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
59476fae4e5dSmrg	  fi
59486fae4e5dSmrg	  ;;
59499c9ff80cSmrg	esac
59506fae4e5dSmrg      else
59516fae4e5dSmrg        _LT_TAGVAR(ld_shlibs, $1)=no
59526fae4e5dSmrg      fi
59536fae4e5dSmrg      ;;
59546fae4e5dSmrg
59556fae4e5dSmrg    netbsd*)
59566fae4e5dSmrg      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
59576fae4e5dSmrg	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
59586fae4e5dSmrg	wlarc=
59596fae4e5dSmrg      else
59606fae4e5dSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
59616fae4e5dSmrg	_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'
59626fae4e5dSmrg      fi
59636fae4e5dSmrg      ;;
59646fae4e5dSmrg
59656fae4e5dSmrg    solaris*)
59666fae4e5dSmrg      if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
59676fae4e5dSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
59686fae4e5dSmrg	cat <<_LT_EOF 1>&2
59696fae4e5dSmrg
59706fae4e5dSmrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably
59716fae4e5dSmrg*** create shared libraries on Solaris systems.  Therefore, libtool
59726fae4e5dSmrg*** is disabling shared libraries support.  We urge you to upgrade GNU
59736fae4e5dSmrg*** binutils to release 2.9.1 or newer.  Another option is to modify
59746fae4e5dSmrg*** your PATH or compiler configuration so that the native linker is
59756fae4e5dSmrg*** used, and then restart.
59766fae4e5dSmrg
59776fae4e5dSmrg_LT_EOF
59786fae4e5dSmrg      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
59796fae4e5dSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
59806fae4e5dSmrg	_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'
59816fae4e5dSmrg      else
59826fae4e5dSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
59836fae4e5dSmrg      fi
59846fae4e5dSmrg      ;;
59856fae4e5dSmrg
59866fae4e5dSmrg    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
59876fae4e5dSmrg      case `$LD -v 2>&1` in
59886fae4e5dSmrg        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
59896fae4e5dSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
59906fae4e5dSmrg	cat <<_LT_EOF 1>&2
59916fae4e5dSmrg
59926fae4e5dSmrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
59936fae4e5dSmrg*** reliably create shared libraries on SCO systems.  Therefore, libtool
59946fae4e5dSmrg*** is disabling shared libraries support.  We urge you to upgrade GNU
59956fae4e5dSmrg*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
59966fae4e5dSmrg*** your PATH or compiler configuration so that the native linker is
59976fae4e5dSmrg*** used, and then restart.
59986fae4e5dSmrg
59996fae4e5dSmrg_LT_EOF
60001f0ac6a5Smrg	;;
60016fae4e5dSmrg	*)
60026fae4e5dSmrg	  # For security reasons, it is highly recommended that you always
60036fae4e5dSmrg	  # use absolute paths for naming shared libraries, and exclude the
60046fae4e5dSmrg	  # DT_RUNPATH tag from executables and libraries.  But doing so
60056fae4e5dSmrg	  # requires that you compile everything twice, which is a pain.
60066fae4e5dSmrg	  if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
60076fae4e5dSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
60086fae4e5dSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
60096fae4e5dSmrg	    _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'
60106fae4e5dSmrg	  else
60116fae4e5dSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
60126fae4e5dSmrg	  fi
60131f0ac6a5Smrg	;;
60146fae4e5dSmrg      esac
60156fae4e5dSmrg      ;;
60166fae4e5dSmrg
60176fae4e5dSmrg    sunos4*)
60186fae4e5dSmrg      _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
60196fae4e5dSmrg      wlarc=
60206fae4e5dSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
60216fae4e5dSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
60226fae4e5dSmrg      ;;
60236fae4e5dSmrg
60246fae4e5dSmrg    *)
60256fae4e5dSmrg      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
60266fae4e5dSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
60276fae4e5dSmrg	_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'
60286fae4e5dSmrg      else
60296fae4e5dSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
60306fae4e5dSmrg      fi
60316fae4e5dSmrg      ;;
60321f0ac6a5Smrg    esac
60331f0ac6a5Smrg
60346fae4e5dSmrg    if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
60356fae4e5dSmrg      runpath_var=
60366fae4e5dSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
60376fae4e5dSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)=
60386fae4e5dSmrg      _LT_TAGVAR(whole_archive_flag_spec, $1)=
60396fae4e5dSmrg    fi
60406fae4e5dSmrg  else
60416fae4e5dSmrg    # PORTME fill in a description of your system's linker (not GNU ld)
60429c9ff80cSmrg    case $host_os in
60436fae4e5dSmrg    aix3*)
60446fae4e5dSmrg      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
60456fae4e5dSmrg      _LT_TAGVAR(always_export_symbols, $1)=yes
60466fae4e5dSmrg      _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'
60476fae4e5dSmrg      # Note: this linker hardcodes the directories in LIBPATH if there
60486fae4e5dSmrg      # are no directories specified by -L.
60496fae4e5dSmrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
60506fae4e5dSmrg      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
60516fae4e5dSmrg	# Neither direct hardcoding nor static linking is supported with a
60526fae4e5dSmrg	# broken collect2.
60536fae4e5dSmrg	_LT_TAGVAR(hardcode_direct, $1)=unsupported
60546fae4e5dSmrg      fi
60556fae4e5dSmrg      ;;
60566fae4e5dSmrg
60576fae4e5dSmrg    aix[[4-9]]*)
60589c9ff80cSmrg      if test "$host_cpu" = ia64; then
60596fae4e5dSmrg	# On IA64, the linker does run time linking by default, so we don't
60606fae4e5dSmrg	# have to do anything special.
60616fae4e5dSmrg	aix_use_runtimelinking=no
60626fae4e5dSmrg	exp_sym_flag='-Bexport'
60636fae4e5dSmrg	no_entry_flag=""
60646fae4e5dSmrg      else
60656fae4e5dSmrg	# If we're using GNU nm, then we don't want the "-C" option.
60666fae4e5dSmrg	# -C means demangle to AIX nm, but means don't demangle with GNU nm
60676fae4e5dSmrg	# Also, AIX nm treats weak defined symbols like other global
60686fae4e5dSmrg	# defined symbols, whereas GNU nm marks them as "W".
60696fae4e5dSmrg	if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
60706fae4e5dSmrg	  _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'
60716fae4e5dSmrg	else
60726fae4e5dSmrg	  _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'
60736fae4e5dSmrg	fi
60746fae4e5dSmrg	aix_use_runtimelinking=no
60756fae4e5dSmrg
60766fae4e5dSmrg	# Test if we are trying to use run time linking or normal
60776fae4e5dSmrg	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
60786fae4e5dSmrg	# need to do runtime linking.
60796fae4e5dSmrg	case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
60806fae4e5dSmrg	  for ld_flag in $LDFLAGS; do
60816fae4e5dSmrg	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
60826fae4e5dSmrg	    aix_use_runtimelinking=yes
60836fae4e5dSmrg	    break
60846fae4e5dSmrg	  fi
60856fae4e5dSmrg	  done
60866fae4e5dSmrg	  ;;
60876fae4e5dSmrg	esac
60886fae4e5dSmrg
60896fae4e5dSmrg	exp_sym_flag='-bexport'
60906fae4e5dSmrg	no_entry_flag='-bnoentry'
60916fae4e5dSmrg      fi
60926fae4e5dSmrg
60936fae4e5dSmrg      # When large executables or shared objects are built, AIX ld can
60946fae4e5dSmrg      # have problems creating the table of contents.  If linking a library
60956fae4e5dSmrg      # or program results in "error TOC overflow" add -mminimal-toc to
60966fae4e5dSmrg      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
60976fae4e5dSmrg      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
60986fae4e5dSmrg
60996fae4e5dSmrg      _LT_TAGVAR(archive_cmds, $1)=''
61006fae4e5dSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
61016fae4e5dSmrg      _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
61026fae4e5dSmrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
61036fae4e5dSmrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
61046fae4e5dSmrg      _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
61056fae4e5dSmrg
61066fae4e5dSmrg      if test "$GCC" = yes; then
61076fae4e5dSmrg	case $host_os in aix4.[[012]]|aix4.[[012]].*)
61086fae4e5dSmrg	# We only want to do this on AIX 4.2 and lower, the check
61096fae4e5dSmrg	# below for broken collect2 doesn't work under 4.3+
61106fae4e5dSmrg	  collect2name=`${CC} -print-prog-name=collect2`
61116fae4e5dSmrg	  if test -f "$collect2name" &&
61126fae4e5dSmrg	   strings "$collect2name" | $GREP resolve_lib_name >/dev/null
61136fae4e5dSmrg	  then
61146fae4e5dSmrg	  # We have reworked collect2
61156fae4e5dSmrg	  :
61166fae4e5dSmrg	  else
61176fae4e5dSmrg	  # We have old collect2
61186fae4e5dSmrg	  _LT_TAGVAR(hardcode_direct, $1)=unsupported
61196fae4e5dSmrg	  # It fails to find uninstalled libraries when the uninstalled
61206fae4e5dSmrg	  # path is not listed in the libpath.  Setting hardcode_minus_L
61216fae4e5dSmrg	  # to unsupported forces relinking
61226fae4e5dSmrg	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
61236fae4e5dSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
61246fae4e5dSmrg	  _LT_TAGVAR(hardcode_libdir_separator, $1)=
61256fae4e5dSmrg	  fi
61266fae4e5dSmrg	  ;;
61276fae4e5dSmrg	esac
61286fae4e5dSmrg	shared_flag='-shared'
61296fae4e5dSmrg	if test "$aix_use_runtimelinking" = yes; then
61306fae4e5dSmrg	  shared_flag="$shared_flag "'${wl}-G'
61316fae4e5dSmrg	fi
61326fae4e5dSmrg      else
61336fae4e5dSmrg	# not using gcc
61346fae4e5dSmrg	if test "$host_cpu" = ia64; then
61356fae4e5dSmrg	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
61366fae4e5dSmrg	# chokes on -Wl,-G. The following line is correct:
61376fae4e5dSmrg	  shared_flag='-G'
61386fae4e5dSmrg	else
61396fae4e5dSmrg	  if test "$aix_use_runtimelinking" = yes; then
61406fae4e5dSmrg	    shared_flag='${wl}-G'
61416fae4e5dSmrg	  else
61426fae4e5dSmrg	    shared_flag='${wl}-bM:SRE'
61436fae4e5dSmrg	  fi
61446fae4e5dSmrg	fi
61456fae4e5dSmrg      fi
61466fae4e5dSmrg
61476fae4e5dSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
61486fae4e5dSmrg      # It seems that -bexpall does not export symbols beginning with
61496fae4e5dSmrg      # underscore (_), so it is better to generate a list of symbols to export.
61506fae4e5dSmrg      _LT_TAGVAR(always_export_symbols, $1)=yes
61516fae4e5dSmrg      if test "$aix_use_runtimelinking" = yes; then
61526fae4e5dSmrg	# Warning - without using the other runtime loading flags (-brtl),
61536fae4e5dSmrg	# -berok will link without error, but may produce a broken library.
61546fae4e5dSmrg	_LT_TAGVAR(allow_undefined_flag, $1)='-berok'
61556fae4e5dSmrg        # Determine the default libpath from the value encoded in an
61566fae4e5dSmrg        # empty executable.
61576fae4e5dSmrg        _LT_SYS_MODULE_PATH_AIX([$1])
61586fae4e5dSmrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
61596fae4e5dSmrg        _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"
61606fae4e5dSmrg      else
61616fae4e5dSmrg	if test "$host_cpu" = ia64; then
61626fae4e5dSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
61636fae4e5dSmrg	  _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
61646fae4e5dSmrg	  _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"
61656fae4e5dSmrg	else
61666fae4e5dSmrg	 # Determine the default libpath from the value encoded in an
61676fae4e5dSmrg	 # empty executable.
61686fae4e5dSmrg	 _LT_SYS_MODULE_PATH_AIX([$1])
61696fae4e5dSmrg	 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
61706fae4e5dSmrg	  # Warning - without using the other run time loading flags,
61716fae4e5dSmrg	  # -berok will link without error, but may produce a broken library.
61726fae4e5dSmrg	  _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
61736fae4e5dSmrg	  _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
61746fae4e5dSmrg	  if test "$with_gnu_ld" = yes; then
61756fae4e5dSmrg	    # We only use this code for GNU lds that support --whole-archive.
61766fae4e5dSmrg	    _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
61776fae4e5dSmrg	  else
61786fae4e5dSmrg	    # Exported symbols can be pulled into shared objects from archives
61796fae4e5dSmrg	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
61806fae4e5dSmrg	  fi
61816fae4e5dSmrg	  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
61826fae4e5dSmrg	  # This is similar to how AIX traditionally builds its shared libraries.
61836fae4e5dSmrg	  _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'
61846fae4e5dSmrg	fi
61859c9ff80cSmrg      fi
61869c9ff80cSmrg      ;;
61871f0ac6a5Smrg
61889c9ff80cSmrg    amigaos*)
61899c9ff80cSmrg      case $host_cpu in
61909c9ff80cSmrg      powerpc)
61919c9ff80cSmrg            # see comment about AmigaOS4 .so support
61926fae4e5dSmrg            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
61936fae4e5dSmrg            _LT_TAGVAR(archive_expsym_cmds, $1)=''
61949c9ff80cSmrg        ;;
61959c9ff80cSmrg      m68k)
61966fae4e5dSmrg            _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)'
61976fae4e5dSmrg            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
61986fae4e5dSmrg            _LT_TAGVAR(hardcode_minus_L, $1)=yes
61999c9ff80cSmrg        ;;
62009c9ff80cSmrg      esac
62019c9ff80cSmrg      ;;
62021f0ac6a5Smrg
62036fae4e5dSmrg    bsdi[[45]]*)
62046fae4e5dSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
62059c9ff80cSmrg      ;;
62061f0ac6a5Smrg
62076fae4e5dSmrg    cygwin* | mingw* | pw32* | cegcc*)
62086fae4e5dSmrg      # When not using gcc, we currently assume that we are using
62096fae4e5dSmrg      # Microsoft Visual C++.
62106fae4e5dSmrg      # hardcode_libdir_flag_spec is actually meaningless, as there is
62116fae4e5dSmrg      # no search path for DLLs.
62126fae4e5dSmrg      case $cc_basename in
62136fae4e5dSmrg      cl*)
62146fae4e5dSmrg	# Native MSVC
62156fae4e5dSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
62166fae4e5dSmrg	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
62176fae4e5dSmrg	_LT_TAGVAR(always_export_symbols, $1)=yes
62186fae4e5dSmrg	_LT_TAGVAR(file_list_spec, $1)='@'
62196fae4e5dSmrg	# Tell ltmain to make .lib files, not .a files.
62206fae4e5dSmrg	libext=lib
62216fae4e5dSmrg	# Tell ltmain to make .dll files, not .so files.
62226fae4e5dSmrg	shrext_cmds=".dll"
62236fae4e5dSmrg	# FIXME: Setting linknames here is a bad hack.
62246fae4e5dSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
62256fae4e5dSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
62266fae4e5dSmrg	    sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
62276fae4e5dSmrg	  else
62286fae4e5dSmrg	    sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
62296fae4e5dSmrg	  fi~
62306fae4e5dSmrg	  $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
62316fae4e5dSmrg	  linknames='
62326fae4e5dSmrg	# The linker will not automatically build a static lib if we build a DLL.
62336fae4e5dSmrg	# _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
62346fae4e5dSmrg	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
62356fae4e5dSmrg	_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'
62366fae4e5dSmrg	# Don't use ranlib
62376fae4e5dSmrg	_LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
62386fae4e5dSmrg	_LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
62396fae4e5dSmrg	  lt_tool_outputfile="@TOOL_OUTPUT@"~
62406fae4e5dSmrg	  case $lt_outputfile in
62416fae4e5dSmrg	    *.exe|*.EXE) ;;
62426fae4e5dSmrg	    *)
62436fae4e5dSmrg	      lt_outputfile="$lt_outputfile.exe"
62446fae4e5dSmrg	      lt_tool_outputfile="$lt_tool_outputfile.exe"
62456fae4e5dSmrg	      ;;
62466fae4e5dSmrg	  esac~
62476fae4e5dSmrg	  if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
62486fae4e5dSmrg	    $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
62496fae4e5dSmrg	    $RM "$lt_outputfile.manifest";
62506fae4e5dSmrg	  fi'
62519c9ff80cSmrg	;;
62529c9ff80cSmrg      *)
62536fae4e5dSmrg	# Assume MSVC wrapper
62546fae4e5dSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
62556fae4e5dSmrg	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
62566fae4e5dSmrg	# Tell ltmain to make .lib files, not .a files.
62576fae4e5dSmrg	libext=lib
62586fae4e5dSmrg	# Tell ltmain to make .dll files, not .so files.
62596fae4e5dSmrg	shrext_cmds=".dll"
62606fae4e5dSmrg	# FIXME: Setting linknames here is a bad hack.
62616fae4e5dSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
62626fae4e5dSmrg	# The linker will automatically build a .lib file if we build a DLL.
62636fae4e5dSmrg	_LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
62646fae4e5dSmrg	# FIXME: Should let the user specify the lib program.
62656fae4e5dSmrg	_LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
62666fae4e5dSmrg	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
62679c9ff80cSmrg	;;
62689c9ff80cSmrg      esac
62699c9ff80cSmrg      ;;
62701f0ac6a5Smrg
62716fae4e5dSmrg    darwin* | rhapsody*)
62726fae4e5dSmrg      _LT_DARWIN_LINKER_FEATURES($1)
62739c9ff80cSmrg      ;;
62741f0ac6a5Smrg
62756fae4e5dSmrg    dgux*)
62766fae4e5dSmrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
62776fae4e5dSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
62786fae4e5dSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
62799c9ff80cSmrg      ;;
62801f0ac6a5Smrg
62816fae4e5dSmrg    freebsd1*)
62826fae4e5dSmrg      _LT_TAGVAR(ld_shlibs, $1)=no
62839c9ff80cSmrg      ;;
62841f0ac6a5Smrg
62856fae4e5dSmrg    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
62866fae4e5dSmrg    # support.  Future versions do this automatically, but an explicit c++rt0.o
62876fae4e5dSmrg    # does not break anything, and helps significantly (at the cost of a little
62886fae4e5dSmrg    # extra space).
62896fae4e5dSmrg    freebsd2.2*)
62906fae4e5dSmrg      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
62916fae4e5dSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
62926fae4e5dSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
62936fae4e5dSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
62949c9ff80cSmrg      ;;
62951f0ac6a5Smrg
62966fae4e5dSmrg    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
62976fae4e5dSmrg    freebsd2*)
62986fae4e5dSmrg      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
62996fae4e5dSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
63006fae4e5dSmrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
63016fae4e5dSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
63029c9ff80cSmrg      ;;
63031f0ac6a5Smrg
63046fae4e5dSmrg    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
63056fae4e5dSmrg    freebsd* | dragonfly*)
63066fae4e5dSmrg      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
63076fae4e5dSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
63086fae4e5dSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
63096fae4e5dSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
63109c9ff80cSmrg      ;;
63111f0ac6a5Smrg
63126fae4e5dSmrg    hpux9*)
63136fae4e5dSmrg      if test "$GCC" = yes; then
63146fae4e5dSmrg	_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'
63156fae4e5dSmrg      else
63166fae4e5dSmrg	_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'
63176fae4e5dSmrg      fi
63186fae4e5dSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
63196fae4e5dSmrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
63206fae4e5dSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
63216fae4e5dSmrg
63226fae4e5dSmrg      # hardcode_minus_L: Not really in the search PATH,
63236fae4e5dSmrg      # but as the default location of the library.
63246fae4e5dSmrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
63256fae4e5dSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
63269c9ff80cSmrg      ;;
63271f0ac6a5Smrg
63286fae4e5dSmrg    hpux10*)
63296fae4e5dSmrg      if test "$GCC" = yes && test "$with_gnu_ld" = no; then
63306fae4e5dSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
63316fae4e5dSmrg      else
63326fae4e5dSmrg	_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
63336fae4e5dSmrg      fi
63346fae4e5dSmrg      if test "$with_gnu_ld" = no; then
63356fae4e5dSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
63366fae4e5dSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
63376fae4e5dSmrg	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
63386fae4e5dSmrg	_LT_TAGVAR(hardcode_direct, $1)=yes
63396fae4e5dSmrg	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
63406fae4e5dSmrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
63416fae4e5dSmrg	# hardcode_minus_L: Not really in the search PATH,
63426fae4e5dSmrg	# but as the default location of the library.
63436fae4e5dSmrg	_LT_TAGVAR(hardcode_minus_L, $1)=yes
63446fae4e5dSmrg      fi
63459c9ff80cSmrg      ;;
63461f0ac6a5Smrg
63476fae4e5dSmrg    hpux11*)
63486fae4e5dSmrg      if test "$GCC" = yes && test "$with_gnu_ld" = no; then
63496fae4e5dSmrg	case $host_cpu in
63506fae4e5dSmrg	hppa*64*)
63516fae4e5dSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
63526fae4e5dSmrg	  ;;
63536fae4e5dSmrg	ia64*)
63546fae4e5dSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
63556fae4e5dSmrg	  ;;
63566fae4e5dSmrg	*)
63576fae4e5dSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
63586fae4e5dSmrg	  ;;
63596fae4e5dSmrg	esac
63606fae4e5dSmrg      else
63616fae4e5dSmrg	case $host_cpu in
63626fae4e5dSmrg	hppa*64*)
63636fae4e5dSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
63646fae4e5dSmrg	  ;;
63656fae4e5dSmrg	ia64*)
63666fae4e5dSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
63676fae4e5dSmrg	  ;;
63686fae4e5dSmrg	*)
63696fae4e5dSmrg	m4_if($1, [], [
63706fae4e5dSmrg	  # Older versions of the 11.00 compiler do not understand -b yet
63716fae4e5dSmrg	  # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
63726fae4e5dSmrg	  _LT_LINKER_OPTION([if $CC understands -b],
63736fae4e5dSmrg	    _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
63746fae4e5dSmrg	    [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
63756fae4e5dSmrg	    [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
63766fae4e5dSmrg	  [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
63779c9ff80cSmrg	  ;;
63786fae4e5dSmrg	esac
63796fae4e5dSmrg      fi
63806fae4e5dSmrg      if test "$with_gnu_ld" = no; then
63816fae4e5dSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
63826fae4e5dSmrg	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
63836fae4e5dSmrg
63846fae4e5dSmrg	case $host_cpu in
63856fae4e5dSmrg	hppa*64*|ia64*)
63866fae4e5dSmrg	  _LT_TAGVAR(hardcode_direct, $1)=no
63876fae4e5dSmrg	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
63886fae4e5dSmrg	  ;;
63896fae4e5dSmrg	*)
63906fae4e5dSmrg	  _LT_TAGVAR(hardcode_direct, $1)=yes
63916fae4e5dSmrg	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
63926fae4e5dSmrg	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
63936fae4e5dSmrg
63946fae4e5dSmrg	  # hardcode_minus_L: Not really in the search PATH,
63956fae4e5dSmrg	  # but as the default location of the library.
63966fae4e5dSmrg	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
63979c9ff80cSmrg	  ;;
63989c9ff80cSmrg	esac
63996fae4e5dSmrg      fi
64006fae4e5dSmrg      ;;
64016fae4e5dSmrg
64026fae4e5dSmrg    irix5* | irix6* | nonstopux*)
64036fae4e5dSmrg      if test "$GCC" = yes; then
64046fae4e5dSmrg	_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'
64056fae4e5dSmrg	# Try to use the -exported_symbol ld option, if it does not
64066fae4e5dSmrg	# work, assume that -exports_file does not work either and
64076fae4e5dSmrg	# implicitly export all symbols.
64086fae4e5dSmrg	# This should be the same for all languages, so no per-tag cache variable.
64096fae4e5dSmrg	AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
64106fae4e5dSmrg	  [lt_cv_irix_exported_symbol],
64116fae4e5dSmrg	  [save_LDFLAGS="$LDFLAGS"
64126fae4e5dSmrg	   LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
64136fae4e5dSmrg	   AC_LINK_IFELSE(
64146fae4e5dSmrg	     [AC_LANG_SOURCE(
64156fae4e5dSmrg	        [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
64166fae4e5dSmrg			      [C++], [[int foo (void) { return 0; }]],
64176fae4e5dSmrg			      [Fortran 77], [[
64186fae4e5dSmrg      subroutine foo
64196fae4e5dSmrg      end]],
64206fae4e5dSmrg			      [Fortran], [[
64216fae4e5dSmrg      subroutine foo
64226fae4e5dSmrg      end]])])],
64236fae4e5dSmrg	      [lt_cv_irix_exported_symbol=yes],
64246fae4e5dSmrg	      [lt_cv_irix_exported_symbol=no])
64256fae4e5dSmrg           LDFLAGS="$save_LDFLAGS"])
64266fae4e5dSmrg	if test "$lt_cv_irix_exported_symbol" = yes; then
64276fae4e5dSmrg          _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'
64286fae4e5dSmrg	fi
64296fae4e5dSmrg      else
64306fae4e5dSmrg	_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'
64316fae4e5dSmrg	_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'
64326fae4e5dSmrg      fi
64336fae4e5dSmrg      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
64346fae4e5dSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
64356fae4e5dSmrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
64366fae4e5dSmrg      _LT_TAGVAR(inherit_rpath, $1)=yes
64376fae4e5dSmrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
64386fae4e5dSmrg      ;;
64396fae4e5dSmrg
64406fae4e5dSmrg    netbsd*)
64416fae4e5dSmrg      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
64426fae4e5dSmrg	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
64436fae4e5dSmrg      else
64446fae4e5dSmrg	_LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
64456fae4e5dSmrg      fi
64466fae4e5dSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
64476fae4e5dSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
64486fae4e5dSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
64499c9ff80cSmrg      ;;
64501f0ac6a5Smrg
64519c9ff80cSmrg    newsos6)
64526fae4e5dSmrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
64536fae4e5dSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
64546fae4e5dSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
64556fae4e5dSmrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
64566fae4e5dSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
64579c9ff80cSmrg      ;;
6458e5410a46Smrg
64599c9ff80cSmrg    *nto* | *qnx*)
64609c9ff80cSmrg      ;;
64611f0ac6a5Smrg
64626fae4e5dSmrg    openbsd*)
64636fae4e5dSmrg      if test -f /usr/libexec/ld.so; then
64646fae4e5dSmrg	_LT_TAGVAR(hardcode_direct, $1)=yes
64656fae4e5dSmrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
64666fae4e5dSmrg	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
64676fae4e5dSmrg	if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
64686fae4e5dSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
64696fae4e5dSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
64706fae4e5dSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
64716fae4e5dSmrg	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
64726fae4e5dSmrg	else
64736fae4e5dSmrg	  case $host_os in
64746fae4e5dSmrg	   openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
64756fae4e5dSmrg	     _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
64766fae4e5dSmrg	     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
64776fae4e5dSmrg	     ;;
64786fae4e5dSmrg	   *)
64796fae4e5dSmrg	     _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
64806fae4e5dSmrg	     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
64816fae4e5dSmrg	     ;;
64826fae4e5dSmrg	  esac
64836fae4e5dSmrg	fi
64846fae4e5dSmrg      else
64856fae4e5dSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
64866fae4e5dSmrg      fi
6487e5410a46Smrg      ;;
6488e5410a46Smrg
64896fae4e5dSmrg    os2*)
64906fae4e5dSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
64916fae4e5dSmrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
64926fae4e5dSmrg      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
64936fae4e5dSmrg      _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'
64946fae4e5dSmrg      _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
64956fae4e5dSmrg      ;;
64966fae4e5dSmrg
64976fae4e5dSmrg    osf3*)
64986fae4e5dSmrg      if test "$GCC" = yes; then
64996fae4e5dSmrg	_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
65006fae4e5dSmrg	_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'
65016fae4e5dSmrg      else
65026fae4e5dSmrg	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
65036fae4e5dSmrg	_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'
65046fae4e5dSmrg      fi
65056fae4e5dSmrg      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
65066fae4e5dSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
65076fae4e5dSmrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
65086fae4e5dSmrg      ;;
65096fae4e5dSmrg
65106fae4e5dSmrg    osf4* | osf5*)	# as osf3* with the addition of -msym flag
65116fae4e5dSmrg      if test "$GCC" = yes; then
65126fae4e5dSmrg	_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
65136fae4e5dSmrg	_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'
65146fae4e5dSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
65156fae4e5dSmrg      else
65166fae4e5dSmrg	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
65176fae4e5dSmrg	_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'
65186fae4e5dSmrg	_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~
65196fae4e5dSmrg	$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'
65206fae4e5dSmrg
65216fae4e5dSmrg	# Both c and cxx compiler support -rpath directly
65226fae4e5dSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
65236fae4e5dSmrg      fi
65246fae4e5dSmrg      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
65256fae4e5dSmrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6526e5410a46Smrg      ;;
6527e5410a46Smrg
65289c9ff80cSmrg    solaris*)
65296fae4e5dSmrg      _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
65306fae4e5dSmrg      if test "$GCC" = yes; then
65316fae4e5dSmrg	wlarc='${wl}'
65326fae4e5dSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
65336fae4e5dSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
65346fae4e5dSmrg	  $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'
65356fae4e5dSmrg      else
65366fae4e5dSmrg	case `$CC -V 2>&1` in
65376fae4e5dSmrg	*"Compilers 5.0"*)
65386fae4e5dSmrg	  wlarc=''
65396fae4e5dSmrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
65406fae4e5dSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
65416fae4e5dSmrg	  $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
65426fae4e5dSmrg	  ;;
65436fae4e5dSmrg	*)
65446fae4e5dSmrg	  wlarc='${wl}'
65456fae4e5dSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
65466fae4e5dSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
65476fae4e5dSmrg	  $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
65486fae4e5dSmrg	  ;;
65496fae4e5dSmrg	esac
65506fae4e5dSmrg      fi
65516fae4e5dSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
65526fae4e5dSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
65536fae4e5dSmrg      case $host_os in
65546fae4e5dSmrg      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
65559c9ff80cSmrg      *)
65566fae4e5dSmrg	# The compiler driver will combine and reorder linker options,
65576fae4e5dSmrg	# but understands `-z linker_flag'.  GCC discards it without `$wl',
65586fae4e5dSmrg	# but is careful enough not to reorder.
65596fae4e5dSmrg	# Supported since Solaris 2.6 (maybe 2.5.1?)
65606fae4e5dSmrg	if test "$GCC" = yes; then
65616fae4e5dSmrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
65626fae4e5dSmrg	else
65636fae4e5dSmrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
65646fae4e5dSmrg	fi
65656fae4e5dSmrg	;;
65669c9ff80cSmrg      esac
65676fae4e5dSmrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
65689c9ff80cSmrg      ;;
65691f0ac6a5Smrg
65709c9ff80cSmrg    sunos4*)
65716fae4e5dSmrg      if test "x$host_vendor" = xsequent; then
65726fae4e5dSmrg	# Use $CC to link under sequent, because it throws in some extra .o
65736fae4e5dSmrg	# files that make .init and .fini sections work.
65746fae4e5dSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
65756fae4e5dSmrg      else
65766fae4e5dSmrg	_LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
65776fae4e5dSmrg      fi
65786fae4e5dSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
65796fae4e5dSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
65806fae4e5dSmrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
65816fae4e5dSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
65829c9ff80cSmrg      ;;
65831f0ac6a5Smrg
65846fae4e5dSmrg    sysv4)
65856fae4e5dSmrg      case $host_vendor in
65866fae4e5dSmrg	sni)
65876fae4e5dSmrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
65886fae4e5dSmrg	  _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
65896fae4e5dSmrg	;;
65906fae4e5dSmrg	siemens)
65916fae4e5dSmrg	  ## LD is ld it makes a PLAMLIB
65926fae4e5dSmrg	  ## CC just makes a GrossModule.
65936fae4e5dSmrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
65946fae4e5dSmrg	  _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
65956fae4e5dSmrg	  _LT_TAGVAR(hardcode_direct, $1)=no
65966fae4e5dSmrg        ;;
65976fae4e5dSmrg	motorola)
65986fae4e5dSmrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
65996fae4e5dSmrg	  _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
66006fae4e5dSmrg	;;
66016fae4e5dSmrg      esac
66026fae4e5dSmrg      runpath_var='LD_RUN_PATH'
66036fae4e5dSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
66046fae4e5dSmrg      ;;
66056fae4e5dSmrg
66066fae4e5dSmrg    sysv4.3*)
66076fae4e5dSmrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
66086fae4e5dSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
66096fae4e5dSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
66109c9ff80cSmrg      ;;
66111f0ac6a5Smrg
66129c9ff80cSmrg    sysv4*MP*)
66136fae4e5dSmrg      if test -d /usr/nec; then
66146fae4e5dSmrg	_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
66156fae4e5dSmrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
66166fae4e5dSmrg	runpath_var=LD_RUN_PATH
66176fae4e5dSmrg	hardcode_runpath_var=yes
66186fae4e5dSmrg	_LT_TAGVAR(ld_shlibs, $1)=yes
66199c9ff80cSmrg      fi
66209c9ff80cSmrg      ;;
66211f0ac6a5Smrg
66226fae4e5dSmrg    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
66236fae4e5dSmrg      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
66246fae4e5dSmrg      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
66256fae4e5dSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
66266fae4e5dSmrg      runpath_var='LD_RUN_PATH'
66276fae4e5dSmrg
66286fae4e5dSmrg      if test "$GCC" = yes; then
66296fae4e5dSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
66306fae4e5dSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
66316fae4e5dSmrg      else
66326fae4e5dSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
66336fae4e5dSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
66346fae4e5dSmrg      fi
66359c9ff80cSmrg      ;;
66361f0ac6a5Smrg
66376fae4e5dSmrg    sysv5* | sco3.2v5* | sco5v6*)
66386fae4e5dSmrg      # Note: We can NOT use -z defs as we might desire, because we do not
66396fae4e5dSmrg      # link with -lc, and that would cause any symbols used from libc to
66406fae4e5dSmrg      # always be unresolved, which means just about no library would
66416fae4e5dSmrg      # ever link correctly.  If we're not using GNU ld we use -z text
66426fae4e5dSmrg      # though, which does catch some bad symbols but isn't as heavy-handed
66436fae4e5dSmrg      # as -z defs.
66446fae4e5dSmrg      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
66456fae4e5dSmrg      _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
66466fae4e5dSmrg      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
66476fae4e5dSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
66486fae4e5dSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
66496fae4e5dSmrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
66506fae4e5dSmrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
66516fae4e5dSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
66526fae4e5dSmrg      runpath_var='LD_RUN_PATH'
66536fae4e5dSmrg
66546fae4e5dSmrg      if test "$GCC" = yes; then
66556fae4e5dSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
66566fae4e5dSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
66576fae4e5dSmrg      else
66586fae4e5dSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
66596fae4e5dSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
66606fae4e5dSmrg      fi
66619c9ff80cSmrg      ;;
66621f0ac6a5Smrg
66639c9ff80cSmrg    uts4*)
66646fae4e5dSmrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
66656fae4e5dSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
66666fae4e5dSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
66679c9ff80cSmrg      ;;
66681f0ac6a5Smrg
66699c9ff80cSmrg    *)
66706fae4e5dSmrg      _LT_TAGVAR(ld_shlibs, $1)=no
66719c9ff80cSmrg      ;;
66729c9ff80cSmrg    esac
66736fae4e5dSmrg
66746fae4e5dSmrg    if test x$host_vendor = xsni; then
66756fae4e5dSmrg      case $host in
66766fae4e5dSmrg      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
66776fae4e5dSmrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
66786fae4e5dSmrg	;;
66796fae4e5dSmrg      esac
66806fae4e5dSmrg    fi
66819c9ff80cSmrg  fi
66829c9ff80cSmrg])
66836fae4e5dSmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
66846fae4e5dSmrgtest "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
66851f0ac6a5Smrg
66866fae4e5dSmrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
66876fae4e5dSmrg
66886fae4e5dSmrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
66896fae4e5dSmrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
66906fae4e5dSmrg_LT_DECL([], [extract_expsyms_cmds], [2],
66916fae4e5dSmrg    [The commands to extract the exported symbol list from a shared archive])
66921f0ac6a5Smrg
66939c9ff80cSmrg#
66946fae4e5dSmrg# Do we need to explicitly link libc?
66959c9ff80cSmrg#
66966fae4e5dSmrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
66976fae4e5dSmrgx|xyes)
66986fae4e5dSmrg  # Assume -lc should be added
66996fae4e5dSmrg  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
67001f0ac6a5Smrg
67016fae4e5dSmrg  if test "$enable_shared" = yes && test "$GCC" = yes; then
67026fae4e5dSmrg    case $_LT_TAGVAR(archive_cmds, $1) in
67036fae4e5dSmrg    *'~'*)
67046fae4e5dSmrg      # FIXME: we may have to deal with multi-command sequences.
67056fae4e5dSmrg      ;;
67066fae4e5dSmrg    '$CC '*)
67076fae4e5dSmrg      # Test whether the compiler implicitly links with -lc since on some
67086fae4e5dSmrg      # systems, -lgcc has to come before -lc. If gcc already passes -lc
67096fae4e5dSmrg      # to ld, don't add -lc before -lgcc.
67106fae4e5dSmrg      AC_CACHE_CHECK([whether -lc should be explicitly linked in],
67116fae4e5dSmrg	[lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
67126fae4e5dSmrg	[$RM conftest*
67136fae4e5dSmrg	echo "$lt_simple_compile_test_code" > conftest.$ac_ext
67146fae4e5dSmrg
67156fae4e5dSmrg	if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
67166fae4e5dSmrg	  soname=conftest
67176fae4e5dSmrg	  lib=conftest
67186fae4e5dSmrg	  libobjs=conftest.$ac_objext
67196fae4e5dSmrg	  deplibs=
67206fae4e5dSmrg	  wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
67216fae4e5dSmrg	  pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
67226fae4e5dSmrg	  compiler_flags=-v
67236fae4e5dSmrg	  linker_flags=-v
67246fae4e5dSmrg	  verstring=
67256fae4e5dSmrg	  output_objdir=.
67266fae4e5dSmrg	  libname=conftest
67276fae4e5dSmrg	  lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
67286fae4e5dSmrg	  _LT_TAGVAR(allow_undefined_flag, $1)=
67296fae4e5dSmrg	  if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
67306fae4e5dSmrg	  then
67316fae4e5dSmrg	    lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
67326fae4e5dSmrg	  else
67336fae4e5dSmrg	    lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
67346fae4e5dSmrg	  fi
67356fae4e5dSmrg	  _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
67366fae4e5dSmrg	else
67376fae4e5dSmrg	  cat conftest.err 1>&5
67386fae4e5dSmrg	fi
67396fae4e5dSmrg	$RM conftest*
67406fae4e5dSmrg	])
67416fae4e5dSmrg      _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
67426fae4e5dSmrg      ;;
67436fae4e5dSmrg    esac
67446fae4e5dSmrg  fi
67459c9ff80cSmrg  ;;
67466fae4e5dSmrgesac
67471f0ac6a5Smrg
67486fae4e5dSmrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
67496fae4e5dSmrg    [Whether or not to add -lc for building shared libraries])
67506fae4e5dSmrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
67516fae4e5dSmrg    [enable_shared_with_static_runtimes], [0],
67526fae4e5dSmrg    [Whether or not to disallow shared libs when runtime libs are static])
67536fae4e5dSmrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1],
67546fae4e5dSmrg    [Compiler flag to allow reflexive dlopens])
67556fae4e5dSmrg_LT_TAGDECL([], [whole_archive_flag_spec], [1],
67566fae4e5dSmrg    [Compiler flag to generate shared objects directly from archives])
67576fae4e5dSmrg_LT_TAGDECL([], [compiler_needs_object], [1],
67586fae4e5dSmrg    [Whether the compiler copes with passing no objects directly])
67596fae4e5dSmrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2],
67606fae4e5dSmrg    [Create an old-style archive from a shared archive])
67616fae4e5dSmrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
67626fae4e5dSmrg    [Create a temporary old-style archive to link instead of a shared archive])
67636fae4e5dSmrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
67646fae4e5dSmrg_LT_TAGDECL([], [archive_expsym_cmds], [2])
67656fae4e5dSmrg_LT_TAGDECL([], [module_cmds], [2],
67666fae4e5dSmrg    [Commands used to build a loadable module if different from building
67676fae4e5dSmrg    a shared archive.])
67686fae4e5dSmrg_LT_TAGDECL([], [module_expsym_cmds], [2])
67696fae4e5dSmrg_LT_TAGDECL([], [with_gnu_ld], [1],
67706fae4e5dSmrg    [Whether we are building with GNU ld or not])
67716fae4e5dSmrg_LT_TAGDECL([], [allow_undefined_flag], [1],
67726fae4e5dSmrg    [Flag that allows shared libraries with undefined symbols to be built])
67736fae4e5dSmrg_LT_TAGDECL([], [no_undefined_flag], [1],
67746fae4e5dSmrg    [Flag that enforces no undefined symbols])
67756fae4e5dSmrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
67766fae4e5dSmrg    [Flag to hardcode $libdir into a binary during linking.
67776fae4e5dSmrg    This must work even if $libdir does not exist])
67786fae4e5dSmrg_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1],
67796fae4e5dSmrg    [[If ld is used when linking, flag to hardcode $libdir into a binary
67806fae4e5dSmrg    during linking.  This must work even if $libdir does not exist]])
67816fae4e5dSmrg_LT_TAGDECL([], [hardcode_libdir_separator], [1],
67826fae4e5dSmrg    [Whether we need a single "-rpath" flag with a separated argument])
67836fae4e5dSmrg_LT_TAGDECL([], [hardcode_direct], [0],
67846fae4e5dSmrg    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
67856fae4e5dSmrg    DIR into the resulting binary])
67866fae4e5dSmrg_LT_TAGDECL([], [hardcode_direct_absolute], [0],
67876fae4e5dSmrg    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
67886fae4e5dSmrg    DIR into the resulting binary and the resulting library dependency is
67896fae4e5dSmrg    "absolute", i.e impossible to change by setting ${shlibpath_var} if the
67906fae4e5dSmrg    library is relocated])
67916fae4e5dSmrg_LT_TAGDECL([], [hardcode_minus_L], [0],
67926fae4e5dSmrg    [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
67936fae4e5dSmrg    into the resulting binary])
67946fae4e5dSmrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0],
67956fae4e5dSmrg    [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
67966fae4e5dSmrg    into the resulting binary])
67976fae4e5dSmrg_LT_TAGDECL([], [hardcode_automatic], [0],
67986fae4e5dSmrg    [Set to "yes" if building a shared library automatically hardcodes DIR
67996fae4e5dSmrg    into the library and all subsequent libraries and executables linked
68006fae4e5dSmrg    against it])
68016fae4e5dSmrg_LT_TAGDECL([], [inherit_rpath], [0],
68026fae4e5dSmrg    [Set to yes if linker adds runtime paths of dependent libraries
68036fae4e5dSmrg    to runtime path list])
68046fae4e5dSmrg_LT_TAGDECL([], [link_all_deplibs], [0],
68056fae4e5dSmrg    [Whether libtool must link a program against all its dependency libraries])
68066fae4e5dSmrg_LT_TAGDECL([], [always_export_symbols], [0],
68076fae4e5dSmrg    [Set to "yes" if exported symbols are required])
68086fae4e5dSmrg_LT_TAGDECL([], [export_symbols_cmds], [2],
68096fae4e5dSmrg    [The commands to list exported symbols])
68106fae4e5dSmrg_LT_TAGDECL([], [exclude_expsyms], [1],
68116fae4e5dSmrg    [Symbols that should not be listed in the preloaded symbols])
68126fae4e5dSmrg_LT_TAGDECL([], [include_expsyms], [1],
68136fae4e5dSmrg    [Symbols that must always be exported])
68146fae4e5dSmrg_LT_TAGDECL([], [prelink_cmds], [2],
68156fae4e5dSmrg    [Commands necessary for linking programs (against libraries) with templates])
68166fae4e5dSmrg_LT_TAGDECL([], [postlink_cmds], [2],
68176fae4e5dSmrg    [Commands necessary for finishing linking programs])
68186fae4e5dSmrg_LT_TAGDECL([], [file_list_spec], [1],
68196fae4e5dSmrg    [Specify filename containing input files])
68206fae4e5dSmrgdnl FIXME: Not yet implemented
68216fae4e5dSmrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
68226fae4e5dSmrgdnl    [Compiler flag to generate thread safe objects])
68236fae4e5dSmrg])# _LT_LINKER_SHLIBS
68241f0ac6a5Smrg
68251f0ac6a5Smrg
68266fae4e5dSmrg# _LT_LANG_C_CONFIG([TAG])
68276fae4e5dSmrg# ------------------------
68286fae4e5dSmrg# Ensure that the configuration variables for a C compiler are suitably
68296fae4e5dSmrg# defined.  These variables are subsequently used by _LT_CONFIG to write
68306fae4e5dSmrg# the compiler configuration to `libtool'.
68316fae4e5dSmrgm4_defun([_LT_LANG_C_CONFIG],
68326fae4e5dSmrg[m4_require([_LT_DECL_EGREP])dnl
68336fae4e5dSmrglt_save_CC="$CC"
68346fae4e5dSmrgAC_LANG_PUSH(C)
68351f0ac6a5Smrg
68366fae4e5dSmrg# Source file extension for C test sources.
68376fae4e5dSmrgac_ext=c
68381f0ac6a5Smrg
68396fae4e5dSmrg# Object file extension for compiled C test sources.
68406fae4e5dSmrgobjext=o
68416fae4e5dSmrg_LT_TAGVAR(objext, $1)=$objext
68421f0ac6a5Smrg
68436fae4e5dSmrg# Code to be used in simple compile tests
68446fae4e5dSmrglt_simple_compile_test_code="int some_variable = 0;"
68451f0ac6a5Smrg
68466fae4e5dSmrg# Code to be used in simple link tests
68476fae4e5dSmrglt_simple_link_test_code='int main(){return(0);}'
68481f0ac6a5Smrg
68496fae4e5dSmrg_LT_TAG_COMPILER
68506fae4e5dSmrg# Save the default compiler, since it gets overwritten when the other
68516fae4e5dSmrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
68526fae4e5dSmrgcompiler_DEFAULT=$CC
68531f0ac6a5Smrg
68546fae4e5dSmrg# save warnings/boilerplate of simple test code
68556fae4e5dSmrg_LT_COMPILER_BOILERPLATE
68566fae4e5dSmrg_LT_LINKER_BOILERPLATE
68579c9ff80cSmrg
68586fae4e5dSmrgif test -n "$compiler"; then
68596fae4e5dSmrg  _LT_COMPILER_NO_RTTI($1)
68606fae4e5dSmrg  _LT_COMPILER_PIC($1)
68616fae4e5dSmrg  _LT_COMPILER_C_O($1)
68626fae4e5dSmrg  _LT_COMPILER_FILE_LOCKS($1)
68636fae4e5dSmrg  _LT_LINKER_SHLIBS($1)
68646fae4e5dSmrg  _LT_SYS_DYNAMIC_LINKER($1)
68656fae4e5dSmrg  _LT_LINKER_HARDCODE_LIBPATH($1)
68666fae4e5dSmrg  LT_SYS_DLOPEN_SELF
68676fae4e5dSmrg  _LT_CMD_STRIPLIB
68681f0ac6a5Smrg
68696fae4e5dSmrg  # Report which library types will actually be built
68706fae4e5dSmrg  AC_MSG_CHECKING([if libtool supports shared libraries])
68716fae4e5dSmrg  AC_MSG_RESULT([$can_build_shared])
68721f0ac6a5Smrg
68736fae4e5dSmrg  AC_MSG_CHECKING([whether to build shared libraries])
68746fae4e5dSmrg  test "$can_build_shared" = "no" && enable_shared=no
68751f0ac6a5Smrg
68766fae4e5dSmrg  # On AIX, shared libraries and static libraries use the same namespace, and
68776fae4e5dSmrg  # are all built from PIC.
68786fae4e5dSmrg  case $host_os in
68796fae4e5dSmrg  aix3*)
68806fae4e5dSmrg    test "$enable_shared" = yes && enable_static=no
68816fae4e5dSmrg    if test -n "$RANLIB"; then
68826fae4e5dSmrg      archive_cmds="$archive_cmds~\$RANLIB \$lib"
68836fae4e5dSmrg      postinstall_cmds='$RANLIB $lib'
68846fae4e5dSmrg    fi
68856fae4e5dSmrg    ;;
68861f0ac6a5Smrg
68876fae4e5dSmrg  aix[[4-9]]*)
68886fae4e5dSmrg    if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
68896fae4e5dSmrg      test "$enable_shared" = yes && enable_static=no
68906fae4e5dSmrg    fi
68916fae4e5dSmrg    ;;
68926fae4e5dSmrg  esac
68936fae4e5dSmrg  AC_MSG_RESULT([$enable_shared])
68941f0ac6a5Smrg
68956fae4e5dSmrg  AC_MSG_CHECKING([whether to build static libraries])
68966fae4e5dSmrg  # Make sure either enable_shared or enable_static is yes.
68976fae4e5dSmrg  test "$enable_shared" = yes || enable_static=yes
68986fae4e5dSmrg  AC_MSG_RESULT([$enable_static])
68991f0ac6a5Smrg
69006fae4e5dSmrg  _LT_CONFIG($1)
69016fae4e5dSmrgfi
69026fae4e5dSmrgAC_LANG_POP
69036fae4e5dSmrgCC="$lt_save_CC"
69046fae4e5dSmrg])# _LT_LANG_C_CONFIG
69051f0ac6a5Smrg
69061f0ac6a5Smrg
69076fae4e5dSmrg# _LT_LANG_CXX_CONFIG([TAG])
69086fae4e5dSmrg# --------------------------
69096fae4e5dSmrg# Ensure that the configuration variables for a C++ compiler are suitably
69106fae4e5dSmrg# defined.  These variables are subsequently used by _LT_CONFIG to write
69116fae4e5dSmrg# the compiler configuration to `libtool'.
69126fae4e5dSmrgm4_defun([_LT_LANG_CXX_CONFIG],
69136fae4e5dSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
69146fae4e5dSmrgm4_require([_LT_DECL_EGREP])dnl
69156fae4e5dSmrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl
69166fae4e5dSmrgif test -n "$CXX" && ( test "X$CXX" != "Xno" &&
69176fae4e5dSmrg    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
69186fae4e5dSmrg    (test "X$CXX" != "Xg++"))) ; then
69196fae4e5dSmrg  AC_PROG_CXXCPP
69206fae4e5dSmrgelse
69216fae4e5dSmrg  _lt_caught_CXX_error=yes
69226fae4e5dSmrgfi
69231f0ac6a5Smrg
69246fae4e5dSmrgAC_LANG_PUSH(C++)
69256fae4e5dSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
69266fae4e5dSmrg_LT_TAGVAR(allow_undefined_flag, $1)=
69276fae4e5dSmrg_LT_TAGVAR(always_export_symbols, $1)=no
69286fae4e5dSmrg_LT_TAGVAR(archive_expsym_cmds, $1)=
69296fae4e5dSmrg_LT_TAGVAR(compiler_needs_object, $1)=no
69306fae4e5dSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)=
69316fae4e5dSmrg_LT_TAGVAR(hardcode_direct, $1)=no
69326fae4e5dSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no
69336fae4e5dSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
69346fae4e5dSmrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
69356fae4e5dSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)=
69366fae4e5dSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no
69376fae4e5dSmrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
69386fae4e5dSmrg_LT_TAGVAR(hardcode_automatic, $1)=no
69396fae4e5dSmrg_LT_TAGVAR(inherit_rpath, $1)=no
69406fae4e5dSmrg_LT_TAGVAR(module_cmds, $1)=
69416fae4e5dSmrg_LT_TAGVAR(module_expsym_cmds, $1)=
69426fae4e5dSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown
69436fae4e5dSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
69446fae4e5dSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag
69456fae4e5dSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
69466fae4e5dSmrg_LT_TAGVAR(no_undefined_flag, $1)=
69476fae4e5dSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)=
69486fae4e5dSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
69491f0ac6a5Smrg
69506fae4e5dSmrg# Source file extension for C++ test sources.
69516fae4e5dSmrgac_ext=cpp
69521f0ac6a5Smrg
69536fae4e5dSmrg# Object file extension for compiled C++ test sources.
69546fae4e5dSmrgobjext=o
69556fae4e5dSmrg_LT_TAGVAR(objext, $1)=$objext
69561f0ac6a5Smrg
69576fae4e5dSmrg# No sense in running all these tests if we already determined that
69586fae4e5dSmrg# the CXX compiler isn't working.  Some variables (like enable_shared)
69596fae4e5dSmrg# are currently assumed to apply to all compilers on this platform,
69606fae4e5dSmrg# and will be corrupted by setting them based on a non-working compiler.
69616fae4e5dSmrgif test "$_lt_caught_CXX_error" != yes; then
69626fae4e5dSmrg  # Code to be used in simple compile tests
69636fae4e5dSmrg  lt_simple_compile_test_code="int some_variable = 0;"
69649c9ff80cSmrg
69656fae4e5dSmrg  # Code to be used in simple link tests
69666fae4e5dSmrg  lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
69671f0ac6a5Smrg
69686fae4e5dSmrg  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
69696fae4e5dSmrg  _LT_TAG_COMPILER
69701f0ac6a5Smrg
69716fae4e5dSmrg  # save warnings/boilerplate of simple test code
69726fae4e5dSmrg  _LT_COMPILER_BOILERPLATE
69736fae4e5dSmrg  _LT_LINKER_BOILERPLATE
69741f0ac6a5Smrg
69756fae4e5dSmrg  # Allow CC to be a program name with arguments.
69766fae4e5dSmrg  lt_save_CC=$CC
69776fae4e5dSmrg  lt_save_CFLAGS=$CFLAGS
69786fae4e5dSmrg  lt_save_LD=$LD
69796fae4e5dSmrg  lt_save_GCC=$GCC
69806fae4e5dSmrg  GCC=$GXX
69816fae4e5dSmrg  lt_save_with_gnu_ld=$with_gnu_ld
69826fae4e5dSmrg  lt_save_path_LD=$lt_cv_path_LD
69836fae4e5dSmrg  if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
69846fae4e5dSmrg    lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
69856fae4e5dSmrg  else
69866fae4e5dSmrg    $as_unset lt_cv_prog_gnu_ld
69876fae4e5dSmrg  fi
69886fae4e5dSmrg  if test -n "${lt_cv_path_LDCXX+set}"; then
69896fae4e5dSmrg    lt_cv_path_LD=$lt_cv_path_LDCXX
69906fae4e5dSmrg  else
69916fae4e5dSmrg    $as_unset lt_cv_path_LD
69926fae4e5dSmrg  fi
69936fae4e5dSmrg  test -z "${LDCXX+set}" || LD=$LDCXX
69946fae4e5dSmrg  CC=${CXX-"c++"}
69956fae4e5dSmrg  CFLAGS=$CXXFLAGS
69966fae4e5dSmrg  compiler=$CC
69976fae4e5dSmrg  _LT_TAGVAR(compiler, $1)=$CC
69986fae4e5dSmrg  _LT_CC_BASENAME([$compiler])
69991f0ac6a5Smrg
70006fae4e5dSmrg  if test -n "$compiler"; then
70016fae4e5dSmrg    # We don't want -fno-exception when compiling C++ code, so set the
70026fae4e5dSmrg    # no_builtin_flag separately
70036fae4e5dSmrg    if test "$GXX" = yes; then
70046fae4e5dSmrg      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
70056fae4e5dSmrg    else
70066fae4e5dSmrg      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
70076fae4e5dSmrg    fi
70081f0ac6a5Smrg
70096fae4e5dSmrg    if test "$GXX" = yes; then
70106fae4e5dSmrg      # Set up default GNU C++ configuration
70111f0ac6a5Smrg
70126fae4e5dSmrg      LT_PATH_LD
70131f0ac6a5Smrg
70146fae4e5dSmrg      # Check if GNU C++ uses GNU ld as the underlying linker, since the
70156fae4e5dSmrg      # archiving commands below assume that GNU ld is being used.
70166fae4e5dSmrg      if test "$with_gnu_ld" = yes; then
70176fae4e5dSmrg        _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
70186fae4e5dSmrg        _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'
70191f0ac6a5Smrg
70206fae4e5dSmrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
70216fae4e5dSmrg        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
70221f0ac6a5Smrg
70236fae4e5dSmrg        # If archive_cmds runs LD, not CC, wlarc should be empty
70246fae4e5dSmrg        # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
70256fae4e5dSmrg        #     investigate it a little bit more. (MM)
70266fae4e5dSmrg        wlarc='${wl}'
70271f0ac6a5Smrg
70286fae4e5dSmrg        # ancient GNU ld didn't support --whole-archive et. al.
70296fae4e5dSmrg        if eval "`$CC -print-prog-name=ld` --help 2>&1" |
70306fae4e5dSmrg	  $GREP 'no-whole-archive' > /dev/null; then
70316fae4e5dSmrg          _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
70326fae4e5dSmrg        else
70336fae4e5dSmrg          _LT_TAGVAR(whole_archive_flag_spec, $1)=
70346fae4e5dSmrg        fi
70356fae4e5dSmrg      else
70366fae4e5dSmrg        with_gnu_ld=no
70376fae4e5dSmrg        wlarc=
70381f0ac6a5Smrg
70396fae4e5dSmrg        # A generic and very simple default shared library creation
70406fae4e5dSmrg        # command for GNU C++ for the case where it uses the native
70416fae4e5dSmrg        # linker, instead of GNU ld.  If possible, this setting should
70426fae4e5dSmrg        # overridden to take advantage of the native linker features on
70436fae4e5dSmrg        # the platform it is being used on.
70446fae4e5dSmrg        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
70456fae4e5dSmrg      fi
70461f0ac6a5Smrg
70476fae4e5dSmrg      # Commands to make compiler produce verbose output that lists
70486fae4e5dSmrg      # what "hidden" libraries, object files and flags are used when
70496fae4e5dSmrg      # linking a shared library.
70506fae4e5dSmrg      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
70511f0ac6a5Smrg
70526fae4e5dSmrg    else
70536fae4e5dSmrg      GXX=no
70546fae4e5dSmrg      with_gnu_ld=no
70556fae4e5dSmrg      wlarc=
70566fae4e5dSmrg    fi
70571f0ac6a5Smrg
70586fae4e5dSmrg    # PORTME: fill in a description of your system's C++ link characteristics
70596fae4e5dSmrg    AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
70606fae4e5dSmrg    _LT_TAGVAR(ld_shlibs, $1)=yes
70616fae4e5dSmrg    case $host_os in
70626fae4e5dSmrg      aix3*)
70636fae4e5dSmrg        # FIXME: insert proper C++ library support
70646fae4e5dSmrg        _LT_TAGVAR(ld_shlibs, $1)=no
70656fae4e5dSmrg        ;;
70666fae4e5dSmrg      aix[[4-9]]*)
70676fae4e5dSmrg        if test "$host_cpu" = ia64; then
70686fae4e5dSmrg          # On IA64, the linker does run time linking by default, so we don't
70696fae4e5dSmrg          # have to do anything special.
70706fae4e5dSmrg          aix_use_runtimelinking=no
70716fae4e5dSmrg          exp_sym_flag='-Bexport'
70726fae4e5dSmrg          no_entry_flag=""
70736fae4e5dSmrg        else
70746fae4e5dSmrg          aix_use_runtimelinking=no
70751f0ac6a5Smrg
70766fae4e5dSmrg          # Test if we are trying to use run time linking or normal
70776fae4e5dSmrg          # AIX style linking. If -brtl is somewhere in LDFLAGS, we
70786fae4e5dSmrg          # need to do runtime linking.
70796fae4e5dSmrg          case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
70806fae4e5dSmrg	    for ld_flag in $LDFLAGS; do
70816fae4e5dSmrg	      case $ld_flag in
70826fae4e5dSmrg	      *-brtl*)
70836fae4e5dSmrg	        aix_use_runtimelinking=yes
70846fae4e5dSmrg	        break
70856fae4e5dSmrg	        ;;
70866fae4e5dSmrg	      esac
70876fae4e5dSmrg	    done
70886fae4e5dSmrg	    ;;
70896fae4e5dSmrg          esac
70901f0ac6a5Smrg
70916fae4e5dSmrg          exp_sym_flag='-bexport'
70926fae4e5dSmrg          no_entry_flag='-bnoentry'
70936fae4e5dSmrg        fi
70941f0ac6a5Smrg
70956fae4e5dSmrg        # When large executables or shared objects are built, AIX ld can
70966fae4e5dSmrg        # have problems creating the table of contents.  If linking a library
70976fae4e5dSmrg        # or program results in "error TOC overflow" add -mminimal-toc to
70986fae4e5dSmrg        # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
70996fae4e5dSmrg        # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
71001f0ac6a5Smrg
71016fae4e5dSmrg        _LT_TAGVAR(archive_cmds, $1)=''
71026fae4e5dSmrg        _LT_TAGVAR(hardcode_direct, $1)=yes
71036fae4e5dSmrg        _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
71046fae4e5dSmrg        _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
71056fae4e5dSmrg        _LT_TAGVAR(link_all_deplibs, $1)=yes
71066fae4e5dSmrg        _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
71071f0ac6a5Smrg
71086fae4e5dSmrg        if test "$GXX" = yes; then
71096fae4e5dSmrg          case $host_os in aix4.[[012]]|aix4.[[012]].*)
71106fae4e5dSmrg          # We only want to do this on AIX 4.2 and lower, the check
71116fae4e5dSmrg          # below for broken collect2 doesn't work under 4.3+
71126fae4e5dSmrg	  collect2name=`${CC} -print-prog-name=collect2`
71136fae4e5dSmrg	  if test -f "$collect2name" &&
71146fae4e5dSmrg	     strings "$collect2name" | $GREP resolve_lib_name >/dev/null
71156fae4e5dSmrg	  then
71166fae4e5dSmrg	    # We have reworked collect2
71176fae4e5dSmrg	    :
71186fae4e5dSmrg	  else
71196fae4e5dSmrg	    # We have old collect2
71206fae4e5dSmrg	    _LT_TAGVAR(hardcode_direct, $1)=unsupported
71216fae4e5dSmrg	    # It fails to find uninstalled libraries when the uninstalled
71226fae4e5dSmrg	    # path is not listed in the libpath.  Setting hardcode_minus_L
71236fae4e5dSmrg	    # to unsupported forces relinking
71246fae4e5dSmrg	    _LT_TAGVAR(hardcode_minus_L, $1)=yes
71256fae4e5dSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
71266fae4e5dSmrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=
71276fae4e5dSmrg	  fi
71286fae4e5dSmrg          esac
71296fae4e5dSmrg          shared_flag='-shared'
71306fae4e5dSmrg	  if test "$aix_use_runtimelinking" = yes; then
71316fae4e5dSmrg	    shared_flag="$shared_flag "'${wl}-G'
71326fae4e5dSmrg	  fi
71336fae4e5dSmrg        else
71346fae4e5dSmrg          # not using gcc
71356fae4e5dSmrg          if test "$host_cpu" = ia64; then
71366fae4e5dSmrg	  # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
71376fae4e5dSmrg	  # chokes on -Wl,-G. The following line is correct:
71386fae4e5dSmrg	  shared_flag='-G'
71396fae4e5dSmrg          else
71406fae4e5dSmrg	    if test "$aix_use_runtimelinking" = yes; then
71416fae4e5dSmrg	      shared_flag='${wl}-G'
71426fae4e5dSmrg	    else
71436fae4e5dSmrg	      shared_flag='${wl}-bM:SRE'
71446fae4e5dSmrg	    fi
71456fae4e5dSmrg          fi
71466fae4e5dSmrg        fi
71471f0ac6a5Smrg
71486fae4e5dSmrg        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
71496fae4e5dSmrg        # It seems that -bexpall does not export symbols beginning with
71506fae4e5dSmrg        # underscore (_), so it is better to generate a list of symbols to
71516fae4e5dSmrg	# export.
71526fae4e5dSmrg        _LT_TAGVAR(always_export_symbols, $1)=yes
71536fae4e5dSmrg        if test "$aix_use_runtimelinking" = yes; then
71546fae4e5dSmrg          # Warning - without using the other runtime loading flags (-brtl),
71556fae4e5dSmrg          # -berok will link without error, but may produce a broken library.
71566fae4e5dSmrg          _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
71576fae4e5dSmrg          # Determine the default libpath from the value encoded in an empty
71586fae4e5dSmrg          # executable.
71596fae4e5dSmrg          _LT_SYS_MODULE_PATH_AIX([$1])
71606fae4e5dSmrg          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
71611f0ac6a5Smrg
71626fae4e5dSmrg          _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"
71636fae4e5dSmrg        else
71646fae4e5dSmrg          if test "$host_cpu" = ia64; then
71656fae4e5dSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
71666fae4e5dSmrg	    _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
71676fae4e5dSmrg	    _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"
71686fae4e5dSmrg          else
71696fae4e5dSmrg	    # Determine the default libpath from the value encoded in an
71706fae4e5dSmrg	    # empty executable.
71716fae4e5dSmrg	    _LT_SYS_MODULE_PATH_AIX([$1])
71726fae4e5dSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
71736fae4e5dSmrg	    # Warning - without using the other run time loading flags,
71746fae4e5dSmrg	    # -berok will link without error, but may produce a broken library.
71756fae4e5dSmrg	    _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
71766fae4e5dSmrg	    _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
71776fae4e5dSmrg	    if test "$with_gnu_ld" = yes; then
71786fae4e5dSmrg	      # We only use this code for GNU lds that support --whole-archive.
71796fae4e5dSmrg	      _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
71806fae4e5dSmrg	    else
71816fae4e5dSmrg	      # Exported symbols can be pulled into shared objects from archives
71826fae4e5dSmrg	      _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
71836fae4e5dSmrg	    fi
71846fae4e5dSmrg	    _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
71856fae4e5dSmrg	    # This is similar to how AIX traditionally builds its shared
71866fae4e5dSmrg	    # libraries.
71876fae4e5dSmrg	    _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'
71886fae4e5dSmrg          fi
71896fae4e5dSmrg        fi
71906fae4e5dSmrg        ;;
71916fae4e5dSmrg
71926fae4e5dSmrg      beos*)
71936fae4e5dSmrg	if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
71946fae4e5dSmrg	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
71956fae4e5dSmrg	  # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
71966fae4e5dSmrg	  # support --undefined.  This deserves some investigation.  FIXME
71976fae4e5dSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
71986fae4e5dSmrg	else
71996fae4e5dSmrg	  _LT_TAGVAR(ld_shlibs, $1)=no
72006fae4e5dSmrg	fi
72016fae4e5dSmrg	;;
72026fae4e5dSmrg
72036fae4e5dSmrg      chorus*)
72046fae4e5dSmrg        case $cc_basename in
72056fae4e5dSmrg          *)
72066fae4e5dSmrg	  # FIXME: insert proper C++ library support
72076fae4e5dSmrg	  _LT_TAGVAR(ld_shlibs, $1)=no
72089c9ff80cSmrg	  ;;
72096fae4e5dSmrg        esac
72106fae4e5dSmrg        ;;
72116fae4e5dSmrg
72126fae4e5dSmrg      cygwin* | mingw* | pw32* | cegcc*)
72136fae4e5dSmrg	case $GXX,$cc_basename in
72146fae4e5dSmrg	,cl* | no,cl*)
72156fae4e5dSmrg	  # Native MSVC
72166fae4e5dSmrg	  # hardcode_libdir_flag_spec is actually meaningless, as there is
72176fae4e5dSmrg	  # no search path for DLLs.
72186fae4e5dSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
72196fae4e5dSmrg	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
72206fae4e5dSmrg	  _LT_TAGVAR(always_export_symbols, $1)=yes
72216fae4e5dSmrg	  _LT_TAGVAR(file_list_spec, $1)='@'
72226fae4e5dSmrg	  # Tell ltmain to make .lib files, not .a files.
72236fae4e5dSmrg	  libext=lib
72246fae4e5dSmrg	  # Tell ltmain to make .dll files, not .so files.
72256fae4e5dSmrg	  shrext_cmds=".dll"
72266fae4e5dSmrg	  # FIXME: Setting linknames here is a bad hack.
72276fae4e5dSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
72286fae4e5dSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
72296fae4e5dSmrg	      $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
72306fae4e5dSmrg	    else
72316fae4e5dSmrg	      $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
72326fae4e5dSmrg	    fi~
72336fae4e5dSmrg	    $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
72346fae4e5dSmrg	    linknames='
72356fae4e5dSmrg	  # The linker will not automatically build a static lib if we build a DLL.
72366fae4e5dSmrg	  # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
72376fae4e5dSmrg	  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
72386fae4e5dSmrg	  # Don't use ranlib
72396fae4e5dSmrg	  _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
72406fae4e5dSmrg	  _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
72416fae4e5dSmrg	    lt_tool_outputfile="@TOOL_OUTPUT@"~
72426fae4e5dSmrg	    case $lt_outputfile in
72436fae4e5dSmrg	      *.exe|*.EXE) ;;
72446fae4e5dSmrg	      *)
72456fae4e5dSmrg		lt_outputfile="$lt_outputfile.exe"
72466fae4e5dSmrg		lt_tool_outputfile="$lt_tool_outputfile.exe"
72476fae4e5dSmrg		;;
72486fae4e5dSmrg	    esac~
72496fae4e5dSmrg	    func_to_tool_file "$lt_outputfile"~
72506fae4e5dSmrg	    if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
72516fae4e5dSmrg	      $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
72526fae4e5dSmrg	      $RM "$lt_outputfile.manifest";
72536fae4e5dSmrg	    fi'
72549c9ff80cSmrg	  ;;
72559c9ff80cSmrg	*)
72566fae4e5dSmrg	  # g++
72576fae4e5dSmrg	  # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
72586fae4e5dSmrg	  # as there is no search path for DLLs.
72596fae4e5dSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
72606fae4e5dSmrg	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
72616fae4e5dSmrg	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
72626fae4e5dSmrg	  _LT_TAGVAR(always_export_symbols, $1)=no
72636fae4e5dSmrg	  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
72646fae4e5dSmrg
72656fae4e5dSmrg	  if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
72666fae4e5dSmrg	    _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'
72676fae4e5dSmrg	    # If the export-symbols file already is a .def file (1st line
72686fae4e5dSmrg	    # is EXPORTS), use it as is; otherwise, prepend...
72696fae4e5dSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
72706fae4e5dSmrg	      cp $export_symbols $output_objdir/$soname.def;
72716fae4e5dSmrg	    else
72726fae4e5dSmrg	      echo EXPORTS > $output_objdir/$soname.def;
72736fae4e5dSmrg	      cat $export_symbols >> $output_objdir/$soname.def;
72746fae4e5dSmrg	    fi~
72756fae4e5dSmrg	    $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'
72766fae4e5dSmrg	  else
72776fae4e5dSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
72786fae4e5dSmrg	  fi
72799c9ff80cSmrg	  ;;
72809c9ff80cSmrg	esac
72816fae4e5dSmrg	;;
72826fae4e5dSmrg      darwin* | rhapsody*)
72836fae4e5dSmrg        _LT_DARWIN_LINKER_FEATURES($1)
72846fae4e5dSmrg	;;
72851f0ac6a5Smrg
72866fae4e5dSmrg      dgux*)
72876fae4e5dSmrg        case $cc_basename in
72886fae4e5dSmrg          ec++*)
72896fae4e5dSmrg	    # FIXME: insert proper C++ library support
72906fae4e5dSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
72916fae4e5dSmrg	    ;;
72926fae4e5dSmrg          ghcx*)
72936fae4e5dSmrg	    # Green Hills C++ Compiler
72946fae4e5dSmrg	    # FIXME: insert proper C++ library support
72956fae4e5dSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
72966fae4e5dSmrg	    ;;
72976fae4e5dSmrg          *)
72986fae4e5dSmrg	    # FIXME: insert proper C++ library support
72996fae4e5dSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
73006fae4e5dSmrg	    ;;
73016fae4e5dSmrg        esac
73026fae4e5dSmrg        ;;
73031f0ac6a5Smrg
73046fae4e5dSmrg      freebsd[[12]]*)
73056fae4e5dSmrg        # C++ shared libraries reported to be fairly broken before
73066fae4e5dSmrg	# switch to ELF
73076fae4e5dSmrg        _LT_TAGVAR(ld_shlibs, $1)=no
73086fae4e5dSmrg        ;;
73091f0ac6a5Smrg
73106fae4e5dSmrg      freebsd-elf*)
73116fae4e5dSmrg        _LT_TAGVAR(archive_cmds_need_lc, $1)=no
73126fae4e5dSmrg        ;;
73131f0ac6a5Smrg
73146fae4e5dSmrg      freebsd* | dragonfly*)
73156fae4e5dSmrg        # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
73166fae4e5dSmrg        # conventions
73176fae4e5dSmrg        _LT_TAGVAR(ld_shlibs, $1)=yes
73186fae4e5dSmrg        ;;
73191f0ac6a5Smrg
73206fae4e5dSmrg      gnu*)
73216fae4e5dSmrg        ;;
73221f0ac6a5Smrg
73236fae4e5dSmrg      haiku*)
73246fae4e5dSmrg        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
73256fae4e5dSmrg        _LT_TAGVAR(link_all_deplibs, $1)=yes
73266fae4e5dSmrg        ;;
73271f0ac6a5Smrg
73286fae4e5dSmrg      hpux9*)
73296fae4e5dSmrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
73306fae4e5dSmrg        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
73316fae4e5dSmrg        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
73326fae4e5dSmrg        _LT_TAGVAR(hardcode_direct, $1)=yes
73336fae4e5dSmrg        _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
73346fae4e5dSmrg				             # but as the default
73356fae4e5dSmrg				             # location of the library.
73366fae4e5dSmrg
73376fae4e5dSmrg        case $cc_basename in
73386fae4e5dSmrg          CC*)
73396fae4e5dSmrg            # FIXME: insert proper C++ library support
73406fae4e5dSmrg            _LT_TAGVAR(ld_shlibs, $1)=no
73416fae4e5dSmrg            ;;
73426fae4e5dSmrg          aCC*)
73436fae4e5dSmrg            _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'
73446fae4e5dSmrg            # Commands to make compiler produce verbose output that lists
73456fae4e5dSmrg            # what "hidden" libraries, object files and flags are used when
73466fae4e5dSmrg            # linking a shared library.
73476fae4e5dSmrg            #
73486fae4e5dSmrg            # There doesn't appear to be a way to prevent this compiler from
73496fae4e5dSmrg            # explicitly linking system object files so we need to strip them
73506fae4e5dSmrg            # from the output so that they don't get included in the library
73516fae4e5dSmrg            # dependencies.
73526fae4e5dSmrg            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"'
73536fae4e5dSmrg            ;;
73546fae4e5dSmrg          *)
73556fae4e5dSmrg            if test "$GXX" = yes; then
73566fae4e5dSmrg              _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'
73576fae4e5dSmrg            else
73586fae4e5dSmrg              # FIXME: insert proper C++ library support
73596fae4e5dSmrg              _LT_TAGVAR(ld_shlibs, $1)=no
73606fae4e5dSmrg            fi
73616fae4e5dSmrg            ;;
73626fae4e5dSmrg        esac
73636fae4e5dSmrg        ;;
73646fae4e5dSmrg
73656fae4e5dSmrg      hpux10*|hpux11*)
73666fae4e5dSmrg        if test $with_gnu_ld = no; then
73676fae4e5dSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
73686fae4e5dSmrg	  _LT_TAGVAR(hardcode_libdir_separator, $1)=:
73696fae4e5dSmrg
73706fae4e5dSmrg          case $host_cpu in
73716fae4e5dSmrg            hppa*64*|ia64*)
73726fae4e5dSmrg              ;;
73736fae4e5dSmrg            *)
73746fae4e5dSmrg	      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
73756fae4e5dSmrg              ;;
73766fae4e5dSmrg          esac
73776fae4e5dSmrg        fi
73786fae4e5dSmrg        case $host_cpu in
73796fae4e5dSmrg          hppa*64*|ia64*)
73806fae4e5dSmrg            _LT_TAGVAR(hardcode_direct, $1)=no
73816fae4e5dSmrg            _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
73826fae4e5dSmrg            ;;
73836fae4e5dSmrg          *)
73846fae4e5dSmrg            _LT_TAGVAR(hardcode_direct, $1)=yes
73856fae4e5dSmrg            _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
73866fae4e5dSmrg            _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
73876fae4e5dSmrg					         # but as the default
73886fae4e5dSmrg					         # location of the library.
73896fae4e5dSmrg            ;;
73906fae4e5dSmrg        esac
73916fae4e5dSmrg
73926fae4e5dSmrg        case $cc_basename in
73936fae4e5dSmrg          CC*)
73946fae4e5dSmrg	    # FIXME: insert proper C++ library support
73956fae4e5dSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
73966fae4e5dSmrg	    ;;
73976fae4e5dSmrg          aCC*)
73986fae4e5dSmrg	    case $host_cpu in
73996fae4e5dSmrg	      hppa*64*)
74006fae4e5dSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
74016fae4e5dSmrg	        ;;
74026fae4e5dSmrg	      ia64*)
74036fae4e5dSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
74046fae4e5dSmrg	        ;;
74056fae4e5dSmrg	      *)
74066fae4e5dSmrg	        _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'
74076fae4e5dSmrg	        ;;
74086fae4e5dSmrg	    esac
74096fae4e5dSmrg	    # Commands to make compiler produce verbose output that lists
74106fae4e5dSmrg	    # what "hidden" libraries, object files and flags are used when
74116fae4e5dSmrg	    # linking a shared library.
74126fae4e5dSmrg	    #
74136fae4e5dSmrg	    # There doesn't appear to be a way to prevent this compiler from
74146fae4e5dSmrg	    # explicitly linking system object files so we need to strip them
74156fae4e5dSmrg	    # from the output so that they don't get included in the library
74166fae4e5dSmrg	    # dependencies.
74176fae4e5dSmrg	    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"'
74186fae4e5dSmrg	    ;;
74196fae4e5dSmrg          *)
74206fae4e5dSmrg	    if test "$GXX" = yes; then
74216fae4e5dSmrg	      if test $with_gnu_ld = no; then
74226fae4e5dSmrg	        case $host_cpu in
74236fae4e5dSmrg	          hppa*64*)
74246fae4e5dSmrg	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
74256fae4e5dSmrg	            ;;
74266fae4e5dSmrg	          ia64*)
74276fae4e5dSmrg	            _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'
74286fae4e5dSmrg	            ;;
74296fae4e5dSmrg	          *)
74306fae4e5dSmrg	            _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'
74316fae4e5dSmrg	            ;;
74326fae4e5dSmrg	        esac
74336fae4e5dSmrg	      fi
74346fae4e5dSmrg	    else
74356fae4e5dSmrg	      # FIXME: insert proper C++ library support
74366fae4e5dSmrg	      _LT_TAGVAR(ld_shlibs, $1)=no
74376fae4e5dSmrg	    fi
74386fae4e5dSmrg	    ;;
74396fae4e5dSmrg        esac
74406fae4e5dSmrg        ;;
74416fae4e5dSmrg
74426fae4e5dSmrg      interix[[3-9]]*)
74436fae4e5dSmrg	_LT_TAGVAR(hardcode_direct, $1)=no
74449c9ff80cSmrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
74456fae4e5dSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
74466fae4e5dSmrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
74476fae4e5dSmrg	# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
74486fae4e5dSmrg	# Instead, shared libraries are loaded at an image base (0x10000000 by
74496fae4e5dSmrg	# default) and relocated if they conflict, which is a slow very memory
74506fae4e5dSmrg	# consuming and fragmenting process.  To avoid this, we pick a random,
74516fae4e5dSmrg	# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
74526fae4e5dSmrg	# time.  Moving up from 0x10000000 also allows more sbrk(2) space.
74536fae4e5dSmrg	_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'
74546fae4e5dSmrg	_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'
74556fae4e5dSmrg	;;
74566fae4e5dSmrg      irix5* | irix6*)
74576fae4e5dSmrg        case $cc_basename in
74586fae4e5dSmrg          CC*)
74596fae4e5dSmrg	    # SGI C++
74606fae4e5dSmrg	    _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'
74611f0ac6a5Smrg
74626fae4e5dSmrg	    # Archives containing C++ object files must be created using
74636fae4e5dSmrg	    # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
74646fae4e5dSmrg	    # necessary to make sure instantiated templates are included
74656fae4e5dSmrg	    # in the archive.
74666fae4e5dSmrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
74676fae4e5dSmrg	    ;;
74686fae4e5dSmrg          *)
74696fae4e5dSmrg	    if test "$GXX" = yes; then
74706fae4e5dSmrg	      if test "$with_gnu_ld" = no; then
74716fae4e5dSmrg	        _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'
74726fae4e5dSmrg	      else
74736fae4e5dSmrg	        _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'
74746fae4e5dSmrg	      fi
74756fae4e5dSmrg	    fi
74766fae4e5dSmrg	    _LT_TAGVAR(link_all_deplibs, $1)=yes
74776fae4e5dSmrg	    ;;
74786fae4e5dSmrg        esac
74796fae4e5dSmrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
74806fae4e5dSmrg        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
74816fae4e5dSmrg        _LT_TAGVAR(inherit_rpath, $1)=yes
74826fae4e5dSmrg        ;;
74831f0ac6a5Smrg
74846fae4e5dSmrg      linux* | k*bsd*-gnu | kopensolaris*-gnu)
74856fae4e5dSmrg        case $cc_basename in
74866fae4e5dSmrg          KCC*)
74876fae4e5dSmrg	    # Kuck and Associates, Inc. (KAI) C++ Compiler
74881f0ac6a5Smrg
74896fae4e5dSmrg	    # KCC will only create a shared library if the output file
74906fae4e5dSmrg	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
74916fae4e5dSmrg	    # to its proper name (with version) after linking.
74926fae4e5dSmrg	    _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'
74936fae4e5dSmrg	    _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'
74946fae4e5dSmrg	    # Commands to make compiler produce verbose output that lists
74956fae4e5dSmrg	    # what "hidden" libraries, object files and flags are used when
74966fae4e5dSmrg	    # linking a shared library.
74976fae4e5dSmrg	    #
74986fae4e5dSmrg	    # There doesn't appear to be a way to prevent this compiler from
74996fae4e5dSmrg	    # explicitly linking system object files so we need to strip them
75006fae4e5dSmrg	    # from the output so that they don't get included in the library
75016fae4e5dSmrg	    # dependencies.
75026fae4e5dSmrg	    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"'
75031f0ac6a5Smrg
75046fae4e5dSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
75056fae4e5dSmrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
75061f0ac6a5Smrg
75076fae4e5dSmrg	    # Archives containing C++ object files must be created using
75086fae4e5dSmrg	    # "CC -Bstatic", where "CC" is the KAI C++ compiler.
75096fae4e5dSmrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
75106fae4e5dSmrg	    ;;
75116fae4e5dSmrg	  icpc* | ecpc* )
75126fae4e5dSmrg	    # Intel C++
75136fae4e5dSmrg	    with_gnu_ld=yes
75146fae4e5dSmrg	    # version 8.0 and above of icpc choke on multiply defined symbols
75156fae4e5dSmrg	    # if we add $predep_objects and $postdep_objects, however 7.1 and
75166fae4e5dSmrg	    # earlier do not add the objects themselves.
75176fae4e5dSmrg	    case `$CC -V 2>&1` in
75186fae4e5dSmrg	      *"Version 7."*)
75196fae4e5dSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
75206fae4e5dSmrg		_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'
75216fae4e5dSmrg		;;
75226fae4e5dSmrg	      *)  # Version 8.0 or newer
75236fae4e5dSmrg	        tmp_idyn=
75246fae4e5dSmrg	        case $host_cpu in
75256fae4e5dSmrg		  ia64*) tmp_idyn=' -i_dynamic';;
75266fae4e5dSmrg		esac
75276fae4e5dSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
75286fae4e5dSmrg		_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'
75296fae4e5dSmrg		;;
75306fae4e5dSmrg	    esac
75316fae4e5dSmrg	    _LT_TAGVAR(archive_cmds_need_lc, $1)=no
75326fae4e5dSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
75336fae4e5dSmrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
75346fae4e5dSmrg	    _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
75356fae4e5dSmrg	    ;;
75366fae4e5dSmrg          pgCC* | pgcpp*)
75376fae4e5dSmrg            # Portland Group C++ compiler
75386fae4e5dSmrg	    case `$CC -V` in
75396fae4e5dSmrg	    *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
75406fae4e5dSmrg	      _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
75416fae4e5dSmrg		rm -rf $tpldir~
75426fae4e5dSmrg		$CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
75436fae4e5dSmrg		compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
75446fae4e5dSmrg	      _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
75456fae4e5dSmrg		rm -rf $tpldir~
75466fae4e5dSmrg		$CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
75476fae4e5dSmrg		$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
75486fae4e5dSmrg		$RANLIB $oldlib'
75496fae4e5dSmrg	      _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
75506fae4e5dSmrg		rm -rf $tpldir~
75516fae4e5dSmrg		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
75526fae4e5dSmrg		$CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
75536fae4e5dSmrg	      _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
75546fae4e5dSmrg		rm -rf $tpldir~
75556fae4e5dSmrg		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
75566fae4e5dSmrg		$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'
75576fae4e5dSmrg	      ;;
75586fae4e5dSmrg	    *) # Version 6 and above use weak symbols
75596fae4e5dSmrg	      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
75606fae4e5dSmrg	      _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'
75616fae4e5dSmrg	      ;;
75626fae4e5dSmrg	    esac
75631f0ac6a5Smrg
75646fae4e5dSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
75656fae4e5dSmrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
75666fae4e5dSmrg	    _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'
75676fae4e5dSmrg            ;;
75686fae4e5dSmrg	  cxx*)
75696fae4e5dSmrg	    # Compaq C++
75706fae4e5dSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
75716fae4e5dSmrg	    _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'
75721f0ac6a5Smrg
75736fae4e5dSmrg	    runpath_var=LD_RUN_PATH
75746fae4e5dSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
75756fae4e5dSmrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
75761f0ac6a5Smrg
75776fae4e5dSmrg	    # Commands to make compiler produce verbose output that lists
75786fae4e5dSmrg	    # what "hidden" libraries, object files and flags are used when
75796fae4e5dSmrg	    # linking a shared library.
75806fae4e5dSmrg	    #
75816fae4e5dSmrg	    # There doesn't appear to be a way to prevent this compiler from
75826fae4e5dSmrg	    # explicitly linking system object files so we need to strip them
75836fae4e5dSmrg	    # from the output so that they don't get included in the library
75846fae4e5dSmrg	    # dependencies.
75856fae4e5dSmrg	    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'
75866fae4e5dSmrg	    ;;
75876fae4e5dSmrg	  xl* | mpixl* | bgxl*)
75886fae4e5dSmrg	    # IBM XL 8.0 on PPC, with GNU ld
75896fae4e5dSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
75906fae4e5dSmrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
75916fae4e5dSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
75926fae4e5dSmrg	    if test "x$supports_anon_versioning" = xyes; then
75936fae4e5dSmrg	      _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
75946fae4e5dSmrg		cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
75956fae4e5dSmrg		echo "local: *; };" >> $output_objdir/$libname.ver~
75966fae4e5dSmrg		$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
75976fae4e5dSmrg	    fi
75986fae4e5dSmrg	    ;;
75996fae4e5dSmrg	  *)
76006fae4e5dSmrg	    case `$CC -V 2>&1 | sed 5q` in
76016fae4e5dSmrg	    *Sun\ C*)
76026fae4e5dSmrg	      # Sun C++ 5.9
76036fae4e5dSmrg	      _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
76046fae4e5dSmrg	      _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
76056fae4e5dSmrg	      _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'
76066fae4e5dSmrg	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
76076fae4e5dSmrg	      _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'
76086fae4e5dSmrg	      _LT_TAGVAR(compiler_needs_object, $1)=yes
76091f0ac6a5Smrg
76106fae4e5dSmrg	      # Not sure whether something based on
76116fae4e5dSmrg	      # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
76126fae4e5dSmrg	      # would be better.
76136fae4e5dSmrg	      output_verbose_link_cmd='func_echo_all'
76141f0ac6a5Smrg
76156fae4e5dSmrg	      # Archives containing C++ object files must be created using
76166fae4e5dSmrg	      # "CC -xar", where "CC" is the Sun C++ compiler.  This is
76176fae4e5dSmrg	      # necessary to make sure instantiated templates are included
76186fae4e5dSmrg	      # in the archive.
76196fae4e5dSmrg	      _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
76206fae4e5dSmrg	      ;;
76216fae4e5dSmrg	    esac
76226fae4e5dSmrg	    ;;
76236fae4e5dSmrg	esac
76246fae4e5dSmrg	;;
76251f0ac6a5Smrg
76266fae4e5dSmrg      lynxos*)
76276fae4e5dSmrg        # FIXME: insert proper C++ library support
76286fae4e5dSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
76296fae4e5dSmrg	;;
76301f0ac6a5Smrg
76316fae4e5dSmrg      m88k*)
76326fae4e5dSmrg        # FIXME: insert proper C++ library support
76336fae4e5dSmrg        _LT_TAGVAR(ld_shlibs, $1)=no
76346fae4e5dSmrg	;;
76351f0ac6a5Smrg
76366fae4e5dSmrg      mvs*)
76376fae4e5dSmrg        case $cc_basename in
76386fae4e5dSmrg          cxx*)
76396fae4e5dSmrg	    # FIXME: insert proper C++ library support
76406fae4e5dSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
76416fae4e5dSmrg	    ;;
76426fae4e5dSmrg	  *)
76436fae4e5dSmrg	    # FIXME: insert proper C++ library support
76446fae4e5dSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
76456fae4e5dSmrg	    ;;
76466fae4e5dSmrg	esac
76476fae4e5dSmrg	;;
76481f0ac6a5Smrg
76496fae4e5dSmrg      netbsd*)
76506fae4e5dSmrg        if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
76516fae4e5dSmrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
76526fae4e5dSmrg	  wlarc=
76536fae4e5dSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
76546fae4e5dSmrg	  _LT_TAGVAR(hardcode_direct, $1)=yes
76556fae4e5dSmrg	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
76566fae4e5dSmrg	fi
76576fae4e5dSmrg	# Workaround some broken pre-1.5 toolchains
76586fae4e5dSmrg	output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
76596fae4e5dSmrg	;;
76601f0ac6a5Smrg
76616fae4e5dSmrg      *nto* | *qnx*)
76626fae4e5dSmrg        _LT_TAGVAR(ld_shlibs, $1)=yes
76636fae4e5dSmrg	;;
76641f0ac6a5Smrg
76656fae4e5dSmrg      openbsd2*)
76666fae4e5dSmrg        # C++ shared libraries are fairly broken
76676fae4e5dSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
76689c9ff80cSmrg	;;
76691f0ac6a5Smrg
76706fae4e5dSmrg      openbsd*)
76716fae4e5dSmrg	if test -f /usr/libexec/ld.so; then
76726fae4e5dSmrg	  _LT_TAGVAR(hardcode_direct, $1)=yes
76736fae4e5dSmrg	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
76746fae4e5dSmrg	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
76756fae4e5dSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
76766fae4e5dSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
76776fae4e5dSmrg	  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
76786fae4e5dSmrg	    _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'
76796fae4e5dSmrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
76806fae4e5dSmrg	    _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
76816fae4e5dSmrg	  fi
76826fae4e5dSmrg	  output_verbose_link_cmd=func_echo_all
76836fae4e5dSmrg	else
76846fae4e5dSmrg	  _LT_TAGVAR(ld_shlibs, $1)=no
76856fae4e5dSmrg	fi
76866fae4e5dSmrg	;;
76871f0ac6a5Smrg
76886fae4e5dSmrg      osf3* | osf4* | osf5*)
76896fae4e5dSmrg        case $cc_basename in
76906fae4e5dSmrg          KCC*)
76916fae4e5dSmrg	    # Kuck and Associates, Inc. (KAI) C++ Compiler
76921f0ac6a5Smrg
76936fae4e5dSmrg	    # KCC will only create a shared library if the output file
76946fae4e5dSmrg	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
76956fae4e5dSmrg	    # to its proper name (with version) after linking.
76966fae4e5dSmrg	    _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'
76971f0ac6a5Smrg
76986fae4e5dSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
76996fae4e5dSmrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
77001f0ac6a5Smrg
77016fae4e5dSmrg	    # Archives containing C++ object files must be created using
77026fae4e5dSmrg	    # the KAI C++ compiler.
77036fae4e5dSmrg	    case $host in
77046fae4e5dSmrg	      osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
77056fae4e5dSmrg	      *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
77066fae4e5dSmrg	    esac
77076fae4e5dSmrg	    ;;
77086fae4e5dSmrg          RCC*)
77096fae4e5dSmrg	    # Rational C++ 2.4.1
77106fae4e5dSmrg	    # FIXME: insert proper C++ library support
77116fae4e5dSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
77126fae4e5dSmrg	    ;;
77136fae4e5dSmrg          cxx*)
77146fae4e5dSmrg	    case $host in
77156fae4e5dSmrg	      osf3*)
77166fae4e5dSmrg	        _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
77176fae4e5dSmrg	        _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'
77186fae4e5dSmrg	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
77196fae4e5dSmrg		;;
77206fae4e5dSmrg	      *)
77216fae4e5dSmrg	        _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
77226fae4e5dSmrg	        _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'
77236fae4e5dSmrg	        _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
77246fae4e5dSmrg	          echo "-hidden">> $lib.exp~
77256fae4e5dSmrg	          $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~
77266fae4e5dSmrg	          $RM $lib.exp'
77276fae4e5dSmrg	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
77286fae4e5dSmrg		;;
77296fae4e5dSmrg	    esac
77309c9ff80cSmrg
77316fae4e5dSmrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
77329c9ff80cSmrg
77336fae4e5dSmrg	    # Commands to make compiler produce verbose output that lists
77346fae4e5dSmrg	    # what "hidden" libraries, object files and flags are used when
77356fae4e5dSmrg	    # linking a shared library.
77366fae4e5dSmrg	    #
77376fae4e5dSmrg	    # There doesn't appear to be a way to prevent this compiler from
77386fae4e5dSmrg	    # explicitly linking system object files so we need to strip them
77396fae4e5dSmrg	    # from the output so that they don't get included in the library
77406fae4e5dSmrg	    # dependencies.
77416fae4e5dSmrg	    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"'
77426fae4e5dSmrg	    ;;
77436fae4e5dSmrg	  *)
77446fae4e5dSmrg	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
77456fae4e5dSmrg	      _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
77466fae4e5dSmrg	      case $host in
77476fae4e5dSmrg	        osf3*)
77486fae4e5dSmrg	          _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'
77496fae4e5dSmrg		  ;;
77506fae4e5dSmrg	        *)
77516fae4e5dSmrg	          _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'
77526fae4e5dSmrg		  ;;
77536fae4e5dSmrg	      esac
77541f0ac6a5Smrg
77556fae4e5dSmrg	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
77566fae4e5dSmrg	      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
77571f0ac6a5Smrg
77586fae4e5dSmrg	      # Commands to make compiler produce verbose output that lists
77596fae4e5dSmrg	      # what "hidden" libraries, object files and flags are used when
77606fae4e5dSmrg	      # linking a shared library.
77616fae4e5dSmrg	      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
77621f0ac6a5Smrg
77636fae4e5dSmrg	    else
77646fae4e5dSmrg	      # FIXME: insert proper C++ library support
77656fae4e5dSmrg	      _LT_TAGVAR(ld_shlibs, $1)=no
77666fae4e5dSmrg	    fi
77676fae4e5dSmrg	    ;;
77686fae4e5dSmrg        esac
77696fae4e5dSmrg        ;;
77701f0ac6a5Smrg
77716fae4e5dSmrg      psos*)
77726fae4e5dSmrg        # FIXME: insert proper C++ library support
77736fae4e5dSmrg        _LT_TAGVAR(ld_shlibs, $1)=no
77746fae4e5dSmrg        ;;
77751f0ac6a5Smrg
77766fae4e5dSmrg      sunos4*)
77776fae4e5dSmrg        case $cc_basename in
77786fae4e5dSmrg          CC*)
77796fae4e5dSmrg	    # Sun C++ 4.x
77806fae4e5dSmrg	    # FIXME: insert proper C++ library support
77816fae4e5dSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
77826fae4e5dSmrg	    ;;
77836fae4e5dSmrg          lcc*)
77846fae4e5dSmrg	    # Lucid
77856fae4e5dSmrg	    # FIXME: insert proper C++ library support
77866fae4e5dSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
77876fae4e5dSmrg	    ;;
77886fae4e5dSmrg          *)
77896fae4e5dSmrg	    # FIXME: insert proper C++ library support
77906fae4e5dSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
77916fae4e5dSmrg	    ;;
77926fae4e5dSmrg        esac
77936fae4e5dSmrg        ;;
77941f0ac6a5Smrg
77956fae4e5dSmrg      solaris*)
77966fae4e5dSmrg        case $cc_basename in
77976fae4e5dSmrg          CC* | sunCC*)
77986fae4e5dSmrg	    # Sun C++ 4.2, 5.x and Centerline C++
77996fae4e5dSmrg            _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
78006fae4e5dSmrg	    _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
78016fae4e5dSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
78026fae4e5dSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
78036fae4e5dSmrg	      $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'
78041f0ac6a5Smrg
78056fae4e5dSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
78066fae4e5dSmrg	    _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
78076fae4e5dSmrg	    case $host_os in
78086fae4e5dSmrg	      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
78096fae4e5dSmrg	      *)
78106fae4e5dSmrg		# The compiler driver will combine and reorder linker options,
78116fae4e5dSmrg		# but understands `-z linker_flag'.
78126fae4e5dSmrg	        # Supported since Solaris 2.6 (maybe 2.5.1?)
78136fae4e5dSmrg		_LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
78146fae4e5dSmrg	        ;;
78156fae4e5dSmrg	    esac
78166fae4e5dSmrg	    _LT_TAGVAR(link_all_deplibs, $1)=yes
78179c9ff80cSmrg
78186fae4e5dSmrg	    output_verbose_link_cmd='func_echo_all'
78199c9ff80cSmrg
78206fae4e5dSmrg	    # Archives containing C++ object files must be created using
78216fae4e5dSmrg	    # "CC -xar", where "CC" is the Sun C++ compiler.  This is
78226fae4e5dSmrg	    # necessary to make sure instantiated templates are included
78236fae4e5dSmrg	    # in the archive.
78246fae4e5dSmrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
78256fae4e5dSmrg	    ;;
78266fae4e5dSmrg          gcx*)
78276fae4e5dSmrg	    # Green Hills C++ Compiler
78286fae4e5dSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
78299c9ff80cSmrg
78306fae4e5dSmrg	    # The C++ compiler must be used to create the archive.
78316fae4e5dSmrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
78326fae4e5dSmrg	    ;;
78336fae4e5dSmrg          *)
78346fae4e5dSmrg	    # GNU C++ compiler with Solaris linker
78356fae4e5dSmrg	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
78366fae4e5dSmrg	      _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
78376fae4e5dSmrg	      if $CC --version | $GREP -v '^2\.7' > /dev/null; then
78386fae4e5dSmrg	        _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'
78396fae4e5dSmrg	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
78406fae4e5dSmrg		  $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
78411f0ac6a5Smrg
78426fae4e5dSmrg	        # Commands to make compiler produce verbose output that lists
78436fae4e5dSmrg	        # what "hidden" libraries, object files and flags are used when
78446fae4e5dSmrg	        # linking a shared library.
78456fae4e5dSmrg	        output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
78466fae4e5dSmrg	      else
78476fae4e5dSmrg	        # g++ 2.7 appears to require `-G' NOT `-shared' on this
78486fae4e5dSmrg	        # platform.
78496fae4e5dSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
78506fae4e5dSmrg	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
78516fae4e5dSmrg		  $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
78521f0ac6a5Smrg
78536fae4e5dSmrg	        # Commands to make compiler produce verbose output that lists
78546fae4e5dSmrg	        # what "hidden" libraries, object files and flags are used when
78556fae4e5dSmrg	        # linking a shared library.
78566fae4e5dSmrg	        output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
78576fae4e5dSmrg	      fi
78581f0ac6a5Smrg
78596fae4e5dSmrg	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
78606fae4e5dSmrg	      case $host_os in
78616fae4e5dSmrg		solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
78626fae4e5dSmrg		*)
78636fae4e5dSmrg		  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
78646fae4e5dSmrg		  ;;
78656fae4e5dSmrg	      esac
78666fae4e5dSmrg	    fi
78676fae4e5dSmrg	    ;;
78686fae4e5dSmrg        esac
78696fae4e5dSmrg        ;;
78701f0ac6a5Smrg
78716fae4e5dSmrg    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
78726fae4e5dSmrg      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
78736fae4e5dSmrg      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
78746fae4e5dSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
78756fae4e5dSmrg      runpath_var='LD_RUN_PATH'
78761f0ac6a5Smrg
78776fae4e5dSmrg      case $cc_basename in
78786fae4e5dSmrg        CC*)
78796fae4e5dSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
78806fae4e5dSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
78816fae4e5dSmrg	  ;;
78826fae4e5dSmrg	*)
78836fae4e5dSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
78846fae4e5dSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
78856fae4e5dSmrg	  ;;
78866fae4e5dSmrg      esac
78876fae4e5dSmrg      ;;
78881f0ac6a5Smrg
78896fae4e5dSmrg      sysv5* | sco3.2v5* | sco5v6*)
78906fae4e5dSmrg	# Note: We can NOT use -z defs as we might desire, because we do not
78916fae4e5dSmrg	# link with -lc, and that would cause any symbols used from libc to
78926fae4e5dSmrg	# always be unresolved, which means just about no library would
78936fae4e5dSmrg	# ever link correctly.  If we're not using GNU ld we use -z text
78946fae4e5dSmrg	# though, which does catch some bad symbols but isn't as heavy-handed
78956fae4e5dSmrg	# as -z defs.
78966fae4e5dSmrg	_LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
78976fae4e5dSmrg	_LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
78986fae4e5dSmrg	_LT_TAGVAR(archive_cmds_need_lc, $1)=no
78996fae4e5dSmrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
79006fae4e5dSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
79016fae4e5dSmrg	_LT_TAGVAR(hardcode_libdir_separator, $1)=':'
79026fae4e5dSmrg	_LT_TAGVAR(link_all_deplibs, $1)=yes
79036fae4e5dSmrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
79046fae4e5dSmrg	runpath_var='LD_RUN_PATH'
79056fae4e5dSmrg
79066fae4e5dSmrg	case $cc_basename in
79076fae4e5dSmrg          CC*)
79086fae4e5dSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
79096fae4e5dSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
79106fae4e5dSmrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
79116fae4e5dSmrg	      '"$_LT_TAGVAR(old_archive_cmds, $1)"
79126fae4e5dSmrg	    _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
79136fae4e5dSmrg	      '"$_LT_TAGVAR(reload_cmds, $1)"
79146fae4e5dSmrg	    ;;
79156fae4e5dSmrg	  *)
79166fae4e5dSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
79176fae4e5dSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
79186fae4e5dSmrg	    ;;
79196fae4e5dSmrg	esac
79206fae4e5dSmrg      ;;
79216fae4e5dSmrg
79226fae4e5dSmrg      tandem*)
79236fae4e5dSmrg        case $cc_basename in
79246fae4e5dSmrg          NCC*)
79256fae4e5dSmrg	    # NonStop-UX NCC 3.20
79266fae4e5dSmrg	    # FIXME: insert proper C++ library support
79276fae4e5dSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
79286fae4e5dSmrg	    ;;
79296fae4e5dSmrg          *)
79306fae4e5dSmrg	    # FIXME: insert proper C++ library support
79316fae4e5dSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
79326fae4e5dSmrg	    ;;
79336fae4e5dSmrg        esac
79346fae4e5dSmrg        ;;
79356fae4e5dSmrg
79366fae4e5dSmrg      vxworks*)
79376fae4e5dSmrg        # FIXME: insert proper C++ library support
79386fae4e5dSmrg        _LT_TAGVAR(ld_shlibs, $1)=no
79396fae4e5dSmrg        ;;
79401f0ac6a5Smrg
79416fae4e5dSmrg      *)
79426fae4e5dSmrg        # FIXME: insert proper C++ library support
79436fae4e5dSmrg        _LT_TAGVAR(ld_shlibs, $1)=no
79446fae4e5dSmrg        ;;
79456fae4e5dSmrg    esac
79461f0ac6a5Smrg
79476fae4e5dSmrg    AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
79486fae4e5dSmrg    test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
79499c9ff80cSmrg
79506fae4e5dSmrg    _LT_TAGVAR(GCC, $1)="$GXX"
79516fae4e5dSmrg    _LT_TAGVAR(LD, $1)="$LD"
79521f0ac6a5Smrg
79536fae4e5dSmrg    ## CAVEAT EMPTOR:
79546fae4e5dSmrg    ## There is no encapsulation within the following macros, do not change
79556fae4e5dSmrg    ## the running order or otherwise move them around unless you know exactly
79566fae4e5dSmrg    ## what you are doing...
79576fae4e5dSmrg    _LT_SYS_HIDDEN_LIBDEPS($1)
79586fae4e5dSmrg    _LT_COMPILER_PIC($1)
79596fae4e5dSmrg    _LT_COMPILER_C_O($1)
79606fae4e5dSmrg    _LT_COMPILER_FILE_LOCKS($1)
79616fae4e5dSmrg    _LT_LINKER_SHLIBS($1)
79626fae4e5dSmrg    _LT_SYS_DYNAMIC_LINKER($1)
79636fae4e5dSmrg    _LT_LINKER_HARDCODE_LIBPATH($1)
7964e5410a46Smrg
79656fae4e5dSmrg    _LT_CONFIG($1)
79666fae4e5dSmrg  fi # test -n "$compiler"
79679c9ff80cSmrg
79686fae4e5dSmrg  CC=$lt_save_CC
79696fae4e5dSmrg  CFLAGS=$lt_save_CFLAGS
79706fae4e5dSmrg  LDCXX=$LD
79716fae4e5dSmrg  LD=$lt_save_LD
79726fae4e5dSmrg  GCC=$lt_save_GCC
79736fae4e5dSmrg  with_gnu_ld=$lt_save_with_gnu_ld
79746fae4e5dSmrg  lt_cv_path_LDCXX=$lt_cv_path_LD
79756fae4e5dSmrg  lt_cv_path_LD=$lt_save_path_LD
79766fae4e5dSmrg  lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
79776fae4e5dSmrg  lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
79786fae4e5dSmrgfi # test "$_lt_caught_CXX_error" != yes
79799c9ff80cSmrg
79806fae4e5dSmrgAC_LANG_POP
79816fae4e5dSmrg])# _LT_LANG_CXX_CONFIG
79829c9ff80cSmrg
79839c9ff80cSmrg
79846fae4e5dSmrg# _LT_FUNC_STRIPNAME_CNF
79856fae4e5dSmrg# ----------------------
79866fae4e5dSmrg# func_stripname_cnf prefix suffix name
79876fae4e5dSmrg# strip PREFIX and SUFFIX off of NAME.
79886fae4e5dSmrg# PREFIX and SUFFIX must not contain globbing or regex special
79896fae4e5dSmrg# characters, hashes, percent signs, but SUFFIX may contain a leading
79906fae4e5dSmrg# dot (in which case that matches only a dot).
79916fae4e5dSmrg#
79926fae4e5dSmrg# This function is identical to the (non-XSI) version of func_stripname,
79936fae4e5dSmrg# except this one can be used by m4 code that may be executed by configure,
79946fae4e5dSmrg# rather than the libtool script.
79956fae4e5dSmrgm4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
79966fae4e5dSmrgAC_REQUIRE([_LT_DECL_SED])
79976fae4e5dSmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
79986fae4e5dSmrgfunc_stripname_cnf ()
79996fae4e5dSmrg{
80006fae4e5dSmrg  case ${2} in
80016fae4e5dSmrg  .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
80026fae4e5dSmrg  *)  func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
80036fae4e5dSmrg  esac
80046fae4e5dSmrg} # func_stripname_cnf
80056fae4e5dSmrg])# _LT_FUNC_STRIPNAME_CNF
80069c9ff80cSmrg
80076fae4e5dSmrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
80086fae4e5dSmrg# ---------------------------------
80096fae4e5dSmrg# Figure out "hidden" library dependencies from verbose
80106fae4e5dSmrg# compiler output when linking a shared library.
80116fae4e5dSmrg# Parse the compiler output and extract the necessary
80126fae4e5dSmrg# objects, libraries and library flags.
80136fae4e5dSmrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS],
80146fae4e5dSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
80156fae4e5dSmrgAC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
80166fae4e5dSmrg# Dependencies to place before and after the object being linked:
80176fae4e5dSmrg_LT_TAGVAR(predep_objects, $1)=
80186fae4e5dSmrg_LT_TAGVAR(postdep_objects, $1)=
80196fae4e5dSmrg_LT_TAGVAR(predeps, $1)=
80206fae4e5dSmrg_LT_TAGVAR(postdeps, $1)=
80216fae4e5dSmrg_LT_TAGVAR(compiler_lib_search_path, $1)=
80221f0ac6a5Smrg
80236fae4e5dSmrgdnl we can't use the lt_simple_compile_test_code here,
80246fae4e5dSmrgdnl because it contains code intended for an executable,
80256fae4e5dSmrgdnl not a library.  It's possible we should let each
80266fae4e5dSmrgdnl tag define a new lt_????_link_test_code variable,
80276fae4e5dSmrgdnl but it's only used here...
80286fae4e5dSmrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
80296fae4e5dSmrgint a;
80306fae4e5dSmrgvoid foo (void) { a = 0; }
80316fae4e5dSmrg_LT_EOF
80326fae4e5dSmrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
80336fae4e5dSmrgclass Foo
80346fae4e5dSmrg{
80356fae4e5dSmrgpublic:
80366fae4e5dSmrg  Foo (void) { a = 0; }
80376fae4e5dSmrgprivate:
80386fae4e5dSmrg  int a;
80396fae4e5dSmrg};
80406fae4e5dSmrg_LT_EOF
80416fae4e5dSmrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
80426fae4e5dSmrg      subroutine foo
80436fae4e5dSmrg      implicit none
80446fae4e5dSmrg      integer*4 a
80456fae4e5dSmrg      a=0
80466fae4e5dSmrg      return
80476fae4e5dSmrg      end
80486fae4e5dSmrg_LT_EOF
80496fae4e5dSmrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
80506fae4e5dSmrg      subroutine foo
80516fae4e5dSmrg      implicit none
80526fae4e5dSmrg      integer a
80536fae4e5dSmrg      a=0
80546fae4e5dSmrg      return
80556fae4e5dSmrg      end
80566fae4e5dSmrg_LT_EOF
80576fae4e5dSmrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
80586fae4e5dSmrgpublic class foo {
80596fae4e5dSmrg  private int a;
80606fae4e5dSmrg  public void bar (void) {
80616fae4e5dSmrg    a = 0;
80626fae4e5dSmrg  }
80636fae4e5dSmrg};
80646fae4e5dSmrg_LT_EOF
80656fae4e5dSmrg])
80661f0ac6a5Smrg
80676fae4e5dSmrg_lt_libdeps_save_CFLAGS=$CFLAGS
80686fae4e5dSmrgcase "$CC $CFLAGS " in #(
80696fae4e5dSmrg*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
80706fae4e5dSmrg*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
80716fae4e5dSmrgesac
80721f0ac6a5Smrg
80736fae4e5dSmrgdnl Parse the compiler output and extract the necessary
80746fae4e5dSmrgdnl objects, libraries and library flags.
80756fae4e5dSmrgif AC_TRY_EVAL(ac_compile); then
80766fae4e5dSmrg  # Parse the compiler output and extract the necessary
80776fae4e5dSmrg  # objects, libraries and library flags.
80781f0ac6a5Smrg
80796fae4e5dSmrg  # Sentinel used to keep track of whether or not we are before
80806fae4e5dSmrg  # the conftest object file.
80816fae4e5dSmrg  pre_test_object_deps_done=no
80821f0ac6a5Smrg
80836fae4e5dSmrg  for p in `eval "$output_verbose_link_cmd"`; do
80846fae4e5dSmrg    case ${prev}${p} in
80851f0ac6a5Smrg
80866fae4e5dSmrg    -L* | -R* | -l*)
80876fae4e5dSmrg       # Some compilers place space between "-{L,R}" and the path.
80886fae4e5dSmrg       # Remove the space.
80896fae4e5dSmrg       if test $p = "-L" ||
80906fae4e5dSmrg          test $p = "-R"; then
80916fae4e5dSmrg	 prev=$p
80926fae4e5dSmrg	 continue
80936fae4e5dSmrg       fi
80941f0ac6a5Smrg
80956fae4e5dSmrg       # Expand the sysroot to ease extracting the directories later.
80966fae4e5dSmrg       if test -z "$prev"; then
80976fae4e5dSmrg         case $p in
80986fae4e5dSmrg         -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
80996fae4e5dSmrg         -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
81006fae4e5dSmrg         -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
81016fae4e5dSmrg         esac
81026fae4e5dSmrg       fi
81036fae4e5dSmrg       case $p in
81046fae4e5dSmrg       =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
81056fae4e5dSmrg       esac
81066fae4e5dSmrg       if test "$pre_test_object_deps_done" = no; then
81076fae4e5dSmrg	 case ${prev} in
81086fae4e5dSmrg	 -L | -R)
81096fae4e5dSmrg	   # Internal compiler library paths should come after those
81106fae4e5dSmrg	   # provided the user.  The postdeps already come after the
81116fae4e5dSmrg	   # user supplied libs so there is no need to process them.
81126fae4e5dSmrg	   if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
81136fae4e5dSmrg	     _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
81146fae4e5dSmrg	   else
81156fae4e5dSmrg	     _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
81166fae4e5dSmrg	   fi
81176fae4e5dSmrg	   ;;
81186fae4e5dSmrg	 # The "-l" case would never come before the object being
81196fae4e5dSmrg	 # linked, so don't bother handling this case.
81206fae4e5dSmrg	 esac
81216fae4e5dSmrg       else
81226fae4e5dSmrg	 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
81236fae4e5dSmrg	   _LT_TAGVAR(postdeps, $1)="${prev}${p}"
81246fae4e5dSmrg	 else
81256fae4e5dSmrg	   _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
81266fae4e5dSmrg	 fi
81276fae4e5dSmrg       fi
81286fae4e5dSmrg       prev=
81296fae4e5dSmrg       ;;
81309c9ff80cSmrg
81316fae4e5dSmrg    *.lto.$objext) ;; # Ignore GCC LTO objects
81326fae4e5dSmrg    *.$objext)
81336fae4e5dSmrg       # This assumes that the test object file only shows up
81346fae4e5dSmrg       # once in the compiler output.
81356fae4e5dSmrg       if test "$p" = "conftest.$objext"; then
81366fae4e5dSmrg	 pre_test_object_deps_done=yes
81376fae4e5dSmrg	 continue
81386fae4e5dSmrg       fi
81391f0ac6a5Smrg
81406fae4e5dSmrg       if test "$pre_test_object_deps_done" = no; then
81416fae4e5dSmrg	 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
81426fae4e5dSmrg	   _LT_TAGVAR(predep_objects, $1)="$p"
81436fae4e5dSmrg	 else
81446fae4e5dSmrg	   _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
81456fae4e5dSmrg	 fi
81466fae4e5dSmrg       else
81476fae4e5dSmrg	 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
81486fae4e5dSmrg	   _LT_TAGVAR(postdep_objects, $1)="$p"
81496fae4e5dSmrg	 else
81506fae4e5dSmrg	   _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
81516fae4e5dSmrg	 fi
81526fae4e5dSmrg       fi
81536fae4e5dSmrg       ;;
81541f0ac6a5Smrg
81556fae4e5dSmrg    *) ;; # Ignore the rest.
81561f0ac6a5Smrg
81576fae4e5dSmrg    esac
81586fae4e5dSmrg  done
81599c9ff80cSmrg
81606fae4e5dSmrg  # Clean up.
81616fae4e5dSmrg  rm -f a.out a.exe
81626fae4e5dSmrgelse
81636fae4e5dSmrg  echo "libtool.m4: error: problem compiling $1 test program"
81646fae4e5dSmrgfi
81651f0ac6a5Smrg
81666fae4e5dSmrg$RM -f confest.$objext
81676fae4e5dSmrgCFLAGS=$_lt_libdeps_save_CFLAGS
81681f0ac6a5Smrg
81696fae4e5dSmrg# PORTME: override above test on systems where it is broken
81706fae4e5dSmrgm4_if([$1], [CXX],
81716fae4e5dSmrg[case $host_os in
81726fae4e5dSmrginterix[[3-9]]*)
81736fae4e5dSmrg  # Interix 3.5 installs completely hosed .la files for C++, so rather than
81746fae4e5dSmrg  # hack all around it, let's just trust "g++" to DTRT.
81756fae4e5dSmrg  _LT_TAGVAR(predep_objects,$1)=
81766fae4e5dSmrg  _LT_TAGVAR(postdep_objects,$1)=
81776fae4e5dSmrg  _LT_TAGVAR(postdeps,$1)=
81786fae4e5dSmrg  ;;
81799c9ff80cSmrg
81806fae4e5dSmrglinux*)
81816fae4e5dSmrg  case `$CC -V 2>&1 | sed 5q` in
81826fae4e5dSmrg  *Sun\ C*)
81836fae4e5dSmrg    # Sun C++ 5.9
81849c9ff80cSmrg
81856fae4e5dSmrg    # The more standards-conforming stlport4 library is
81866fae4e5dSmrg    # incompatible with the Cstd library. Avoid specifying
81876fae4e5dSmrg    # it if it's in CXXFLAGS. Ignore libCrun as
81886fae4e5dSmrg    # -library=stlport4 depends on it.
81896fae4e5dSmrg    case " $CXX $CXXFLAGS " in
81906fae4e5dSmrg    *" -library=stlport4 "*)
81916fae4e5dSmrg      solaris_use_stlport4=yes
81926fae4e5dSmrg      ;;
81936fae4e5dSmrg    esac
81941f0ac6a5Smrg
81956fae4e5dSmrg    if test "$solaris_use_stlport4" != yes; then
81966fae4e5dSmrg      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
81976fae4e5dSmrg    fi
81986fae4e5dSmrg    ;;
81996fae4e5dSmrg  esac
82006fae4e5dSmrg  ;;
82019c9ff80cSmrg
82026fae4e5dSmrgsolaris*)
82036fae4e5dSmrg  case $cc_basename in
82046fae4e5dSmrg  CC* | sunCC*)
82056fae4e5dSmrg    # The more standards-conforming stlport4 library is
82066fae4e5dSmrg    # incompatible with the Cstd library. Avoid specifying
82076fae4e5dSmrg    # it if it's in CXXFLAGS. Ignore libCrun as
82086fae4e5dSmrg    # -library=stlport4 depends on it.
82096fae4e5dSmrg    case " $CXX $CXXFLAGS " in
82106fae4e5dSmrg    *" -library=stlport4 "*)
82116fae4e5dSmrg      solaris_use_stlport4=yes
82126fae4e5dSmrg      ;;
82136fae4e5dSmrg    esac
82141f0ac6a5Smrg
82156fae4e5dSmrg    # Adding this requires a known-good setup of shared libraries for
82166fae4e5dSmrg    # Sun compiler versions before 5.6, else PIC objects from an old
82176fae4e5dSmrg    # archive will be linked into the output, leading to subtle bugs.
82186fae4e5dSmrg    if test "$solaris_use_stlport4" != yes; then
82196fae4e5dSmrg      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
82206fae4e5dSmrg    fi
82216fae4e5dSmrg    ;;
82226fae4e5dSmrg  esac
82236fae4e5dSmrg  ;;
82246fae4e5dSmrgesac
82256fae4e5dSmrg])
82261f0ac6a5Smrg
82276fae4e5dSmrgcase " $_LT_TAGVAR(postdeps, $1) " in
82286fae4e5dSmrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
82296fae4e5dSmrgesac
82306fae4e5dSmrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=
82316fae4e5dSmrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
82326fae4e5dSmrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
82336fae4e5dSmrgfi
82346fae4e5dSmrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1],
82356fae4e5dSmrg    [The directories searched by this compiler when creating a shared library])
82366fae4e5dSmrg_LT_TAGDECL([], [predep_objects], [1],
82376fae4e5dSmrg    [Dependencies to place before and after the objects being linked to
82386fae4e5dSmrg    create a shared library])
82396fae4e5dSmrg_LT_TAGDECL([], [postdep_objects], [1])
82406fae4e5dSmrg_LT_TAGDECL([], [predeps], [1])
82416fae4e5dSmrg_LT_TAGDECL([], [postdeps], [1])
82426fae4e5dSmrg_LT_TAGDECL([], [compiler_lib_search_path], [1],
82436fae4e5dSmrg    [The library search path used internally by the compiler when linking
82446fae4e5dSmrg    a shared library])
82456fae4e5dSmrg])# _LT_SYS_HIDDEN_LIBDEPS
82461f0ac6a5Smrg
82471f0ac6a5Smrg
82486fae4e5dSmrg# _LT_LANG_F77_CONFIG([TAG])
82496fae4e5dSmrg# --------------------------
82506fae4e5dSmrg# Ensure that the configuration variables for a Fortran 77 compiler are
82516fae4e5dSmrg# suitably defined.  These variables are subsequently used by _LT_CONFIG
82526fae4e5dSmrg# to write the compiler configuration to `libtool'.
82536fae4e5dSmrgm4_defun([_LT_LANG_F77_CONFIG],
82546fae4e5dSmrg[AC_LANG_PUSH(Fortran 77)
82556fae4e5dSmrgif test -z "$F77" || test "X$F77" = "Xno"; then
82566fae4e5dSmrg  _lt_disable_F77=yes
82576fae4e5dSmrgfi
82586fae4e5dSmrg
82596fae4e5dSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
82606fae4e5dSmrg_LT_TAGVAR(allow_undefined_flag, $1)=
82616fae4e5dSmrg_LT_TAGVAR(always_export_symbols, $1)=no
82626fae4e5dSmrg_LT_TAGVAR(archive_expsym_cmds, $1)=
82636fae4e5dSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)=
82646fae4e5dSmrg_LT_TAGVAR(hardcode_direct, $1)=no
82656fae4e5dSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no
82666fae4e5dSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
82676fae4e5dSmrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
82686fae4e5dSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)=
82696fae4e5dSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no
82706fae4e5dSmrg_LT_TAGVAR(hardcode_automatic, $1)=no
82716fae4e5dSmrg_LT_TAGVAR(inherit_rpath, $1)=no
82726fae4e5dSmrg_LT_TAGVAR(module_cmds, $1)=
82736fae4e5dSmrg_LT_TAGVAR(module_expsym_cmds, $1)=
82746fae4e5dSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown
82756fae4e5dSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
82766fae4e5dSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag
82776fae4e5dSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
82786fae4e5dSmrg_LT_TAGVAR(no_undefined_flag, $1)=
82796fae4e5dSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)=
82806fae4e5dSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
82811f0ac6a5Smrg
82826fae4e5dSmrg# Source file extension for f77 test sources.
82836fae4e5dSmrgac_ext=f
82841f0ac6a5Smrg
82856fae4e5dSmrg# Object file extension for compiled f77 test sources.
82866fae4e5dSmrgobjext=o
82876fae4e5dSmrg_LT_TAGVAR(objext, $1)=$objext
82881f0ac6a5Smrg
82896fae4e5dSmrg# No sense in running all these tests if we already determined that
82906fae4e5dSmrg# the F77 compiler isn't working.  Some variables (like enable_shared)
82916fae4e5dSmrg# are currently assumed to apply to all compilers on this platform,
82926fae4e5dSmrg# and will be corrupted by setting them based on a non-working compiler.
82936fae4e5dSmrgif test "$_lt_disable_F77" != yes; then
82946fae4e5dSmrg  # Code to be used in simple compile tests
82956fae4e5dSmrg  lt_simple_compile_test_code="\
82966fae4e5dSmrg      subroutine t
82976fae4e5dSmrg      return
82986fae4e5dSmrg      end
82996fae4e5dSmrg"
83001f0ac6a5Smrg
83016fae4e5dSmrg  # Code to be used in simple link tests
83026fae4e5dSmrg  lt_simple_link_test_code="\
83036fae4e5dSmrg      program t
83046fae4e5dSmrg      end
83056fae4e5dSmrg"
83061f0ac6a5Smrg
83076fae4e5dSmrg  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
83086fae4e5dSmrg  _LT_TAG_COMPILER
83099c9ff80cSmrg
83106fae4e5dSmrg  # save warnings/boilerplate of simple test code
83116fae4e5dSmrg  _LT_COMPILER_BOILERPLATE
83126fae4e5dSmrg  _LT_LINKER_BOILERPLATE
83131f0ac6a5Smrg
83146fae4e5dSmrg  # Allow CC to be a program name with arguments.
83156fae4e5dSmrg  lt_save_CC="$CC"
83166fae4e5dSmrg  lt_save_GCC=$GCC
83176fae4e5dSmrg  lt_save_CFLAGS=$CFLAGS
83186fae4e5dSmrg  CC=${F77-"f77"}
83196fae4e5dSmrg  CFLAGS=$FFLAGS
83206fae4e5dSmrg  compiler=$CC
83216fae4e5dSmrg  _LT_TAGVAR(compiler, $1)=$CC
83226fae4e5dSmrg  _LT_CC_BASENAME([$compiler])
83236fae4e5dSmrg  GCC=$G77
83246fae4e5dSmrg  if test -n "$compiler"; then
83256fae4e5dSmrg    AC_MSG_CHECKING([if libtool supports shared libraries])
83266fae4e5dSmrg    AC_MSG_RESULT([$can_build_shared])
83279c9ff80cSmrg
83286fae4e5dSmrg    AC_MSG_CHECKING([whether to build shared libraries])
83296fae4e5dSmrg    test "$can_build_shared" = "no" && enable_shared=no
83309c9ff80cSmrg
83316fae4e5dSmrg    # On AIX, shared libraries and static libraries use the same namespace, and
83326fae4e5dSmrg    # are all built from PIC.
83336fae4e5dSmrg    case $host_os in
83346fae4e5dSmrg      aix3*)
83356fae4e5dSmrg        test "$enable_shared" = yes && enable_static=no
83366fae4e5dSmrg        if test -n "$RANLIB"; then
83376fae4e5dSmrg          archive_cmds="$archive_cmds~\$RANLIB \$lib"
83386fae4e5dSmrg          postinstall_cmds='$RANLIB $lib'
83396fae4e5dSmrg        fi
83406fae4e5dSmrg        ;;
83416fae4e5dSmrg      aix[[4-9]]*)
83426fae4e5dSmrg	if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
83436fae4e5dSmrg	  test "$enable_shared" = yes && enable_static=no
83446fae4e5dSmrg	fi
83459c9ff80cSmrg        ;;
83466fae4e5dSmrg    esac
83476fae4e5dSmrg    AC_MSG_RESULT([$enable_shared])
83481f0ac6a5Smrg
83496fae4e5dSmrg    AC_MSG_CHECKING([whether to build static libraries])
83506fae4e5dSmrg    # Make sure either enable_shared or enable_static is yes.
83516fae4e5dSmrg    test "$enable_shared" = yes || enable_static=yes
83526fae4e5dSmrg    AC_MSG_RESULT([$enable_static])
83539c9ff80cSmrg
83546fae4e5dSmrg    _LT_TAGVAR(GCC, $1)="$G77"
83556fae4e5dSmrg    _LT_TAGVAR(LD, $1)="$LD"
83566fae4e5dSmrg
83576fae4e5dSmrg    ## CAVEAT EMPTOR:
83586fae4e5dSmrg    ## There is no encapsulation within the following macros, do not change
83596fae4e5dSmrg    ## the running order or otherwise move them around unless you know exactly
83606fae4e5dSmrg    ## what you are doing...
83616fae4e5dSmrg    _LT_COMPILER_PIC($1)
83626fae4e5dSmrg    _LT_COMPILER_C_O($1)
83636fae4e5dSmrg    _LT_COMPILER_FILE_LOCKS($1)
83646fae4e5dSmrg    _LT_LINKER_SHLIBS($1)
83656fae4e5dSmrg    _LT_SYS_DYNAMIC_LINKER($1)
83666fae4e5dSmrg    _LT_LINKER_HARDCODE_LIBPATH($1)
83671f0ac6a5Smrg
83686fae4e5dSmrg    _LT_CONFIG($1)
83696fae4e5dSmrg  fi # test -n "$compiler"
83709c9ff80cSmrg
83716fae4e5dSmrg  GCC=$lt_save_GCC
83726fae4e5dSmrg  CC="$lt_save_CC"
83736fae4e5dSmrg  CFLAGS="$lt_save_CFLAGS"
83746fae4e5dSmrgfi # test "$_lt_disable_F77" != yes
83759c9ff80cSmrg
83766fae4e5dSmrgAC_LANG_POP
83776fae4e5dSmrg])# _LT_LANG_F77_CONFIG
83789c9ff80cSmrg
83791f0ac6a5Smrg
83806fae4e5dSmrg# _LT_LANG_FC_CONFIG([TAG])
83816fae4e5dSmrg# -------------------------
83826fae4e5dSmrg# Ensure that the configuration variables for a Fortran compiler are
83836fae4e5dSmrg# suitably defined.  These variables are subsequently used by _LT_CONFIG
83846fae4e5dSmrg# to write the compiler configuration to `libtool'.
83856fae4e5dSmrgm4_defun([_LT_LANG_FC_CONFIG],
83866fae4e5dSmrg[AC_LANG_PUSH(Fortran)
83871f0ac6a5Smrg
83886fae4e5dSmrgif test -z "$FC" || test "X$FC" = "Xno"; then
83896fae4e5dSmrg  _lt_disable_FC=yes
83906fae4e5dSmrgfi
83911f0ac6a5Smrg
83926fae4e5dSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
83936fae4e5dSmrg_LT_TAGVAR(allow_undefined_flag, $1)=
83946fae4e5dSmrg_LT_TAGVAR(always_export_symbols, $1)=no
83956fae4e5dSmrg_LT_TAGVAR(archive_expsym_cmds, $1)=
83966fae4e5dSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)=
83976fae4e5dSmrg_LT_TAGVAR(hardcode_direct, $1)=no
83986fae4e5dSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no
83996fae4e5dSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
84006fae4e5dSmrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
84016fae4e5dSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)=
84026fae4e5dSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no
84036fae4e5dSmrg_LT_TAGVAR(hardcode_automatic, $1)=no
84046fae4e5dSmrg_LT_TAGVAR(inherit_rpath, $1)=no
84056fae4e5dSmrg_LT_TAGVAR(module_cmds, $1)=
84066fae4e5dSmrg_LT_TAGVAR(module_expsym_cmds, $1)=
84076fae4e5dSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown
84086fae4e5dSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
84096fae4e5dSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag
84106fae4e5dSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
84116fae4e5dSmrg_LT_TAGVAR(no_undefined_flag, $1)=
84126fae4e5dSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)=
84136fae4e5dSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
84149c9ff80cSmrg
84156fae4e5dSmrg# Source file extension for fc test sources.
84166fae4e5dSmrgac_ext=${ac_fc_srcext-f}
84179c9ff80cSmrg
84186fae4e5dSmrg# Object file extension for compiled fc test sources.
84196fae4e5dSmrgobjext=o
84206fae4e5dSmrg_LT_TAGVAR(objext, $1)=$objext
84211f0ac6a5Smrg
84226fae4e5dSmrg# No sense in running all these tests if we already determined that
84236fae4e5dSmrg# the FC compiler isn't working.  Some variables (like enable_shared)
84246fae4e5dSmrg# are currently assumed to apply to all compilers on this platform,
84256fae4e5dSmrg# and will be corrupted by setting them based on a non-working compiler.
84266fae4e5dSmrgif test "$_lt_disable_FC" != yes; then
84276fae4e5dSmrg  # Code to be used in simple compile tests
84286fae4e5dSmrg  lt_simple_compile_test_code="\
84296fae4e5dSmrg      subroutine t
84306fae4e5dSmrg      return
84316fae4e5dSmrg      end
84326fae4e5dSmrg"
84331f0ac6a5Smrg
84346fae4e5dSmrg  # Code to be used in simple link tests
84356fae4e5dSmrg  lt_simple_link_test_code="\
84366fae4e5dSmrg      program t
84376fae4e5dSmrg      end
84386fae4e5dSmrg"
84391f0ac6a5Smrg
84406fae4e5dSmrg  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
84416fae4e5dSmrg  _LT_TAG_COMPILER
84421f0ac6a5Smrg
84436fae4e5dSmrg  # save warnings/boilerplate of simple test code
84446fae4e5dSmrg  _LT_COMPILER_BOILERPLATE
84456fae4e5dSmrg  _LT_LINKER_BOILERPLATE
84461f0ac6a5Smrg
84476fae4e5dSmrg  # Allow CC to be a program name with arguments.
84486fae4e5dSmrg  lt_save_CC="$CC"
84496fae4e5dSmrg  lt_save_GCC=$GCC
84506fae4e5dSmrg  lt_save_CFLAGS=$CFLAGS
84516fae4e5dSmrg  CC=${FC-"f95"}
84526fae4e5dSmrg  CFLAGS=$FCFLAGS
84536fae4e5dSmrg  compiler=$CC
84546fae4e5dSmrg  GCC=$ac_cv_fc_compiler_gnu
84551f0ac6a5Smrg
84566fae4e5dSmrg  _LT_TAGVAR(compiler, $1)=$CC
84576fae4e5dSmrg  _LT_CC_BASENAME([$compiler])
84581f0ac6a5Smrg
84596fae4e5dSmrg  if test -n "$compiler"; then
84606fae4e5dSmrg    AC_MSG_CHECKING([if libtool supports shared libraries])
84616fae4e5dSmrg    AC_MSG_RESULT([$can_build_shared])
84626fae4e5dSmrg
84636fae4e5dSmrg    AC_MSG_CHECKING([whether to build shared libraries])
84646fae4e5dSmrg    test "$can_build_shared" = "no" && enable_shared=no
84656fae4e5dSmrg
84666fae4e5dSmrg    # On AIX, shared libraries and static libraries use the same namespace, and
84676fae4e5dSmrg    # are all built from PIC.
84686fae4e5dSmrg    case $host_os in
84696fae4e5dSmrg      aix3*)
84706fae4e5dSmrg        test "$enable_shared" = yes && enable_static=no
84716fae4e5dSmrg        if test -n "$RANLIB"; then
84726fae4e5dSmrg          archive_cmds="$archive_cmds~\$RANLIB \$lib"
84736fae4e5dSmrg          postinstall_cmds='$RANLIB $lib'
84746fae4e5dSmrg        fi
84756fae4e5dSmrg        ;;
84766fae4e5dSmrg      aix[[4-9]]*)
84776fae4e5dSmrg	if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
84786fae4e5dSmrg	  test "$enable_shared" = yes && enable_static=no
84799c9ff80cSmrg	fi
84806fae4e5dSmrg        ;;
84816fae4e5dSmrg    esac
84826fae4e5dSmrg    AC_MSG_RESULT([$enable_shared])
84831f0ac6a5Smrg
84846fae4e5dSmrg    AC_MSG_CHECKING([whether to build static libraries])
84856fae4e5dSmrg    # Make sure either enable_shared or enable_static is yes.
84866fae4e5dSmrg    test "$enable_shared" = yes || enable_static=yes
84876fae4e5dSmrg    AC_MSG_RESULT([$enable_static])
84889c9ff80cSmrg
84896fae4e5dSmrg    _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
84906fae4e5dSmrg    _LT_TAGVAR(LD, $1)="$LD"
84919c9ff80cSmrg
84926fae4e5dSmrg    ## CAVEAT EMPTOR:
84936fae4e5dSmrg    ## There is no encapsulation within the following macros, do not change
84946fae4e5dSmrg    ## the running order or otherwise move them around unless you know exactly
84956fae4e5dSmrg    ## what you are doing...
84966fae4e5dSmrg    _LT_SYS_HIDDEN_LIBDEPS($1)
84976fae4e5dSmrg    _LT_COMPILER_PIC($1)
84986fae4e5dSmrg    _LT_COMPILER_C_O($1)
84996fae4e5dSmrg    _LT_COMPILER_FILE_LOCKS($1)
85006fae4e5dSmrg    _LT_LINKER_SHLIBS($1)
85016fae4e5dSmrg    _LT_SYS_DYNAMIC_LINKER($1)
85026fae4e5dSmrg    _LT_LINKER_HARDCODE_LIBPATH($1)
85039c9ff80cSmrg
85046fae4e5dSmrg    _LT_CONFIG($1)
85056fae4e5dSmrg  fi # test -n "$compiler"
85061f0ac6a5Smrg
85076fae4e5dSmrg  GCC=$lt_save_GCC
85086fae4e5dSmrg  CC=$lt_save_CC
85096fae4e5dSmrg  CFLAGS=$lt_save_CFLAGS
85106fae4e5dSmrgfi # test "$_lt_disable_FC" != yes
85111f0ac6a5Smrg
85126fae4e5dSmrgAC_LANG_POP
85136fae4e5dSmrg])# _LT_LANG_FC_CONFIG
85149c9ff80cSmrg
85159c9ff80cSmrg
85166fae4e5dSmrg# _LT_LANG_GCJ_CONFIG([TAG])
85176fae4e5dSmrg# --------------------------
85186fae4e5dSmrg# Ensure that the configuration variables for the GNU Java Compiler compiler
85196fae4e5dSmrg# are suitably defined.  These variables are subsequently used by _LT_CONFIG
85206fae4e5dSmrg# to write the compiler configuration to `libtool'.
85216fae4e5dSmrgm4_defun([_LT_LANG_GCJ_CONFIG],
85226fae4e5dSmrg[AC_REQUIRE([LT_PROG_GCJ])dnl
85236fae4e5dSmrgAC_LANG_SAVE
85249c9ff80cSmrg
85256fae4e5dSmrg# Source file extension for Java test sources.
85266fae4e5dSmrgac_ext=java
85271f0ac6a5Smrg
85286fae4e5dSmrg# Object file extension for compiled Java test sources.
85296fae4e5dSmrgobjext=o
85306fae4e5dSmrg_LT_TAGVAR(objext, $1)=$objext
85311f0ac6a5Smrg
85326fae4e5dSmrg# Code to be used in simple compile tests
85336fae4e5dSmrglt_simple_compile_test_code="class foo {}"
85341f0ac6a5Smrg
85356fae4e5dSmrg# Code to be used in simple link tests
85366fae4e5dSmrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
85379c9ff80cSmrg
85386fae4e5dSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
85396fae4e5dSmrg_LT_TAG_COMPILER
85401f0ac6a5Smrg
85416fae4e5dSmrg# save warnings/boilerplate of simple test code
85426fae4e5dSmrg_LT_COMPILER_BOILERPLATE
85436fae4e5dSmrg_LT_LINKER_BOILERPLATE
85441f0ac6a5Smrg
85456fae4e5dSmrg# Allow CC to be a program name with arguments.
85466fae4e5dSmrglt_save_CC=$CC
85476fae4e5dSmrglt_save_CFLAGS=$CFLAGS
85486fae4e5dSmrglt_save_GCC=$GCC
85496fae4e5dSmrgGCC=yes
85506fae4e5dSmrgCC=${GCJ-"gcj"}
85516fae4e5dSmrgCFLAGS=$GCJFLAGS
85526fae4e5dSmrgcompiler=$CC
85536fae4e5dSmrg_LT_TAGVAR(compiler, $1)=$CC
85546fae4e5dSmrg_LT_TAGVAR(LD, $1)="$LD"
85556fae4e5dSmrg_LT_CC_BASENAME([$compiler])
85561f0ac6a5Smrg
85576fae4e5dSmrg# GCJ did not exist at the time GCC didn't implicitly link libc in.
85586fae4e5dSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
85599c9ff80cSmrg
85606fae4e5dSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
85616fae4e5dSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag
85626fae4e5dSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
85639c9ff80cSmrg
85646fae4e5dSmrgif test -n "$compiler"; then
85656fae4e5dSmrg  _LT_COMPILER_NO_RTTI($1)
85666fae4e5dSmrg  _LT_COMPILER_PIC($1)
85676fae4e5dSmrg  _LT_COMPILER_C_O($1)
85686fae4e5dSmrg  _LT_COMPILER_FILE_LOCKS($1)
85696fae4e5dSmrg  _LT_LINKER_SHLIBS($1)
85706fae4e5dSmrg  _LT_LINKER_HARDCODE_LIBPATH($1)
85719c9ff80cSmrg
85726fae4e5dSmrg  _LT_CONFIG($1)
85736fae4e5dSmrgfi
85741f0ac6a5Smrg
85756fae4e5dSmrgAC_LANG_RESTORE
85761f0ac6a5Smrg
85776fae4e5dSmrgGCC=$lt_save_GCC
85786fae4e5dSmrgCC=$lt_save_CC
85796fae4e5dSmrgCFLAGS=$lt_save_CFLAGS
85806fae4e5dSmrg])# _LT_LANG_GCJ_CONFIG
85811f0ac6a5Smrg
85821f0ac6a5Smrg
85836fae4e5dSmrg# _LT_LANG_RC_CONFIG([TAG])
85846fae4e5dSmrg# -------------------------
85856fae4e5dSmrg# Ensure that the configuration variables for the Windows resource compiler
85866fae4e5dSmrg# are suitably defined.  These variables are subsequently used by _LT_CONFIG
85876fae4e5dSmrg# to write the compiler configuration to `libtool'.
85886fae4e5dSmrgm4_defun([_LT_LANG_RC_CONFIG],
85896fae4e5dSmrg[AC_REQUIRE([LT_PROG_RC])dnl
85906fae4e5dSmrgAC_LANG_SAVE
85911f0ac6a5Smrg
85926fae4e5dSmrg# Source file extension for RC test sources.
85936fae4e5dSmrgac_ext=rc
85941f0ac6a5Smrg
85956fae4e5dSmrg# Object file extension for compiled RC test sources.
85966fae4e5dSmrgobjext=o
85976fae4e5dSmrg_LT_TAGVAR(objext, $1)=$objext
85981f0ac6a5Smrg
85996fae4e5dSmrg# Code to be used in simple compile tests
86006fae4e5dSmrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
86011f0ac6a5Smrg
86026fae4e5dSmrg# Code to be used in simple link tests
86036fae4e5dSmrglt_simple_link_test_code="$lt_simple_compile_test_code"
86049c9ff80cSmrg
86056fae4e5dSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
86066fae4e5dSmrg_LT_TAG_COMPILER
86079c9ff80cSmrg
86086fae4e5dSmrg# save warnings/boilerplate of simple test code
86096fae4e5dSmrg_LT_COMPILER_BOILERPLATE
86106fae4e5dSmrg_LT_LINKER_BOILERPLATE
86119c9ff80cSmrg
86126fae4e5dSmrg# Allow CC to be a program name with arguments.
86136fae4e5dSmrglt_save_CC="$CC"
86146fae4e5dSmrglt_save_CFLAGS=$CFLAGS
86156fae4e5dSmrglt_save_GCC=$GCC
86166fae4e5dSmrgGCC=
86176fae4e5dSmrgCC=${RC-"windres"}
86186fae4e5dSmrgCFLAGS=
86196fae4e5dSmrgcompiler=$CC
86206fae4e5dSmrg_LT_TAGVAR(compiler, $1)=$CC
86216fae4e5dSmrg_LT_CC_BASENAME([$compiler])
86226fae4e5dSmrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
86239c9ff80cSmrg
86246fae4e5dSmrgif test -n "$compiler"; then
86256fae4e5dSmrg  :
86266fae4e5dSmrg  _LT_CONFIG($1)
86276fae4e5dSmrgfi
86281f0ac6a5Smrg
86296fae4e5dSmrgGCC=$lt_save_GCC
86306fae4e5dSmrgAC_LANG_RESTORE
86316fae4e5dSmrgCC=$lt_save_CC
86326fae4e5dSmrgCFLAGS=$lt_save_CFLAGS
86336fae4e5dSmrg])# _LT_LANG_RC_CONFIG
86341f0ac6a5Smrg
86351f0ac6a5Smrg
86366fae4e5dSmrg# LT_PROG_GCJ
86376fae4e5dSmrg# -----------
86386fae4e5dSmrgAC_DEFUN([LT_PROG_GCJ],
86396fae4e5dSmrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
86406fae4e5dSmrg  [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
86416fae4e5dSmrg    [AC_CHECK_TOOL(GCJ, gcj,)
86426fae4e5dSmrg      test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
86436fae4e5dSmrg      AC_SUBST(GCJFLAGS)])])[]dnl
86446fae4e5dSmrg])
86451f0ac6a5Smrg
86466fae4e5dSmrg# Old name:
86476fae4e5dSmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
86486fae4e5dSmrgdnl aclocal-1.4 backwards compatibility:
86496fae4e5dSmrgdnl AC_DEFUN([LT_AC_PROG_GCJ], [])
86506fae4e5dSmrg
86516fae4e5dSmrg
86526fae4e5dSmrg# LT_PROG_RC
86536fae4e5dSmrg# ----------
86546fae4e5dSmrgAC_DEFUN([LT_PROG_RC],
86556fae4e5dSmrg[AC_CHECK_TOOL(RC, windres,)
86561f0ac6a5Smrg])
86571f0ac6a5Smrg
86586fae4e5dSmrg# Old name:
86596fae4e5dSmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
86606fae4e5dSmrgdnl aclocal-1.4 backwards compatibility:
86616fae4e5dSmrgdnl AC_DEFUN([LT_AC_PROG_RC], [])
86621f0ac6a5Smrg
86631f0ac6a5Smrg
86646fae4e5dSmrg# _LT_DECL_EGREP
86656fae4e5dSmrg# --------------
86666fae4e5dSmrg# If we don't have a new enough Autoconf to choose the best grep
86676fae4e5dSmrg# available, choose the one first in the user's PATH.
86686fae4e5dSmrgm4_defun([_LT_DECL_EGREP],
86696fae4e5dSmrg[AC_REQUIRE([AC_PROG_EGREP])dnl
86706fae4e5dSmrgAC_REQUIRE([AC_PROG_FGREP])dnl
86716fae4e5dSmrgtest -z "$GREP" && GREP=grep
86726fae4e5dSmrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines])
86736fae4e5dSmrg_LT_DECL([], [EGREP], [1], [An ERE matcher])
86746fae4e5dSmrg_LT_DECL([], [FGREP], [1], [A literal string matcher])
86756fae4e5dSmrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
86766fae4e5dSmrgAC_SUBST([GREP])
86776fae4e5dSmrg])
86781f0ac6a5Smrg
86791f0ac6a5Smrg
86806fae4e5dSmrg# _LT_DECL_OBJDUMP
86816fae4e5dSmrg# --------------
86826fae4e5dSmrg# If we don't have a new enough Autoconf to choose the best objdump
86836fae4e5dSmrg# available, choose the one first in the user's PATH.
86846fae4e5dSmrgm4_defun([_LT_DECL_OBJDUMP],
86856fae4e5dSmrg[AC_CHECK_TOOL(OBJDUMP, objdump, false)
86866fae4e5dSmrgtest -z "$OBJDUMP" && OBJDUMP=objdump
86876fae4e5dSmrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
86886fae4e5dSmrgAC_SUBST([OBJDUMP])
86896fae4e5dSmrg])
86906fae4e5dSmrg
86916fae4e5dSmrg# _LT_DECL_DLLTOOL
86926fae4e5dSmrg# ----------------
86936fae4e5dSmrg# Ensure DLLTOOL variable is set.
86946fae4e5dSmrgm4_defun([_LT_DECL_DLLTOOL],
86956fae4e5dSmrg[AC_CHECK_TOOL(DLLTOOL, dlltool, false)
86966fae4e5dSmrgtest -z "$DLLTOOL" && DLLTOOL=dlltool
86976fae4e5dSmrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program])
86986fae4e5dSmrgAC_SUBST([DLLTOOL])
86996fae4e5dSmrg])
87009c9ff80cSmrg
87016fae4e5dSmrg# _LT_DECL_SED
87026fae4e5dSmrg# ------------
87036fae4e5dSmrg# Check for a fully-functional sed program, that truncates
87046fae4e5dSmrg# as few characters as possible.  Prefer GNU sed if found.
87056fae4e5dSmrgm4_defun([_LT_DECL_SED],
87066fae4e5dSmrg[AC_PROG_SED
87076fae4e5dSmrgtest -z "$SED" && SED=sed
87086fae4e5dSmrgXsed="$SED -e 1s/^X//"
87096fae4e5dSmrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output])
87106fae4e5dSmrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
87116fae4e5dSmrg    [Sed that helps us avoid accidentally triggering echo(1) options like -n])
87126fae4e5dSmrg])# _LT_DECL_SED
87131f0ac6a5Smrg
87146fae4e5dSmrgm4_ifndef([AC_PROG_SED], [
87156fae4e5dSmrg# NOTE: This macro has been submitted for inclusion into   #
87166fae4e5dSmrg#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
87176fae4e5dSmrg#  a released version of Autoconf we should remove this    #
87186fae4e5dSmrg#  macro and use it instead.                               #
87191f0ac6a5Smrg
87206fae4e5dSmrgm4_defun([AC_PROG_SED],
87216fae4e5dSmrg[AC_MSG_CHECKING([for a sed that does not truncate output])
87226fae4e5dSmrgAC_CACHE_VAL(lt_cv_path_SED,
87236fae4e5dSmrg[# Loop through the user's path and test for sed and gsed.
87246fae4e5dSmrg# Then use that list of sed's as ones to test for truncation.
87256fae4e5dSmrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
87266fae4e5dSmrgfor as_dir in $PATH
87276fae4e5dSmrgdo
87286fae4e5dSmrg  IFS=$as_save_IFS
87296fae4e5dSmrg  test -z "$as_dir" && as_dir=.
87306fae4e5dSmrg  for lt_ac_prog in sed gsed; do
87316fae4e5dSmrg    for ac_exec_ext in '' $ac_executable_extensions; do
87326fae4e5dSmrg      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
87336fae4e5dSmrg        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
87346fae4e5dSmrg      fi
87356fae4e5dSmrg    done
87366fae4e5dSmrg  done
87376fae4e5dSmrgdone
87386fae4e5dSmrgIFS=$as_save_IFS
87396fae4e5dSmrglt_ac_max=0
87406fae4e5dSmrglt_ac_count=0
87416fae4e5dSmrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris
87426fae4e5dSmrg# along with /bin/sed that truncates output.
87436fae4e5dSmrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
87446fae4e5dSmrg  test ! -f $lt_ac_sed && continue
87456fae4e5dSmrg  cat /dev/null > conftest.in
87466fae4e5dSmrg  lt_ac_count=0
87476fae4e5dSmrg  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
87486fae4e5dSmrg  # Check for GNU sed and select it if it is found.
87496fae4e5dSmrg  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
87506fae4e5dSmrg    lt_cv_path_SED=$lt_ac_sed
87516fae4e5dSmrg    break
87526fae4e5dSmrg  fi
87536fae4e5dSmrg  while true; do
87546fae4e5dSmrg    cat conftest.in conftest.in >conftest.tmp
87556fae4e5dSmrg    mv conftest.tmp conftest.in
87566fae4e5dSmrg    cp conftest.in conftest.nl
87576fae4e5dSmrg    echo >>conftest.nl
87586fae4e5dSmrg    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
87596fae4e5dSmrg    cmp -s conftest.out conftest.nl || break
87606fae4e5dSmrg    # 10000 chars as input seems more than enough
87616fae4e5dSmrg    test $lt_ac_count -gt 10 && break
87626fae4e5dSmrg    lt_ac_count=`expr $lt_ac_count + 1`
87636fae4e5dSmrg    if test $lt_ac_count -gt $lt_ac_max; then
87646fae4e5dSmrg      lt_ac_max=$lt_ac_count
87656fae4e5dSmrg      lt_cv_path_SED=$lt_ac_sed
87666fae4e5dSmrg    fi
87679c9ff80cSmrg  done
87686fae4e5dSmrgdone
87696fae4e5dSmrg])
87706fae4e5dSmrgSED=$lt_cv_path_SED
87716fae4e5dSmrgAC_SUBST([SED])
87726fae4e5dSmrgAC_MSG_RESULT([$SED])
87736fae4e5dSmrg])#AC_PROG_SED
87746fae4e5dSmrg])#m4_ifndef
87751f0ac6a5Smrg
87766fae4e5dSmrg# Old name:
87776fae4e5dSmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
87786fae4e5dSmrgdnl aclocal-1.4 backwards compatibility:
87796fae4e5dSmrgdnl AC_DEFUN([LT_AC_PROG_SED], [])
87801f0ac6a5Smrg
87811f0ac6a5Smrg
87826fae4e5dSmrg# _LT_CHECK_SHELL_FEATURES
87836fae4e5dSmrg# ------------------------
87846fae4e5dSmrg# Find out whether the shell is Bourne or XSI compatible,
87856fae4e5dSmrg# or has some other useful features.
87866fae4e5dSmrgm4_defun([_LT_CHECK_SHELL_FEATURES],
87876fae4e5dSmrg[AC_MSG_CHECKING([whether the shell understands some XSI constructs])
87886fae4e5dSmrg# Try some XSI features
87896fae4e5dSmrgxsi_shell=no
87906fae4e5dSmrg( _lt_dummy="a/b/c"
87916fae4e5dSmrg  test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
87926fae4e5dSmrg      = c,a/b,b/c, \
87936fae4e5dSmrg    && eval 'test $(( 1 + 1 )) -eq 2 \
87946fae4e5dSmrg    && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
87956fae4e5dSmrg  && xsi_shell=yes
87966fae4e5dSmrgAC_MSG_RESULT([$xsi_shell])
87976fae4e5dSmrg_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
87981f0ac6a5Smrg
87996fae4e5dSmrgAC_MSG_CHECKING([whether the shell understands "+="])
88006fae4e5dSmrglt_shell_append=no
88016fae4e5dSmrg( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
88026fae4e5dSmrg    >/dev/null 2>&1 \
88036fae4e5dSmrg  && lt_shell_append=yes
88046fae4e5dSmrgAC_MSG_RESULT([$lt_shell_append])
88056fae4e5dSmrg_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
88061f0ac6a5Smrg
88076fae4e5dSmrgif ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
88086fae4e5dSmrg  lt_unset=unset
88096fae4e5dSmrgelse
88106fae4e5dSmrg  lt_unset=false
88116fae4e5dSmrgfi
88126fae4e5dSmrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
88131f0ac6a5Smrg
88146fae4e5dSmrg# test EBCDIC or ASCII
88156fae4e5dSmrgcase `echo X|tr X '\101'` in
88166fae4e5dSmrg A) # ASCII based system
88176fae4e5dSmrg    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
88186fae4e5dSmrg  lt_SP2NL='tr \040 \012'
88196fae4e5dSmrg  lt_NL2SP='tr \015\012 \040\040'
88209c9ff80cSmrg  ;;
88216fae4e5dSmrg *) # EBCDIC based system
88226fae4e5dSmrg  lt_SP2NL='tr \100 \n'
88236fae4e5dSmrg  lt_NL2SP='tr \r\n \100\100'
88249c9ff80cSmrg  ;;
88259c9ff80cSmrgesac
88266fae4e5dSmrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
88276fae4e5dSmrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
88286fae4e5dSmrg])# _LT_CHECK_SHELL_FEATURES
88299c9ff80cSmrg
88309c9ff80cSmrg
88316fae4e5dSmrg# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY)
88326fae4e5dSmrg# ------------------------------------------------------
88336fae4e5dSmrg# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and
88346fae4e5dSmrg# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY.
88356fae4e5dSmrgm4_defun([_LT_PROG_FUNCTION_REPLACE],
88366fae4e5dSmrg[dnl {
88376fae4e5dSmrgsed -e '/^$1 ()$/,/^} # $1 /c\
88386fae4e5dSmrg$1 ()\
88396fae4e5dSmrg{\
88406fae4e5dSmrgm4_bpatsubsts([$2], [$], [\\], [^\([	 ]\)], [\\\1])
88416fae4e5dSmrg} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \
88426fae4e5dSmrg  && mv -f "$cfgfile.tmp" "$cfgfile" \
88436fae4e5dSmrg    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
88446fae4e5dSmrgtest 0 -eq $? || _lt_function_replace_fail=:
88456fae4e5dSmrg])
88461f0ac6a5Smrg
88471f0ac6a5Smrg
88486fae4e5dSmrg# _LT_PROG_REPLACE_SHELLFNS
88496fae4e5dSmrg# -------------------------
88506fae4e5dSmrg# Replace existing portable implementations of several shell functions with
88516fae4e5dSmrg# equivalent extended shell implementations where those features are available..
88526fae4e5dSmrgm4_defun([_LT_PROG_REPLACE_SHELLFNS],
88536fae4e5dSmrg[if test x"$xsi_shell" = xyes; then
88546fae4e5dSmrg  _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl
88556fae4e5dSmrg    case ${1} in
88566fae4e5dSmrg      */*) func_dirname_result="${1%/*}${2}" ;;
88576fae4e5dSmrg      *  ) func_dirname_result="${3}" ;;
88586fae4e5dSmrg    esac])
88596fae4e5dSmrg
88606fae4e5dSmrg  _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl
88616fae4e5dSmrg    func_basename_result="${1##*/}"])
88626fae4e5dSmrg
88636fae4e5dSmrg  _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl
88646fae4e5dSmrg    case ${1} in
88656fae4e5dSmrg      */*) func_dirname_result="${1%/*}${2}" ;;
88666fae4e5dSmrg      *  ) func_dirname_result="${3}" ;;
88676fae4e5dSmrg    esac
88686fae4e5dSmrg    func_basename_result="${1##*/}"])
88691f0ac6a5Smrg
88706fae4e5dSmrg  _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl
88716fae4e5dSmrg    # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
88726fae4e5dSmrg    # positional parameters, so assign one to ordinary parameter first.
88736fae4e5dSmrg    func_stripname_result=${3}
88746fae4e5dSmrg    func_stripname_result=${func_stripname_result#"${1}"}
88756fae4e5dSmrg    func_stripname_result=${func_stripname_result%"${2}"}])
88769c9ff80cSmrg
88776fae4e5dSmrg  _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl
88786fae4e5dSmrg    func_split_long_opt_name=${1%%=*}
88796fae4e5dSmrg    func_split_long_opt_arg=${1#*=}])
88809c9ff80cSmrg
88816fae4e5dSmrg  _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl
88826fae4e5dSmrg    func_split_short_opt_arg=${1#??}
88836fae4e5dSmrg    func_split_short_opt_name=${1%"$func_split_short_opt_arg"}])
88849c9ff80cSmrg
88856fae4e5dSmrg  _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl
88866fae4e5dSmrg    case ${1} in
88876fae4e5dSmrg      *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
88886fae4e5dSmrg      *)    func_lo2o_result=${1} ;;
88896fae4e5dSmrg    esac])
88909c9ff80cSmrg
88916fae4e5dSmrg  _LT_PROG_FUNCTION_REPLACE([func_xform], [    func_xform_result=${1%.*}.lo])
88929c9ff80cSmrg
88936fae4e5dSmrg  _LT_PROG_FUNCTION_REPLACE([func_arith], [    func_arith_result=$(( $[*] ))])
88949c9ff80cSmrg
88956fae4e5dSmrg  _LT_PROG_FUNCTION_REPLACE([func_len], [    func_len_result=${#1}])
88966fae4e5dSmrgfi
88979c9ff80cSmrg
88986fae4e5dSmrgif test x"$lt_shell_append" = xyes; then
88996fae4e5dSmrg  _LT_PROG_FUNCTION_REPLACE([func_append], [    eval "${1}+=\\${2}"])
89009c9ff80cSmrg
89016fae4e5dSmrg  _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl
89026fae4e5dSmrg    func_quote_for_eval "${2}"
89036fae4e5dSmrgdnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \
89046fae4e5dSmrg    eval "${1}+=\\\\ \\$func_quote_for_eval_result"])
89059c9ff80cSmrg
89066fae4e5dSmrg  # Save a `func_append' function call where possible by direct use of '+='
89076fae4e5dSmrg  sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
89086fae4e5dSmrg    && mv -f "$cfgfile.tmp" "$cfgfile" \
89096fae4e5dSmrg      || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
89106fae4e5dSmrg  test 0 -eq $? || _lt_function_replace_fail=:
89116fae4e5dSmrgelse
89126fae4e5dSmrg  # Save a `func_append' function call even when '+=' is not available
89136fae4e5dSmrg  sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
89146fae4e5dSmrg    && mv -f "$cfgfile.tmp" "$cfgfile" \
89156fae4e5dSmrg      || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
89166fae4e5dSmrg  test 0 -eq $? || _lt_function_replace_fail=:
89176fae4e5dSmrgfi
89189c9ff80cSmrg
89196fae4e5dSmrgif test x"$_lt_function_replace_fail" = x":"; then
89206fae4e5dSmrg  AC_MSG_WARN([Unable to substitute extended shell functions in $ofile])
89216fae4e5dSmrgfi
89226fae4e5dSmrg])
89236fae4e5dSmrg
89246fae4e5dSmrg# _LT_PATH_CONVERSION_FUNCTIONS
89256fae4e5dSmrg# -----------------------------
89266fae4e5dSmrg# Determine which file name conversion functions should be used by
89276fae4e5dSmrg# func_to_host_file (and, implicitly, by func_to_host_path).  These are needed
89286fae4e5dSmrg# for certain cross-compile configurations and native mingw.
89296fae4e5dSmrgm4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
89306fae4e5dSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
89316fae4e5dSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl
89326fae4e5dSmrgAC_MSG_CHECKING([how to convert $build file names to $host format])
89336fae4e5dSmrgAC_CACHE_VAL(lt_cv_to_host_file_cmd,
89346fae4e5dSmrg[case $host in
89356fae4e5dSmrg  *-*-mingw* )
89366fae4e5dSmrg    case $build in
89376fae4e5dSmrg      *-*-mingw* ) # actually msys
89386fae4e5dSmrg        lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
89391f0ac6a5Smrg        ;;
89406fae4e5dSmrg      *-*-cygwin* )
89416fae4e5dSmrg        lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
89426fae4e5dSmrg        ;;
89436fae4e5dSmrg      * ) # otherwise, assume *nix
89446fae4e5dSmrg        lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
89451f0ac6a5Smrg        ;;
89469c9ff80cSmrg    esac
89476fae4e5dSmrg    ;;
89486fae4e5dSmrg  *-*-cygwin* )
89496fae4e5dSmrg    case $build in
89506fae4e5dSmrg      *-*-mingw* ) # actually msys
89516fae4e5dSmrg        lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
89526fae4e5dSmrg        ;;
89536fae4e5dSmrg      *-*-cygwin* )
89546fae4e5dSmrg        lt_cv_to_host_file_cmd=func_convert_file_noop
89556fae4e5dSmrg        ;;
89566fae4e5dSmrg      * ) # otherwise, assume *nix
89576fae4e5dSmrg        lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
89586fae4e5dSmrg        ;;
89596fae4e5dSmrg    esac
89606fae4e5dSmrg    ;;
89616fae4e5dSmrg  * ) # unhandled hosts (and "normal" native builds)
89626fae4e5dSmrg    lt_cv_to_host_file_cmd=func_convert_file_noop
89636fae4e5dSmrg    ;;
89646fae4e5dSmrgesac
89656fae4e5dSmrg])
89666fae4e5dSmrgto_host_file_cmd=$lt_cv_to_host_file_cmd
89676fae4e5dSmrgAC_MSG_RESULT([$lt_cv_to_host_file_cmd])
89686fae4e5dSmrg_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
89696fae4e5dSmrg         [0], [convert $build file names to $host format])dnl
89706fae4e5dSmrg
89716fae4e5dSmrgAC_MSG_CHECKING([how to convert $build file names to toolchain format])
89726fae4e5dSmrgAC_CACHE_VAL(lt_cv_to_tool_file_cmd,
89736fae4e5dSmrg[#assume ordinary cross tools, or native build.
89746fae4e5dSmrglt_cv_to_tool_file_cmd=func_convert_file_noop
89756fae4e5dSmrgcase $host in
89766fae4e5dSmrg  *-*-mingw* )
89776fae4e5dSmrg    case $build in
89786fae4e5dSmrg      *-*-mingw* ) # actually msys
89796fae4e5dSmrg        lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
89806fae4e5dSmrg        ;;
89816fae4e5dSmrg    esac
89826fae4e5dSmrg    ;;
89836fae4e5dSmrgesac
89846fae4e5dSmrg])
89856fae4e5dSmrgto_tool_file_cmd=$lt_cv_to_tool_file_cmd
89866fae4e5dSmrgAC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
89876fae4e5dSmrg_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
89886fae4e5dSmrg         [0], [convert $build files to toolchain format])dnl
89896fae4e5dSmrg])# _LT_PATH_CONVERSION_FUNCTIONS
89909c9ff80cSmrg
89916fae4e5dSmrg# Helper functions for option handling.                    -*- Autoconf -*-
89926fae4e5dSmrg#
89936fae4e5dSmrg#   Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation,
89946fae4e5dSmrg#   Inc.
89956fae4e5dSmrg#   Written by Gary V. Vaughan, 2004
89966fae4e5dSmrg#
89976fae4e5dSmrg# This file is free software; the Free Software Foundation gives
89986fae4e5dSmrg# unlimited permission to copy and/or distribute it, with or without
89996fae4e5dSmrg# modifications, as long as this notice is preserved.
90009c9ff80cSmrg
90016fae4e5dSmrg# serial 7 ltoptions.m4
90029c9ff80cSmrg
90036fae4e5dSmrg# This is to help aclocal find these macros, as it can't see m4_define.
90046fae4e5dSmrgAC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
90059c9ff80cSmrg
90069c9ff80cSmrg
90076fae4e5dSmrg# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
90086fae4e5dSmrg# ------------------------------------------
90096fae4e5dSmrgm4_define([_LT_MANGLE_OPTION],
90106fae4e5dSmrg[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
90119c9ff80cSmrg
90129c9ff80cSmrg
90136fae4e5dSmrg# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
90146fae4e5dSmrg# ---------------------------------------
90156fae4e5dSmrg# Set option OPTION-NAME for macro MACRO-NAME, and if there is a
90166fae4e5dSmrg# matching handler defined, dispatch to it.  Other OPTION-NAMEs are
90176fae4e5dSmrg# saved as a flag.
90186fae4e5dSmrgm4_define([_LT_SET_OPTION],
90196fae4e5dSmrg[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
90206fae4e5dSmrgm4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
90216fae4e5dSmrg        _LT_MANGLE_DEFUN([$1], [$2]),
90226fae4e5dSmrg    [m4_warning([Unknown $1 option `$2'])])[]dnl
90236fae4e5dSmrg])
90249c9ff80cSmrg
90259c9ff80cSmrg
90266fae4e5dSmrg# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
90276fae4e5dSmrg# ------------------------------------------------------------
90286fae4e5dSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
90296fae4e5dSmrgm4_define([_LT_IF_OPTION],
90306fae4e5dSmrg[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
90319c9ff80cSmrg
90329c9ff80cSmrg
90336fae4e5dSmrg# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
90346fae4e5dSmrg# -------------------------------------------------------
90356fae4e5dSmrg# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
90366fae4e5dSmrg# are set.
90376fae4e5dSmrgm4_define([_LT_UNLESS_OPTIONS],
90386fae4e5dSmrg[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
90396fae4e5dSmrg	    [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
90406fae4e5dSmrg		      [m4_define([$0_found])])])[]dnl
90416fae4e5dSmrgm4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
90426fae4e5dSmrg])[]dnl
90436fae4e5dSmrg])
90449c9ff80cSmrg
90459c9ff80cSmrg
90466fae4e5dSmrg# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
90476fae4e5dSmrg# ----------------------------------------
90486fae4e5dSmrg# OPTION-LIST is a space-separated list of Libtool options associated
90496fae4e5dSmrg# with MACRO-NAME.  If any OPTION has a matching handler declared with
90506fae4e5dSmrg# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
90516fae4e5dSmrg# the unknown option and exit.
90526fae4e5dSmrgm4_defun([_LT_SET_OPTIONS],
90536fae4e5dSmrg[# Set options
90546fae4e5dSmrgm4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
90556fae4e5dSmrg    [_LT_SET_OPTION([$1], _LT_Option)])
90569c9ff80cSmrg
90576fae4e5dSmrgm4_if([$1],[LT_INIT],[
90586fae4e5dSmrg  dnl
90596fae4e5dSmrg  dnl Simply set some default values (i.e off) if boolean options were not
90606fae4e5dSmrg  dnl specified:
90616fae4e5dSmrg  _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
90626fae4e5dSmrg  ])
90636fae4e5dSmrg  _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
90646fae4e5dSmrg  ])
90656fae4e5dSmrg  dnl
90666fae4e5dSmrg  dnl If no reference was made to various pairs of opposing options, then
90676fae4e5dSmrg  dnl we run the default mode handler for the pair.  For example, if neither
90686fae4e5dSmrg  dnl `shared' nor `disable-shared' was passed, we enable building of shared
90696fae4e5dSmrg  dnl archives by default:
90706fae4e5dSmrg  _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
90716fae4e5dSmrg  _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
90726fae4e5dSmrg  _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
90736fae4e5dSmrg  _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
90746fae4e5dSmrg  		   [_LT_ENABLE_FAST_INSTALL])
90756fae4e5dSmrg  ])
90766fae4e5dSmrg])# _LT_SET_OPTIONS
90779c9ff80cSmrg
90789c9ff80cSmrg
90799c9ff80cSmrg
90806fae4e5dSmrg# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
90816fae4e5dSmrg# -----------------------------------------
90826fae4e5dSmrgm4_define([_LT_MANGLE_DEFUN],
90836fae4e5dSmrg[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
90849c9ff80cSmrg
90859c9ff80cSmrg
90866fae4e5dSmrg# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
90876fae4e5dSmrg# -----------------------------------------------
90886fae4e5dSmrgm4_define([LT_OPTION_DEFINE],
90896fae4e5dSmrg[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
90906fae4e5dSmrg])# LT_OPTION_DEFINE
90919c9ff80cSmrg
90929c9ff80cSmrg
90936fae4e5dSmrg# dlopen
90946fae4e5dSmrg# ------
90956fae4e5dSmrgLT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
90966fae4e5dSmrg])
90976fae4e5dSmrg
90986fae4e5dSmrgAU_DEFUN([AC_LIBTOOL_DLOPEN],
90996fae4e5dSmrg[_LT_SET_OPTION([LT_INIT], [dlopen])
91006fae4e5dSmrgAC_DIAGNOSE([obsolete],
91016fae4e5dSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you
91026fae4e5dSmrgput the `dlopen' option into LT_INIT's first parameter.])
91036fae4e5dSmrg])
91046fae4e5dSmrg
91056fae4e5dSmrgdnl aclocal-1.4 backwards compatibility:
91066fae4e5dSmrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
91079c9ff80cSmrg
91089c9ff80cSmrg
91096fae4e5dSmrg# win32-dll
91106fae4e5dSmrg# ---------
91116fae4e5dSmrg# Declare package support for building win32 dll's.
91126fae4e5dSmrgLT_OPTION_DEFINE([LT_INIT], [win32-dll],
91136fae4e5dSmrg[enable_win32_dll=yes
91149c9ff80cSmrg
91156fae4e5dSmrgcase $host in
91166fae4e5dSmrg*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
91176fae4e5dSmrg  AC_CHECK_TOOL(AS, as, false)
91186fae4e5dSmrg  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
91196fae4e5dSmrg  AC_CHECK_TOOL(OBJDUMP, objdump, false)
91206fae4e5dSmrg  ;;
91216fae4e5dSmrgesac
91229c9ff80cSmrg
91236fae4e5dSmrgtest -z "$AS" && AS=as
91246fae4e5dSmrg_LT_DECL([], [AS],      [1], [Assembler program])dnl
91259c9ff80cSmrg
91266fae4e5dSmrgtest -z "$DLLTOOL" && DLLTOOL=dlltool
91276fae4e5dSmrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl
91289c9ff80cSmrg
91296fae4e5dSmrgtest -z "$OBJDUMP" && OBJDUMP=objdump
91306fae4e5dSmrg_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl
91316fae4e5dSmrg])# win32-dll
91329c9ff80cSmrg
91336fae4e5dSmrgAU_DEFUN([AC_LIBTOOL_WIN32_DLL],
91346fae4e5dSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
91356fae4e5dSmrg_LT_SET_OPTION([LT_INIT], [win32-dll])
91366fae4e5dSmrgAC_DIAGNOSE([obsolete],
91376fae4e5dSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you
91386fae4e5dSmrgput the `win32-dll' option into LT_INIT's first parameter.])
91396fae4e5dSmrg])
91409c9ff80cSmrg
91416fae4e5dSmrgdnl aclocal-1.4 backwards compatibility:
91426fae4e5dSmrgdnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
91439c9ff80cSmrg
91449c9ff80cSmrg
91456fae4e5dSmrg# _LT_ENABLE_SHARED([DEFAULT])
91466fae4e5dSmrg# ----------------------------
91476fae4e5dSmrg# implement the --enable-shared flag, and supports the `shared' and
91486fae4e5dSmrg# `disable-shared' LT_INIT options.
91496fae4e5dSmrg# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
91506fae4e5dSmrgm4_define([_LT_ENABLE_SHARED],
91516fae4e5dSmrg[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
91526fae4e5dSmrgAC_ARG_ENABLE([shared],
91536fae4e5dSmrg    [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
91546fae4e5dSmrg	[build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
91556fae4e5dSmrg    [p=${PACKAGE-default}
91566fae4e5dSmrg    case $enableval in
91576fae4e5dSmrg    yes) enable_shared=yes ;;
91586fae4e5dSmrg    no) enable_shared=no ;;
91596fae4e5dSmrg    *)
91606fae4e5dSmrg      enable_shared=no
91616fae4e5dSmrg      # Look at the argument we got.  We use all the common list separators.
91626fae4e5dSmrg      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
91636fae4e5dSmrg      for pkg in $enableval; do
91646fae4e5dSmrg	IFS="$lt_save_ifs"
91656fae4e5dSmrg	if test "X$pkg" = "X$p"; then
91666fae4e5dSmrg	  enable_shared=yes
91676fae4e5dSmrg	fi
91686fae4e5dSmrg      done
91696fae4e5dSmrg      IFS="$lt_save_ifs"
91706fae4e5dSmrg      ;;
91716fae4e5dSmrg    esac],
91726fae4e5dSmrg    [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
91739c9ff80cSmrg
91746fae4e5dSmrg    _LT_DECL([build_libtool_libs], [enable_shared], [0],
91756fae4e5dSmrg	[Whether or not to build shared libraries])
91766fae4e5dSmrg])# _LT_ENABLE_SHARED
91779c9ff80cSmrg
91786fae4e5dSmrgLT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
91796fae4e5dSmrgLT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
91809c9ff80cSmrg
91816fae4e5dSmrg# Old names:
91826fae4e5dSmrgAC_DEFUN([AC_ENABLE_SHARED],
91836fae4e5dSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
91846fae4e5dSmrg])
91859c9ff80cSmrg
91866fae4e5dSmrgAC_DEFUN([AC_DISABLE_SHARED],
91876fae4e5dSmrg[_LT_SET_OPTION([LT_INIT], [disable-shared])
91886fae4e5dSmrg])
91899c9ff80cSmrg
91906fae4e5dSmrgAU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
91916fae4e5dSmrgAU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
91929c9ff80cSmrg
91936fae4e5dSmrgdnl aclocal-1.4 backwards compatibility:
91946fae4e5dSmrgdnl AC_DEFUN([AM_ENABLE_SHARED], [])
91956fae4e5dSmrgdnl AC_DEFUN([AM_DISABLE_SHARED], [])
91969c9ff80cSmrg
91971f0ac6a5Smrg
91981f0ac6a5Smrg
91996fae4e5dSmrg# _LT_ENABLE_STATIC([DEFAULT])
92006fae4e5dSmrg# ----------------------------
92016fae4e5dSmrg# implement the --enable-static flag, and support the `static' and
92026fae4e5dSmrg# `disable-static' LT_INIT options.
92036fae4e5dSmrg# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
92046fae4e5dSmrgm4_define([_LT_ENABLE_STATIC],
92056fae4e5dSmrg[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
92066fae4e5dSmrgAC_ARG_ENABLE([static],
92076fae4e5dSmrg    [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
92086fae4e5dSmrg	[build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
92096fae4e5dSmrg    [p=${PACKAGE-default}
92106fae4e5dSmrg    case $enableval in
92116fae4e5dSmrg    yes) enable_static=yes ;;
92126fae4e5dSmrg    no) enable_static=no ;;
92136fae4e5dSmrg    *)
92146fae4e5dSmrg     enable_static=no
92156fae4e5dSmrg      # Look at the argument we got.  We use all the common list separators.
92166fae4e5dSmrg      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
92176fae4e5dSmrg      for pkg in $enableval; do
92186fae4e5dSmrg	IFS="$lt_save_ifs"
92196fae4e5dSmrg	if test "X$pkg" = "X$p"; then
92206fae4e5dSmrg	  enable_static=yes
92216fae4e5dSmrg	fi
92226fae4e5dSmrg      done
92236fae4e5dSmrg      IFS="$lt_save_ifs"
92246fae4e5dSmrg      ;;
92256fae4e5dSmrg    esac],
92266fae4e5dSmrg    [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
9227e5410a46Smrg
92286fae4e5dSmrg    _LT_DECL([build_old_libs], [enable_static], [0],
92296fae4e5dSmrg	[Whether or not to build static libraries])
92306fae4e5dSmrg])# _LT_ENABLE_STATIC
92311f0ac6a5Smrg
92326fae4e5dSmrgLT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
92336fae4e5dSmrgLT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
92341f0ac6a5Smrg
92356fae4e5dSmrg# Old names:
92366fae4e5dSmrgAC_DEFUN([AC_ENABLE_STATIC],
92376fae4e5dSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
92386fae4e5dSmrg])
92391f0ac6a5Smrg
92406fae4e5dSmrgAC_DEFUN([AC_DISABLE_STATIC],
92416fae4e5dSmrg[_LT_SET_OPTION([LT_INIT], [disable-static])
92426fae4e5dSmrg])
92431f0ac6a5Smrg
92446fae4e5dSmrgAU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
92456fae4e5dSmrgAU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
92461f0ac6a5Smrg
92476fae4e5dSmrgdnl aclocal-1.4 backwards compatibility:
92486fae4e5dSmrgdnl AC_DEFUN([AM_ENABLE_STATIC], [])
92496fae4e5dSmrgdnl AC_DEFUN([AM_DISABLE_STATIC], [])
92501f0ac6a5Smrg
92511f0ac6a5Smrg
92521f0ac6a5Smrg
92536fae4e5dSmrg# _LT_ENABLE_FAST_INSTALL([DEFAULT])
92546fae4e5dSmrg# ----------------------------------
92556fae4e5dSmrg# implement the --enable-fast-install flag, and support the `fast-install'
92566fae4e5dSmrg# and `disable-fast-install' LT_INIT options.
92576fae4e5dSmrg# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
92586fae4e5dSmrgm4_define([_LT_ENABLE_FAST_INSTALL],
92596fae4e5dSmrg[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
92606fae4e5dSmrgAC_ARG_ENABLE([fast-install],
92616fae4e5dSmrg    [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
92626fae4e5dSmrg    [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
92636fae4e5dSmrg    [p=${PACKAGE-default}
92646fae4e5dSmrg    case $enableval in
92656fae4e5dSmrg    yes) enable_fast_install=yes ;;
92666fae4e5dSmrg    no) enable_fast_install=no ;;
92676fae4e5dSmrg    *)
92686fae4e5dSmrg      enable_fast_install=no
92696fae4e5dSmrg      # Look at the argument we got.  We use all the common list separators.
92706fae4e5dSmrg      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
92716fae4e5dSmrg      for pkg in $enableval; do
92726fae4e5dSmrg	IFS="$lt_save_ifs"
92736fae4e5dSmrg	if test "X$pkg" = "X$p"; then
92746fae4e5dSmrg	  enable_fast_install=yes
92756fae4e5dSmrg	fi
92766fae4e5dSmrg      done
92776fae4e5dSmrg      IFS="$lt_save_ifs"
92786fae4e5dSmrg      ;;
92796fae4e5dSmrg    esac],
92806fae4e5dSmrg    [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
92819c9ff80cSmrg
92826fae4e5dSmrg_LT_DECL([fast_install], [enable_fast_install], [0],
92836fae4e5dSmrg	 [Whether or not to optimize for fast installation])dnl
92846fae4e5dSmrg])# _LT_ENABLE_FAST_INSTALL
92859c9ff80cSmrg
92866fae4e5dSmrgLT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
92876fae4e5dSmrgLT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
92889c9ff80cSmrg
92896fae4e5dSmrg# Old names:
92906fae4e5dSmrgAU_DEFUN([AC_ENABLE_FAST_INSTALL],
92916fae4e5dSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
92926fae4e5dSmrgAC_DIAGNOSE([obsolete],
92936fae4e5dSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put
92946fae4e5dSmrgthe `fast-install' option into LT_INIT's first parameter.])
92956fae4e5dSmrg])
92969c9ff80cSmrg
92976fae4e5dSmrgAU_DEFUN([AC_DISABLE_FAST_INSTALL],
92986fae4e5dSmrg[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
92996fae4e5dSmrgAC_DIAGNOSE([obsolete],
93006fae4e5dSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put
93016fae4e5dSmrgthe `disable-fast-install' option into LT_INIT's first parameter.])
93026fae4e5dSmrg])
93039c9ff80cSmrg
93046fae4e5dSmrgdnl aclocal-1.4 backwards compatibility:
93056fae4e5dSmrgdnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
93066fae4e5dSmrgdnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
93071f0ac6a5Smrg
93089c9ff80cSmrg
93096fae4e5dSmrg# _LT_WITH_PIC([MODE])
93106fae4e5dSmrg# --------------------
93116fae4e5dSmrg# implement the --with-pic flag, and support the `pic-only' and `no-pic'
93126fae4e5dSmrg# LT_INIT options.
93136fae4e5dSmrg# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
93146fae4e5dSmrgm4_define([_LT_WITH_PIC],
93156fae4e5dSmrg[AC_ARG_WITH([pic],
93166fae4e5dSmrg    [AS_HELP_STRING([--with-pic],
93176fae4e5dSmrg	[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
93186fae4e5dSmrg    [pic_mode="$withval"],
93196fae4e5dSmrg    [pic_mode=default])
93209c9ff80cSmrg
93216fae4e5dSmrgtest -z "$pic_mode" && pic_mode=m4_default([$1], [default])
93221f0ac6a5Smrg
93236fae4e5dSmrg_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
93246fae4e5dSmrg])# _LT_WITH_PIC
93251f0ac6a5Smrg
93266fae4e5dSmrgLT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
93276fae4e5dSmrgLT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
93281f0ac6a5Smrg
93296fae4e5dSmrg# Old name:
93306fae4e5dSmrgAU_DEFUN([AC_LIBTOOL_PICMODE],
93316fae4e5dSmrg[_LT_SET_OPTION([LT_INIT], [pic-only])
93326fae4e5dSmrgAC_DIAGNOSE([obsolete],
93336fae4e5dSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you
93346fae4e5dSmrgput the `pic-only' option into LT_INIT's first parameter.])
93359c9ff80cSmrg])
93361f0ac6a5Smrg
93379c9ff80cSmrgdnl aclocal-1.4 backwards compatibility:
93386fae4e5dSmrgdnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
93391f0ac6a5Smrg
93401f0ac6a5Smrg
93416fae4e5dSmrgm4_define([_LTDL_MODE], [])
93426fae4e5dSmrgLT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
93436fae4e5dSmrg		 [m4_define([_LTDL_MODE], [nonrecursive])])
93446fae4e5dSmrgLT_OPTION_DEFINE([LTDL_INIT], [recursive],
93456fae4e5dSmrg		 [m4_define([_LTDL_MODE], [recursive])])
93466fae4e5dSmrgLT_OPTION_DEFINE([LTDL_INIT], [subproject],
93476fae4e5dSmrg		 [m4_define([_LTDL_MODE], [subproject])])
93481f0ac6a5Smrg
93496fae4e5dSmrgm4_define([_LTDL_TYPE], [])
93506fae4e5dSmrgLT_OPTION_DEFINE([LTDL_INIT], [installable],
93516fae4e5dSmrg		 [m4_define([_LTDL_TYPE], [installable])])
93526fae4e5dSmrgLT_OPTION_DEFINE([LTDL_INIT], [convenience],
93536fae4e5dSmrg		 [m4_define([_LTDL_TYPE], [convenience])])
93541f0ac6a5Smrg
93556fae4e5dSmrg# ltsugar.m4 -- libtool m4 base layer.                         -*-Autoconf-*-
93566fae4e5dSmrg#
93576fae4e5dSmrg# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
93586fae4e5dSmrg# Written by Gary V. Vaughan, 2004
93596fae4e5dSmrg#
93606fae4e5dSmrg# This file is free software; the Free Software Foundation gives
93616fae4e5dSmrg# unlimited permission to copy and/or distribute it, with or without
93626fae4e5dSmrg# modifications, as long as this notice is preserved.
93631f0ac6a5Smrg
93646fae4e5dSmrg# serial 6 ltsugar.m4
93651f0ac6a5Smrg
93666fae4e5dSmrg# This is to help aclocal find these macros, as it can't see m4_define.
93676fae4e5dSmrgAC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
93689c9ff80cSmrg
93699c9ff80cSmrg
93706fae4e5dSmrg# lt_join(SEP, ARG1, [ARG2...])
93716fae4e5dSmrg# -----------------------------
93726fae4e5dSmrg# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
93736fae4e5dSmrg# associated separator.
93746fae4e5dSmrg# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
93756fae4e5dSmrg# versions in m4sugar had bugs.
93766fae4e5dSmrgm4_define([lt_join],
93776fae4e5dSmrg[m4_if([$#], [1], [],
93786fae4e5dSmrg       [$#], [2], [[$2]],
93796fae4e5dSmrg       [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
93806fae4e5dSmrgm4_define([_lt_join],
93816fae4e5dSmrg[m4_if([$#$2], [2], [],
93826fae4e5dSmrg       [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
93839c9ff80cSmrg
93846fae4e5dSmrg
93856fae4e5dSmrg# lt_car(LIST)
93866fae4e5dSmrg# lt_cdr(LIST)
93876fae4e5dSmrg# ------------
93886fae4e5dSmrg# Manipulate m4 lists.
93896fae4e5dSmrg# These macros are necessary as long as will still need to support
93906fae4e5dSmrg# Autoconf-2.59 which quotes differently.
93916fae4e5dSmrgm4_define([lt_car], [[$1]])
93926fae4e5dSmrgm4_define([lt_cdr],
93936fae4e5dSmrg[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
93946fae4e5dSmrg       [$#], 1, [],
93956fae4e5dSmrg       [m4_dquote(m4_shift($@))])])
93966fae4e5dSmrgm4_define([lt_unquote], $1)
93979c9ff80cSmrg
93989c9ff80cSmrg
93996fae4e5dSmrg# lt_append(MACRO-NAME, STRING, [SEPARATOR])
94006fae4e5dSmrg# ------------------------------------------
94016fae4e5dSmrg# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
94026fae4e5dSmrg# Note that neither SEPARATOR nor STRING are expanded; they are appended
94036fae4e5dSmrg# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
94046fae4e5dSmrg# No SEPARATOR is output if MACRO-NAME was previously undefined (different
94056fae4e5dSmrg# than defined and empty).
94066fae4e5dSmrg#
94076fae4e5dSmrg# This macro is needed until we can rely on Autoconf 2.62, since earlier
94086fae4e5dSmrg# versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
94096fae4e5dSmrgm4_define([lt_append],
94106fae4e5dSmrg[m4_define([$1],
94116fae4e5dSmrg	   m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
94129c9ff80cSmrg
94139c9ff80cSmrg
94149c9ff80cSmrg
94156fae4e5dSmrg# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
94166fae4e5dSmrg# ----------------------------------------------------------
94176fae4e5dSmrg# Produce a SEP delimited list of all paired combinations of elements of
94186fae4e5dSmrg# PREFIX-LIST with SUFFIX1 through SUFFIXn.  Each element of the list
94196fae4e5dSmrg# has the form PREFIXmINFIXSUFFIXn.
94206fae4e5dSmrg# Needed until we can rely on m4_combine added in Autoconf 2.62.
94216fae4e5dSmrgm4_define([lt_combine],
94226fae4e5dSmrg[m4_if(m4_eval([$# > 3]), [1],
94236fae4e5dSmrg       [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
94246fae4e5dSmrg[[m4_foreach([_Lt_prefix], [$2],
94256fae4e5dSmrg	     [m4_foreach([_Lt_suffix],
94266fae4e5dSmrg		]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
94276fae4e5dSmrg	[_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
94281f0ac6a5Smrg
94291f0ac6a5Smrg
94306fae4e5dSmrg# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
94316fae4e5dSmrg# -----------------------------------------------------------------------
94326fae4e5dSmrg# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
94336fae4e5dSmrg# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
94346fae4e5dSmrgm4_define([lt_if_append_uniq],
94356fae4e5dSmrg[m4_ifdef([$1],
94366fae4e5dSmrg	  [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
94376fae4e5dSmrg		 [lt_append([$1], [$2], [$3])$4],
94386fae4e5dSmrg		 [$5])],
94396fae4e5dSmrg	  [lt_append([$1], [$2], [$3])$4])])
94401f0ac6a5Smrg
94411f0ac6a5Smrg
94426fae4e5dSmrg# lt_dict_add(DICT, KEY, VALUE)
94436fae4e5dSmrg# -----------------------------
94446fae4e5dSmrgm4_define([lt_dict_add],
94456fae4e5dSmrg[m4_define([$1($2)], [$3])])
94461f0ac6a5Smrg
94471f0ac6a5Smrg
94486fae4e5dSmrg# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
94496fae4e5dSmrg# --------------------------------------------
94506fae4e5dSmrgm4_define([lt_dict_add_subkey],
94516fae4e5dSmrg[m4_define([$1($2:$3)], [$4])])
94521f0ac6a5Smrg
94531f0ac6a5Smrg
94546fae4e5dSmrg# lt_dict_fetch(DICT, KEY, [SUBKEY])
94556fae4e5dSmrg# ----------------------------------
94566fae4e5dSmrgm4_define([lt_dict_fetch],
94576fae4e5dSmrg[m4_ifval([$3],
94586fae4e5dSmrg	m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
94596fae4e5dSmrg    m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
94601f0ac6a5Smrg
94619c9ff80cSmrg
94626fae4e5dSmrg# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
94636fae4e5dSmrg# -----------------------------------------------------------------
94646fae4e5dSmrgm4_define([lt_if_dict_fetch],
94656fae4e5dSmrg[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
94666fae4e5dSmrg	[$5],
94676fae4e5dSmrg    [$6])])
94681f0ac6a5Smrg
94691f0ac6a5Smrg
94706fae4e5dSmrg# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
94716fae4e5dSmrg# --------------------------------------------------------------
94726fae4e5dSmrgm4_define([lt_dict_filter],
94736fae4e5dSmrg[m4_if([$5], [], [],
94746fae4e5dSmrg  [lt_join(m4_quote(m4_default([$4], [[, ]])),
94756fae4e5dSmrg           lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
94766fae4e5dSmrg		      [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
94776fae4e5dSmrg])
94781f0ac6a5Smrg
94796fae4e5dSmrg# ltversion.m4 -- version numbers			-*- Autoconf -*-
94806fae4e5dSmrg#
94816fae4e5dSmrg#   Copyright (C) 2004 Free Software Foundation, Inc.
94826fae4e5dSmrg#   Written by Scott James Remnant, 2004
94836fae4e5dSmrg#
94846fae4e5dSmrg# This file is free software; the Free Software Foundation gives
94856fae4e5dSmrg# unlimited permission to copy and/or distribute it, with or without
94866fae4e5dSmrg# modifications, as long as this notice is preserved.
94871f0ac6a5Smrg
94886fae4e5dSmrg# @configure_input@
94899c9ff80cSmrg
94906fae4e5dSmrg# serial 3293 ltversion.m4
94916fae4e5dSmrg# This file is part of GNU Libtool
94921f0ac6a5Smrg
94936fae4e5dSmrgm4_define([LT_PACKAGE_VERSION], [2.4])
94946fae4e5dSmrgm4_define([LT_PACKAGE_REVISION], [1.3293])
94951f0ac6a5Smrg
94966fae4e5dSmrgAC_DEFUN([LTVERSION_VERSION],
94976fae4e5dSmrg[macro_version='2.4'
94986fae4e5dSmrgmacro_revision='1.3293'
94996fae4e5dSmrg_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
95006fae4e5dSmrg_LT_DECL(, macro_revision, 0)
95016fae4e5dSmrg])
95021f0ac6a5Smrg
95036fae4e5dSmrg# lt~obsolete.m4 -- aclocal satisfying obsolete definitions.    -*-Autoconf-*-
95046fae4e5dSmrg#
95056fae4e5dSmrg#   Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
95066fae4e5dSmrg#   Written by Scott James Remnant, 2004.
95076fae4e5dSmrg#
95086fae4e5dSmrg# This file is free software; the Free Software Foundation gives
95096fae4e5dSmrg# unlimited permission to copy and/or distribute it, with or without
95106fae4e5dSmrg# modifications, as long as this notice is preserved.
95111f0ac6a5Smrg
95126fae4e5dSmrg# serial 5 lt~obsolete.m4
95131f0ac6a5Smrg
95146fae4e5dSmrg# These exist entirely to fool aclocal when bootstrapping libtool.
95156fae4e5dSmrg#
95166fae4e5dSmrg# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
95176fae4e5dSmrg# which have later been changed to m4_define as they aren't part of the
95186fae4e5dSmrg# exported API, or moved to Autoconf or Automake where they belong.
95196fae4e5dSmrg#
95206fae4e5dSmrg# The trouble is, aclocal is a bit thick.  It'll see the old AC_DEFUN
95216fae4e5dSmrg# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
95226fae4e5dSmrg# using a macro with the same name in our local m4/libtool.m4 it'll
95236fae4e5dSmrg# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
95246fae4e5dSmrg# and doesn't know about Autoconf macros at all.)
95256fae4e5dSmrg#
95266fae4e5dSmrg# So we provide this file, which has a silly filename so it's always
95276fae4e5dSmrg# included after everything else.  This provides aclocal with the
95286fae4e5dSmrg# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
95296fae4e5dSmrg# because those macros already exist, or will be overwritten later.
95306fae4e5dSmrg# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 
95316fae4e5dSmrg#
95326fae4e5dSmrg# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
95336fae4e5dSmrg# Yes, that means every name once taken will need to remain here until
95346fae4e5dSmrg# we give up compatibility with versions before 1.7, at which point
95356fae4e5dSmrg# we need to keep only those names which we still refer to.
95361f0ac6a5Smrg
95376fae4e5dSmrg# This is to help aclocal find these macros, as it can't see m4_define.
95386fae4e5dSmrgAC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
95391f0ac6a5Smrg
95406fae4e5dSmrgm4_ifndef([AC_LIBTOOL_LINKER_OPTION],	[AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
95416fae4e5dSmrgm4_ifndef([AC_PROG_EGREP],		[AC_DEFUN([AC_PROG_EGREP])])
95426fae4e5dSmrgm4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH],	[AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
95436fae4e5dSmrgm4_ifndef([_LT_AC_SHELL_INIT],		[AC_DEFUN([_LT_AC_SHELL_INIT])])
95446fae4e5dSmrgm4_ifndef([_LT_AC_SYS_LIBPATH_AIX],	[AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
95456fae4e5dSmrgm4_ifndef([_LT_PROG_LTMAIN],		[AC_DEFUN([_LT_PROG_LTMAIN])])
95466fae4e5dSmrgm4_ifndef([_LT_AC_TAGVAR],		[AC_DEFUN([_LT_AC_TAGVAR])])
95476fae4e5dSmrgm4_ifndef([AC_LTDL_ENABLE_INSTALL],	[AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
95486fae4e5dSmrgm4_ifndef([AC_LTDL_PREOPEN],		[AC_DEFUN([AC_LTDL_PREOPEN])])
95496fae4e5dSmrgm4_ifndef([_LT_AC_SYS_COMPILER],	[AC_DEFUN([_LT_AC_SYS_COMPILER])])
95506fae4e5dSmrgm4_ifndef([_LT_AC_LOCK],		[AC_DEFUN([_LT_AC_LOCK])])
95516fae4e5dSmrgm4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE],	[AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
95526fae4e5dSmrgm4_ifndef([_LT_AC_TRY_DLOPEN_SELF],	[AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
95536fae4e5dSmrgm4_ifndef([AC_LIBTOOL_PROG_CC_C_O],	[AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
95546fae4e5dSmrgm4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
95556fae4e5dSmrgm4_ifndef([AC_LIBTOOL_OBJDIR],		[AC_DEFUN([AC_LIBTOOL_OBJDIR])])
95566fae4e5dSmrgm4_ifndef([AC_LTDL_OBJDIR],		[AC_DEFUN([AC_LTDL_OBJDIR])])
95576fae4e5dSmrgm4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
95586fae4e5dSmrgm4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP],	[AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
95596fae4e5dSmrgm4_ifndef([AC_PATH_MAGIC],		[AC_DEFUN([AC_PATH_MAGIC])])
95606fae4e5dSmrgm4_ifndef([AC_PROG_LD_GNU],		[AC_DEFUN([AC_PROG_LD_GNU])])
95616fae4e5dSmrgm4_ifndef([AC_PROG_LD_RELOAD_FLAG],	[AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
95626fae4e5dSmrgm4_ifndef([AC_DEPLIBS_CHECK_METHOD],	[AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
95636fae4e5dSmrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
95646fae4e5dSmrgm4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
95656fae4e5dSmrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
95666fae4e5dSmrgm4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS],	[AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
95676fae4e5dSmrgm4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP],	[AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
95686fae4e5dSmrgm4_ifndef([LT_AC_PROG_EGREP],		[AC_DEFUN([LT_AC_PROG_EGREP])])
95696fae4e5dSmrgm4_ifndef([LT_AC_PROG_SED],		[AC_DEFUN([LT_AC_PROG_SED])])
95706fae4e5dSmrgm4_ifndef([_LT_CC_BASENAME],		[AC_DEFUN([_LT_CC_BASENAME])])
95716fae4e5dSmrgm4_ifndef([_LT_COMPILER_BOILERPLATE],	[AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
95726fae4e5dSmrgm4_ifndef([_LT_LINKER_BOILERPLATE],	[AC_DEFUN([_LT_LINKER_BOILERPLATE])])
95736fae4e5dSmrgm4_ifndef([_AC_PROG_LIBTOOL],		[AC_DEFUN([_AC_PROG_LIBTOOL])])
95746fae4e5dSmrgm4_ifndef([AC_LIBTOOL_SETUP],		[AC_DEFUN([AC_LIBTOOL_SETUP])])
95756fae4e5dSmrgm4_ifndef([_LT_AC_CHECK_DLFCN],		[AC_DEFUN([_LT_AC_CHECK_DLFCN])])
95766fae4e5dSmrgm4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER],	[AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
95776fae4e5dSmrgm4_ifndef([_LT_AC_TAGCONFIG],		[AC_DEFUN([_LT_AC_TAGCONFIG])])
95786fae4e5dSmrgm4_ifndef([AC_DISABLE_FAST_INSTALL],	[AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
95796fae4e5dSmrgm4_ifndef([_LT_AC_LANG_CXX],		[AC_DEFUN([_LT_AC_LANG_CXX])])
95806fae4e5dSmrgm4_ifndef([_LT_AC_LANG_F77],		[AC_DEFUN([_LT_AC_LANG_F77])])
95816fae4e5dSmrgm4_ifndef([_LT_AC_LANG_GCJ],		[AC_DEFUN([_LT_AC_LANG_GCJ])])
95826fae4e5dSmrgm4_ifndef([AC_LIBTOOL_LANG_C_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
95836fae4e5dSmrgm4_ifndef([_LT_AC_LANG_C_CONFIG],	[AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
95846fae4e5dSmrgm4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
95856fae4e5dSmrgm4_ifndef([_LT_AC_LANG_CXX_CONFIG],	[AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
95866fae4e5dSmrgm4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
95876fae4e5dSmrgm4_ifndef([_LT_AC_LANG_F77_CONFIG],	[AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
95886fae4e5dSmrgm4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
95896fae4e5dSmrgm4_ifndef([_LT_AC_LANG_GCJ_CONFIG],	[AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
95906fae4e5dSmrgm4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
95916fae4e5dSmrgm4_ifndef([_LT_AC_LANG_RC_CONFIG],	[AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
95926fae4e5dSmrgm4_ifndef([AC_LIBTOOL_CONFIG],		[AC_DEFUN([AC_LIBTOOL_CONFIG])])
95936fae4e5dSmrgm4_ifndef([_LT_AC_FILE_LTDLL_C],	[AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
95946fae4e5dSmrgm4_ifndef([_LT_REQUIRED_DARWIN_CHECKS],	[AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
95956fae4e5dSmrgm4_ifndef([_LT_AC_PROG_CXXCPP],		[AC_DEFUN([_LT_AC_PROG_CXXCPP])])
95966fae4e5dSmrgm4_ifndef([_LT_PREPARE_SED_QUOTE_VARS],	[AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
95976fae4e5dSmrgm4_ifndef([_LT_PROG_ECHO_BACKSLASH],	[AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
95986fae4e5dSmrgm4_ifndef([_LT_PROG_F77],		[AC_DEFUN([_LT_PROG_F77])])
95996fae4e5dSmrgm4_ifndef([_LT_PROG_FC],		[AC_DEFUN([_LT_PROG_FC])])
96006fae4e5dSmrgm4_ifndef([_LT_PROG_CXX],		[AC_DEFUN([_LT_PROG_CXX])])
96016fae4e5dSmrg
96026fae4e5dSmrgdnl xorg-macros.m4.  Generated from xorg-macros.m4.in xorgversion.m4 by configure.
96036fae4e5dSmrgdnl
96046fae4e5dSmrgdnl Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
96056fae4e5dSmrgdnl 
96066fae4e5dSmrgdnl Permission is hereby granted, free of charge, to any person obtaining a
96076fae4e5dSmrgdnl copy of this software and associated documentation files (the "Software"),
96086fae4e5dSmrgdnl to deal in the Software without restriction, including without limitation
96096fae4e5dSmrgdnl the rights to use, copy, modify, merge, publish, distribute, sublicense,
96106fae4e5dSmrgdnl and/or sell copies of the Software, and to permit persons to whom the
96116fae4e5dSmrgdnl Software is furnished to do so, subject to the following conditions:
96126fae4e5dSmrgdnl
96136fae4e5dSmrgdnl The above copyright notice and this permission notice (including the next
96146fae4e5dSmrgdnl paragraph) shall be included in all copies or substantial portions of the
96156fae4e5dSmrgdnl Software.
96166fae4e5dSmrgdnl
96176fae4e5dSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
96186fae4e5dSmrgdnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
96196fae4e5dSmrgdnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
96206fae4e5dSmrgdnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
96216fae4e5dSmrgdnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
96226fae4e5dSmrgdnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
96236fae4e5dSmrgdnl DEALINGS IN THE SOFTWARE.
96241f0ac6a5Smrg
96256fae4e5dSmrg# XORG_MACROS_VERSION(required-version)
96266fae4e5dSmrg# -------------------------------------
96276fae4e5dSmrg# Minimum version: 1.1.0
96286fae4e5dSmrg#
96296fae4e5dSmrg# If you're using a macro added in Version 1.1 or newer, include this in
96306fae4e5dSmrg# your configure.ac with the minimum required version, such as:
96316fae4e5dSmrg# XORG_MACROS_VERSION(1.1)
96326fae4e5dSmrg#
96336fae4e5dSmrg# To ensure that this macro is defined, also add:
96346fae4e5dSmrg# m4_ifndef([XORG_MACROS_VERSION],
96356fae4e5dSmrg#     [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])])
96366fae4e5dSmrg#
96376fae4e5dSmrg#
96386fae4e5dSmrg# See the "minimum version" comment for each macro you use to see what 
96396fae4e5dSmrg# version you require.
96406fae4e5dSmrgm4_defun([XORG_MACROS_VERSION],[
96416fae4e5dSmrgm4_define([vers_have], [1.16.2])
96426fae4e5dSmrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.])))
96436fae4e5dSmrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.])))
96446fae4e5dSmrgm4_if(m4_cmp(maj_have, maj_needed), 0,,
96456fae4e5dSmrg    [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])])
96466fae4e5dSmrgm4_if(m4_version_compare(vers_have, [$1]), -1,
96476fae4e5dSmrg    [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])])
96486fae4e5dSmrgm4_undefine([vers_have])
96496fae4e5dSmrgm4_undefine([maj_have])
96506fae4e5dSmrgm4_undefine([maj_needed])
96516fae4e5dSmrg]) # XORG_MACROS_VERSION
96521f0ac6a5Smrg
96536fae4e5dSmrg# XORG_PROG_RAWCPP()
96546fae4e5dSmrg# ------------------
96556fae4e5dSmrg# Minimum version: 1.0.0
96566fae4e5dSmrg#
96576fae4e5dSmrg# Find cpp program and necessary flags for use in pre-processing text files
96586fae4e5dSmrg# such as man pages and config files
96596fae4e5dSmrgAC_DEFUN([XORG_PROG_RAWCPP],[
96606fae4e5dSmrgAC_REQUIRE([AC_PROG_CPP])
96616fae4e5dSmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 
96626fae4e5dSmrg   [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib])
96631f0ac6a5Smrg
96646fae4e5dSmrg# Check for flag to avoid builtin definitions - assumes unix is predefined,
96656fae4e5dSmrg# which is not the best choice for supporting other OS'es, but covers most
96666fae4e5dSmrg# of the ones we need for now.
96676fae4e5dSmrgAC_MSG_CHECKING([if $RAWCPP requires -undef])
96686fae4e5dSmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp redefine unix ?]])])
96696fae4e5dSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
96706fae4e5dSmrg	AC_MSG_RESULT([no])
96716fae4e5dSmrgelse
96726fae4e5dSmrg	if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
96736fae4e5dSmrg		RAWCPPFLAGS=-undef
96746fae4e5dSmrg		AC_MSG_RESULT([yes])
96756fae4e5dSmrg	# under Cygwin unix is still defined even with -undef
96766fae4e5dSmrg	elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
96776fae4e5dSmrg		RAWCPPFLAGS="-undef -ansi"
96786fae4e5dSmrg		AC_MSG_RESULT([yes, with -ansi])
96796fae4e5dSmrg	else
96806fae4e5dSmrg		AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef.  I don't know what to do.])
96816fae4e5dSmrg	fi
96826fae4e5dSmrgfi
96836fae4e5dSmrgrm -f conftest.$ac_ext
96841f0ac6a5Smrg
96856fae4e5dSmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional])
96866fae4e5dSmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve   "whitespace"?]])])
96876fae4e5dSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
96886fae4e5dSmrg	AC_MSG_RESULT([no])
96896fae4e5dSmrgelse
96906fae4e5dSmrg	if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
96916fae4e5dSmrg		RAWCPPFLAGS="${RAWCPPFLAGS} -traditional"
96926fae4e5dSmrg		AC_MSG_RESULT([yes])
96936fae4e5dSmrg	else
96946fae4e5dSmrg		AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional.  I don't know what to do.])
96956fae4e5dSmrg	fi
96966fae4e5dSmrgfi
96976fae4e5dSmrgrm -f conftest.$ac_ext
96986fae4e5dSmrgAC_SUBST(RAWCPPFLAGS)
96996fae4e5dSmrg]) # XORG_PROG_RAWCPP
97001f0ac6a5Smrg
97016fae4e5dSmrg# XORG_MANPAGE_SECTIONS()
97026fae4e5dSmrg# -----------------------
97036fae4e5dSmrg# Minimum version: 1.0.0
97049c9ff80cSmrg#
97056fae4e5dSmrg# Determine which sections man pages go in for the different man page types
97066fae4e5dSmrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files.
97076fae4e5dSmrg# Not sure if there's any better way than just hardcoding by OS name.
97086fae4e5dSmrg# Override default settings by setting environment variables
97096fae4e5dSmrg# Added MAN_SUBSTS in version 1.8
97106fae4e5dSmrg# Added AC_PROG_SED in version 1.8
97111f0ac6a5Smrg
97126fae4e5dSmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[
97136fae4e5dSmrgAC_REQUIRE([AC_CANONICAL_HOST])
97146fae4e5dSmrgAC_REQUIRE([AC_PROG_SED])
97159c9ff80cSmrg
97166fae4e5dSmrgif test x$APP_MAN_SUFFIX = x    ; then
97176fae4e5dSmrg    APP_MAN_SUFFIX=1
97186fae4e5dSmrgfi
97196fae4e5dSmrgif test x$APP_MAN_DIR = x    ; then
97206fae4e5dSmrg    APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)'
97216fae4e5dSmrgfi
97229c9ff80cSmrg
97236fae4e5dSmrgif test x$LIB_MAN_SUFFIX = x    ; then
97246fae4e5dSmrg    LIB_MAN_SUFFIX=3
97256fae4e5dSmrgfi
97266fae4e5dSmrgif test x$LIB_MAN_DIR = x    ; then
97276fae4e5dSmrg    LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)'
97286fae4e5dSmrgfi
97299c9ff80cSmrg
97306fae4e5dSmrgif test x$FILE_MAN_SUFFIX = x    ; then
97316fae4e5dSmrg    case $host_os in
97326fae4e5dSmrg	solaris*)	FILE_MAN_SUFFIX=4  ;;
97336fae4e5dSmrg	*)		FILE_MAN_SUFFIX=5  ;;
97346fae4e5dSmrg    esac
97356fae4e5dSmrgfi
97366fae4e5dSmrgif test x$FILE_MAN_DIR = x    ; then
97376fae4e5dSmrg    FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)'
97386fae4e5dSmrgfi
97399c9ff80cSmrg
97406fae4e5dSmrgif test x$MISC_MAN_SUFFIX = x    ; then
97416fae4e5dSmrg    case $host_os in
97426fae4e5dSmrg	solaris*)	MISC_MAN_SUFFIX=5  ;;
97436fae4e5dSmrg	*)		MISC_MAN_SUFFIX=7  ;;
97446fae4e5dSmrg    esac
97456fae4e5dSmrgfi
97466fae4e5dSmrgif test x$MISC_MAN_DIR = x    ; then
97476fae4e5dSmrg    MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)'
97486fae4e5dSmrgfi
97499c9ff80cSmrg
97506fae4e5dSmrgif test x$DRIVER_MAN_SUFFIX = x    ; then
97516fae4e5dSmrg    case $host_os in
97526fae4e5dSmrg	solaris*)	DRIVER_MAN_SUFFIX=7  ;;
97536fae4e5dSmrg	*)		DRIVER_MAN_SUFFIX=4  ;;
97546fae4e5dSmrg    esac
97556fae4e5dSmrgfi
97566fae4e5dSmrgif test x$DRIVER_MAN_DIR = x    ; then
97576fae4e5dSmrg    DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)'
97586fae4e5dSmrgfi
97599c9ff80cSmrg
97606fae4e5dSmrgif test x$ADMIN_MAN_SUFFIX = x    ; then
97616fae4e5dSmrg    case $host_os in
97626fae4e5dSmrg	solaris*)	ADMIN_MAN_SUFFIX=1m ;;
97636fae4e5dSmrg	*)		ADMIN_MAN_SUFFIX=8  ;;
97646fae4e5dSmrg    esac
97656fae4e5dSmrgfi
97666fae4e5dSmrgif test x$ADMIN_MAN_DIR = x    ; then
97676fae4e5dSmrg    ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)'
97686fae4e5dSmrgfi
97699c9ff80cSmrg
97709c9ff80cSmrg
97716fae4e5dSmrgAC_SUBST([APP_MAN_SUFFIX])
97726fae4e5dSmrgAC_SUBST([LIB_MAN_SUFFIX])
97736fae4e5dSmrgAC_SUBST([FILE_MAN_SUFFIX])
97746fae4e5dSmrgAC_SUBST([MISC_MAN_SUFFIX])
97756fae4e5dSmrgAC_SUBST([DRIVER_MAN_SUFFIX])
97766fae4e5dSmrgAC_SUBST([ADMIN_MAN_SUFFIX])
97776fae4e5dSmrgAC_SUBST([APP_MAN_DIR])
97786fae4e5dSmrgAC_SUBST([LIB_MAN_DIR])
97796fae4e5dSmrgAC_SUBST([FILE_MAN_DIR])
97806fae4e5dSmrgAC_SUBST([MISC_MAN_DIR])
97816fae4e5dSmrgAC_SUBST([DRIVER_MAN_DIR])
97826fae4e5dSmrgAC_SUBST([ADMIN_MAN_DIR])
97831f0ac6a5Smrg
97846fae4e5dSmrgXORG_MAN_PAGE="X Version 11"
97856fae4e5dSmrgAC_SUBST([XORG_MAN_PAGE])
97866fae4e5dSmrgMAN_SUBSTS="\
97876fae4e5dSmrg	-e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \
97886fae4e5dSmrg	-e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \
97896fae4e5dSmrg	-e 's|__xservername__|Xorg|g' \
97906fae4e5dSmrg	-e 's|__xconfigfile__|xorg.conf|g' \
97916fae4e5dSmrg	-e 's|__projectroot__|\$(prefix)|g' \
97926fae4e5dSmrg	-e 's|__apploaddir__|\$(appdefaultdir)|g' \
97936fae4e5dSmrg	-e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \
97946fae4e5dSmrg	-e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \
97956fae4e5dSmrg	-e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \
97966fae4e5dSmrg	-e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \
97976fae4e5dSmrg	-e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \
97986fae4e5dSmrg	-e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'"
97996fae4e5dSmrgAC_SUBST([MAN_SUBSTS])
98001f0ac6a5Smrg
98016fae4e5dSmrg]) # XORG_MANPAGE_SECTIONS
98029c9ff80cSmrg
98036fae4e5dSmrg# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION])
98046fae4e5dSmrg# ------------------------
98056fae4e5dSmrg# Minimum version: 1.7.0
98066fae4e5dSmrg#
98076fae4e5dSmrg# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent
98086fae4e5dSmrg# provided by xorg-sgml-doctools, if installed.
98096fae4e5dSmrgAC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[
98106fae4e5dSmrgAC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])])
98116fae4e5dSmrgXORG_SGML_PATH=
98126fae4e5dSmrgPKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])],
98136fae4e5dSmrg    [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`],
98146fae4e5dSmrg    [m4_ifval([$1],[:],
98156fae4e5dSmrg        [if test x"$cross_compiling" != x"yes" ; then
98166fae4e5dSmrg            AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent],
98176fae4e5dSmrg                          [XORG_SGML_PATH=$prefix/share/sgml])
98186fae4e5dSmrg         fi])
98196fae4e5dSmrg    ])
98201f0ac6a5Smrg
98216fae4e5dSmrg# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing
98226fae4e5dSmrg# the path and the name of the doc stylesheet
98236fae4e5dSmrgif test "x$XORG_SGML_PATH" != "x" ; then
98246fae4e5dSmrg   AC_MSG_RESULT([$XORG_SGML_PATH])
98256fae4e5dSmrg   STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11
98266fae4e5dSmrg   XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl
98276fae4e5dSmrgelse
98286fae4e5dSmrg   AC_MSG_RESULT([no])
98296fae4e5dSmrgfi
98301f0ac6a5Smrg
98316fae4e5dSmrgAC_SUBST(XORG_SGML_PATH)
98326fae4e5dSmrgAC_SUBST(STYLESHEET_SRCDIR)
98336fae4e5dSmrgAC_SUBST(XSL_STYLESHEET)
98346fae4e5dSmrgAM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"])
98356fae4e5dSmrg]) # XORG_CHECK_SGML_DOCTOOLS
98361f0ac6a5Smrg
98376fae4e5dSmrg# XORG_CHECK_LINUXDOC
98386fae4e5dSmrg# -------------------
98396fae4e5dSmrg# Minimum version: 1.0.0
98406fae4e5dSmrg#
98416fae4e5dSmrg# Defines the variable MAKE_TEXT if the necessary tools and
98426fae4e5dSmrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt.
98436fae4e5dSmrg# Whether or not the necessary tools and files are found can be checked
98446fae4e5dSmrg# with the AM_CONDITIONAL "BUILD_LINUXDOC"
98456fae4e5dSmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[
98466fae4e5dSmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS])
98476fae4e5dSmrgAC_REQUIRE([XORG_WITH_PS2PDF])
98481f0ac6a5Smrg
98496fae4e5dSmrgAC_PATH_PROG(LINUXDOC, linuxdoc)
98501f0ac6a5Smrg
98516fae4e5dSmrgAC_MSG_CHECKING([whether to build documentation])
98521f0ac6a5Smrg
98536fae4e5dSmrgif test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then
98546fae4e5dSmrg   BUILDDOC=yes
98556fae4e5dSmrgelse
98566fae4e5dSmrg   BUILDDOC=no
98576fae4e5dSmrgfi
98581f0ac6a5Smrg
98596fae4e5dSmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes])
98601f0ac6a5Smrg
98616fae4e5dSmrgAC_MSG_RESULT([$BUILDDOC])
98621f0ac6a5Smrg
98636fae4e5dSmrgAC_MSG_CHECKING([whether to build pdf documentation])
98641f0ac6a5Smrg
98656fae4e5dSmrgif test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then
98666fae4e5dSmrg   BUILDPDFDOC=yes
98676fae4e5dSmrgelse
98686fae4e5dSmrg   BUILDPDFDOC=no
98696fae4e5dSmrgfi
98701f0ac6a5Smrg
98716fae4e5dSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
98721f0ac6a5Smrg
98736fae4e5dSmrgAC_MSG_RESULT([$BUILDPDFDOC])
98741f0ac6a5Smrg
98756fae4e5dSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f"
98766fae4e5dSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps"
98776fae4e5dSmrgMAKE_PDF="$PS2PDF"
98786fae4e5dSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC  -B html --split=0"
98791f0ac6a5Smrg
98806fae4e5dSmrgAC_SUBST(MAKE_TEXT)
98816fae4e5dSmrgAC_SUBST(MAKE_PS)
98826fae4e5dSmrgAC_SUBST(MAKE_PDF)
98836fae4e5dSmrgAC_SUBST(MAKE_HTML)
98846fae4e5dSmrg]) # XORG_CHECK_LINUXDOC
98851f0ac6a5Smrg
98866fae4e5dSmrg# XORG_CHECK_DOCBOOK
98876fae4e5dSmrg# -------------------
98886fae4e5dSmrg# Minimum version: 1.0.0
98896fae4e5dSmrg#
98906fae4e5dSmrg# Checks for the ability to build output formats from SGML DocBook source.
98916fae4e5dSmrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC"
98926fae4e5dSmrg# indicates whether the necessary tools and files are found and, if set,
98936fae4e5dSmrg# $(MAKE_XXX) blah.sgml will produce blah.xxx.
98946fae4e5dSmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[
98956fae4e5dSmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS])
98961f0ac6a5Smrg
98976fae4e5dSmrgBUILDTXTDOC=no
98986fae4e5dSmrgBUILDPDFDOC=no
98996fae4e5dSmrgBUILDPSDOC=no
99006fae4e5dSmrgBUILDHTMLDOC=no
99011f0ac6a5Smrg
99026fae4e5dSmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps)
99036fae4e5dSmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf)
99046fae4e5dSmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html)
99056fae4e5dSmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt)
99061f0ac6a5Smrg
99076fae4e5dSmrgAC_MSG_CHECKING([whether to build text documentation])
99086fae4e5dSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x &&
99096fae4e5dSmrg   test x$BUILD_TXTDOC != xno; then
99106fae4e5dSmrg	BUILDTXTDOC=yes
99116fae4e5dSmrgfi
99126fae4e5dSmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes])
99136fae4e5dSmrgAC_MSG_RESULT([$BUILDTXTDOC])
99141f0ac6a5Smrg
99156fae4e5dSmrgAC_MSG_CHECKING([whether to build PDF documentation])
99166fae4e5dSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x &&
99176fae4e5dSmrg   test x$BUILD_PDFDOC != xno; then
99186fae4e5dSmrg	BUILDPDFDOC=yes
99196fae4e5dSmrgfi
99206fae4e5dSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
99216fae4e5dSmrgAC_MSG_RESULT([$BUILDPDFDOC])
99221f0ac6a5Smrg
99236fae4e5dSmrgAC_MSG_CHECKING([whether to build PostScript documentation])
99246fae4e5dSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x &&
99256fae4e5dSmrg   test x$BUILD_PSDOC != xno; then
99266fae4e5dSmrg	BUILDPSDOC=yes
99276fae4e5dSmrgfi
99286fae4e5dSmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes])
99296fae4e5dSmrgAC_MSG_RESULT([$BUILDPSDOC])
99301f0ac6a5Smrg
99316fae4e5dSmrgAC_MSG_CHECKING([whether to build HTML documentation])
99326fae4e5dSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x &&
99336fae4e5dSmrg   test x$BUILD_HTMLDOC != xno; then
99346fae4e5dSmrg	BUILDHTMLDOC=yes
99356fae4e5dSmrgfi
99366fae4e5dSmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes])
99376fae4e5dSmrgAC_MSG_RESULT([$BUILDHTMLDOC])
99381f0ac6a5Smrg
99396fae4e5dSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT"
99406fae4e5dSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS"
99416fae4e5dSmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF"
99426fae4e5dSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML"
99431f0ac6a5Smrg
99446fae4e5dSmrgAC_SUBST(MAKE_TEXT)
99456fae4e5dSmrgAC_SUBST(MAKE_PS)
99466fae4e5dSmrgAC_SUBST(MAKE_PDF)
99476fae4e5dSmrgAC_SUBST(MAKE_HTML)
99486fae4e5dSmrg]) # XORG_CHECK_DOCBOOK
99491f0ac6a5Smrg
99506fae4e5dSmrg# XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT])
99516fae4e5dSmrg# ----------------
99526fae4e5dSmrg# Minimum version: 1.5.0
99536fae4e5dSmrg# Minimum version for optional DEFAULT argument: 1.11.0
99546fae4e5dSmrg#
99556fae4e5dSmrg# Documentation tools are not always available on all platforms and sometimes
99566fae4e5dSmrg# not at the appropriate level. This macro enables a module to test for the
99576fae4e5dSmrg# presence of the tool and obtain it's path in separate variables. Coupled with
99586fae4e5dSmrg# the --with-xmlto option, it allows maximum flexibilty in making decisions
99596fae4e5dSmrg# as whether or not to use the xmlto package. When DEFAULT is not specified,
99606fae4e5dSmrg# --with-xmlto assumes 'auto'.
99616fae4e5dSmrg#
99626fae4e5dSmrg# Interface to module:
99636fae4e5dSmrg# HAVE_XMLTO: 	used in makefiles to conditionally generate documentation
99646fae4e5dSmrg# XMLTO:	returns the path of the xmlto program found
99656fae4e5dSmrg#		returns the path set by the user in the environment
99666fae4e5dSmrg# --with-xmlto:	'yes' user instructs the module to use xmlto
99676fae4e5dSmrg#		'no' user instructs the module not to use xmlto
99686fae4e5dSmrg#
99696fae4e5dSmrg# Added in version 1.10.0
99706fae4e5dSmrg# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation
99716fae4e5dSmrg#                  xmlto for text output requires either lynx, links, or w3m browsers
99726fae4e5dSmrg#
99736fae4e5dSmrg# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path.
99746fae4e5dSmrg#
99756fae4e5dSmrgAC_DEFUN([XORG_WITH_XMLTO],[
99766fae4e5dSmrgAC_ARG_VAR([XMLTO], [Path to xmlto command])
99776fae4e5dSmrgm4_define([_defopt], m4_default([$2], [auto]))
99786fae4e5dSmrgAC_ARG_WITH(xmlto,
99796fae4e5dSmrg	AS_HELP_STRING([--with-xmlto],
99806fae4e5dSmrg	   [Use xmlto to regenerate documentation (default: ]_defopt[)]),
99816fae4e5dSmrg	   [use_xmlto=$withval], [use_xmlto=]_defopt)
99826fae4e5dSmrgm4_undefine([_defopt])
99839c9ff80cSmrg
99846fae4e5dSmrgif test "x$use_xmlto" = x"auto"; then
99856fae4e5dSmrg   AC_PATH_PROG([XMLTO], [xmlto])
99866fae4e5dSmrg   if test "x$XMLTO" = "x"; then
99876fae4e5dSmrg        AC_MSG_WARN([xmlto not found - documentation targets will be skipped])
99886fae4e5dSmrg	have_xmlto=no
99896fae4e5dSmrg   else
99906fae4e5dSmrg        have_xmlto=yes
99916fae4e5dSmrg   fi
99926fae4e5dSmrgelif test "x$use_xmlto" = x"yes" ; then
99936fae4e5dSmrg   AC_PATH_PROG([XMLTO], [xmlto])
99946fae4e5dSmrg   if test "x$XMLTO" = "x"; then
99956fae4e5dSmrg        AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH])
99966fae4e5dSmrg   fi
99976fae4e5dSmrg   have_xmlto=yes
99986fae4e5dSmrgelif test "x$use_xmlto" = x"no" ; then
99996fae4e5dSmrg   if test "x$XMLTO" != "x"; then
100006fae4e5dSmrg      AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified])
100016fae4e5dSmrg   fi
100026fae4e5dSmrg   have_xmlto=no
100036fae4e5dSmrgelse
100046fae4e5dSmrg   AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no'])
100056fae4e5dSmrgfi
100066fae4e5dSmrg
100076fae4e5dSmrg# Test for a minimum version of xmlto, if provided.
100086fae4e5dSmrgm4_ifval([$1],
100096fae4e5dSmrg[if test "$have_xmlto" = yes; then
100106fae4e5dSmrg    # scrape the xmlto version
100116fae4e5dSmrg    AC_MSG_CHECKING([the xmlto version])
100126fae4e5dSmrg    xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3`
100136fae4e5dSmrg    AC_MSG_RESULT([$xmlto_version])
100146fae4e5dSmrg    AS_VERSION_COMPARE([$xmlto_version], [$1],
100156fae4e5dSmrg        [if test "x$use_xmlto" = xauto; then
100166fae4e5dSmrg            AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed])
100176fae4e5dSmrg            have_xmlto=no
100186fae4e5dSmrg        else
100196fae4e5dSmrg            AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed])
100206fae4e5dSmrg        fi])
100216fae4e5dSmrgfi])
100226fae4e5dSmrg
100236fae4e5dSmrg# Test for the ability of xmlto to generate a text target
100246fae4e5dSmrghave_xmlto_text=no
100256fae4e5dSmrgcat > conftest.xml << "EOF"
100266fae4e5dSmrgEOF
100276fae4e5dSmrgAS_IF([test "$have_xmlto" = yes],
100286fae4e5dSmrg      [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1],
100296fae4e5dSmrg             [have_xmlto_text=yes],
100306fae4e5dSmrg             [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])])
100316fae4e5dSmrgrm -f conftest.xml
100326fae4e5dSmrgAM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes])
100336fae4e5dSmrgAM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes])
100346fae4e5dSmrg]) # XORG_WITH_XMLTO
100356fae4e5dSmrg
100366fae4e5dSmrg# XORG_WITH_XSLTPROC([MIN-VERSION], [DEFAULT])
100376fae4e5dSmrg# --------------------------------------------
100386fae4e5dSmrg# Minimum version: 1.12.0
100396fae4e5dSmrg# Minimum version for optional DEFAULT argument: 1.12.0
100406fae4e5dSmrg#
100416fae4e5dSmrg# XSLT (Extensible Stylesheet Language Transformations) is a declarative,
100426fae4e5dSmrg# XML-based language used for the transformation of XML documents.
100436fae4e5dSmrg# The xsltproc command line tool is for applying XSLT stylesheets to XML documents.
100446fae4e5dSmrg# It is used under the cover by xmlto to generate html files from DocBook/XML.
100456fae4e5dSmrg# The XSLT processor is often used as a standalone tool for transformations.
100466fae4e5dSmrg# It should not be assumed that this tool is used only to work with documnetation.
100476fae4e5dSmrg# When DEFAULT is not specified, --with-xsltproc assumes 'auto'.
100486fae4e5dSmrg#
100496fae4e5dSmrg# Interface to module:
100506fae4e5dSmrg# HAVE_XSLTPROC: used in makefiles to conditionally generate documentation
100516fae4e5dSmrg# XSLTPROC:	 returns the path of the xsltproc program found
100526fae4e5dSmrg#		 returns the path set by the user in the environment
100536fae4e5dSmrg# --with-xsltproc: 'yes' user instructs the module to use xsltproc
100546fae4e5dSmrg#		  'no' user instructs the module not to use xsltproc
100556fae4e5dSmrg# have_xsltproc: returns yes if xsltproc found in PATH or no
100566fae4e5dSmrg#
100576fae4e5dSmrg# If the user sets the value of XSLTPROC, AC_PATH_PROG skips testing the path.
100586fae4e5dSmrg#
100596fae4e5dSmrgAC_DEFUN([XORG_WITH_XSLTPROC],[
100606fae4e5dSmrgAC_ARG_VAR([XSLTPROC], [Path to xsltproc command])
100616fae4e5dSmrg# Preserves the interface, should it be implemented later
100626fae4e5dSmrgm4_ifval([$1], [m4_warn([syntax], [Checking for xsltproc MIN-VERSION is not implemented])])
100636fae4e5dSmrgm4_define([_defopt], m4_default([$2], [auto]))
100646fae4e5dSmrgAC_ARG_WITH(xsltproc,
100656fae4e5dSmrg	AS_HELP_STRING([--with-xsltproc],
100666fae4e5dSmrg	   [Use xsltproc for the transformation of XML documents (default: ]_defopt[)]),
100676fae4e5dSmrg	   [use_xsltproc=$withval], [use_xsltproc=]_defopt)
100686fae4e5dSmrgm4_undefine([_defopt])
100696fae4e5dSmrg
100706fae4e5dSmrgif test "x$use_xsltproc" = x"auto"; then
100716fae4e5dSmrg   AC_PATH_PROG([XSLTPROC], [xsltproc])
100726fae4e5dSmrg   if test "x$XSLTPROC" = "x"; then
100736fae4e5dSmrg        AC_MSG_WARN([xsltproc not found - cannot transform XML documents])
100746fae4e5dSmrg	have_xsltproc=no
100756fae4e5dSmrg   else
100766fae4e5dSmrg        have_xsltproc=yes
100776fae4e5dSmrg   fi
100786fae4e5dSmrgelif test "x$use_xsltproc" = x"yes" ; then
100796fae4e5dSmrg   AC_PATH_PROG([XSLTPROC], [xsltproc])
100806fae4e5dSmrg   if test "x$XSLTPROC" = "x"; then
100816fae4e5dSmrg        AC_MSG_ERROR([--with-xsltproc=yes specified but xsltproc not found in PATH])
100826fae4e5dSmrg   fi
100836fae4e5dSmrg   have_xsltproc=yes
100846fae4e5dSmrgelif test "x$use_xsltproc" = x"no" ; then
100856fae4e5dSmrg   if test "x$XSLTPROC" != "x"; then
100866fae4e5dSmrg      AC_MSG_WARN([ignoring XSLTPROC environment variable since --with-xsltproc=no was specified])
100876fae4e5dSmrg   fi
100886fae4e5dSmrg   have_xsltproc=no
100896fae4e5dSmrgelse
100906fae4e5dSmrg   AC_MSG_ERROR([--with-xsltproc expects 'yes' or 'no'])
100916fae4e5dSmrgfi
100921f0ac6a5Smrg
100936fae4e5dSmrgAM_CONDITIONAL([HAVE_XSLTPROC], [test "$have_xsltproc" = yes])
100946fae4e5dSmrg]) # XORG_WITH_XSLTPROC
100951f0ac6a5Smrg
100966fae4e5dSmrg# XORG_WITH_PERL([MIN-VERSION], [DEFAULT])
100976fae4e5dSmrg# ----------------------------------------
100986fae4e5dSmrg# Minimum version: 1.15.0
100996fae4e5dSmrg#
101006fae4e5dSmrg# PERL (Practical Extraction and Report Language) is a language optimized for
101016fae4e5dSmrg# scanning arbitrary text files, extracting information from those text files,
101026fae4e5dSmrg# and printing reports based on that information.
101036fae4e5dSmrg#
101046fae4e5dSmrg# When DEFAULT is not specified, --with-perl assumes 'auto'.
101056fae4e5dSmrg#
101066fae4e5dSmrg# Interface to module:
101076fae4e5dSmrg# HAVE_PERL: used in makefiles to conditionally scan text files
101086fae4e5dSmrg# PERL:	     returns the path of the perl program found
101096fae4e5dSmrg#	     returns the path set by the user in the environment
101106fae4e5dSmrg# --with-perl: 'yes' user instructs the module to use perl
101116fae4e5dSmrg#	       'no' user instructs the module not to use perl
101126fae4e5dSmrg# have_perl: returns yes if perl found in PATH or no
101136fae4e5dSmrg#
101146fae4e5dSmrg# If the user sets the value of PERL, AC_PATH_PROG skips testing the path.
101156fae4e5dSmrg#
101166fae4e5dSmrgAC_DEFUN([XORG_WITH_PERL],[
101176fae4e5dSmrgAC_ARG_VAR([PERL], [Path to perl command])
101186fae4e5dSmrg# Preserves the interface, should it be implemented later
101196fae4e5dSmrgm4_ifval([$1], [m4_warn([syntax], [Checking for perl MIN-VERSION is not implemented])])
101206fae4e5dSmrgm4_define([_defopt], m4_default([$2], [auto]))
101216fae4e5dSmrgAC_ARG_WITH(perl,
101226fae4e5dSmrg	AS_HELP_STRING([--with-perl],
101236fae4e5dSmrg	   [Use perl for extracting information from files (default: ]_defopt[)]),
101246fae4e5dSmrg	   [use_perl=$withval], [use_perl=]_defopt)
101256fae4e5dSmrgm4_undefine([_defopt])
101266fae4e5dSmrg
101276fae4e5dSmrgif test "x$use_perl" = x"auto"; then
101286fae4e5dSmrg   AC_PATH_PROG([PERL], [perl])
101296fae4e5dSmrg   if test "x$PERL" = "x"; then
101306fae4e5dSmrg        AC_MSG_WARN([perl not found - cannot extract information and report])
101316fae4e5dSmrg	have_perl=no
101326fae4e5dSmrg   else
101336fae4e5dSmrg        have_perl=yes
101346fae4e5dSmrg   fi
101356fae4e5dSmrgelif test "x$use_perl" = x"yes" ; then
101366fae4e5dSmrg   AC_PATH_PROG([PERL], [perl])
101376fae4e5dSmrg   if test "x$PERL" = "x"; then
101386fae4e5dSmrg        AC_MSG_ERROR([--with-perl=yes specified but perl not found in PATH])
101396fae4e5dSmrg   fi
101406fae4e5dSmrg   have_perl=yes
101416fae4e5dSmrgelif test "x$use_perl" = x"no" ; then
101426fae4e5dSmrg   if test "x$PERL" != "x"; then
101436fae4e5dSmrg      AC_MSG_WARN([ignoring PERL environment variable since --with-perl=no was specified])
101446fae4e5dSmrg   fi
101456fae4e5dSmrg   have_perl=no
101466fae4e5dSmrgelse
101476fae4e5dSmrg   AC_MSG_ERROR([--with-perl expects 'yes' or 'no'])
101486fae4e5dSmrgfi
101491f0ac6a5Smrg
101506fae4e5dSmrgAM_CONDITIONAL([HAVE_PERL], [test "$have_perl" = yes])
101516fae4e5dSmrg]) # XORG_WITH_PERL
101521f0ac6a5Smrg
101536fae4e5dSmrg# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT])
101546fae4e5dSmrg# ----------------
101556fae4e5dSmrg# Minimum version: 1.5.0
101566fae4e5dSmrg# Minimum version for optional DEFAULT argument: 1.11.0
101576fae4e5dSmrg#
101586fae4e5dSmrg# Documentation tools are not always available on all platforms and sometimes
101596fae4e5dSmrg# not at the appropriate level. This macro enables a module to test for the
101606fae4e5dSmrg# presence of the tool and obtain it's path in separate variables. Coupled with
101616fae4e5dSmrg# the --with-asciidoc option, it allows maximum flexibilty in making decisions
101626fae4e5dSmrg# as whether or not to use the asciidoc package. When DEFAULT is not specified,
101636fae4e5dSmrg# --with-asciidoc assumes 'auto'.
101646fae4e5dSmrg#
101656fae4e5dSmrg# Interface to module:
101666fae4e5dSmrg# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation
101676fae4e5dSmrg# ASCIIDOC:	 returns the path of the asciidoc program found
101686fae4e5dSmrg#		 returns the path set by the user in the environment
101696fae4e5dSmrg# --with-asciidoc: 'yes' user instructs the module to use asciidoc
101706fae4e5dSmrg#		  'no' user instructs the module not to use asciidoc
101716fae4e5dSmrg#
101726fae4e5dSmrg# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path.
101736fae4e5dSmrg#
101746fae4e5dSmrgAC_DEFUN([XORG_WITH_ASCIIDOC],[
101756fae4e5dSmrgAC_ARG_VAR([ASCIIDOC], [Path to asciidoc command])
101766fae4e5dSmrgm4_define([_defopt], m4_default([$2], [auto]))
101776fae4e5dSmrgAC_ARG_WITH(asciidoc,
101786fae4e5dSmrg	AS_HELP_STRING([--with-asciidoc],
101796fae4e5dSmrg	   [Use asciidoc to regenerate documentation (default: ]_defopt[)]),
101806fae4e5dSmrg	   [use_asciidoc=$withval], [use_asciidoc=]_defopt)
101816fae4e5dSmrgm4_undefine([_defopt])
101821f0ac6a5Smrg
101836fae4e5dSmrgif test "x$use_asciidoc" = x"auto"; then
101846fae4e5dSmrg   AC_PATH_PROG([ASCIIDOC], [asciidoc])
101856fae4e5dSmrg   if test "x$ASCIIDOC" = "x"; then
101866fae4e5dSmrg        AC_MSG_WARN([asciidoc not found - documentation targets will be skipped])
101876fae4e5dSmrg	have_asciidoc=no
101886fae4e5dSmrg   else
101896fae4e5dSmrg        have_asciidoc=yes
101906fae4e5dSmrg   fi
101916fae4e5dSmrgelif test "x$use_asciidoc" = x"yes" ; then
101926fae4e5dSmrg   AC_PATH_PROG([ASCIIDOC], [asciidoc])
101936fae4e5dSmrg   if test "x$ASCIIDOC" = "x"; then
101946fae4e5dSmrg        AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH])
101956fae4e5dSmrg   fi
101966fae4e5dSmrg   have_asciidoc=yes
101976fae4e5dSmrgelif test "x$use_asciidoc" = x"no" ; then
101986fae4e5dSmrg   if test "x$ASCIIDOC" != "x"; then
101996fae4e5dSmrg      AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified])
102006fae4e5dSmrg   fi
102016fae4e5dSmrg   have_asciidoc=no
102026fae4e5dSmrgelse
102036fae4e5dSmrg   AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no'])
102046fae4e5dSmrgfi
102056fae4e5dSmrgm4_ifval([$1],
102066fae4e5dSmrg[if test "$have_asciidoc" = yes; then
102076fae4e5dSmrg    # scrape the asciidoc version
102086fae4e5dSmrg    AC_MSG_CHECKING([the asciidoc version])
102096fae4e5dSmrg    asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2`
102106fae4e5dSmrg    AC_MSG_RESULT([$asciidoc_version])
102116fae4e5dSmrg    AS_VERSION_COMPARE([$asciidoc_version], [$1],
102126fae4e5dSmrg        [if test "x$use_asciidoc" = xauto; then
102136fae4e5dSmrg            AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed])
102146fae4e5dSmrg            have_asciidoc=no
102156fae4e5dSmrg        else
102166fae4e5dSmrg            AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed])
102176fae4e5dSmrg        fi])
102186fae4e5dSmrgfi])
102196fae4e5dSmrgAM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes])
102206fae4e5dSmrg]) # XORG_WITH_ASCIIDOC
102211f0ac6a5Smrg
102226fae4e5dSmrg# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT])
102236fae4e5dSmrg# --------------------------------
102246fae4e5dSmrg# Minimum version: 1.5.0
102256fae4e5dSmrg# Minimum version for optional DEFAULT argument: 1.11.0
102266fae4e5dSmrg#
102276fae4e5dSmrg# Documentation tools are not always available on all platforms and sometimes
102286fae4e5dSmrg# not at the appropriate level. This macro enables a module to test for the
102296fae4e5dSmrg# presence of the tool and obtain it's path in separate variables. Coupled with
102306fae4e5dSmrg# the --with-doxygen option, it allows maximum flexibilty in making decisions
102316fae4e5dSmrg# as whether or not to use the doxygen package. When DEFAULT is not specified,
102326fae4e5dSmrg# --with-doxygen assumes 'auto'.
102336fae4e5dSmrg#
102346fae4e5dSmrg# Interface to module:
102356fae4e5dSmrg# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation
102366fae4e5dSmrg# DOXYGEN:	 returns the path of the doxygen program found
102376fae4e5dSmrg#		 returns the path set by the user in the environment
102386fae4e5dSmrg# --with-doxygen: 'yes' user instructs the module to use doxygen
102396fae4e5dSmrg#		  'no' user instructs the module not to use doxygen
102406fae4e5dSmrg#
102416fae4e5dSmrg# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path.
102426fae4e5dSmrg#
102436fae4e5dSmrgAC_DEFUN([XORG_WITH_DOXYGEN],[
102446fae4e5dSmrgAC_ARG_VAR([DOXYGEN], [Path to doxygen command])
102456fae4e5dSmrgm4_define([_defopt], m4_default([$2], [auto]))
102466fae4e5dSmrgAC_ARG_WITH(doxygen,
102476fae4e5dSmrg	AS_HELP_STRING([--with-doxygen],
102486fae4e5dSmrg	   [Use doxygen to regenerate documentation (default: ]_defopt[)]),
102496fae4e5dSmrg	   [use_doxygen=$withval], [use_doxygen=]_defopt)
102506fae4e5dSmrgm4_undefine([_defopt])
102511f0ac6a5Smrg
102526fae4e5dSmrgif test "x$use_doxygen" = x"auto"; then
102536fae4e5dSmrg   AC_PATH_PROG([DOXYGEN], [doxygen])
102546fae4e5dSmrg   if test "x$DOXYGEN" = "x"; then
102556fae4e5dSmrg        AC_MSG_WARN([doxygen not found - documentation targets will be skipped])
102566fae4e5dSmrg	have_doxygen=no
102576fae4e5dSmrg   else
102586fae4e5dSmrg        have_doxygen=yes
102596fae4e5dSmrg   fi
102606fae4e5dSmrgelif test "x$use_doxygen" = x"yes" ; then
102616fae4e5dSmrg   AC_PATH_PROG([DOXYGEN], [doxygen])
102626fae4e5dSmrg   if test "x$DOXYGEN" = "x"; then
102636fae4e5dSmrg        AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH])
102646fae4e5dSmrg   fi
102656fae4e5dSmrg   have_doxygen=yes
102666fae4e5dSmrgelif test "x$use_doxygen" = x"no" ; then
102676fae4e5dSmrg   if test "x$DOXYGEN" != "x"; then
102686fae4e5dSmrg      AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified])
102696fae4e5dSmrg   fi
102706fae4e5dSmrg   have_doxygen=no
102716fae4e5dSmrgelse
102726fae4e5dSmrg   AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no'])
102736fae4e5dSmrgfi
102746fae4e5dSmrgm4_ifval([$1],
102756fae4e5dSmrg[if test "$have_doxygen" = yes; then
102766fae4e5dSmrg    # scrape the doxygen version
102776fae4e5dSmrg    AC_MSG_CHECKING([the doxygen version])
102786fae4e5dSmrg    doxygen_version=`$DOXYGEN --version 2>/dev/null`
102796fae4e5dSmrg    AC_MSG_RESULT([$doxygen_version])
102806fae4e5dSmrg    AS_VERSION_COMPARE([$doxygen_version], [$1],
102816fae4e5dSmrg        [if test "x$use_doxygen" = xauto; then
102826fae4e5dSmrg            AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed])
102836fae4e5dSmrg            have_doxygen=no
102846fae4e5dSmrg        else
102856fae4e5dSmrg            AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed])
102866fae4e5dSmrg        fi])
102876fae4e5dSmrgfi])
102886fae4e5dSmrgAM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes])
102896fae4e5dSmrg]) # XORG_WITH_DOXYGEN
102909c9ff80cSmrg
102916fae4e5dSmrg# XORG_WITH_GROFF([DEFAULT])
102926fae4e5dSmrg# ----------------
102936fae4e5dSmrg# Minimum version: 1.6.0
102946fae4e5dSmrg# Minimum version for optional DEFAULT argument: 1.11.0
102956fae4e5dSmrg#
102966fae4e5dSmrg# Documentation tools are not always available on all platforms and sometimes
102976fae4e5dSmrg# not at the appropriate level. This macro enables a module to test for the
102986fae4e5dSmrg# presence of the tool and obtain it's path in separate variables. Coupled with
102996fae4e5dSmrg# the --with-groff option, it allows maximum flexibilty in making decisions
103006fae4e5dSmrg# as whether or not to use the groff package. When DEFAULT is not specified,
103016fae4e5dSmrg# --with-groff assumes 'auto'.
103026fae4e5dSmrg#
103036fae4e5dSmrg# Interface to module:
103046fae4e5dSmrg# HAVE_GROFF:	 used in makefiles to conditionally generate documentation
103056fae4e5dSmrg# HAVE_GROFF_MM: the memorandum macros (-mm) package
103066fae4e5dSmrg# HAVE_GROFF_MS: the -ms macros package
103076fae4e5dSmrg# GROFF:	 returns the path of the groff program found
103086fae4e5dSmrg#		 returns the path set by the user in the environment
103096fae4e5dSmrg# --with-groff:	 'yes' user instructs the module to use groff
103106fae4e5dSmrg#		 'no' user instructs the module not to use groff
103116fae4e5dSmrg#
103126fae4e5dSmrg# Added in version 1.9.0:
103136fae4e5dSmrg# HAVE_GROFF_HTML: groff has dependencies to output HTML format:
103146fae4e5dSmrg#		   pnmcut pnmcrop pnmtopng pnmtops from the netpbm package.
103156fae4e5dSmrg#		   psselect from the psutils package.
103166fae4e5dSmrg#		   the ghostcript package. Refer to the grohtml man pages
103176fae4e5dSmrg#
103186fae4e5dSmrg# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path.
103196fae4e5dSmrg#
103206fae4e5dSmrg# OS and distros often splits groff in a basic and full package, the former
103216fae4e5dSmrg# having the groff program and the later having devices, fonts and macros
103226fae4e5dSmrg# Checking for the groff executable is not enough.
103236fae4e5dSmrg#
103246fae4e5dSmrg# If macros are missing, we cannot assume that groff is useless, so we don't
103256fae4e5dSmrg# unset HAVE_GROFF or GROFF env variables.
103266fae4e5dSmrg# HAVE_GROFF_?? can never be true while HAVE_GROFF is false.
103276fae4e5dSmrg#
103286fae4e5dSmrgAC_DEFUN([XORG_WITH_GROFF],[
103296fae4e5dSmrgAC_ARG_VAR([GROFF], [Path to groff command])
103306fae4e5dSmrgm4_define([_defopt], m4_default([$1], [auto]))
103316fae4e5dSmrgAC_ARG_WITH(groff,
103326fae4e5dSmrg	AS_HELP_STRING([--with-groff],
103336fae4e5dSmrg	   [Use groff to regenerate documentation (default: ]_defopt[)]),
103346fae4e5dSmrg	   [use_groff=$withval], [use_groff=]_defopt)
103356fae4e5dSmrgm4_undefine([_defopt])
103369c9ff80cSmrg
103376fae4e5dSmrgif test "x$use_groff" = x"auto"; then
103386fae4e5dSmrg   AC_PATH_PROG([GROFF], [groff])
103396fae4e5dSmrg   if test "x$GROFF" = "x"; then
103406fae4e5dSmrg        AC_MSG_WARN([groff not found - documentation targets will be skipped])
103416fae4e5dSmrg	have_groff=no
103426fae4e5dSmrg   else
103436fae4e5dSmrg        have_groff=yes
103446fae4e5dSmrg   fi
103456fae4e5dSmrgelif test "x$use_groff" = x"yes" ; then
103466fae4e5dSmrg   AC_PATH_PROG([GROFF], [groff])
103476fae4e5dSmrg   if test "x$GROFF" = "x"; then
103486fae4e5dSmrg        AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH])
103496fae4e5dSmrg   fi
103506fae4e5dSmrg   have_groff=yes
103516fae4e5dSmrgelif test "x$use_groff" = x"no" ; then
103526fae4e5dSmrg   if test "x$GROFF" != "x"; then
103536fae4e5dSmrg      AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified])
103546fae4e5dSmrg   fi
103556fae4e5dSmrg   have_groff=no
103566fae4e5dSmrgelse
103576fae4e5dSmrg   AC_MSG_ERROR([--with-groff expects 'yes' or 'no'])
103586fae4e5dSmrgfi
103591f0ac6a5Smrg
103606fae4e5dSmrg# We have groff, test for the presence of the macro packages
103616fae4e5dSmrgif test "x$have_groff" = x"yes"; then
103626fae4e5dSmrg    AC_MSG_CHECKING([for ${GROFF} -ms macros])
103636fae4e5dSmrg    if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then
103646fae4e5dSmrg        groff_ms_works=yes
103656fae4e5dSmrg    else
103666fae4e5dSmrg        groff_ms_works=no
103676fae4e5dSmrg    fi
103686fae4e5dSmrg    AC_MSG_RESULT([$groff_ms_works])
103696fae4e5dSmrg    AC_MSG_CHECKING([for ${GROFF} -mm macros])
103706fae4e5dSmrg    if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then
103716fae4e5dSmrg        groff_mm_works=yes
103726fae4e5dSmrg    else
103736fae4e5dSmrg        groff_mm_works=no
103746fae4e5dSmrg    fi
103756fae4e5dSmrg    AC_MSG_RESULT([$groff_mm_works])
103766fae4e5dSmrgfi
103771f0ac6a5Smrg
103786fae4e5dSmrg# We have groff, test for HTML dependencies, one command per package
103796fae4e5dSmrgif test "x$have_groff" = x"yes"; then
103806fae4e5dSmrg   AC_PATH_PROGS(GS_PATH, [gs gswin32c])
103816fae4e5dSmrg   AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng])
103826fae4e5dSmrg   AC_PATH_PROG(PSSELECT_PATH, [psselect])
103836fae4e5dSmrg   if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then
103846fae4e5dSmrg      have_groff_html=yes
103856fae4e5dSmrg   else
103866fae4e5dSmrg      have_groff_html=no
103876fae4e5dSmrg      AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages])
103886fae4e5dSmrg   fi
103896fae4e5dSmrgfi
103901f0ac6a5Smrg
103916fae4e5dSmrg# Set Automake conditionals for Makefiles
103926fae4e5dSmrgAM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes])
103936fae4e5dSmrgAM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes])
103946fae4e5dSmrgAM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes])
103956fae4e5dSmrgAM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes])
103966fae4e5dSmrg]) # XORG_WITH_GROFF
103979c9ff80cSmrg
103986fae4e5dSmrg# XORG_WITH_FOP([MIN-VERSION], [DEFAULT])
103996fae4e5dSmrg# ---------------------------------------
104006fae4e5dSmrg# Minimum version: 1.6.0
104016fae4e5dSmrg# Minimum version for optional DEFAULT argument: 1.11.0
104026fae4e5dSmrg# Minimum version for optional MIN-VERSION argument: 1.15.0
104036fae4e5dSmrg#
104046fae4e5dSmrg# Documentation tools are not always available on all platforms and sometimes
104056fae4e5dSmrg# not at the appropriate level. This macro enables a module to test for the
104066fae4e5dSmrg# presence of the tool and obtain it's path in separate variables. Coupled with
104076fae4e5dSmrg# the --with-fop option, it allows maximum flexibilty in making decisions
104086fae4e5dSmrg# as whether or not to use the fop package. When DEFAULT is not specified,
104096fae4e5dSmrg# --with-fop assumes 'auto'.
104106fae4e5dSmrg#
104116fae4e5dSmrg# Interface to module:
104126fae4e5dSmrg# HAVE_FOP: 	used in makefiles to conditionally generate documentation
104136fae4e5dSmrg# FOP:	 	returns the path of the fop program found
104146fae4e5dSmrg#		returns the path set by the user in the environment
104156fae4e5dSmrg# --with-fop: 	'yes' user instructs the module to use fop
104166fae4e5dSmrg#		'no' user instructs the module not to use fop
104176fae4e5dSmrg#
104186fae4e5dSmrg# If the user sets the value of FOP, AC_PATH_PROG skips testing the path.
104196fae4e5dSmrg#
104206fae4e5dSmrgAC_DEFUN([XORG_WITH_FOP],[
104216fae4e5dSmrgAC_ARG_VAR([FOP], [Path to fop command])
104226fae4e5dSmrgm4_define([_defopt], m4_default([$2], [auto]))
104236fae4e5dSmrgAC_ARG_WITH(fop,
104246fae4e5dSmrg	AS_HELP_STRING([--with-fop],
104256fae4e5dSmrg	   [Use fop to regenerate documentation (default: ]_defopt[)]),
104266fae4e5dSmrg	   [use_fop=$withval], [use_fop=]_defopt)
104276fae4e5dSmrgm4_undefine([_defopt])
104289c9ff80cSmrg
104296fae4e5dSmrgif test "x$use_fop" = x"auto"; then
104306fae4e5dSmrg   AC_PATH_PROG([FOP], [fop])
104316fae4e5dSmrg   if test "x$FOP" = "x"; then
104326fae4e5dSmrg        AC_MSG_WARN([fop not found - documentation targets will be skipped])
104336fae4e5dSmrg	have_fop=no
104346fae4e5dSmrg   else
104356fae4e5dSmrg        have_fop=yes
104366fae4e5dSmrg   fi
104376fae4e5dSmrgelif test "x$use_fop" = x"yes" ; then
104386fae4e5dSmrg   AC_PATH_PROG([FOP], [fop])
104396fae4e5dSmrg   if test "x$FOP" = "x"; then
104406fae4e5dSmrg        AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH])
104416fae4e5dSmrg   fi
104426fae4e5dSmrg   have_fop=yes
104436fae4e5dSmrgelif test "x$use_fop" = x"no" ; then
104446fae4e5dSmrg   if test "x$FOP" != "x"; then
104456fae4e5dSmrg      AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified])
104466fae4e5dSmrg   fi
104476fae4e5dSmrg   have_fop=no
104486fae4e5dSmrgelse
104496fae4e5dSmrg   AC_MSG_ERROR([--with-fop expects 'yes' or 'no'])
104506fae4e5dSmrgfi
104511f0ac6a5Smrg
104526fae4e5dSmrg# Test for a minimum version of fop, if provided.
104536fae4e5dSmrgm4_ifval([$1],
104546fae4e5dSmrg[if test "$have_fop" = yes; then
104556fae4e5dSmrg    # scrape the fop version
104566fae4e5dSmrg    AC_MSG_CHECKING([for fop minimum version])
104576fae4e5dSmrg    fop_version=`$FOP -version 2>/dev/null | cut -d' ' -f3`
104586fae4e5dSmrg    AC_MSG_RESULT([$fop_version])
104596fae4e5dSmrg    AS_VERSION_COMPARE([$fop_version], [$1],
104606fae4e5dSmrg        [if test "x$use_fop" = xauto; then
104616fae4e5dSmrg            AC_MSG_WARN([fop version $fop_version found, but $1 needed])
104626fae4e5dSmrg            have_fop=no
104636fae4e5dSmrg        else
104646fae4e5dSmrg            AC_MSG_ERROR([fop version $fop_version found, but $1 needed])
104656fae4e5dSmrg        fi])
104666fae4e5dSmrgfi])
104676fae4e5dSmrgAM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes])
104686fae4e5dSmrg]) # XORG_WITH_FOP
104691f0ac6a5Smrg
104706fae4e5dSmrg# XORG_WITH_PS2PDF([DEFAULT])
104716fae4e5dSmrg# ----------------
104726fae4e5dSmrg# Minimum version: 1.6.0
104736fae4e5dSmrg# Minimum version for optional DEFAULT argument: 1.11.0
104746fae4e5dSmrg#
104756fae4e5dSmrg# Documentation tools are not always available on all platforms and sometimes
104766fae4e5dSmrg# not at the appropriate level. This macro enables a module to test for the
104776fae4e5dSmrg# presence of the tool and obtain it's path in separate variables. Coupled with
104786fae4e5dSmrg# the --with-ps2pdf option, it allows maximum flexibilty in making decisions
104796fae4e5dSmrg# as whether or not to use the ps2pdf package. When DEFAULT is not specified,
104806fae4e5dSmrg# --with-ps2pdf assumes 'auto'.
104816fae4e5dSmrg#
104826fae4e5dSmrg# Interface to module:
104836fae4e5dSmrg# HAVE_PS2PDF: 	used in makefiles to conditionally generate documentation
104846fae4e5dSmrg# PS2PDF:	returns the path of the ps2pdf program found
104856fae4e5dSmrg#		returns the path set by the user in the environment
104866fae4e5dSmrg# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf
104876fae4e5dSmrg#		 'no' user instructs the module not to use ps2pdf
104886fae4e5dSmrg#
104896fae4e5dSmrg# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path.
104906fae4e5dSmrg#
104916fae4e5dSmrgAC_DEFUN([XORG_WITH_PS2PDF],[
104926fae4e5dSmrgAC_ARG_VAR([PS2PDF], [Path to ps2pdf command])
104936fae4e5dSmrgm4_define([_defopt], m4_default([$1], [auto]))
104946fae4e5dSmrgAC_ARG_WITH(ps2pdf,
104956fae4e5dSmrg	AS_HELP_STRING([--with-ps2pdf],
104966fae4e5dSmrg	   [Use ps2pdf to regenerate documentation (default: ]_defopt[)]),
104976fae4e5dSmrg	   [use_ps2pdf=$withval], [use_ps2pdf=]_defopt)
104986fae4e5dSmrgm4_undefine([_defopt])
104991f0ac6a5Smrg
105006fae4e5dSmrgif test "x$use_ps2pdf" = x"auto"; then
105016fae4e5dSmrg   AC_PATH_PROG([PS2PDF], [ps2pdf])
105026fae4e5dSmrg   if test "x$PS2PDF" = "x"; then
105036fae4e5dSmrg        AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped])
105046fae4e5dSmrg	have_ps2pdf=no
105056fae4e5dSmrg   else
105066fae4e5dSmrg        have_ps2pdf=yes
105076fae4e5dSmrg   fi
105086fae4e5dSmrgelif test "x$use_ps2pdf" = x"yes" ; then
105096fae4e5dSmrg   AC_PATH_PROG([PS2PDF], [ps2pdf])
105106fae4e5dSmrg   if test "x$PS2PDF" = "x"; then
105116fae4e5dSmrg        AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH])
105126fae4e5dSmrg   fi
105136fae4e5dSmrg   have_ps2pdf=yes
105146fae4e5dSmrgelif test "x$use_ps2pdf" = x"no" ; then
105156fae4e5dSmrg   if test "x$PS2PDF" != "x"; then
105166fae4e5dSmrg      AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified])
105176fae4e5dSmrg   fi
105186fae4e5dSmrg   have_ps2pdf=no
105196fae4e5dSmrgelse
105206fae4e5dSmrg   AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no'])
105216fae4e5dSmrgfi
105226fae4e5dSmrgAM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes])
105236fae4e5dSmrg]) # XORG_WITH_PS2PDF
10524e5410a46Smrg
105256fae4e5dSmrg# XORG_ENABLE_DOCS (enable_docs=yes)
105266fae4e5dSmrg# ----------------
105276fae4e5dSmrg# Minimum version: 1.6.0
105286fae4e5dSmrg#
105296fae4e5dSmrg# Documentation tools are not always available on all platforms and sometimes
105306fae4e5dSmrg# not at the appropriate level. This macro enables a builder to skip all
105316fae4e5dSmrg# documentation targets except traditional man pages.
105326fae4e5dSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides
105336fae4e5dSmrg# maximum flexibilty in controlling documentation building.
105346fae4e5dSmrg# Refer to:
105356fae4e5dSmrg# XORG_WITH_XMLTO         --with-xmlto
105366fae4e5dSmrg# XORG_WITH_ASCIIDOC      --with-asciidoc
105376fae4e5dSmrg# XORG_WITH_DOXYGEN       --with-doxygen
105386fae4e5dSmrg# XORG_WITH_FOP           --with-fop
105396fae4e5dSmrg# XORG_WITH_GROFF         --with-groff
105406fae4e5dSmrg# XORG_WITH_PS2PDF        --with-ps2pdf
105416fae4e5dSmrg#
105426fae4e5dSmrg# Interface to module:
105436fae4e5dSmrg# ENABLE_DOCS: 	  used in makefiles to conditionally generate documentation
105446fae4e5dSmrg# --enable-docs: 'yes' user instructs the module to generate docs
105456fae4e5dSmrg#		 'no' user instructs the module not to generate docs
105466fae4e5dSmrg# parm1:	specify the default value, yes or no.
105476fae4e5dSmrg#
105486fae4e5dSmrgAC_DEFUN([XORG_ENABLE_DOCS],[
105496fae4e5dSmrgm4_define([docs_default], m4_default([$1], [yes]))
105506fae4e5dSmrgAC_ARG_ENABLE(docs,
105516fae4e5dSmrg	AS_HELP_STRING([--enable-docs],
105526fae4e5dSmrg	   [Enable building the documentation (default: ]docs_default[)]),
105536fae4e5dSmrg	   [build_docs=$enableval], [build_docs=]docs_default)
105546fae4e5dSmrgm4_undefine([docs_default])
105556fae4e5dSmrgAM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes])
105566fae4e5dSmrgAC_MSG_CHECKING([whether to build documentation])
105576fae4e5dSmrgAC_MSG_RESULT([$build_docs])
105586fae4e5dSmrg]) # XORG_ENABLE_DOCS
10559e5410a46Smrg
105606fae4e5dSmrg# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes)
105616fae4e5dSmrg# ----------------
105626fae4e5dSmrg# Minimum version: 1.6.0
105636fae4e5dSmrg#
105646fae4e5dSmrg# This macro enables a builder to skip all developer documentation.
105656fae4e5dSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides
105666fae4e5dSmrg# maximum flexibilty in controlling documentation building.
105676fae4e5dSmrg# Refer to:
105686fae4e5dSmrg# XORG_WITH_XMLTO         --with-xmlto
105696fae4e5dSmrg# XORG_WITH_ASCIIDOC      --with-asciidoc
105706fae4e5dSmrg# XORG_WITH_DOXYGEN       --with-doxygen
105716fae4e5dSmrg# XORG_WITH_FOP           --with-fop
105726fae4e5dSmrg# XORG_WITH_GROFF         --with-groff
105736fae4e5dSmrg# XORG_WITH_PS2PDF        --with-ps2pdf
105746fae4e5dSmrg#
105756fae4e5dSmrg# Interface to module:
105766fae4e5dSmrg# ENABLE_DEVEL_DOCS:	used in makefiles to conditionally generate developer docs
105776fae4e5dSmrg# --enable-devel-docs:	'yes' user instructs the module to generate developer docs
105786fae4e5dSmrg#			'no' user instructs the module not to generate developer docs
105796fae4e5dSmrg# parm1:		specify the default value, yes or no.
105806fae4e5dSmrg#
105816fae4e5dSmrgAC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[
105826fae4e5dSmrgm4_define([devel_default], m4_default([$1], [yes]))
105836fae4e5dSmrgAC_ARG_ENABLE(devel-docs,
105846fae4e5dSmrg	AS_HELP_STRING([--enable-devel-docs],
105856fae4e5dSmrg	   [Enable building the developer documentation (default: ]devel_default[)]),
105866fae4e5dSmrg	   [build_devel_docs=$enableval], [build_devel_docs=]devel_default)
105876fae4e5dSmrgm4_undefine([devel_default])
105886fae4e5dSmrgAM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes])
105896fae4e5dSmrgAC_MSG_CHECKING([whether to build developer documentation])
105906fae4e5dSmrgAC_MSG_RESULT([$build_devel_docs])
105916fae4e5dSmrg]) # XORG_ENABLE_DEVEL_DOCS
10592e5410a46Smrg
105936fae4e5dSmrg# XORG_ENABLE_SPECS (enable_specs=yes)
105946fae4e5dSmrg# ----------------
105956fae4e5dSmrg# Minimum version: 1.6.0
105966fae4e5dSmrg#
105976fae4e5dSmrg# This macro enables a builder to skip all functional specification targets.
105986fae4e5dSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides
105996fae4e5dSmrg# maximum flexibilty in controlling documentation building.
106006fae4e5dSmrg# Refer to:
106016fae4e5dSmrg# XORG_WITH_XMLTO         --with-xmlto
106026fae4e5dSmrg# XORG_WITH_ASCIIDOC      --with-asciidoc
106036fae4e5dSmrg# XORG_WITH_DOXYGEN       --with-doxygen
106046fae4e5dSmrg# XORG_WITH_FOP           --with-fop
106056fae4e5dSmrg# XORG_WITH_GROFF         --with-groff
106066fae4e5dSmrg# XORG_WITH_PS2PDF        --with-ps2pdf
106076fae4e5dSmrg#
106086fae4e5dSmrg# Interface to module:
106096fae4e5dSmrg# ENABLE_SPECS:		used in makefiles to conditionally generate specs
106106fae4e5dSmrg# --enable-specs:	'yes' user instructs the module to generate specs
106116fae4e5dSmrg#			'no' user instructs the module not to generate specs
106126fae4e5dSmrg# parm1:		specify the default value, yes or no.
106136fae4e5dSmrg#
106146fae4e5dSmrgAC_DEFUN([XORG_ENABLE_SPECS],[
106156fae4e5dSmrgm4_define([spec_default], m4_default([$1], [yes]))
106166fae4e5dSmrgAC_ARG_ENABLE(specs,
106176fae4e5dSmrg	AS_HELP_STRING([--enable-specs],
106186fae4e5dSmrg	   [Enable building the specs (default: ]spec_default[)]),
106196fae4e5dSmrg	   [build_specs=$enableval], [build_specs=]spec_default)
106206fae4e5dSmrgm4_undefine([spec_default])
106216fae4e5dSmrgAM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes])
106226fae4e5dSmrgAC_MSG_CHECKING([whether to build functional specifications])
106236fae4e5dSmrgAC_MSG_RESULT([$build_specs])
106246fae4e5dSmrg]) # XORG_ENABLE_SPECS
10625e5410a46Smrg
106266fae4e5dSmrg# XORG_ENABLE_UNIT_TESTS (enable_unit_tests=auto)
106276fae4e5dSmrg# ----------------------------------------------
106286fae4e5dSmrg# Minimum version: 1.13.0
106296fae4e5dSmrg#
106306fae4e5dSmrg# This macro enables a builder to enable/disable unit testing
106316fae4e5dSmrg# It makes no assumption about the test cases implementation
106326fae4e5dSmrg# Test cases may or may not use Automake "Support for test suites"
106336fae4e5dSmrg# They may or may not use the software utility library GLib
106346fae4e5dSmrg#
106356fae4e5dSmrg# When used in conjunction with XORG_WITH_GLIB, use both AM_CONDITIONAL
106366fae4e5dSmrg# ENABLE_UNIT_TESTS and HAVE_GLIB. Not all unit tests may use glib.
106376fae4e5dSmrg# The variable enable_unit_tests is used by other macros in this file.
106386fae4e5dSmrg#
106396fae4e5dSmrg# Interface to module:
106406fae4e5dSmrg# ENABLE_UNIT_TESTS:	used in makefiles to conditionally build tests
106416fae4e5dSmrg# enable_unit_tests:    used in configure.ac for additional configuration
106426fae4e5dSmrg# --enable-unit-tests:	'yes' user instructs the module to build tests
106436fae4e5dSmrg#			'no' user instructs the module not to build tests
106446fae4e5dSmrg# parm1:		specify the default value, yes or no.
106456fae4e5dSmrg#
106466fae4e5dSmrgAC_DEFUN([XORG_ENABLE_UNIT_TESTS],[
106476fae4e5dSmrgAC_BEFORE([$0], [XORG_WITH_GLIB])
106486fae4e5dSmrgAC_BEFORE([$0], [XORG_LD_WRAP])
106496fae4e5dSmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS])
106506fae4e5dSmrgm4_define([_defopt], m4_default([$1], [auto]))
106516fae4e5dSmrgAC_ARG_ENABLE(unit-tests, AS_HELP_STRING([--enable-unit-tests],
106526fae4e5dSmrg	[Enable building unit test cases (default: ]_defopt[)]),
106536fae4e5dSmrg	[enable_unit_tests=$enableval], [enable_unit_tests=]_defopt)
106546fae4e5dSmrgm4_undefine([_defopt])
106556fae4e5dSmrgAM_CONDITIONAL(ENABLE_UNIT_TESTS, [test "x$enable_unit_tests" != xno])
106566fae4e5dSmrgAC_MSG_CHECKING([whether to build unit test cases])
106576fae4e5dSmrgAC_MSG_RESULT([$enable_unit_tests])
106586fae4e5dSmrg]) # XORG_ENABLE_UNIT_TESTS
106596fae4e5dSmrg
106606fae4e5dSmrg# XORG_WITH_GLIB([MIN-VERSION], [DEFAULT])
106616fae4e5dSmrg# ----------------------------------------
106626fae4e5dSmrg# Minimum version: 1.13.0
106636fae4e5dSmrg#
106646fae4e5dSmrg# GLib is a library which provides advanced data structures and functions.
106656fae4e5dSmrg# This macro enables a module to test for the presence of Glib.
106666fae4e5dSmrg#
106676fae4e5dSmrg# When used with ENABLE_UNIT_TESTS, it is assumed GLib is used for unit testing.
106686fae4e5dSmrg# Otherwise the value of $enable_unit_tests is blank.
106696fae4e5dSmrg#
106706fae4e5dSmrg# Interface to module:
106716fae4e5dSmrg# HAVE_GLIB: used in makefiles to conditionally build targets
106726fae4e5dSmrg# with_glib: used in configure.ac to know if GLib has been found
106736fae4e5dSmrg# --with-glib:	'yes' user instructs the module to use glib
106746fae4e5dSmrg#		'no' user instructs the module not to use glib
106756fae4e5dSmrg#
106766fae4e5dSmrgAC_DEFUN([XORG_WITH_GLIB],[
106776fae4e5dSmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG])
106786fae4e5dSmrgm4_define([_defopt], m4_default([$2], [auto]))
106796fae4e5dSmrgAC_ARG_WITH(glib, AS_HELP_STRING([--with-glib],
106806fae4e5dSmrg	[Use GLib library for unit testing (default: ]_defopt[)]),
106816fae4e5dSmrg	[with_glib=$withval], [with_glib=]_defopt)
106826fae4e5dSmrgm4_undefine([_defopt])
106836fae4e5dSmrg
106846fae4e5dSmrghave_glib=no
106856fae4e5dSmrg# Do not probe GLib if user explicitly disabled unit testing
106866fae4e5dSmrgif test "x$enable_unit_tests" != x"no"; then
106876fae4e5dSmrg  # Do not probe GLib if user explicitly disabled it
106886fae4e5dSmrg  if test "x$with_glib" != x"no"; then
106896fae4e5dSmrg    m4_ifval(
106906fae4e5dSmrg      [$1],
106916fae4e5dSmrg      [PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $1], [have_glib=yes], [have_glib=no])],
106926fae4e5dSmrg      [PKG_CHECK_MODULES([GLIB], [glib-2.0], [have_glib=yes], [have_glib=no])]
106936fae4e5dSmrg    )
106946fae4e5dSmrg  fi
106956fae4e5dSmrgfi
106969c9ff80cSmrg
106976fae4e5dSmrg# Not having GLib when unit testing has been explicitly requested is an error
106986fae4e5dSmrgif test "x$enable_unit_tests" = x"yes"; then
106996fae4e5dSmrg  if test "x$have_glib" = x"no"; then
107006fae4e5dSmrg    AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found])
107016fae4e5dSmrg  fi
107026fae4e5dSmrgfi
107039c9ff80cSmrg
107046fae4e5dSmrg# Having unit testing disabled when GLib has been explicitly requested is an error
107056fae4e5dSmrgif test "x$enable_unit_tests" = x"no"; then
107066fae4e5dSmrg  if test "x$with_glib" = x"yes"; then
107076fae4e5dSmrg    AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found])
107086fae4e5dSmrg  fi
107096fae4e5dSmrgfi
107101f0ac6a5Smrg
107116fae4e5dSmrg# Not having GLib when it has been explicitly requested is an error
107126fae4e5dSmrgif test "x$with_glib" = x"yes"; then
107136fae4e5dSmrg  if test "x$have_glib" = x"no"; then
107146fae4e5dSmrg    AC_MSG_ERROR([--with-glib=yes specified but glib-2.0 not found])
107156fae4e5dSmrg  fi
107166fae4e5dSmrgfi
107171f0ac6a5Smrg
107186fae4e5dSmrgAM_CONDITIONAL([HAVE_GLIB], [test "$have_glib" = yes])
107196fae4e5dSmrg]) # XORG_WITH_GLIB
107201f0ac6a5Smrg
107216fae4e5dSmrg# XORG_LD_WRAP([required|optional])
107226fae4e5dSmrg# ---------------------------------
107236fae4e5dSmrg# Minimum version: 1.13.0
107246fae4e5dSmrg#
107256fae4e5dSmrg# Check if linker supports -wrap, passed via compiler flags
107266fae4e5dSmrg#
107276fae4e5dSmrg# When used with ENABLE_UNIT_TESTS, it is assumed -wrap is used for unit testing.
107286fae4e5dSmrg# Otherwise the value of $enable_unit_tests is blank.
107296fae4e5dSmrg#
107306fae4e5dSmrg# Argument added in 1.16.0 - default is "required", to match existing behavior
107316fae4e5dSmrg# of returning an error if enable_unit_tests is yes, and ld -wrap is not
107326fae4e5dSmrg# available, an argument of "optional" allows use when some unit tests require
107336fae4e5dSmrg# ld -wrap and others do not.
107346fae4e5dSmrg#
107356fae4e5dSmrgAC_DEFUN([XORG_LD_WRAP],[
107366fae4e5dSmrgXORG_CHECK_LINKER_FLAGS([-Wl,-wrap,exit],[have_ld_wrap=yes],[have_ld_wrap=no],
107376fae4e5dSmrg    [AC_LANG_PROGRAM([#include <stdlib.h>
107386fae4e5dSmrg                      void __wrap_exit(int status) { return; }],
107396fae4e5dSmrg                     [exit(0);])])
107406fae4e5dSmrg# Not having ld wrap when unit testing has been explicitly requested is an error
107416fae4e5dSmrgif test "x$enable_unit_tests" = x"yes" -a "x$1" != "xoptional"; then
107426fae4e5dSmrg  if test "x$have_ld_wrap" = x"no"; then
107436fae4e5dSmrg    AC_MSG_ERROR([--enable-unit-tests=yes specified but ld -wrap support is not available])
107446fae4e5dSmrg  fi
107456fae4e5dSmrgfi
107466fae4e5dSmrgAM_CONDITIONAL([HAVE_LD_WRAP], [test "$have_ld_wrap" = yes])
107476fae4e5dSmrg#
107486fae4e5dSmrg]) # XORG_LD_WRAP
107499c9ff80cSmrg
107506fae4e5dSmrg# XORG_CHECK_LINKER_FLAGS
107516fae4e5dSmrg# -----------------------
107526fae4e5dSmrg# SYNOPSIS
107536fae4e5dSmrg#
107546fae4e5dSmrg#   XORG_CHECK_LINKER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE], [PROGRAM-SOURCE])
107556fae4e5dSmrg#
107566fae4e5dSmrg# DESCRIPTION
107576fae4e5dSmrg#
107586fae4e5dSmrg#   Check whether the given linker FLAGS work with the current language's
107596fae4e5dSmrg#   linker, or whether they give an error.
107606fae4e5dSmrg#
107616fae4e5dSmrg#   ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on
107626fae4e5dSmrg#   success/failure.
107636fae4e5dSmrg#
107646fae4e5dSmrg#   PROGRAM-SOURCE is the program source to link with, if needed
107656fae4e5dSmrg#
107666fae4e5dSmrg#   NOTE: Based on AX_CHECK_COMPILER_FLAGS.
107676fae4e5dSmrg#
107686fae4e5dSmrg# LICENSE
107696fae4e5dSmrg#
107706fae4e5dSmrg#   Copyright (c) 2009 Mike Frysinger <vapier@gentoo.org>
107716fae4e5dSmrg#   Copyright (c) 2009 Steven G. Johnson <stevenj@alum.mit.edu>
107726fae4e5dSmrg#   Copyright (c) 2009 Matteo Frigo
107736fae4e5dSmrg#
107746fae4e5dSmrg#   This program is free software: you can redistribute it and/or modify it
107756fae4e5dSmrg#   under the terms of the GNU General Public License as published by the
107766fae4e5dSmrg#   Free Software Foundation, either version 3 of the License, or (at your
107776fae4e5dSmrg#   option) any later version.
107786fae4e5dSmrg#
107796fae4e5dSmrg#   This program is distributed in the hope that it will be useful, but
107806fae4e5dSmrg#   WITHOUT ANY WARRANTY; without even the implied warranty of
107816fae4e5dSmrg#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
107826fae4e5dSmrg#   Public License for more details.
107836fae4e5dSmrg#
107846fae4e5dSmrg#   You should have received a copy of the GNU General Public License along
107856fae4e5dSmrg#   with this program. If not, see <http://www.gnu.org/licenses/>.
107866fae4e5dSmrg#
107876fae4e5dSmrg#   As a special exception, the respective Autoconf Macro's copyright owner
107886fae4e5dSmrg#   gives unlimited permission to copy, distribute and modify the configure
107896fae4e5dSmrg#   scripts that are the output of Autoconf when processing the Macro. You
107906fae4e5dSmrg#   need not follow the terms of the GNU General Public License when using
107916fae4e5dSmrg#   or distributing such scripts, even though portions of the text of the
107926fae4e5dSmrg#   Macro appear in them. The GNU General Public License (GPL) does govern
107936fae4e5dSmrg#   all other use of the material that constitutes the Autoconf Macro.
107946fae4e5dSmrg#
107956fae4e5dSmrg#   This special exception to the GPL applies to versions of the Autoconf
107966fae4e5dSmrg#   Macro released by the Autoconf Archive. When you make and distribute a
107976fae4e5dSmrg#   modified version of the Autoconf Macro, you may extend this special
107986fae4e5dSmrg#   exception to the GPL to apply to your modified version as well.#
107996fae4e5dSmrgAC_DEFUN([XORG_CHECK_LINKER_FLAGS],
108006fae4e5dSmrg[AC_MSG_CHECKING([whether the linker accepts $1])
108016fae4e5dSmrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname:
108026fae4e5dSmrgAS_LITERAL_IF([$1],
108036fae4e5dSmrg  [AC_CACHE_VAL(AS_TR_SH(xorg_cv_linker_flags_[$1]), [
108046fae4e5dSmrg      ax_save_FLAGS=$LDFLAGS
108056fae4e5dSmrg      LDFLAGS="$1"
108066fae4e5dSmrg      AC_LINK_IFELSE([m4_default([$4],[AC_LANG_PROGRAM()])],
108076fae4e5dSmrg        AS_TR_SH(xorg_cv_linker_flags_[$1])=yes,
108086fae4e5dSmrg        AS_TR_SH(xorg_cv_linker_flags_[$1])=no)
108096fae4e5dSmrg      LDFLAGS=$ax_save_FLAGS])],
108106fae4e5dSmrg  [ax_save_FLAGS=$LDFLAGS
108116fae4e5dSmrg   LDFLAGS="$1"
108126fae4e5dSmrg   AC_LINK_IFELSE([AC_LANG_PROGRAM()],
108136fae4e5dSmrg     eval AS_TR_SH(xorg_cv_linker_flags_[$1])=yes,
108146fae4e5dSmrg     eval AS_TR_SH(xorg_cv_linker_flags_[$1])=no)
108156fae4e5dSmrg   LDFLAGS=$ax_save_FLAGS])
108166fae4e5dSmrgeval xorg_check_linker_flags=$AS_TR_SH(xorg_cv_linker_flags_[$1])
108176fae4e5dSmrgAC_MSG_RESULT($xorg_check_linker_flags)
108186fae4e5dSmrgif test "x$xorg_check_linker_flags" = xyes; then
108196fae4e5dSmrg	m4_default([$2], :)
108206fae4e5dSmrgelse
108216fae4e5dSmrg	m4_default([$3], :)
108226fae4e5dSmrgfi
108236fae4e5dSmrg]) # XORG_CHECK_LINKER_FLAGS
108249c9ff80cSmrg
108256fae4e5dSmrg# XORG_MEMORY_CHECK_FLAGS
108266fae4e5dSmrg# -----------------------
108276fae4e5dSmrg# Minimum version: 1.16.0
10828e5410a46Smrg#
108296fae4e5dSmrg# This macro attempts to find appropriate memory checking functionality
108306fae4e5dSmrg# for various platforms which unit testing code may use to catch various
108316fae4e5dSmrg# forms of memory allocation and access errors in testing.
10832e5410a46Smrg#
108336fae4e5dSmrg# Interface to module:
108346fae4e5dSmrg# XORG_MALLOC_DEBUG_ENV - environment variables to set to enable debugging
108356fae4e5dSmrg#                         Usually added to TESTS_ENVIRONMENT in Makefile.am
108366fae4e5dSmrg#
108376fae4e5dSmrg# If the user sets the value of XORG_MALLOC_DEBUG_ENV, it is used verbatim.
108386fae4e5dSmrg#
108396fae4e5dSmrgAC_DEFUN([XORG_MEMORY_CHECK_FLAGS],[
108401f0ac6a5Smrg
108416fae4e5dSmrgAC_REQUIRE([AC_CANONICAL_HOST])
108426fae4e5dSmrgAC_ARG_VAR([XORG_MALLOC_DEBUG_ENV],
108436fae4e5dSmrg           [Environment variables to enable memory checking in tests])
108441f0ac6a5Smrg
108456fae4e5dSmrg# Check for different types of support on different platforms
108466fae4e5dSmrgcase $host_os in
108476fae4e5dSmrg    solaris*)
108486fae4e5dSmrg        AC_CHECK_LIB([umem], [umem_alloc],
108496fae4e5dSmrg            [malloc_debug_env='LD_PRELOAD=libumem.so UMEM_DEBUG=default'])
108506fae4e5dSmrg        ;;
108516fae4e5dSmrg    *-gnu*) # GNU libc - Value is used as a single byte bit pattern,
108526fae4e5dSmrg        # both directly and inverted, so should not be 0 or 255.
108536fae4e5dSmrg        malloc_debug_env='MALLOC_PERTURB_=15'
108546fae4e5dSmrg        ;;
108556fae4e5dSmrg    darwin*)
108566fae4e5dSmrg        malloc_debug_env='MallocPreScribble=1 MallocScribble=1 DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib'
108576fae4e5dSmrg        ;;
108586fae4e5dSmrg    *bsd*)
108596fae4e5dSmrg        malloc_debug_env='MallocPreScribble=1 MallocScribble=1'
108606fae4e5dSmrg        ;;
108616fae4e5dSmrgesac
108621f0ac6a5Smrg
108636fae4e5dSmrg# User supplied flags override default flags
108646fae4e5dSmrgif test "x$XORG_MALLOC_DEBUG_ENV" != "x"; then
108656fae4e5dSmrg    malloc_debug_env="$XORG_MALLOC_DEBUG_ENV"
108666fae4e5dSmrgfi
108679c9ff80cSmrg
108686fae4e5dSmrgAC_SUBST([XORG_MALLOC_DEBUG_ENV],[$malloc_debug_env])
108696fae4e5dSmrg]) # XORG_WITH_LINT
108709c9ff80cSmrg
108716fae4e5dSmrg# XORG_CHECK_MALLOC_ZERO
108726fae4e5dSmrg# ----------------------
108736fae4e5dSmrg# Minimum version: 1.0.0
108746fae4e5dSmrg#
108756fae4e5dSmrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if
108766fae4e5dSmrg# malloc(0) returns NULL.  Packages should add one of these cflags to
108776fae4e5dSmrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them.
108786fae4e5dSmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[
108796fae4e5dSmrgAC_ARG_ENABLE(malloc0returnsnull,
108806fae4e5dSmrg	AS_HELP_STRING([--enable-malloc0returnsnull],
108816fae4e5dSmrg		       [malloc(0) returns NULL (default: auto)]),
108826fae4e5dSmrg	[MALLOC_ZERO_RETURNS_NULL=$enableval],
108836fae4e5dSmrg	[MALLOC_ZERO_RETURNS_NULL=auto])
108849c9ff80cSmrg
108856fae4e5dSmrgAC_MSG_CHECKING([whether malloc(0) returns NULL])
108866fae4e5dSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then
108876fae4e5dSmrg	AC_RUN_IFELSE([AC_LANG_PROGRAM([
108886fae4e5dSmrg#include <stdlib.h>
108896fae4e5dSmrg],[
108906fae4e5dSmrg    char *m0, *r0, *c0, *p;
108916fae4e5dSmrg    m0 = malloc(0);
108926fae4e5dSmrg    p = malloc(10);
108936fae4e5dSmrg    r0 = realloc(p,0);
108946fae4e5dSmrg    c0 = calloc(0,10);
108956fae4e5dSmrg    exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1);
108966fae4e5dSmrg])],
108976fae4e5dSmrg		[MALLOC_ZERO_RETURNS_NULL=yes],
108986fae4e5dSmrg		[MALLOC_ZERO_RETURNS_NULL=no],
108996fae4e5dSmrg		[MALLOC_ZERO_RETURNS_NULL=yes])
109006fae4e5dSmrgfi
109016fae4e5dSmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL])
109029c9ff80cSmrg
109036fae4e5dSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then
109046fae4e5dSmrg	MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL"
109056fae4e5dSmrg	XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS
109066fae4e5dSmrg	XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC"
109076fae4e5dSmrgelse
109086fae4e5dSmrg	MALLOC_ZERO_CFLAGS=""
109096fae4e5dSmrg	XMALLOC_ZERO_CFLAGS=""
109106fae4e5dSmrg	XTMALLOC_ZERO_CFLAGS=""
109116fae4e5dSmrgfi
109129c9ff80cSmrg
109136fae4e5dSmrgAC_SUBST([MALLOC_ZERO_CFLAGS])
109146fae4e5dSmrgAC_SUBST([XMALLOC_ZERO_CFLAGS])
109156fae4e5dSmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS])
109166fae4e5dSmrg]) # XORG_CHECK_MALLOC_ZERO
109176fae4e5dSmrg
109186fae4e5dSmrg# XORG_WITH_LINT()
109196fae4e5dSmrg# ----------------
109206fae4e5dSmrg# Minimum version: 1.1.0
109219c9ff80cSmrg#
109226fae4e5dSmrg# This macro enables the use of a tool that flags some suspicious and
109236fae4e5dSmrg# non-portable constructs (likely to be bugs) in C language source code.
109246fae4e5dSmrg# It will attempt to locate the tool and use appropriate options.
109256fae4e5dSmrg# There are various lint type tools on different platforms.
109266fae4e5dSmrg#
109276fae4e5dSmrg# Interface to module:
109286fae4e5dSmrg# LINT:		returns the path to the tool found on the platform
109296fae4e5dSmrg#		or the value set to LINT on the configure cmd line
109306fae4e5dSmrg#		also an Automake conditional
109316fae4e5dSmrg# LINT_FLAGS:	an Automake variable with appropriate flags
109326fae4e5dSmrg#
109336fae4e5dSmrg# --with-lint:	'yes' user instructs the module to use lint
109346fae4e5dSmrg#		'no' user instructs the module not to use lint (default)
109356fae4e5dSmrg#
109366fae4e5dSmrg# If the user sets the value of LINT, AC_PATH_PROG skips testing the path.
109376fae4e5dSmrg# If the user sets the value of LINT_FLAGS, they are used verbatim.
109386fae4e5dSmrg#
109396fae4e5dSmrgAC_DEFUN([XORG_WITH_LINT],[
109409c9ff80cSmrg
109416fae4e5dSmrgAC_ARG_VAR([LINT], [Path to a lint-style command])
109426fae4e5dSmrgAC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command])
109436fae4e5dSmrgAC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint],
109446fae4e5dSmrg		[Use a lint-style source code checker (default: disabled)])],
109456fae4e5dSmrg		[use_lint=$withval], [use_lint=no])
109469c9ff80cSmrg
109476fae4e5dSmrg# Obtain platform specific info like program name and options
109486fae4e5dSmrg# The lint program on FreeBSD and NetBSD is different from the one on Solaris
109496fae4e5dSmrgcase $host_os in
109506fae4e5dSmrg  *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*)
109516fae4e5dSmrg	lint_name=splint
109526fae4e5dSmrg	lint_options="-badflag"
109536fae4e5dSmrg	;;
109546fae4e5dSmrg  *freebsd* | *netbsd*)
109556fae4e5dSmrg	lint_name=lint
109566fae4e5dSmrg	lint_options="-u -b"
109576fae4e5dSmrg	;;
109586fae4e5dSmrg  *solaris*)
109596fae4e5dSmrg	lint_name=lint
109606fae4e5dSmrg	lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2"
109616fae4e5dSmrg	;;
109626fae4e5dSmrgesac
109639c9ff80cSmrg
109646fae4e5dSmrg# Test for the presence of the program (either guessed by the code or spelled out by the user)
109656fae4e5dSmrgif test "x$use_lint" = x"yes" ; then
109666fae4e5dSmrg   AC_PATH_PROG([LINT], [$lint_name])
109676fae4e5dSmrg   if test "x$LINT" = "x"; then
109686fae4e5dSmrg        AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH])
109696fae4e5dSmrg   fi
109706fae4e5dSmrgelif test "x$use_lint" = x"no" ; then
109716fae4e5dSmrg   if test "x$LINT" != "x"; then
109726fae4e5dSmrg      AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified])
109736fae4e5dSmrg   fi
109746fae4e5dSmrgelse
109756fae4e5dSmrg   AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.])
109766fae4e5dSmrgfi
109779c9ff80cSmrg
109786fae4e5dSmrg# User supplied flags override default flags
109796fae4e5dSmrgif test "x$LINT_FLAGS" != "x"; then
109806fae4e5dSmrg   lint_options=$LINT_FLAGS
109816fae4e5dSmrgfi
109829c9ff80cSmrg
109836fae4e5dSmrgAC_SUBST([LINT_FLAGS],[$lint_options])
109846fae4e5dSmrgAM_CONDITIONAL(LINT, [test "x$LINT" != x])
109856fae4e5dSmrg
109866fae4e5dSmrg]) # XORG_WITH_LINT
109876fae4e5dSmrg
109886fae4e5dSmrg# XORG_LINT_LIBRARY(LIBNAME)
109896fae4e5dSmrg# --------------------------
109906fae4e5dSmrg# Minimum version: 1.1.0
109916fae4e5dSmrg#
109926fae4e5dSmrg# Sets up flags for building lint libraries for checking programs that call
109936fae4e5dSmrg# functions in the library.
109946fae4e5dSmrg#
109956fae4e5dSmrg# Interface to module:
109966fae4e5dSmrg# LINTLIB		- Automake variable with the name of lint library file to make
109976fae4e5dSmrg# MAKE_LINT_LIB		- Automake conditional
109986fae4e5dSmrg#
109996fae4e5dSmrg# --enable-lint-library:  - 'yes' user instructs the module to created a lint library
110006fae4e5dSmrg#			  - 'no' user instructs the module not to create a lint library (default)
110016fae4e5dSmrg
110026fae4e5dSmrgAC_DEFUN([XORG_LINT_LIBRARY],[
110036fae4e5dSmrgAC_REQUIRE([XORG_WITH_LINT])
110046fae4e5dSmrgAC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library],
110056fae4e5dSmrg	[Create lint library (default: disabled)])],
110066fae4e5dSmrg	[make_lint_lib=$enableval], [make_lint_lib=no])
110076fae4e5dSmrg
110086fae4e5dSmrgif test "x$make_lint_lib" = x"yes" ; then
110096fae4e5dSmrg   LINTLIB=llib-l$1.ln
110106fae4e5dSmrg   if test "x$LINT" = "x"; then
110116fae4e5dSmrg        AC_MSG_ERROR([Cannot make lint library without --with-lint])
110126fae4e5dSmrg   fi
110136fae4e5dSmrgelif test "x$make_lint_lib" != x"no" ; then
110146fae4e5dSmrg   AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.])
110156fae4e5dSmrgfi
110169c9ff80cSmrg
110176fae4e5dSmrgAC_SUBST(LINTLIB)
110186fae4e5dSmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno])
110199c9ff80cSmrg
110206fae4e5dSmrg]) # XORG_LINT_LIBRARY
110211f0ac6a5Smrg
110226fae4e5dSmrg# XORG_COMPILER_BRAND
110236fae4e5dSmrg# -------------------
110246fae4e5dSmrg# Minimum version: 1.14.0
110256fae4e5dSmrg#
110266fae4e5dSmrg# Checks for various brands of compilers and sets flags as appropriate:
110276fae4e5dSmrg#   GNU gcc - relies on AC_PROG_CC (via AC_PROG_CC_C99) to set GCC to "yes"
110286fae4e5dSmrg#   GNU g++ - relies on AC_PROG_CXX to set GXX to "yes"
110296fae4e5dSmrg#   clang compiler - sets CLANGCC to "yes"
110306fae4e5dSmrg#   Intel compiler - sets INTELCC to "yes"
110316fae4e5dSmrg#   Sun/Oracle Solaris Studio cc - sets SUNCC to "yes"
110326fae4e5dSmrg#
110336fae4e5dSmrgAC_DEFUN([XORG_COMPILER_BRAND], [
110346fae4e5dSmrgAC_LANG_CASE(
110356fae4e5dSmrg	[C], [
110366fae4e5dSmrg		AC_REQUIRE([AC_PROG_CC_C99])
110376fae4e5dSmrg	],
110386fae4e5dSmrg	[C++], [
110396fae4e5dSmrg		AC_REQUIRE([AC_PROG_CXX])
110406fae4e5dSmrg	]
110416fae4e5dSmrg)
110426fae4e5dSmrgAC_CHECK_DECL([__clang__], [CLANGCC="yes"], [CLANGCC="no"])
110436fae4e5dSmrgAC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"])
110446fae4e5dSmrgAC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
110456fae4e5dSmrg]) # XORG_COMPILER_BRAND
11046e5410a46Smrg
110476fae4e5dSmrg# XORG_TESTSET_CFLAG(<variable>, <flag>, [<alternative flag>, ...])
110486fae4e5dSmrg# ---------------
110496fae4e5dSmrg# Minimum version: 1.16.0
110506fae4e5dSmrg#
110516fae4e5dSmrg# Test if the compiler works when passed the given flag as a command line argument.
110526fae4e5dSmrg# If it succeeds, the flag is appeneded to the given variable.  If not, it tries the
110536fae4e5dSmrg# next flag in the list until there are no more options.
110546fae4e5dSmrg#
110556fae4e5dSmrg# Note that this does not guarantee that the compiler supports the flag as some
110566fae4e5dSmrg# compilers will simply ignore arguments that they do not understand, but we do
110576fae4e5dSmrg# attempt to weed out false positives by using -Werror=unknown-warning-option and
110586fae4e5dSmrg# -Werror=unused-command-line-argument
110596fae4e5dSmrg#
110606fae4e5dSmrgAC_DEFUN([XORG_TESTSET_CFLAG], [
110616fae4e5dSmrgm4_if([$#], 0, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])])
110626fae4e5dSmrgm4_if([$#], 1, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])])
110636fae4e5dSmrg
110646fae4e5dSmrgAC_LANG_COMPILER_REQUIRE
110656fae4e5dSmrg
110666fae4e5dSmrgAC_LANG_CASE(
110676fae4e5dSmrg	[C], [
110686fae4e5dSmrg		AC_REQUIRE([AC_PROG_CC_C99])
110696fae4e5dSmrg		define([PREFIX], [C])
110706fae4e5dSmrg	],
110716fae4e5dSmrg	[C++], [
110726fae4e5dSmrg		define([PREFIX], [CXX])
110736fae4e5dSmrg	]
110746fae4e5dSmrg)
110751f0ac6a5Smrg
110766fae4e5dSmrg[xorg_testset_save_]PREFIX[FLAGS]="$PREFIX[FLAGS]"
110776fae4e5dSmrg
110786fae4e5dSmrgif test "x$xorg_testset_unknown_warning_option" = "x" ; then
110796fae4e5dSmrg	PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option"
110806fae4e5dSmrg	AC_CACHE_CHECK([if compiler supports -Werror=unknown-warning-option],
110816fae4e5dSmrg			xorg_cv_compiler_flag_unknown_warning_option,
110826fae4e5dSmrg			AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])],
110836fae4e5dSmrg					  [xorg_cv_compiler_flag_unknown_warning_option=yes],
110846fae4e5dSmrg					  [xorg_cv_compiler_flag_unknown_warning_option=no]))
110856fae4e5dSmrg	xorg_testset_unknown_warning_option=$xorg_cv_compiler_flag_unknown_warning_option
110866fae4e5dSmrg	PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]"
110876fae4e5dSmrgfi
110881f0ac6a5Smrg
110896fae4e5dSmrgif test "x$xorg_testset_unused_command_line_argument" = "x" ; then
110906fae4e5dSmrg	if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
110916fae4e5dSmrg		PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option"
110926fae4e5dSmrg	fi
110936fae4e5dSmrg	PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument"
110946fae4e5dSmrg	AC_CACHE_CHECK([if compiler supports -Werror=unused-command-line-argument],
110956fae4e5dSmrg			xorg_cv_compiler_flag_unused_command_line_argument,
110966fae4e5dSmrg			AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])],
110976fae4e5dSmrg					  [xorg_cv_compiler_flag_unused_command_line_argument=yes],
110986fae4e5dSmrg					  [xorg_cv_compiler_flag_unused_command_line_argument=no]))
110996fae4e5dSmrg	xorg_testset_unused_command_line_argument=$xorg_cv_compiler_flag_unused_command_line_argument
111006fae4e5dSmrg	PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]"
111016fae4e5dSmrgfi
111021f0ac6a5Smrg
111036fae4e5dSmrgfound="no"
111046fae4e5dSmrgm4_foreach([flag], m4_cdr($@), [
111056fae4e5dSmrg	if test $found = "no" ; then
111066fae4e5dSmrg		if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
111076fae4e5dSmrg			PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option"
111086fae4e5dSmrg		fi
111096fae4e5dSmrg
111106fae4e5dSmrg		if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
111116fae4e5dSmrg			PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument"
111126fae4e5dSmrg		fi
111136fae4e5dSmrg
111146fae4e5dSmrg		PREFIX[FLAGS]="$PREFIX[FLAGS] ]flag["
111156fae4e5dSmrg
111166fae4e5dSmrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname
111176fae4e5dSmrg		AC_MSG_CHECKING([if $CC supports ]flag[])
111186fae4e5dSmrg		cacheid=`AS_ECHO([xorg_cv_cc_flag_]flag[])`
111196fae4e5dSmrg		AC_CACHE_VAL(AS_TR_SH($cacheid),
111206fae4e5dSmrg			     [AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])],
111216fae4e5dSmrg					     [eval AS_TR_SH($cacheid)=yes],
111226fae4e5dSmrg					     [eval AS_TR_SH($cacheid)=no])])
111236fae4e5dSmrg
111246fae4e5dSmrg		PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]"
111256fae4e5dSmrg
111266fae4e5dSmrg		eval supported=$AS_TR_SH($cacheid)
111276fae4e5dSmrg		AC_MSG_RESULT([$supported])
111286fae4e5dSmrg		if test "$supported" = "yes" ; then
111296fae4e5dSmrg			$1="$$1 ]flag["
111306fae4e5dSmrg			found="yes"
111316fae4e5dSmrg		fi
111326fae4e5dSmrg	fi
111336fae4e5dSmrg])
111346fae4e5dSmrg]) # XORG_TESTSET_CFLAG
111351f0ac6a5Smrg
111366fae4e5dSmrg# XORG_COMPILER_FLAGS
111376fae4e5dSmrg# ---------------
111386fae4e5dSmrg# Minimum version: 1.16.0
111396fae4e5dSmrg#
111406fae4e5dSmrg# Defines BASE_CFLAGS or BASE_CXXFLAGS to contain a set of command line
111416fae4e5dSmrg# arguments supported by the selected compiler which do NOT alter the generated
111426fae4e5dSmrg# code.  These arguments will cause the compiler to print various warnings
111436fae4e5dSmrg# during compilation AND turn a conservative set of warnings into errors.
111446fae4e5dSmrg#
111456fae4e5dSmrg# The set of flags supported by BASE_CFLAGS and BASE_CXXFLAGS will grow in
111466fae4e5dSmrg# future versions of util-macros as options are added to new compilers.
111476fae4e5dSmrg#
111486fae4e5dSmrgAC_DEFUN([XORG_COMPILER_FLAGS], [
111496fae4e5dSmrgAC_REQUIRE([XORG_COMPILER_BRAND])
111506fae4e5dSmrg
111516fae4e5dSmrgAC_ARG_ENABLE(selective-werror,
111526fae4e5dSmrg              AS_HELP_STRING([--disable-selective-werror],
111536fae4e5dSmrg                             [Turn off selective compiler errors. (default: enabled)]),
111546fae4e5dSmrg              [SELECTIVE_WERROR=$enableval],
111556fae4e5dSmrg              [SELECTIVE_WERROR=yes])
111566fae4e5dSmrg
111576fae4e5dSmrgAC_LANG_CASE(
111586fae4e5dSmrg        [C], [
111596fae4e5dSmrg                define([PREFIX], [C])
111606fae4e5dSmrg        ],
111616fae4e5dSmrg        [C++], [
111626fae4e5dSmrg                define([PREFIX], [CXX])
111636fae4e5dSmrg        ]
111646fae4e5dSmrg)
111656fae4e5dSmrg# -v is too short to test reliably with XORG_TESTSET_CFLAG
111666fae4e5dSmrgif test "x$SUNCC" = "xyes"; then
111676fae4e5dSmrg    [BASE_]PREFIX[FLAGS]="-v"
111686fae4e5dSmrgelse
111696fae4e5dSmrg    [BASE_]PREFIX[FLAGS]=""
111706fae4e5dSmrgfi
111711f0ac6a5Smrg
111726fae4e5dSmrg# This chunk of warnings were those that existed in the legacy CWARNFLAGS
111736fae4e5dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wall])
111746fae4e5dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-arith])
111756fae4e5dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-declarations])
111766fae4e5dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wformat=2], [-Wformat])
111776fae4e5dSmrg
111786fae4e5dSmrgAC_LANG_CASE(
111796fae4e5dSmrg	[C], [
111806fae4e5dSmrg		XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wstrict-prototypes])
111816fae4e5dSmrg		XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-prototypes])
111826fae4e5dSmrg		XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnested-externs])
111836fae4e5dSmrg		XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wbad-function-cast])
111846fae4e5dSmrg		XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wold-style-definition])
111856fae4e5dSmrg		XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wdeclaration-after-statement])
111866fae4e5dSmrg	]
111876fae4e5dSmrg)
111881f0ac6a5Smrg
111896fae4e5dSmrg# This chunk adds additional warnings that could catch undesired effects.
111906fae4e5dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wunused])
111916fae4e5dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wuninitialized])
111926fae4e5dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wshadow])
111936fae4e5dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual])
111946fae4e5dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-noreturn])
111956fae4e5dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-format-attribute])
111966fae4e5dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wredundant-decls])
111976fae4e5dSmrg
111986fae4e5dSmrg# These are currently disabled because they are noisy.  They will be enabled
111996fae4e5dSmrg# in the future once the codebase is sufficiently modernized to silence
112006fae4e5dSmrg# them.  For now, I don't want them to drown out the other warnings.
112016fae4e5dSmrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op])
112026fae4e5dSmrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses])
112036fae4e5dSmrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align])
112046fae4e5dSmrg
112056fae4e5dSmrg# Turn some warnings into errors, so we don't accidently get successful builds
112066fae4e5dSmrg# when there are problems that should be fixed.
112076fae4e5dSmrg
112086fae4e5dSmrgif test "x$SELECTIVE_WERROR" = "xyes" ; then
112096fae4e5dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=implicit], [-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED])
112106fae4e5dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=nonnull])
112116fae4e5dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=init-self])
112126fae4e5dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=main])
112136fae4e5dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=missing-braces])
112146fae4e5dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=sequence-point])
112156fae4e5dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=return-type], [-errwarn=E_FUNC_HAS_NO_RETURN_STMT])
112166fae4e5dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=trigraphs])
112176fae4e5dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=array-bounds])
112186fae4e5dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=write-strings])
112196fae4e5dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=address])
112206fae4e5dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=int-to-pointer-cast], [-errwarn=E_BAD_PTR_INT_COMBINATION])
112216fae4e5dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=pointer-to-int-cast]) # Also -errwarn=E_BAD_PTR_INT_COMBINATION
112226fae4e5dSmrgelse
112236fae4e5dSmrgAC_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])
112246fae4e5dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wimplicit])
112256fae4e5dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnonnull])
112266fae4e5dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Winit-self])
112276fae4e5dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmain])
112286fae4e5dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-braces])
112296fae4e5dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wsequence-point])
112306fae4e5dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wreturn-type])
112316fae4e5dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wtrigraphs])
112326fae4e5dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Warray-bounds])
112336fae4e5dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wwrite-strings])
112346fae4e5dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Waddress])
112356fae4e5dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wint-to-pointer-cast])
112366fae4e5dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-to-int-cast])
112376fae4e5dSmrgfi
112381f0ac6a5Smrg
112396fae4e5dSmrgAC_SUBST([BASE_]PREFIX[FLAGS])
112406fae4e5dSmrg]) # XORG_COMPILER_FLAGS
112416fae4e5dSmrg
112426fae4e5dSmrg# XORG_CWARNFLAGS
112436fae4e5dSmrg# ---------------
112446fae4e5dSmrg# Minimum version: 1.2.0
112456fae4e5dSmrg# Deprecated since: 1.16.0 (Use XORG_COMPILER_FLAGS instead)
112469c9ff80cSmrg#
112476fae4e5dSmrg# Defines CWARNFLAGS to enable C compiler warnings.
112489c9ff80cSmrg#
112496fae4e5dSmrg# This function is deprecated because it defines -fno-strict-aliasing
112506fae4e5dSmrg# which alters the code generated by the compiler.  If -fno-strict-aliasing
112516fae4e5dSmrg# is needed, then it should be added explicitly in the module when
112526fae4e5dSmrg# it is updated to use BASE_CFLAGS.
112536fae4e5dSmrg#
112546fae4e5dSmrgAC_DEFUN([XORG_CWARNFLAGS], [
112556fae4e5dSmrgAC_REQUIRE([XORG_COMPILER_FLAGS])
112566fae4e5dSmrgAC_REQUIRE([XORG_COMPILER_BRAND])
112576fae4e5dSmrgAC_LANG_CASE(
112586fae4e5dSmrg	[C], [
112596fae4e5dSmrg		CWARNFLAGS="$BASE_CFLAGS"
112606fae4e5dSmrg		if  test "x$GCC" = xyes ; then
112616fae4e5dSmrg		    CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing"
112626fae4e5dSmrg		fi
112636fae4e5dSmrg		AC_SUBST(CWARNFLAGS)
112646fae4e5dSmrg	]
112656fae4e5dSmrg)
112666fae4e5dSmrg]) # XORG_CWARNFLAGS
112671f0ac6a5Smrg
112686fae4e5dSmrg# XORG_STRICT_OPTION
112696fae4e5dSmrg# -----------------------
112706fae4e5dSmrg# Minimum version: 1.3.0
112716fae4e5dSmrg#
112726fae4e5dSmrg# Add configure option to enable strict compilation flags, such as treating
112736fae4e5dSmrg# warnings as fatal errors.
112746fae4e5dSmrg# If --enable-strict-compilation is passed to configure, adds strict flags to
112756fae4e5dSmrg# $BASE_CFLAGS or $BASE_CXXFLAGS and the deprecated $CWARNFLAGS.
112766fae4e5dSmrg#
112776fae4e5dSmrg# Starting in 1.14.0 also exports $STRICT_CFLAGS for use in other tests or
112786fae4e5dSmrg# when strict compilation is unconditionally desired.
112796fae4e5dSmrgAC_DEFUN([XORG_STRICT_OPTION], [
112806fae4e5dSmrgAC_REQUIRE([XORG_CWARNFLAGS])
112816fae4e5dSmrgAC_REQUIRE([XORG_COMPILER_FLAGS])
112821f0ac6a5Smrg
112836fae4e5dSmrgAC_ARG_ENABLE(strict-compilation,
112846fae4e5dSmrg			  AS_HELP_STRING([--enable-strict-compilation],
112856fae4e5dSmrg			  [Enable all warnings from compiler and make them errors (default: disabled)]),
112866fae4e5dSmrg			  [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no])
112871f0ac6a5Smrg
112886fae4e5dSmrgAC_LANG_CASE(
112896fae4e5dSmrg        [C], [
112906fae4e5dSmrg                define([PREFIX], [C])
112916fae4e5dSmrg        ],
112926fae4e5dSmrg        [C++], [
112936fae4e5dSmrg                define([PREFIX], [CXX])
112946fae4e5dSmrg        ]
112956fae4e5dSmrg)
112969c9ff80cSmrg
112976fae4e5dSmrg[STRICT_]PREFIX[FLAGS]=""
112986fae4e5dSmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-pedantic])
112996fae4e5dSmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror], [-errwarn])
113009c9ff80cSmrg
113016fae4e5dSmrg# Earlier versions of gcc (eg: 4.2) support -Werror=attributes, but do not
113026fae4e5dSmrg# activate it with -Werror, so we add it here explicitly.
113036fae4e5dSmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror=attributes])
113049c9ff80cSmrg
113056fae4e5dSmrgif test "x$STRICT_COMPILE" = "xyes"; then
113066fae4e5dSmrg    [BASE_]PREFIX[FLAGS]="$[BASE_]PREFIX[FLAGS] $[STRICT_]PREFIX[FLAGS]"
113076fae4e5dSmrg    AC_LANG_CASE([C], [CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"])
113086fae4e5dSmrgfi
113096fae4e5dSmrgAC_SUBST([STRICT_]PREFIX[FLAGS])
113106fae4e5dSmrgAC_SUBST([BASE_]PREFIX[FLAGS])
113116fae4e5dSmrgAC_LANG_CASE([C], AC_SUBST([CWARNFLAGS]))
113126fae4e5dSmrg]) # XORG_STRICT_OPTION
113139c9ff80cSmrg
113146fae4e5dSmrg# XORG_DEFAULT_OPTIONS
113156fae4e5dSmrg# --------------------
113166fae4e5dSmrg# Minimum version: 1.3.0
113179c9ff80cSmrg#
113186fae4e5dSmrg# Defines default options for X.Org modules.
113199c9ff80cSmrg#
113206fae4e5dSmrgAC_DEFUN([XORG_DEFAULT_OPTIONS], [
113216fae4e5dSmrgAC_REQUIRE([AC_PROG_INSTALL])
113226fae4e5dSmrgXORG_COMPILER_FLAGS
113236fae4e5dSmrgXORG_CWARNFLAGS
113246fae4e5dSmrgXORG_STRICT_OPTION
113256fae4e5dSmrgXORG_RELEASE_VERSION
113266fae4e5dSmrgXORG_CHANGELOG
113276fae4e5dSmrgXORG_INSTALL
113286fae4e5dSmrgXORG_MANPAGE_SECTIONS
113296fae4e5dSmrgm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])],
113306fae4e5dSmrg    [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])])
113316fae4e5dSmrg]) # XORG_DEFAULT_OPTIONS
113326fae4e5dSmrg
113336fae4e5dSmrg# XORG_INSTALL()
113346fae4e5dSmrg# ----------------
113356fae4e5dSmrg# Minimum version: 1.4.0
113369c9ff80cSmrg#
113376fae4e5dSmrg# Defines the variable INSTALL_CMD as the command to copy
113386fae4e5dSmrg# INSTALL from $prefix/share/util-macros.
113399c9ff80cSmrg#
113406fae4e5dSmrgAC_DEFUN([XORG_INSTALL], [
113416fae4e5dSmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG])
113426fae4e5dSmrgmacros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros`
113436fae4e5dSmrgINSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \
113446fae4e5dSmrgmv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \
113456fae4e5dSmrg|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \
113466fae4e5dSmrgecho 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)"
113476fae4e5dSmrgAC_SUBST([INSTALL_CMD])
113486fae4e5dSmrg]) # XORG_INSTALL
113496fae4e5dSmrgdnl Copyright 2005 Red Hat, Inc
113506fae4e5dSmrgdnl
113516fae4e5dSmrgdnl Permission to use, copy, modify, distribute, and sell this software and its
113526fae4e5dSmrgdnl documentation for any purpose is hereby granted without fee, provided that
113536fae4e5dSmrgdnl the above copyright notice appear in all copies and that both that
113546fae4e5dSmrgdnl copyright notice and this permission notice appear in supporting
113556fae4e5dSmrgdnl documentation.
113566fae4e5dSmrgdnl
113576fae4e5dSmrgdnl The above copyright notice and this permission notice shall be included
113586fae4e5dSmrgdnl in all copies or substantial portions of the Software.
113596fae4e5dSmrgdnl
113606fae4e5dSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
113616fae4e5dSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
113626fae4e5dSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
113636fae4e5dSmrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
113646fae4e5dSmrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
113656fae4e5dSmrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
113666fae4e5dSmrgdnl OTHER DEALINGS IN THE SOFTWARE.
113676fae4e5dSmrgdnl
113686fae4e5dSmrgdnl Except as contained in this notice, the name of the copyright holders shall
113696fae4e5dSmrgdnl not be used in advertising or otherwise to promote the sale, use or
113706fae4e5dSmrgdnl other dealings in this Software without prior written authorization
113716fae4e5dSmrgdnl from the copyright holders.
113726fae4e5dSmrgdnl
113739c9ff80cSmrg
113746fae4e5dSmrg# XORG_RELEASE_VERSION
113756fae4e5dSmrg# --------------------
113766fae4e5dSmrg# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use.
113776fae4e5dSmrg 
113786fae4e5dSmrgAC_DEFUN([XORG_RELEASE_VERSION],[
113796fae4e5dSmrg	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR],
113806fae4e5dSmrg		[`echo $PACKAGE_VERSION | cut -d . -f 1`],
113816fae4e5dSmrg		[Major version of this package])
113826fae4e5dSmrg	PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1`
113836fae4e5dSmrg	if test "x$PVM" = "x"; then
113846fae4e5dSmrg		PVM="0"
113856fae4e5dSmrg	fi
113866fae4e5dSmrg	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR],
113876fae4e5dSmrg		[$PVM],
113886fae4e5dSmrg		[Minor version of this package])
113896fae4e5dSmrg	PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1`
113906fae4e5dSmrg	if test "x$PVP" = "x"; then
113916fae4e5dSmrg		PVP="0"
113926fae4e5dSmrg	fi
113936fae4e5dSmrg	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL],
113946fae4e5dSmrg		[$PVP],
113956fae4e5dSmrg		[Patch version of this package])
113966fae4e5dSmrg])
113979c9ff80cSmrg
113986fae4e5dSmrg# XORG_CHANGELOG()
113996fae4e5dSmrg# ----------------
114006fae4e5dSmrg# Minimum version: 1.2.0
114016fae4e5dSmrg#
114026fae4e5dSmrg# Defines the variable CHANGELOG_CMD as the command to generate
114036fae4e5dSmrg# ChangeLog from git.
114046fae4e5dSmrg#
114056fae4e5dSmrg#
114066fae4e5dSmrgAC_DEFUN([XORG_CHANGELOG], [
114076fae4e5dSmrgCHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \
114086fae4e5dSmrgmv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \
114096fae4e5dSmrg|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \
114106fae4e5dSmrgecho 'git directory not found: installing possibly empty changelog.' >&2)"
114116fae4e5dSmrgAC_SUBST([CHANGELOG_CMD])
114126fae4e5dSmrg]) # XORG_CHANGELOG
114131f0ac6a5Smrg
11414