aclocal.m4 revision e5410a46
1e5410a46Smrg# generated automatically by aclocal 1.11 -*- 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
16e5410a46Smrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.63],,
17e5410a46Smrg[m4_warning([this file was generated for autoconf 2.63.
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.
37e5410a46Smrgm4_if([$1], [1.11], [],
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],
53e5410a46Smrg[AM_AUTOMAKE_VERSION([1.11])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# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
410e5410a46Smrg# Free Software Foundation, Inc.
411e5410a46Smrg#
412e5410a46Smrg# This file is free software; the Free Software Foundation
413e5410a46Smrg# gives unlimited permission to copy and/or distribute it,
414e5410a46Smrg# with or without modifications, as long as this notice is preserved.
415e5410a46Smrg
416e5410a46Smrg# serial 8
417e5410a46Smrg
418e5410a46Smrg# AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
419e5410a46SmrgAU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
420e5410a46Smrg
421e5410a46Smrg# Do all the work for Automake.                             -*- Autoconf -*-
422e5410a46Smrg
423e5410a46Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
424e5410a46Smrg# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
425e5410a46Smrg#
426e5410a46Smrg# This file is free software; the Free Software Foundation
427e5410a46Smrg# gives unlimited permission to copy and/or distribute it,
428e5410a46Smrg# with or without modifications, as long as this notice is preserved.
429e5410a46Smrg
430e5410a46Smrg# serial 16
431e5410a46Smrg
432e5410a46Smrg# This macro actually does too much.  Some checks are only needed if
433e5410a46Smrg# your package does certain things.  But this isn't really a big deal.
434e5410a46Smrg
435e5410a46Smrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
436e5410a46Smrg# AM_INIT_AUTOMAKE([OPTIONS])
437e5410a46Smrg# -----------------------------------------------
438e5410a46Smrg# The call with PACKAGE and VERSION arguments is the old style
439e5410a46Smrg# call (pre autoconf-2.50), which is being phased out.  PACKAGE
440e5410a46Smrg# and VERSION should now be passed to AC_INIT and removed from
441e5410a46Smrg# the call to AM_INIT_AUTOMAKE.
442e5410a46Smrg# We support both call styles for the transition.  After
443e5410a46Smrg# the next Automake release, Autoconf can make the AC_INIT
444e5410a46Smrg# arguments mandatory, and then we can depend on a new Autoconf
445e5410a46Smrg# release and drop the old call support.
446e5410a46SmrgAC_DEFUN([AM_INIT_AUTOMAKE],
447e5410a46Smrg[AC_PREREQ([2.62])dnl
448e5410a46Smrgdnl Autoconf wants to disallow AM_ names.  We explicitly allow
449e5410a46Smrgdnl the ones we care about.
450e5410a46Smrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
451e5410a46SmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
452e5410a46SmrgAC_REQUIRE([AC_PROG_INSTALL])dnl
453e5410a46Smrgif test "`cd $srcdir && pwd`" != "`pwd`"; then
454e5410a46Smrg  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
455e5410a46Smrg  # is not polluted with repeated "-I."
456e5410a46Smrg  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
457e5410a46Smrg  # test to see if srcdir already configured
458e5410a46Smrg  if test -f $srcdir/config.status; then
459e5410a46Smrg    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
460e5410a46Smrg  fi
4611f0ac6a5Smrgfi
462e5410a46Smrg
463e5410a46Smrg# test whether we have cygpath
464e5410a46Smrgif test -z "$CYGPATH_W"; then
465e5410a46Smrg  if (cygpath --version) >/dev/null 2>/dev/null; then
466e5410a46Smrg    CYGPATH_W='cygpath -w'
467e5410a46Smrg  else
468e5410a46Smrg    CYGPATH_W=echo
469e5410a46Smrg  fi
4701f0ac6a5Smrgfi
471e5410a46SmrgAC_SUBST([CYGPATH_W])
472e5410a46Smrg
473e5410a46Smrg# Define the identity of the package.
474e5410a46Smrgdnl Distinguish between old-style and new-style calls.
475e5410a46Smrgm4_ifval([$2],
476e5410a46Smrg[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
477e5410a46Smrg AC_SUBST([PACKAGE], [$1])dnl
478e5410a46Smrg AC_SUBST([VERSION], [$2])],
479e5410a46Smrg[_AM_SET_OPTIONS([$1])dnl
480e5410a46Smrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
481e5410a46Smrgm4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
482e5410a46Smrg  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
483e5410a46Smrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
484e5410a46Smrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
485e5410a46Smrg
486e5410a46Smrg_AM_IF_OPTION([no-define],,
487e5410a46Smrg[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
488e5410a46Smrg AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
489e5410a46Smrg
490e5410a46Smrg# Some tools Automake needs.
491e5410a46SmrgAC_REQUIRE([AM_SANITY_CHECK])dnl
492e5410a46SmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl
493e5410a46SmrgAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
494e5410a46SmrgAM_MISSING_PROG(AUTOCONF, autoconf)
495e5410a46SmrgAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
496e5410a46SmrgAM_MISSING_PROG(AUTOHEADER, autoheader)
497e5410a46SmrgAM_MISSING_PROG(MAKEINFO, makeinfo)
498e5410a46SmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl
499e5410a46SmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
500e5410a46SmrgAC_REQUIRE([AM_PROG_MKDIR_P])dnl
501e5410a46Smrg# We need awk for the "check" target.  The system "awk" is bad on
502e5410a46Smrg# some platforms.
503e5410a46SmrgAC_REQUIRE([AC_PROG_AWK])dnl
504e5410a46SmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl
505e5410a46SmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl
506e5410a46Smrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
507e5410a46Smrg	      [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
508e5410a46Smrg			     [_AM_PROG_TAR([v7])])])
509e5410a46Smrg_AM_IF_OPTION([no-dependencies],,
510e5410a46Smrg[AC_PROVIDE_IFELSE([AC_PROG_CC],
511e5410a46Smrg		  [_AM_DEPENDENCIES(CC)],
512e5410a46Smrg		  [define([AC_PROG_CC],
513e5410a46Smrg			  defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
514e5410a46SmrgAC_PROVIDE_IFELSE([AC_PROG_CXX],
515e5410a46Smrg		  [_AM_DEPENDENCIES(CXX)],
516e5410a46Smrg		  [define([AC_PROG_CXX],
517e5410a46Smrg			  defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
518e5410a46SmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC],
519e5410a46Smrg		  [_AM_DEPENDENCIES(OBJC)],
520e5410a46Smrg		  [define([AC_PROG_OBJC],
521e5410a46Smrg			  defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
522e5410a46Smrg])
523e5410a46Smrg_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
524e5410a46Smrgdnl The `parallel-tests' driver may need to know about EXEEXT, so add the
525e5410a46Smrgdnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This macro
526e5410a46Smrgdnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
527e5410a46SmrgAC_CONFIG_COMMANDS_PRE(dnl
528e5410a46Smrg[m4_provide_if([_AM_COMPILER_EXEEXT],
529e5410a46Smrg  [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
530e5410a46Smrg])
5311f0ac6a5Smrg
532e5410a46Smrgdnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
533e5410a46Smrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
534e5410a46Smrgdnl mangled by Autoconf and run in a shell conditional statement.
535e5410a46Smrgm4_define([_AC_COMPILER_EXEEXT],
536e5410a46Smrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
5371f0ac6a5Smrg
5381f0ac6a5Smrg
539e5410a46Smrg# When config.status generates a header, we must update the stamp-h file.
540e5410a46Smrg# This file resides in the same directory as the config header
541e5410a46Smrg# that is generated.  The stamp files are numbered to have different names.
5421f0ac6a5Smrg
543e5410a46Smrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
544e5410a46Smrg# loop where config.status creates the headers, so we can generate
545e5410a46Smrg# our stamp files there.
546e5410a46SmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
547e5410a46Smrg[# Compute $1's index in $config_headers.
548e5410a46Smrg_am_arg=$1
549e5410a46Smrg_am_stamp_count=1
550e5410a46Smrgfor _am_header in $config_headers :; do
551e5410a46Smrg  case $_am_header in
552e5410a46Smrg    $_am_arg | $_am_arg:* )
553e5410a46Smrg      break ;;
554e5410a46Smrg    * )
555e5410a46Smrg      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
556e5410a46Smrg  esac
557e5410a46Smrgdone
558e5410a46Smrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
5591f0ac6a5Smrg
560e5410a46Smrg# Copyright (C) 2001, 2003, 2005, 2008  Free Software Foundation, Inc.
5611f0ac6a5Smrg#
562e5410a46Smrg# This file is free software; the Free Software Foundation
563e5410a46Smrg# gives unlimited permission to copy and/or distribute it,
564e5410a46Smrg# with or without modifications, as long as this notice is preserved.
5651f0ac6a5Smrg
566e5410a46Smrg# AM_PROG_INSTALL_SH
567e5410a46Smrg# ------------------
568e5410a46Smrg# Define $install_sh.
569e5410a46SmrgAC_DEFUN([AM_PROG_INSTALL_SH],
570e5410a46Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
571e5410a46Smrgif test x"${install_sh}" != xset; then
572e5410a46Smrg  case $am_aux_dir in
573e5410a46Smrg  *\ * | *\	*)
574e5410a46Smrg    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
575e5410a46Smrg  *)
576e5410a46Smrg    install_sh="\${SHELL} $am_aux_dir/install-sh"
577e5410a46Smrg  esac
578e5410a46Smrgfi
579e5410a46SmrgAC_SUBST(install_sh)])
5801f0ac6a5Smrg
581e5410a46Smrg# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
582e5410a46Smrg#
583e5410a46Smrg# This file is free software; the Free Software Foundation
584e5410a46Smrg# gives unlimited permission to copy and/or distribute it,
585e5410a46Smrg# with or without modifications, as long as this notice is preserved.
5861f0ac6a5Smrg
587e5410a46Smrg# serial 2
5881f0ac6a5Smrg
589e5410a46Smrg# Check whether the underlying file-system supports filenames
590e5410a46Smrg# with a leading dot.  For instance MS-DOS doesn't.
591e5410a46SmrgAC_DEFUN([AM_SET_LEADING_DOT],
592e5410a46Smrg[rm -rf .tst 2>/dev/null
593e5410a46Smrgmkdir .tst 2>/dev/null
594e5410a46Smrgif test -d .tst; then
595e5410a46Smrg  am__leading_dot=.
5961f0ac6a5Smrgelse
597e5410a46Smrg  am__leading_dot=_
5981f0ac6a5Smrgfi
599e5410a46Smrgrmdir .tst 2>/dev/null
600e5410a46SmrgAC_SUBST([am__leading_dot])])
6011f0ac6a5Smrg
602e5410a46Smrg# Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
603e5410a46Smrg# From Jim Meyering
6041f0ac6a5Smrg
605e5410a46Smrg# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008
606e5410a46Smrg# Free Software Foundation, Inc.
607e5410a46Smrg#
608e5410a46Smrg# This file is free software; the Free Software Foundation
609e5410a46Smrg# gives unlimited permission to copy and/or distribute it,
610e5410a46Smrg# with or without modifications, as long as this notice is preserved.
6111f0ac6a5Smrg
612e5410a46Smrg# serial 5
6131f0ac6a5Smrg
614e5410a46Smrg# AM_MAINTAINER_MODE([DEFAULT-MODE])
615e5410a46Smrg# ----------------------------------
616e5410a46Smrg# Control maintainer-specific portions of Makefiles.
617e5410a46Smrg# Default is to disable them, unless `enable' is passed literally.
618e5410a46Smrg# For symmetry, `disable' may be passed as well.  Anyway, the user
619e5410a46Smrg# can override the default with the --enable/--disable switch.
620e5410a46SmrgAC_DEFUN([AM_MAINTAINER_MODE],
621e5410a46Smrg[m4_case(m4_default([$1], [disable]),
622e5410a46Smrg       [enable], [m4_define([am_maintainer_other], [disable])],
623e5410a46Smrg       [disable], [m4_define([am_maintainer_other], [enable])],
624e5410a46Smrg       [m4_define([am_maintainer_other], [enable])
625e5410a46Smrg        m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
626e5410a46SmrgAC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles])
627e5410a46Smrg  dnl maintainer-mode's default is 'disable' unless 'enable' is passed
628e5410a46Smrg  AC_ARG_ENABLE([maintainer-mode],
629e5410a46Smrg[  --][am_maintainer_other][-maintainer-mode  am_maintainer_other make rules and dependencies not useful
630e5410a46Smrg			  (and sometimes confusing) to the casual installer],
631e5410a46Smrg      [USE_MAINTAINER_MODE=$enableval],
632e5410a46Smrg      [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
633e5410a46Smrg  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
634e5410a46Smrg  AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
635e5410a46Smrg  MAINT=$MAINTAINER_MODE_TRUE
636e5410a46Smrg  AC_SUBST([MAINT])dnl
637e5410a46Smrg]
638e5410a46Smrg)
6391f0ac6a5Smrg
640e5410a46SmrgAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
6411f0ac6a5Smrg
642e5410a46Smrg# Check to see how 'make' treats includes.	            -*- Autoconf -*-
6431f0ac6a5Smrg
644e5410a46Smrg# Copyright (C) 2001, 2002, 2003, 2005, 2009  Free Software Foundation, Inc.
645e5410a46Smrg#
646e5410a46Smrg# This file is free software; the Free Software Foundation
647e5410a46Smrg# gives unlimited permission to copy and/or distribute it,
648e5410a46Smrg# with or without modifications, as long as this notice is preserved.
6491f0ac6a5Smrg
650e5410a46Smrg# serial 4
6511f0ac6a5Smrg
652e5410a46Smrg# AM_MAKE_INCLUDE()
653e5410a46Smrg# -----------------
654e5410a46Smrg# Check to see how make treats includes.
655e5410a46SmrgAC_DEFUN([AM_MAKE_INCLUDE],
656e5410a46Smrg[am_make=${MAKE-make}
657e5410a46Smrgcat > confinc << 'END'
658e5410a46Smrgam__doit:
659e5410a46Smrg	@echo this is the am__doit target
660e5410a46Smrg.PHONY: am__doit
661e5410a46SmrgEND
662e5410a46Smrg# If we don't find an include directive, just comment out the code.
663e5410a46SmrgAC_MSG_CHECKING([for style of include used by $am_make])
664e5410a46Smrgam__include="#"
665e5410a46Smrgam__quote=
666e5410a46Smrg_am_result=none
667e5410a46Smrg# First try GNU make style include.
668e5410a46Smrgecho "include confinc" > confmf
669e5410a46Smrg# Ignore all kinds of additional output from `make'.
670e5410a46Smrgcase `$am_make -s -f confmf 2> /dev/null` in #(
671e5410a46Smrg*the\ am__doit\ target*)
672e5410a46Smrg  am__include=include
673e5410a46Smrg  am__quote=
674e5410a46Smrg  _am_result=GNU
675e5410a46Smrg  ;;
676e5410a46Smrgesac
677e5410a46Smrg# Now try BSD make style include.
678e5410a46Smrgif test "$am__include" = "#"; then
679e5410a46Smrg   echo '.include "confinc"' > confmf
680e5410a46Smrg   case `$am_make -s -f confmf 2> /dev/null` in #(
681e5410a46Smrg   *the\ am__doit\ target*)
682e5410a46Smrg     am__include=.include
683e5410a46Smrg     am__quote="\""
684e5410a46Smrg     _am_result=BSD
685e5410a46Smrg     ;;
686e5410a46Smrg   esac
687e5410a46Smrgfi
688e5410a46SmrgAC_SUBST([am__include])
689e5410a46SmrgAC_SUBST([am__quote])
690e5410a46SmrgAC_MSG_RESULT([$_am_result])
691e5410a46Smrgrm -f confinc confmf
692e5410a46Smrg])
693e5410a46Smrg
694e5410a46Smrg# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
695e5410a46Smrg
696e5410a46Smrg# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
697e5410a46Smrg# Free Software Foundation, Inc.
6981f0ac6a5Smrg#
699e5410a46Smrg# This file is free software; the Free Software Foundation
700e5410a46Smrg# gives unlimited permission to copy and/or distribute it,
701e5410a46Smrg# with or without modifications, as long as this notice is preserved.
7021f0ac6a5Smrg
703e5410a46Smrg# serial 6
7041f0ac6a5Smrg
705e5410a46Smrg# AM_MISSING_PROG(NAME, PROGRAM)
706e5410a46Smrg# ------------------------------
707e5410a46SmrgAC_DEFUN([AM_MISSING_PROG],
708e5410a46Smrg[AC_REQUIRE([AM_MISSING_HAS_RUN])
709e5410a46Smrg$1=${$1-"${am_missing_run}$2"}
710e5410a46SmrgAC_SUBST($1)])
7111f0ac6a5Smrg
7121f0ac6a5Smrg
713e5410a46Smrg# AM_MISSING_HAS_RUN
714e5410a46Smrg# ------------------
715e5410a46Smrg# Define MISSING if not defined so far and test if it supports --run.
716e5410a46Smrg# If it does, set am_missing_run to use it, otherwise, to nothing.
717e5410a46SmrgAC_DEFUN([AM_MISSING_HAS_RUN],
718e5410a46Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
719e5410a46SmrgAC_REQUIRE_AUX_FILE([missing])dnl
720e5410a46Smrgif test x"${MISSING+set}" != xset; then
721e5410a46Smrg  case $am_aux_dir in
722e5410a46Smrg  *\ * | *\	*)
723e5410a46Smrg    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
724e5410a46Smrg  *)
725e5410a46Smrg    MISSING="\${SHELL} $am_aux_dir/missing" ;;
726e5410a46Smrg  esac
7271f0ac6a5Smrgfi
728e5410a46Smrg# Use eval to expand $SHELL
729e5410a46Smrgif eval "$MISSING --run true"; then
730e5410a46Smrg  am_missing_run="$MISSING --run "
731e5410a46Smrgelse
732e5410a46Smrg  am_missing_run=
733e5410a46Smrg  AC_MSG_WARN([`missing' script is too old or missing])
7341f0ac6a5Smrgfi
735e5410a46Smrg])
736e5410a46Smrg
737e5410a46Smrg# Copyright (C) 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
738e5410a46Smrg#
739e5410a46Smrg# This file is free software; the Free Software Foundation
740e5410a46Smrg# gives unlimited permission to copy and/or distribute it,
741e5410a46Smrg# with or without modifications, as long as this notice is preserved.
742e5410a46Smrg
743e5410a46Smrg# AM_PROG_MKDIR_P
744e5410a46Smrg# ---------------
745e5410a46Smrg# Check for `mkdir -p'.
746e5410a46SmrgAC_DEFUN([AM_PROG_MKDIR_P],
747e5410a46Smrg[AC_PREREQ([2.60])dnl
748e5410a46SmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl
749e5410a46Smrgdnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
750e5410a46Smrgdnl while keeping a definition of mkdir_p for backward compatibility.
751e5410a46Smrgdnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
752e5410a46Smrgdnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
753e5410a46Smrgdnl Makefile.ins that do not define MKDIR_P, so we do our own
754e5410a46Smrgdnl adjustment using top_builddir (which is defined more often than
755e5410a46Smrgdnl MKDIR_P).
756e5410a46SmrgAC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
757e5410a46Smrgcase $mkdir_p in
758e5410a46Smrg  [[\\/$]]* | ?:[[\\/]]*) ;;
759e5410a46Smrg  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
760e5410a46Smrgesac
761e5410a46Smrg])
762e5410a46Smrg
763e5410a46Smrg# Helper functions for option handling.                     -*- Autoconf -*-
7641f0ac6a5Smrg
765e5410a46Smrg# Copyright (C) 2001, 2002, 2003, 2005, 2008  Free Software Foundation, Inc.
766e5410a46Smrg#
767e5410a46Smrg# This file is free software; the Free Software Foundation
768e5410a46Smrg# gives unlimited permission to copy and/or distribute it,
769e5410a46Smrg# with or without modifications, as long as this notice is preserved.
7701f0ac6a5Smrg
771e5410a46Smrg# serial 4
7721f0ac6a5Smrg
773e5410a46Smrg# _AM_MANGLE_OPTION(NAME)
774e5410a46Smrg# -----------------------
775e5410a46SmrgAC_DEFUN([_AM_MANGLE_OPTION],
776e5410a46Smrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
7771f0ac6a5Smrg
778e5410a46Smrg# _AM_SET_OPTION(NAME)
779e5410a46Smrg# ------------------------------
780e5410a46Smrg# Set option NAME.  Presently that only means defining a flag for this option.
781e5410a46SmrgAC_DEFUN([_AM_SET_OPTION],
782e5410a46Smrg[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
7831f0ac6a5Smrg
784e5410a46Smrg# _AM_SET_OPTIONS(OPTIONS)
785e5410a46Smrg# ----------------------------------
786e5410a46Smrg# OPTIONS is a space-separated list of Automake options.
787e5410a46SmrgAC_DEFUN([_AM_SET_OPTIONS],
788e5410a46Smrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
7891f0ac6a5Smrg
790e5410a46Smrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
791e5410a46Smrg# -------------------------------------------
792e5410a46Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
793e5410a46SmrgAC_DEFUN([_AM_IF_OPTION],
794e5410a46Smrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
7951f0ac6a5Smrg
796e5410a46Smrg# Check to make sure that the build environment is sane.    -*- Autoconf -*-
7971f0ac6a5Smrg
798e5410a46Smrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
799e5410a46Smrg# Free Software Foundation, Inc.
8001f0ac6a5Smrg#
801e5410a46Smrg# This file is free software; the Free Software Foundation
802e5410a46Smrg# gives unlimited permission to copy and/or distribute it,
803e5410a46Smrg# with or without modifications, as long as this notice is preserved.
8041f0ac6a5Smrg
805e5410a46Smrg# serial 5
8061f0ac6a5Smrg
807e5410a46Smrg# AM_SANITY_CHECK
808e5410a46Smrg# ---------------
809e5410a46SmrgAC_DEFUN([AM_SANITY_CHECK],
810e5410a46Smrg[AC_MSG_CHECKING([whether build environment is sane])
811e5410a46Smrg# Just in case
812e5410a46Smrgsleep 1
813e5410a46Smrgecho timestamp > conftest.file
814e5410a46Smrg# Reject unsafe characters in $srcdir or the absolute working directory
815e5410a46Smrg# name.  Accept space and tab only in the latter.
816e5410a46Smrgam_lf='
817e5410a46Smrg'
818e5410a46Smrgcase `pwd` in
819e5410a46Smrg  *[[\\\"\#\$\&\'\`$am_lf]]*)
820e5410a46Smrg    AC_MSG_ERROR([unsafe absolute working directory name]);;
821e5410a46Smrgesac
822e5410a46Smrgcase $srcdir in
823e5410a46Smrg  *[[\\\"\#\$\&\'\`$am_lf\ \	]]*)
824e5410a46Smrg    AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
825e5410a46Smrgesac
8261f0ac6a5Smrg
827e5410a46Smrg# Do `set' in a subshell so we don't clobber the current shell's
828e5410a46Smrg# arguments.  Must try -L first in case configure is actually a
829e5410a46Smrg# symlink; some systems play weird games with the mod time of symlinks
830e5410a46Smrg# (eg FreeBSD returns the mod time of the symlink's containing
831e5410a46Smrg# directory).
832e5410a46Smrgif (
833e5410a46Smrg   set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
834e5410a46Smrg   if test "$[*]" = "X"; then
835e5410a46Smrg      # -L didn't work.
836e5410a46Smrg      set X `ls -t "$srcdir/configure" conftest.file`
837e5410a46Smrg   fi
838e5410a46Smrg   rm -f conftest.file
839e5410a46Smrg   if test "$[*]" != "X $srcdir/configure conftest.file" \
840e5410a46Smrg      && test "$[*]" != "X conftest.file $srcdir/configure"; then
8411f0ac6a5Smrg
842e5410a46Smrg      # If neither matched, then we have a broken ls.  This can happen
843e5410a46Smrg      # if, for instance, CONFIG_SHELL is bash and it inherits a
844e5410a46Smrg      # broken ls alias from the environment.  This has actually
845e5410a46Smrg      # happened.  Such a system could not be considered "sane".
846e5410a46Smrg      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
847e5410a46Smrgalias in your environment])
848e5410a46Smrg   fi
8491f0ac6a5Smrg
850e5410a46Smrg   test "$[2]" = conftest.file
851e5410a46Smrg   )
852e5410a46Smrgthen
853e5410a46Smrg   # Ok.
854e5410a46Smrg   :
855e5410a46Smrgelse
856e5410a46Smrg   AC_MSG_ERROR([newly created file is older than distributed files!
857e5410a46SmrgCheck your system clock])
8581f0ac6a5Smrgfi
859e5410a46SmrgAC_MSG_RESULT(yes)])
8601f0ac6a5Smrg
861e5410a46Smrg# Copyright (C) 2009  Free Software Foundation, Inc.
862e5410a46Smrg#
863e5410a46Smrg# This file is free software; the Free Software Foundation
864e5410a46Smrg# gives unlimited permission to copy and/or distribute it,
865e5410a46Smrg# with or without modifications, as long as this notice is preserved.
8661f0ac6a5Smrg
867e5410a46Smrg# serial 1
8681f0ac6a5Smrg
869e5410a46Smrg# AM_SILENT_RULES([DEFAULT])
870e5410a46Smrg# --------------------------
871e5410a46Smrg# Enable less verbose build rules; with the default set to DEFAULT
872e5410a46Smrg# (`yes' being less verbose, `no' or empty being verbose).
873e5410a46SmrgAC_DEFUN([AM_SILENT_RULES],
874e5410a46Smrg[AC_ARG_ENABLE([silent-rules],
875e5410a46Smrg[  --enable-silent-rules          less verbose build output (undo: `make V=1')
876e5410a46Smrg  --disable-silent-rules         verbose build output (undo: `make V=0')])
877e5410a46Smrgcase $enable_silent_rules in
878e5410a46Smrgyes) AM_DEFAULT_VERBOSITY=0;;
879e5410a46Smrgno)  AM_DEFAULT_VERBOSITY=1;;
880e5410a46Smrg*)   AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
881e5410a46Smrgesac
882e5410a46SmrgAC_SUBST([AM_DEFAULT_VERBOSITY])dnl
883e5410a46SmrgAM_BACKSLASH='\'
884e5410a46SmrgAC_SUBST([AM_BACKSLASH])dnl
885e5410a46Smrg_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
8861f0ac6a5Smrg])
8871f0ac6a5Smrg
888e5410a46Smrg# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
889e5410a46Smrg#
890e5410a46Smrg# This file is free software; the Free Software Foundation
891e5410a46Smrg# gives unlimited permission to copy and/or distribute it,
892e5410a46Smrg# with or without modifications, as long as this notice is preserved.
893e5410a46Smrg
894e5410a46Smrg# AM_PROG_INSTALL_STRIP
895e5410a46Smrg# ---------------------
896e5410a46Smrg# One issue with vendor `install' (even GNU) is that you can't
897e5410a46Smrg# specify the program used to strip binaries.  This is especially
898e5410a46Smrg# annoying in cross-compiling environments, where the build's strip
899e5410a46Smrg# is unlikely to handle the host's binaries.
900e5410a46Smrg# Fortunately install-sh will honor a STRIPPROG variable, so we
901e5410a46Smrg# always use install-sh in `make install-strip', and initialize
902e5410a46Smrg# STRIPPROG with the value of the STRIP variable (set by the user).
903e5410a46SmrgAC_DEFUN([AM_PROG_INSTALL_STRIP],
904e5410a46Smrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
905e5410a46Smrg# Installed binaries are usually stripped using `strip' when the user
906e5410a46Smrg# run `make install-strip'.  However `strip' might not be the right
907e5410a46Smrg# tool to use in cross-compilation environments, therefore Automake
908e5410a46Smrg# will honor the `STRIP' environment variable to overrule this program.
909e5410a46Smrgdnl Don't test for $cross_compiling = yes, because it might be `maybe'.
910e5410a46Smrgif test "$cross_compiling" != no; then
911e5410a46Smrg  AC_CHECK_TOOL([STRIP], [strip], :)
912e5410a46Smrgfi
913e5410a46SmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
914e5410a46SmrgAC_SUBST([INSTALL_STRIP_PROGRAM])])
915e5410a46Smrg
916e5410a46Smrg# Copyright (C) 2006, 2008  Free Software Foundation, Inc.
9171f0ac6a5Smrg#
9181f0ac6a5Smrg# This file is free software; the Free Software Foundation
9191f0ac6a5Smrg# gives unlimited permission to copy and/or distribute it,
9201f0ac6a5Smrg# with or without modifications, as long as this notice is preserved.
9211f0ac6a5Smrg
922e5410a46Smrg# serial 2
9231f0ac6a5Smrg
924e5410a46Smrg# _AM_SUBST_NOTMAKE(VARIABLE)
925e5410a46Smrg# ---------------------------
926e5410a46Smrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
927e5410a46Smrg# This macro is traced by Automake.
928e5410a46SmrgAC_DEFUN([_AM_SUBST_NOTMAKE])
9291f0ac6a5Smrg
930e5410a46Smrg# AM_SUBST_NOTMAKE(VARIABLE)
931e5410a46Smrg# ---------------------------
932e5410a46Smrg# Public sister of _AM_SUBST_NOTMAKE.
933e5410a46SmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
9341f0ac6a5Smrg
935e5410a46Smrg# Check how to create a tarball.                            -*- Autoconf -*-
9361f0ac6a5Smrg
937e5410a46Smrg# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
9381f0ac6a5Smrg#
9391f0ac6a5Smrg# This file is free software; the Free Software Foundation
9401f0ac6a5Smrg# gives unlimited permission to copy and/or distribute it,
9411f0ac6a5Smrg# with or without modifications, as long as this notice is preserved.
9421f0ac6a5Smrg
943e5410a46Smrg# serial 2
944e5410a46Smrg
945e5410a46Smrg# _AM_PROG_TAR(FORMAT)
946e5410a46Smrg# --------------------
947e5410a46Smrg# Check how to create a tarball in format FORMAT.
948e5410a46Smrg# FORMAT should be one of `v7', `ustar', or `pax'.
9491f0ac6a5Smrg#
950e5410a46Smrg# Substitute a variable $(am__tar) that is a command
951e5410a46Smrg# writing to stdout a FORMAT-tarball containing the directory
952e5410a46Smrg# $tardir.
953e5410a46Smrg#     tardir=directory && $(am__tar) > result.tar
9541f0ac6a5Smrg#
955e5410a46Smrg# Substitute a variable $(am__untar) that extract such
956e5410a46Smrg# a tarball read from stdin.
957e5410a46Smrg#     $(am__untar) < result.tar
958e5410a46SmrgAC_DEFUN([_AM_PROG_TAR],
959e5410a46Smrg[# Always define AMTAR for backward compatibility.
960e5410a46SmrgAM_MISSING_PROG([AMTAR], [tar])
961e5410a46Smrgm4_if([$1], [v7],
962e5410a46Smrg     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
963e5410a46Smrg     [m4_case([$1], [ustar],, [pax],,
964e5410a46Smrg              [m4_fatal([Unknown tar format])])
965e5410a46SmrgAC_MSG_CHECKING([how to create a $1 tar archive])
966e5410a46Smrg# Loop over all known methods to create a tar archive until one works.
967e5410a46Smrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
968e5410a46Smrg_am_tools=${am_cv_prog_tar_$1-$_am_tools}
969e5410a46Smrg# Do not fold the above two line into one, because Tru64 sh and
970e5410a46Smrg# Solaris sh will not grok spaces in the rhs of `-'.
971e5410a46Smrgfor _am_tool in $_am_tools
972e5410a46Smrgdo
973e5410a46Smrg  case $_am_tool in
974e5410a46Smrg  gnutar)
975e5410a46Smrg    for _am_tar in tar gnutar gtar;
976e5410a46Smrg    do
977e5410a46Smrg      AM_RUN_LOG([$_am_tar --version]) && break
978e5410a46Smrg    done
979e5410a46Smrg    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
980e5410a46Smrg    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
981e5410a46Smrg    am__untar="$_am_tar -xf -"
982e5410a46Smrg    ;;
983e5410a46Smrg  plaintar)
984e5410a46Smrg    # Must skip GNU tar: if it does not support --format= it doesn't create
985e5410a46Smrg    # ustar tarball either.
986e5410a46Smrg    (tar --version) >/dev/null 2>&1 && continue
987e5410a46Smrg    am__tar='tar chf - "$$tardir"'
988e5410a46Smrg    am__tar_='tar chf - "$tardir"'
989e5410a46Smrg    am__untar='tar xf -'
990e5410a46Smrg    ;;
991e5410a46Smrg  pax)
992e5410a46Smrg    am__tar='pax -L -x $1 -w "$$tardir"'
993e5410a46Smrg    am__tar_='pax -L -x $1 -w "$tardir"'
994e5410a46Smrg    am__untar='pax -r'
995e5410a46Smrg    ;;
996e5410a46Smrg  cpio)
997e5410a46Smrg    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
998e5410a46Smrg    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
999e5410a46Smrg    am__untar='cpio -i -H $1 -d'
1000e5410a46Smrg    ;;
1001e5410a46Smrg  none)
1002e5410a46Smrg    am__tar=false
1003e5410a46Smrg    am__tar_=false
1004e5410a46Smrg    am__untar=false
1005e5410a46Smrg    ;;
1006e5410a46Smrg  esac
1007e5410a46Smrg
1008e5410a46Smrg  # If the value was cached, stop now.  We just wanted to have am__tar
1009e5410a46Smrg  # and am__untar set.
1010e5410a46Smrg  test -n "${am_cv_prog_tar_$1}" && break
1011e5410a46Smrg
1012e5410a46Smrg  # tar/untar a dummy directory, and stop if the command works
1013e5410a46Smrg  rm -rf conftest.dir
1014e5410a46Smrg  mkdir conftest.dir
1015e5410a46Smrg  echo GrepMe > conftest.dir/file
1016e5410a46Smrg  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
1017e5410a46Smrg  rm -rf conftest.dir
1018e5410a46Smrg  if test -s conftest.tar; then
1019e5410a46Smrg    AM_RUN_LOG([$am__untar <conftest.tar])
1020e5410a46Smrg    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
1021e5410a46Smrg  fi
1022e5410a46Smrgdone
1023e5410a46Smrgrm -rf conftest.dir
1024e5410a46Smrg
1025e5410a46SmrgAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
1026e5410a46SmrgAC_MSG_RESULT([$am_cv_prog_tar_$1])])
1027e5410a46SmrgAC_SUBST([am__tar])
1028e5410a46SmrgAC_SUBST([am__untar])
1029e5410a46Smrg]) # _AM_PROG_TAR
1030e5410a46Smrg
1031e5410a46Smrgdnl xorg-macros.m4.  Generated from xorg-macros.m4.in xorgversion.m4 by configure.
1032e5410a46Smrgdnl
1033e5410a46Smrgdnl Copyright 2005-2006 Sun Microsystems, Inc.  All rights reserved.
1034e5410a46Smrgdnl 
1035e5410a46Smrgdnl Permission is hereby granted, free of charge, to any person obtaining a
1036e5410a46Smrgdnl copy of this software and associated documentation files (the
1037e5410a46Smrgdnl "Software"), to deal in the Software without restriction, including
1038e5410a46Smrgdnl without limitation the rights to use, copy, modify, merge, publish,
1039e5410a46Smrgdnl distribute, and/or sell copies of the Software, and to permit persons
1040e5410a46Smrgdnl to whom the Software is furnished to do so, provided that the above
1041e5410a46Smrgdnl copyright notice(s) and this permission notice appear in all copies of
1042e5410a46Smrgdnl the Software and that both the above copyright notice(s) and this
1043e5410a46Smrgdnl permission notice appear in supporting documentation.
1044e5410a46Smrgdnl
1045e5410a46Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
1046e5410a46Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
1047e5410a46Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
1048e5410a46Smrgdnl OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
1049e5410a46Smrgdnl HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
1050e5410a46Smrgdnl INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
1051e5410a46Smrgdnl FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
1052e5410a46Smrgdnl NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
1053e5410a46Smrgdnl WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
1054e5410a46Smrgdnl
1055e5410a46Smrgdnl Except as contained in this notice, the name of a copyright holder
1056e5410a46Smrgdnl shall not be used in advertising or otherwise to promote the sale, use
1057e5410a46Smrgdnl or other dealings in this Software without prior written authorization
1058e5410a46Smrgdnl of the copyright holder.
1059e5410a46Smrg
1060e5410a46Smrg# XORG_MACROS_VERSION(required-version)
1061e5410a46Smrg# -------------------------------------
1062e5410a46Smrg# Minimum version: 1.1.0
10631f0ac6a5Smrg#
1064e5410a46Smrg# If you're using a macro added in Version 1.1 or newer, include this in
1065e5410a46Smrg# your configure.ac with the minimum required version, such as:
1066e5410a46Smrg# XORG_MACROS_VERSION(1.1)
10671f0ac6a5Smrg#
1068e5410a46Smrg# To ensure that this macro is defined, also add:
1069e5410a46Smrg# m4_ifndef([XORG_MACROS_VERSION],
1070e5410a46Smrg#     [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])])
10711f0ac6a5Smrg#
1072e5410a46Smrg#
1073e5410a46Smrg# See the "minimum version" comment for each macro you use to see what 
1074e5410a46Smrg# version you require.
1075e5410a46Smrgm4_defun([XORG_MACROS_VERSION],[
1076e5410a46Smrgm4_define([vers_have], [1.3.0])
1077e5410a46Smrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.])))
1078e5410a46Smrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.])))
1079e5410a46Smrgm4_if(m4_cmp(maj_have, maj_needed), 0,,
1080e5410a46Smrg    [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])])
1081e5410a46Smrgm4_if(m4_version_compare(vers_have, [$1]), -1,
1082e5410a46Smrg    [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])])
1083e5410a46Smrgm4_undefine([vers_have])
1084e5410a46Smrgm4_undefine([maj_have])
1085e5410a46Smrgm4_undefine([maj_needed])
1086e5410a46Smrg]) # XORG_MACROS_VERSION
10871f0ac6a5Smrg
1088e5410a46Smrg# XORG_PROG_RAWCPP()
1089e5410a46Smrg# ------------------
1090e5410a46Smrg# Minimum version: 1.0.0
1091e5410a46Smrg#
1092e5410a46Smrg# Find cpp program and necessary flags for use in pre-processing text files
1093e5410a46Smrg# such as man pages and config files
1094e5410a46SmrgAC_DEFUN([XORG_PROG_RAWCPP],[
1095e5410a46SmrgAC_REQUIRE([AC_PROG_CPP])
1096e5410a46SmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 
1097e5410a46Smrg   [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib])
10981f0ac6a5Smrg
1099e5410a46Smrg# Check for flag to avoid builtin definitions - assumes unix is predefined,
1100e5410a46Smrg# which is not the best choice for supporting other OS'es, but covers most
1101e5410a46Smrg# of the ones we need for now.
1102e5410a46SmrgAC_MSG_CHECKING([if $RAWCPP requires -undef])
1103e5410a46SmrgAC_LANG_CONFTEST([Does cpp redefine unix ?])
1104e5410a46Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
1105e5410a46Smrg	AC_MSG_RESULT([no])
1106e5410a46Smrgelse
1107e5410a46Smrg	if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
1108e5410a46Smrg		RAWCPPFLAGS=-undef
1109e5410a46Smrg		AC_MSG_RESULT([yes])
1110e5410a46Smrg	# under Cygwin unix is still defined even with -undef
1111e5410a46Smrg	elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
1112e5410a46Smrg		RAWCPPFLAGS="-undef -ansi"
1113e5410a46Smrg		AC_MSG_RESULT([yes, with -ansi])
1114e5410a46Smrg	else
1115e5410a46Smrg		AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef.  I don't know what to do.])
1116e5410a46Smrg	fi
1117e5410a46Smrgfi
1118e5410a46Smrgrm -f conftest.$ac_ext
1119e5410a46Smrg
1120e5410a46SmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional])
1121e5410a46SmrgAC_LANG_CONFTEST([Does cpp preserve   "whitespace"?])
1122e5410a46Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
1123e5410a46Smrg	AC_MSG_RESULT([no])
1124e5410a46Smrgelse
1125e5410a46Smrg	if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
1126e5410a46Smrg		RAWCPPFLAGS="${RAWCPPFLAGS} -traditional"
1127e5410a46Smrg		AC_MSG_RESULT([yes])
1128e5410a46Smrg	else
1129e5410a46Smrg		AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional.  I don't know what to do.])
1130e5410a46Smrg	fi
1131e5410a46Smrgfi
1132e5410a46Smrgrm -f conftest.$ac_ext
1133e5410a46SmrgAC_SUBST(RAWCPPFLAGS)
1134e5410a46Smrg]) # XORG_PROG_RAWCPP
11351f0ac6a5Smrg
1136e5410a46Smrg# XORG_MANPAGE_SECTIONS()
1137e5410a46Smrg# -----------------------
1138e5410a46Smrg# Minimum version: 1.0.0
11391f0ac6a5Smrg#
1140e5410a46Smrg# Determine which sections man pages go in for the different man page types
1141e5410a46Smrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files.
1142e5410a46Smrg# Not sure if there's any better way than just hardcoding by OS name.
1143e5410a46Smrg# Override default settings by setting environment variables
11441f0ac6a5Smrg
1145e5410a46SmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[
1146e5410a46SmrgAC_REQUIRE([AC_CANONICAL_HOST])
11471f0ac6a5Smrg
1148e5410a46Smrgif test x$APP_MAN_SUFFIX = x    ; then
1149e5410a46Smrg    APP_MAN_SUFFIX=1
1150e5410a46Smrgfi
1151e5410a46Smrgif test x$APP_MAN_DIR = x    ; then
1152e5410a46Smrg    APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)'
11531f0ac6a5Smrgfi
11541f0ac6a5Smrg
1155e5410a46Smrgif test x$LIB_MAN_SUFFIX = x    ; then
1156e5410a46Smrg    LIB_MAN_SUFFIX=3
1157e5410a46Smrgfi
1158e5410a46Smrgif test x$LIB_MAN_DIR = x    ; then
1159e5410a46Smrg    LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)'
1160e5410a46Smrgfi
11611f0ac6a5Smrg
1162e5410a46Smrgif test x$FILE_MAN_SUFFIX = x    ; then
1163e5410a46Smrg    case $host_os in
1164e5410a46Smrg	solaris*)	FILE_MAN_SUFFIX=4  ;;
1165e5410a46Smrg	*)		FILE_MAN_SUFFIX=5  ;;
1166e5410a46Smrg    esac
1167e5410a46Smrgfi
1168e5410a46Smrgif test x$FILE_MAN_DIR = x    ; then
1169e5410a46Smrg    FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)'
1170e5410a46Smrgfi
11711f0ac6a5Smrg
1172e5410a46Smrgif test x$MISC_MAN_SUFFIX = x    ; then
1173e5410a46Smrg    case $host_os in
1174e5410a46Smrg	solaris*)	MISC_MAN_SUFFIX=5  ;;
1175e5410a46Smrg	*)		MISC_MAN_SUFFIX=7  ;;
1176e5410a46Smrg    esac
1177e5410a46Smrgfi
1178e5410a46Smrgif test x$MISC_MAN_DIR = x    ; then
1179e5410a46Smrg    MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)'
1180e5410a46Smrgfi
11811f0ac6a5Smrg
1182e5410a46Smrgif test x$DRIVER_MAN_SUFFIX = x    ; then
1183e5410a46Smrg    case $host_os in
1184e5410a46Smrg	solaris*)	DRIVER_MAN_SUFFIX=7  ;;
1185e5410a46Smrg	*)		DRIVER_MAN_SUFFIX=4  ;;
1186e5410a46Smrg    esac
1187e5410a46Smrgfi
1188e5410a46Smrgif test x$DRIVER_MAN_DIR = x    ; then
1189e5410a46Smrg    DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)'
1190e5410a46Smrgfi
11911f0ac6a5Smrg
1192e5410a46Smrgif test x$ADMIN_MAN_SUFFIX = x    ; then
1193e5410a46Smrg    case $host_os in
1194e5410a46Smrg	solaris*)	ADMIN_MAN_SUFFIX=1m ;;
1195e5410a46Smrg	*)		ADMIN_MAN_SUFFIX=8  ;;
1196e5410a46Smrg    esac
1197e5410a46Smrgfi
1198e5410a46Smrgif test x$ADMIN_MAN_DIR = x    ; then
1199e5410a46Smrg    ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)'
1200e5410a46Smrgfi
12011f0ac6a5Smrg
12021f0ac6a5Smrg
1203e5410a46SmrgAC_SUBST([APP_MAN_SUFFIX])
1204e5410a46SmrgAC_SUBST([LIB_MAN_SUFFIX])
1205e5410a46SmrgAC_SUBST([FILE_MAN_SUFFIX])
1206e5410a46SmrgAC_SUBST([MISC_MAN_SUFFIX])
1207e5410a46SmrgAC_SUBST([DRIVER_MAN_SUFFIX])
1208e5410a46SmrgAC_SUBST([ADMIN_MAN_SUFFIX])
1209e5410a46SmrgAC_SUBST([APP_MAN_DIR])
1210e5410a46SmrgAC_SUBST([LIB_MAN_DIR])
1211e5410a46SmrgAC_SUBST([FILE_MAN_DIR])
1212e5410a46SmrgAC_SUBST([MISC_MAN_DIR])
1213e5410a46SmrgAC_SUBST([DRIVER_MAN_DIR])
1214e5410a46SmrgAC_SUBST([ADMIN_MAN_DIR])
1215e5410a46Smrg]) # XORG_MANPAGE_SECTIONS
12161f0ac6a5Smrg
1217e5410a46Smrg# XORG_CHECK_LINUXDOC
1218e5410a46Smrg# -------------------
1219e5410a46Smrg# Minimum version: 1.0.0
1220e5410a46Smrg#
1221e5410a46Smrg# Defines the variable MAKE_TEXT if the necessary tools and
1222e5410a46Smrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt.
1223e5410a46Smrg# Whether or not the necessary tools and files are found can be checked
1224e5410a46Smrg# with the AM_CONDITIONAL "BUILD_LINUXDOC"
1225e5410a46SmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[
1226e5410a46Smrgif test x$XORG_SGML_PATH = x ; then
1227e5410a46Smrg    XORG_SGML_PATH=$prefix/share/sgml
1228e5410a46Smrgfi
1229e5410a46SmrgHAVE_DEFS_ENT=
12301f0ac6a5Smrg
1231e5410a46Smrgif test x"$cross_compiling" = x"yes" ; then
1232e5410a46Smrg  HAVE_DEFS_ENT=no
12331f0ac6a5Smrgelse
1234e5410a46Smrg  AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes])
12351f0ac6a5Smrgfi
12361f0ac6a5Smrg
1237e5410a46SmrgAC_PATH_PROG(LINUXDOC, linuxdoc)
1238e5410a46SmrgAC_PATH_PROG(PS2PDF, ps2pdf)
12391f0ac6a5Smrg
1240e5410a46SmrgAC_MSG_CHECKING([Whether to build documentation])
12411f0ac6a5Smrg
1242e5410a46Smrgif test x$HAVE_DEFS_ENT != x && test x$LINUXDOC != x ; then
1243e5410a46Smrg   BUILDDOC=yes
1244e5410a46Smrgelse
1245e5410a46Smrg   BUILDDOC=no
12461f0ac6a5Smrgfi
12471f0ac6a5Smrg
1248e5410a46SmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes])
1249e5410a46Smrg
1250e5410a46SmrgAC_MSG_RESULT([$BUILDDOC])
1251e5410a46Smrg
1252e5410a46SmrgAC_MSG_CHECKING([Whether to build pdf documentation])
12531f0ac6a5Smrg
1254e5410a46Smrgif test x$PS2PDF != x && test x$BUILD_PDFDOC != xno; then
1255e5410a46Smrg   BUILDPDFDOC=yes
1256e5410a46Smrgelse
1257e5410a46Smrg   BUILDPDFDOC=no
1258e5410a46Smrgfi
12591f0ac6a5Smrg
1260e5410a46SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
12611f0ac6a5Smrg
1262e5410a46SmrgAC_MSG_RESULT([$BUILDPDFDOC])
12631f0ac6a5Smrg
1264e5410a46SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt"
1265e5410a46SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps"
1266e5410a46SmrgMAKE_PDF="$PS2PDF"
1267e5410a46SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC  -B html --split=0"
12681f0ac6a5Smrg
1269e5410a46SmrgAC_SUBST(MAKE_TEXT)
1270e5410a46SmrgAC_SUBST(MAKE_PS)
1271e5410a46SmrgAC_SUBST(MAKE_PDF)
1272e5410a46SmrgAC_SUBST(MAKE_HTML)
1273e5410a46Smrg]) # XORG_CHECK_LINUXDOC
12741f0ac6a5Smrg
1275e5410a46Smrg# XORG_CHECK_DOCBOOK
1276e5410a46Smrg# -------------------
1277e5410a46Smrg# Minimum version: 1.0.0
12781f0ac6a5Smrg#
1279e5410a46Smrg# Checks for the ability to build output formats from SGML DocBook source.
1280e5410a46Smrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC"
1281e5410a46Smrg# indicates whether the necessary tools and files are found and, if set,
1282e5410a46Smrg# $(MAKE_XXX) blah.sgml will produce blah.xxx.
1283e5410a46SmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[
1284e5410a46Smrgif test x$XORG_SGML_PATH = x ; then
1285e5410a46Smrg    XORG_SGML_PATH=$prefix/share/sgml
1286e5410a46Smrgfi
1287e5410a46SmrgHAVE_DEFS_ENT=
1288e5410a46SmrgBUILDTXTDOC=no
1289e5410a46SmrgBUILDPDFDOC=no
1290e5410a46SmrgBUILDPSDOC=no
1291e5410a46SmrgBUILDHTMLDOC=no
12921f0ac6a5Smrg
1293e5410a46SmrgAC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes])
12941f0ac6a5Smrg
1295e5410a46SmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps)
1296e5410a46SmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf)
1297e5410a46SmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html)
1298e5410a46SmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt)
12991f0ac6a5Smrg
1300e5410a46SmrgAC_MSG_CHECKING([Whether to build text documentation])
1301e5410a46Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKTXT != x &&
1302e5410a46Smrg   test x$BUILD_TXTDOC != xno; then
1303e5410a46Smrg	BUILDTXTDOC=yes
1304e5410a46Smrgfi
1305e5410a46SmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes])
1306e5410a46SmrgAC_MSG_RESULT([$BUILDTXTDOC])
13071f0ac6a5Smrg
1308e5410a46SmrgAC_MSG_CHECKING([Whether to build PDF documentation])
1309e5410a46Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPDF != x &&
1310e5410a46Smrg   test x$BUILD_PDFDOC != xno; then
1311e5410a46Smrg	BUILDPDFDOC=yes
1312e5410a46Smrgfi
1313e5410a46SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
1314e5410a46SmrgAC_MSG_RESULT([$BUILDPDFDOC])
13151f0ac6a5Smrg
1316e5410a46SmrgAC_MSG_CHECKING([Whether to build PostScript documentation])
1317e5410a46Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPS != x &&
1318e5410a46Smrg   test x$BUILD_PSDOC != xno; then
1319e5410a46Smrg	BUILDPSDOC=yes
1320e5410a46Smrgfi
1321e5410a46SmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes])
1322e5410a46SmrgAC_MSG_RESULT([$BUILDPSDOC])
13231f0ac6a5Smrg
1324e5410a46SmrgAC_MSG_CHECKING([Whether to build HTML documentation])
1325e5410a46Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKHTML != x &&
1326e5410a46Smrg   test x$BUILD_HTMLDOC != xno; then
1327e5410a46Smrg	BUILDHTMLDOC=yes
1328e5410a46Smrgfi
1329e5410a46SmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes])
1330e5410a46SmrgAC_MSG_RESULT([$BUILDHTMLDOC])
13311f0ac6a5Smrg
1332e5410a46SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT"
1333e5410a46SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS"
1334e5410a46SmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF"
1335e5410a46SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML"
1336e5410a46Smrg
1337e5410a46SmrgAC_SUBST(MAKE_TEXT)
1338e5410a46SmrgAC_SUBST(MAKE_PS)
1339e5410a46SmrgAC_SUBST(MAKE_PDF)
1340e5410a46SmrgAC_SUBST(MAKE_HTML)
1341e5410a46Smrg]) # XORG_CHECK_DOCBOOK
1342e5410a46Smrg
1343e5410a46Smrg# XORG_CHECK_MALLOC_ZERO
1344e5410a46Smrg# ----------------------
1345e5410a46Smrg# Minimum version: 1.0.0
1346e5410a46Smrg#
1347e5410a46Smrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if
1348e5410a46Smrg# malloc(0) returns NULL.  Packages should add one of these cflags to
1349e5410a46Smrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them.
1350e5410a46SmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[
1351e5410a46SmrgAC_ARG_ENABLE(malloc0returnsnull,
1352e5410a46Smrg	AS_HELP_STRING([--enable-malloc0returnsnull],
1353e5410a46Smrg		       [malloc(0) returns NULL (default: auto)]),
1354e5410a46Smrg	[MALLOC_ZERO_RETURNS_NULL=$enableval],
1355e5410a46Smrg	[MALLOC_ZERO_RETURNS_NULL=auto])
1356e5410a46Smrg
1357e5410a46SmrgAC_MSG_CHECKING([whether malloc(0) returns NULL])
1358e5410a46Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then
1359e5410a46Smrg	AC_RUN_IFELSE([
1360e5410a46Smrgchar *malloc();
1361e5410a46Smrgchar *realloc();
1362e5410a46Smrgchar *calloc();
1363e5410a46Smrgmain() {
1364e5410a46Smrg    char *m0, *r0, *c0, *p;
1365e5410a46Smrg    m0 = malloc(0);
1366e5410a46Smrg    p = malloc(10);
1367e5410a46Smrg    r0 = realloc(p,0);
1368e5410a46Smrg    c0 = calloc(0);
1369e5410a46Smrg    exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1);
1370e5410a46Smrg}],
1371e5410a46Smrg		[MALLOC_ZERO_RETURNS_NULL=yes],
1372e5410a46Smrg		[MALLOC_ZERO_RETURNS_NULL=no])
13731f0ac6a5Smrgfi
1374e5410a46SmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL])
13751f0ac6a5Smrg
1376e5410a46Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then
1377e5410a46Smrg	MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL"
1378e5410a46Smrg	XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS
1379e5410a46Smrg	XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC"
1380e5410a46Smrgelse
1381e5410a46Smrg	MALLOC_ZERO_CFLAGS=""
1382e5410a46Smrg	XMALLOC_ZERO_CFLAGS=""
1383e5410a46Smrg	XTMALLOC_ZERO_CFLAGS=""
13841f0ac6a5Smrgfi
13851f0ac6a5Smrg
1386e5410a46SmrgAC_SUBST([MALLOC_ZERO_CFLAGS])
1387e5410a46SmrgAC_SUBST([XMALLOC_ZERO_CFLAGS])
1388e5410a46SmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS])
1389e5410a46Smrg]) # XORG_CHECK_MALLOC_ZERO
13901f0ac6a5Smrg
1391e5410a46Smrg# XORG_WITH_LINT()
1392e5410a46Smrg# ----------------
1393e5410a46Smrg# Minimum version: 1.1.0
1394e5410a46Smrg#
1395e5410a46Smrg# Sets up flags for source checkers such as lint and sparse if --with-lint
1396e5410a46Smrg# is specified.   (Use --with-lint=sparse for sparse.)
1397e5410a46Smrg# Sets $LINT to name of source checker passed with --with-lint (default: lint)
1398e5410a46Smrg# Sets $LINT_FLAGS to flags to pass to source checker
1399e5410a46Smrg# Sets LINT automake conditional if enabled (default: disabled)
1400e5410a46Smrg#
1401e5410a46SmrgAC_DEFUN([XORG_WITH_LINT],[
14021f0ac6a5Smrg
1403e5410a46Smrg# Allow checking code with lint, sparse, etc.
1404e5410a46SmrgAC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint],
1405e5410a46Smrg		[Use a lint-style source code checker (default: disabled)])],
1406e5410a46Smrg		[use_lint=$withval], [use_lint=no])
1407e5410a46Smrgif test "x$use_lint" = "xyes" ; then
1408e5410a46Smrg	LINT="lint"
1409e5410a46Smrgelse
1410e5410a46Smrg	LINT="$use_lint"
1411e5410a46Smrgfi
1412e5410a46Smrgif test "x$LINT_FLAGS" = "x" -a "x$LINT" != "xno" ; then
1413e5410a46Smrg    case $LINT in
1414e5410a46Smrg	lint|*/lint)
1415e5410a46Smrg	    case $host_os in
1416e5410a46Smrg		solaris*)
1417e5410a46Smrg			LINT_FLAGS="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2"
1418e5410a46Smrg			;;
1419e5410a46Smrg	    esac
1420e5410a46Smrg	    ;;
1421e5410a46Smrg    esac
1422e5410a46Smrgfi
14231f0ac6a5Smrg
1424e5410a46SmrgAC_SUBST(LINT)
1425e5410a46SmrgAC_SUBST(LINT_FLAGS)
1426e5410a46SmrgAM_CONDITIONAL(LINT, [test x$LINT != xno])
14271f0ac6a5Smrg
1428e5410a46Smrg]) # XORG_WITH_LINT
14291f0ac6a5Smrg
1430e5410a46Smrg# XORG_LINT_LIBRARY(LIBNAME)
1431e5410a46Smrg# --------------------------
1432e5410a46Smrg# Minimum version: 1.1.0
1433e5410a46Smrg#
1434e5410a46Smrg# Sets up flags for building lint libraries for checking programs that call
1435e5410a46Smrg# functions in the library.
1436e5410a46Smrg# Disabled by default, enable with --enable-lint-library
1437e5410a46Smrg# Sets: 
1438e5410a46Smrg#	@LINTLIB@		- name of lint library file to make
1439e5410a46Smrg#	MAKE_LINT_LIB		- automake conditional
1440e5410a46Smrg#
14411f0ac6a5Smrg
1442e5410a46SmrgAC_DEFUN([XORG_LINT_LIBRARY],[
1443e5410a46SmrgAC_REQUIRE([XORG_WITH_LINT])
1444e5410a46Smrg# Build lint "library" for more indepth checks of programs calling this library
1445e5410a46SmrgAC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library],
1446e5410a46Smrg	[Create lint library (default: disabled)])],
1447e5410a46Smrg	[make_lint_lib=$enableval], [make_lint_lib=no])
1448e5410a46Smrgif test "x$make_lint_lib" != "xno" ; then
1449e5410a46Smrg	if test "x$LINT" = "xno" ; then
1450e5410a46Smrg		AC_MSG_ERROR([Cannot make lint library without --with-lint])
1451e5410a46Smrg	fi
1452e5410a46Smrg	if test "x$make_lint_lib" = "xyes" ; then
1453e5410a46Smrg		LINTLIB=llib-l$1.ln
1454e5410a46Smrg	else
1455e5410a46Smrg		LINTLIB=$make_lint_lib
1456e5410a46Smrg	fi
1457e5410a46Smrgfi
1458e5410a46SmrgAC_SUBST(LINTLIB)
1459e5410a46SmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno])
1460e5410a46Smrg
1461e5410a46Smrg]) # XORG_LINT_LIBRARY
1462e5410a46Smrg
1463e5410a46Smrg# XORG_CWARNFLAGS
1464e5410a46Smrg# ---------------
1465e5410a46Smrg# Minimum version: 1.2.0
14661f0ac6a5Smrg#
1467e5410a46Smrg# Defines CWARNFLAGS to enable C compiler warnings.
1468e5410a46Smrg#
1469e5410a46SmrgAC_DEFUN([XORG_CWARNFLAGS], [
1470e5410a46SmrgAC_REQUIRE([AC_PROG_CC])
1471e5410a46Smrgif  test "x$GCC" = xyes ; then
1472e5410a46Smrg    CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \
1473e5410a46Smrg-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \
1474e5410a46Smrg-Wbad-function-cast"
1475e5410a46Smrg    case `$CC -dumpversion` in
1476e5410a46Smrg    3.4.* | 4.*)
1477e5410a46Smrg	CWARNFLAGS="$CWARNFLAGS -Wold-style-definition -Wdeclaration-after-statement"
1478e5410a46Smrg	;;
1479e5410a46Smrg    esac
1480e5410a46Smrgelse
1481e5410a46Smrg    AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
1482e5410a46Smrg    if test "x$SUNCC" = "xyes"; then
1483e5410a46Smrg	CWARNFLAGS="-v"
1484e5410a46Smrg    fi
1485e5410a46Smrgfi
1486e5410a46SmrgAC_SUBST(CWARNFLAGS)
1487e5410a46Smrgm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
1488e5410a46Smrg]) # XORG_CWARNFLAGS
14891f0ac6a5Smrg
1490e5410a46Smrg# XORG_STRICT_OPTION
1491e5410a46Smrg# -----------------------
1492e5410a46Smrg# Minimum version: 1.3.0
1493e5410a46Smrg#
1494e5410a46Smrg# Add configure option to enable strict compilation
1495e5410a46SmrgAC_DEFUN([XORG_STRICT_OPTION], [
1496e5410a46SmrgAC_REQUIRE([AC_PROG_CC])
1497e5410a46SmrgAC_REQUIRE([AC_PROG_CC_C99])
1498e5410a46SmrgAC_REQUIRE([XORG_CWARNFLAGS])
1499e5410a46Smrg
1500e5410a46SmrgAC_ARG_ENABLE(strict-compilation,
1501e5410a46Smrg			  AS_HELP_STRING([--enable-strict-compilation],
1502e5410a46Smrg			  [Enable all warnings from compiler and make them errors (default: disabled)]),
1503e5410a46Smrg			  [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no])
1504e5410a46Smrgif test "x$STRICT_COMPILE" = "xyes"; then
1505e5410a46Smrg	AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
1506e5410a46Smrg	AC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"])
1507e5410a46Smrg	if test "x$GCC" = xyes ; then
1508e5410a46Smrg		STRICT_CFLAGS="-pedantic -Werror"
1509e5410a46Smrg	elif test "x$SUNCC" = "xyes"; then
1510e5410a46Smrg		STRICT_CFLAGS="-errwarn"
1511e5410a46Smrg    elif test "x$INTELCC" = "xyes"; then
1512e5410a46Smrg		STRICT_CFLAGS="-Werror"
1513e5410a46Smrg	fi
1514e5410a46Smrgfi
1515e5410a46SmrgCWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"
1516e5410a46SmrgAC_SUBST([CWARNFLAGS])
1517e5410a46Smrg]) # XORG_STRICT_OPTION
15181f0ac6a5Smrg
1519e5410a46Smrg# XORG_DEFAULT_OPTIONS
1520e5410a46Smrg# --------------------
1521e5410a46Smrg# Minimum version: 1.3.0
15221f0ac6a5Smrg#
1523e5410a46Smrg# Defines default options for X.Org modules.
1524e5410a46Smrg#
1525e5410a46SmrgAC_DEFUN([XORG_DEFAULT_OPTIONS], [
1526e5410a46SmrgXORG_CWARNFLAGS
1527e5410a46SmrgXORG_STRICT_OPTION
1528e5410a46SmrgXORG_RELEASE_VERSION
1529e5410a46SmrgXORG_CHANGELOG
1530e5410a46SmrgXORG_MANPAGE_SECTIONS
1531e5410a46Smrg]) # XORG_DEFAULT_OPTIONS
1532e5410a46Smrgdnl Copyright 2005 Red Hat, Inc
1533e5410a46Smrgdnl
1534e5410a46Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its
1535e5410a46Smrgdnl documentation for any purpose is hereby granted without fee, provided that
1536e5410a46Smrgdnl the above copyright notice appear in all copies and that both that
1537e5410a46Smrgdnl copyright notice and this permission notice appear in supporting
1538e5410a46Smrgdnl documentation.
1539e5410a46Smrgdnl
1540e5410a46Smrgdnl The above copyright notice and this permission notice shall be included
1541e5410a46Smrgdnl in all copies or substantial portions of the Software.
1542e5410a46Smrgdnl
1543e5410a46Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
1544e5410a46Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
1545e5410a46Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
1546e5410a46Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
1547e5410a46Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
1548e5410a46Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
1549e5410a46Smrgdnl OTHER DEALINGS IN THE SOFTWARE.
1550e5410a46Smrgdnl
1551e5410a46Smrgdnl Except as contained in this notice, the name of the copyright holders shall
1552e5410a46Smrgdnl not be used in advertising or otherwise to promote the sale, use or
1553e5410a46Smrgdnl other dealings in this Software without prior written authorization
1554e5410a46Smrgdnl from the copyright holders.
1555e5410a46Smrgdnl
15561f0ac6a5Smrg
1557e5410a46Smrg# XORG_RELEASE_VERSION
1558e5410a46Smrg# --------------------
1559e5410a46Smrg# Adds --with/without-release-string and changes the PACKAGE and
1560e5410a46Smrg# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION".  If
1561e5410a46Smrg# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged.  Also
1562e5410a46Smrg# defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use.
1563e5410a46Smrg 
1564e5410a46SmrgAC_DEFUN([XORG_RELEASE_VERSION],[
1565e5410a46Smrg	AC_ARG_WITH(release-version,
1566e5410a46Smrg			AS_HELP_STRING([--with-release-version=STRING],
1567e5410a46Smrg				[Use release version string in package name]),
1568e5410a46Smrg			[RELEASE_VERSION="$withval"],
1569e5410a46Smrg			[RELEASE_VERSION=""])
1570e5410a46Smrg	if test "x$RELEASE_VERSION" != "x"; then
1571e5410a46Smrg		PACKAGE="$PACKAGE-$RELEASE_VERSION"
1572e5410a46Smrg		PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION"
1573e5410a46Smrg		AC_MSG_NOTICE([Building with package name set to $PACKAGE])
1574e5410a46Smrg	fi
1575e5410a46Smrg	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR],
1576e5410a46Smrg		[`echo $PACKAGE_VERSION | cut -d . -f 1`],
1577e5410a46Smrg		[Major version of this package])
1578e5410a46Smrg	PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1`
1579e5410a46Smrg	if test "x$PVM" = "x"; then
1580e5410a46Smrg		PVM="0"
1581e5410a46Smrg	fi
1582e5410a46Smrg	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR],
1583e5410a46Smrg		[$PVM],
1584e5410a46Smrg		[Minor version of this package])
1585e5410a46Smrg	PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1`
1586e5410a46Smrg	if test "x$PVP" = "x"; then
1587e5410a46Smrg		PVP="0"
1588e5410a46Smrg	fi
1589e5410a46Smrg	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL],
1590e5410a46Smrg		[$PVP],
1591e5410a46Smrg		[Patch version of this package])
1592e5410a46Smrg])
15931f0ac6a5Smrg
1594e5410a46Smrg# XORG_CHANGELOG()
1595e5410a46Smrg# ----------------
1596e5410a46Smrg# Minimum version: 1.2.0
1597e5410a46Smrg#
1598e5410a46Smrg# Defines the variable CHANGELOG_CMD as the command to generate
1599e5410a46Smrg# ChangeLog from git.
1600e5410a46Smrg#
1601e5410a46Smrg# Arrange that distcleancheck ignores ChangeLog left over by distclean.
1602e5410a46Smrg#
1603e5410a46SmrgAC_DEFUN([XORG_CHANGELOG], [
1604e5410a46SmrgCHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > .changelog.tmp && \
1605e5410a46Smrgmv .changelog.tmp ChangeLog) || (rm -f .changelog.tmp; touch ChangeLog; \
1606e5410a46Smrgecho 'git directory not found: installing possibly empty changelog.' >&2)"
1607e5410a46SmrgAC_SUBST([CHANGELOG_CMD])
1608e5410a46SmrgAC_SUBST([distcleancheck_listfiles], ['find . -type f ! -name ChangeLog -print'])
1609e5410a46Smrg]) # XORG_CHANGELOG
16101f0ac6a5Smrg
16111f0ac6a5Smrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
16121f0ac6a5Smrg
1613e5410a46Smrg# serial 52 AC_PROG_LIBTOOL
16141f0ac6a5Smrg
16151f0ac6a5Smrg
16161f0ac6a5Smrg# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
16171f0ac6a5Smrg# -----------------------------------------------------------
16181f0ac6a5Smrg# If this macro is not defined by Autoconf, define it here.
16191f0ac6a5Smrgm4_ifdef([AC_PROVIDE_IFELSE],
16201f0ac6a5Smrg         [],
16211f0ac6a5Smrg         [m4_define([AC_PROVIDE_IFELSE],
16221f0ac6a5Smrg	         [m4_ifdef([AC_PROVIDE_$1],
16231f0ac6a5Smrg		           [$2], [$3])])])
16241f0ac6a5Smrg
16251f0ac6a5Smrg
16261f0ac6a5Smrg# AC_PROG_LIBTOOL
16271f0ac6a5Smrg# ---------------
16281f0ac6a5SmrgAC_DEFUN([AC_PROG_LIBTOOL],
16291f0ac6a5Smrg[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
16301f0ac6a5Smrgdnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
16311f0ac6a5Smrgdnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
16321f0ac6a5Smrg  AC_PROVIDE_IFELSE([AC_PROG_CXX],
16331f0ac6a5Smrg    [AC_LIBTOOL_CXX],
16341f0ac6a5Smrg    [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
16351f0ac6a5Smrg  ])])
16361f0ac6a5Smrgdnl And a similar setup for Fortran 77 support
16371f0ac6a5Smrg  AC_PROVIDE_IFELSE([AC_PROG_F77],
16381f0ac6a5Smrg    [AC_LIBTOOL_F77],
16391f0ac6a5Smrg    [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
16401f0ac6a5Smrg])])
16411f0ac6a5Smrg
16421f0ac6a5Smrgdnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
16431f0ac6a5Smrgdnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
16441f0ac6a5Smrgdnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
16451f0ac6a5Smrg  AC_PROVIDE_IFELSE([AC_PROG_GCJ],
16461f0ac6a5Smrg    [AC_LIBTOOL_GCJ],
16471f0ac6a5Smrg    [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
16481f0ac6a5Smrg      [AC_LIBTOOL_GCJ],
16491f0ac6a5Smrg      [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
16501f0ac6a5Smrg	[AC_LIBTOOL_GCJ],
16511f0ac6a5Smrg      [ifdef([AC_PROG_GCJ],
16521f0ac6a5Smrg	     [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
16531f0ac6a5Smrg       ifdef([A][M_PROG_GCJ],
16541f0ac6a5Smrg	     [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
16551f0ac6a5Smrg       ifdef([LT_AC_PROG_GCJ],
16561f0ac6a5Smrg	     [define([LT_AC_PROG_GCJ],
16571f0ac6a5Smrg		defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
16581f0ac6a5Smrg])])# AC_PROG_LIBTOOL
16591f0ac6a5Smrg
16601f0ac6a5Smrg
16611f0ac6a5Smrg# _AC_PROG_LIBTOOL
16621f0ac6a5Smrg# ----------------
16631f0ac6a5SmrgAC_DEFUN([_AC_PROG_LIBTOOL],
16641f0ac6a5Smrg[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
16651f0ac6a5SmrgAC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
16661f0ac6a5SmrgAC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
16671f0ac6a5SmrgAC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
16681f0ac6a5Smrg
16691f0ac6a5Smrg# This can be used to rebuild libtool when needed
16701f0ac6a5SmrgLIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
16711f0ac6a5Smrg
16721f0ac6a5Smrg# Always use our own libtool.
16731f0ac6a5SmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool'
16741f0ac6a5SmrgAC_SUBST(LIBTOOL)dnl
16751f0ac6a5Smrg
16761f0ac6a5Smrg# Prevent multiple expansion
16771f0ac6a5Smrgdefine([AC_PROG_LIBTOOL], [])
16781f0ac6a5Smrg])# _AC_PROG_LIBTOOL
16791f0ac6a5Smrg
16801f0ac6a5Smrg
16811f0ac6a5Smrg# AC_LIBTOOL_SETUP
16821f0ac6a5Smrg# ----------------
16831f0ac6a5SmrgAC_DEFUN([AC_LIBTOOL_SETUP],
16841f0ac6a5Smrg[AC_PREREQ(2.50)dnl
16851f0ac6a5SmrgAC_REQUIRE([AC_ENABLE_SHARED])dnl
16861f0ac6a5SmrgAC_REQUIRE([AC_ENABLE_STATIC])dnl
16871f0ac6a5SmrgAC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
16881f0ac6a5SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl
16891f0ac6a5SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl
16901f0ac6a5SmrgAC_REQUIRE([AC_PROG_CC])dnl
16911f0ac6a5SmrgAC_REQUIRE([AC_PROG_LD])dnl
16921f0ac6a5SmrgAC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
16931f0ac6a5SmrgAC_REQUIRE([AC_PROG_NM])dnl
16941f0ac6a5Smrg
16951f0ac6a5SmrgAC_REQUIRE([AC_PROG_LN_S])dnl
16961f0ac6a5SmrgAC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
16971f0ac6a5Smrg# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
16981f0ac6a5SmrgAC_REQUIRE([AC_OBJEXT])dnl
16991f0ac6a5SmrgAC_REQUIRE([AC_EXEEXT])dnl
17001f0ac6a5Smrgdnl
17011f0ac6a5SmrgAC_LIBTOOL_SYS_MAX_CMD_LEN
17021f0ac6a5SmrgAC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
17031f0ac6a5SmrgAC_LIBTOOL_OBJDIR
17041f0ac6a5Smrg
17051f0ac6a5SmrgAC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
17061f0ac6a5Smrg_LT_AC_PROG_ECHO_BACKSLASH
17071f0ac6a5Smrg
17081f0ac6a5Smrgcase $host_os in
17091f0ac6a5Smrgaix3*)
17101f0ac6a5Smrg  # AIX sometimes has problems with the GCC collect2 program.  For some
17111f0ac6a5Smrg  # reason, if we set the COLLECT_NAMES environment variable, the problems
17121f0ac6a5Smrg  # vanish in a puff of smoke.
17131f0ac6a5Smrg  if test "X${COLLECT_NAMES+set}" != Xset; then
17141f0ac6a5Smrg    COLLECT_NAMES=
17151f0ac6a5Smrg    export COLLECT_NAMES
17161f0ac6a5Smrg  fi
17171f0ac6a5Smrg  ;;
17181f0ac6a5Smrgesac
17191f0ac6a5Smrg
17201f0ac6a5Smrg# Sed substitution that helps us do robust quoting.  It backslashifies
17211f0ac6a5Smrg# metacharacters that are still active within double-quoted strings.
17221f0ac6a5SmrgXsed='sed -e 1s/^X//'
17231f0ac6a5Smrg[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
17241f0ac6a5Smrg
17251f0ac6a5Smrg# Same as above, but do not quote variable references.
17261f0ac6a5Smrg[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
17271f0ac6a5Smrg
17281f0ac6a5Smrg# Sed substitution to delay expansion of an escaped shell variable in a
17291f0ac6a5Smrg# double_quote_subst'ed string.
17301f0ac6a5Smrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
17311f0ac6a5Smrg
17321f0ac6a5Smrg# Sed substitution to avoid accidental globbing in evaled expressions
17331f0ac6a5Smrgno_glob_subst='s/\*/\\\*/g'
17341f0ac6a5Smrg
17351f0ac6a5Smrg# Constants:
17361f0ac6a5Smrgrm="rm -f"
17371f0ac6a5Smrg
17381f0ac6a5Smrg# Global variables:
17391f0ac6a5Smrgdefault_ofile=libtool
17401f0ac6a5Smrgcan_build_shared=yes
17411f0ac6a5Smrg
17421f0ac6a5Smrg# All known linkers require a `.a' archive for static linking (except MSVC,
17431f0ac6a5Smrg# which needs '.lib').
17441f0ac6a5Smrglibext=a
17451f0ac6a5Smrgltmain="$ac_aux_dir/ltmain.sh"
17461f0ac6a5Smrgofile="$default_ofile"
17471f0ac6a5Smrgwith_gnu_ld="$lt_cv_prog_gnu_ld"
17481f0ac6a5Smrg
17491f0ac6a5SmrgAC_CHECK_TOOL(AR, ar, false)
17501f0ac6a5SmrgAC_CHECK_TOOL(RANLIB, ranlib, :)
17511f0ac6a5SmrgAC_CHECK_TOOL(STRIP, strip, :)
17521f0ac6a5Smrg
17531f0ac6a5Smrgold_CC="$CC"
17541f0ac6a5Smrgold_CFLAGS="$CFLAGS"
17551f0ac6a5Smrg
17561f0ac6a5Smrg# Set sane defaults for various variables
17571f0ac6a5Smrgtest -z "$AR" && AR=ar
17581f0ac6a5Smrgtest -z "$AR_FLAGS" && AR_FLAGS=cru
17591f0ac6a5Smrgtest -z "$AS" && AS=as
17601f0ac6a5Smrgtest -z "$CC" && CC=cc
17611f0ac6a5Smrgtest -z "$LTCC" && LTCC=$CC
17621f0ac6a5Smrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
17631f0ac6a5Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool
17641f0ac6a5Smrgtest -z "$LD" && LD=ld
17651f0ac6a5Smrgtest -z "$LN_S" && LN_S="ln -s"
17661f0ac6a5Smrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file
17671f0ac6a5Smrgtest -z "$NM" && NM=nm
17681f0ac6a5Smrgtest -z "$SED" && SED=sed
17691f0ac6a5Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump
17701f0ac6a5Smrgtest -z "$RANLIB" && RANLIB=:
17711f0ac6a5Smrgtest -z "$STRIP" && STRIP=:
17721f0ac6a5Smrgtest -z "$ac_objext" && ac_objext=o
17731f0ac6a5Smrg
17741f0ac6a5Smrg# Determine commands to create old-style static archives.
1775e5410a46Smrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
17761f0ac6a5Smrgold_postinstall_cmds='chmod 644 $oldlib'
17771f0ac6a5Smrgold_postuninstall_cmds=
17781f0ac6a5Smrg
17791f0ac6a5Smrgif test -n "$RANLIB"; then
17801f0ac6a5Smrg  case $host_os in
17811f0ac6a5Smrg  openbsd*)
17821f0ac6a5Smrg    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
17831f0ac6a5Smrg    ;;
17841f0ac6a5Smrg  *)
17851f0ac6a5Smrg    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
17861f0ac6a5Smrg    ;;
17871f0ac6a5Smrg  esac
17881f0ac6a5Smrg  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
17891f0ac6a5Smrgfi
17901f0ac6a5Smrg
17911f0ac6a5Smrg_LT_CC_BASENAME([$compiler])
17921f0ac6a5Smrg
17931f0ac6a5Smrg# Only perform the check for file, if the check method requires it
17941f0ac6a5Smrgcase $deplibs_check_method in
17951f0ac6a5Smrgfile_magic*)
17961f0ac6a5Smrg  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
17971f0ac6a5Smrg    AC_PATH_MAGIC
17981f0ac6a5Smrg  fi
17991f0ac6a5Smrg  ;;
18001f0ac6a5Smrgesac
18011f0ac6a5Smrg
1802e5410a46Smrg_LT_REQUIRED_DARWIN_CHECKS
1803e5410a46Smrg
18041f0ac6a5SmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
18051f0ac6a5SmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
18061f0ac6a5Smrgenable_win32_dll=yes, enable_win32_dll=no)
18071f0ac6a5Smrg
18081f0ac6a5SmrgAC_ARG_ENABLE([libtool-lock],
18091f0ac6a5Smrg    [AC_HELP_STRING([--disable-libtool-lock],
18101f0ac6a5Smrg	[avoid locking (might break parallel builds)])])
18111f0ac6a5Smrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
18121f0ac6a5Smrg
18131f0ac6a5SmrgAC_ARG_WITH([pic],
18141f0ac6a5Smrg    [AC_HELP_STRING([--with-pic],
18151f0ac6a5Smrg	[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
18161f0ac6a5Smrg    [pic_mode="$withval"],
18171f0ac6a5Smrg    [pic_mode=default])
18181f0ac6a5Smrgtest -z "$pic_mode" && pic_mode=default
18191f0ac6a5Smrg
18201f0ac6a5Smrg# Use C for the default configuration in the libtool script
18211f0ac6a5Smrgtagname=
18221f0ac6a5SmrgAC_LIBTOOL_LANG_C_CONFIG
18231f0ac6a5Smrg_LT_AC_TAGCONFIG
18241f0ac6a5Smrg])# AC_LIBTOOL_SETUP
18251f0ac6a5Smrg
18261f0ac6a5Smrg
18271f0ac6a5Smrg# _LT_AC_SYS_COMPILER
18281f0ac6a5Smrg# -------------------
18291f0ac6a5SmrgAC_DEFUN([_LT_AC_SYS_COMPILER],
18301f0ac6a5Smrg[AC_REQUIRE([AC_PROG_CC])dnl
18311f0ac6a5Smrg
18321f0ac6a5Smrg# If no C compiler was specified, use CC.
18331f0ac6a5SmrgLTCC=${LTCC-"$CC"}
18341f0ac6a5Smrg
18351f0ac6a5Smrg# If no C compiler flags were specified, use CFLAGS.
18361f0ac6a5SmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"}
18371f0ac6a5Smrg
18381f0ac6a5Smrg# Allow CC to be a program name with arguments.
18391f0ac6a5Smrgcompiler=$CC
18401f0ac6a5Smrg])# _LT_AC_SYS_COMPILER
18411f0ac6a5Smrg
18421f0ac6a5Smrg
18431f0ac6a5Smrg# _LT_CC_BASENAME(CC)
18441f0ac6a5Smrg# -------------------
18451f0ac6a5Smrg# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
18461f0ac6a5SmrgAC_DEFUN([_LT_CC_BASENAME],
18471f0ac6a5Smrg[for cc_temp in $1""; do
18481f0ac6a5Smrg  case $cc_temp in
18491f0ac6a5Smrg    compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
18501f0ac6a5Smrg    distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
18511f0ac6a5Smrg    \-*) ;;
18521f0ac6a5Smrg    *) break;;
18531f0ac6a5Smrg  esac
18541f0ac6a5Smrgdone
18551f0ac6a5Smrgcc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
18561f0ac6a5Smrg])
18571f0ac6a5Smrg
18581f0ac6a5Smrg
18591f0ac6a5Smrg# _LT_COMPILER_BOILERPLATE
18601f0ac6a5Smrg# ------------------------
18611f0ac6a5Smrg# Check for compiler boilerplate output or warnings with
18621f0ac6a5Smrg# the simple compiler test code.
18631f0ac6a5SmrgAC_DEFUN([_LT_COMPILER_BOILERPLATE],
1864e5410a46Smrg[AC_REQUIRE([LT_AC_PROG_SED])dnl
1865e5410a46Smrgac_outfile=conftest.$ac_objext
1866e5410a46Smrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext
18671f0ac6a5Smrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
18681f0ac6a5Smrg_lt_compiler_boilerplate=`cat conftest.err`
18691f0ac6a5Smrg$rm conftest*
18701f0ac6a5Smrg])# _LT_COMPILER_BOILERPLATE
18711f0ac6a5Smrg
18721f0ac6a5Smrg
18731f0ac6a5Smrg# _LT_LINKER_BOILERPLATE
18741f0ac6a5Smrg# ----------------------
18751f0ac6a5Smrg# Check for linker boilerplate output or warnings with
18761f0ac6a5Smrg# the simple link test code.
18771f0ac6a5SmrgAC_DEFUN([_LT_LINKER_BOILERPLATE],
1878e5410a46Smrg[AC_REQUIRE([LT_AC_PROG_SED])dnl
1879e5410a46Smrgac_outfile=conftest.$ac_objext
1880e5410a46Smrgecho "$lt_simple_link_test_code" >conftest.$ac_ext
18811f0ac6a5Smrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
18821f0ac6a5Smrg_lt_linker_boilerplate=`cat conftest.err`
1883e5410a46Smrg$rm -r conftest*
18841f0ac6a5Smrg])# _LT_LINKER_BOILERPLATE
18851f0ac6a5Smrg
1886e5410a46Smrg# _LT_REQUIRED_DARWIN_CHECKS
1887e5410a46Smrg# --------------------------
1888e5410a46Smrg# Check for some things on darwin
1889e5410a46SmrgAC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS],[
1890e5410a46Smrg  case $host_os in
1891e5410a46Smrg    rhapsody* | darwin*)
1892e5410a46Smrg    AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
1893e5410a46Smrg    AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
1894e5410a46Smrg
1895e5410a46Smrg    AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
1896e5410a46Smrg      [lt_cv_apple_cc_single_mod=no
1897e5410a46Smrg      if test -z "${LT_MULTI_MODULE}"; then
1898e5410a46Smrg   # By default we will add the -single_module flag. You can override
1899e5410a46Smrg   # by either setting the environment variable LT_MULTI_MODULE
1900e5410a46Smrg   # non-empty at configure time, or by adding -multi_module to the
1901e5410a46Smrg   # link flags.
1902e5410a46Smrg   echo "int foo(void){return 1;}" > conftest.c
1903e5410a46Smrg   $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
1904e5410a46Smrg     -dynamiclib ${wl}-single_module conftest.c
1905e5410a46Smrg   if test -f libconftest.dylib; then
1906e5410a46Smrg     lt_cv_apple_cc_single_mod=yes
1907e5410a46Smrg     rm -rf libconftest.dylib*
1908e5410a46Smrg   fi
1909e5410a46Smrg   rm conftest.c
1910e5410a46Smrg      fi])
1911e5410a46Smrg    AC_CACHE_CHECK([for -exported_symbols_list linker flag],
1912e5410a46Smrg      [lt_cv_ld_exported_symbols_list],
1913e5410a46Smrg      [lt_cv_ld_exported_symbols_list=no
1914e5410a46Smrg      save_LDFLAGS=$LDFLAGS
1915e5410a46Smrg      echo "_main" > conftest.sym
1916e5410a46Smrg      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
1917e5410a46Smrg      AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
1918e5410a46Smrg   [lt_cv_ld_exported_symbols_list=yes],
1919e5410a46Smrg   [lt_cv_ld_exported_symbols_list=no])
1920e5410a46Smrg   LDFLAGS="$save_LDFLAGS"
1921e5410a46Smrg    ])
1922e5410a46Smrg    case $host_os in
1923e5410a46Smrg    rhapsody* | darwin1.[[0123]])
1924e5410a46Smrg      _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
1925e5410a46Smrg    darwin1.*)
1926e5410a46Smrg     _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
1927e5410a46Smrg    darwin*)
1928e5410a46Smrg      # if running on 10.5 or later, the deployment target defaults
1929e5410a46Smrg      # to the OS version, if on x86, and 10.4, the deployment
1930e5410a46Smrg      # target defaults to 10.4. Don't you love it?
1931e5410a46Smrg      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
1932e5410a46Smrg   10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
1933e5410a46Smrg     _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
1934e5410a46Smrg   10.[[012]]*)
1935e5410a46Smrg     _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
1936e5410a46Smrg   10.*)
1937e5410a46Smrg     _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
1938e5410a46Smrg      esac
1939e5410a46Smrg    ;;
1940e5410a46Smrg  esac
1941e5410a46Smrg    if test "$lt_cv_apple_cc_single_mod" = "yes"; then
1942e5410a46Smrg      _lt_dar_single_mod='$single_module'
1943e5410a46Smrg    fi
1944e5410a46Smrg    if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
1945e5410a46Smrg      _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
1946e5410a46Smrg    else
1947e5410a46Smrg      _lt_dar_export_syms="~$NMEDIT -s \$output_objdir/\${libname}-symbols.expsym \${lib}"
1948e5410a46Smrg    fi
1949e5410a46Smrg    if test "$DSYMUTIL" != ":"; then
1950e5410a46Smrg      _lt_dsymutil="~$DSYMUTIL \$lib || :"
1951e5410a46Smrg    else
1952e5410a46Smrg      _lt_dsymutil=
1953e5410a46Smrg    fi
1954e5410a46Smrg    ;;
1955e5410a46Smrg  esac
1956e5410a46Smrg])
19571f0ac6a5Smrg
19581f0ac6a5Smrg# _LT_AC_SYS_LIBPATH_AIX
19591f0ac6a5Smrg# ----------------------
19601f0ac6a5Smrg# Links a minimal program and checks the executable
19611f0ac6a5Smrg# for the system default hardcoded library path. In most cases,
19621f0ac6a5Smrg# this is /usr/lib:/lib, but when the MPI compilers are used
19631f0ac6a5Smrg# the location of the communication and MPI libs are included too.
19641f0ac6a5Smrg# If we don't find anything, use the default library path according
19651f0ac6a5Smrg# to the aix ld manual.
19661f0ac6a5SmrgAC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
1967e5410a46Smrg[AC_REQUIRE([LT_AC_PROG_SED])dnl
1968e5410a46SmrgAC_LINK_IFELSE(AC_LANG_PROGRAM,[
1969e5410a46Smrglt_aix_libpath_sed='
1970e5410a46Smrg    /Import File Strings/,/^$/ {
1971e5410a46Smrg	/^0/ {
1972e5410a46Smrg	    s/^0  *\(.*\)$/\1/
1973e5410a46Smrg	    p
1974e5410a46Smrg	}
1975e5410a46Smrg    }'
1976e5410a46Smrgaix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
19771f0ac6a5Smrg# Check for a 64-bit object if we didn't find anything.
1978e5410a46Smrgif test -z "$aix_libpath"; then
1979e5410a46Smrg  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1980e5410a46Smrgfi],[])
19811f0ac6a5Smrgif test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
19821f0ac6a5Smrg])# _LT_AC_SYS_LIBPATH_AIX
19831f0ac6a5Smrg
19841f0ac6a5Smrg
19851f0ac6a5Smrg# _LT_AC_SHELL_INIT(ARG)
19861f0ac6a5Smrg# ----------------------
19871f0ac6a5SmrgAC_DEFUN([_LT_AC_SHELL_INIT],
19881f0ac6a5Smrg[ifdef([AC_DIVERSION_NOTICE],
19891f0ac6a5Smrg	     [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
19901f0ac6a5Smrg	 [AC_DIVERT_PUSH(NOTICE)])
19911f0ac6a5Smrg$1
19921f0ac6a5SmrgAC_DIVERT_POP
19931f0ac6a5Smrg])# _LT_AC_SHELL_INIT
19941f0ac6a5Smrg
19951f0ac6a5Smrg
19961f0ac6a5Smrg# _LT_AC_PROG_ECHO_BACKSLASH
19971f0ac6a5Smrg# --------------------------
19981f0ac6a5Smrg# Add some code to the start of the generated configure script which
19991f0ac6a5Smrg# will find an echo command which doesn't interpret backslashes.
20001f0ac6a5SmrgAC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
20011f0ac6a5Smrg[_LT_AC_SHELL_INIT([
20021f0ac6a5Smrg# Check that we are running under the correct shell.
20031f0ac6a5SmrgSHELL=${CONFIG_SHELL-/bin/sh}
20041f0ac6a5Smrg
20051f0ac6a5Smrgcase X$ECHO in
20061f0ac6a5SmrgX*--fallback-echo)
20071f0ac6a5Smrg  # Remove one level of quotation (which was required for Make).
20081f0ac6a5Smrg  ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
20091f0ac6a5Smrg  ;;
20101f0ac6a5Smrgesac
20111f0ac6a5Smrg
20121f0ac6a5Smrgecho=${ECHO-echo}
20131f0ac6a5Smrgif test "X[$]1" = X--no-reexec; then
20141f0ac6a5Smrg  # Discard the --no-reexec flag, and continue.
20151f0ac6a5Smrg  shift
20161f0ac6a5Smrgelif test "X[$]1" = X--fallback-echo; then
20171f0ac6a5Smrg  # Avoid inline document here, it may be left over
20181f0ac6a5Smrg  :
20191f0ac6a5Smrgelif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
20201f0ac6a5Smrg  # Yippee, $echo works!
20211f0ac6a5Smrg  :
20221f0ac6a5Smrgelse
20231f0ac6a5Smrg  # Restart under the correct shell.
20241f0ac6a5Smrg  exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
20251f0ac6a5Smrgfi
20261f0ac6a5Smrg
20271f0ac6a5Smrgif test "X[$]1" = X--fallback-echo; then
20281f0ac6a5Smrg  # used as fallback echo
20291f0ac6a5Smrg  shift
20301f0ac6a5Smrg  cat <<EOF
20311f0ac6a5Smrg[$]*
20321f0ac6a5SmrgEOF
20331f0ac6a5Smrg  exit 0
20341f0ac6a5Smrgfi
20351f0ac6a5Smrg
20361f0ac6a5Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout
20371f0ac6a5Smrg# if CDPATH is set.
20381f0ac6a5Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
20391f0ac6a5Smrg
20401f0ac6a5Smrgif test -z "$ECHO"; then
20411f0ac6a5Smrgif test "X${echo_test_string+set}" != Xset; then
20421f0ac6a5Smrg# find a string as large as possible, as long as the shell can cope with it
20431f0ac6a5Smrg  for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
20441f0ac6a5Smrg    # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
20451f0ac6a5Smrg    if (echo_test_string=`eval $cmd`) 2>/dev/null &&
20461f0ac6a5Smrg       echo_test_string=`eval $cmd` &&
20471f0ac6a5Smrg       (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
20481f0ac6a5Smrg    then
20491f0ac6a5Smrg      break
20501f0ac6a5Smrg    fi
20511f0ac6a5Smrg  done
20521f0ac6a5Smrgfi
20531f0ac6a5Smrg
20541f0ac6a5Smrgif test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
20551f0ac6a5Smrg   echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
20561f0ac6a5Smrg   test "X$echo_testing_string" = "X$echo_test_string"; then
20571f0ac6a5Smrg  :
20581f0ac6a5Smrgelse
20591f0ac6a5Smrg  # The Solaris, AIX, and Digital Unix default echo programs unquote
20601f0ac6a5Smrg  # backslashes.  This makes it impossible to quote backslashes using
20611f0ac6a5Smrg  #   echo "$something" | sed 's/\\/\\\\/g'
20621f0ac6a5Smrg  #
20631f0ac6a5Smrg  # So, first we look for a working echo in the user's PATH.
20641f0ac6a5Smrg
20651f0ac6a5Smrg  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
20661f0ac6a5Smrg  for dir in $PATH /usr/ucb; do
20671f0ac6a5Smrg    IFS="$lt_save_ifs"
20681f0ac6a5Smrg    if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
20691f0ac6a5Smrg       test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
20701f0ac6a5Smrg       echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
20711f0ac6a5Smrg       test "X$echo_testing_string" = "X$echo_test_string"; then
20721f0ac6a5Smrg      echo="$dir/echo"
20731f0ac6a5Smrg      break
20741f0ac6a5Smrg    fi
20751f0ac6a5Smrg  done
20761f0ac6a5Smrg  IFS="$lt_save_ifs"
20771f0ac6a5Smrg
20781f0ac6a5Smrg  if test "X$echo" = Xecho; then
20791f0ac6a5Smrg    # We didn't find a better echo, so look for alternatives.
20801f0ac6a5Smrg    if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
20811f0ac6a5Smrg       echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
20821f0ac6a5Smrg       test "X$echo_testing_string" = "X$echo_test_string"; then
20831f0ac6a5Smrg      # This shell has a builtin print -r that does the trick.
20841f0ac6a5Smrg      echo='print -r'
20851f0ac6a5Smrg    elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
20861f0ac6a5Smrg	 test "X$CONFIG_SHELL" != X/bin/ksh; then
20871f0ac6a5Smrg      # If we have ksh, try running configure again with it.
20881f0ac6a5Smrg      ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
20891f0ac6a5Smrg      export ORIGINAL_CONFIG_SHELL
20901f0ac6a5Smrg      CONFIG_SHELL=/bin/ksh
20911f0ac6a5Smrg      export CONFIG_SHELL
20921f0ac6a5Smrg      exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
20931f0ac6a5Smrg    else
20941f0ac6a5Smrg      # Try using printf.
20951f0ac6a5Smrg      echo='printf %s\n'
20961f0ac6a5Smrg      if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
20971f0ac6a5Smrg	 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
20981f0ac6a5Smrg	 test "X$echo_testing_string" = "X$echo_test_string"; then
20991f0ac6a5Smrg	# Cool, printf works
21001f0ac6a5Smrg	:
21011f0ac6a5Smrg      elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
21021f0ac6a5Smrg	   test "X$echo_testing_string" = 'X\t' &&
21031f0ac6a5Smrg	   echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
21041f0ac6a5Smrg	   test "X$echo_testing_string" = "X$echo_test_string"; then
21051f0ac6a5Smrg	CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
21061f0ac6a5Smrg	export CONFIG_SHELL
21071f0ac6a5Smrg	SHELL="$CONFIG_SHELL"
21081f0ac6a5Smrg	export SHELL
21091f0ac6a5Smrg	echo="$CONFIG_SHELL [$]0 --fallback-echo"
21101f0ac6a5Smrg      elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
21111f0ac6a5Smrg	   test "X$echo_testing_string" = 'X\t' &&
21121f0ac6a5Smrg	   echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
21131f0ac6a5Smrg	   test "X$echo_testing_string" = "X$echo_test_string"; then
21141f0ac6a5Smrg	echo="$CONFIG_SHELL [$]0 --fallback-echo"
21151f0ac6a5Smrg      else
21161f0ac6a5Smrg	# maybe with a smaller string...
21171f0ac6a5Smrg	prev=:
21181f0ac6a5Smrg
21191f0ac6a5Smrg	for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
21201f0ac6a5Smrg	  if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
21211f0ac6a5Smrg	  then
21221f0ac6a5Smrg	    break
21231f0ac6a5Smrg	  fi
21241f0ac6a5Smrg	  prev="$cmd"
21251f0ac6a5Smrg	done
21261f0ac6a5Smrg
21271f0ac6a5Smrg	if test "$prev" != 'sed 50q "[$]0"'; then
21281f0ac6a5Smrg	  echo_test_string=`eval $prev`
21291f0ac6a5Smrg	  export echo_test_string
21301f0ac6a5Smrg	  exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
21311f0ac6a5Smrg	else
21321f0ac6a5Smrg	  # Oops.  We lost completely, so just stick with echo.
21331f0ac6a5Smrg	  echo=echo
21341f0ac6a5Smrg	fi
21351f0ac6a5Smrg      fi
21361f0ac6a5Smrg    fi
21371f0ac6a5Smrg  fi
21381f0ac6a5Smrgfi
21391f0ac6a5Smrgfi
21401f0ac6a5Smrg
21411f0ac6a5Smrg# Copy echo and quote the copy suitably for passing to libtool from
21421f0ac6a5Smrg# the Makefile, instead of quoting the original, which is used later.
21431f0ac6a5SmrgECHO=$echo
21441f0ac6a5Smrgif test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
21451f0ac6a5Smrg   ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
21461f0ac6a5Smrgfi
21471f0ac6a5Smrg
21481f0ac6a5SmrgAC_SUBST(ECHO)
21491f0ac6a5Smrg])])# _LT_AC_PROG_ECHO_BACKSLASH
21501f0ac6a5Smrg
21511f0ac6a5Smrg
21521f0ac6a5Smrg# _LT_AC_LOCK
21531f0ac6a5Smrg# -----------
21541f0ac6a5SmrgAC_DEFUN([_LT_AC_LOCK],
21551f0ac6a5Smrg[AC_ARG_ENABLE([libtool-lock],
21561f0ac6a5Smrg    [AC_HELP_STRING([--disable-libtool-lock],
21571f0ac6a5Smrg	[avoid locking (might break parallel builds)])])
21581f0ac6a5Smrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
21591f0ac6a5Smrg
21601f0ac6a5Smrg# Some flags need to be propagated to the compiler or linker for good
21611f0ac6a5Smrg# libtool support.
21621f0ac6a5Smrgcase $host in
21631f0ac6a5Smrgia64-*-hpux*)
21641f0ac6a5Smrg  # Find out which ABI we are using.
21651f0ac6a5Smrg  echo 'int i;' > conftest.$ac_ext
21661f0ac6a5Smrg  if AC_TRY_EVAL(ac_compile); then
21671f0ac6a5Smrg    case `/usr/bin/file conftest.$ac_objext` in
21681f0ac6a5Smrg    *ELF-32*)
21691f0ac6a5Smrg      HPUX_IA64_MODE="32"
21701f0ac6a5Smrg      ;;
21711f0ac6a5Smrg    *ELF-64*)
21721f0ac6a5Smrg      HPUX_IA64_MODE="64"
21731f0ac6a5Smrg      ;;
21741f0ac6a5Smrg    esac
21751f0ac6a5Smrg  fi
21761f0ac6a5Smrg  rm -rf conftest*
21771f0ac6a5Smrg  ;;
21781f0ac6a5Smrg*-*-irix6*)
21791f0ac6a5Smrg  # Find out which ABI we are using.
21801f0ac6a5Smrg  echo '[#]line __oline__ "configure"' > conftest.$ac_ext
21811f0ac6a5Smrg  if AC_TRY_EVAL(ac_compile); then
21821f0ac6a5Smrg   if test "$lt_cv_prog_gnu_ld" = yes; then
21831f0ac6a5Smrg    case `/usr/bin/file conftest.$ac_objext` in
21841f0ac6a5Smrg    *32-bit*)
21851f0ac6a5Smrg      LD="${LD-ld} -melf32bsmip"
21861f0ac6a5Smrg      ;;
21871f0ac6a5Smrg    *N32*)
21881f0ac6a5Smrg      LD="${LD-ld} -melf32bmipn32"
21891f0ac6a5Smrg      ;;
21901f0ac6a5Smrg    *64-bit*)
21911f0ac6a5Smrg      LD="${LD-ld} -melf64bmip"
21921f0ac6a5Smrg      ;;
21931f0ac6a5Smrg    esac
21941f0ac6a5Smrg   else
21951f0ac6a5Smrg    case `/usr/bin/file conftest.$ac_objext` in
21961f0ac6a5Smrg    *32-bit*)
21971f0ac6a5Smrg      LD="${LD-ld} -32"
21981f0ac6a5Smrg      ;;
21991f0ac6a5Smrg    *N32*)
22001f0ac6a5Smrg      LD="${LD-ld} -n32"
22011f0ac6a5Smrg      ;;
22021f0ac6a5Smrg    *64-bit*)
22031f0ac6a5Smrg      LD="${LD-ld} -64"
22041f0ac6a5Smrg      ;;
22051f0ac6a5Smrg    esac
22061f0ac6a5Smrg   fi
22071f0ac6a5Smrg  fi
22081f0ac6a5Smrg  rm -rf conftest*
22091f0ac6a5Smrg  ;;
22101f0ac6a5Smrg
2211e5410a46Smrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
2212e5410a46Smrgs390*-*linux*|sparc*-*linux*)
22131f0ac6a5Smrg  # Find out which ABI we are using.
22141f0ac6a5Smrg  echo 'int i;' > conftest.$ac_ext
22151f0ac6a5Smrg  if AC_TRY_EVAL(ac_compile); then
22161f0ac6a5Smrg    case `/usr/bin/file conftest.o` in
22171f0ac6a5Smrg    *32-bit*)
22181f0ac6a5Smrg      case $host in
2219e5410a46Smrg        x86_64-*kfreebsd*-gnu)
2220e5410a46Smrg          LD="${LD-ld} -m elf_i386_fbsd"
2221e5410a46Smrg          ;;
22221f0ac6a5Smrg        x86_64-*linux*)
22231f0ac6a5Smrg          LD="${LD-ld} -m elf_i386"
22241f0ac6a5Smrg          ;;
22251f0ac6a5Smrg        ppc64-*linux*|powerpc64-*linux*)
22261f0ac6a5Smrg          LD="${LD-ld} -m elf32ppclinux"
22271f0ac6a5Smrg          ;;
22281f0ac6a5Smrg        s390x-*linux*)
22291f0ac6a5Smrg          LD="${LD-ld} -m elf_s390"
22301f0ac6a5Smrg          ;;
22311f0ac6a5Smrg        sparc64-*linux*)
22321f0ac6a5Smrg          LD="${LD-ld} -m elf32_sparc"
22331f0ac6a5Smrg          ;;
22341f0ac6a5Smrg      esac
22351f0ac6a5Smrg      ;;
22361f0ac6a5Smrg    *64-bit*)
22371f0ac6a5Smrg      case $host in
2238e5410a46Smrg        x86_64-*kfreebsd*-gnu)
2239e5410a46Smrg          LD="${LD-ld} -m elf_x86_64_fbsd"
2240e5410a46Smrg          ;;
22411f0ac6a5Smrg        x86_64-*linux*)
22421f0ac6a5Smrg          LD="${LD-ld} -m elf_x86_64"
22431f0ac6a5Smrg          ;;
22441f0ac6a5Smrg        ppc*-*linux*|powerpc*-*linux*)
22451f0ac6a5Smrg          LD="${LD-ld} -m elf64ppc"
22461f0ac6a5Smrg          ;;
22471f0ac6a5Smrg        s390*-*linux*)
22481f0ac6a5Smrg          LD="${LD-ld} -m elf64_s390"
22491f0ac6a5Smrg          ;;
22501f0ac6a5Smrg        sparc*-*linux*)
22511f0ac6a5Smrg          LD="${LD-ld} -m elf64_sparc"
22521f0ac6a5Smrg          ;;
22531f0ac6a5Smrg      esac
22541f0ac6a5Smrg      ;;
22551f0ac6a5Smrg    esac
22561f0ac6a5Smrg  fi
22571f0ac6a5Smrg  rm -rf conftest*
22581f0ac6a5Smrg  ;;
22591f0ac6a5Smrg
22601f0ac6a5Smrg*-*-sco3.2v5*)
22611f0ac6a5Smrg  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
22621f0ac6a5Smrg  SAVE_CFLAGS="$CFLAGS"
22631f0ac6a5Smrg  CFLAGS="$CFLAGS -belf"
22641f0ac6a5Smrg  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
22651f0ac6a5Smrg    [AC_LANG_PUSH(C)
22661f0ac6a5Smrg     AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
22671f0ac6a5Smrg     AC_LANG_POP])
22681f0ac6a5Smrg  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
22691f0ac6a5Smrg    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
22701f0ac6a5Smrg    CFLAGS="$SAVE_CFLAGS"
22711f0ac6a5Smrg  fi
22721f0ac6a5Smrg  ;;
22731f0ac6a5Smrgsparc*-*solaris*)
22741f0ac6a5Smrg  # Find out which ABI we are using.
22751f0ac6a5Smrg  echo 'int i;' > conftest.$ac_ext
22761f0ac6a5Smrg  if AC_TRY_EVAL(ac_compile); then
22771f0ac6a5Smrg    case `/usr/bin/file conftest.o` in
22781f0ac6a5Smrg    *64-bit*)
22791f0ac6a5Smrg      case $lt_cv_prog_gnu_ld in
22801f0ac6a5Smrg      yes*) LD="${LD-ld} -m elf64_sparc" ;;
2281e5410a46Smrg      *)
2282e5410a46Smrg        if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
2283e5410a46Smrg	  LD="${LD-ld} -64"
2284e5410a46Smrg	fi
2285e5410a46Smrg	;;
22861f0ac6a5Smrg      esac
22871f0ac6a5Smrg      ;;
22881f0ac6a5Smrg    esac
22891f0ac6a5Smrg  fi
22901f0ac6a5Smrg  rm -rf conftest*
22911f0ac6a5Smrg  ;;
22921f0ac6a5Smrg
22931f0ac6a5SmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
22941f0ac6a5Smrg[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
22951f0ac6a5Smrg  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
22961f0ac6a5Smrg  AC_CHECK_TOOL(AS, as, false)
22971f0ac6a5Smrg  AC_CHECK_TOOL(OBJDUMP, objdump, false)
22981f0ac6a5Smrg  ;;
22991f0ac6a5Smrg  ])
23001f0ac6a5Smrgesac
23011f0ac6a5Smrg
23021f0ac6a5Smrgneed_locks="$enable_libtool_lock"
23031f0ac6a5Smrg
23041f0ac6a5Smrg])# _LT_AC_LOCK
23051f0ac6a5Smrg
23061f0ac6a5Smrg
23071f0ac6a5Smrg# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
23081f0ac6a5Smrg#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
23091f0ac6a5Smrg# ----------------------------------------------------------------
23101f0ac6a5Smrg# Check whether the given compiler option works
23111f0ac6a5SmrgAC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
23121f0ac6a5Smrg[AC_REQUIRE([LT_AC_PROG_SED])
23131f0ac6a5SmrgAC_CACHE_CHECK([$1], [$2],
23141f0ac6a5Smrg  [$2=no
23151f0ac6a5Smrg  ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
2316e5410a46Smrg   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
23171f0ac6a5Smrg   lt_compiler_flag="$3"
23181f0ac6a5Smrg   # Insert the option either (1) after the last *FLAGS variable, or
23191f0ac6a5Smrg   # (2) before a word containing "conftest.", or (3) at the end.
23201f0ac6a5Smrg   # Note that $ac_compile itself does not contain backslashes and begins
23211f0ac6a5Smrg   # with a dollar sign (not a hyphen), so the echo should work correctly.
23221f0ac6a5Smrg   # The option is referenced via a variable to avoid confusing sed.
23231f0ac6a5Smrg   lt_compile=`echo "$ac_compile" | $SED \
23241f0ac6a5Smrg   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
23251f0ac6a5Smrg   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
23261f0ac6a5Smrg   -e 's:$: $lt_compiler_flag:'`
23271f0ac6a5Smrg   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
23281f0ac6a5Smrg   (eval "$lt_compile" 2>conftest.err)
23291f0ac6a5Smrg   ac_status=$?
23301f0ac6a5Smrg   cat conftest.err >&AS_MESSAGE_LOG_FD
23311f0ac6a5Smrg   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
23321f0ac6a5Smrg   if (exit $ac_status) && test -s "$ac_outfile"; then
23331f0ac6a5Smrg     # The compiler can only warn and ignore the option if not recognized
23341f0ac6a5Smrg     # So say no if there are warnings other than the usual output.
23351f0ac6a5Smrg     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
23361f0ac6a5Smrg     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
23371f0ac6a5Smrg     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
23381f0ac6a5Smrg       $2=yes
23391f0ac6a5Smrg     fi
23401f0ac6a5Smrg   fi
23411f0ac6a5Smrg   $rm conftest*
23421f0ac6a5Smrg])
23431f0ac6a5Smrg
23441f0ac6a5Smrgif test x"[$]$2" = xyes; then
23451f0ac6a5Smrg    ifelse([$5], , :, [$5])
23461f0ac6a5Smrgelse
23471f0ac6a5Smrg    ifelse([$6], , :, [$6])
23481f0ac6a5Smrgfi
23491f0ac6a5Smrg])# AC_LIBTOOL_COMPILER_OPTION
23501f0ac6a5Smrg
23511f0ac6a5Smrg
23521f0ac6a5Smrg# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
23531f0ac6a5Smrg#                          [ACTION-SUCCESS], [ACTION-FAILURE])
23541f0ac6a5Smrg# ------------------------------------------------------------
23551f0ac6a5Smrg# Check whether the given compiler option works
23561f0ac6a5SmrgAC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
2357e5410a46Smrg[AC_REQUIRE([LT_AC_PROG_SED])dnl
2358e5410a46SmrgAC_CACHE_CHECK([$1], [$2],
23591f0ac6a5Smrg  [$2=no
23601f0ac6a5Smrg   save_LDFLAGS="$LDFLAGS"
23611f0ac6a5Smrg   LDFLAGS="$LDFLAGS $3"
2362e5410a46Smrg   echo "$lt_simple_link_test_code" > conftest.$ac_ext
23631f0ac6a5Smrg   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
23641f0ac6a5Smrg     # The linker can only warn and ignore the option if not recognized
23651f0ac6a5Smrg     # So say no if there are warnings
23661f0ac6a5Smrg     if test -s conftest.err; then
23671f0ac6a5Smrg       # Append any errors to the config.log.
23681f0ac6a5Smrg       cat conftest.err 1>&AS_MESSAGE_LOG_FD
23691f0ac6a5Smrg       $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
23701f0ac6a5Smrg       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
23711f0ac6a5Smrg       if diff conftest.exp conftest.er2 >/dev/null; then
23721f0ac6a5Smrg         $2=yes
23731f0ac6a5Smrg       fi
23741f0ac6a5Smrg     else
23751f0ac6a5Smrg       $2=yes
23761f0ac6a5Smrg     fi
23771f0ac6a5Smrg   fi
2378e5410a46Smrg   $rm -r conftest*
23791f0ac6a5Smrg   LDFLAGS="$save_LDFLAGS"
23801f0ac6a5Smrg])
23811f0ac6a5Smrg
23821f0ac6a5Smrgif test x"[$]$2" = xyes; then
23831f0ac6a5Smrg    ifelse([$4], , :, [$4])
23841f0ac6a5Smrgelse
23851f0ac6a5Smrg    ifelse([$5], , :, [$5])
23861f0ac6a5Smrgfi
23871f0ac6a5Smrg])# AC_LIBTOOL_LINKER_OPTION
23881f0ac6a5Smrg
23891f0ac6a5Smrg
23901f0ac6a5Smrg# AC_LIBTOOL_SYS_MAX_CMD_LEN
23911f0ac6a5Smrg# --------------------------
23921f0ac6a5SmrgAC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
23931f0ac6a5Smrg[# find the maximum length of command line arguments
23941f0ac6a5SmrgAC_MSG_CHECKING([the maximum length of command line arguments])
23951f0ac6a5SmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
23961f0ac6a5Smrg  i=0
23971f0ac6a5Smrg  teststring="ABCD"
23981f0ac6a5Smrg
23991f0ac6a5Smrg  case $build_os in
24001f0ac6a5Smrg  msdosdjgpp*)
24011f0ac6a5Smrg    # On DJGPP, this test can blow up pretty badly due to problems in libc
24021f0ac6a5Smrg    # (any single argument exceeding 2000 bytes causes a buffer overrun
24031f0ac6a5Smrg    # during glob expansion).  Even if it were fixed, the result of this
24041f0ac6a5Smrg    # check would be larger than it should be.
24051f0ac6a5Smrg    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
24061f0ac6a5Smrg    ;;
24071f0ac6a5Smrg
24081f0ac6a5Smrg  gnu*)
24091f0ac6a5Smrg    # Under GNU Hurd, this test is not required because there is
24101f0ac6a5Smrg    # no limit to the length of command line arguments.
24111f0ac6a5Smrg    # Libtool will interpret -1 as no limit whatsoever
24121f0ac6a5Smrg    lt_cv_sys_max_cmd_len=-1;
24131f0ac6a5Smrg    ;;
24141f0ac6a5Smrg
24151f0ac6a5Smrg  cygwin* | mingw*)
24161f0ac6a5Smrg    # On Win9x/ME, this test blows up -- it succeeds, but takes
24171f0ac6a5Smrg    # about 5 minutes as the teststring grows exponentially.
24181f0ac6a5Smrg    # Worse, since 9x/ME are not pre-emptively multitasking,
24191f0ac6a5Smrg    # you end up with a "frozen" computer, even though with patience
24201f0ac6a5Smrg    # the test eventually succeeds (with a max line length of 256k).
24211f0ac6a5Smrg    # Instead, let's just punt: use the minimum linelength reported by
24221f0ac6a5Smrg    # all of the supported platforms: 8192 (on NT/2K/XP).
24231f0ac6a5Smrg    lt_cv_sys_max_cmd_len=8192;
24241f0ac6a5Smrg    ;;
24251f0ac6a5Smrg
24261f0ac6a5Smrg  amigaos*)
24271f0ac6a5Smrg    # On AmigaOS with pdksh, this test takes hours, literally.
24281f0ac6a5Smrg    # So we just punt and use a minimum line length of 8192.
24291f0ac6a5Smrg    lt_cv_sys_max_cmd_len=8192;
24301f0ac6a5Smrg    ;;
24311f0ac6a5Smrg
24321f0ac6a5Smrg  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
24331f0ac6a5Smrg    # This has been around since 386BSD, at least.  Likely further.
24341f0ac6a5Smrg    if test -x /sbin/sysctl; then
24351f0ac6a5Smrg      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
24361f0ac6a5Smrg    elif test -x /usr/sbin/sysctl; then
24371f0ac6a5Smrg      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
24381f0ac6a5Smrg    else
24391f0ac6a5Smrg      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
24401f0ac6a5Smrg    fi
24411f0ac6a5Smrg    # And add a safety zone
24421f0ac6a5Smrg    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
24431f0ac6a5Smrg    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
24441f0ac6a5Smrg    ;;
24451f0ac6a5Smrg
24461f0ac6a5Smrg  interix*)
24471f0ac6a5Smrg    # We know the value 262144 and hardcode it with a safety zone (like BSD)
24481f0ac6a5Smrg    lt_cv_sys_max_cmd_len=196608
24491f0ac6a5Smrg    ;;
24501f0ac6a5Smrg
24511f0ac6a5Smrg  osf*)
24521f0ac6a5Smrg    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
24531f0ac6a5Smrg    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
24541f0ac6a5Smrg    # nice to cause kernel panics so lets avoid the loop below.
24551f0ac6a5Smrg    # First set a reasonable default.
24561f0ac6a5Smrg    lt_cv_sys_max_cmd_len=16384
24571f0ac6a5Smrg    #
24581f0ac6a5Smrg    if test -x /sbin/sysconfig; then
24591f0ac6a5Smrg      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
24601f0ac6a5Smrg        *1*) lt_cv_sys_max_cmd_len=-1 ;;
24611f0ac6a5Smrg      esac
24621f0ac6a5Smrg    fi
24631f0ac6a5Smrg    ;;
24641f0ac6a5Smrg  sco3.2v5*)
24651f0ac6a5Smrg    lt_cv_sys_max_cmd_len=102400
24661f0ac6a5Smrg    ;;
24671f0ac6a5Smrg  sysv5* | sco5v6* | sysv4.2uw2*)
24681f0ac6a5Smrg    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
24691f0ac6a5Smrg    if test -n "$kargmax"; then
24701f0ac6a5Smrg      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ 	]]//'`
24711f0ac6a5Smrg    else
24721f0ac6a5Smrg      lt_cv_sys_max_cmd_len=32768
24731f0ac6a5Smrg    fi
24741f0ac6a5Smrg    ;;
24751f0ac6a5Smrg  *)
2476e5410a46Smrg    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
2477e5410a46Smrg    if test -n "$lt_cv_sys_max_cmd_len"; then
2478e5410a46Smrg      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
2479e5410a46Smrg      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
2480e5410a46Smrg    else
2481e5410a46Smrg      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
2482e5410a46Smrg      while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
24831f0ac6a5Smrg	       = "XX$teststring") >/dev/null 2>&1 &&
2484e5410a46Smrg	      new_result=`expr "X$teststring" : ".*" 2>&1` &&
2485e5410a46Smrg	      lt_cv_sys_max_cmd_len=$new_result &&
2486e5410a46Smrg	      test $i != 17 # 1/2 MB should be enough
2487e5410a46Smrg      do
2488e5410a46Smrg        i=`expr $i + 1`
2489e5410a46Smrg        teststring=$teststring$teststring
2490e5410a46Smrg      done
2491e5410a46Smrg      teststring=
2492e5410a46Smrg      # Add a significant safety factor because C++ compilers can tack on massive
2493e5410a46Smrg      # amounts of additional arguments before passing them to the linker.
2494e5410a46Smrg      # It appears as though 1/2 is a usable value.
2495e5410a46Smrg      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
2496e5410a46Smrg    fi
24971f0ac6a5Smrg    ;;
24981f0ac6a5Smrg  esac
24991f0ac6a5Smrg])
25001f0ac6a5Smrgif test -n $lt_cv_sys_max_cmd_len ; then
25011f0ac6a5Smrg  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
25021f0ac6a5Smrgelse
25031f0ac6a5Smrg  AC_MSG_RESULT(none)
25041f0ac6a5Smrgfi
25051f0ac6a5Smrg])# AC_LIBTOOL_SYS_MAX_CMD_LEN
25061f0ac6a5Smrg
25071f0ac6a5Smrg
25081f0ac6a5Smrg# _LT_AC_CHECK_DLFCN
25091f0ac6a5Smrg# ------------------
25101f0ac6a5SmrgAC_DEFUN([_LT_AC_CHECK_DLFCN],
25111f0ac6a5Smrg[AC_CHECK_HEADERS(dlfcn.h)dnl
25121f0ac6a5Smrg])# _LT_AC_CHECK_DLFCN
25131f0ac6a5Smrg
25141f0ac6a5Smrg
25151f0ac6a5Smrg# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
25161f0ac6a5Smrg#                           ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
25171f0ac6a5Smrg# ---------------------------------------------------------------------
25181f0ac6a5SmrgAC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
25191f0ac6a5Smrg[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
25201f0ac6a5Smrgif test "$cross_compiling" = yes; then :
25211f0ac6a5Smrg  [$4]
25221f0ac6a5Smrgelse
25231f0ac6a5Smrg  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
25241f0ac6a5Smrg  lt_status=$lt_dlunknown
25251f0ac6a5Smrg  cat > conftest.$ac_ext <<EOF
25261f0ac6a5Smrg[#line __oline__ "configure"
25271f0ac6a5Smrg#include "confdefs.h"
25281f0ac6a5Smrg
25291f0ac6a5Smrg#if HAVE_DLFCN_H
25301f0ac6a5Smrg#include <dlfcn.h>
25311f0ac6a5Smrg#endif
25321f0ac6a5Smrg
25331f0ac6a5Smrg#include <stdio.h>
25341f0ac6a5Smrg
25351f0ac6a5Smrg#ifdef RTLD_GLOBAL
25361f0ac6a5Smrg#  define LT_DLGLOBAL		RTLD_GLOBAL
25371f0ac6a5Smrg#else
25381f0ac6a5Smrg#  ifdef DL_GLOBAL
25391f0ac6a5Smrg#    define LT_DLGLOBAL		DL_GLOBAL
25401f0ac6a5Smrg#  else
25411f0ac6a5Smrg#    define LT_DLGLOBAL		0
25421f0ac6a5Smrg#  endif
25431f0ac6a5Smrg#endif
25441f0ac6a5Smrg
25451f0ac6a5Smrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
25461f0ac6a5Smrg   find out it does not work in some platform. */
25471f0ac6a5Smrg#ifndef LT_DLLAZY_OR_NOW
25481f0ac6a5Smrg#  ifdef RTLD_LAZY
25491f0ac6a5Smrg#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
25501f0ac6a5Smrg#  else
25511f0ac6a5Smrg#    ifdef DL_LAZY
25521f0ac6a5Smrg#      define LT_DLLAZY_OR_NOW		DL_LAZY
25531f0ac6a5Smrg#    else
25541f0ac6a5Smrg#      ifdef RTLD_NOW
25551f0ac6a5Smrg#        define LT_DLLAZY_OR_NOW	RTLD_NOW
25561f0ac6a5Smrg#      else
25571f0ac6a5Smrg#        ifdef DL_NOW
25581f0ac6a5Smrg#          define LT_DLLAZY_OR_NOW	DL_NOW
25591f0ac6a5Smrg#        else
25601f0ac6a5Smrg#          define LT_DLLAZY_OR_NOW	0
25611f0ac6a5Smrg#        endif
25621f0ac6a5Smrg#      endif
25631f0ac6a5Smrg#    endif
25641f0ac6a5Smrg#  endif
25651f0ac6a5Smrg#endif
25661f0ac6a5Smrg
25671f0ac6a5Smrg#ifdef __cplusplus
25681f0ac6a5Smrgextern "C" void exit (int);
25691f0ac6a5Smrg#endif
25701f0ac6a5Smrg
25711f0ac6a5Smrgvoid fnord() { int i=42;}
25721f0ac6a5Smrgint main ()
25731f0ac6a5Smrg{
25741f0ac6a5Smrg  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
25751f0ac6a5Smrg  int status = $lt_dlunknown;
25761f0ac6a5Smrg
25771f0ac6a5Smrg  if (self)
25781f0ac6a5Smrg    {
25791f0ac6a5Smrg      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
25801f0ac6a5Smrg      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
25811f0ac6a5Smrg      /* dlclose (self); */
25821f0ac6a5Smrg    }
25831f0ac6a5Smrg  else
25841f0ac6a5Smrg    puts (dlerror ());
25851f0ac6a5Smrg
25861f0ac6a5Smrg    exit (status);
25871f0ac6a5Smrg}]
25881f0ac6a5SmrgEOF
25891f0ac6a5Smrg  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
25901f0ac6a5Smrg    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
25911f0ac6a5Smrg    lt_status=$?
25921f0ac6a5Smrg    case x$lt_status in
25931f0ac6a5Smrg      x$lt_dlno_uscore) $1 ;;
25941f0ac6a5Smrg      x$lt_dlneed_uscore) $2 ;;
25951f0ac6a5Smrg      x$lt_dlunknown|x*) $3 ;;
25961f0ac6a5Smrg    esac
25971f0ac6a5Smrg  else :
25981f0ac6a5Smrg    # compilation failed
25991f0ac6a5Smrg    $3
26001f0ac6a5Smrg  fi
26011f0ac6a5Smrgfi
26021f0ac6a5Smrgrm -fr conftest*
26031f0ac6a5Smrg])# _LT_AC_TRY_DLOPEN_SELF
26041f0ac6a5Smrg
26051f0ac6a5Smrg
26061f0ac6a5Smrg# AC_LIBTOOL_DLOPEN_SELF
26071f0ac6a5Smrg# ----------------------
26081f0ac6a5SmrgAC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
26091f0ac6a5Smrg[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
26101f0ac6a5Smrgif test "x$enable_dlopen" != xyes; then
26111f0ac6a5Smrg  enable_dlopen=unknown
26121f0ac6a5Smrg  enable_dlopen_self=unknown
26131f0ac6a5Smrg  enable_dlopen_self_static=unknown
26141f0ac6a5Smrgelse
26151f0ac6a5Smrg  lt_cv_dlopen=no
26161f0ac6a5Smrg  lt_cv_dlopen_libs=
26171f0ac6a5Smrg
26181f0ac6a5Smrg  case $host_os in
26191f0ac6a5Smrg  beos*)
26201f0ac6a5Smrg    lt_cv_dlopen="load_add_on"
26211f0ac6a5Smrg    lt_cv_dlopen_libs=
26221f0ac6a5Smrg    lt_cv_dlopen_self=yes
26231f0ac6a5Smrg    ;;
26241f0ac6a5Smrg
26251f0ac6a5Smrg  mingw* | pw32*)
26261f0ac6a5Smrg    lt_cv_dlopen="LoadLibrary"
26271f0ac6a5Smrg    lt_cv_dlopen_libs=
26281f0ac6a5Smrg   ;;
26291f0ac6a5Smrg
26301f0ac6a5Smrg  cygwin*)
26311f0ac6a5Smrg    lt_cv_dlopen="dlopen"
26321f0ac6a5Smrg    lt_cv_dlopen_libs=
26331f0ac6a5Smrg   ;;
26341f0ac6a5Smrg
26351f0ac6a5Smrg  darwin*)
26361f0ac6a5Smrg  # if libdl is installed we need to link against it
26371f0ac6a5Smrg    AC_CHECK_LIB([dl], [dlopen],
26381f0ac6a5Smrg		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
26391f0ac6a5Smrg    lt_cv_dlopen="dyld"
26401f0ac6a5Smrg    lt_cv_dlopen_libs=
26411f0ac6a5Smrg    lt_cv_dlopen_self=yes
26421f0ac6a5Smrg    ])
26431f0ac6a5Smrg   ;;
26441f0ac6a5Smrg
26451f0ac6a5Smrg  *)
26461f0ac6a5Smrg    AC_CHECK_FUNC([shl_load],
26471f0ac6a5Smrg	  [lt_cv_dlopen="shl_load"],
26481f0ac6a5Smrg      [AC_CHECK_LIB([dld], [shl_load],
2649e5410a46Smrg	    [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
26501f0ac6a5Smrg	[AC_CHECK_FUNC([dlopen],
26511f0ac6a5Smrg	      [lt_cv_dlopen="dlopen"],
26521f0ac6a5Smrg	  [AC_CHECK_LIB([dl], [dlopen],
26531f0ac6a5Smrg		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
26541f0ac6a5Smrg	    [AC_CHECK_LIB([svld], [dlopen],
26551f0ac6a5Smrg		  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
26561f0ac6a5Smrg	      [AC_CHECK_LIB([dld], [dld_link],
2657e5410a46Smrg		    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
26581f0ac6a5Smrg	      ])
26591f0ac6a5Smrg	    ])
26601f0ac6a5Smrg	  ])
26611f0ac6a5Smrg	])
26621f0ac6a5Smrg      ])
26631f0ac6a5Smrg    ;;
26641f0ac6a5Smrg  esac
26651f0ac6a5Smrg
26661f0ac6a5Smrg  if test "x$lt_cv_dlopen" != xno; then
26671f0ac6a5Smrg    enable_dlopen=yes
26681f0ac6a5Smrg  else
26691f0ac6a5Smrg    enable_dlopen=no
26701f0ac6a5Smrg  fi
26711f0ac6a5Smrg
26721f0ac6a5Smrg  case $lt_cv_dlopen in
26731f0ac6a5Smrg  dlopen)
26741f0ac6a5Smrg    save_CPPFLAGS="$CPPFLAGS"
26751f0ac6a5Smrg    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
26761f0ac6a5Smrg
26771f0ac6a5Smrg    save_LDFLAGS="$LDFLAGS"
26781f0ac6a5Smrg    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
26791f0ac6a5Smrg
26801f0ac6a5Smrg    save_LIBS="$LIBS"
26811f0ac6a5Smrg    LIBS="$lt_cv_dlopen_libs $LIBS"
26821f0ac6a5Smrg
26831f0ac6a5Smrg    AC_CACHE_CHECK([whether a program can dlopen itself],
26841f0ac6a5Smrg	  lt_cv_dlopen_self, [dnl
26851f0ac6a5Smrg	  _LT_AC_TRY_DLOPEN_SELF(
26861f0ac6a5Smrg	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
26871f0ac6a5Smrg	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
26881f0ac6a5Smrg    ])
26891f0ac6a5Smrg
26901f0ac6a5Smrg    if test "x$lt_cv_dlopen_self" = xyes; then
26911f0ac6a5Smrg      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
26921f0ac6a5Smrg      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
26931f0ac6a5Smrg    	  lt_cv_dlopen_self_static, [dnl
26941f0ac6a5Smrg	  _LT_AC_TRY_DLOPEN_SELF(
26951f0ac6a5Smrg	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
26961f0ac6a5Smrg	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
26971f0ac6a5Smrg      ])
26981f0ac6a5Smrg    fi
26991f0ac6a5Smrg
27001f0ac6a5Smrg    CPPFLAGS="$save_CPPFLAGS"
27011f0ac6a5Smrg    LDFLAGS="$save_LDFLAGS"
27021f0ac6a5Smrg    LIBS="$save_LIBS"
27031f0ac6a5Smrg    ;;
27041f0ac6a5Smrg  esac
27051f0ac6a5Smrg
27061f0ac6a5Smrg  case $lt_cv_dlopen_self in
27071f0ac6a5Smrg  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
27081f0ac6a5Smrg  *) enable_dlopen_self=unknown ;;
27091f0ac6a5Smrg  esac
27101f0ac6a5Smrg
27111f0ac6a5Smrg  case $lt_cv_dlopen_self_static in
27121f0ac6a5Smrg  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
27131f0ac6a5Smrg  *) enable_dlopen_self_static=unknown ;;
27141f0ac6a5Smrg  esac
27151f0ac6a5Smrgfi
27161f0ac6a5Smrg])# AC_LIBTOOL_DLOPEN_SELF
27171f0ac6a5Smrg
27181f0ac6a5Smrg
27191f0ac6a5Smrg# AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
27201f0ac6a5Smrg# ---------------------------------
27211f0ac6a5Smrg# Check to see if options -c and -o are simultaneously supported by compiler
27221f0ac6a5SmrgAC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
2723e5410a46Smrg[AC_REQUIRE([LT_AC_PROG_SED])dnl
2724e5410a46SmrgAC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
27251f0ac6a5SmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
27261f0ac6a5Smrg  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
27271f0ac6a5Smrg  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
27281f0ac6a5Smrg   $rm -r conftest 2>/dev/null
27291f0ac6a5Smrg   mkdir conftest
27301f0ac6a5Smrg   cd conftest
27311f0ac6a5Smrg   mkdir out
2732e5410a46Smrg   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
27331f0ac6a5Smrg
27341f0ac6a5Smrg   lt_compiler_flag="-o out/conftest2.$ac_objext"
27351f0ac6a5Smrg   # Insert the option either (1) after the last *FLAGS variable, or
27361f0ac6a5Smrg   # (2) before a word containing "conftest.", or (3) at the end.
27371f0ac6a5Smrg   # Note that $ac_compile itself does not contain backslashes and begins
27381f0ac6a5Smrg   # with a dollar sign (not a hyphen), so the echo should work correctly.
27391f0ac6a5Smrg   lt_compile=`echo "$ac_compile" | $SED \
27401f0ac6a5Smrg   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
27411f0ac6a5Smrg   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
27421f0ac6a5Smrg   -e 's:$: $lt_compiler_flag:'`
27431f0ac6a5Smrg   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
27441f0ac6a5Smrg   (eval "$lt_compile" 2>out/conftest.err)
27451f0ac6a5Smrg   ac_status=$?
27461f0ac6a5Smrg   cat out/conftest.err >&AS_MESSAGE_LOG_FD
27471f0ac6a5Smrg   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
27481f0ac6a5Smrg   if (exit $ac_status) && test -s out/conftest2.$ac_objext
27491f0ac6a5Smrg   then
27501f0ac6a5Smrg     # The compiler can only warn and ignore the option if not recognized
27511f0ac6a5Smrg     # So say no if there are warnings
27521f0ac6a5Smrg     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
27531f0ac6a5Smrg     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
27541f0ac6a5Smrg     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
27551f0ac6a5Smrg       _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
27561f0ac6a5Smrg     fi
27571f0ac6a5Smrg   fi
27581f0ac6a5Smrg   chmod u+w . 2>&AS_MESSAGE_LOG_FD
27591f0ac6a5Smrg   $rm conftest*
27601f0ac6a5Smrg   # SGI C++ compiler will create directory out/ii_files/ for
27611f0ac6a5Smrg   # template instantiation
27621f0ac6a5Smrg   test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
27631f0ac6a5Smrg   $rm out/* && rmdir out
27641f0ac6a5Smrg   cd ..
27651f0ac6a5Smrg   rmdir conftest
27661f0ac6a5Smrg   $rm conftest*
27671f0ac6a5Smrg])
27681f0ac6a5Smrg])# AC_LIBTOOL_PROG_CC_C_O
27691f0ac6a5Smrg
27701f0ac6a5Smrg
27711f0ac6a5Smrg# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
27721f0ac6a5Smrg# -----------------------------------------
27731f0ac6a5Smrg# Check to see if we can do hard links to lock some files if needed
27741f0ac6a5SmrgAC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
27751f0ac6a5Smrg[AC_REQUIRE([_LT_AC_LOCK])dnl
27761f0ac6a5Smrg
27771f0ac6a5Smrghard_links="nottested"
27781f0ac6a5Smrgif test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
27791f0ac6a5Smrg  # do not overwrite the value of need_locks provided by the user
27801f0ac6a5Smrg  AC_MSG_CHECKING([if we can lock with hard links])
27811f0ac6a5Smrg  hard_links=yes
27821f0ac6a5Smrg  $rm conftest*
27831f0ac6a5Smrg  ln conftest.a conftest.b 2>/dev/null && hard_links=no
27841f0ac6a5Smrg  touch conftest.a
27851f0ac6a5Smrg  ln conftest.a conftest.b 2>&5 || hard_links=no
27861f0ac6a5Smrg  ln conftest.a conftest.b 2>/dev/null && hard_links=no
27871f0ac6a5Smrg  AC_MSG_RESULT([$hard_links])
27881f0ac6a5Smrg  if test "$hard_links" = no; then
27891f0ac6a5Smrg    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
27901f0ac6a5Smrg    need_locks=warn
27911f0ac6a5Smrg  fi
27921f0ac6a5Smrgelse
27931f0ac6a5Smrg  need_locks=no
27941f0ac6a5Smrgfi
27951f0ac6a5Smrg])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
27961f0ac6a5Smrg
27971f0ac6a5Smrg
27981f0ac6a5Smrg# AC_LIBTOOL_OBJDIR
27991f0ac6a5Smrg# -----------------
28001f0ac6a5SmrgAC_DEFUN([AC_LIBTOOL_OBJDIR],
28011f0ac6a5Smrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
28021f0ac6a5Smrg[rm -f .libs 2>/dev/null
28031f0ac6a5Smrgmkdir .libs 2>/dev/null
28041f0ac6a5Smrgif test -d .libs; then
28051f0ac6a5Smrg  lt_cv_objdir=.libs
28061f0ac6a5Smrgelse
28071f0ac6a5Smrg  # MS-DOS does not allow filenames that begin with a dot.
28081f0ac6a5Smrg  lt_cv_objdir=_libs
28091f0ac6a5Smrgfi
28101f0ac6a5Smrgrmdir .libs 2>/dev/null])
28111f0ac6a5Smrgobjdir=$lt_cv_objdir
28121f0ac6a5Smrg])# AC_LIBTOOL_OBJDIR
28131f0ac6a5Smrg
28141f0ac6a5Smrg
28151f0ac6a5Smrg# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
28161f0ac6a5Smrg# ----------------------------------------------
28171f0ac6a5Smrg# Check hardcoding attributes.
28181f0ac6a5SmrgAC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
28191f0ac6a5Smrg[AC_MSG_CHECKING([how to hardcode library paths into programs])
28201f0ac6a5Smrg_LT_AC_TAGVAR(hardcode_action, $1)=
28211f0ac6a5Smrgif test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
28221f0ac6a5Smrg   test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \
28231f0ac6a5Smrg   test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
28241f0ac6a5Smrg
28251f0ac6a5Smrg  # We can hardcode non-existant directories.
28261f0ac6a5Smrg  if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
28271f0ac6a5Smrg     # If the only mechanism to avoid hardcoding is shlibpath_var, we
28281f0ac6a5Smrg     # have to relink, otherwise we might link with an installed library
28291f0ac6a5Smrg     # when we should be linking with a yet-to-be-installed one
28301f0ac6a5Smrg     ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
28311f0ac6a5Smrg     test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
28321f0ac6a5Smrg    # Linking always hardcodes the temporary library directory.
28331f0ac6a5Smrg    _LT_AC_TAGVAR(hardcode_action, $1)=relink
28341f0ac6a5Smrg  else
28351f0ac6a5Smrg    # We can link without hardcoding, and we can hardcode nonexisting dirs.
28361f0ac6a5Smrg    _LT_AC_TAGVAR(hardcode_action, $1)=immediate
28371f0ac6a5Smrg  fi
28381f0ac6a5Smrgelse
28391f0ac6a5Smrg  # We cannot hardcode anything, or else we can only hardcode existing
28401f0ac6a5Smrg  # directories.
28411f0ac6a5Smrg  _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
28421f0ac6a5Smrgfi
28431f0ac6a5SmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
28441f0ac6a5Smrg
28451f0ac6a5Smrgif test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
28461f0ac6a5Smrg  # Fast installation is not supported
28471f0ac6a5Smrg  enable_fast_install=no
28481f0ac6a5Smrgelif test "$shlibpath_overrides_runpath" = yes ||
28491f0ac6a5Smrg     test "$enable_shared" = no; then
28501f0ac6a5Smrg  # Fast installation is not necessary
28511f0ac6a5Smrg  enable_fast_install=needless
28521f0ac6a5Smrgfi
28531f0ac6a5Smrg])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
28541f0ac6a5Smrg
28551f0ac6a5Smrg
28561f0ac6a5Smrg# AC_LIBTOOL_SYS_LIB_STRIP
28571f0ac6a5Smrg# ------------------------
28581f0ac6a5SmrgAC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
28591f0ac6a5Smrg[striplib=
28601f0ac6a5Smrgold_striplib=
28611f0ac6a5SmrgAC_MSG_CHECKING([whether stripping libraries is possible])
28621f0ac6a5Smrgif test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
28631f0ac6a5Smrg  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
28641f0ac6a5Smrg  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
28651f0ac6a5Smrg  AC_MSG_RESULT([yes])
28661f0ac6a5Smrgelse
28671f0ac6a5Smrg# FIXME - insert some real tests, host_os isn't really good enough
28681f0ac6a5Smrg  case $host_os in
28691f0ac6a5Smrg   darwin*)
28701f0ac6a5Smrg       if test -n "$STRIP" ; then
28711f0ac6a5Smrg         striplib="$STRIP -x"
2872e5410a46Smrg         old_striplib="$STRIP -S"
28731f0ac6a5Smrg         AC_MSG_RESULT([yes])
28741f0ac6a5Smrg       else
28751f0ac6a5Smrg  AC_MSG_RESULT([no])
28761f0ac6a5Smrgfi
28771f0ac6a5Smrg       ;;
28781f0ac6a5Smrg   *)
28791f0ac6a5Smrg  AC_MSG_RESULT([no])
28801f0ac6a5Smrg    ;;
28811f0ac6a5Smrg  esac
28821f0ac6a5Smrgfi
28831f0ac6a5Smrg])# AC_LIBTOOL_SYS_LIB_STRIP
28841f0ac6a5Smrg
28851f0ac6a5Smrg
28861f0ac6a5Smrg# AC_LIBTOOL_SYS_DYNAMIC_LINKER
28871f0ac6a5Smrg# -----------------------------
28881f0ac6a5Smrg# PORTME Fill in your ld.so characteristics
28891f0ac6a5SmrgAC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
2890e5410a46Smrg[AC_REQUIRE([LT_AC_PROG_SED])dnl
2891e5410a46SmrgAC_MSG_CHECKING([dynamic linker characteristics])
28921f0ac6a5Smrglibrary_names_spec=
28931f0ac6a5Smrglibname_spec='lib$name'
28941f0ac6a5Smrgsoname_spec=
28951f0ac6a5Smrgshrext_cmds=".so"
28961f0ac6a5Smrgpostinstall_cmds=
28971f0ac6a5Smrgpostuninstall_cmds=
28981f0ac6a5Smrgfinish_cmds=
28991f0ac6a5Smrgfinish_eval=
29001f0ac6a5Smrgshlibpath_var=
29011f0ac6a5Smrgshlibpath_overrides_runpath=unknown
29021f0ac6a5Smrgversion_type=none
29031f0ac6a5Smrgdynamic_linker="$host_os ld.so"
29041f0ac6a5Smrgsys_lib_dlsearch_path_spec="/lib /usr/lib"
2905e5410a46Smrgm4_if($1,[],[
29061f0ac6a5Smrgif test "$GCC" = yes; then
2907e5410a46Smrg  case $host_os in
2908e5410a46Smrg    darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
2909e5410a46Smrg    *) lt_awk_arg="/^libraries:/" ;;
2910e5410a46Smrg  esac
2911e5410a46Smrg  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
2912e5410a46Smrg  if echo "$lt_search_path_spec" | grep ';' >/dev/null ; then
29131f0ac6a5Smrg    # if the path contains ";" then we assume it to be the separator
29141f0ac6a5Smrg    # otherwise default to the standard path separator (i.e. ":") - it is
29151f0ac6a5Smrg    # assumed that no part of a normal pathname contains ";" but that should
29161f0ac6a5Smrg    # okay in the real world where ";" in dirpaths is itself problematic.
2917e5410a46Smrg    lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e 's/;/ /g'`
29181f0ac6a5Smrg  else
2919e5410a46Smrg    lt_search_path_spec=`echo "$lt_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
29201f0ac6a5Smrg  fi
2921e5410a46Smrg  # Ok, now we have the path, separated by spaces, we can step through it
2922e5410a46Smrg  # and add multilib dir if necessary.
2923e5410a46Smrg  lt_tmp_lt_search_path_spec=
2924e5410a46Smrg  lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
2925e5410a46Smrg  for lt_sys_path in $lt_search_path_spec; do
2926e5410a46Smrg    if test -d "$lt_sys_path/$lt_multi_os_dir"; then
2927e5410a46Smrg      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
2928e5410a46Smrg    else
2929e5410a46Smrg      test -d "$lt_sys_path" && \
2930e5410a46Smrg	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
2931e5410a46Smrg    fi
2932e5410a46Smrg  done
2933e5410a46Smrg  lt_search_path_spec=`echo $lt_tmp_lt_search_path_spec | awk '
2934e5410a46SmrgBEGIN {RS=" "; FS="/|\n";} {
2935e5410a46Smrg  lt_foo="";
2936e5410a46Smrg  lt_count=0;
2937e5410a46Smrg  for (lt_i = NF; lt_i > 0; lt_i--) {
2938e5410a46Smrg    if ($lt_i != "" && $lt_i != ".") {
2939e5410a46Smrg      if ($lt_i == "..") {
2940e5410a46Smrg        lt_count++;
2941e5410a46Smrg      } else {
2942e5410a46Smrg        if (lt_count == 0) {
2943e5410a46Smrg          lt_foo="/" $lt_i lt_foo;
2944e5410a46Smrg        } else {
2945e5410a46Smrg          lt_count--;
2946e5410a46Smrg        }
2947e5410a46Smrg      }
2948e5410a46Smrg    }
2949e5410a46Smrg  }
2950e5410a46Smrg  if (lt_foo != "") { lt_freq[[lt_foo]]++; }
2951e5410a46Smrg  if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
2952e5410a46Smrg}'`
2953e5410a46Smrg  sys_lib_search_path_spec=`echo $lt_search_path_spec`
29541f0ac6a5Smrgelse
29551f0ac6a5Smrg  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2956e5410a46Smrgfi])
29571f0ac6a5Smrgneed_lib_prefix=unknown
29581f0ac6a5Smrghardcode_into_libs=no
29591f0ac6a5Smrg
29601f0ac6a5Smrg# when you set need_version to no, make sure it does not cause -set_version
29611f0ac6a5Smrg# flags to be left without arguments
29621f0ac6a5Smrgneed_version=unknown
29631f0ac6a5Smrg
29641f0ac6a5Smrgcase $host_os in
29651f0ac6a5Smrgaix3*)
29661f0ac6a5Smrg  version_type=linux
29671f0ac6a5Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
29681f0ac6a5Smrg  shlibpath_var=LIBPATH
29691f0ac6a5Smrg
29701f0ac6a5Smrg  # AIX 3 has no versioning support, so we append a major version to the name.
29711f0ac6a5Smrg  soname_spec='${libname}${release}${shared_ext}$major'
29721f0ac6a5Smrg  ;;
29731f0ac6a5Smrg
2974e5410a46Smrgaix[[4-9]]*)
29751f0ac6a5Smrg  version_type=linux
29761f0ac6a5Smrg  need_lib_prefix=no
29771f0ac6a5Smrg  need_version=no
29781f0ac6a5Smrg  hardcode_into_libs=yes
29791f0ac6a5Smrg  if test "$host_cpu" = ia64; then
29801f0ac6a5Smrg    # AIX 5 supports IA64
29811f0ac6a5Smrg    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
29821f0ac6a5Smrg    shlibpath_var=LD_LIBRARY_PATH
29831f0ac6a5Smrg  else
29841f0ac6a5Smrg    # With GCC up to 2.95.x, collect2 would create an import file
29851f0ac6a5Smrg    # for dependence libraries.  The import file would start with
29861f0ac6a5Smrg    # the line `#! .'.  This would cause the generated library to
29871f0ac6a5Smrg    # depend on `.', always an invalid library.  This was fixed in
29881f0ac6a5Smrg    # development snapshots of GCC prior to 3.0.
29891f0ac6a5Smrg    case $host_os in
29901f0ac6a5Smrg      aix4 | aix4.[[01]] | aix4.[[01]].*)
29911f0ac6a5Smrg      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
29921f0ac6a5Smrg	   echo ' yes '
29931f0ac6a5Smrg	   echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
29941f0ac6a5Smrg	:
29951f0ac6a5Smrg      else
29961f0ac6a5Smrg	can_build_shared=no
29971f0ac6a5Smrg      fi
29981f0ac6a5Smrg      ;;
29991f0ac6a5Smrg    esac
30001f0ac6a5Smrg    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
30011f0ac6a5Smrg    # soname into executable. Probably we can add versioning support to
30021f0ac6a5Smrg    # collect2, so additional links can be useful in future.
30031f0ac6a5Smrg    if test "$aix_use_runtimelinking" = yes; then
30041f0ac6a5Smrg      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
30051f0ac6a5Smrg      # instead of lib<name>.a to let people know that these are not
30061f0ac6a5Smrg      # typical AIX shared libraries.
30071f0ac6a5Smrg      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
30081f0ac6a5Smrg    else
30091f0ac6a5Smrg      # We preserve .a as extension for shared libraries through AIX4.2
30101f0ac6a5Smrg      # and later when we are not doing run time linking.
30111f0ac6a5Smrg      library_names_spec='${libname}${release}.a $libname.a'
30121f0ac6a5Smrg      soname_spec='${libname}${release}${shared_ext}$major'
30131f0ac6a5Smrg    fi
30141f0ac6a5Smrg    shlibpath_var=LIBPATH
30151f0ac6a5Smrg  fi
30161f0ac6a5Smrg  ;;
30171f0ac6a5Smrg
30181f0ac6a5Smrgamigaos*)
30191f0ac6a5Smrg  library_names_spec='$libname.ixlibrary $libname.a'
30201f0ac6a5Smrg  # Create ${libname}_ixlibrary.a entries in /sys/libs.
30211f0ac6a5Smrg  finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''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'
30221f0ac6a5Smrg  ;;
30231f0ac6a5Smrg
30241f0ac6a5Smrgbeos*)
30251f0ac6a5Smrg  library_names_spec='${libname}${shared_ext}'
30261f0ac6a5Smrg  dynamic_linker="$host_os ld.so"
30271f0ac6a5Smrg  shlibpath_var=LIBRARY_PATH
30281f0ac6a5Smrg  ;;
30291f0ac6a5Smrg
30301f0ac6a5Smrgbsdi[[45]]*)
30311f0ac6a5Smrg  version_type=linux
30321f0ac6a5Smrg  need_version=no
30331f0ac6a5Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
30341f0ac6a5Smrg  soname_spec='${libname}${release}${shared_ext}$major'
30351f0ac6a5Smrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
30361f0ac6a5Smrg  shlibpath_var=LD_LIBRARY_PATH
30371f0ac6a5Smrg  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
30381f0ac6a5Smrg  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
30391f0ac6a5Smrg  # the default ld.so.conf also contains /usr/contrib/lib and
30401f0ac6a5Smrg  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
30411f0ac6a5Smrg  # libtool to hard-code these into programs
30421f0ac6a5Smrg  ;;
30431f0ac6a5Smrg
30441f0ac6a5Smrgcygwin* | mingw* | pw32*)
30451f0ac6a5Smrg  version_type=windows
30461f0ac6a5Smrg  shrext_cmds=".dll"
30471f0ac6a5Smrg  need_version=no
30481f0ac6a5Smrg  need_lib_prefix=no
30491f0ac6a5Smrg
30501f0ac6a5Smrg  case $GCC,$host_os in
30511f0ac6a5Smrg  yes,cygwin* | yes,mingw* | yes,pw32*)
30521f0ac6a5Smrg    library_names_spec='$libname.dll.a'
30531f0ac6a5Smrg    # DLL is installed to $(libdir)/../bin by postinstall_cmds
30541f0ac6a5Smrg    postinstall_cmds='base_file=`basename \${file}`~
30551f0ac6a5Smrg      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
30561f0ac6a5Smrg      dldir=$destdir/`dirname \$dlpath`~
30571f0ac6a5Smrg      test -d \$dldir || mkdir -p \$dldir~
30581f0ac6a5Smrg      $install_prog $dir/$dlname \$dldir/$dlname~
30591f0ac6a5Smrg      chmod a+x \$dldir/$dlname'
30601f0ac6a5Smrg    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
30611f0ac6a5Smrg      dlpath=$dir/\$dldll~
30621f0ac6a5Smrg       $rm \$dlpath'
30631f0ac6a5Smrg    shlibpath_overrides_runpath=yes
30641f0ac6a5Smrg
30651f0ac6a5Smrg    case $host_os in
30661f0ac6a5Smrg    cygwin*)
30671f0ac6a5Smrg      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
30681f0ac6a5Smrg      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
30691f0ac6a5Smrg      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
30701f0ac6a5Smrg      ;;
30711f0ac6a5Smrg    mingw*)
30721f0ac6a5Smrg      # MinGW DLLs use traditional 'lib' prefix
30731f0ac6a5Smrg      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
30741f0ac6a5Smrg      sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
30751f0ac6a5Smrg      if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
30761f0ac6a5Smrg        # It is most probably a Windows format PATH printed by
30771f0ac6a5Smrg        # mingw gcc, but we are running on Cygwin. Gcc prints its search
30781f0ac6a5Smrg        # path with ; separators, and with drive letters. We can handle the
30791f0ac6a5Smrg        # drive letters (cygwin fileutils understands them), so leave them,
30801f0ac6a5Smrg        # especially as we might pass files found there to a mingw objdump,
30811f0ac6a5Smrg        # which wouldn't understand a cygwinified path. Ahh.
30821f0ac6a5Smrg        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
30831f0ac6a5Smrg      else
30841f0ac6a5Smrg        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
30851f0ac6a5Smrg      fi
30861f0ac6a5Smrg      ;;
30871f0ac6a5Smrg    pw32*)
30881f0ac6a5Smrg      # pw32 DLLs use 'pw' prefix rather than 'lib'
30891f0ac6a5Smrg      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
30901f0ac6a5Smrg      ;;
30911f0ac6a5Smrg    esac
30921f0ac6a5Smrg    ;;
30931f0ac6a5Smrg
30941f0ac6a5Smrg  *)
30951f0ac6a5Smrg    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
30961f0ac6a5Smrg    ;;
30971f0ac6a5Smrg  esac
30981f0ac6a5Smrg  dynamic_linker='Win32 ld.exe'
30991f0ac6a5Smrg  # FIXME: first we should search . and the directory the executable is in
31001f0ac6a5Smrg  shlibpath_var=PATH
31011f0ac6a5Smrg  ;;
31021f0ac6a5Smrg
31031f0ac6a5Smrgdarwin* | rhapsody*)
31041f0ac6a5Smrg  dynamic_linker="$host_os dyld"
31051f0ac6a5Smrg  version_type=darwin
31061f0ac6a5Smrg  need_lib_prefix=no
31071f0ac6a5Smrg  need_version=no
31081f0ac6a5Smrg  library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
31091f0ac6a5Smrg  soname_spec='${libname}${release}${major}$shared_ext'
31101f0ac6a5Smrg  shlibpath_overrides_runpath=yes
31111f0ac6a5Smrg  shlibpath_var=DYLD_LIBRARY_PATH
31121f0ac6a5Smrg  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
3113e5410a46Smrg  m4_if([$1], [],[
3114e5410a46Smrg  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 
31151f0ac6a5Smrg  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
31161f0ac6a5Smrg  ;;
31171f0ac6a5Smrg
31181f0ac6a5Smrgdgux*)
31191f0ac6a5Smrg  version_type=linux
31201f0ac6a5Smrg  need_lib_prefix=no
31211f0ac6a5Smrg  need_version=no
31221f0ac6a5Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
31231f0ac6a5Smrg  soname_spec='${libname}${release}${shared_ext}$major'
31241f0ac6a5Smrg  shlibpath_var=LD_LIBRARY_PATH
31251f0ac6a5Smrg  ;;
31261f0ac6a5Smrg
31271f0ac6a5Smrgfreebsd1*)
31281f0ac6a5Smrg  dynamic_linker=no
31291f0ac6a5Smrg  ;;
31301f0ac6a5Smrg
31311f0ac6a5Smrgfreebsd* | dragonfly*)
31321f0ac6a5Smrg  # DragonFly does not have aout.  When/if they implement a new
31331f0ac6a5Smrg  # versioning mechanism, adjust this.
31341f0ac6a5Smrg  if test -x /usr/bin/objformat; then
31351f0ac6a5Smrg    objformat=`/usr/bin/objformat`
31361f0ac6a5Smrg  else
31371f0ac6a5Smrg    case $host_os in
31381f0ac6a5Smrg    freebsd[[123]]*) objformat=aout ;;
31391f0ac6a5Smrg    *) objformat=elf ;;
31401f0ac6a5Smrg    esac
31411f0ac6a5Smrg  fi
31421f0ac6a5Smrg  version_type=freebsd-$objformat
31431f0ac6a5Smrg  case $version_type in
31441f0ac6a5Smrg    freebsd-elf*)
31451f0ac6a5Smrg      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
31461f0ac6a5Smrg      need_version=no
31471f0ac6a5Smrg      need_lib_prefix=no
31481f0ac6a5Smrg      ;;
31491f0ac6a5Smrg    freebsd-*)
31501f0ac6a5Smrg      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
31511f0ac6a5Smrg      need_version=yes
31521f0ac6a5Smrg      ;;
31531f0ac6a5Smrg  esac
31541f0ac6a5Smrg  shlibpath_var=LD_LIBRARY_PATH
31551f0ac6a5Smrg  case $host_os in
31561f0ac6a5Smrg  freebsd2*)
31571f0ac6a5Smrg    shlibpath_overrides_runpath=yes
31581f0ac6a5Smrg    ;;
31591f0ac6a5Smrg  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
31601f0ac6a5Smrg    shlibpath_overrides_runpath=yes
31611f0ac6a5Smrg    hardcode_into_libs=yes
31621f0ac6a5Smrg    ;;
31631f0ac6a5Smrg  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
31641f0ac6a5Smrg  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
31651f0ac6a5Smrg    shlibpath_overrides_runpath=no
31661f0ac6a5Smrg    hardcode_into_libs=yes
31671f0ac6a5Smrg    ;;
3168e5410a46Smrg  *) # from 4.6 on, and DragonFly
31691f0ac6a5Smrg    shlibpath_overrides_runpath=yes
31701f0ac6a5Smrg    hardcode_into_libs=yes
31711f0ac6a5Smrg    ;;
31721f0ac6a5Smrg  esac
31731f0ac6a5Smrg  ;;
31741f0ac6a5Smrg
31751f0ac6a5Smrggnu*)
31761f0ac6a5Smrg  version_type=linux
31771f0ac6a5Smrg  need_lib_prefix=no
31781f0ac6a5Smrg  need_version=no
31791f0ac6a5Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
31801f0ac6a5Smrg  soname_spec='${libname}${release}${shared_ext}$major'
31811f0ac6a5Smrg  shlibpath_var=LD_LIBRARY_PATH
31821f0ac6a5Smrg  hardcode_into_libs=yes
31831f0ac6a5Smrg  ;;
31841f0ac6a5Smrg
31851f0ac6a5Smrghpux9* | hpux10* | hpux11*)
31861f0ac6a5Smrg  # Give a soname corresponding to the major version so that dld.sl refuses to
31871f0ac6a5Smrg  # link against other versions.
31881f0ac6a5Smrg  version_type=sunos
31891f0ac6a5Smrg  need_lib_prefix=no
31901f0ac6a5Smrg  need_version=no
31911f0ac6a5Smrg  case $host_cpu in
31921f0ac6a5Smrg  ia64*)
31931f0ac6a5Smrg    shrext_cmds='.so'
31941f0ac6a5Smrg    hardcode_into_libs=yes
31951f0ac6a5Smrg    dynamic_linker="$host_os dld.so"
31961f0ac6a5Smrg    shlibpath_var=LD_LIBRARY_PATH
31971f0ac6a5Smrg    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
31981f0ac6a5Smrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
31991f0ac6a5Smrg    soname_spec='${libname}${release}${shared_ext}$major'
32001f0ac6a5Smrg    if test "X$HPUX_IA64_MODE" = X32; then
32011f0ac6a5Smrg      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
32021f0ac6a5Smrg    else
32031f0ac6a5Smrg      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
32041f0ac6a5Smrg    fi
32051f0ac6a5Smrg    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
32061f0ac6a5Smrg    ;;
32071f0ac6a5Smrg   hppa*64*)
32081f0ac6a5Smrg     shrext_cmds='.sl'
32091f0ac6a5Smrg     hardcode_into_libs=yes
32101f0ac6a5Smrg     dynamic_linker="$host_os dld.sl"
32111f0ac6a5Smrg     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
32121f0ac6a5Smrg     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
32131f0ac6a5Smrg     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
32141f0ac6a5Smrg     soname_spec='${libname}${release}${shared_ext}$major'
32151f0ac6a5Smrg     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
32161f0ac6a5Smrg     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
32171f0ac6a5Smrg     ;;
32181f0ac6a5Smrg   *)
32191f0ac6a5Smrg    shrext_cmds='.sl'
32201f0ac6a5Smrg    dynamic_linker="$host_os dld.sl"
32211f0ac6a5Smrg    shlibpath_var=SHLIB_PATH
32221f0ac6a5Smrg    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
32231f0ac6a5Smrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
32241f0ac6a5Smrg    soname_spec='${libname}${release}${shared_ext}$major'
32251f0ac6a5Smrg    ;;
32261f0ac6a5Smrg  esac
32271f0ac6a5Smrg  # HP-UX runs *really* slowly unless shared libraries are mode 555.
32281f0ac6a5Smrg  postinstall_cmds='chmod 555 $lib'
32291f0ac6a5Smrg  ;;
32301f0ac6a5Smrg
3231e5410a46Smrginterix[[3-9]]*)
32321f0ac6a5Smrg  version_type=linux
32331f0ac6a5Smrg  need_lib_prefix=no
32341f0ac6a5Smrg  need_version=no
32351f0ac6a5Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
32361f0ac6a5Smrg  soname_spec='${libname}${release}${shared_ext}$major'
32371f0ac6a5Smrg  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
32381f0ac6a5Smrg  shlibpath_var=LD_LIBRARY_PATH
32391f0ac6a5Smrg  shlibpath_overrides_runpath=no
32401f0ac6a5Smrg  hardcode_into_libs=yes
32411f0ac6a5Smrg  ;;
32421f0ac6a5Smrg
32431f0ac6a5Smrgirix5* | irix6* | nonstopux*)
32441f0ac6a5Smrg  case $host_os in
32451f0ac6a5Smrg    nonstopux*) version_type=nonstopux ;;
32461f0ac6a5Smrg    *)
32471f0ac6a5Smrg	if test "$lt_cv_prog_gnu_ld" = yes; then
32481f0ac6a5Smrg		version_type=linux
32491f0ac6a5Smrg	else
32501f0ac6a5Smrg		version_type=irix
32511f0ac6a5Smrg	fi ;;
32521f0ac6a5Smrg  esac
32531f0ac6a5Smrg  need_lib_prefix=no
32541f0ac6a5Smrg  need_version=no
32551f0ac6a5Smrg  soname_spec='${libname}${release}${shared_ext}$major'
32561f0ac6a5Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
32571f0ac6a5Smrg  case $host_os in
32581f0ac6a5Smrg  irix5* | nonstopux*)
32591f0ac6a5Smrg    libsuff= shlibsuff=
32601f0ac6a5Smrg    ;;
32611f0ac6a5Smrg  *)
32621f0ac6a5Smrg    case $LD in # libtool.m4 will add one of these switches to LD
32631f0ac6a5Smrg    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
32641f0ac6a5Smrg      libsuff= shlibsuff= libmagic=32-bit;;
32651f0ac6a5Smrg    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
32661f0ac6a5Smrg      libsuff=32 shlibsuff=N32 libmagic=N32;;
32671f0ac6a5Smrg    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
32681f0ac6a5Smrg      libsuff=64 shlibsuff=64 libmagic=64-bit;;
32691f0ac6a5Smrg    *) libsuff= shlibsuff= libmagic=never-match;;
32701f0ac6a5Smrg    esac
32711f0ac6a5Smrg    ;;
32721f0ac6a5Smrg  esac
32731f0ac6a5Smrg  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
32741f0ac6a5Smrg  shlibpath_overrides_runpath=no
32751f0ac6a5Smrg  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
32761f0ac6a5Smrg  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
32771f0ac6a5Smrg  hardcode_into_libs=yes
32781f0ac6a5Smrg  ;;
32791f0ac6a5Smrg
32801f0ac6a5Smrg# No shared lib support for Linux oldld, aout, or coff.
32811f0ac6a5Smrglinux*oldld* | linux*aout* | linux*coff*)
32821f0ac6a5Smrg  dynamic_linker=no
32831f0ac6a5Smrg  ;;
32841f0ac6a5Smrg
32851f0ac6a5Smrg# This must be Linux ELF.
3286e5410a46Smrglinux* | k*bsd*-gnu)
32871f0ac6a5Smrg  version_type=linux
32881f0ac6a5Smrg  need_lib_prefix=no
32891f0ac6a5Smrg  need_version=no
32901f0ac6a5Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
32911f0ac6a5Smrg  soname_spec='${libname}${release}${shared_ext}$major'
32921f0ac6a5Smrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
32931f0ac6a5Smrg  shlibpath_var=LD_LIBRARY_PATH
32941f0ac6a5Smrg  shlibpath_overrides_runpath=no
32951f0ac6a5Smrg  # This implies no fast_install, which is unacceptable.
32961f0ac6a5Smrg  # Some rework will be needed to allow for fast_install
32971f0ac6a5Smrg  # before this can be enabled.
32981f0ac6a5Smrg  hardcode_into_libs=yes
32991f0ac6a5Smrg
33001f0ac6a5Smrg  # Append ld.so.conf contents to the search path
33011f0ac6a5Smrg  if test -f /etc/ld.so.conf; then
3302e5410a46Smrg    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;/^$/d' | tr '\n' ' '`
33031f0ac6a5Smrg    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
33041f0ac6a5Smrg  fi
33051f0ac6a5Smrg
33061f0ac6a5Smrg  # We used to test for /lib/ld.so.1 and disable shared libraries on
33071f0ac6a5Smrg  # powerpc, because MkLinux only supported shared libraries with the
33081f0ac6a5Smrg  # GNU dynamic linker.  Since this was broken with cross compilers,
33091f0ac6a5Smrg  # most powerpc-linux boxes support dynamic linking these days and
33101f0ac6a5Smrg  # people can always --disable-shared, the test was removed, and we
33111f0ac6a5Smrg  # assume the GNU/Linux dynamic linker is in use.
33121f0ac6a5Smrg  dynamic_linker='GNU/Linux ld.so'
33131f0ac6a5Smrg  ;;
33141f0ac6a5Smrg
33151f0ac6a5Smrgnetbsd*)
33161f0ac6a5Smrg  version_type=sunos
33171f0ac6a5Smrg  need_lib_prefix=no
33181f0ac6a5Smrg  need_version=no
33191f0ac6a5Smrg  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
33201f0ac6a5Smrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
33211f0ac6a5Smrg    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
33221f0ac6a5Smrg    dynamic_linker='NetBSD (a.out) ld.so'
33231f0ac6a5Smrg  else
33241f0ac6a5Smrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
33251f0ac6a5Smrg    soname_spec='${libname}${release}${shared_ext}$major'
33261f0ac6a5Smrg    dynamic_linker='NetBSD ld.elf_so'
33271f0ac6a5Smrg  fi
33281f0ac6a5Smrg  shlibpath_var=LD_LIBRARY_PATH
33291f0ac6a5Smrg  shlibpath_overrides_runpath=yes
33301f0ac6a5Smrg  hardcode_into_libs=yes
33311f0ac6a5Smrg  ;;
33321f0ac6a5Smrg
33331f0ac6a5Smrgnewsos6)
33341f0ac6a5Smrg  version_type=linux
33351f0ac6a5Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
33361f0ac6a5Smrg  shlibpath_var=LD_LIBRARY_PATH
33371f0ac6a5Smrg  shlibpath_overrides_runpath=yes
33381f0ac6a5Smrg  ;;
33391f0ac6a5Smrg
33401f0ac6a5Smrgnto-qnx*)
33411f0ac6a5Smrg  version_type=linux
33421f0ac6a5Smrg  need_lib_prefix=no
33431f0ac6a5Smrg  need_version=no
33441f0ac6a5Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
33451f0ac6a5Smrg  soname_spec='${libname}${release}${shared_ext}$major'
33461f0ac6a5Smrg  shlibpath_var=LD_LIBRARY_PATH
33471f0ac6a5Smrg  shlibpath_overrides_runpath=yes
33481f0ac6a5Smrg  ;;
33491f0ac6a5Smrg
33501f0ac6a5Smrgopenbsd*)
33511f0ac6a5Smrg  version_type=sunos
33521f0ac6a5Smrg  sys_lib_dlsearch_path_spec="/usr/lib"
33531f0ac6a5Smrg  need_lib_prefix=no
33541f0ac6a5Smrg  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
33551f0ac6a5Smrg  case $host_os in
33561f0ac6a5Smrg    openbsd3.3 | openbsd3.3.*) need_version=yes ;;
33571f0ac6a5Smrg    *)                         need_version=no  ;;
33581f0ac6a5Smrg  esac
33591f0ac6a5Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
33601f0ac6a5Smrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
33611f0ac6a5Smrg  shlibpath_var=LD_LIBRARY_PATH
33621f0ac6a5Smrg  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
33631f0ac6a5Smrg    case $host_os in
33641f0ac6a5Smrg      openbsd2.[[89]] | openbsd2.[[89]].*)
33651f0ac6a5Smrg	shlibpath_overrides_runpath=no
33661f0ac6a5Smrg	;;
33671f0ac6a5Smrg      *)
33681f0ac6a5Smrg	shlibpath_overrides_runpath=yes
33691f0ac6a5Smrg	;;
33701f0ac6a5Smrg      esac
33711f0ac6a5Smrg  else
33721f0ac6a5Smrg    shlibpath_overrides_runpath=yes
33731f0ac6a5Smrg  fi
33741f0ac6a5Smrg  ;;
33751f0ac6a5Smrg
33761f0ac6a5Smrgos2*)
33771f0ac6a5Smrg  libname_spec='$name'
33781f0ac6a5Smrg  shrext_cmds=".dll"
33791f0ac6a5Smrg  need_lib_prefix=no
33801f0ac6a5Smrg  library_names_spec='$libname${shared_ext} $libname.a'
33811f0ac6a5Smrg  dynamic_linker='OS/2 ld.exe'
33821f0ac6a5Smrg  shlibpath_var=LIBPATH
33831f0ac6a5Smrg  ;;
33841f0ac6a5Smrg
33851f0ac6a5Smrgosf3* | osf4* | osf5*)
33861f0ac6a5Smrg  version_type=osf
33871f0ac6a5Smrg  need_lib_prefix=no
33881f0ac6a5Smrg  need_version=no
33891f0ac6a5Smrg  soname_spec='${libname}${release}${shared_ext}$major'
33901f0ac6a5Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
33911f0ac6a5Smrg  shlibpath_var=LD_LIBRARY_PATH
33921f0ac6a5Smrg  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
33931f0ac6a5Smrg  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
33941f0ac6a5Smrg  ;;
33951f0ac6a5Smrg
3396e5410a46Smrgrdos*)
3397e5410a46Smrg  dynamic_linker=no
3398e5410a46Smrg  ;;
3399e5410a46Smrg
34001f0ac6a5Smrgsolaris*)
34011f0ac6a5Smrg  version_type=linux
34021f0ac6a5Smrg  need_lib_prefix=no
34031f0ac6a5Smrg  need_version=no
34041f0ac6a5Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
34051f0ac6a5Smrg  soname_spec='${libname}${release}${shared_ext}$major'
34061f0ac6a5Smrg  shlibpath_var=LD_LIBRARY_PATH
34071f0ac6a5Smrg  shlibpath_overrides_runpath=yes
34081f0ac6a5Smrg  hardcode_into_libs=yes
34091f0ac6a5Smrg  # ldd complains unless libraries are executable
34101f0ac6a5Smrg  postinstall_cmds='chmod +x $lib'
34111f0ac6a5Smrg  ;;
34121f0ac6a5Smrg
34131f0ac6a5Smrgsunos4*)
34141f0ac6a5Smrg  version_type=sunos
34151f0ac6a5Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
34161f0ac6a5Smrg  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
34171f0ac6a5Smrg  shlibpath_var=LD_LIBRARY_PATH
34181f0ac6a5Smrg  shlibpath_overrides_runpath=yes
34191f0ac6a5Smrg  if test "$with_gnu_ld" = yes; then
34201f0ac6a5Smrg    need_lib_prefix=no
34211f0ac6a5Smrg  fi
34221f0ac6a5Smrg  need_version=yes
34231f0ac6a5Smrg  ;;
34241f0ac6a5Smrg
34251f0ac6a5Smrgsysv4 | sysv4.3*)
34261f0ac6a5Smrg  version_type=linux
34271f0ac6a5Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
34281f0ac6a5Smrg  soname_spec='${libname}${release}${shared_ext}$major'
34291f0ac6a5Smrg  shlibpath_var=LD_LIBRARY_PATH
34301f0ac6a5Smrg  case $host_vendor in
34311f0ac6a5Smrg    sni)
34321f0ac6a5Smrg      shlibpath_overrides_runpath=no
34331f0ac6a5Smrg      need_lib_prefix=no
34341f0ac6a5Smrg      export_dynamic_flag_spec='${wl}-Blargedynsym'
34351f0ac6a5Smrg      runpath_var=LD_RUN_PATH
34361f0ac6a5Smrg      ;;
34371f0ac6a5Smrg    siemens)
34381f0ac6a5Smrg      need_lib_prefix=no
34391f0ac6a5Smrg      ;;
34401f0ac6a5Smrg    motorola)
34411f0ac6a5Smrg      need_lib_prefix=no
34421f0ac6a5Smrg      need_version=no
34431f0ac6a5Smrg      shlibpath_overrides_runpath=no
34441f0ac6a5Smrg      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
34451f0ac6a5Smrg      ;;
34461f0ac6a5Smrg  esac
34471f0ac6a5Smrg  ;;
34481f0ac6a5Smrg
34491f0ac6a5Smrgsysv4*MP*)
34501f0ac6a5Smrg  if test -d /usr/nec ;then
34511f0ac6a5Smrg    version_type=linux
34521f0ac6a5Smrg    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
34531f0ac6a5Smrg    soname_spec='$libname${shared_ext}.$major'
34541f0ac6a5Smrg    shlibpath_var=LD_LIBRARY_PATH
34551f0ac6a5Smrg  fi
34561f0ac6a5Smrg  ;;
34571f0ac6a5Smrg
34581f0ac6a5Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
34591f0ac6a5Smrg  version_type=freebsd-elf
34601f0ac6a5Smrg  need_lib_prefix=no
34611f0ac6a5Smrg  need_version=no
34621f0ac6a5Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
34631f0ac6a5Smrg  soname_spec='${libname}${release}${shared_ext}$major'
34641f0ac6a5Smrg  shlibpath_var=LD_LIBRARY_PATH
34651f0ac6a5Smrg  hardcode_into_libs=yes
34661f0ac6a5Smrg  if test "$with_gnu_ld" = yes; then
34671f0ac6a5Smrg    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
34681f0ac6a5Smrg    shlibpath_overrides_runpath=no
34691f0ac6a5Smrg  else
34701f0ac6a5Smrg    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
34711f0ac6a5Smrg    shlibpath_overrides_runpath=yes
34721f0ac6a5Smrg    case $host_os in
34731f0ac6a5Smrg      sco3.2v5*)
34741f0ac6a5Smrg        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
34751f0ac6a5Smrg	;;
34761f0ac6a5Smrg    esac
34771f0ac6a5Smrg  fi
34781f0ac6a5Smrg  sys_lib_dlsearch_path_spec='/usr/lib'
34791f0ac6a5Smrg  ;;
34801f0ac6a5Smrg
34811f0ac6a5Smrguts4*)
34821f0ac6a5Smrg  version_type=linux
34831f0ac6a5Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
34841f0ac6a5Smrg  soname_spec='${libname}${release}${shared_ext}$major'
34851f0ac6a5Smrg  shlibpath_var=LD_LIBRARY_PATH
34861f0ac6a5Smrg  ;;
34871f0ac6a5Smrg
34881f0ac6a5Smrg*)
34891f0ac6a5Smrg  dynamic_linker=no
34901f0ac6a5Smrg  ;;
34911f0ac6a5Smrgesac
34921f0ac6a5SmrgAC_MSG_RESULT([$dynamic_linker])
34931f0ac6a5Smrgtest "$dynamic_linker" = no && can_build_shared=no
34941f0ac6a5Smrg
3495e5410a46SmrgAC_CACHE_VAL([lt_cv_sys_lib_search_path_spec],
3496e5410a46Smrg[lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec"])
3497e5410a46Smrgsys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
3498e5410a46SmrgAC_CACHE_VAL([lt_cv_sys_lib_dlsearch_path_spec],
3499e5410a46Smrg[lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec"])
3500e5410a46Smrgsys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
3501e5410a46Smrg
35021f0ac6a5Smrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var"
35031f0ac6a5Smrgif test "$GCC" = yes; then
35041f0ac6a5Smrg  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
35051f0ac6a5Smrgfi
35061f0ac6a5Smrg])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
35071f0ac6a5Smrg
35081f0ac6a5Smrg
35091f0ac6a5Smrg# _LT_AC_TAGCONFIG
35101f0ac6a5Smrg# ----------------
35111f0ac6a5SmrgAC_DEFUN([_LT_AC_TAGCONFIG],
3512e5410a46Smrg[AC_REQUIRE([LT_AC_PROG_SED])dnl
3513e5410a46SmrgAC_ARG_WITH([tags],
35141f0ac6a5Smrg    [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
35151f0ac6a5Smrg        [include additional configurations @<:@automatic@:>@])],
35161f0ac6a5Smrg    [tagnames="$withval"])
35171f0ac6a5Smrg
35181f0ac6a5Smrgif test -f "$ltmain" && test -n "$tagnames"; then
35191f0ac6a5Smrg  if test ! -f "${ofile}"; then
35201f0ac6a5Smrg    AC_MSG_WARN([output file `$ofile' does not exist])
35211f0ac6a5Smrg  fi
35221f0ac6a5Smrg
35231f0ac6a5Smrg  if test -z "$LTCC"; then
35241f0ac6a5Smrg    eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
35251f0ac6a5Smrg    if test -z "$LTCC"; then
35261f0ac6a5Smrg      AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
35271f0ac6a5Smrg    else
35281f0ac6a5Smrg      AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
35291f0ac6a5Smrg    fi
35301f0ac6a5Smrg  fi
35311f0ac6a5Smrg  if test -z "$LTCFLAGS"; then
35321f0ac6a5Smrg    eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`"
35331f0ac6a5Smrg  fi
35341f0ac6a5Smrg
35351f0ac6a5Smrg  # Extract list of available tagged configurations in $ofile.
35361f0ac6a5Smrg  # Note that this assumes the entire list is on one line.
35371f0ac6a5Smrg  available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
35381f0ac6a5Smrg
35391f0ac6a5Smrg  lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
35401f0ac6a5Smrg  for tagname in $tagnames; do
35411f0ac6a5Smrg    IFS="$lt_save_ifs"
35421f0ac6a5Smrg    # Check whether tagname contains only valid characters
35431f0ac6a5Smrg    case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
35441f0ac6a5Smrg    "") ;;
35451f0ac6a5Smrg    *)  AC_MSG_ERROR([invalid tag name: $tagname])
35461f0ac6a5Smrg	;;
35471f0ac6a5Smrg    esac
35481f0ac6a5Smrg
35491f0ac6a5Smrg    if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
35501f0ac6a5Smrg    then
35511f0ac6a5Smrg      AC_MSG_ERROR([tag name \"$tagname\" already exists])
35521f0ac6a5Smrg    fi
35531f0ac6a5Smrg
35541f0ac6a5Smrg    # Update the list of available tags.
35551f0ac6a5Smrg    if test -n "$tagname"; then
35561f0ac6a5Smrg      echo appending configuration tag \"$tagname\" to $ofile
35571f0ac6a5Smrg
35581f0ac6a5Smrg      case $tagname in
35591f0ac6a5Smrg      CXX)
35601f0ac6a5Smrg	if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
35611f0ac6a5Smrg	    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
35621f0ac6a5Smrg	    (test "X$CXX" != "Xg++"))) ; then
35631f0ac6a5Smrg	  AC_LIBTOOL_LANG_CXX_CONFIG
35641f0ac6a5Smrg	else
35651f0ac6a5Smrg	  tagname=""
35661f0ac6a5Smrg	fi
35671f0ac6a5Smrg	;;
35681f0ac6a5Smrg
35691f0ac6a5Smrg      F77)
35701f0ac6a5Smrg	if test -n "$F77" && test "X$F77" != "Xno"; then
35711f0ac6a5Smrg	  AC_LIBTOOL_LANG_F77_CONFIG
35721f0ac6a5Smrg	else
35731f0ac6a5Smrg	  tagname=""
35741f0ac6a5Smrg	fi
35751f0ac6a5Smrg	;;
35761f0ac6a5Smrg
35771f0ac6a5Smrg      GCJ)
35781f0ac6a5Smrg	if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
35791f0ac6a5Smrg	  AC_LIBTOOL_LANG_GCJ_CONFIG
35801f0ac6a5Smrg	else
35811f0ac6a5Smrg	  tagname=""
35821f0ac6a5Smrg	fi
35831f0ac6a5Smrg	;;
35841f0ac6a5Smrg
35851f0ac6a5Smrg      RC)
35861f0ac6a5Smrg	AC_LIBTOOL_LANG_RC_CONFIG
35871f0ac6a5Smrg	;;
35881f0ac6a5Smrg
35891f0ac6a5Smrg      *)
35901f0ac6a5Smrg	AC_MSG_ERROR([Unsupported tag name: $tagname])
35911f0ac6a5Smrg	;;
35921f0ac6a5Smrg      esac
35931f0ac6a5Smrg
35941f0ac6a5Smrg      # Append the new tag name to the list of available tags.
35951f0ac6a5Smrg      if test -n "$tagname" ; then
35961f0ac6a5Smrg      available_tags="$available_tags $tagname"
35971f0ac6a5Smrg    fi
35981f0ac6a5Smrg    fi
35991f0ac6a5Smrg  done
36001f0ac6a5Smrg  IFS="$lt_save_ifs"
36011f0ac6a5Smrg
36021f0ac6a5Smrg  # Now substitute the updated list of available tags.
36031f0ac6a5Smrg  if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
36041f0ac6a5Smrg    mv "${ofile}T" "$ofile"
36051f0ac6a5Smrg    chmod +x "$ofile"
36061f0ac6a5Smrg  else
36071f0ac6a5Smrg    rm -f "${ofile}T"
36081f0ac6a5Smrg    AC_MSG_ERROR([unable to update list of available tagged configurations.])
36091f0ac6a5Smrg  fi
36101f0ac6a5Smrgfi
36111f0ac6a5Smrg])# _LT_AC_TAGCONFIG
36121f0ac6a5Smrg
36131f0ac6a5Smrg
36141f0ac6a5Smrg# AC_LIBTOOL_DLOPEN
36151f0ac6a5Smrg# -----------------
36161f0ac6a5Smrg# enable checks for dlopen support
36171f0ac6a5SmrgAC_DEFUN([AC_LIBTOOL_DLOPEN],
36181f0ac6a5Smrg [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
36191f0ac6a5Smrg])# AC_LIBTOOL_DLOPEN
36201f0ac6a5Smrg
36211f0ac6a5Smrg
36221f0ac6a5Smrg# AC_LIBTOOL_WIN32_DLL
36231f0ac6a5Smrg# --------------------
36241f0ac6a5Smrg# declare package support for building win32 DLLs
36251f0ac6a5SmrgAC_DEFUN([AC_LIBTOOL_WIN32_DLL],
36261f0ac6a5Smrg[AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
36271f0ac6a5Smrg])# AC_LIBTOOL_WIN32_DLL
36281f0ac6a5Smrg
36291f0ac6a5Smrg
36301f0ac6a5Smrg# AC_ENABLE_SHARED([DEFAULT])
36311f0ac6a5Smrg# ---------------------------
36321f0ac6a5Smrg# implement the --enable-shared flag
36331f0ac6a5Smrg# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
36341f0ac6a5SmrgAC_DEFUN([AC_ENABLE_SHARED],
36351f0ac6a5Smrg[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
36361f0ac6a5SmrgAC_ARG_ENABLE([shared],
36371f0ac6a5Smrg    [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
36381f0ac6a5Smrg	[build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
36391f0ac6a5Smrg    [p=${PACKAGE-default}
36401f0ac6a5Smrg    case $enableval in
36411f0ac6a5Smrg    yes) enable_shared=yes ;;
36421f0ac6a5Smrg    no) enable_shared=no ;;
36431f0ac6a5Smrg    *)
36441f0ac6a5Smrg      enable_shared=no
36451f0ac6a5Smrg      # Look at the argument we got.  We use all the common list separators.
36461f0ac6a5Smrg      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
36471f0ac6a5Smrg      for pkg in $enableval; do
36481f0ac6a5Smrg	IFS="$lt_save_ifs"
36491f0ac6a5Smrg	if test "X$pkg" = "X$p"; then
36501f0ac6a5Smrg	  enable_shared=yes
36511f0ac6a5Smrg	fi
36521f0ac6a5Smrg      done
36531f0ac6a5Smrg      IFS="$lt_save_ifs"
36541f0ac6a5Smrg      ;;
36551f0ac6a5Smrg    esac],
36561f0ac6a5Smrg    [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
36571f0ac6a5Smrg])# AC_ENABLE_SHARED
36581f0ac6a5Smrg
36591f0ac6a5Smrg
36601f0ac6a5Smrg# AC_DISABLE_SHARED
36611f0ac6a5Smrg# -----------------
36621f0ac6a5Smrg# set the default shared flag to --disable-shared
36631f0ac6a5SmrgAC_DEFUN([AC_DISABLE_SHARED],
36641f0ac6a5Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
36651f0ac6a5SmrgAC_ENABLE_SHARED(no)
36661f0ac6a5Smrg])# AC_DISABLE_SHARED
36671f0ac6a5Smrg
36681f0ac6a5Smrg
36691f0ac6a5Smrg# AC_ENABLE_STATIC([DEFAULT])
36701f0ac6a5Smrg# ---------------------------
36711f0ac6a5Smrg# implement the --enable-static flag
36721f0ac6a5Smrg# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
36731f0ac6a5SmrgAC_DEFUN([AC_ENABLE_STATIC],
36741f0ac6a5Smrg[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
36751f0ac6a5SmrgAC_ARG_ENABLE([static],
36761f0ac6a5Smrg    [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
36771f0ac6a5Smrg	[build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
36781f0ac6a5Smrg    [p=${PACKAGE-default}
36791f0ac6a5Smrg    case $enableval in
36801f0ac6a5Smrg    yes) enable_static=yes ;;
36811f0ac6a5Smrg    no) enable_static=no ;;
36821f0ac6a5Smrg    *)
36831f0ac6a5Smrg     enable_static=no
36841f0ac6a5Smrg      # Look at the argument we got.  We use all the common list separators.
36851f0ac6a5Smrg      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
36861f0ac6a5Smrg      for pkg in $enableval; do
36871f0ac6a5Smrg	IFS="$lt_save_ifs"
36881f0ac6a5Smrg	if test "X$pkg" = "X$p"; then
36891f0ac6a5Smrg	  enable_static=yes
36901f0ac6a5Smrg	fi
36911f0ac6a5Smrg      done
36921f0ac6a5Smrg      IFS="$lt_save_ifs"
36931f0ac6a5Smrg      ;;
36941f0ac6a5Smrg    esac],
36951f0ac6a5Smrg    [enable_static=]AC_ENABLE_STATIC_DEFAULT)
36961f0ac6a5Smrg])# AC_ENABLE_STATIC
36971f0ac6a5Smrg
36981f0ac6a5Smrg
36991f0ac6a5Smrg# AC_DISABLE_STATIC
37001f0ac6a5Smrg# -----------------
37011f0ac6a5Smrg# set the default static flag to --disable-static
37021f0ac6a5SmrgAC_DEFUN([AC_DISABLE_STATIC],
37031f0ac6a5Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
37041f0ac6a5SmrgAC_ENABLE_STATIC(no)
37051f0ac6a5Smrg])# AC_DISABLE_STATIC
37061f0ac6a5Smrg
37071f0ac6a5Smrg
37081f0ac6a5Smrg# AC_ENABLE_FAST_INSTALL([DEFAULT])
37091f0ac6a5Smrg# ---------------------------------
37101f0ac6a5Smrg# implement the --enable-fast-install flag
37111f0ac6a5Smrg# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
37121f0ac6a5SmrgAC_DEFUN([AC_ENABLE_FAST_INSTALL],
37131f0ac6a5Smrg[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
37141f0ac6a5SmrgAC_ARG_ENABLE([fast-install],
37151f0ac6a5Smrg    [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
37161f0ac6a5Smrg    [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
37171f0ac6a5Smrg    [p=${PACKAGE-default}
37181f0ac6a5Smrg    case $enableval in
37191f0ac6a5Smrg    yes) enable_fast_install=yes ;;
37201f0ac6a5Smrg    no) enable_fast_install=no ;;
37211f0ac6a5Smrg    *)
37221f0ac6a5Smrg      enable_fast_install=no
37231f0ac6a5Smrg      # Look at the argument we got.  We use all the common list separators.
37241f0ac6a5Smrg      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
37251f0ac6a5Smrg      for pkg in $enableval; do
37261f0ac6a5Smrg	IFS="$lt_save_ifs"
37271f0ac6a5Smrg	if test "X$pkg" = "X$p"; then
37281f0ac6a5Smrg	  enable_fast_install=yes
37291f0ac6a5Smrg	fi
37301f0ac6a5Smrg      done
37311f0ac6a5Smrg      IFS="$lt_save_ifs"
37321f0ac6a5Smrg      ;;
37331f0ac6a5Smrg    esac],
37341f0ac6a5Smrg    [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
37351f0ac6a5Smrg])# AC_ENABLE_FAST_INSTALL
37361f0ac6a5Smrg
37371f0ac6a5Smrg
37381f0ac6a5Smrg# AC_DISABLE_FAST_INSTALL
37391f0ac6a5Smrg# -----------------------
37401f0ac6a5Smrg# set the default to --disable-fast-install
37411f0ac6a5SmrgAC_DEFUN([AC_DISABLE_FAST_INSTALL],
37421f0ac6a5Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
37431f0ac6a5SmrgAC_ENABLE_FAST_INSTALL(no)
37441f0ac6a5Smrg])# AC_DISABLE_FAST_INSTALL
37451f0ac6a5Smrg
37461f0ac6a5Smrg
37471f0ac6a5Smrg# AC_LIBTOOL_PICMODE([MODE])
37481f0ac6a5Smrg# --------------------------
37491f0ac6a5Smrg# implement the --with-pic flag
37501f0ac6a5Smrg# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
37511f0ac6a5SmrgAC_DEFUN([AC_LIBTOOL_PICMODE],
37521f0ac6a5Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
37531f0ac6a5Smrgpic_mode=ifelse($#,1,$1,default)
37541f0ac6a5Smrg])# AC_LIBTOOL_PICMODE
37551f0ac6a5Smrg
37561f0ac6a5Smrg
37571f0ac6a5Smrg# AC_PROG_EGREP
37581f0ac6a5Smrg# -------------
37591f0ac6a5Smrg# This is predefined starting with Autoconf 2.54, so this conditional
37601f0ac6a5Smrg# definition can be removed once we require Autoconf 2.54 or later.
37611f0ac6a5Smrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
37621f0ac6a5Smrg[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
37631f0ac6a5Smrg   [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
37641f0ac6a5Smrg    then ac_cv_prog_egrep='grep -E'
37651f0ac6a5Smrg    else ac_cv_prog_egrep='egrep'
37661f0ac6a5Smrg    fi])
37671f0ac6a5Smrg EGREP=$ac_cv_prog_egrep
37681f0ac6a5Smrg AC_SUBST([EGREP])
37691f0ac6a5Smrg])])
37701f0ac6a5Smrg
37711f0ac6a5Smrg
37721f0ac6a5Smrg# AC_PATH_TOOL_PREFIX
37731f0ac6a5Smrg# -------------------
3774e5410a46Smrg# find a file program which can recognize shared library
37751f0ac6a5SmrgAC_DEFUN([AC_PATH_TOOL_PREFIX],
37761f0ac6a5Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl
37771f0ac6a5SmrgAC_MSG_CHECKING([for $1])
37781f0ac6a5SmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
37791f0ac6a5Smrg[case $MAGIC_CMD in
37801f0ac6a5Smrg[[\\/*] |  ?:[\\/]*])
37811f0ac6a5Smrg  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
37821f0ac6a5Smrg  ;;
37831f0ac6a5Smrg*)
37841f0ac6a5Smrg  lt_save_MAGIC_CMD="$MAGIC_CMD"
37851f0ac6a5Smrg  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
37861f0ac6a5Smrgdnl $ac_dummy forces splitting on constant user-supplied paths.
37871f0ac6a5Smrgdnl POSIX.2 word splitting is done only on the output of word expansions,
37881f0ac6a5Smrgdnl not every word.  This closes a longstanding sh security hole.
37891f0ac6a5Smrg  ac_dummy="ifelse([$2], , $PATH, [$2])"
37901f0ac6a5Smrg  for ac_dir in $ac_dummy; do
37911f0ac6a5Smrg    IFS="$lt_save_ifs"
37921f0ac6a5Smrg    test -z "$ac_dir" && ac_dir=.
37931f0ac6a5Smrg    if test -f $ac_dir/$1; then
37941f0ac6a5Smrg      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
37951f0ac6a5Smrg      if test -n "$file_magic_test_file"; then
37961f0ac6a5Smrg	case $deplibs_check_method in
37971f0ac6a5Smrg	"file_magic "*)
37981f0ac6a5Smrg	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
37991f0ac6a5Smrg	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
38001f0ac6a5Smrg	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
38011f0ac6a5Smrg	    $EGREP "$file_magic_regex" > /dev/null; then
38021f0ac6a5Smrg	    :
38031f0ac6a5Smrg	  else
38041f0ac6a5Smrg	    cat <<EOF 1>&2
38051f0ac6a5Smrg
38061f0ac6a5Smrg*** Warning: the command libtool uses to detect shared libraries,
38071f0ac6a5Smrg*** $file_magic_cmd, produces output that libtool cannot recognize.
38081f0ac6a5Smrg*** The result is that libtool may fail to recognize shared libraries
38091f0ac6a5Smrg*** as such.  This will affect the creation of libtool libraries that
38101f0ac6a5Smrg*** depend on shared libraries, but programs linked with such libtool
38111f0ac6a5Smrg*** libraries will work regardless of this problem.  Nevertheless, you
38121f0ac6a5Smrg*** may want to report the problem to your system manager and/or to
38131f0ac6a5Smrg*** bug-libtool@gnu.org
38141f0ac6a5Smrg
38151f0ac6a5SmrgEOF
38161f0ac6a5Smrg	  fi ;;
38171f0ac6a5Smrg	esac
38181f0ac6a5Smrg      fi
38191f0ac6a5Smrg      break
38201f0ac6a5Smrg    fi
38211f0ac6a5Smrg  done
38221f0ac6a5Smrg  IFS="$lt_save_ifs"
38231f0ac6a5Smrg  MAGIC_CMD="$lt_save_MAGIC_CMD"
38241f0ac6a5Smrg  ;;
38251f0ac6a5Smrgesac])
38261f0ac6a5SmrgMAGIC_CMD="$lt_cv_path_MAGIC_CMD"
38271f0ac6a5Smrgif test -n "$MAGIC_CMD"; then
38281f0ac6a5Smrg  AC_MSG_RESULT($MAGIC_CMD)
38291f0ac6a5Smrgelse
38301f0ac6a5Smrg  AC_MSG_RESULT(no)
38311f0ac6a5Smrgfi
38321f0ac6a5Smrg])# AC_PATH_TOOL_PREFIX
38331f0ac6a5Smrg
38341f0ac6a5Smrg
38351f0ac6a5Smrg# AC_PATH_MAGIC
38361f0ac6a5Smrg# -------------
3837e5410a46Smrg# find a file program which can recognize a shared library
38381f0ac6a5SmrgAC_DEFUN([AC_PATH_MAGIC],
38391f0ac6a5Smrg[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
38401f0ac6a5Smrgif test -z "$lt_cv_path_MAGIC_CMD"; then
38411f0ac6a5Smrg  if test -n "$ac_tool_prefix"; then
38421f0ac6a5Smrg    AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
38431f0ac6a5Smrg  else
38441f0ac6a5Smrg    MAGIC_CMD=:
38451f0ac6a5Smrg  fi
38461f0ac6a5Smrgfi
38471f0ac6a5Smrg])# AC_PATH_MAGIC
38481f0ac6a5Smrg
38491f0ac6a5Smrg
38501f0ac6a5Smrg# AC_PROG_LD
38511f0ac6a5Smrg# ----------
38521f0ac6a5Smrg# find the pathname to the GNU or non-GNU linker
38531f0ac6a5SmrgAC_DEFUN([AC_PROG_LD],
38541f0ac6a5Smrg[AC_ARG_WITH([gnu-ld],
38551f0ac6a5Smrg    [AC_HELP_STRING([--with-gnu-ld],
38561f0ac6a5Smrg	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
38571f0ac6a5Smrg    [test "$withval" = no || with_gnu_ld=yes],
38581f0ac6a5Smrg    [with_gnu_ld=no])
38591f0ac6a5SmrgAC_REQUIRE([LT_AC_PROG_SED])dnl
38601f0ac6a5SmrgAC_REQUIRE([AC_PROG_CC])dnl
38611f0ac6a5SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl
38621f0ac6a5SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl
38631f0ac6a5Smrgac_prog=ld
38641f0ac6a5Smrgif test "$GCC" = yes; then
38651f0ac6a5Smrg  # Check if gcc -print-prog-name=ld gives a path.
38661f0ac6a5Smrg  AC_MSG_CHECKING([for ld used by $CC])
38671f0ac6a5Smrg  case $host in
38681f0ac6a5Smrg  *-*-mingw*)
38691f0ac6a5Smrg    # gcc leaves a trailing carriage return which upsets mingw
38701f0ac6a5Smrg    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
38711f0ac6a5Smrg  *)
38721f0ac6a5Smrg    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
38731f0ac6a5Smrg  esac
38741f0ac6a5Smrg  case $ac_prog in
38751f0ac6a5Smrg    # Accept absolute paths.
38761f0ac6a5Smrg    [[\\/]]* | ?:[[\\/]]*)
38771f0ac6a5Smrg      re_direlt='/[[^/]][[^/]]*/\.\./'
38781f0ac6a5Smrg      # Canonicalize the pathname of ld
38791f0ac6a5Smrg      ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
38801f0ac6a5Smrg      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
38811f0ac6a5Smrg	ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
38821f0ac6a5Smrg      done
38831f0ac6a5Smrg      test -z "$LD" && LD="$ac_prog"
38841f0ac6a5Smrg      ;;
38851f0ac6a5Smrg  "")
38861f0ac6a5Smrg    # If it fails, then pretend we aren't using GCC.
38871f0ac6a5Smrg    ac_prog=ld
38881f0ac6a5Smrg    ;;
38891f0ac6a5Smrg  *)
38901f0ac6a5Smrg    # If it is relative, then search for the first ld in PATH.
38911f0ac6a5Smrg    with_gnu_ld=unknown
38921f0ac6a5Smrg    ;;
38931f0ac6a5Smrg  esac
38941f0ac6a5Smrgelif test "$with_gnu_ld" = yes; then
38951f0ac6a5Smrg  AC_MSG_CHECKING([for GNU ld])
38961f0ac6a5Smrgelse
38971f0ac6a5Smrg  AC_MSG_CHECKING([for non-GNU ld])
38981f0ac6a5Smrgfi
38991f0ac6a5SmrgAC_CACHE_VAL(lt_cv_path_LD,
39001f0ac6a5Smrg[if test -z "$LD"; then
39011f0ac6a5Smrg  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
39021f0ac6a5Smrg  for ac_dir in $PATH; do
39031f0ac6a5Smrg    IFS="$lt_save_ifs"
39041f0ac6a5Smrg    test -z "$ac_dir" && ac_dir=.
39051f0ac6a5Smrg    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
39061f0ac6a5Smrg      lt_cv_path_LD="$ac_dir/$ac_prog"
39071f0ac6a5Smrg      # Check to see if the program is GNU ld.  I'd rather use --version,
39081f0ac6a5Smrg      # but apparently some variants of GNU ld only accept -v.
39091f0ac6a5Smrg      # Break only if it was the GNU/non-GNU ld that we prefer.
39101f0ac6a5Smrg      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
39111f0ac6a5Smrg      *GNU* | *'with BFD'*)
39121f0ac6a5Smrg	test "$with_gnu_ld" != no && break
39131f0ac6a5Smrg	;;
39141f0ac6a5Smrg      *)
39151f0ac6a5Smrg	test "$with_gnu_ld" != yes && break
39161f0ac6a5Smrg	;;
39171f0ac6a5Smrg      esac
39181f0ac6a5Smrg    fi
39191f0ac6a5Smrg  done
39201f0ac6a5Smrg  IFS="$lt_save_ifs"
39211f0ac6a5Smrgelse
39221f0ac6a5Smrg  lt_cv_path_LD="$LD" # Let the user override the test with a path.
39231f0ac6a5Smrgfi])
39241f0ac6a5SmrgLD="$lt_cv_path_LD"
39251f0ac6a5Smrgif test -n "$LD"; then
39261f0ac6a5Smrg  AC_MSG_RESULT($LD)
39271f0ac6a5Smrgelse
39281f0ac6a5Smrg  AC_MSG_RESULT(no)
39291f0ac6a5Smrgfi
39301f0ac6a5Smrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
39311f0ac6a5SmrgAC_PROG_LD_GNU
39321f0ac6a5Smrg])# AC_PROG_LD
39331f0ac6a5Smrg
39341f0ac6a5Smrg
39351f0ac6a5Smrg# AC_PROG_LD_GNU
39361f0ac6a5Smrg# --------------
39371f0ac6a5SmrgAC_DEFUN([AC_PROG_LD_GNU],
39381f0ac6a5Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl
39391f0ac6a5SmrgAC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
39401f0ac6a5Smrg[# I'd rather use --version here, but apparently some GNU lds only accept -v.
39411f0ac6a5Smrgcase `$LD -v 2>&1 </dev/null` in
39421f0ac6a5Smrg*GNU* | *'with BFD'*)
39431f0ac6a5Smrg  lt_cv_prog_gnu_ld=yes
39441f0ac6a5Smrg  ;;
39451f0ac6a5Smrg*)
39461f0ac6a5Smrg  lt_cv_prog_gnu_ld=no
39471f0ac6a5Smrg  ;;
39481f0ac6a5Smrgesac])
39491f0ac6a5Smrgwith_gnu_ld=$lt_cv_prog_gnu_ld
39501f0ac6a5Smrg])# AC_PROG_LD_GNU
39511f0ac6a5Smrg
39521f0ac6a5Smrg
39531f0ac6a5Smrg# AC_PROG_LD_RELOAD_FLAG
39541f0ac6a5Smrg# ----------------------
39551f0ac6a5Smrg# find reload flag for linker
39561f0ac6a5Smrg#   -- PORTME Some linkers may need a different reload flag.
39571f0ac6a5SmrgAC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
39581f0ac6a5Smrg[AC_CACHE_CHECK([for $LD option to reload object files],
39591f0ac6a5Smrg  lt_cv_ld_reload_flag,
39601f0ac6a5Smrg  [lt_cv_ld_reload_flag='-r'])
39611f0ac6a5Smrgreload_flag=$lt_cv_ld_reload_flag
39621f0ac6a5Smrgcase $reload_flag in
39631f0ac6a5Smrg"" | " "*) ;;
39641f0ac6a5Smrg*) reload_flag=" $reload_flag" ;;
39651f0ac6a5Smrgesac
39661f0ac6a5Smrgreload_cmds='$LD$reload_flag -o $output$reload_objs'
39671f0ac6a5Smrgcase $host_os in
39681f0ac6a5Smrg  darwin*)
39691f0ac6a5Smrg    if test "$GCC" = yes; then
39701f0ac6a5Smrg      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
39711f0ac6a5Smrg    else
39721f0ac6a5Smrg      reload_cmds='$LD$reload_flag -o $output$reload_objs'
39731f0ac6a5Smrg    fi
39741f0ac6a5Smrg    ;;
39751f0ac6a5Smrgesac
39761f0ac6a5Smrg])# AC_PROG_LD_RELOAD_FLAG
39771f0ac6a5Smrg
39781f0ac6a5Smrg
39791f0ac6a5Smrg# AC_DEPLIBS_CHECK_METHOD
39801f0ac6a5Smrg# -----------------------
39811f0ac6a5Smrg# how to check for library dependencies
39821f0ac6a5Smrg#  -- PORTME fill in with the dynamic library characteristics
39831f0ac6a5SmrgAC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
3984e5410a46Smrg[AC_CACHE_CHECK([how to recognize dependent libraries],
39851f0ac6a5Smrglt_cv_deplibs_check_method,
39861f0ac6a5Smrg[lt_cv_file_magic_cmd='$MAGIC_CMD'
39871f0ac6a5Smrglt_cv_file_magic_test_file=
39881f0ac6a5Smrglt_cv_deplibs_check_method='unknown'
39891f0ac6a5Smrg# Need to set the preceding variable on all platforms that support
39901f0ac6a5Smrg# interlibrary dependencies.
39911f0ac6a5Smrg# 'none' -- dependencies not supported.
39921f0ac6a5Smrg# `unknown' -- same as none, but documents that we really don't know.
39931f0ac6a5Smrg# 'pass_all' -- all dependencies passed with no checks.
39941f0ac6a5Smrg# 'test_compile' -- check by making test program.
39951f0ac6a5Smrg# 'file_magic [[regex]]' -- check by looking for files in library path
39961f0ac6a5Smrg# which responds to the $file_magic_cmd with a given extended regex.
39971f0ac6a5Smrg# If you have `file' or equivalent on your system and you're not sure
39981f0ac6a5Smrg# whether `pass_all' will *always* work, you probably want this one.
39991f0ac6a5Smrg
40001f0ac6a5Smrgcase $host_os in
4001e5410a46Smrgaix[[4-9]]*)
40021f0ac6a5Smrg  lt_cv_deplibs_check_method=pass_all
40031f0ac6a5Smrg  ;;
40041f0ac6a5Smrg
40051f0ac6a5Smrgbeos*)
40061f0ac6a5Smrg  lt_cv_deplibs_check_method=pass_all
40071f0ac6a5Smrg  ;;
40081f0ac6a5Smrg
40091f0ac6a5Smrgbsdi[[45]]*)
40101f0ac6a5Smrg  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
40111f0ac6a5Smrg  lt_cv_file_magic_cmd='/usr/bin/file -L'
40121f0ac6a5Smrg  lt_cv_file_magic_test_file=/shlib/libc.so
40131f0ac6a5Smrg  ;;
40141f0ac6a5Smrg
40151f0ac6a5Smrgcygwin*)
40161f0ac6a5Smrg  # func_win32_libid is a shell function defined in ltmain.sh
40171f0ac6a5Smrg  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
40181f0ac6a5Smrg  lt_cv_file_magic_cmd='func_win32_libid'
40191f0ac6a5Smrg  ;;
40201f0ac6a5Smrg
40211f0ac6a5Smrgmingw* | pw32*)
40221f0ac6a5Smrg  # Base MSYS/MinGW do not provide the 'file' command needed by
4023e5410a46Smrg  # func_win32_libid shell function, so use a weaker test based on 'objdump',
4024e5410a46Smrg  # unless we find 'file', for example because we are cross-compiling.
4025e5410a46Smrg  if ( file / ) >/dev/null 2>&1; then
4026e5410a46Smrg    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
4027e5410a46Smrg    lt_cv_file_magic_cmd='func_win32_libid'
4028e5410a46Smrg  else
4029e5410a46Smrg    lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
4030e5410a46Smrg    lt_cv_file_magic_cmd='$OBJDUMP -f'
4031e5410a46Smrg  fi
40321f0ac6a5Smrg  ;;
40331f0ac6a5Smrg
40341f0ac6a5Smrgdarwin* | rhapsody*)
40351f0ac6a5Smrg  lt_cv_deplibs_check_method=pass_all
40361f0ac6a5Smrg  ;;
40371f0ac6a5Smrg
4038e5410a46Smrgfreebsd* | dragonfly*)
40391f0ac6a5Smrg  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
40401f0ac6a5Smrg    case $host_cpu in
40411f0ac6a5Smrg    i*86 )
40421f0ac6a5Smrg      # Not sure whether the presence of OpenBSD here was a mistake.
40431f0ac6a5Smrg      # Let's accept both of them until this is cleared up.
40441f0ac6a5Smrg      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
40451f0ac6a5Smrg      lt_cv_file_magic_cmd=/usr/bin/file
40461f0ac6a5Smrg      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
40471f0ac6a5Smrg      ;;
40481f0ac6a5Smrg    esac
40491f0ac6a5Smrg  else
40501f0ac6a5Smrg    lt_cv_deplibs_check_method=pass_all
40511f0ac6a5Smrg  fi
40521f0ac6a5Smrg  ;;
40531f0ac6a5Smrg
40541f0ac6a5Smrggnu*)
40551f0ac6a5Smrg  lt_cv_deplibs_check_method=pass_all
40561f0ac6a5Smrg  ;;
40571f0ac6a5Smrg
40581f0ac6a5Smrghpux10.20* | hpux11*)
40591f0ac6a5Smrg  lt_cv_file_magic_cmd=/usr/bin/file
40601f0ac6a5Smrg  case $host_cpu in
40611f0ac6a5Smrg  ia64*)
40621f0ac6a5Smrg    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
40631f0ac6a5Smrg    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
40641f0ac6a5Smrg    ;;
40651f0ac6a5Smrg  hppa*64*)
40661f0ac6a5Smrg    [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]']
40671f0ac6a5Smrg    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
40681f0ac6a5Smrg    ;;
40691f0ac6a5Smrg  *)
40701f0ac6a5Smrg    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
40711f0ac6a5Smrg    lt_cv_file_magic_test_file=/usr/lib/libc.sl
40721f0ac6a5Smrg    ;;
40731f0ac6a5Smrg  esac
40741f0ac6a5Smrg  ;;
40751f0ac6a5Smrg
4076e5410a46Smrginterix[[3-9]]*)
40771f0ac6a5Smrg  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
40781f0ac6a5Smrg  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
40791f0ac6a5Smrg  ;;
40801f0ac6a5Smrg
40811f0ac6a5Smrgirix5* | irix6* | nonstopux*)
40821f0ac6a5Smrg  case $LD in
40831f0ac6a5Smrg  *-32|*"-32 ") libmagic=32-bit;;
40841f0ac6a5Smrg  *-n32|*"-n32 ") libmagic=N32;;
40851f0ac6a5Smrg  *-64|*"-64 ") libmagic=64-bit;;
40861f0ac6a5Smrg  *) libmagic=never-match;;
40871f0ac6a5Smrg  esac
40881f0ac6a5Smrg  lt_cv_deplibs_check_method=pass_all
40891f0ac6a5Smrg  ;;
40901f0ac6a5Smrg
40911f0ac6a5Smrg# This must be Linux ELF.
4092e5410a46Smrglinux* | k*bsd*-gnu)
40931f0ac6a5Smrg  lt_cv_deplibs_check_method=pass_all
40941f0ac6a5Smrg  ;;
40951f0ac6a5Smrg
40961f0ac6a5Smrgnetbsd*)
40971f0ac6a5Smrg  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
40981f0ac6a5Smrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
40991f0ac6a5Smrg  else
41001f0ac6a5Smrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
41011f0ac6a5Smrg  fi
41021f0ac6a5Smrg  ;;
41031f0ac6a5Smrg
41041f0ac6a5Smrgnewos6*)
41051f0ac6a5Smrg  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
41061f0ac6a5Smrg  lt_cv_file_magic_cmd=/usr/bin/file
41071f0ac6a5Smrg  lt_cv_file_magic_test_file=/usr/lib/libnls.so
41081f0ac6a5Smrg  ;;
41091f0ac6a5Smrg
41101f0ac6a5Smrgnto-qnx*)
41111f0ac6a5Smrg  lt_cv_deplibs_check_method=unknown
41121f0ac6a5Smrg  ;;
41131f0ac6a5Smrg
41141f0ac6a5Smrgopenbsd*)
41151f0ac6a5Smrg  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
41161f0ac6a5Smrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
41171f0ac6a5Smrg  else
41181f0ac6a5Smrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
41191f0ac6a5Smrg  fi
41201f0ac6a5Smrg  ;;
41211f0ac6a5Smrg
41221f0ac6a5Smrgosf3* | osf4* | osf5*)
41231f0ac6a5Smrg  lt_cv_deplibs_check_method=pass_all
41241f0ac6a5Smrg  ;;
41251f0ac6a5Smrg
4126e5410a46Smrgrdos*)
4127e5410a46Smrg  lt_cv_deplibs_check_method=pass_all
4128e5410a46Smrg  ;;
4129e5410a46Smrg
41301f0ac6a5Smrgsolaris*)
41311f0ac6a5Smrg  lt_cv_deplibs_check_method=pass_all
41321f0ac6a5Smrg  ;;
41331f0ac6a5Smrg
41341f0ac6a5Smrgsysv4 | sysv4.3*)
41351f0ac6a5Smrg  case $host_vendor in
41361f0ac6a5Smrg  motorola)
41371f0ac6a5Smrg    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]]'
41381f0ac6a5Smrg    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
41391f0ac6a5Smrg    ;;
41401f0ac6a5Smrg  ncr)
41411f0ac6a5Smrg    lt_cv_deplibs_check_method=pass_all
41421f0ac6a5Smrg    ;;
41431f0ac6a5Smrg  sequent)
41441f0ac6a5Smrg    lt_cv_file_magic_cmd='/bin/file'
41451f0ac6a5Smrg    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
41461f0ac6a5Smrg    ;;
41471f0ac6a5Smrg  sni)
41481f0ac6a5Smrg    lt_cv_file_magic_cmd='/bin/file'
41491f0ac6a5Smrg    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
41501f0ac6a5Smrg    lt_cv_file_magic_test_file=/lib/libc.so
41511f0ac6a5Smrg    ;;
41521f0ac6a5Smrg  siemens)
41531f0ac6a5Smrg    lt_cv_deplibs_check_method=pass_all
41541f0ac6a5Smrg    ;;
41551f0ac6a5Smrg  pc)
41561f0ac6a5Smrg    lt_cv_deplibs_check_method=pass_all
41571f0ac6a5Smrg    ;;
41581f0ac6a5Smrg  esac
41591f0ac6a5Smrg  ;;
41601f0ac6a5Smrg
41611f0ac6a5Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
41621f0ac6a5Smrg  lt_cv_deplibs_check_method=pass_all
41631f0ac6a5Smrg  ;;
41641f0ac6a5Smrgesac
41651f0ac6a5Smrg])
41661f0ac6a5Smrgfile_magic_cmd=$lt_cv_file_magic_cmd
41671f0ac6a5Smrgdeplibs_check_method=$lt_cv_deplibs_check_method
41681f0ac6a5Smrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown
41691f0ac6a5Smrg])# AC_DEPLIBS_CHECK_METHOD
41701f0ac6a5Smrg
41711f0ac6a5Smrg
41721f0ac6a5Smrg# AC_PROG_NM
41731f0ac6a5Smrg# ----------
41741f0ac6a5Smrg# find the pathname to a BSD-compatible name lister
41751f0ac6a5SmrgAC_DEFUN([AC_PROG_NM],
41761f0ac6a5Smrg[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
41771f0ac6a5Smrg[if test -n "$NM"; then
41781f0ac6a5Smrg  # Let the user override the test.
41791f0ac6a5Smrg  lt_cv_path_NM="$NM"
41801f0ac6a5Smrgelse
41811f0ac6a5Smrg  lt_nm_to_check="${ac_tool_prefix}nm"
4182e5410a46Smrg  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
41831f0ac6a5Smrg    lt_nm_to_check="$lt_nm_to_check nm"
41841f0ac6a5Smrg  fi
41851f0ac6a5Smrg  for lt_tmp_nm in $lt_nm_to_check; do
41861f0ac6a5Smrg    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
41871f0ac6a5Smrg    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
41881f0ac6a5Smrg      IFS="$lt_save_ifs"
41891f0ac6a5Smrg      test -z "$ac_dir" && ac_dir=.
41901f0ac6a5Smrg      tmp_nm="$ac_dir/$lt_tmp_nm"
41911f0ac6a5Smrg      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
41921f0ac6a5Smrg	# Check to see if the nm accepts a BSD-compat flag.
41931f0ac6a5Smrg	# Adding the `sed 1q' prevents false positives on HP-UX, which says:
41941f0ac6a5Smrg	#   nm: unknown option "B" ignored
41951f0ac6a5Smrg	# Tru64's nm complains that /dev/null is an invalid object file
41961f0ac6a5Smrg	case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
41971f0ac6a5Smrg	*/dev/null* | *'Invalid file or object type'*)
41981f0ac6a5Smrg	  lt_cv_path_NM="$tmp_nm -B"
41991f0ac6a5Smrg	  break
42001f0ac6a5Smrg	  ;;
42011f0ac6a5Smrg	*)
42021f0ac6a5Smrg	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
42031f0ac6a5Smrg	  */dev/null*)
42041f0ac6a5Smrg	    lt_cv_path_NM="$tmp_nm -p"
42051f0ac6a5Smrg	    break
42061f0ac6a5Smrg	    ;;
42071f0ac6a5Smrg	  *)
42081f0ac6a5Smrg	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
42091f0ac6a5Smrg	    continue # so that we can try to find one that supports BSD flags
42101f0ac6a5Smrg	    ;;
42111f0ac6a5Smrg	  esac
42121f0ac6a5Smrg	  ;;
42131f0ac6a5Smrg	esac
42141f0ac6a5Smrg      fi
42151f0ac6a5Smrg    done
42161f0ac6a5Smrg    IFS="$lt_save_ifs"
42171f0ac6a5Smrg  done
42181f0ac6a5Smrg  test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
42191f0ac6a5Smrgfi])
42201f0ac6a5SmrgNM="$lt_cv_path_NM"
42211f0ac6a5Smrg])# AC_PROG_NM
42221f0ac6a5Smrg
42231f0ac6a5Smrg
42241f0ac6a5Smrg# AC_CHECK_LIBM
42251f0ac6a5Smrg# -------------
42261f0ac6a5Smrg# check for math library
42271f0ac6a5SmrgAC_DEFUN([AC_CHECK_LIBM],
42281f0ac6a5Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
42291f0ac6a5SmrgLIBM=
42301f0ac6a5Smrgcase $host in
42311f0ac6a5Smrg*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
42321f0ac6a5Smrg  # These system don't have libm, or don't need it
42331f0ac6a5Smrg  ;;
42341f0ac6a5Smrg*-ncr-sysv4.3*)
42351f0ac6a5Smrg  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
42361f0ac6a5Smrg  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
42371f0ac6a5Smrg  ;;
42381f0ac6a5Smrg*)
42391f0ac6a5Smrg  AC_CHECK_LIB(m, cos, LIBM="-lm")
42401f0ac6a5Smrg  ;;
42411f0ac6a5Smrgesac
42421f0ac6a5Smrg])# AC_CHECK_LIBM
42431f0ac6a5Smrg
42441f0ac6a5Smrg
42451f0ac6a5Smrg# AC_LIBLTDL_CONVENIENCE([DIRECTORY])
42461f0ac6a5Smrg# -----------------------------------
42471f0ac6a5Smrg# sets LIBLTDL to the link flags for the libltdl convenience library and
42481f0ac6a5Smrg# LTDLINCL to the include flags for the libltdl header and adds
42491f0ac6a5Smrg# --enable-ltdl-convenience to the configure arguments.  Note that
42501f0ac6a5Smrg# AC_CONFIG_SUBDIRS is not called here.  If DIRECTORY is not provided,
42511f0ac6a5Smrg# it is assumed to be `libltdl'.  LIBLTDL will be prefixed with
42521f0ac6a5Smrg# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/'
42531f0ac6a5Smrg# (note the single quotes!).  If your package is not flat and you're not
42541f0ac6a5Smrg# using automake, define top_builddir and top_srcdir appropriately in
42551f0ac6a5Smrg# the Makefiles.
42561f0ac6a5SmrgAC_DEFUN([AC_LIBLTDL_CONVENIENCE],
42571f0ac6a5Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
42581f0ac6a5Smrg  case $enable_ltdl_convenience in
42591f0ac6a5Smrg  no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
42601f0ac6a5Smrg  "") enable_ltdl_convenience=yes
42611f0ac6a5Smrg      ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
42621f0ac6a5Smrg  esac
42631f0ac6a5Smrg  LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
42641f0ac6a5Smrg  LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
42651f0ac6a5Smrg  # For backwards non-gettext consistent compatibility...
42661f0ac6a5Smrg  INCLTDL="$LTDLINCL"
42671f0ac6a5Smrg])# AC_LIBLTDL_CONVENIENCE
42681f0ac6a5Smrg
42691f0ac6a5Smrg
42701f0ac6a5Smrg# AC_LIBLTDL_INSTALLABLE([DIRECTORY])
42711f0ac6a5Smrg# -----------------------------------
42721f0ac6a5Smrg# sets LIBLTDL to the link flags for the libltdl installable library and
42731f0ac6a5Smrg# LTDLINCL to the include flags for the libltdl header and adds
42741f0ac6a5Smrg# --enable-ltdl-install to the configure arguments.  Note that
42751f0ac6a5Smrg# AC_CONFIG_SUBDIRS is not called here.  If DIRECTORY is not provided,
42761f0ac6a5Smrg# and an installed libltdl is not found, it is assumed to be `libltdl'.
42771f0ac6a5Smrg# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with
42781f0ac6a5Smrg# '${top_srcdir}/' (note the single quotes!).  If your package is not
42791f0ac6a5Smrg# flat and you're not using automake, define top_builddir and top_srcdir
42801f0ac6a5Smrg# appropriately in the Makefiles.
42811f0ac6a5Smrg# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
42821f0ac6a5SmrgAC_DEFUN([AC_LIBLTDL_INSTALLABLE],
42831f0ac6a5Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
42841f0ac6a5Smrg  AC_CHECK_LIB(ltdl, lt_dlinit,
42851f0ac6a5Smrg  [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
42861f0ac6a5Smrg  [if test x"$enable_ltdl_install" = xno; then
42871f0ac6a5Smrg     AC_MSG_WARN([libltdl not installed, but installation disabled])
42881f0ac6a5Smrg   else
42891f0ac6a5Smrg     enable_ltdl_install=yes
42901f0ac6a5Smrg   fi
42911f0ac6a5Smrg  ])
42921f0ac6a5Smrg  if test x"$enable_ltdl_install" = x"yes"; then
42931f0ac6a5Smrg    ac_configure_args="$ac_configure_args --enable-ltdl-install"
42941f0ac6a5Smrg    LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
42951f0ac6a5Smrg    LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
42961f0ac6a5Smrg  else
42971f0ac6a5Smrg    ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
42981f0ac6a5Smrg    LIBLTDL="-lltdl"
42991f0ac6a5Smrg    LTDLINCL=
43001f0ac6a5Smrg  fi
43011f0ac6a5Smrg  # For backwards non-gettext consistent compatibility...
43021f0ac6a5Smrg  INCLTDL="$LTDLINCL"
43031f0ac6a5Smrg])# AC_LIBLTDL_INSTALLABLE
43041f0ac6a5Smrg
43051f0ac6a5Smrg
43061f0ac6a5Smrg# AC_LIBTOOL_CXX
43071f0ac6a5Smrg# --------------
43081f0ac6a5Smrg# enable support for C++ libraries
43091f0ac6a5SmrgAC_DEFUN([AC_LIBTOOL_CXX],
43101f0ac6a5Smrg[AC_REQUIRE([_LT_AC_LANG_CXX])
43111f0ac6a5Smrg])# AC_LIBTOOL_CXX
43121f0ac6a5Smrg
43131f0ac6a5Smrg
43141f0ac6a5Smrg# _LT_AC_LANG_CXX
43151f0ac6a5Smrg# ---------------
43161f0ac6a5SmrgAC_DEFUN([_LT_AC_LANG_CXX],
43171f0ac6a5Smrg[AC_REQUIRE([AC_PROG_CXX])
43181f0ac6a5SmrgAC_REQUIRE([_LT_AC_PROG_CXXCPP])
43191f0ac6a5Smrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
43201f0ac6a5Smrg])# _LT_AC_LANG_CXX
43211f0ac6a5Smrg
43221f0ac6a5Smrg# _LT_AC_PROG_CXXCPP
43231f0ac6a5Smrg# ------------------
43241f0ac6a5SmrgAC_DEFUN([_LT_AC_PROG_CXXCPP],
43251f0ac6a5Smrg[
43261f0ac6a5SmrgAC_REQUIRE([AC_PROG_CXX])
43271f0ac6a5Smrgif test -n "$CXX" && ( test "X$CXX" != "Xno" &&
43281f0ac6a5Smrg    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
43291f0ac6a5Smrg    (test "X$CXX" != "Xg++"))) ; then
43301f0ac6a5Smrg  AC_PROG_CXXCPP
43311f0ac6a5Smrgfi
43321f0ac6a5Smrg])# _LT_AC_PROG_CXXCPP
43331f0ac6a5Smrg
43341f0ac6a5Smrg# AC_LIBTOOL_F77
43351f0ac6a5Smrg# --------------
43361f0ac6a5Smrg# enable support for Fortran 77 libraries
43371f0ac6a5SmrgAC_DEFUN([AC_LIBTOOL_F77],
43381f0ac6a5Smrg[AC_REQUIRE([_LT_AC_LANG_F77])
43391f0ac6a5Smrg])# AC_LIBTOOL_F77
43401f0ac6a5Smrg
43411f0ac6a5Smrg
43421f0ac6a5Smrg# _LT_AC_LANG_F77
43431f0ac6a5Smrg# ---------------
43441f0ac6a5SmrgAC_DEFUN([_LT_AC_LANG_F77],
43451f0ac6a5Smrg[AC_REQUIRE([AC_PROG_F77])
43461f0ac6a5Smrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
43471f0ac6a5Smrg])# _LT_AC_LANG_F77
43481f0ac6a5Smrg
43491f0ac6a5Smrg
43501f0ac6a5Smrg# AC_LIBTOOL_GCJ
43511f0ac6a5Smrg# --------------
43521f0ac6a5Smrg# enable support for GCJ libraries
43531f0ac6a5SmrgAC_DEFUN([AC_LIBTOOL_GCJ],
43541f0ac6a5Smrg[AC_REQUIRE([_LT_AC_LANG_GCJ])
43551f0ac6a5Smrg])# AC_LIBTOOL_GCJ
43561f0ac6a5Smrg
43571f0ac6a5Smrg
43581f0ac6a5Smrg# _LT_AC_LANG_GCJ
43591f0ac6a5Smrg# ---------------
43601f0ac6a5SmrgAC_DEFUN([_LT_AC_LANG_GCJ],
43611f0ac6a5Smrg[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
43621f0ac6a5Smrg  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
43631f0ac6a5Smrg    [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
43641f0ac6a5Smrg      [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
43651f0ac6a5Smrg	 [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
43661f0ac6a5Smrg	   [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
43671f0ac6a5Smrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
43681f0ac6a5Smrg])# _LT_AC_LANG_GCJ
43691f0ac6a5Smrg
43701f0ac6a5Smrg
43711f0ac6a5Smrg# AC_LIBTOOL_RC
43721f0ac6a5Smrg# -------------
43731f0ac6a5Smrg# enable support for Windows resource files
43741f0ac6a5SmrgAC_DEFUN([AC_LIBTOOL_RC],
43751f0ac6a5Smrg[AC_REQUIRE([LT_AC_PROG_RC])
43761f0ac6a5Smrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
43771f0ac6a5Smrg])# AC_LIBTOOL_RC
43781f0ac6a5Smrg
43791f0ac6a5Smrg
43801f0ac6a5Smrg# AC_LIBTOOL_LANG_C_CONFIG
43811f0ac6a5Smrg# ------------------------
43821f0ac6a5Smrg# Ensure that the configuration vars for the C compiler are
43831f0ac6a5Smrg# suitably defined.  Those variables are subsequently used by
43841f0ac6a5Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
43851f0ac6a5SmrgAC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
43861f0ac6a5SmrgAC_DEFUN([_LT_AC_LANG_C_CONFIG],
43871f0ac6a5Smrg[lt_save_CC="$CC"
43881f0ac6a5SmrgAC_LANG_PUSH(C)
43891f0ac6a5Smrg
43901f0ac6a5Smrg# Source file extension for C test sources.
43911f0ac6a5Smrgac_ext=c
43921f0ac6a5Smrg
43931f0ac6a5Smrg# Object file extension for compiled C test sources.
43941f0ac6a5Smrgobjext=o
43951f0ac6a5Smrg_LT_AC_TAGVAR(objext, $1)=$objext
43961f0ac6a5Smrg
43971f0ac6a5Smrg# Code to be used in simple compile tests
4398e5410a46Smrglt_simple_compile_test_code="int some_variable = 0;"
43991f0ac6a5Smrg
44001f0ac6a5Smrg# Code to be used in simple link tests
4401e5410a46Smrglt_simple_link_test_code='int main(){return(0);}'
44021f0ac6a5Smrg
44031f0ac6a5Smrg_LT_AC_SYS_COMPILER
44041f0ac6a5Smrg
44051f0ac6a5Smrg# save warnings/boilerplate of simple test code
44061f0ac6a5Smrg_LT_COMPILER_BOILERPLATE
44071f0ac6a5Smrg_LT_LINKER_BOILERPLATE
44081f0ac6a5Smrg
44091f0ac6a5SmrgAC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
44101f0ac6a5SmrgAC_LIBTOOL_PROG_COMPILER_PIC($1)
44111f0ac6a5SmrgAC_LIBTOOL_PROG_CC_C_O($1)
44121f0ac6a5SmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
44131f0ac6a5SmrgAC_LIBTOOL_PROG_LD_SHLIBS($1)
44141f0ac6a5SmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
44151f0ac6a5SmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
44161f0ac6a5SmrgAC_LIBTOOL_SYS_LIB_STRIP
44171f0ac6a5SmrgAC_LIBTOOL_DLOPEN_SELF
44181f0ac6a5Smrg
44191f0ac6a5Smrg# Report which library types will actually be built
44201f0ac6a5SmrgAC_MSG_CHECKING([if libtool supports shared libraries])
44211f0ac6a5SmrgAC_MSG_RESULT([$can_build_shared])
44221f0ac6a5Smrg
44231f0ac6a5SmrgAC_MSG_CHECKING([whether to build shared libraries])
44241f0ac6a5Smrgtest "$can_build_shared" = "no" && enable_shared=no
44251f0ac6a5Smrg
44261f0ac6a5Smrg# On AIX, shared libraries and static libraries use the same namespace, and
44271f0ac6a5Smrg# are all built from PIC.
44281f0ac6a5Smrgcase $host_os in
44291f0ac6a5Smrgaix3*)
44301f0ac6a5Smrg  test "$enable_shared" = yes && enable_static=no
44311f0ac6a5Smrg  if test -n "$RANLIB"; then
44321f0ac6a5Smrg    archive_cmds="$archive_cmds~\$RANLIB \$lib"
44331f0ac6a5Smrg    postinstall_cmds='$RANLIB $lib'
44341f0ac6a5Smrg  fi
44351f0ac6a5Smrg  ;;
44361f0ac6a5Smrg
4437e5410a46Smrgaix[[4-9]]*)
44381f0ac6a5Smrg  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
44391f0ac6a5Smrg    test "$enable_shared" = yes && enable_static=no
44401f0ac6a5Smrg  fi
44411f0ac6a5Smrg    ;;
44421f0ac6a5Smrgesac
44431f0ac6a5SmrgAC_MSG_RESULT([$enable_shared])
44441f0ac6a5Smrg
44451f0ac6a5SmrgAC_MSG_CHECKING([whether to build static libraries])
44461f0ac6a5Smrg# Make sure either enable_shared or enable_static is yes.
44471f0ac6a5Smrgtest "$enable_shared" = yes || enable_static=yes
44481f0ac6a5SmrgAC_MSG_RESULT([$enable_static])
44491f0ac6a5Smrg
44501f0ac6a5SmrgAC_LIBTOOL_CONFIG($1)
44511f0ac6a5Smrg
44521f0ac6a5SmrgAC_LANG_POP
44531f0ac6a5SmrgCC="$lt_save_CC"
44541f0ac6a5Smrg])# AC_LIBTOOL_LANG_C_CONFIG
44551f0ac6a5Smrg
44561f0ac6a5Smrg
44571f0ac6a5Smrg# AC_LIBTOOL_LANG_CXX_CONFIG
44581f0ac6a5Smrg# --------------------------
44591f0ac6a5Smrg# Ensure that the configuration vars for the C compiler are
44601f0ac6a5Smrg# suitably defined.  Those variables are subsequently used by
44611f0ac6a5Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
44621f0ac6a5SmrgAC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
44631f0ac6a5SmrgAC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
44641f0ac6a5Smrg[AC_LANG_PUSH(C++)
44651f0ac6a5SmrgAC_REQUIRE([AC_PROG_CXX])
44661f0ac6a5SmrgAC_REQUIRE([_LT_AC_PROG_CXXCPP])
44671f0ac6a5Smrg
44681f0ac6a5Smrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
44691f0ac6a5Smrg_LT_AC_TAGVAR(allow_undefined_flag, $1)=
44701f0ac6a5Smrg_LT_AC_TAGVAR(always_export_symbols, $1)=no
44711f0ac6a5Smrg_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
44721f0ac6a5Smrg_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
44731f0ac6a5Smrg_LT_AC_TAGVAR(hardcode_direct, $1)=no
44741f0ac6a5Smrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
44751f0ac6a5Smrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
44761f0ac6a5Smrg_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
44771f0ac6a5Smrg_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
44781f0ac6a5Smrg_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
44791f0ac6a5Smrg_LT_AC_TAGVAR(hardcode_automatic, $1)=no
44801f0ac6a5Smrg_LT_AC_TAGVAR(module_cmds, $1)=
44811f0ac6a5Smrg_LT_AC_TAGVAR(module_expsym_cmds, $1)=
44821f0ac6a5Smrg_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
44831f0ac6a5Smrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
44841f0ac6a5Smrg_LT_AC_TAGVAR(no_undefined_flag, $1)=
44851f0ac6a5Smrg_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
44861f0ac6a5Smrg_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
44871f0ac6a5Smrg
44881f0ac6a5Smrg# Dependencies to place before and after the object being linked:
44891f0ac6a5Smrg_LT_AC_TAGVAR(predep_objects, $1)=
44901f0ac6a5Smrg_LT_AC_TAGVAR(postdep_objects, $1)=
44911f0ac6a5Smrg_LT_AC_TAGVAR(predeps, $1)=
44921f0ac6a5Smrg_LT_AC_TAGVAR(postdeps, $1)=
44931f0ac6a5Smrg_LT_AC_TAGVAR(compiler_lib_search_path, $1)=
4494e5410a46Smrg_LT_AC_TAGVAR(compiler_lib_search_dirs, $1)=
44951f0ac6a5Smrg
44961f0ac6a5Smrg# Source file extension for C++ test sources.
44971f0ac6a5Smrgac_ext=cpp
44981f0ac6a5Smrg
44991f0ac6a5Smrg# Object file extension for compiled C++ test sources.
45001f0ac6a5Smrgobjext=o
45011f0ac6a5Smrg_LT_AC_TAGVAR(objext, $1)=$objext
45021f0ac6a5Smrg
45031f0ac6a5Smrg# Code to be used in simple compile tests
4504e5410a46Smrglt_simple_compile_test_code="int some_variable = 0;"
45051f0ac6a5Smrg
45061f0ac6a5Smrg# Code to be used in simple link tests
4507e5410a46Smrglt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
45081f0ac6a5Smrg
45091f0ac6a5Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
45101f0ac6a5Smrg_LT_AC_SYS_COMPILER
45111f0ac6a5Smrg
45121f0ac6a5Smrg# save warnings/boilerplate of simple test code
45131f0ac6a5Smrg_LT_COMPILER_BOILERPLATE
45141f0ac6a5Smrg_LT_LINKER_BOILERPLATE
45151f0ac6a5Smrg
45161f0ac6a5Smrg# Allow CC to be a program name with arguments.
45171f0ac6a5Smrglt_save_CC=$CC
45181f0ac6a5Smrglt_save_LD=$LD
45191f0ac6a5Smrglt_save_GCC=$GCC
45201f0ac6a5SmrgGCC=$GXX
45211f0ac6a5Smrglt_save_with_gnu_ld=$with_gnu_ld
45221f0ac6a5Smrglt_save_path_LD=$lt_cv_path_LD
45231f0ac6a5Smrgif test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
45241f0ac6a5Smrg  lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
45251f0ac6a5Smrgelse
45261f0ac6a5Smrg  $as_unset lt_cv_prog_gnu_ld
45271f0ac6a5Smrgfi
45281f0ac6a5Smrgif test -n "${lt_cv_path_LDCXX+set}"; then
45291f0ac6a5Smrg  lt_cv_path_LD=$lt_cv_path_LDCXX
45301f0ac6a5Smrgelse
45311f0ac6a5Smrg  $as_unset lt_cv_path_LD
45321f0ac6a5Smrgfi
45331f0ac6a5Smrgtest -z "${LDCXX+set}" || LD=$LDCXX
45341f0ac6a5SmrgCC=${CXX-"c++"}
45351f0ac6a5Smrgcompiler=$CC
45361f0ac6a5Smrg_LT_AC_TAGVAR(compiler, $1)=$CC
45371f0ac6a5Smrg_LT_CC_BASENAME([$compiler])
45381f0ac6a5Smrg
45391f0ac6a5Smrg# We don't want -fno-exception wen compiling C++ code, so set the
45401f0ac6a5Smrg# no_builtin_flag separately
45411f0ac6a5Smrgif test "$GXX" = yes; then
45421f0ac6a5Smrg  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
45431f0ac6a5Smrgelse
45441f0ac6a5Smrg  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
45451f0ac6a5Smrgfi
45461f0ac6a5Smrg
45471f0ac6a5Smrgif test "$GXX" = yes; then
45481f0ac6a5Smrg  # Set up default GNU C++ configuration
45491f0ac6a5Smrg
45501f0ac6a5Smrg  AC_PROG_LD
45511f0ac6a5Smrg
45521f0ac6a5Smrg  # Check if GNU C++ uses GNU ld as the underlying linker, since the
45531f0ac6a5Smrg  # archiving commands below assume that GNU ld is being used.
45541f0ac6a5Smrg  if test "$with_gnu_ld" = yes; then
45551f0ac6a5Smrg    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
45561f0ac6a5Smrg    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
45571f0ac6a5Smrg
45581f0ac6a5Smrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
45591f0ac6a5Smrg    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
45601f0ac6a5Smrg
45611f0ac6a5Smrg    # If archive_cmds runs LD, not CC, wlarc should be empty
45621f0ac6a5Smrg    # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
45631f0ac6a5Smrg    #     investigate it a little bit more. (MM)
45641f0ac6a5Smrg    wlarc='${wl}'
45651f0ac6a5Smrg
45661f0ac6a5Smrg    # ancient GNU ld didn't support --whole-archive et. al.
45671f0ac6a5Smrg    if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
45681f0ac6a5Smrg	grep 'no-whole-archive' > /dev/null; then
45691f0ac6a5Smrg      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
45701f0ac6a5Smrg    else
45711f0ac6a5Smrg      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
45721f0ac6a5Smrg    fi
45731f0ac6a5Smrg  else
45741f0ac6a5Smrg    with_gnu_ld=no
45751f0ac6a5Smrg    wlarc=
45761f0ac6a5Smrg
45771f0ac6a5Smrg    # A generic and very simple default shared library creation
45781f0ac6a5Smrg    # command for GNU C++ for the case where it uses the native
45791f0ac6a5Smrg    # linker, instead of GNU ld.  If possible, this setting should
45801f0ac6a5Smrg    # overridden to take advantage of the native linker features on
45811f0ac6a5Smrg    # the platform it is being used on.
45821f0ac6a5Smrg    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
45831f0ac6a5Smrg  fi
45841f0ac6a5Smrg
45851f0ac6a5Smrg  # Commands to make compiler produce verbose output that lists
45861f0ac6a5Smrg  # what "hidden" libraries, object files and flags are used when
45871f0ac6a5Smrg  # linking a shared library.
45881f0ac6a5Smrg  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
45891f0ac6a5Smrg
45901f0ac6a5Smrgelse
45911f0ac6a5Smrg  GXX=no
45921f0ac6a5Smrg  with_gnu_ld=no
45931f0ac6a5Smrg  wlarc=
45941f0ac6a5Smrgfi
45951f0ac6a5Smrg
45961f0ac6a5Smrg# PORTME: fill in a description of your system's C++ link characteristics
45971f0ac6a5SmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
45981f0ac6a5Smrg_LT_AC_TAGVAR(ld_shlibs, $1)=yes
45991f0ac6a5Smrgcase $host_os in
46001f0ac6a5Smrg  aix3*)
46011f0ac6a5Smrg    # FIXME: insert proper C++ library support
46021f0ac6a5Smrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
46031f0ac6a5Smrg    ;;
4604e5410a46Smrg  aix[[4-9]]*)
46051f0ac6a5Smrg    if test "$host_cpu" = ia64; then
46061f0ac6a5Smrg      # On IA64, the linker does run time linking by default, so we don't
46071f0ac6a5Smrg      # have to do anything special.
46081f0ac6a5Smrg      aix_use_runtimelinking=no
46091f0ac6a5Smrg      exp_sym_flag='-Bexport'
46101f0ac6a5Smrg      no_entry_flag=""
46111f0ac6a5Smrg    else
46121f0ac6a5Smrg      aix_use_runtimelinking=no
46131f0ac6a5Smrg
46141f0ac6a5Smrg      # Test if we are trying to use run time linking or normal
46151f0ac6a5Smrg      # AIX style linking. If -brtl is somewhere in LDFLAGS, we
46161f0ac6a5Smrg      # need to do runtime linking.
4617e5410a46Smrg      case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
46181f0ac6a5Smrg	for ld_flag in $LDFLAGS; do
46191f0ac6a5Smrg	  case $ld_flag in
46201f0ac6a5Smrg	  *-brtl*)
46211f0ac6a5Smrg	    aix_use_runtimelinking=yes
46221f0ac6a5Smrg	    break
46231f0ac6a5Smrg	    ;;
46241f0ac6a5Smrg	  esac
46251f0ac6a5Smrg	done
46261f0ac6a5Smrg	;;
46271f0ac6a5Smrg      esac
46281f0ac6a5Smrg
46291f0ac6a5Smrg      exp_sym_flag='-bexport'
46301f0ac6a5Smrg      no_entry_flag='-bnoentry'
46311f0ac6a5Smrg    fi
46321f0ac6a5Smrg
46331f0ac6a5Smrg    # When large executables or shared objects are built, AIX ld can
46341f0ac6a5Smrg    # have problems creating the table of contents.  If linking a library
46351f0ac6a5Smrg    # or program results in "error TOC overflow" add -mminimal-toc to
46361f0ac6a5Smrg    # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
46371f0ac6a5Smrg    # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
46381f0ac6a5Smrg
46391f0ac6a5Smrg    _LT_AC_TAGVAR(archive_cmds, $1)=''
46401f0ac6a5Smrg    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
46411f0ac6a5Smrg    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
46421f0ac6a5Smrg    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
46431f0ac6a5Smrg
46441f0ac6a5Smrg    if test "$GXX" = yes; then
46451f0ac6a5Smrg      case $host_os in aix4.[[012]]|aix4.[[012]].*)
46461f0ac6a5Smrg      # We only want to do this on AIX 4.2 and lower, the check
46471f0ac6a5Smrg      # below for broken collect2 doesn't work under 4.3+
46481f0ac6a5Smrg	collect2name=`${CC} -print-prog-name=collect2`
46491f0ac6a5Smrg	if test -f "$collect2name" && \
46501f0ac6a5Smrg	   strings "$collect2name" | grep resolve_lib_name >/dev/null
46511f0ac6a5Smrg	then
46521f0ac6a5Smrg	  # We have reworked collect2
4653e5410a46Smrg	  :
46541f0ac6a5Smrg	else
46551f0ac6a5Smrg	  # We have old collect2
46561f0ac6a5Smrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
46571f0ac6a5Smrg	  # It fails to find uninstalled libraries when the uninstalled
46581f0ac6a5Smrg	  # path is not listed in the libpath.  Setting hardcode_minus_L
46591f0ac6a5Smrg	  # to unsupported forces relinking
46601f0ac6a5Smrg	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
46611f0ac6a5Smrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
46621f0ac6a5Smrg	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
46631f0ac6a5Smrg	fi
46641f0ac6a5Smrg	;;
46651f0ac6a5Smrg      esac
46661f0ac6a5Smrg      shared_flag='-shared'
46671f0ac6a5Smrg      if test "$aix_use_runtimelinking" = yes; then
46681f0ac6a5Smrg	shared_flag="$shared_flag "'${wl}-G'
46691f0ac6a5Smrg      fi
46701f0ac6a5Smrg    else
46711f0ac6a5Smrg      # not using gcc
46721f0ac6a5Smrg      if test "$host_cpu" = ia64; then
46731f0ac6a5Smrg	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
46741f0ac6a5Smrg	# chokes on -Wl,-G. The following line is correct:
46751f0ac6a5Smrg	shared_flag='-G'
46761f0ac6a5Smrg      else
46771f0ac6a5Smrg	if test "$aix_use_runtimelinking" = yes; then
46781f0ac6a5Smrg	  shared_flag='${wl}-G'
46791f0ac6a5Smrg	else
46801f0ac6a5Smrg	  shared_flag='${wl}-bM:SRE'
46811f0ac6a5Smrg	fi
46821f0ac6a5Smrg      fi
46831f0ac6a5Smrg    fi
46841f0ac6a5Smrg
46851f0ac6a5Smrg    # It seems that -bexpall does not export symbols beginning with
46861f0ac6a5Smrg    # underscore (_), so it is better to generate a list of symbols to export.
46871f0ac6a5Smrg    _LT_AC_TAGVAR(always_export_symbols, $1)=yes
46881f0ac6a5Smrg    if test "$aix_use_runtimelinking" = yes; then
46891f0ac6a5Smrg      # Warning - without using the other runtime loading flags (-brtl),
46901f0ac6a5Smrg      # -berok will link without error, but may produce a broken library.
46911f0ac6a5Smrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
46921f0ac6a5Smrg      # Determine the default libpath from the value encoded in an empty executable.
46931f0ac6a5Smrg      _LT_AC_SYS_LIBPATH_AIX
46941f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
46951f0ac6a5Smrg
46961f0ac6a5Smrg      _LT_AC_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 echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
46971f0ac6a5Smrg     else
46981f0ac6a5Smrg      if test "$host_cpu" = ia64; then
46991f0ac6a5Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
47001f0ac6a5Smrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
47011f0ac6a5Smrg	_LT_AC_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"
47021f0ac6a5Smrg      else
47031f0ac6a5Smrg	# Determine the default libpath from the value encoded in an empty executable.
47041f0ac6a5Smrg	_LT_AC_SYS_LIBPATH_AIX
47051f0ac6a5Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
47061f0ac6a5Smrg	# Warning - without using the other run time loading flags,
47071f0ac6a5Smrg	# -berok will link without error, but may produce a broken library.
47081f0ac6a5Smrg	_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
47091f0ac6a5Smrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
47101f0ac6a5Smrg	# Exported symbols can be pulled into shared objects from archives
47111f0ac6a5Smrg	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
47121f0ac6a5Smrg	_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
47131f0ac6a5Smrg	# This is similar to how AIX traditionally builds its shared libraries.
47141f0ac6a5Smrg	_LT_AC_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'
47151f0ac6a5Smrg      fi
47161f0ac6a5Smrg    fi
47171f0ac6a5Smrg    ;;
47181f0ac6a5Smrg
47191f0ac6a5Smrg  beos*)
47201f0ac6a5Smrg    if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
47211f0ac6a5Smrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
47221f0ac6a5Smrg      # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
47231f0ac6a5Smrg      # support --undefined.  This deserves some investigation.  FIXME
47241f0ac6a5Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
47251f0ac6a5Smrg    else
47261f0ac6a5Smrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
47271f0ac6a5Smrg    fi
47281f0ac6a5Smrg    ;;
47291f0ac6a5Smrg
47301f0ac6a5Smrg  chorus*)
47311f0ac6a5Smrg    case $cc_basename in
47321f0ac6a5Smrg      *)
47331f0ac6a5Smrg	# FIXME: insert proper C++ library support
47341f0ac6a5Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
47351f0ac6a5Smrg	;;
47361f0ac6a5Smrg    esac
47371f0ac6a5Smrg    ;;
47381f0ac6a5Smrg
47391f0ac6a5Smrg  cygwin* | mingw* | pw32*)
47401f0ac6a5Smrg    # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
47411f0ac6a5Smrg    # as there is no search path for DLLs.
47421f0ac6a5Smrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
47431f0ac6a5Smrg    _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
47441f0ac6a5Smrg    _LT_AC_TAGVAR(always_export_symbols, $1)=no
47451f0ac6a5Smrg    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
47461f0ac6a5Smrg
47471f0ac6a5Smrg    if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
47481f0ac6a5Smrg      _LT_AC_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'
47491f0ac6a5Smrg      # If the export-symbols file already is a .def file (1st line
47501f0ac6a5Smrg      # is EXPORTS), use it as is; otherwise, prepend...
47511f0ac6a5Smrg      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
47521f0ac6a5Smrg	cp $export_symbols $output_objdir/$soname.def;
47531f0ac6a5Smrg      else
47541f0ac6a5Smrg	echo EXPORTS > $output_objdir/$soname.def;
47551f0ac6a5Smrg	cat $export_symbols >> $output_objdir/$soname.def;
47561f0ac6a5Smrg      fi~
47571f0ac6a5Smrg      $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'
47581f0ac6a5Smrg    else
47591f0ac6a5Smrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
47601f0ac6a5Smrg    fi
47611f0ac6a5Smrg  ;;
47621f0ac6a5Smrg      darwin* | rhapsody*)
47631f0ac6a5Smrg      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
47641f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=no
47651f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
47661f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
47671f0ac6a5Smrg      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
47681f0ac6a5Smrg      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4769e5410a46Smrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
4770e5410a46Smrg      if test "$GXX" = yes ; then
47711f0ac6a5Smrg      output_verbose_link_cmd='echo'
4772e5410a46Smrg      _LT_AC_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}"
4773e5410a46Smrg      _LT_AC_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
4774e5410a46Smrg      _LT_AC_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}"
4775e5410a46Smrg      _LT_AC_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}"
4776e5410a46Smrg      if test "$lt_cv_apple_cc_single_mod" != "yes"; then
4777e5410a46Smrg        _LT_AC_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}"
4778e5410a46Smrg        _LT_AC_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}"
47791f0ac6a5Smrg      fi
47801f0ac6a5Smrg      else
47811f0ac6a5Smrg      case $cc_basename in
47821f0ac6a5Smrg        xlc*)
47831f0ac6a5Smrg         output_verbose_link_cmd='echo'
4784e5410a46Smrg          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring'
47851f0ac6a5Smrg          _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
47861f0ac6a5Smrg          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
4787e5410a46Smrg          _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
47881f0ac6a5Smrg          _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
47891f0ac6a5Smrg          ;;
47901f0ac6a5Smrg       *)
47911f0ac6a5Smrg         _LT_AC_TAGVAR(ld_shlibs, $1)=no
47921f0ac6a5Smrg          ;;
47931f0ac6a5Smrg      esac
47941f0ac6a5Smrg      fi
47951f0ac6a5Smrg        ;;
47961f0ac6a5Smrg
47971f0ac6a5Smrg  dgux*)
47981f0ac6a5Smrg    case $cc_basename in
47991f0ac6a5Smrg      ec++*)
48001f0ac6a5Smrg	# FIXME: insert proper C++ library support
48011f0ac6a5Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
48021f0ac6a5Smrg	;;
48031f0ac6a5Smrg      ghcx*)
48041f0ac6a5Smrg	# Green Hills C++ Compiler
48051f0ac6a5Smrg	# FIXME: insert proper C++ library support
48061f0ac6a5Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
48071f0ac6a5Smrg	;;
48081f0ac6a5Smrg      *)
48091f0ac6a5Smrg	# FIXME: insert proper C++ library support
48101f0ac6a5Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
48111f0ac6a5Smrg	;;
48121f0ac6a5Smrg    esac
48131f0ac6a5Smrg    ;;
48141f0ac6a5Smrg  freebsd[[12]]*)
48151f0ac6a5Smrg    # C++ shared libraries reported to be fairly broken before switch to ELF
48161f0ac6a5Smrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
48171f0ac6a5Smrg    ;;
48181f0ac6a5Smrg  freebsd-elf*)
48191f0ac6a5Smrg    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
48201f0ac6a5Smrg    ;;
4821e5410a46Smrg  freebsd* | dragonfly*)
48221f0ac6a5Smrg    # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
48231f0ac6a5Smrg    # conventions
48241f0ac6a5Smrg    _LT_AC_TAGVAR(ld_shlibs, $1)=yes
48251f0ac6a5Smrg    ;;
48261f0ac6a5Smrg  gnu*)
48271f0ac6a5Smrg    ;;
48281f0ac6a5Smrg  hpux9*)
48291f0ac6a5Smrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
48301f0ac6a5Smrg    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
48311f0ac6a5Smrg    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
48321f0ac6a5Smrg    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
48331f0ac6a5Smrg    _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
48341f0ac6a5Smrg				# but as the default
48351f0ac6a5Smrg				# location of the library.
48361f0ac6a5Smrg
48371f0ac6a5Smrg    case $cc_basename in
48381f0ac6a5Smrg    CC*)
48391f0ac6a5Smrg      # FIXME: insert proper C++ library support
48401f0ac6a5Smrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
48411f0ac6a5Smrg      ;;
48421f0ac6a5Smrg    aCC*)
48431f0ac6a5Smrg      _LT_AC_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'
48441f0ac6a5Smrg      # Commands to make compiler produce verbose output that lists
48451f0ac6a5Smrg      # what "hidden" libraries, object files and flags are used when
48461f0ac6a5Smrg      # linking a shared library.
48471f0ac6a5Smrg      #
48481f0ac6a5Smrg      # There doesn't appear to be a way to prevent this compiler from
48491f0ac6a5Smrg      # explicitly linking system object files so we need to strip them
48501f0ac6a5Smrg      # from the output so that they don't get included in the library
48511f0ac6a5Smrg      # dependencies.
48521f0ac6a5Smrg      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; echo $list'
48531f0ac6a5Smrg      ;;
48541f0ac6a5Smrg    *)
48551f0ac6a5Smrg      if test "$GXX" = yes; then
48561f0ac6a5Smrg        _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${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'
48571f0ac6a5Smrg      else
48581f0ac6a5Smrg        # FIXME: insert proper C++ library support
48591f0ac6a5Smrg        _LT_AC_TAGVAR(ld_shlibs, $1)=no
48601f0ac6a5Smrg      fi
48611f0ac6a5Smrg      ;;
48621f0ac6a5Smrg    esac
48631f0ac6a5Smrg    ;;
48641f0ac6a5Smrg  hpux10*|hpux11*)
48651f0ac6a5Smrg    if test $with_gnu_ld = no; then
48661f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
48671f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
48681f0ac6a5Smrg
48691f0ac6a5Smrg      case $host_cpu in
4870e5410a46Smrg      hppa*64*|ia64*) ;;
48711f0ac6a5Smrg      *)
48721f0ac6a5Smrg	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
48731f0ac6a5Smrg        ;;
48741f0ac6a5Smrg      esac
48751f0ac6a5Smrg    fi
48761f0ac6a5Smrg    case $host_cpu in
48771f0ac6a5Smrg    hppa*64*|ia64*)
48781f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=no
48791f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
48801f0ac6a5Smrg      ;;
48811f0ac6a5Smrg    *)
48821f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
48831f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
48841f0ac6a5Smrg					      # but as the default
48851f0ac6a5Smrg					      # location of the library.
48861f0ac6a5Smrg      ;;
48871f0ac6a5Smrg    esac
48881f0ac6a5Smrg
48891f0ac6a5Smrg    case $cc_basename in
48901f0ac6a5Smrg      CC*)
48911f0ac6a5Smrg	# FIXME: insert proper C++ library support
48921f0ac6a5Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
48931f0ac6a5Smrg	;;
48941f0ac6a5Smrg      aCC*)
48951f0ac6a5Smrg	case $host_cpu in
48961f0ac6a5Smrg	hppa*64*)
48971f0ac6a5Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
48981f0ac6a5Smrg	  ;;
48991f0ac6a5Smrg	ia64*)
49001f0ac6a5Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
49011f0ac6a5Smrg	  ;;
49021f0ac6a5Smrg	*)
49031f0ac6a5Smrg	  _LT_AC_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'
49041f0ac6a5Smrg	  ;;
49051f0ac6a5Smrg	esac
49061f0ac6a5Smrg	# Commands to make compiler produce verbose output that lists
49071f0ac6a5Smrg	# what "hidden" libraries, object files and flags are used when
49081f0ac6a5Smrg	# linking a shared library.
49091f0ac6a5Smrg	#
49101f0ac6a5Smrg	# There doesn't appear to be a way to prevent this compiler from
49111f0ac6a5Smrg	# explicitly linking system object files so we need to strip them
49121f0ac6a5Smrg	# from the output so that they don't get included in the library
49131f0ac6a5Smrg	# dependencies.
49141f0ac6a5Smrg	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; echo $list'
49151f0ac6a5Smrg	;;
49161f0ac6a5Smrg      *)
49171f0ac6a5Smrg	if test "$GXX" = yes; then
49181f0ac6a5Smrg	  if test $with_gnu_ld = no; then
49191f0ac6a5Smrg	    case $host_cpu in
49201f0ac6a5Smrg	    hppa*64*)
49211f0ac6a5Smrg	      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
49221f0ac6a5Smrg	      ;;
49231f0ac6a5Smrg	    ia64*)
49241f0ac6a5Smrg	      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
49251f0ac6a5Smrg	      ;;
49261f0ac6a5Smrg	    *)
49271f0ac6a5Smrg	      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
49281f0ac6a5Smrg	      ;;
49291f0ac6a5Smrg	    esac
49301f0ac6a5Smrg	  fi
49311f0ac6a5Smrg	else
49321f0ac6a5Smrg	  # FIXME: insert proper C++ library support
49331f0ac6a5Smrg	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
49341f0ac6a5Smrg	fi
49351f0ac6a5Smrg	;;
49361f0ac6a5Smrg    esac
49371f0ac6a5Smrg    ;;
4938e5410a46Smrg  interix[[3-9]]*)
49391f0ac6a5Smrg    _LT_AC_TAGVAR(hardcode_direct, $1)=no
49401f0ac6a5Smrg    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
49411f0ac6a5Smrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
49421f0ac6a5Smrg    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
49431f0ac6a5Smrg    # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
49441f0ac6a5Smrg    # Instead, shared libraries are loaded at an image base (0x10000000 by
49451f0ac6a5Smrg    # default) and relocated if they conflict, which is a slow very memory
49461f0ac6a5Smrg    # consuming and fragmenting process.  To avoid this, we pick a random,
49471f0ac6a5Smrg    # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
49481f0ac6a5Smrg    # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
49491f0ac6a5Smrg    _LT_AC_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'
49501f0ac6a5Smrg    _LT_AC_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'
49511f0ac6a5Smrg    ;;
49521f0ac6a5Smrg  irix5* | irix6*)
49531f0ac6a5Smrg    case $cc_basename in
49541f0ac6a5Smrg      CC*)
49551f0ac6a5Smrg	# SGI C++
49561f0ac6a5Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
49571f0ac6a5Smrg
49581f0ac6a5Smrg	# Archives containing C++ object files must be created using
49591f0ac6a5Smrg	# "CC -ar", where "CC" is the IRIX C++ compiler.  This is
49601f0ac6a5Smrg	# necessary to make sure instantiated templates are included
49611f0ac6a5Smrg	# in the archive.
49621f0ac6a5Smrg	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
49631f0ac6a5Smrg	;;
49641f0ac6a5Smrg      *)
49651f0ac6a5Smrg	if test "$GXX" = yes; then
49661f0ac6a5Smrg	  if test "$with_gnu_ld" = no; then
49671f0ac6a5Smrg	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
49681f0ac6a5Smrg	  else
49691f0ac6a5Smrg	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib'
49701f0ac6a5Smrg	  fi
49711f0ac6a5Smrg	fi
49721f0ac6a5Smrg	_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
49731f0ac6a5Smrg	;;
49741f0ac6a5Smrg    esac
49751f0ac6a5Smrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
49761f0ac6a5Smrg    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
49771f0ac6a5Smrg    ;;
4978e5410a46Smrg  linux* | k*bsd*-gnu)
49791f0ac6a5Smrg    case $cc_basename in
49801f0ac6a5Smrg      KCC*)
49811f0ac6a5Smrg	# Kuck and Associates, Inc. (KAI) C++ Compiler
49821f0ac6a5Smrg
49831f0ac6a5Smrg	# KCC will only create a shared library if the output file
49841f0ac6a5Smrg	# ends with ".so" (or ".sl" for HP-UX), so rename the library
49851f0ac6a5Smrg	# to its proper name (with version) after linking.
49861f0ac6a5Smrg	_LT_AC_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'
49871f0ac6a5Smrg	_LT_AC_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'
49881f0ac6a5Smrg	# Commands to make compiler produce verbose output that lists
49891f0ac6a5Smrg	# what "hidden" libraries, object files and flags are used when
49901f0ac6a5Smrg	# linking a shared library.
49911f0ac6a5Smrg	#
49921f0ac6a5Smrg	# There doesn't appear to be a way to prevent this compiler from
49931f0ac6a5Smrg	# explicitly linking system object files so we need to strip them
49941f0ac6a5Smrg	# from the output so that they don't get included in the library
49951f0ac6a5Smrg	# dependencies.
49961f0ac6a5Smrg	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; echo $list'
49971f0ac6a5Smrg
49981f0ac6a5Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
49991f0ac6a5Smrg	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
50001f0ac6a5Smrg
50011f0ac6a5Smrg	# Archives containing C++ object files must be created using
50021f0ac6a5Smrg	# "CC -Bstatic", where "CC" is the KAI C++ compiler.
50031f0ac6a5Smrg	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
50041f0ac6a5Smrg	;;
50051f0ac6a5Smrg      icpc*)
50061f0ac6a5Smrg	# Intel C++
50071f0ac6a5Smrg	with_gnu_ld=yes
50081f0ac6a5Smrg	# version 8.0 and above of icpc choke on multiply defined symbols
50091f0ac6a5Smrg	# if we add $predep_objects and $postdep_objects, however 7.1 and
50101f0ac6a5Smrg	# earlier do not add the objects themselves.
50111f0ac6a5Smrg	case `$CC -V 2>&1` in
50121f0ac6a5Smrg	*"Version 7."*)
50131f0ac6a5Smrg  	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
50141f0ac6a5Smrg  	  _LT_AC_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'
50151f0ac6a5Smrg	  ;;
50161f0ac6a5Smrg	*)  # Version 8.0 or newer
50171f0ac6a5Smrg	  tmp_idyn=
50181f0ac6a5Smrg	  case $host_cpu in
50191f0ac6a5Smrg	    ia64*) tmp_idyn=' -i_dynamic';;
50201f0ac6a5Smrg	  esac
50211f0ac6a5Smrg  	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
50221f0ac6a5Smrg	  _LT_AC_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'
50231f0ac6a5Smrg	  ;;
50241f0ac6a5Smrg	esac
50251f0ac6a5Smrg	_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
50261f0ac6a5Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
50271f0ac6a5Smrg	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
50281f0ac6a5Smrg	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
50291f0ac6a5Smrg	;;
5030e5410a46Smrg      pgCC* | pgcpp*)
50311f0ac6a5Smrg        # Portland Group C++ compiler
50321f0ac6a5Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
50331f0ac6a5Smrg  	_LT_AC_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'
50341f0ac6a5Smrg
50351f0ac6a5Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
50361f0ac6a5Smrg	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
50371f0ac6a5Smrg	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
50381f0ac6a5Smrg        ;;
50391f0ac6a5Smrg      cxx*)
50401f0ac6a5Smrg	# Compaq C++
50411f0ac6a5Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
50421f0ac6a5Smrg	_LT_AC_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'
50431f0ac6a5Smrg
50441f0ac6a5Smrg	runpath_var=LD_RUN_PATH
50451f0ac6a5Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
50461f0ac6a5Smrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
50471f0ac6a5Smrg
50481f0ac6a5Smrg	# Commands to make compiler produce verbose output that lists
50491f0ac6a5Smrg	# what "hidden" libraries, object files and flags are used when
50501f0ac6a5Smrg	# linking a shared library.
50511f0ac6a5Smrg	#
50521f0ac6a5Smrg	# There doesn't appear to be a way to prevent this compiler from
50531f0ac6a5Smrg	# explicitly linking system object files so we need to strip them
50541f0ac6a5Smrg	# from the output so that they don't get included in the library
50551f0ac6a5Smrg	# dependencies.
50561f0ac6a5Smrg	output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $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; echo $list'
50571f0ac6a5Smrg	;;
5058e5410a46Smrg      *)
5059e5410a46Smrg	case `$CC -V 2>&1 | sed 5q` in
5060e5410a46Smrg	*Sun\ C*)
5061e5410a46Smrg	  # Sun C++ 5.9
5062e5410a46Smrg	  _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
5063e5410a46Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
5064e5410a46Smrg	  _LT_AC_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'
5065e5410a46Smrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5066e5410a46Smrg	  _LT_AC_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; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
5067e5410a46Smrg
5068e5410a46Smrg	  # Not sure whether something based on
5069e5410a46Smrg	  # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
5070e5410a46Smrg	  # would be better.
5071e5410a46Smrg	  output_verbose_link_cmd='echo'
5072e5410a46Smrg
5073e5410a46Smrg	  # Archives containing C++ object files must be created using
5074e5410a46Smrg	  # "CC -xar", where "CC" is the Sun C++ compiler.  This is
5075e5410a46Smrg	  # necessary to make sure instantiated templates are included
5076e5410a46Smrg	  # in the archive.
5077e5410a46Smrg	  _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
5078e5410a46Smrg	  ;;
5079e5410a46Smrg	esac
5080e5410a46Smrg	;;
50811f0ac6a5Smrg    esac
50821f0ac6a5Smrg    ;;
50831f0ac6a5Smrg  lynxos*)
50841f0ac6a5Smrg    # FIXME: insert proper C++ library support
50851f0ac6a5Smrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
50861f0ac6a5Smrg    ;;
50871f0ac6a5Smrg  m88k*)
50881f0ac6a5Smrg    # FIXME: insert proper C++ library support
50891f0ac6a5Smrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
50901f0ac6a5Smrg    ;;
50911f0ac6a5Smrg  mvs*)
50921f0ac6a5Smrg    case $cc_basename in
50931f0ac6a5Smrg      cxx*)
50941f0ac6a5Smrg	# FIXME: insert proper C++ library support
50951f0ac6a5Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
50961f0ac6a5Smrg	;;
50971f0ac6a5Smrg      *)
50981f0ac6a5Smrg	# FIXME: insert proper C++ library support
50991f0ac6a5Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
51001f0ac6a5Smrg	;;
51011f0ac6a5Smrg    esac
51021f0ac6a5Smrg    ;;
51031f0ac6a5Smrg  netbsd*)
51041f0ac6a5Smrg    if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
51051f0ac6a5Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
51061f0ac6a5Smrg      wlarc=
51071f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
51081f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
51091f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
51101f0ac6a5Smrg    fi
51111f0ac6a5Smrg    # Workaround some broken pre-1.5 toolchains
51121f0ac6a5Smrg    output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
51131f0ac6a5Smrg    ;;
51141f0ac6a5Smrg  openbsd2*)
51151f0ac6a5Smrg    # C++ shared libraries are fairly broken
51161f0ac6a5Smrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
51171f0ac6a5Smrg    ;;
51181f0ac6a5Smrg  openbsd*)
5119e5410a46Smrg    if test -f /usr/libexec/ld.so; then
5120e5410a46Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5121e5410a46Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5122e5410a46Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
5123e5410a46Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5124e5410a46Smrg      if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5125e5410a46Smrg	_LT_AC_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'
5126e5410a46Smrg	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5127e5410a46Smrg	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5128e5410a46Smrg      fi
5129e5410a46Smrg      output_verbose_link_cmd='echo'
5130e5410a46Smrg    else
5131e5410a46Smrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
51321f0ac6a5Smrg    fi
51331f0ac6a5Smrg    ;;
51341f0ac6a5Smrg  osf3*)
51351f0ac6a5Smrg    case $cc_basename in
51361f0ac6a5Smrg      KCC*)
51371f0ac6a5Smrg	# Kuck and Associates, Inc. (KAI) C++ Compiler
51381f0ac6a5Smrg
51391f0ac6a5Smrg	# KCC will only create a shared library if the output file
51401f0ac6a5Smrg	# ends with ".so" (or ".sl" for HP-UX), so rename the library
51411f0ac6a5Smrg	# to its proper name (with version) after linking.
51421f0ac6a5Smrg	_LT_AC_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'
51431f0ac6a5Smrg
51441f0ac6a5Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
51451f0ac6a5Smrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
51461f0ac6a5Smrg
51471f0ac6a5Smrg	# Archives containing C++ object files must be created using
51481f0ac6a5Smrg	# "CC -Bstatic", where "CC" is the KAI C++ compiler.
51491f0ac6a5Smrg	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
51501f0ac6a5Smrg
51511f0ac6a5Smrg	;;
51521f0ac6a5Smrg      RCC*)
51531f0ac6a5Smrg	# Rational C++ 2.4.1
51541f0ac6a5Smrg	# FIXME: insert proper C++ library support
51551f0ac6a5Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
51561f0ac6a5Smrg	;;
51571f0ac6a5Smrg      cxx*)
51581f0ac6a5Smrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
51591f0ac6a5Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
51601f0ac6a5Smrg
51611f0ac6a5Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
51621f0ac6a5Smrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
51631f0ac6a5Smrg
51641f0ac6a5Smrg	# Commands to make compiler produce verbose output that lists
51651f0ac6a5Smrg	# what "hidden" libraries, object files and flags are used when
51661f0ac6a5Smrg	# linking a shared library.
51671f0ac6a5Smrg	#
51681f0ac6a5Smrg	# There doesn't appear to be a way to prevent this compiler from
51691f0ac6a5Smrg	# explicitly linking system object files so we need to strip them
51701f0ac6a5Smrg	# from the output so that they don't get included in the library
51711f0ac6a5Smrg	# dependencies.
51721f0ac6a5Smrg	output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $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; echo $list'
51731f0ac6a5Smrg	;;
51741f0ac6a5Smrg      *)
51751f0ac6a5Smrg	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
51761f0ac6a5Smrg	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
51771f0ac6a5Smrg	  _LT_AC_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" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
51781f0ac6a5Smrg
51791f0ac6a5Smrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
51801f0ac6a5Smrg	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
51811f0ac6a5Smrg
51821f0ac6a5Smrg	  # Commands to make compiler produce verbose output that lists
51831f0ac6a5Smrg	  # what "hidden" libraries, object files and flags are used when
51841f0ac6a5Smrg	  # linking a shared library.
51851f0ac6a5Smrg	  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
51861f0ac6a5Smrg
51871f0ac6a5Smrg	else
51881f0ac6a5Smrg	  # FIXME: insert proper C++ library support
51891f0ac6a5Smrg	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
51901f0ac6a5Smrg	fi
51911f0ac6a5Smrg	;;
51921f0ac6a5Smrg    esac
51931f0ac6a5Smrg    ;;
51941f0ac6a5Smrg  osf4* | osf5*)
51951f0ac6a5Smrg    case $cc_basename in
51961f0ac6a5Smrg      KCC*)
51971f0ac6a5Smrg	# Kuck and Associates, Inc. (KAI) C++ Compiler
51981f0ac6a5Smrg
51991f0ac6a5Smrg	# KCC will only create a shared library if the output file
52001f0ac6a5Smrg	# ends with ".so" (or ".sl" for HP-UX), so rename the library
52011f0ac6a5Smrg	# to its proper name (with version) after linking.
52021f0ac6a5Smrg	_LT_AC_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'
52031f0ac6a5Smrg
52041f0ac6a5Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
52051f0ac6a5Smrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
52061f0ac6a5Smrg
52071f0ac6a5Smrg	# Archives containing C++ object files must be created using
52081f0ac6a5Smrg	# the KAI C++ compiler.
52091f0ac6a5Smrg	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
52101f0ac6a5Smrg	;;
52111f0ac6a5Smrg      RCC*)
52121f0ac6a5Smrg	# Rational C++ 2.4.1
52131f0ac6a5Smrg	# FIXME: insert proper C++ library support
52141f0ac6a5Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
52151f0ac6a5Smrg	;;
52161f0ac6a5Smrg      cxx*)
52171f0ac6a5Smrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
52181f0ac6a5Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
52191f0ac6a5Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
52201f0ac6a5Smrg	  echo "-hidden">> $lib.exp~
52211f0ac6a5Smrg	  $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~
52221f0ac6a5Smrg	  $rm $lib.exp'
52231f0ac6a5Smrg
52241f0ac6a5Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
52251f0ac6a5Smrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
52261f0ac6a5Smrg
52271f0ac6a5Smrg	# Commands to make compiler produce verbose output that lists
52281f0ac6a5Smrg	# what "hidden" libraries, object files and flags are used when
52291f0ac6a5Smrg	# linking a shared library.
52301f0ac6a5Smrg	#
52311f0ac6a5Smrg	# There doesn't appear to be a way to prevent this compiler from
52321f0ac6a5Smrg	# explicitly linking system object files so we need to strip them
52331f0ac6a5Smrg	# from the output so that they don't get included in the library
52341f0ac6a5Smrg	# dependencies.
52351f0ac6a5Smrg	output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $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; echo $list'
52361f0ac6a5Smrg	;;
52371f0ac6a5Smrg      *)
52381f0ac6a5Smrg	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
52391f0ac6a5Smrg	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
52401f0ac6a5Smrg	 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
52411f0ac6a5Smrg
52421f0ac6a5Smrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
52431f0ac6a5Smrg	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
52441f0ac6a5Smrg
52451f0ac6a5Smrg	  # Commands to make compiler produce verbose output that lists
52461f0ac6a5Smrg	  # what "hidden" libraries, object files and flags are used when
52471f0ac6a5Smrg	  # linking a shared library.
52481f0ac6a5Smrg	  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
52491f0ac6a5Smrg
52501f0ac6a5Smrg	else
52511f0ac6a5Smrg	  # FIXME: insert proper C++ library support
52521f0ac6a5Smrg	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
52531f0ac6a5Smrg	fi
52541f0ac6a5Smrg	;;
52551f0ac6a5Smrg    esac
52561f0ac6a5Smrg    ;;
52571f0ac6a5Smrg  psos*)
52581f0ac6a5Smrg    # FIXME: insert proper C++ library support
52591f0ac6a5Smrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
52601f0ac6a5Smrg    ;;
52611f0ac6a5Smrg  sunos4*)
52621f0ac6a5Smrg    case $cc_basename in
52631f0ac6a5Smrg      CC*)
52641f0ac6a5Smrg	# Sun C++ 4.x
52651f0ac6a5Smrg	# FIXME: insert proper C++ library support
52661f0ac6a5Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
52671f0ac6a5Smrg	;;
52681f0ac6a5Smrg      lcc*)
52691f0ac6a5Smrg	# Lucid
52701f0ac6a5Smrg	# FIXME: insert proper C++ library support
52711f0ac6a5Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
52721f0ac6a5Smrg	;;
52731f0ac6a5Smrg      *)
52741f0ac6a5Smrg	# FIXME: insert proper C++ library support
52751f0ac6a5Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
52761f0ac6a5Smrg	;;
52771f0ac6a5Smrg    esac
52781f0ac6a5Smrg    ;;
52791f0ac6a5Smrg  solaris*)
52801f0ac6a5Smrg    case $cc_basename in
52811f0ac6a5Smrg      CC*)
52821f0ac6a5Smrg	# Sun C++ 4.2, 5.x and Centerline C++
52831f0ac6a5Smrg        _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes
52841f0ac6a5Smrg	_LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
52851f0ac6a5Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
52861f0ac6a5Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
52871f0ac6a5Smrg	$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'
52881f0ac6a5Smrg
52891f0ac6a5Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
52901f0ac6a5Smrg	_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
52911f0ac6a5Smrg	case $host_os in
52921f0ac6a5Smrg	  solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
52931f0ac6a5Smrg	  *)
5294e5410a46Smrg	    # The compiler driver will combine and reorder linker options,
5295e5410a46Smrg	    # but understands `-z linker_flag'.
52961f0ac6a5Smrg	    # Supported since Solaris 2.6 (maybe 2.5.1?)
5297e5410a46Smrg	    _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
52981f0ac6a5Smrg	    ;;
52991f0ac6a5Smrg	esac
53001f0ac6a5Smrg	_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
53011f0ac6a5Smrg
53021f0ac6a5Smrg	output_verbose_link_cmd='echo'
53031f0ac6a5Smrg
53041f0ac6a5Smrg	# Archives containing C++ object files must be created using
53051f0ac6a5Smrg	# "CC -xar", where "CC" is the Sun C++ compiler.  This is
53061f0ac6a5Smrg	# necessary to make sure instantiated templates are included
53071f0ac6a5Smrg	# in the archive.
53081f0ac6a5Smrg	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
53091f0ac6a5Smrg	;;
53101f0ac6a5Smrg      gcx*)
53111f0ac6a5Smrg	# Green Hills C++ Compiler
53121f0ac6a5Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
53131f0ac6a5Smrg
53141f0ac6a5Smrg	# The C++ compiler must be used to create the archive.
53151f0ac6a5Smrg	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
53161f0ac6a5Smrg	;;
53171f0ac6a5Smrg      *)
53181f0ac6a5Smrg	# GNU C++ compiler with Solaris linker
53191f0ac6a5Smrg	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
53201f0ac6a5Smrg	  _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
53211f0ac6a5Smrg	  if $CC --version | grep -v '^2\.7' > /dev/null; then
53221f0ac6a5Smrg	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
53231f0ac6a5Smrg	    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
53241f0ac6a5Smrg		$CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
53251f0ac6a5Smrg
53261f0ac6a5Smrg	    # Commands to make compiler produce verbose output that lists
53271f0ac6a5Smrg	    # what "hidden" libraries, object files and flags are used when
53281f0ac6a5Smrg	    # linking a shared library.
53291f0ac6a5Smrg	    output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
53301f0ac6a5Smrg	  else
53311f0ac6a5Smrg	    # g++ 2.7 appears to require `-G' NOT `-shared' on this
53321f0ac6a5Smrg	    # platform.
53331f0ac6a5Smrg	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
53341f0ac6a5Smrg	    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
53351f0ac6a5Smrg		$CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
53361f0ac6a5Smrg
53371f0ac6a5Smrg	    # Commands to make compiler produce verbose output that lists
53381f0ac6a5Smrg	    # what "hidden" libraries, object files and flags are used when
53391f0ac6a5Smrg	    # linking a shared library.
53401f0ac6a5Smrg	    output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
53411f0ac6a5Smrg	  fi
53421f0ac6a5Smrg
53431f0ac6a5Smrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
5344e5410a46Smrg	  case $host_os in
5345e5410a46Smrg	  solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
5346e5410a46Smrg	  *)
5347e5410a46Smrg	    _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
5348e5410a46Smrg	    ;;
5349e5410a46Smrg	  esac
53501f0ac6a5Smrg	fi
53511f0ac6a5Smrg	;;
53521f0ac6a5Smrg    esac
53531f0ac6a5Smrg    ;;
53541f0ac6a5Smrg  sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
53551f0ac6a5Smrg    _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
53561f0ac6a5Smrg    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
53571f0ac6a5Smrg    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
53581f0ac6a5Smrg    runpath_var='LD_RUN_PATH'
53591f0ac6a5Smrg
53601f0ac6a5Smrg    case $cc_basename in
53611f0ac6a5Smrg      CC*)
53621f0ac6a5Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
53631f0ac6a5Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
53641f0ac6a5Smrg	;;
53651f0ac6a5Smrg      *)
53661f0ac6a5Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
53671f0ac6a5Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
53681f0ac6a5Smrg	;;
53691f0ac6a5Smrg    esac
53701f0ac6a5Smrg    ;;
53711f0ac6a5Smrg  sysv5* | sco3.2v5* | sco5v6*)
53721f0ac6a5Smrg    # Note: We can NOT use -z defs as we might desire, because we do not
53731f0ac6a5Smrg    # link with -lc, and that would cause any symbols used from libc to
53741f0ac6a5Smrg    # always be unresolved, which means just about no library would
53751f0ac6a5Smrg    # ever link correctly.  If we're not using GNU ld we use -z text
53761f0ac6a5Smrg    # though, which does catch some bad symbols but isn't as heavy-handed
53771f0ac6a5Smrg    # as -z defs.
53781f0ac6a5Smrg    # For security reasons, it is highly recommended that you always
53791f0ac6a5Smrg    # use absolute paths for naming shared libraries, and exclude the
53801f0ac6a5Smrg    # DT_RUNPATH tag from executables and libraries.  But doing so
53811f0ac6a5Smrg    # requires that you compile everything twice, which is a pain.
53821f0ac6a5Smrg    # So that behaviour is only enabled if SCOABSPATH is set to a
53831f0ac6a5Smrg    # non-empty value in the environment.  Most likely only useful for
53841f0ac6a5Smrg    # creating official distributions of packages.
53851f0ac6a5Smrg    # This is a hack until libtool officially supports absolute path
53861f0ac6a5Smrg    # names for shared libraries.
53871f0ac6a5Smrg    _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
53881f0ac6a5Smrg    _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
53891f0ac6a5Smrg    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
53901f0ac6a5Smrg    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
53911f0ac6a5Smrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
53921f0ac6a5Smrg    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
53931f0ac6a5Smrg    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
53941f0ac6a5Smrg    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
53951f0ac6a5Smrg    runpath_var='LD_RUN_PATH'
53961f0ac6a5Smrg
53971f0ac6a5Smrg    case $cc_basename in
53981f0ac6a5Smrg      CC*)
53991f0ac6a5Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
54001f0ac6a5Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
54011f0ac6a5Smrg	;;
54021f0ac6a5Smrg      *)
54031f0ac6a5Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
54041f0ac6a5Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
54051f0ac6a5Smrg	;;
54061f0ac6a5Smrg    esac
54071f0ac6a5Smrg    ;;
54081f0ac6a5Smrg  tandem*)
54091f0ac6a5Smrg    case $cc_basename in
54101f0ac6a5Smrg      NCC*)
54111f0ac6a5Smrg	# NonStop-UX NCC 3.20
54121f0ac6a5Smrg	# FIXME: insert proper C++ library support
54131f0ac6a5Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
54141f0ac6a5Smrg	;;
54151f0ac6a5Smrg      *)
54161f0ac6a5Smrg	# FIXME: insert proper C++ library support
54171f0ac6a5Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
54181f0ac6a5Smrg	;;
54191f0ac6a5Smrg    esac
54201f0ac6a5Smrg    ;;
54211f0ac6a5Smrg  vxworks*)
54221f0ac6a5Smrg    # FIXME: insert proper C++ library support
54231f0ac6a5Smrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
54241f0ac6a5Smrg    ;;
54251f0ac6a5Smrg  *)
54261f0ac6a5Smrg    # FIXME: insert proper C++ library support
54271f0ac6a5Smrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
54281f0ac6a5Smrg    ;;
54291f0ac6a5Smrgesac
54301f0ac6a5SmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
54311f0ac6a5Smrgtest "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
54321f0ac6a5Smrg
54331f0ac6a5Smrg_LT_AC_TAGVAR(GCC, $1)="$GXX"
54341f0ac6a5Smrg_LT_AC_TAGVAR(LD, $1)="$LD"
54351f0ac6a5Smrg
54361f0ac6a5SmrgAC_LIBTOOL_POSTDEP_PREDEP($1)
54371f0ac6a5SmrgAC_LIBTOOL_PROG_COMPILER_PIC($1)
54381f0ac6a5SmrgAC_LIBTOOL_PROG_CC_C_O($1)
54391f0ac6a5SmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
54401f0ac6a5SmrgAC_LIBTOOL_PROG_LD_SHLIBS($1)
54411f0ac6a5SmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
54421f0ac6a5SmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
54431f0ac6a5Smrg
54441f0ac6a5SmrgAC_LIBTOOL_CONFIG($1)
54451f0ac6a5Smrg
54461f0ac6a5SmrgAC_LANG_POP
54471f0ac6a5SmrgCC=$lt_save_CC
54481f0ac6a5SmrgLDCXX=$LD
54491f0ac6a5SmrgLD=$lt_save_LD
54501f0ac6a5SmrgGCC=$lt_save_GCC
54511f0ac6a5Smrgwith_gnu_ldcxx=$with_gnu_ld
54521f0ac6a5Smrgwith_gnu_ld=$lt_save_with_gnu_ld
54531f0ac6a5Smrglt_cv_path_LDCXX=$lt_cv_path_LD
54541f0ac6a5Smrglt_cv_path_LD=$lt_save_path_LD
54551f0ac6a5Smrglt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
54561f0ac6a5Smrglt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
54571f0ac6a5Smrg])# AC_LIBTOOL_LANG_CXX_CONFIG
54581f0ac6a5Smrg
54591f0ac6a5Smrg# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
54601f0ac6a5Smrg# ------------------------------------
54611f0ac6a5Smrg# Figure out "hidden" library dependencies from verbose
54621f0ac6a5Smrg# compiler output when linking a shared library.
54631f0ac6a5Smrg# Parse the compiler output and extract the necessary
54641f0ac6a5Smrg# objects, libraries and library flags.
5465e5410a46SmrgAC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],
5466e5410a46Smrg[AC_REQUIRE([LT_AC_PROG_SED])dnl
54671f0ac6a5Smrgdnl we can't use the lt_simple_compile_test_code here,
54681f0ac6a5Smrgdnl because it contains code intended for an executable,
54691f0ac6a5Smrgdnl not a library.  It's possible we should let each
54701f0ac6a5Smrgdnl tag define a new lt_????_link_test_code variable,
54711f0ac6a5Smrgdnl but it's only used here...
54721f0ac6a5Smrgifelse([$1],[],[cat > conftest.$ac_ext <<EOF
54731f0ac6a5Smrgint a;
54741f0ac6a5Smrgvoid foo (void) { a = 0; }
54751f0ac6a5SmrgEOF
54761f0ac6a5Smrg],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
54771f0ac6a5Smrgclass Foo
54781f0ac6a5Smrg{
54791f0ac6a5Smrgpublic:
54801f0ac6a5Smrg  Foo (void) { a = 0; }
54811f0ac6a5Smrgprivate:
54821f0ac6a5Smrg  int a;
54831f0ac6a5Smrg};
54841f0ac6a5SmrgEOF
54851f0ac6a5Smrg],[$1],[F77],[cat > conftest.$ac_ext <<EOF
54861f0ac6a5Smrg      subroutine foo
54871f0ac6a5Smrg      implicit none
54881f0ac6a5Smrg      integer*4 a
54891f0ac6a5Smrg      a=0
54901f0ac6a5Smrg      return
54911f0ac6a5Smrg      end
54921f0ac6a5SmrgEOF
54931f0ac6a5Smrg],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
54941f0ac6a5Smrgpublic class foo {
54951f0ac6a5Smrg  private int a;
54961f0ac6a5Smrg  public void bar (void) {
54971f0ac6a5Smrg    a = 0;
54981f0ac6a5Smrg  }
54991f0ac6a5Smrg};
55001f0ac6a5SmrgEOF
55011f0ac6a5Smrg])
55021f0ac6a5Smrgdnl Parse the compiler output and extract the necessary
55031f0ac6a5Smrgdnl objects, libraries and library flags.
55041f0ac6a5Smrgif AC_TRY_EVAL(ac_compile); then
55051f0ac6a5Smrg  # Parse the compiler output and extract the necessary
55061f0ac6a5Smrg  # objects, libraries and library flags.
55071f0ac6a5Smrg
55081f0ac6a5Smrg  # Sentinel used to keep track of whether or not we are before
55091f0ac6a5Smrg  # the conftest object file.
55101f0ac6a5Smrg  pre_test_object_deps_done=no
55111f0ac6a5Smrg
55121f0ac6a5Smrg  # The `*' in the case matches for architectures that use `case' in
55131f0ac6a5Smrg  # $output_verbose_cmd can trigger glob expansion during the loop
55141f0ac6a5Smrg  # eval without this substitution.
55151f0ac6a5Smrg  output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"`
55161f0ac6a5Smrg
55171f0ac6a5Smrg  for p in `eval $output_verbose_link_cmd`; do
55181f0ac6a5Smrg    case $p in
55191f0ac6a5Smrg
55201f0ac6a5Smrg    -L* | -R* | -l*)
55211f0ac6a5Smrg       # Some compilers place space between "-{L,R}" and the path.
55221f0ac6a5Smrg       # Remove the space.
55231f0ac6a5Smrg       if test $p = "-L" \
55241f0ac6a5Smrg	  || test $p = "-R"; then
55251f0ac6a5Smrg	 prev=$p
55261f0ac6a5Smrg	 continue
55271f0ac6a5Smrg       else
55281f0ac6a5Smrg	 prev=
55291f0ac6a5Smrg       fi
55301f0ac6a5Smrg
55311f0ac6a5Smrg       if test "$pre_test_object_deps_done" = no; then
55321f0ac6a5Smrg	 case $p in
55331f0ac6a5Smrg	 -L* | -R*)
55341f0ac6a5Smrg	   # Internal compiler library paths should come after those
55351f0ac6a5Smrg	   # provided the user.  The postdeps already come after the
55361f0ac6a5Smrg	   # user supplied libs so there is no need to process them.
55371f0ac6a5Smrg	   if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
55381f0ac6a5Smrg	     _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
55391f0ac6a5Smrg	   else
55401f0ac6a5Smrg	     _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
55411f0ac6a5Smrg	   fi
55421f0ac6a5Smrg	   ;;
55431f0ac6a5Smrg	 # The "-l" case would never come before the object being
55441f0ac6a5Smrg	 # linked, so don't bother handling this case.
55451f0ac6a5Smrg	 esac
55461f0ac6a5Smrg       else
55471f0ac6a5Smrg	 if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
55481f0ac6a5Smrg	   _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
55491f0ac6a5Smrg	 else
55501f0ac6a5Smrg	   _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
55511f0ac6a5Smrg	 fi
55521f0ac6a5Smrg       fi
55531f0ac6a5Smrg       ;;
55541f0ac6a5Smrg
55551f0ac6a5Smrg    *.$objext)
55561f0ac6a5Smrg       # This assumes that the test object file only shows up
55571f0ac6a5Smrg       # once in the compiler output.
55581f0ac6a5Smrg       if test "$p" = "conftest.$objext"; then
55591f0ac6a5Smrg	 pre_test_object_deps_done=yes
55601f0ac6a5Smrg	 continue
55611f0ac6a5Smrg       fi
55621f0ac6a5Smrg
55631f0ac6a5Smrg       if test "$pre_test_object_deps_done" = no; then
55641f0ac6a5Smrg	 if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
55651f0ac6a5Smrg	   _LT_AC_TAGVAR(predep_objects, $1)="$p"
55661f0ac6a5Smrg	 else
55671f0ac6a5Smrg	   _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
55681f0ac6a5Smrg	 fi
55691f0ac6a5Smrg       else
55701f0ac6a5Smrg	 if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
55711f0ac6a5Smrg	   _LT_AC_TAGVAR(postdep_objects, $1)="$p"
55721f0ac6a5Smrg	 else
55731f0ac6a5Smrg	   _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
55741f0ac6a5Smrg	 fi
55751f0ac6a5Smrg       fi
55761f0ac6a5Smrg       ;;
55771f0ac6a5Smrg
55781f0ac6a5Smrg    *) ;; # Ignore the rest.
55791f0ac6a5Smrg
55801f0ac6a5Smrg    esac
55811f0ac6a5Smrg  done
55821f0ac6a5Smrg
55831f0ac6a5Smrg  # Clean up.
55841f0ac6a5Smrg  rm -f a.out a.exe
55851f0ac6a5Smrgelse
55861f0ac6a5Smrg  echo "libtool.m4: error: problem compiling $1 test program"
55871f0ac6a5Smrgfi
55881f0ac6a5Smrg
55891f0ac6a5Smrg$rm -f confest.$objext
55901f0ac6a5Smrg
5591e5410a46Smrg_LT_AC_TAGVAR(compiler_lib_search_dirs, $1)=
5592e5410a46Smrgif test -n "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
5593e5410a46Smrg  _LT_AC_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_AC_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
5594e5410a46Smrgfi
5595e5410a46Smrg
55961f0ac6a5Smrg# PORTME: override above test on systems where it is broken
55971f0ac6a5Smrgifelse([$1],[CXX],
55981f0ac6a5Smrg[case $host_os in
5599e5410a46Smrginterix[[3-9]]*)
56001f0ac6a5Smrg  # Interix 3.5 installs completely hosed .la files for C++, so rather than
56011f0ac6a5Smrg  # hack all around it, let's just trust "g++" to DTRT.
56021f0ac6a5Smrg  _LT_AC_TAGVAR(predep_objects,$1)=
56031f0ac6a5Smrg  _LT_AC_TAGVAR(postdep_objects,$1)=
56041f0ac6a5Smrg  _LT_AC_TAGVAR(postdeps,$1)=
56051f0ac6a5Smrg  ;;
56061f0ac6a5Smrg
5607e5410a46Smrglinux*)
5608e5410a46Smrg  case `$CC -V 2>&1 | sed 5q` in
5609e5410a46Smrg  *Sun\ C*)
5610e5410a46Smrg    # Sun C++ 5.9
5611e5410a46Smrg    #
5612e5410a46Smrg    # The more standards-conforming stlport4 library is
5613e5410a46Smrg    # incompatible with the Cstd library. Avoid specifying
5614e5410a46Smrg    # it if it's in CXXFLAGS. Ignore libCrun as
5615e5410a46Smrg    # -library=stlport4 depends on it.
5616e5410a46Smrg    case " $CXX $CXXFLAGS " in
5617e5410a46Smrg    *" -library=stlport4 "*)
5618e5410a46Smrg      solaris_use_stlport4=yes
5619e5410a46Smrg      ;;
5620e5410a46Smrg    esac
5621e5410a46Smrg    if test "$solaris_use_stlport4" != yes; then
5622e5410a46Smrg      _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
5623e5410a46Smrg    fi
5624e5410a46Smrg    ;;
5625e5410a46Smrg  esac
5626e5410a46Smrg  ;;
5627e5410a46Smrg
56281f0ac6a5Smrgsolaris*)
56291f0ac6a5Smrg  case $cc_basename in
56301f0ac6a5Smrg  CC*)
5631e5410a46Smrg    # The more standards-conforming stlport4 library is
5632e5410a46Smrg    # incompatible with the Cstd library. Avoid specifying
5633e5410a46Smrg    # it if it's in CXXFLAGS. Ignore libCrun as
5634e5410a46Smrg    # -library=stlport4 depends on it.
5635e5410a46Smrg    case " $CXX $CXXFLAGS " in
5636e5410a46Smrg    *" -library=stlport4 "*)
5637e5410a46Smrg      solaris_use_stlport4=yes
5638e5410a46Smrg      ;;
5639e5410a46Smrg    esac
5640e5410a46Smrg
56411f0ac6a5Smrg    # Adding this requires a known-good setup of shared libraries for
56421f0ac6a5Smrg    # Sun compiler versions before 5.6, else PIC objects from an old
56431f0ac6a5Smrg    # archive will be linked into the output, leading to subtle bugs.
5644e5410a46Smrg    if test "$solaris_use_stlport4" != yes; then
5645e5410a46Smrg      _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
5646e5410a46Smrg    fi
56471f0ac6a5Smrg    ;;
56481f0ac6a5Smrg  esac
56491f0ac6a5Smrg  ;;
56501f0ac6a5Smrgesac
56511f0ac6a5Smrg])
56521f0ac6a5Smrgcase " $_LT_AC_TAGVAR(postdeps, $1) " in
56531f0ac6a5Smrg*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
56541f0ac6a5Smrgesac
56551f0ac6a5Smrg])# AC_LIBTOOL_POSTDEP_PREDEP
56561f0ac6a5Smrg
56571f0ac6a5Smrg# AC_LIBTOOL_LANG_F77_CONFIG
56581f0ac6a5Smrg# --------------------------
56591f0ac6a5Smrg# Ensure that the configuration vars for the C compiler are
56601f0ac6a5Smrg# suitably defined.  Those variables are subsequently used by
56611f0ac6a5Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
56621f0ac6a5SmrgAC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
56631f0ac6a5SmrgAC_DEFUN([_LT_AC_LANG_F77_CONFIG],
56641f0ac6a5Smrg[AC_REQUIRE([AC_PROG_F77])
56651f0ac6a5SmrgAC_LANG_PUSH(Fortran 77)
56661f0ac6a5Smrg
56671f0ac6a5Smrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
56681f0ac6a5Smrg_LT_AC_TAGVAR(allow_undefined_flag, $1)=
56691f0ac6a5Smrg_LT_AC_TAGVAR(always_export_symbols, $1)=no
56701f0ac6a5Smrg_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
56711f0ac6a5Smrg_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
56721f0ac6a5Smrg_LT_AC_TAGVAR(hardcode_direct, $1)=no
56731f0ac6a5Smrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
56741f0ac6a5Smrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
56751f0ac6a5Smrg_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
56761f0ac6a5Smrg_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
56771f0ac6a5Smrg_LT_AC_TAGVAR(hardcode_automatic, $1)=no
56781f0ac6a5Smrg_LT_AC_TAGVAR(module_cmds, $1)=
56791f0ac6a5Smrg_LT_AC_TAGVAR(module_expsym_cmds, $1)=
56801f0ac6a5Smrg_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
56811f0ac6a5Smrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
56821f0ac6a5Smrg_LT_AC_TAGVAR(no_undefined_flag, $1)=
56831f0ac6a5Smrg_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
56841f0ac6a5Smrg_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
56851f0ac6a5Smrg
56861f0ac6a5Smrg# Source file extension for f77 test sources.
56871f0ac6a5Smrgac_ext=f
56881f0ac6a5Smrg
56891f0ac6a5Smrg# Object file extension for compiled f77 test sources.
56901f0ac6a5Smrgobjext=o
56911f0ac6a5Smrg_LT_AC_TAGVAR(objext, $1)=$objext
56921f0ac6a5Smrg
56931f0ac6a5Smrg# Code to be used in simple compile tests
5694e5410a46Smrglt_simple_compile_test_code="\
5695e5410a46Smrg      subroutine t
5696e5410a46Smrg      return
5697e5410a46Smrg      end
5698e5410a46Smrg"
56991f0ac6a5Smrg
57001f0ac6a5Smrg# Code to be used in simple link tests
5701e5410a46Smrglt_simple_link_test_code="\
5702e5410a46Smrg      program t
5703e5410a46Smrg      end
5704e5410a46Smrg"
57051f0ac6a5Smrg
57061f0ac6a5Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
57071f0ac6a5Smrg_LT_AC_SYS_COMPILER
57081f0ac6a5Smrg
57091f0ac6a5Smrg# save warnings/boilerplate of simple test code
57101f0ac6a5Smrg_LT_COMPILER_BOILERPLATE
57111f0ac6a5Smrg_LT_LINKER_BOILERPLATE
57121f0ac6a5Smrg
57131f0ac6a5Smrg# Allow CC to be a program name with arguments.
57141f0ac6a5Smrglt_save_CC="$CC"
57151f0ac6a5SmrgCC=${F77-"f77"}
57161f0ac6a5Smrgcompiler=$CC
57171f0ac6a5Smrg_LT_AC_TAGVAR(compiler, $1)=$CC
57181f0ac6a5Smrg_LT_CC_BASENAME([$compiler])
57191f0ac6a5Smrg
57201f0ac6a5SmrgAC_MSG_CHECKING([if libtool supports shared libraries])
57211f0ac6a5SmrgAC_MSG_RESULT([$can_build_shared])
57221f0ac6a5Smrg
57231f0ac6a5SmrgAC_MSG_CHECKING([whether to build shared libraries])
57241f0ac6a5Smrgtest "$can_build_shared" = "no" && enable_shared=no
57251f0ac6a5Smrg
57261f0ac6a5Smrg# On AIX, shared libraries and static libraries use the same namespace, and
57271f0ac6a5Smrg# are all built from PIC.
57281f0ac6a5Smrgcase $host_os in
57291f0ac6a5Smrgaix3*)
57301f0ac6a5Smrg  test "$enable_shared" = yes && enable_static=no
57311f0ac6a5Smrg  if test -n "$RANLIB"; then
57321f0ac6a5Smrg    archive_cmds="$archive_cmds~\$RANLIB \$lib"
57331f0ac6a5Smrg    postinstall_cmds='$RANLIB $lib'
57341f0ac6a5Smrg  fi
57351f0ac6a5Smrg  ;;
5736e5410a46Smrgaix[[4-9]]*)
57371f0ac6a5Smrg  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
57381f0ac6a5Smrg    test "$enable_shared" = yes && enable_static=no
57391f0ac6a5Smrg  fi
57401f0ac6a5Smrg  ;;
57411f0ac6a5Smrgesac
57421f0ac6a5SmrgAC_MSG_RESULT([$enable_shared])
57431f0ac6a5Smrg
57441f0ac6a5SmrgAC_MSG_CHECKING([whether to build static libraries])
57451f0ac6a5Smrg# Make sure either enable_shared or enable_static is yes.
57461f0ac6a5Smrgtest "$enable_shared" = yes || enable_static=yes
57471f0ac6a5SmrgAC_MSG_RESULT([$enable_static])
57481f0ac6a5Smrg
57491f0ac6a5Smrg_LT_AC_TAGVAR(GCC, $1)="$G77"
57501f0ac6a5Smrg_LT_AC_TAGVAR(LD, $1)="$LD"
57511f0ac6a5Smrg
57521f0ac6a5SmrgAC_LIBTOOL_PROG_COMPILER_PIC($1)
57531f0ac6a5SmrgAC_LIBTOOL_PROG_CC_C_O($1)
57541f0ac6a5SmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
57551f0ac6a5SmrgAC_LIBTOOL_PROG_LD_SHLIBS($1)
57561f0ac6a5SmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
57571f0ac6a5SmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
57581f0ac6a5Smrg
57591f0ac6a5SmrgAC_LIBTOOL_CONFIG($1)
57601f0ac6a5Smrg
57611f0ac6a5SmrgAC_LANG_POP
57621f0ac6a5SmrgCC="$lt_save_CC"
57631f0ac6a5Smrg])# AC_LIBTOOL_LANG_F77_CONFIG
57641f0ac6a5Smrg
57651f0ac6a5Smrg
57661f0ac6a5Smrg# AC_LIBTOOL_LANG_GCJ_CONFIG
57671f0ac6a5Smrg# --------------------------
57681f0ac6a5Smrg# Ensure that the configuration vars for the C compiler are
57691f0ac6a5Smrg# suitably defined.  Those variables are subsequently used by
57701f0ac6a5Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
57711f0ac6a5SmrgAC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
57721f0ac6a5SmrgAC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
57731f0ac6a5Smrg[AC_LANG_SAVE
57741f0ac6a5Smrg
57751f0ac6a5Smrg# Source file extension for Java test sources.
57761f0ac6a5Smrgac_ext=java
57771f0ac6a5Smrg
57781f0ac6a5Smrg# Object file extension for compiled Java test sources.
57791f0ac6a5Smrgobjext=o
57801f0ac6a5Smrg_LT_AC_TAGVAR(objext, $1)=$objext
57811f0ac6a5Smrg
57821f0ac6a5Smrg# Code to be used in simple compile tests
5783e5410a46Smrglt_simple_compile_test_code="class foo {}"
57841f0ac6a5Smrg
57851f0ac6a5Smrg# Code to be used in simple link tests
5786e5410a46Smrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
57871f0ac6a5Smrg
57881f0ac6a5Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
57891f0ac6a5Smrg_LT_AC_SYS_COMPILER
57901f0ac6a5Smrg
57911f0ac6a5Smrg# save warnings/boilerplate of simple test code
57921f0ac6a5Smrg_LT_COMPILER_BOILERPLATE
57931f0ac6a5Smrg_LT_LINKER_BOILERPLATE
57941f0ac6a5Smrg
57951f0ac6a5Smrg# Allow CC to be a program name with arguments.
57961f0ac6a5Smrglt_save_CC="$CC"
57971f0ac6a5SmrgCC=${GCJ-"gcj"}
57981f0ac6a5Smrgcompiler=$CC
57991f0ac6a5Smrg_LT_AC_TAGVAR(compiler, $1)=$CC
58001f0ac6a5Smrg_LT_CC_BASENAME([$compiler])
58011f0ac6a5Smrg
58021f0ac6a5Smrg# GCJ did not exist at the time GCC didn't implicitly link libc in.
58031f0ac6a5Smrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
58041f0ac6a5Smrg
58051f0ac6a5Smrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
58061f0ac6a5Smrg
58071f0ac6a5SmrgAC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
58081f0ac6a5SmrgAC_LIBTOOL_PROG_COMPILER_PIC($1)
58091f0ac6a5SmrgAC_LIBTOOL_PROG_CC_C_O($1)
58101f0ac6a5SmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
58111f0ac6a5SmrgAC_LIBTOOL_PROG_LD_SHLIBS($1)
58121f0ac6a5SmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
58131f0ac6a5SmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
58141f0ac6a5Smrg
58151f0ac6a5SmrgAC_LIBTOOL_CONFIG($1)
58161f0ac6a5Smrg
58171f0ac6a5SmrgAC_LANG_RESTORE
58181f0ac6a5SmrgCC="$lt_save_CC"
58191f0ac6a5Smrg])# AC_LIBTOOL_LANG_GCJ_CONFIG
58201f0ac6a5Smrg
58211f0ac6a5Smrg
58221f0ac6a5Smrg# AC_LIBTOOL_LANG_RC_CONFIG
58231f0ac6a5Smrg# -------------------------
58241f0ac6a5Smrg# Ensure that the configuration vars for the Windows resource compiler are
58251f0ac6a5Smrg# suitably defined.  Those variables are subsequently used by
58261f0ac6a5Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
58271f0ac6a5SmrgAC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
58281f0ac6a5SmrgAC_DEFUN([_LT_AC_LANG_RC_CONFIG],
58291f0ac6a5Smrg[AC_LANG_SAVE
58301f0ac6a5Smrg
58311f0ac6a5Smrg# Source file extension for RC test sources.
58321f0ac6a5Smrgac_ext=rc
58331f0ac6a5Smrg
58341f0ac6a5Smrg# Object file extension for compiled RC test sources.
58351f0ac6a5Smrgobjext=o
58361f0ac6a5Smrg_LT_AC_TAGVAR(objext, $1)=$objext
58371f0ac6a5Smrg
58381f0ac6a5Smrg# Code to be used in simple compile tests
5839e5410a46Smrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
58401f0ac6a5Smrg
58411f0ac6a5Smrg# Code to be used in simple link tests
58421f0ac6a5Smrglt_simple_link_test_code="$lt_simple_compile_test_code"
58431f0ac6a5Smrg
58441f0ac6a5Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
58451f0ac6a5Smrg_LT_AC_SYS_COMPILER
58461f0ac6a5Smrg
58471f0ac6a5Smrg# save warnings/boilerplate of simple test code
58481f0ac6a5Smrg_LT_COMPILER_BOILERPLATE
58491f0ac6a5Smrg_LT_LINKER_BOILERPLATE
58501f0ac6a5Smrg
58511f0ac6a5Smrg# Allow CC to be a program name with arguments.
58521f0ac6a5Smrglt_save_CC="$CC"
58531f0ac6a5SmrgCC=${RC-"windres"}
58541f0ac6a5Smrgcompiler=$CC
58551f0ac6a5Smrg_LT_AC_TAGVAR(compiler, $1)=$CC
58561f0ac6a5Smrg_LT_CC_BASENAME([$compiler])
58571f0ac6a5Smrg_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
58581f0ac6a5Smrg
58591f0ac6a5SmrgAC_LIBTOOL_CONFIG($1)
58601f0ac6a5Smrg
58611f0ac6a5SmrgAC_LANG_RESTORE
58621f0ac6a5SmrgCC="$lt_save_CC"
58631f0ac6a5Smrg])# AC_LIBTOOL_LANG_RC_CONFIG
58641f0ac6a5Smrg
58651f0ac6a5Smrg
58661f0ac6a5Smrg# AC_LIBTOOL_CONFIG([TAGNAME])
58671f0ac6a5Smrg# ----------------------------
58681f0ac6a5Smrg# If TAGNAME is not passed, then create an initial libtool script
58691f0ac6a5Smrg# with a default configuration from the untagged config vars.  Otherwise
58701f0ac6a5Smrg# add code to config.status for appending the configuration named by
58711f0ac6a5Smrg# TAGNAME from the matching tagged config vars.
58721f0ac6a5SmrgAC_DEFUN([AC_LIBTOOL_CONFIG],
58731f0ac6a5Smrg[# The else clause should only fire when bootstrapping the
58741f0ac6a5Smrg# libtool distribution, otherwise you forgot to ship ltmain.sh
58751f0ac6a5Smrg# with your package, and you will get complaints that there are
58761f0ac6a5Smrg# no rules to generate ltmain.sh.
58771f0ac6a5Smrgif test -f "$ltmain"; then
58781f0ac6a5Smrg  # See if we are running on zsh, and set the options which allow our commands through
58791f0ac6a5Smrg  # without removal of \ escapes.
58801f0ac6a5Smrg  if test -n "${ZSH_VERSION+set}" ; then
58811f0ac6a5Smrg    setopt NO_GLOB_SUBST
58821f0ac6a5Smrg  fi
58831f0ac6a5Smrg  # Now quote all the things that may contain metacharacters while being
58841f0ac6a5Smrg  # careful not to overquote the AC_SUBSTed values.  We take copies of the
58851f0ac6a5Smrg  # variables and quote the copies for generation of the libtool script.
58861f0ac6a5Smrg  for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
58871f0ac6a5Smrg    SED SHELL STRIP \
58881f0ac6a5Smrg    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
58891f0ac6a5Smrg    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
58901f0ac6a5Smrg    deplibs_check_method reload_flag reload_cmds need_locks \
58911f0ac6a5Smrg    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
58921f0ac6a5Smrg    lt_cv_sys_global_symbol_to_c_name_address \
58931f0ac6a5Smrg    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
58941f0ac6a5Smrg    old_postinstall_cmds old_postuninstall_cmds \
58951f0ac6a5Smrg    _LT_AC_TAGVAR(compiler, $1) \
58961f0ac6a5Smrg    _LT_AC_TAGVAR(CC, $1) \
58971f0ac6a5Smrg    _LT_AC_TAGVAR(LD, $1) \
58981f0ac6a5Smrg    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
58991f0ac6a5Smrg    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
59001f0ac6a5Smrg    _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
59011f0ac6a5Smrg    _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
59021f0ac6a5Smrg    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
59031f0ac6a5Smrg    _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
59041f0ac6a5Smrg    _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
59051f0ac6a5Smrg    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
59061f0ac6a5Smrg    _LT_AC_TAGVAR(old_archive_cmds, $1) \
59071f0ac6a5Smrg    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
59081f0ac6a5Smrg    _LT_AC_TAGVAR(predep_objects, $1) \
59091f0ac6a5Smrg    _LT_AC_TAGVAR(postdep_objects, $1) \
59101f0ac6a5Smrg    _LT_AC_TAGVAR(predeps, $1) \
59111f0ac6a5Smrg    _LT_AC_TAGVAR(postdeps, $1) \
59121f0ac6a5Smrg    _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
5913e5410a46Smrg    _LT_AC_TAGVAR(compiler_lib_search_dirs, $1) \
59141f0ac6a5Smrg    _LT_AC_TAGVAR(archive_cmds, $1) \
59151f0ac6a5Smrg    _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
59161f0ac6a5Smrg    _LT_AC_TAGVAR(postinstall_cmds, $1) \
59171f0ac6a5Smrg    _LT_AC_TAGVAR(postuninstall_cmds, $1) \
59181f0ac6a5Smrg    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
59191f0ac6a5Smrg    _LT_AC_TAGVAR(allow_undefined_flag, $1) \
59201f0ac6a5Smrg    _LT_AC_TAGVAR(no_undefined_flag, $1) \
59211f0ac6a5Smrg    _LT_AC_TAGVAR(export_symbols_cmds, $1) \
59221f0ac6a5Smrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
59231f0ac6a5Smrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
59241f0ac6a5Smrg    _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
59251f0ac6a5Smrg    _LT_AC_TAGVAR(hardcode_automatic, $1) \
59261f0ac6a5Smrg    _LT_AC_TAGVAR(module_cmds, $1) \
59271f0ac6a5Smrg    _LT_AC_TAGVAR(module_expsym_cmds, $1) \
59281f0ac6a5Smrg    _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
5929e5410a46Smrg    _LT_AC_TAGVAR(fix_srcfile_path, $1) \
59301f0ac6a5Smrg    _LT_AC_TAGVAR(exclude_expsyms, $1) \
59311f0ac6a5Smrg    _LT_AC_TAGVAR(include_expsyms, $1); do
59321f0ac6a5Smrg
59331f0ac6a5Smrg    case $var in
59341f0ac6a5Smrg    _LT_AC_TAGVAR(old_archive_cmds, $1) | \
59351f0ac6a5Smrg    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
59361f0ac6a5Smrg    _LT_AC_TAGVAR(archive_cmds, $1) | \
59371f0ac6a5Smrg    _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
59381f0ac6a5Smrg    _LT_AC_TAGVAR(module_cmds, $1) | \
59391f0ac6a5Smrg    _LT_AC_TAGVAR(module_expsym_cmds, $1) | \
59401f0ac6a5Smrg    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
59411f0ac6a5Smrg    _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
59421f0ac6a5Smrg    extract_expsyms_cmds | reload_cmds | finish_cmds | \
59431f0ac6a5Smrg    postinstall_cmds | postuninstall_cmds | \
59441f0ac6a5Smrg    old_postinstall_cmds | old_postuninstall_cmds | \
59451f0ac6a5Smrg    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
59461f0ac6a5Smrg      # Double-quote double-evaled strings.
59471f0ac6a5Smrg      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
59481f0ac6a5Smrg      ;;
59491f0ac6a5Smrg    *)
59501f0ac6a5Smrg      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
59511f0ac6a5Smrg      ;;
59521f0ac6a5Smrg    esac
59531f0ac6a5Smrg  done
59541f0ac6a5Smrg
59551f0ac6a5Smrg  case $lt_echo in
59561f0ac6a5Smrg  *'\[$]0 --fallback-echo"')
59571f0ac6a5Smrg    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
59581f0ac6a5Smrg    ;;
59591f0ac6a5Smrg  esac
59601f0ac6a5Smrg
59611f0ac6a5Smrgifelse([$1], [],
59621f0ac6a5Smrg  [cfgfile="${ofile}T"
59631f0ac6a5Smrg  trap "$rm \"$cfgfile\"; exit 1" 1 2 15
59641f0ac6a5Smrg  $rm -f "$cfgfile"
59651f0ac6a5Smrg  AC_MSG_NOTICE([creating $ofile])],
59661f0ac6a5Smrg  [cfgfile="$ofile"])
59671f0ac6a5Smrg
59681f0ac6a5Smrg  cat <<__EOF__ >> "$cfgfile"
59691f0ac6a5Smrgifelse([$1], [],
59701f0ac6a5Smrg[#! $SHELL
59711f0ac6a5Smrg
59721f0ac6a5Smrg# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
59731f0ac6a5Smrg# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
59741f0ac6a5Smrg# NOTE: Changes made to this file will be lost: look at ltmain.sh.
59751f0ac6a5Smrg#
5976e5410a46Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
59771f0ac6a5Smrg# Free Software Foundation, Inc.
59781f0ac6a5Smrg#
59791f0ac6a5Smrg# This file is part of GNU Libtool:
59801f0ac6a5Smrg# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
59811f0ac6a5Smrg#
59821f0ac6a5Smrg# This program is free software; you can redistribute it and/or modify
59831f0ac6a5Smrg# it under the terms of the GNU General Public License as published by
59841f0ac6a5Smrg# the Free Software Foundation; either version 2 of the License, or
59851f0ac6a5Smrg# (at your option) any later version.
59861f0ac6a5Smrg#
59871f0ac6a5Smrg# This program is distributed in the hope that it will be useful, but
59881f0ac6a5Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of
59891f0ac6a5Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
59901f0ac6a5Smrg# General Public License for more details.
59911f0ac6a5Smrg#
59921f0ac6a5Smrg# You should have received a copy of the GNU General Public License
59931f0ac6a5Smrg# along with this program; if not, write to the Free Software
59941f0ac6a5Smrg# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
59951f0ac6a5Smrg#
59961f0ac6a5Smrg# As a special exception to the GNU General Public License, if you
59971f0ac6a5Smrg# distribute this file as part of a program that contains a
59981f0ac6a5Smrg# configuration script generated by Autoconf, you may include it under
59991f0ac6a5Smrg# the same distribution terms that you use for the rest of that program.
60001f0ac6a5Smrg
60011f0ac6a5Smrg# A sed program that does not truncate output.
60021f0ac6a5SmrgSED=$lt_SED
60031f0ac6a5Smrg
60041f0ac6a5Smrg# Sed that helps us avoid accidentally triggering echo(1) options like -n.
60051f0ac6a5SmrgXsed="$SED -e 1s/^X//"
60061f0ac6a5Smrg
60071f0ac6a5Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout
60081f0ac6a5Smrg# if CDPATH is set.
60091f0ac6a5Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
60101f0ac6a5Smrg
60111f0ac6a5Smrg# The names of the tagged configurations supported by this script.
60121f0ac6a5Smrgavailable_tags=
60131f0ac6a5Smrg
60141f0ac6a5Smrg# ### BEGIN LIBTOOL CONFIG],
60151f0ac6a5Smrg[# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
60161f0ac6a5Smrg
60171f0ac6a5Smrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
60181f0ac6a5Smrg
60191f0ac6a5Smrg# Shell to use when invoking shell scripts.
60201f0ac6a5SmrgSHELL=$lt_SHELL
60211f0ac6a5Smrg
60221f0ac6a5Smrg# Whether or not to build shared libraries.
60231f0ac6a5Smrgbuild_libtool_libs=$enable_shared
60241f0ac6a5Smrg
60251f0ac6a5Smrg# Whether or not to build static libraries.
60261f0ac6a5Smrgbuild_old_libs=$enable_static
60271f0ac6a5Smrg
60281f0ac6a5Smrg# Whether or not to add -lc for building shared libraries.
60291f0ac6a5Smrgbuild_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
60301f0ac6a5Smrg
60311f0ac6a5Smrg# Whether or not to disallow shared libs when runtime libs are static
60321f0ac6a5Smrgallow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
60331f0ac6a5Smrg
60341f0ac6a5Smrg# Whether or not to optimize for fast installation.
60351f0ac6a5Smrgfast_install=$enable_fast_install
60361f0ac6a5Smrg
60371f0ac6a5Smrg# The host system.
60381f0ac6a5Smrghost_alias=$host_alias
60391f0ac6a5Smrghost=$host
60401f0ac6a5Smrghost_os=$host_os
60411f0ac6a5Smrg
60421f0ac6a5Smrg# The build system.
60431f0ac6a5Smrgbuild_alias=$build_alias
60441f0ac6a5Smrgbuild=$build
60451f0ac6a5Smrgbuild_os=$build_os
60461f0ac6a5Smrg
60471f0ac6a5Smrg# An echo program that does not interpret backslashes.
60481f0ac6a5Smrgecho=$lt_echo
60491f0ac6a5Smrg
60501f0ac6a5Smrg# The archiver.
60511f0ac6a5SmrgAR=$lt_AR
60521f0ac6a5SmrgAR_FLAGS=$lt_AR_FLAGS
60531f0ac6a5Smrg
60541f0ac6a5Smrg# A C compiler.
60551f0ac6a5SmrgLTCC=$lt_LTCC
60561f0ac6a5Smrg
60571f0ac6a5Smrg# LTCC compiler flags.
60581f0ac6a5SmrgLTCFLAGS=$lt_LTCFLAGS
60591f0ac6a5Smrg
60601f0ac6a5Smrg# A language-specific compiler.
60611f0ac6a5SmrgCC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
60621f0ac6a5Smrg
60631f0ac6a5Smrg# Is the compiler the GNU C compiler?
60641f0ac6a5Smrgwith_gcc=$_LT_AC_TAGVAR(GCC, $1)
60651f0ac6a5Smrg
60661f0ac6a5Smrg# An ERE matcher.
60671f0ac6a5SmrgEGREP=$lt_EGREP
60681f0ac6a5Smrg
60691f0ac6a5Smrg# The linker used to build libraries.
60701f0ac6a5SmrgLD=$lt_[]_LT_AC_TAGVAR(LD, $1)
60711f0ac6a5Smrg
60721f0ac6a5Smrg# Whether we need hard or soft links.
60731f0ac6a5SmrgLN_S=$lt_LN_S
60741f0ac6a5Smrg
60751f0ac6a5Smrg# A BSD-compatible nm program.
60761f0ac6a5SmrgNM=$lt_NM
60771f0ac6a5Smrg
60781f0ac6a5Smrg# A symbol stripping program
60791f0ac6a5SmrgSTRIP=$lt_STRIP
60801f0ac6a5Smrg
60811f0ac6a5Smrg# Used to examine libraries when file_magic_cmd begins "file"
60821f0ac6a5SmrgMAGIC_CMD=$MAGIC_CMD
60831f0ac6a5Smrg
60841f0ac6a5Smrg# Used on cygwin: DLL creation program.
60851f0ac6a5SmrgDLLTOOL="$DLLTOOL"
60861f0ac6a5Smrg
60871f0ac6a5Smrg# Used on cygwin: object dumper.
60881f0ac6a5SmrgOBJDUMP="$OBJDUMP"
60891f0ac6a5Smrg
60901f0ac6a5Smrg# Used on cygwin: assembler.
60911f0ac6a5SmrgAS="$AS"
60921f0ac6a5Smrg
60931f0ac6a5Smrg# The name of the directory that contains temporary libtool files.
60941f0ac6a5Smrgobjdir=$objdir
60951f0ac6a5Smrg
60961f0ac6a5Smrg# How to create reloadable object files.
60971f0ac6a5Smrgreload_flag=$lt_reload_flag
60981f0ac6a5Smrgreload_cmds=$lt_reload_cmds
60991f0ac6a5Smrg
61001f0ac6a5Smrg# How to pass a linker flag through the compiler.
61011f0ac6a5Smrgwl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
61021f0ac6a5Smrg
61031f0ac6a5Smrg# Object file suffix (normally "o").
61041f0ac6a5Smrgobjext="$ac_objext"
61051f0ac6a5Smrg
61061f0ac6a5Smrg# Old archive suffix (normally "a").
61071f0ac6a5Smrglibext="$libext"
61081f0ac6a5Smrg
61091f0ac6a5Smrg# Shared library suffix (normally ".so").
61101f0ac6a5Smrgshrext_cmds='$shrext_cmds'
61111f0ac6a5Smrg
61121f0ac6a5Smrg# Executable file suffix (normally "").
61131f0ac6a5Smrgexeext="$exeext"
61141f0ac6a5Smrg
61151f0ac6a5Smrg# Additional compiler flags for building library objects.
61161f0ac6a5Smrgpic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
61171f0ac6a5Smrgpic_mode=$pic_mode
61181f0ac6a5Smrg
61191f0ac6a5Smrg# What is the maximum length of a command?
61201f0ac6a5Smrgmax_cmd_len=$lt_cv_sys_max_cmd_len
61211f0ac6a5Smrg
61221f0ac6a5Smrg# Does compiler simultaneously support -c and -o options?
61231f0ac6a5Smrgcompiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
61241f0ac6a5Smrg
61251f0ac6a5Smrg# Must we lock files when doing compilation?
61261f0ac6a5Smrgneed_locks=$lt_need_locks
61271f0ac6a5Smrg
61281f0ac6a5Smrg# Do we need the lib prefix for modules?
61291f0ac6a5Smrgneed_lib_prefix=$need_lib_prefix
61301f0ac6a5Smrg
61311f0ac6a5Smrg# Do we need a version for libraries?
61321f0ac6a5Smrgneed_version=$need_version
61331f0ac6a5Smrg
61341f0ac6a5Smrg# Whether dlopen is supported.
61351f0ac6a5Smrgdlopen_support=$enable_dlopen
61361f0ac6a5Smrg
61371f0ac6a5Smrg# Whether dlopen of programs is supported.
61381f0ac6a5Smrgdlopen_self=$enable_dlopen_self
61391f0ac6a5Smrg
61401f0ac6a5Smrg# Whether dlopen of statically linked programs is supported.
61411f0ac6a5Smrgdlopen_self_static=$enable_dlopen_self_static
61421f0ac6a5Smrg
61431f0ac6a5Smrg# Compiler flag to prevent dynamic linking.
61441f0ac6a5Smrglink_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
61451f0ac6a5Smrg
61461f0ac6a5Smrg# Compiler flag to turn off builtin functions.
61471f0ac6a5Smrgno_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
61481f0ac6a5Smrg
61491f0ac6a5Smrg# Compiler flag to allow reflexive dlopens.
61501f0ac6a5Smrgexport_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
61511f0ac6a5Smrg
61521f0ac6a5Smrg# Compiler flag to generate shared objects directly from archives.
61531f0ac6a5Smrgwhole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
61541f0ac6a5Smrg
61551f0ac6a5Smrg# Compiler flag to generate thread-safe objects.
61561f0ac6a5Smrgthread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
61571f0ac6a5Smrg
61581f0ac6a5Smrg# Library versioning type.
61591f0ac6a5Smrgversion_type=$version_type
61601f0ac6a5Smrg
61611f0ac6a5Smrg# Format of library name prefix.
61621f0ac6a5Smrglibname_spec=$lt_libname_spec
61631f0ac6a5Smrg
61641f0ac6a5Smrg# List of archive names.  First name is the real one, the rest are links.
61651f0ac6a5Smrg# The last name is the one that the linker finds with -lNAME.
61661f0ac6a5Smrglibrary_names_spec=$lt_library_names_spec
61671f0ac6a5Smrg
61681f0ac6a5Smrg# The coded name of the library, if different from the real name.
61691f0ac6a5Smrgsoname_spec=$lt_soname_spec
61701f0ac6a5Smrg
61711f0ac6a5Smrg# Commands used to build and install an old-style archive.
61721f0ac6a5SmrgRANLIB=$lt_RANLIB
61731f0ac6a5Smrgold_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
61741f0ac6a5Smrgold_postinstall_cmds=$lt_old_postinstall_cmds
61751f0ac6a5Smrgold_postuninstall_cmds=$lt_old_postuninstall_cmds
61761f0ac6a5Smrg
61771f0ac6a5Smrg# Create an old-style archive from a shared archive.
61781f0ac6a5Smrgold_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
61791f0ac6a5Smrg
61801f0ac6a5Smrg# Create a temporary old-style archive to link instead of a shared archive.
61811f0ac6a5Smrgold_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
61821f0ac6a5Smrg
61831f0ac6a5Smrg# Commands used to build and install a shared archive.
61841f0ac6a5Smrgarchive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
61851f0ac6a5Smrgarchive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
61861f0ac6a5Smrgpostinstall_cmds=$lt_postinstall_cmds
61871f0ac6a5Smrgpostuninstall_cmds=$lt_postuninstall_cmds
61881f0ac6a5Smrg
61891f0ac6a5Smrg# Commands used to build a loadable module (assumed same as above if empty)
61901f0ac6a5Smrgmodule_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
61911f0ac6a5Smrgmodule_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
61921f0ac6a5Smrg
61931f0ac6a5Smrg# Commands to strip libraries.
61941f0ac6a5Smrgold_striplib=$lt_old_striplib
61951f0ac6a5Smrgstriplib=$lt_striplib
61961f0ac6a5Smrg
61971f0ac6a5Smrg# Dependencies to place before the objects being linked to create a
61981f0ac6a5Smrg# shared library.
61991f0ac6a5Smrgpredep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
62001f0ac6a5Smrg
62011f0ac6a5Smrg# Dependencies to place after the objects being linked to create a
62021f0ac6a5Smrg# shared library.
62031f0ac6a5Smrgpostdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
62041f0ac6a5Smrg
62051f0ac6a5Smrg# Dependencies to place before the objects being linked to create a
62061f0ac6a5Smrg# shared library.
62071f0ac6a5Smrgpredeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
62081f0ac6a5Smrg
62091f0ac6a5Smrg# Dependencies to place after the objects being linked to create a
62101f0ac6a5Smrg# shared library.
62111f0ac6a5Smrgpostdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
62121f0ac6a5Smrg
6213e5410a46Smrg# The directories searched by this compiler when creating a shared
6214e5410a46Smrg# library
6215e5410a46Smrgcompiler_lib_search_dirs=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_dirs, $1)
6216e5410a46Smrg
62171f0ac6a5Smrg# The library search path used internally by the compiler when linking
62181f0ac6a5Smrg# a shared library.
62191f0ac6a5Smrgcompiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
62201f0ac6a5Smrg
62211f0ac6a5Smrg# Method to check whether dependent libraries are shared objects.
62221f0ac6a5Smrgdeplibs_check_method=$lt_deplibs_check_method
62231f0ac6a5Smrg
62241f0ac6a5Smrg# Command to use when deplibs_check_method == file_magic.
62251f0ac6a5Smrgfile_magic_cmd=$lt_file_magic_cmd
62261f0ac6a5Smrg
62271f0ac6a5Smrg# Flag that allows shared libraries with undefined symbols to be built.
62281f0ac6a5Smrgallow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
62291f0ac6a5Smrg
62301f0ac6a5Smrg# Flag that forces no undefined symbols.
62311f0ac6a5Smrgno_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
62321f0ac6a5Smrg
62331f0ac6a5Smrg# Commands used to finish a libtool library installation in a directory.
62341f0ac6a5Smrgfinish_cmds=$lt_finish_cmds
62351f0ac6a5Smrg
62361f0ac6a5Smrg# Same as above, but a single script fragment to be evaled but not shown.
62371f0ac6a5Smrgfinish_eval=$lt_finish_eval
62381f0ac6a5Smrg
62391f0ac6a5Smrg# Take the output of nm and produce a listing of raw symbols and C names.
62401f0ac6a5Smrgglobal_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
62411f0ac6a5Smrg
62421f0ac6a5Smrg# Transform the output of nm in a proper C declaration
62431f0ac6a5Smrgglobal_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
62441f0ac6a5Smrg
62451f0ac6a5Smrg# Transform the output of nm in a C name address pair
62461f0ac6a5Smrgglobal_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
62471f0ac6a5Smrg
62481f0ac6a5Smrg# This is the shared library runtime path variable.
62491f0ac6a5Smrgrunpath_var=$runpath_var
62501f0ac6a5Smrg
62511f0ac6a5Smrg# This is the shared library path variable.
62521f0ac6a5Smrgshlibpath_var=$shlibpath_var
62531f0ac6a5Smrg
62541f0ac6a5Smrg# Is shlibpath searched before the hard-coded library search path?
62551f0ac6a5Smrgshlibpath_overrides_runpath=$shlibpath_overrides_runpath
62561f0ac6a5Smrg
62571f0ac6a5Smrg# How to hardcode a shared library path into an executable.
62581f0ac6a5Smrghardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
62591f0ac6a5Smrg
62601f0ac6a5Smrg# Whether we should hardcode library paths into libraries.
62611f0ac6a5Smrghardcode_into_libs=$hardcode_into_libs
62621f0ac6a5Smrg
62631f0ac6a5Smrg# Flag to hardcode \$libdir into a binary during linking.
62641f0ac6a5Smrg# This must work even if \$libdir does not exist.
62651f0ac6a5Smrghardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
62661f0ac6a5Smrg
62671f0ac6a5Smrg# If ld is used when linking, flag to hardcode \$libdir into
62681f0ac6a5Smrg# a binary during linking. This must work even if \$libdir does
62691f0ac6a5Smrg# not exist.
62701f0ac6a5Smrghardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
62711f0ac6a5Smrg
62721f0ac6a5Smrg# Whether we need a single -rpath flag with a separated argument.
62731f0ac6a5Smrghardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
62741f0ac6a5Smrg
62751f0ac6a5Smrg# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
62761f0ac6a5Smrg# resulting binary.
62771f0ac6a5Smrghardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
62781f0ac6a5Smrg
62791f0ac6a5Smrg# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
62801f0ac6a5Smrg# resulting binary.
62811f0ac6a5Smrghardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
62821f0ac6a5Smrg
62831f0ac6a5Smrg# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
62841f0ac6a5Smrg# the resulting binary.
62851f0ac6a5Smrghardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
62861f0ac6a5Smrg
62871f0ac6a5Smrg# Set to yes if building a shared library automatically hardcodes DIR into the library
62881f0ac6a5Smrg# and all subsequent libraries and executables linked against it.
62891f0ac6a5Smrghardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)
62901f0ac6a5Smrg
62911f0ac6a5Smrg# Variables whose values should be saved in libtool wrapper scripts and
62921f0ac6a5Smrg# restored at relink time.
62931f0ac6a5Smrgvariables_saved_for_relink="$variables_saved_for_relink"
62941f0ac6a5Smrg
62951f0ac6a5Smrg# Whether libtool must link a program against all its dependency libraries.
62961f0ac6a5Smrglink_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
62971f0ac6a5Smrg
62981f0ac6a5Smrg# Compile-time system search path for libraries
62991f0ac6a5Smrgsys_lib_search_path_spec=$lt_sys_lib_search_path_spec
63001f0ac6a5Smrg
63011f0ac6a5Smrg# Run-time system search path for libraries
63021f0ac6a5Smrgsys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
63031f0ac6a5Smrg
63041f0ac6a5Smrg# Fix the shell variable \$srcfile for the compiler.
6305e5410a46Smrgfix_srcfile_path=$lt_fix_srcfile_path
63061f0ac6a5Smrg
63071f0ac6a5Smrg# Set to yes if exported symbols are required.
63081f0ac6a5Smrgalways_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
63091f0ac6a5Smrg
63101f0ac6a5Smrg# The commands to list exported symbols.
63111f0ac6a5Smrgexport_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
63121f0ac6a5Smrg
63131f0ac6a5Smrg# The commands to extract the exported symbol list from a shared archive.
63141f0ac6a5Smrgextract_expsyms_cmds=$lt_extract_expsyms_cmds
63151f0ac6a5Smrg
63161f0ac6a5Smrg# Symbols that should not be listed in the preloaded symbols.
63171f0ac6a5Smrgexclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
63181f0ac6a5Smrg
63191f0ac6a5Smrg# Symbols that must always be exported.
63201f0ac6a5Smrginclude_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
63211f0ac6a5Smrg
63221f0ac6a5Smrgifelse([$1],[],
63231f0ac6a5Smrg[# ### END LIBTOOL CONFIG],
63241f0ac6a5Smrg[# ### END LIBTOOL TAG CONFIG: $tagname])
63251f0ac6a5Smrg
63261f0ac6a5Smrg__EOF__
63271f0ac6a5Smrg
63281f0ac6a5Smrgifelse([$1],[], [
63291f0ac6a5Smrg  case $host_os in
63301f0ac6a5Smrg  aix3*)
63311f0ac6a5Smrg    cat <<\EOF >> "$cfgfile"
63321f0ac6a5Smrg
63331f0ac6a5Smrg# AIX sometimes has problems with the GCC collect2 program.  For some
63341f0ac6a5Smrg# reason, if we set the COLLECT_NAMES environment variable, the problems
63351f0ac6a5Smrg# vanish in a puff of smoke.
63361f0ac6a5Smrgif test "X${COLLECT_NAMES+set}" != Xset; then
63371f0ac6a5Smrg  COLLECT_NAMES=
63381f0ac6a5Smrg  export COLLECT_NAMES
63391f0ac6a5Smrgfi
63401f0ac6a5SmrgEOF
63411f0ac6a5Smrg    ;;
63421f0ac6a5Smrg  esac
63431f0ac6a5Smrg
63441f0ac6a5Smrg  # We use sed instead of cat because bash on DJGPP gets confused if
63451f0ac6a5Smrg  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
63461f0ac6a5Smrg  # text mode, it properly converts lines to CR/LF.  This bash problem
63471f0ac6a5Smrg  # is reportedly fixed, but why not run on old versions too?
63481f0ac6a5Smrg  sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
63491f0ac6a5Smrg
63501f0ac6a5Smrg  mv -f "$cfgfile" "$ofile" || \
63511f0ac6a5Smrg    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
63521f0ac6a5Smrg  chmod +x "$ofile"
63531f0ac6a5Smrg])
63541f0ac6a5Smrgelse
63551f0ac6a5Smrg  # If there is no Makefile yet, we rely on a make rule to execute
63561f0ac6a5Smrg  # `config.status --recheck' to rerun these tests and create the
63571f0ac6a5Smrg  # libtool script then.
63581f0ac6a5Smrg  ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
63591f0ac6a5Smrg  if test -f "$ltmain_in"; then
63601f0ac6a5Smrg    test -f Makefile && make "$ltmain"
63611f0ac6a5Smrg  fi
63621f0ac6a5Smrgfi
63631f0ac6a5Smrg])# AC_LIBTOOL_CONFIG
63641f0ac6a5Smrg
63651f0ac6a5Smrg
63661f0ac6a5Smrg# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
63671f0ac6a5Smrg# -------------------------------------------
63681f0ac6a5SmrgAC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
63691f0ac6a5Smrg[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
63701f0ac6a5Smrg
63711f0ac6a5Smrg_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
63721f0ac6a5Smrg
63731f0ac6a5Smrgif test "$GCC" = yes; then
63741f0ac6a5Smrg  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
63751f0ac6a5Smrg
63761f0ac6a5Smrg  AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
63771f0ac6a5Smrg    lt_cv_prog_compiler_rtti_exceptions,
63781f0ac6a5Smrg    [-fno-rtti -fno-exceptions], [],
63791f0ac6a5Smrg    [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
63801f0ac6a5Smrgfi
63811f0ac6a5Smrg])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
63821f0ac6a5Smrg
63831f0ac6a5Smrg
63841f0ac6a5Smrg# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
63851f0ac6a5Smrg# ---------------------------------
63861f0ac6a5SmrgAC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
63871f0ac6a5Smrg[AC_REQUIRE([AC_CANONICAL_HOST])
6388e5410a46SmrgAC_REQUIRE([LT_AC_PROG_SED])
63891f0ac6a5SmrgAC_REQUIRE([AC_PROG_NM])
63901f0ac6a5SmrgAC_REQUIRE([AC_OBJEXT])
63911f0ac6a5Smrg# Check for command to grab the raw symbol name followed by C symbol from nm.
63921f0ac6a5SmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object])
63931f0ac6a5SmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
63941f0ac6a5Smrg[
63951f0ac6a5Smrg# These are sane defaults that work on at least a few old systems.
63961f0ac6a5Smrg# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
63971f0ac6a5Smrg
63981f0ac6a5Smrg# Character class describing NM global symbol codes.
63991f0ac6a5Smrgsymcode='[[BCDEGRST]]'
64001f0ac6a5Smrg
64011f0ac6a5Smrg# Regexp to match symbols that can be accessed directly from C.
64021f0ac6a5Smrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
64031f0ac6a5Smrg
64041f0ac6a5Smrg# Transform an extracted symbol line into a proper C declaration
64051f0ac6a5Smrglt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
64061f0ac6a5Smrg
64071f0ac6a5Smrg# Transform an extracted symbol line into symbol name and symbol address
64081f0ac6a5Smrglt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
64091f0ac6a5Smrg
64101f0ac6a5Smrg# Define system-specific variables.
64111f0ac6a5Smrgcase $host_os in
64121f0ac6a5Smrgaix*)
64131f0ac6a5Smrg  symcode='[[BCDT]]'
64141f0ac6a5Smrg  ;;
64151f0ac6a5Smrgcygwin* | mingw* | pw32*)
64161f0ac6a5Smrg  symcode='[[ABCDGISTW]]'
64171f0ac6a5Smrg  ;;
64181f0ac6a5Smrghpux*) # Its linker distinguishes data from code symbols
64191f0ac6a5Smrg  if test "$host_cpu" = ia64; then
64201f0ac6a5Smrg    symcode='[[ABCDEGRST]]'
64211f0ac6a5Smrg  fi
64221f0ac6a5Smrg  lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
64231f0ac6a5Smrg  lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
64241f0ac6a5Smrg  ;;
6425e5410a46Smrglinux* | k*bsd*-gnu)
64261f0ac6a5Smrg  if test "$host_cpu" = ia64; then
64271f0ac6a5Smrg    symcode='[[ABCDGIRSTW]]'
64281f0ac6a5Smrg    lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
64291f0ac6a5Smrg    lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
64301f0ac6a5Smrg  fi
64311f0ac6a5Smrg  ;;
64321f0ac6a5Smrgirix* | nonstopux*)
64331f0ac6a5Smrg  symcode='[[BCDEGRST]]'
64341f0ac6a5Smrg  ;;
64351f0ac6a5Smrgosf*)
64361f0ac6a5Smrg  symcode='[[BCDEGQRST]]'
64371f0ac6a5Smrg  ;;
64381f0ac6a5Smrgsolaris*)
64391f0ac6a5Smrg  symcode='[[BDRT]]'
64401f0ac6a5Smrg  ;;
64411f0ac6a5Smrgsco3.2v5*)
64421f0ac6a5Smrg  symcode='[[DT]]'
64431f0ac6a5Smrg  ;;
64441f0ac6a5Smrgsysv4.2uw2*)
64451f0ac6a5Smrg  symcode='[[DT]]'
64461f0ac6a5Smrg  ;;
64471f0ac6a5Smrgsysv5* | sco5v6* | unixware* | OpenUNIX*)
64481f0ac6a5Smrg  symcode='[[ABDT]]'
64491f0ac6a5Smrg  ;;
64501f0ac6a5Smrgsysv4)
64511f0ac6a5Smrg  symcode='[[DFNSTU]]'
64521f0ac6a5Smrg  ;;
64531f0ac6a5Smrgesac
64541f0ac6a5Smrg
64551f0ac6a5Smrg# Handle CRLF in mingw tool chain
64561f0ac6a5Smrgopt_cr=
64571f0ac6a5Smrgcase $build_os in
64581f0ac6a5Smrgmingw*)
64591f0ac6a5Smrg  opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
64601f0ac6a5Smrg  ;;
64611f0ac6a5Smrgesac
64621f0ac6a5Smrg
64631f0ac6a5Smrg# If we're using GNU nm, then use its standard symbol codes.
64641f0ac6a5Smrgcase `$NM -V 2>&1` in
64651f0ac6a5Smrg*GNU* | *'with BFD'*)
64661f0ac6a5Smrg  symcode='[[ABCDGIRSTW]]' ;;
64671f0ac6a5Smrgesac
64681f0ac6a5Smrg
64691f0ac6a5Smrg# Try without a prefix undercore, then with it.
64701f0ac6a5Smrgfor ac_symprfx in "" "_"; do
64711f0ac6a5Smrg
64721f0ac6a5Smrg  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
64731f0ac6a5Smrg  symxfrm="\\1 $ac_symprfx\\2 \\2"
64741f0ac6a5Smrg
64751f0ac6a5Smrg  # Write the raw and C identifiers.
64761f0ac6a5Smrg  lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ 	]]\($symcode$symcode*\)[[ 	]][[ 	]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
64771f0ac6a5Smrg
64781f0ac6a5Smrg  # Check to see that the pipe works correctly.
64791f0ac6a5Smrg  pipe_works=no
64801f0ac6a5Smrg
64811f0ac6a5Smrg  rm -f conftest*
64821f0ac6a5Smrg  cat > conftest.$ac_ext <<EOF
64831f0ac6a5Smrg#ifdef __cplusplus
64841f0ac6a5Smrgextern "C" {
64851f0ac6a5Smrg#endif
64861f0ac6a5Smrgchar nm_test_var;
64871f0ac6a5Smrgvoid nm_test_func(){}
64881f0ac6a5Smrg#ifdef __cplusplus
64891f0ac6a5Smrg}
64901f0ac6a5Smrg#endif
64911f0ac6a5Smrgint main(){nm_test_var='a';nm_test_func();return(0);}
64921f0ac6a5SmrgEOF
64931f0ac6a5Smrg
64941f0ac6a5Smrg  if AC_TRY_EVAL(ac_compile); then
64951f0ac6a5Smrg    # Now try to grab the symbols.
64961f0ac6a5Smrg    nlist=conftest.nm
64971f0ac6a5Smrg    if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
64981f0ac6a5Smrg      # Try sorting and uniquifying the output.
64991f0ac6a5Smrg      if sort "$nlist" | uniq > "$nlist"T; then
65001f0ac6a5Smrg	mv -f "$nlist"T "$nlist"
65011f0ac6a5Smrg      else
65021f0ac6a5Smrg	rm -f "$nlist"T
65031f0ac6a5Smrg      fi
65041f0ac6a5Smrg
65051f0ac6a5Smrg      # Make sure that we snagged all the symbols we need.
65061f0ac6a5Smrg      if grep ' nm_test_var$' "$nlist" >/dev/null; then
65071f0ac6a5Smrg	if grep ' nm_test_func$' "$nlist" >/dev/null; then
65081f0ac6a5Smrg	  cat <<EOF > conftest.$ac_ext
65091f0ac6a5Smrg#ifdef __cplusplus
65101f0ac6a5Smrgextern "C" {
65111f0ac6a5Smrg#endif
65121f0ac6a5Smrg
65131f0ac6a5SmrgEOF
65141f0ac6a5Smrg	  # Now generate the symbol file.
65151f0ac6a5Smrg	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
65161f0ac6a5Smrg
65171f0ac6a5Smrg	  cat <<EOF >> conftest.$ac_ext
65181f0ac6a5Smrg#if defined (__STDC__) && __STDC__
65191f0ac6a5Smrg# define lt_ptr_t void *
65201f0ac6a5Smrg#else
65211f0ac6a5Smrg# define lt_ptr_t char *
65221f0ac6a5Smrg# define const
65231f0ac6a5Smrg#endif
65241f0ac6a5Smrg
65251f0ac6a5Smrg/* The mapping between symbol names and symbols. */
65261f0ac6a5Smrgconst struct {
65271f0ac6a5Smrg  const char *name;
65281f0ac6a5Smrg  lt_ptr_t address;
65291f0ac6a5Smrg}
65301f0ac6a5Smrglt_preloaded_symbols[[]] =
65311f0ac6a5Smrg{
65321f0ac6a5SmrgEOF
65331f0ac6a5Smrg	  $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
65341f0ac6a5Smrg	  cat <<\EOF >> conftest.$ac_ext
65351f0ac6a5Smrg  {0, (lt_ptr_t) 0}
65361f0ac6a5Smrg};
65371f0ac6a5Smrg
65381f0ac6a5Smrg#ifdef __cplusplus
65391f0ac6a5Smrg}
65401f0ac6a5Smrg#endif
65411f0ac6a5SmrgEOF
65421f0ac6a5Smrg	  # Now try linking the two files.
65431f0ac6a5Smrg	  mv conftest.$ac_objext conftstm.$ac_objext
65441f0ac6a5Smrg	  lt_save_LIBS="$LIBS"
65451f0ac6a5Smrg	  lt_save_CFLAGS="$CFLAGS"
65461f0ac6a5Smrg	  LIBS="conftstm.$ac_objext"
65471f0ac6a5Smrg	  CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
65481f0ac6a5Smrg	  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
65491f0ac6a5Smrg	    pipe_works=yes
65501f0ac6a5Smrg	  fi
65511f0ac6a5Smrg	  LIBS="$lt_save_LIBS"
65521f0ac6a5Smrg	  CFLAGS="$lt_save_CFLAGS"
65531f0ac6a5Smrg	else
65541f0ac6a5Smrg	  echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
65551f0ac6a5Smrg	fi
65561f0ac6a5Smrg      else
65571f0ac6a5Smrg	echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
65581f0ac6a5Smrg      fi
65591f0ac6a5Smrg    else
65601f0ac6a5Smrg      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
65611f0ac6a5Smrg    fi
65621f0ac6a5Smrg  else
65631f0ac6a5Smrg    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
65641f0ac6a5Smrg    cat conftest.$ac_ext >&5
65651f0ac6a5Smrg  fi
6566e5410a46Smrg  rm -rf conftest* conftst*
65671f0ac6a5Smrg
65681f0ac6a5Smrg  # Do not use the global_symbol_pipe unless it works.
65691f0ac6a5Smrg  if test "$pipe_works" = yes; then
65701f0ac6a5Smrg    break
65711f0ac6a5Smrg  else
65721f0ac6a5Smrg    lt_cv_sys_global_symbol_pipe=
65731f0ac6a5Smrg  fi
65741f0ac6a5Smrgdone
65751f0ac6a5Smrg])
65761f0ac6a5Smrgif test -z "$lt_cv_sys_global_symbol_pipe"; then
65771f0ac6a5Smrg  lt_cv_sys_global_symbol_to_cdecl=
65781f0ac6a5Smrgfi
65791f0ac6a5Smrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
65801f0ac6a5Smrg  AC_MSG_RESULT(failed)
65811f0ac6a5Smrgelse
65821f0ac6a5Smrg  AC_MSG_RESULT(ok)
65831f0ac6a5Smrgfi
65841f0ac6a5Smrg]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
65851f0ac6a5Smrg
65861f0ac6a5Smrg
65871f0ac6a5Smrg# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
65881f0ac6a5Smrg# ---------------------------------------
65891f0ac6a5SmrgAC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
65901f0ac6a5Smrg[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
65911f0ac6a5Smrg_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
65921f0ac6a5Smrg_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
65931f0ac6a5Smrg
65941f0ac6a5SmrgAC_MSG_CHECKING([for $compiler option to produce PIC])
65951f0ac6a5Smrg ifelse([$1],[CXX],[
65961f0ac6a5Smrg  # C++ specific cases for pic, static, wl, etc.
65971f0ac6a5Smrg  if test "$GXX" = yes; then
65981f0ac6a5Smrg    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
65991f0ac6a5Smrg    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
66001f0ac6a5Smrg
66011f0ac6a5Smrg    case $host_os in
66021f0ac6a5Smrg    aix*)
66031f0ac6a5Smrg      # All AIX code is PIC.
66041f0ac6a5Smrg      if test "$host_cpu" = ia64; then
66051f0ac6a5Smrg	# AIX 5 now supports IA64 processor
66061f0ac6a5Smrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
66071f0ac6a5Smrg      fi
66081f0ac6a5Smrg      ;;
66091f0ac6a5Smrg    amigaos*)
66101f0ac6a5Smrg      # FIXME: we need at least 68020 code to build shared libraries, but
66111f0ac6a5Smrg      # adding the `-m68020' flag to GCC prevents building anything better,
66121f0ac6a5Smrg      # like `-m68040'.
66131f0ac6a5Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
66141f0ac6a5Smrg      ;;
6615e5410a46Smrg    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
66161f0ac6a5Smrg      # PIC is the default for these OSes.
66171f0ac6a5Smrg      ;;
6618e5410a46Smrg    mingw* | cygwin* | os2* | pw32*)
66191f0ac6a5Smrg      # This hack is so that the source file can tell whether it is being
66201f0ac6a5Smrg      # built for inclusion in a dll (and should export symbols for example).
6621e5410a46Smrg      # Although the cygwin gcc ignores -fPIC, still need this for old-style
6622e5410a46Smrg      # (--disable-auto-import) libraries
6623e5410a46Smrg      m4_if([$1], [GCJ], [],
6624e5410a46Smrg	[_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
66251f0ac6a5Smrg      ;;
66261f0ac6a5Smrg    darwin* | rhapsody*)
66271f0ac6a5Smrg      # PIC is the default on this platform
66281f0ac6a5Smrg      # Common symbols not allowed in MH_DYLIB files
66291f0ac6a5Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
66301f0ac6a5Smrg      ;;
66311f0ac6a5Smrg    *djgpp*)
66321f0ac6a5Smrg      # DJGPP does not support shared libraries at all
66331f0ac6a5Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
66341f0ac6a5Smrg      ;;
6635e5410a46Smrg    interix[[3-9]]*)
66361f0ac6a5Smrg      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
66371f0ac6a5Smrg      # Instead, we relocate shared libraries at runtime.
66381f0ac6a5Smrg      ;;
66391f0ac6a5Smrg    sysv4*MP*)
66401f0ac6a5Smrg      if test -d /usr/nec; then
66411f0ac6a5Smrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
66421f0ac6a5Smrg      fi
66431f0ac6a5Smrg      ;;
66441f0ac6a5Smrg    hpux*)
66451f0ac6a5Smrg      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
66461f0ac6a5Smrg      # not for PA HP-UX.
66471f0ac6a5Smrg      case $host_cpu in
66481f0ac6a5Smrg      hppa*64*|ia64*)
66491f0ac6a5Smrg	;;
66501f0ac6a5Smrg      *)
66511f0ac6a5Smrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
66521f0ac6a5Smrg	;;
66531f0ac6a5Smrg      esac
66541f0ac6a5Smrg      ;;
66551f0ac6a5Smrg    *)
66561f0ac6a5Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
66571f0ac6a5Smrg      ;;
66581f0ac6a5Smrg    esac
66591f0ac6a5Smrg  else
66601f0ac6a5Smrg    case $host_os in
6661e5410a46Smrg      aix[[4-9]]*)
66621f0ac6a5Smrg	# All AIX code is PIC.
66631f0ac6a5Smrg	if test "$host_cpu" = ia64; then
66641f0ac6a5Smrg	  # AIX 5 now supports IA64 processor
66651f0ac6a5Smrg	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
66661f0ac6a5Smrg	else
66671f0ac6a5Smrg	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
66681f0ac6a5Smrg	fi
66691f0ac6a5Smrg	;;
66701f0ac6a5Smrg      chorus*)
66711f0ac6a5Smrg	case $cc_basename in
66721f0ac6a5Smrg	cxch68*)
66731f0ac6a5Smrg	  # Green Hills C++ Compiler
66741f0ac6a5Smrg	  # _LT_AC_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"
66751f0ac6a5Smrg	  ;;
66761f0ac6a5Smrg	esac
66771f0ac6a5Smrg	;;
66781f0ac6a5Smrg       darwin*)
66791f0ac6a5Smrg         # PIC is the default on this platform
66801f0ac6a5Smrg         # Common symbols not allowed in MH_DYLIB files
66811f0ac6a5Smrg         case $cc_basename in
66821f0ac6a5Smrg           xlc*)
66831f0ac6a5Smrg           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
66841f0ac6a5Smrg           _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
66851f0ac6a5Smrg           ;;
66861f0ac6a5Smrg         esac
66871f0ac6a5Smrg       ;;
66881f0ac6a5Smrg      dgux*)
66891f0ac6a5Smrg	case $cc_basename in
66901f0ac6a5Smrg	  ec++*)
66911f0ac6a5Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
66921f0ac6a5Smrg	    ;;
66931f0ac6a5Smrg	  ghcx*)
66941f0ac6a5Smrg	    # Green Hills C++ Compiler
66951f0ac6a5Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
66961f0ac6a5Smrg	    ;;
66971f0ac6a5Smrg	  *)
66981f0ac6a5Smrg	    ;;
66991f0ac6a5Smrg	esac
67001f0ac6a5Smrg	;;
6701e5410a46Smrg      freebsd* | dragonfly*)
67021f0ac6a5Smrg	# FreeBSD uses GNU C++
67031f0ac6a5Smrg	;;
67041f0ac6a5Smrg      hpux9* | hpux10* | hpux11*)
67051f0ac6a5Smrg	case $cc_basename in
67061f0ac6a5Smrg	  CC*)
67071f0ac6a5Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
67081f0ac6a5Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
67091f0ac6a5Smrg	    if test "$host_cpu" != ia64; then
67101f0ac6a5Smrg	      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
67111f0ac6a5Smrg	    fi
67121f0ac6a5Smrg	    ;;
67131f0ac6a5Smrg	  aCC*)
67141f0ac6a5Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
67151f0ac6a5Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
67161f0ac6a5Smrg	    case $host_cpu in
67171f0ac6a5Smrg	    hppa*64*|ia64*)
67181f0ac6a5Smrg	      # +Z the default
67191f0ac6a5Smrg	      ;;
67201f0ac6a5Smrg	    *)
67211f0ac6a5Smrg	      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
67221f0ac6a5Smrg	      ;;
67231f0ac6a5Smrg	    esac
67241f0ac6a5Smrg	    ;;
67251f0ac6a5Smrg	  *)
67261f0ac6a5Smrg	    ;;
67271f0ac6a5Smrg	esac
67281f0ac6a5Smrg	;;
67291f0ac6a5Smrg      interix*)
67301f0ac6a5Smrg	# This is c89, which is MS Visual C++ (no shared libs)
67311f0ac6a5Smrg	# Anyone wants to do a port?
67321f0ac6a5Smrg	;;
67331f0ac6a5Smrg      irix5* | irix6* | nonstopux*)
67341f0ac6a5Smrg	case $cc_basename in
67351f0ac6a5Smrg	  CC*)
67361f0ac6a5Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
67371f0ac6a5Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
67381f0ac6a5Smrg	    # CC pic flag -KPIC is the default.
67391f0ac6a5Smrg	    ;;
67401f0ac6a5Smrg	  *)
67411f0ac6a5Smrg	    ;;
67421f0ac6a5Smrg	esac
67431f0ac6a5Smrg	;;
6744e5410a46Smrg      linux* | k*bsd*-gnu)
67451f0ac6a5Smrg	case $cc_basename in
67461f0ac6a5Smrg	  KCC*)
67471f0ac6a5Smrg	    # KAI C++ Compiler
67481f0ac6a5Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
67491f0ac6a5Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
67501f0ac6a5Smrg	    ;;
67511f0ac6a5Smrg	  icpc* | ecpc*)
67521f0ac6a5Smrg	    # Intel C++
67531f0ac6a5Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
67541f0ac6a5Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
67551f0ac6a5Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
67561f0ac6a5Smrg	    ;;
6757e5410a46Smrg	  pgCC* | pgcpp*)
67581f0ac6a5Smrg	    # Portland Group C++ compiler.
67591f0ac6a5Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
67601f0ac6a5Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
67611f0ac6a5Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
67621f0ac6a5Smrg	    ;;
67631f0ac6a5Smrg	  cxx*)
67641f0ac6a5Smrg	    # Compaq C++
67651f0ac6a5Smrg	    # Make sure the PIC flag is empty.  It appears that all Alpha
67661f0ac6a5Smrg	    # Linux and Compaq Tru64 Unix objects are PIC.
67671f0ac6a5Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
67681f0ac6a5Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
67691f0ac6a5Smrg	    ;;
67701f0ac6a5Smrg	  *)
6771e5410a46Smrg	    case `$CC -V 2>&1 | sed 5q` in
6772e5410a46Smrg	    *Sun\ C*)
6773e5410a46Smrg	      # Sun C++ 5.9
6774e5410a46Smrg	      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6775e5410a46Smrg	      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6776e5410a46Smrg	      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
6777e5410a46Smrg	      ;;
6778e5410a46Smrg	    esac
67791f0ac6a5Smrg	    ;;
67801f0ac6a5Smrg	esac
67811f0ac6a5Smrg	;;
67821f0ac6a5Smrg      lynxos*)
67831f0ac6a5Smrg	;;
67841f0ac6a5Smrg      m88k*)
67851f0ac6a5Smrg	;;
67861f0ac6a5Smrg      mvs*)
67871f0ac6a5Smrg	case $cc_basename in
67881f0ac6a5Smrg	  cxx*)
67891f0ac6a5Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
67901f0ac6a5Smrg	    ;;
67911f0ac6a5Smrg	  *)
67921f0ac6a5Smrg	    ;;
67931f0ac6a5Smrg	esac
67941f0ac6a5Smrg	;;
67951f0ac6a5Smrg      netbsd*)
67961f0ac6a5Smrg	;;
67971f0ac6a5Smrg      osf3* | osf4* | osf5*)
67981f0ac6a5Smrg	case $cc_basename in
67991f0ac6a5Smrg	  KCC*)
68001f0ac6a5Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
68011f0ac6a5Smrg	    ;;
68021f0ac6a5Smrg	  RCC*)
68031f0ac6a5Smrg	    # Rational C++ 2.4.1
68041f0ac6a5Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
68051f0ac6a5Smrg	    ;;
68061f0ac6a5Smrg	  cxx*)
68071f0ac6a5Smrg	    # Digital/Compaq C++
68081f0ac6a5Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
68091f0ac6a5Smrg	    # Make sure the PIC flag is empty.  It appears that all Alpha
68101f0ac6a5Smrg	    # Linux and Compaq Tru64 Unix objects are PIC.
68111f0ac6a5Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
68121f0ac6a5Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
68131f0ac6a5Smrg	    ;;
68141f0ac6a5Smrg	  *)
68151f0ac6a5Smrg	    ;;
68161f0ac6a5Smrg	esac
68171f0ac6a5Smrg	;;
68181f0ac6a5Smrg      psos*)
68191f0ac6a5Smrg	;;
68201f0ac6a5Smrg      solaris*)
68211f0ac6a5Smrg	case $cc_basename in
68221f0ac6a5Smrg	  CC*)
68231f0ac6a5Smrg	    # Sun C++ 4.2, 5.x and Centerline C++
68241f0ac6a5Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
68251f0ac6a5Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
68261f0ac6a5Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
68271f0ac6a5Smrg	    ;;
68281f0ac6a5Smrg	  gcx*)
68291f0ac6a5Smrg	    # Green Hills C++ Compiler
68301f0ac6a5Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
68311f0ac6a5Smrg	    ;;
68321f0ac6a5Smrg	  *)
68331f0ac6a5Smrg	    ;;
68341f0ac6a5Smrg	esac
68351f0ac6a5Smrg	;;
68361f0ac6a5Smrg      sunos4*)
68371f0ac6a5Smrg	case $cc_basename in
68381f0ac6a5Smrg	  CC*)
68391f0ac6a5Smrg	    # Sun C++ 4.x
68401f0ac6a5Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
68411f0ac6a5Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
68421f0ac6a5Smrg	    ;;
68431f0ac6a5Smrg	  lcc*)
68441f0ac6a5Smrg	    # Lucid
68451f0ac6a5Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
68461f0ac6a5Smrg	    ;;
68471f0ac6a5Smrg	  *)
68481f0ac6a5Smrg	    ;;
68491f0ac6a5Smrg	esac
68501f0ac6a5Smrg	;;
68511f0ac6a5Smrg      tandem*)
68521f0ac6a5Smrg	case $cc_basename in
68531f0ac6a5Smrg	  NCC*)
68541f0ac6a5Smrg	    # NonStop-UX NCC 3.20
68551f0ac6a5Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
68561f0ac6a5Smrg	    ;;
68571f0ac6a5Smrg	  *)
68581f0ac6a5Smrg	    ;;
68591f0ac6a5Smrg	esac
68601f0ac6a5Smrg	;;
68611f0ac6a5Smrg      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
68621f0ac6a5Smrg	case $cc_basename in
68631f0ac6a5Smrg	  CC*)
68641f0ac6a5Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
68651f0ac6a5Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
68661f0ac6a5Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
68671f0ac6a5Smrg	    ;;
68681f0ac6a5Smrg	esac
68691f0ac6a5Smrg	;;
68701f0ac6a5Smrg      vxworks*)
68711f0ac6a5Smrg	;;
68721f0ac6a5Smrg      *)
68731f0ac6a5Smrg	_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
68741f0ac6a5Smrg	;;
68751f0ac6a5Smrg    esac
68761f0ac6a5Smrg  fi
68771f0ac6a5Smrg],
68781f0ac6a5Smrg[
68791f0ac6a5Smrg  if test "$GCC" = yes; then
68801f0ac6a5Smrg    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
68811f0ac6a5Smrg    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
68821f0ac6a5Smrg
68831f0ac6a5Smrg    case $host_os in
68841f0ac6a5Smrg      aix*)
68851f0ac6a5Smrg      # All AIX code is PIC.
68861f0ac6a5Smrg      if test "$host_cpu" = ia64; then
68871f0ac6a5Smrg	# AIX 5 now supports IA64 processor
68881f0ac6a5Smrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
68891f0ac6a5Smrg      fi
68901f0ac6a5Smrg      ;;
68911f0ac6a5Smrg
68921f0ac6a5Smrg    amigaos*)
68931f0ac6a5Smrg      # FIXME: we need at least 68020 code to build shared libraries, but
68941f0ac6a5Smrg      # adding the `-m68020' flag to GCC prevents building anything better,
68951f0ac6a5Smrg      # like `-m68040'.
68961f0ac6a5Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
68971f0ac6a5Smrg      ;;
68981f0ac6a5Smrg
6899e5410a46Smrg    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
69001f0ac6a5Smrg      # PIC is the default for these OSes.
69011f0ac6a5Smrg      ;;
69021f0ac6a5Smrg
6903e5410a46Smrg    mingw* | cygwin* | pw32* | os2*)
69041f0ac6a5Smrg      # This hack is so that the source file can tell whether it is being
69051f0ac6a5Smrg      # built for inclusion in a dll (and should export symbols for example).
6906e5410a46Smrg      # Although the cygwin gcc ignores -fPIC, still need this for old-style
6907e5410a46Smrg      # (--disable-auto-import) libraries
6908e5410a46Smrg      m4_if([$1], [GCJ], [],
6909e5410a46Smrg	[_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
69101f0ac6a5Smrg      ;;
69111f0ac6a5Smrg
69121f0ac6a5Smrg    darwin* | rhapsody*)
69131f0ac6a5Smrg      # PIC is the default on this platform
69141f0ac6a5Smrg      # Common symbols not allowed in MH_DYLIB files
69151f0ac6a5Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
69161f0ac6a5Smrg      ;;
69171f0ac6a5Smrg
6918e5410a46Smrg    interix[[3-9]]*)
69191f0ac6a5Smrg      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
69201f0ac6a5Smrg      # Instead, we relocate shared libraries at runtime.
69211f0ac6a5Smrg      ;;
69221f0ac6a5Smrg
69231f0ac6a5Smrg    msdosdjgpp*)
69241f0ac6a5Smrg      # Just because we use GCC doesn't mean we suddenly get shared libraries
69251f0ac6a5Smrg      # on systems that don't support them.
69261f0ac6a5Smrg      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
69271f0ac6a5Smrg      enable_shared=no
69281f0ac6a5Smrg      ;;
69291f0ac6a5Smrg
69301f0ac6a5Smrg    sysv4*MP*)
69311f0ac6a5Smrg      if test -d /usr/nec; then
69321f0ac6a5Smrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
69331f0ac6a5Smrg      fi
69341f0ac6a5Smrg      ;;
69351f0ac6a5Smrg
69361f0ac6a5Smrg    hpux*)
69371f0ac6a5Smrg      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
69381f0ac6a5Smrg      # not for PA HP-UX.
69391f0ac6a5Smrg      case $host_cpu in
69401f0ac6a5Smrg      hppa*64*|ia64*)
69411f0ac6a5Smrg	# +Z the default
69421f0ac6a5Smrg	;;
69431f0ac6a5Smrg      *)
69441f0ac6a5Smrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
69451f0ac6a5Smrg	;;
69461f0ac6a5Smrg      esac
69471f0ac6a5Smrg      ;;
69481f0ac6a5Smrg
69491f0ac6a5Smrg    *)
69501f0ac6a5Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
69511f0ac6a5Smrg      ;;
69521f0ac6a5Smrg    esac
69531f0ac6a5Smrg  else
69541f0ac6a5Smrg    # PORTME Check for flag to pass linker flags through the system compiler.
69551f0ac6a5Smrg    case $host_os in
69561f0ac6a5Smrg    aix*)
69571f0ac6a5Smrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
69581f0ac6a5Smrg      if test "$host_cpu" = ia64; then
69591f0ac6a5Smrg	# AIX 5 now supports IA64 processor
69601f0ac6a5Smrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
69611f0ac6a5Smrg      else
69621f0ac6a5Smrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
69631f0ac6a5Smrg      fi
69641f0ac6a5Smrg      ;;
69651f0ac6a5Smrg      darwin*)
69661f0ac6a5Smrg        # PIC is the default on this platform
69671f0ac6a5Smrg        # Common symbols not allowed in MH_DYLIB files
69681f0ac6a5Smrg       case $cc_basename in
69691f0ac6a5Smrg         xlc*)
69701f0ac6a5Smrg         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
69711f0ac6a5Smrg         _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
69721f0ac6a5Smrg         ;;
69731f0ac6a5Smrg       esac
69741f0ac6a5Smrg       ;;
69751f0ac6a5Smrg
6976e5410a46Smrg    mingw* | cygwin* | pw32* | os2*)
69771f0ac6a5Smrg      # This hack is so that the source file can tell whether it is being
69781f0ac6a5Smrg      # built for inclusion in a dll (and should export symbols for example).
6979e5410a46Smrg      m4_if([$1], [GCJ], [],
6980e5410a46Smrg	[_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
69811f0ac6a5Smrg      ;;
69821f0ac6a5Smrg
69831f0ac6a5Smrg    hpux9* | hpux10* | hpux11*)
69841f0ac6a5Smrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
69851f0ac6a5Smrg      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
69861f0ac6a5Smrg      # not for PA HP-UX.
69871f0ac6a5Smrg      case $host_cpu in
69881f0ac6a5Smrg      hppa*64*|ia64*)
69891f0ac6a5Smrg	# +Z the default
69901f0ac6a5Smrg	;;
69911f0ac6a5Smrg      *)
69921f0ac6a5Smrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
69931f0ac6a5Smrg	;;
69941f0ac6a5Smrg      esac
69951f0ac6a5Smrg      # Is there a better lt_prog_compiler_static that works with the bundled CC?
69961f0ac6a5Smrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
69971f0ac6a5Smrg      ;;
69981f0ac6a5Smrg
69991f0ac6a5Smrg    irix5* | irix6* | nonstopux*)
70001f0ac6a5Smrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
70011f0ac6a5Smrg      # PIC (with -KPIC) is the default.
70021f0ac6a5Smrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
70031f0ac6a5Smrg      ;;
70041f0ac6a5Smrg
70051f0ac6a5Smrg    newsos6)
70061f0ac6a5Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
70071f0ac6a5Smrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
70081f0ac6a5Smrg      ;;
70091f0ac6a5Smrg
7010e5410a46Smrg    linux* | k*bsd*-gnu)
70111f0ac6a5Smrg      case $cc_basename in
70121f0ac6a5Smrg      icc* | ecc*)
70131f0ac6a5Smrg	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
70141f0ac6a5Smrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
70151f0ac6a5Smrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
70161f0ac6a5Smrg        ;;
70171f0ac6a5Smrg      pgcc* | pgf77* | pgf90* | pgf95*)
70181f0ac6a5Smrg        # Portland Group compilers (*not* the Pentium gcc compiler,
70191f0ac6a5Smrg	# which looks to be a dead project)
70201f0ac6a5Smrg	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
70211f0ac6a5Smrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
70221f0ac6a5Smrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
70231f0ac6a5Smrg        ;;
70241f0ac6a5Smrg      ccc*)
70251f0ac6a5Smrg        _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
70261f0ac6a5Smrg        # All Alpha code is PIC.
70271f0ac6a5Smrg        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
70281f0ac6a5Smrg        ;;
7029e5410a46Smrg      *)
7030e5410a46Smrg        case `$CC -V 2>&1 | sed 5q` in
7031e5410a46Smrg	*Sun\ C*)
7032e5410a46Smrg	  # Sun C 5.9
7033e5410a46Smrg	  _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
7034e5410a46Smrg	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
7035e5410a46Smrg	  _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7036e5410a46Smrg	  ;;
7037e5410a46Smrg	*Sun\ F*)
7038e5410a46Smrg	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
7039e5410a46Smrg	  _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
7040e5410a46Smrg	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
7041e5410a46Smrg	  _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=''
7042e5410a46Smrg	  ;;
7043e5410a46Smrg	esac
7044e5410a46Smrg	;;
70451f0ac6a5Smrg      esac
70461f0ac6a5Smrg      ;;
70471f0ac6a5Smrg
70481f0ac6a5Smrg    osf3* | osf4* | osf5*)
70491f0ac6a5Smrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
70501f0ac6a5Smrg      # All OSF/1 code is PIC.
70511f0ac6a5Smrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
70521f0ac6a5Smrg      ;;
70531f0ac6a5Smrg
7054e5410a46Smrg    rdos*)
7055e5410a46Smrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
7056e5410a46Smrg      ;;
7057e5410a46Smrg
70581f0ac6a5Smrg    solaris*)
70591f0ac6a5Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
70601f0ac6a5Smrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
70611f0ac6a5Smrg      case $cc_basename in
70621f0ac6a5Smrg      f77* | f90* | f95*)
70631f0ac6a5Smrg	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
70641f0ac6a5Smrg      *)
70651f0ac6a5Smrg	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
70661f0ac6a5Smrg      esac
70671f0ac6a5Smrg      ;;
70681f0ac6a5Smrg
70691f0ac6a5Smrg    sunos4*)
70701f0ac6a5Smrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
70711f0ac6a5Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
70721f0ac6a5Smrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
70731f0ac6a5Smrg      ;;
70741f0ac6a5Smrg
70751f0ac6a5Smrg    sysv4 | sysv4.2uw2* | sysv4.3*)
70761f0ac6a5Smrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
70771f0ac6a5Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
70781f0ac6a5Smrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
70791f0ac6a5Smrg      ;;
70801f0ac6a5Smrg
70811f0ac6a5Smrg    sysv4*MP*)
70821f0ac6a5Smrg      if test -d /usr/nec ;then
70831f0ac6a5Smrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
70841f0ac6a5Smrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
70851f0ac6a5Smrg      fi
70861f0ac6a5Smrg      ;;
70871f0ac6a5Smrg
70881f0ac6a5Smrg    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
70891f0ac6a5Smrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
70901f0ac6a5Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
70911f0ac6a5Smrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
70921f0ac6a5Smrg      ;;
70931f0ac6a5Smrg
70941f0ac6a5Smrg    unicos*)
70951f0ac6a5Smrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
70961f0ac6a5Smrg      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
70971f0ac6a5Smrg      ;;
70981f0ac6a5Smrg
70991f0ac6a5Smrg    uts4*)
71001f0ac6a5Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
71011f0ac6a5Smrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
71021f0ac6a5Smrg      ;;
71031f0ac6a5Smrg
71041f0ac6a5Smrg    *)
71051f0ac6a5Smrg      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
71061f0ac6a5Smrg      ;;
71071f0ac6a5Smrg    esac
71081f0ac6a5Smrg  fi
71091f0ac6a5Smrg])
71101f0ac6a5SmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
71111f0ac6a5Smrg
71121f0ac6a5Smrg#
71131f0ac6a5Smrg# Check to make sure the PIC flag actually works.
71141f0ac6a5Smrg#
71151f0ac6a5Smrgif test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
71161f0ac6a5Smrg  AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
7117e5410a46Smrg    _LT_AC_TAGVAR(lt_cv_prog_compiler_pic_works, $1),
71181f0ac6a5Smrg    [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
71191f0ac6a5Smrg    [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
71201f0ac6a5Smrg     "" | " "*) ;;
71211f0ac6a5Smrg     *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
71221f0ac6a5Smrg     esac],
71231f0ac6a5Smrg    [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
71241f0ac6a5Smrg     _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
71251f0ac6a5Smrgfi
71261f0ac6a5Smrgcase $host_os in
71271f0ac6a5Smrg  # For platforms which do not support PIC, -DPIC is meaningless:
71281f0ac6a5Smrg  *djgpp*)
71291f0ac6a5Smrg    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
71301f0ac6a5Smrg    ;;
71311f0ac6a5Smrg  *)
71321f0ac6a5Smrg    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
71331f0ac6a5Smrg    ;;
71341f0ac6a5Smrgesac
71351f0ac6a5Smrg
71361f0ac6a5Smrg#
71371f0ac6a5Smrg# Check to make sure the static flag actually works.
71381f0ac6a5Smrg#
71391f0ac6a5Smrgwl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\"
71401f0ac6a5SmrgAC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
7141e5410a46Smrg  _LT_AC_TAGVAR(lt_cv_prog_compiler_static_works, $1),
71421f0ac6a5Smrg  $lt_tmp_static_flag,
71431f0ac6a5Smrg  [],
71441f0ac6a5Smrg  [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
71451f0ac6a5Smrg])
71461f0ac6a5Smrg
71471f0ac6a5Smrg
71481f0ac6a5Smrg# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
71491f0ac6a5Smrg# ------------------------------------
71501f0ac6a5Smrg# See if the linker supports building shared libraries.
71511f0ac6a5SmrgAC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
7152e5410a46Smrg[AC_REQUIRE([LT_AC_PROG_SED])dnl
7153e5410a46SmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
71541f0ac6a5Smrgifelse([$1],[CXX],[
71551f0ac6a5Smrg  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
71561f0ac6a5Smrg  case $host_os in
7157e5410a46Smrg  aix[[4-9]]*)
71581f0ac6a5Smrg    # If we're using GNU nm, then we don't want the "-C" option.
71591f0ac6a5Smrg    # -C means demangle to AIX nm, but means don't demangle with GNU nm
71601f0ac6a5Smrg    if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
71611f0ac6a5Smrg      _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
71621f0ac6a5Smrg    else
71631f0ac6a5Smrg      _LT_AC_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'
71641f0ac6a5Smrg    fi
71651f0ac6a5Smrg    ;;
71661f0ac6a5Smrg  pw32*)
71671f0ac6a5Smrg    _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
71681f0ac6a5Smrg  ;;
71691f0ac6a5Smrg  cygwin* | mingw*)
7170e5410a46Smrg    _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
71711f0ac6a5Smrg  ;;
71721f0ac6a5Smrg  *)
71731f0ac6a5Smrg    _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
71741f0ac6a5Smrg  ;;
71751f0ac6a5Smrg  esac
7176e5410a46Smrg  _LT_AC_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
71771f0ac6a5Smrg],[
71781f0ac6a5Smrg  runpath_var=
71791f0ac6a5Smrg  _LT_AC_TAGVAR(allow_undefined_flag, $1)=
71801f0ac6a5Smrg  _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
71811f0ac6a5Smrg  _LT_AC_TAGVAR(archive_cmds, $1)=
71821f0ac6a5Smrg  _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
71831f0ac6a5Smrg  _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
71841f0ac6a5Smrg  _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
71851f0ac6a5Smrg  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
71861f0ac6a5Smrg  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
71871f0ac6a5Smrg  _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
71881f0ac6a5Smrg  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
71891f0ac6a5Smrg  _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
71901f0ac6a5Smrg  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
71911f0ac6a5Smrg  _LT_AC_TAGVAR(hardcode_direct, $1)=no
71921f0ac6a5Smrg  _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
71931f0ac6a5Smrg  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
71941f0ac6a5Smrg  _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
71951f0ac6a5Smrg  _LT_AC_TAGVAR(hardcode_automatic, $1)=no
71961f0ac6a5Smrg  _LT_AC_TAGVAR(module_cmds, $1)=
71971f0ac6a5Smrg  _LT_AC_TAGVAR(module_expsym_cmds, $1)=
71981f0ac6a5Smrg  _LT_AC_TAGVAR(always_export_symbols, $1)=no
71991f0ac6a5Smrg  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
72001f0ac6a5Smrg  # include_expsyms should be a list of space-separated symbols to be *always*
72011f0ac6a5Smrg  # included in the symbol list
72021f0ac6a5Smrg  _LT_AC_TAGVAR(include_expsyms, $1)=
72031f0ac6a5Smrg  # exclude_expsyms can be an extended regexp of symbols to exclude
72041f0ac6a5Smrg  # it will be wrapped by ` (' and `)$', so one must not match beginning or
72051f0ac6a5Smrg  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
72061f0ac6a5Smrg  # as well as any symbol that contains `d'.
7207e5410a46Smrg  _LT_AC_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
72081f0ac6a5Smrg  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
72091f0ac6a5Smrg  # platforms (ab)use it in PIC code, but their linkers get confused if
72101f0ac6a5Smrg  # the symbol is explicitly referenced.  Since portable code cannot
72111f0ac6a5Smrg  # rely on this symbol name, it's probably fine to never include it in
72121f0ac6a5Smrg  # preloaded symbol tables.
7213e5410a46Smrg  # Exclude shared library initialization/finalization symbols.
7214e5410a46Smrgdnl Note also adjust exclude_expsyms for C++ above.
72151f0ac6a5Smrg  extract_expsyms_cmds=
72161f0ac6a5Smrg  # Just being paranoid about ensuring that cc_basename is set.
72171f0ac6a5Smrg  _LT_CC_BASENAME([$compiler])
72181f0ac6a5Smrg  case $host_os in
72191f0ac6a5Smrg  cygwin* | mingw* | pw32*)
72201f0ac6a5Smrg    # FIXME: the MSVC++ port hasn't been tested in a loooong time
72211f0ac6a5Smrg    # When not using gcc, we currently assume that we are using
72221f0ac6a5Smrg    # Microsoft Visual C++.
72231f0ac6a5Smrg    if test "$GCC" != yes; then
72241f0ac6a5Smrg      with_gnu_ld=no
72251f0ac6a5Smrg    fi
72261f0ac6a5Smrg    ;;
72271f0ac6a5Smrg  interix*)
72281f0ac6a5Smrg    # we just hope/assume this is gcc and not c89 (= MSVC++)
72291f0ac6a5Smrg    with_gnu_ld=yes
72301f0ac6a5Smrg    ;;
72311f0ac6a5Smrg  openbsd*)
72321f0ac6a5Smrg    with_gnu_ld=no
72331f0ac6a5Smrg    ;;
72341f0ac6a5Smrg  esac
72351f0ac6a5Smrg
72361f0ac6a5Smrg  _LT_AC_TAGVAR(ld_shlibs, $1)=yes
72371f0ac6a5Smrg  if test "$with_gnu_ld" = yes; then
72381f0ac6a5Smrg    # If archive_cmds runs LD, not CC, wlarc should be empty
72391f0ac6a5Smrg    wlarc='${wl}'
72401f0ac6a5Smrg
72411f0ac6a5Smrg    # Set some defaults for GNU ld with shared library support. These
72421f0ac6a5Smrg    # are reset later if shared libraries are not supported. Putting them
72431f0ac6a5Smrg    # here allows them to be overridden if necessary.
72441f0ac6a5Smrg    runpath_var=LD_RUN_PATH
72451f0ac6a5Smrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
72461f0ac6a5Smrg    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
72471f0ac6a5Smrg    # ancient GNU ld didn't support --whole-archive et. al.
72481f0ac6a5Smrg    if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
72491f0ac6a5Smrg	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
72501f0ac6a5Smrg      else
72511f0ac6a5Smrg  	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
72521f0ac6a5Smrg    fi
72531f0ac6a5Smrg    supports_anon_versioning=no
72541f0ac6a5Smrg    case `$LD -v 2>/dev/null` in
72551f0ac6a5Smrg      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
72561f0ac6a5Smrg      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
72571f0ac6a5Smrg      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
72581f0ac6a5Smrg      *\ 2.11.*) ;; # other 2.11 versions
72591f0ac6a5Smrg      *) supports_anon_versioning=yes ;;
72601f0ac6a5Smrg    esac
72611f0ac6a5Smrg
72621f0ac6a5Smrg    # See if GNU ld supports shared libraries.
72631f0ac6a5Smrg    case $host_os in
7264e5410a46Smrg    aix[[3-9]]*)
72651f0ac6a5Smrg      # On AIX/PPC, the GNU linker is very broken
72661f0ac6a5Smrg      if test "$host_cpu" != ia64; then
72671f0ac6a5Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
72681f0ac6a5Smrg	cat <<EOF 1>&2
72691f0ac6a5Smrg
72701f0ac6a5Smrg*** Warning: the GNU linker, at least up to release 2.9.1, is reported
72711f0ac6a5Smrg*** to be unable to reliably create shared libraries on AIX.
72721f0ac6a5Smrg*** Therefore, libtool is disabling shared libraries support.  If you
72731f0ac6a5Smrg*** really care for shared libraries, you may want to modify your PATH
72741f0ac6a5Smrg*** so that a non-GNU linker is found, and then restart.
72751f0ac6a5Smrg
72761f0ac6a5SmrgEOF
72771f0ac6a5Smrg      fi
72781f0ac6a5Smrg      ;;
72791f0ac6a5Smrg
72801f0ac6a5Smrg    amigaos*)
72811f0ac6a5Smrg      _LT_AC_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)'
72821f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
72831f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
72841f0ac6a5Smrg
72851f0ac6a5Smrg      # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
72861f0ac6a5Smrg      # that the semantics of dynamic libraries on AmigaOS, at least up
72871f0ac6a5Smrg      # to version 4, is to share data among multiple programs linked
72881f0ac6a5Smrg      # with the same dynamic library.  Since this doesn't match the
72891f0ac6a5Smrg      # behavior of shared libraries on other platforms, we can't use
72901f0ac6a5Smrg      # them.
72911f0ac6a5Smrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
72921f0ac6a5Smrg      ;;
72931f0ac6a5Smrg
72941f0ac6a5Smrg    beos*)
72951f0ac6a5Smrg      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
72961f0ac6a5Smrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
72971f0ac6a5Smrg	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
72981f0ac6a5Smrg	# support --undefined.  This deserves some investigation.  FIXME
72991f0ac6a5Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
73001f0ac6a5Smrg      else
73011f0ac6a5Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
73021f0ac6a5Smrg      fi
73031f0ac6a5Smrg      ;;
73041f0ac6a5Smrg
73051f0ac6a5Smrg    cygwin* | mingw* | pw32*)
73061f0ac6a5Smrg      # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
73071f0ac6a5Smrg      # as there is no search path for DLLs.
73081f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
73091f0ac6a5Smrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
73101f0ac6a5Smrg      _LT_AC_TAGVAR(always_export_symbols, $1)=no
73111f0ac6a5Smrg      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
7312e5410a46Smrg      _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
73131f0ac6a5Smrg
73141f0ac6a5Smrg      if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
73151f0ac6a5Smrg        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
73161f0ac6a5Smrg	# If the export-symbols file already is a .def file (1st line
73171f0ac6a5Smrg	# is EXPORTS), use it as is; otherwise, prepend...
73181f0ac6a5Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
73191f0ac6a5Smrg	  cp $export_symbols $output_objdir/$soname.def;
73201f0ac6a5Smrg	else
73211f0ac6a5Smrg	  echo EXPORTS > $output_objdir/$soname.def;
73221f0ac6a5Smrg	  cat $export_symbols >> $output_objdir/$soname.def;
73231f0ac6a5Smrg	fi~
73241f0ac6a5Smrg	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
73251f0ac6a5Smrg      else
73261f0ac6a5Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
73271f0ac6a5Smrg      fi
73281f0ac6a5Smrg      ;;
73291f0ac6a5Smrg
7330e5410a46Smrg    interix[[3-9]]*)
73311f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=no
73321f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
73331f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
73341f0ac6a5Smrg      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
73351f0ac6a5Smrg      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
73361f0ac6a5Smrg      # Instead, shared libraries are loaded at an image base (0x10000000 by
73371f0ac6a5Smrg      # default) and relocated if they conflict, which is a slow very memory
73381f0ac6a5Smrg      # consuming and fragmenting process.  To avoid this, we pick a random,
73391f0ac6a5Smrg      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
73401f0ac6a5Smrg      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
73411f0ac6a5Smrg      _LT_AC_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'
73421f0ac6a5Smrg      _LT_AC_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'
73431f0ac6a5Smrg      ;;
73441f0ac6a5Smrg
7345e5410a46Smrg    gnu* | linux* | k*bsd*-gnu)
73461f0ac6a5Smrg      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
73471f0ac6a5Smrg	tmp_addflag=
73481f0ac6a5Smrg	case $cc_basename,$host_cpu in
73491f0ac6a5Smrg	pgcc*)				# Portland Group C compiler
73501f0ac6a5Smrg	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
73511f0ac6a5Smrg	  tmp_addflag=' $pic_flag'
73521f0ac6a5Smrg	  ;;
73531f0ac6a5Smrg	pgf77* | pgf90* | pgf95*)	# Portland Group f77 and f90 compilers
73541f0ac6a5Smrg	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
73551f0ac6a5Smrg	  tmp_addflag=' $pic_flag -Mnomain' ;;
73561f0ac6a5Smrg	ecc*,ia64* | icc*,ia64*)		# Intel C compiler on ia64
73571f0ac6a5Smrg	  tmp_addflag=' -i_dynamic' ;;
73581f0ac6a5Smrg	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
73591f0ac6a5Smrg	  tmp_addflag=' -i_dynamic -nofor_main' ;;
73601f0ac6a5Smrg	ifc* | ifort*)			# Intel Fortran compiler
73611f0ac6a5Smrg	  tmp_addflag=' -nofor_main' ;;
73621f0ac6a5Smrg	esac
7363e5410a46Smrg	case `$CC -V 2>&1 | sed 5q` in
7364e5410a46Smrg	*Sun\ C*)			# Sun C 5.9
7365e5410a46Smrg	  _LT_AC_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; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
7366e5410a46Smrg	  tmp_sharedflag='-G' ;;
7367e5410a46Smrg	*Sun\ F*)			# Sun Fortran 8.3
7368e5410a46Smrg	  tmp_sharedflag='-G' ;;
7369e5410a46Smrg	*)
7370e5410a46Smrg	  tmp_sharedflag='-shared' ;;
7371e5410a46Smrg	esac
7372e5410a46Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
73731f0ac6a5Smrg
73741f0ac6a5Smrg	if test $supports_anon_versioning = yes; then
73751f0ac6a5Smrg	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~
73761f0ac6a5Smrg  cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
73771f0ac6a5Smrg  $echo "local: *; };" >> $output_objdir/$libname.ver~
7378e5410a46Smrg	  $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
73791f0ac6a5Smrg	fi
73801f0ac6a5Smrg      else
73811f0ac6a5Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
73821f0ac6a5Smrg      fi
73831f0ac6a5Smrg      ;;
73841f0ac6a5Smrg
73851f0ac6a5Smrg    netbsd*)
73861f0ac6a5Smrg      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
73871f0ac6a5Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
73881f0ac6a5Smrg	wlarc=
73891f0ac6a5Smrg      else
73901f0ac6a5Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
73911f0ac6a5Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
73921f0ac6a5Smrg      fi
73931f0ac6a5Smrg      ;;
73941f0ac6a5Smrg
73951f0ac6a5Smrg    solaris*)
73961f0ac6a5Smrg      if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
73971f0ac6a5Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
73981f0ac6a5Smrg	cat <<EOF 1>&2
73991f0ac6a5Smrg
74001f0ac6a5Smrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably
74011f0ac6a5Smrg*** create shared libraries on Solaris systems.  Therefore, libtool
74021f0ac6a5Smrg*** is disabling shared libraries support.  We urge you to upgrade GNU
74031f0ac6a5Smrg*** binutils to release 2.9.1 or newer.  Another option is to modify
74041f0ac6a5Smrg*** your PATH or compiler configuration so that the native linker is
74051f0ac6a5Smrg*** used, and then restart.
74061f0ac6a5Smrg
74071f0ac6a5SmrgEOF
74081f0ac6a5Smrg      elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
74091f0ac6a5Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
74101f0ac6a5Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
74111f0ac6a5Smrg      else
74121f0ac6a5Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
74131f0ac6a5Smrg      fi
74141f0ac6a5Smrg      ;;
74151f0ac6a5Smrg
74161f0ac6a5Smrg    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
74171f0ac6a5Smrg      case `$LD -v 2>&1` in
7418e5410a46Smrg        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
74191f0ac6a5Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
74201f0ac6a5Smrg	cat <<_LT_EOF 1>&2
74211f0ac6a5Smrg
74221f0ac6a5Smrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
74231f0ac6a5Smrg*** reliably create shared libraries on SCO systems.  Therefore, libtool
74241f0ac6a5Smrg*** is disabling shared libraries support.  We urge you to upgrade GNU
74251f0ac6a5Smrg*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
74261f0ac6a5Smrg*** your PATH or compiler configuration so that the native linker is
74271f0ac6a5Smrg*** used, and then restart.
74281f0ac6a5Smrg
74291f0ac6a5Smrg_LT_EOF
74301f0ac6a5Smrg	;;
74311f0ac6a5Smrg	*)
74321f0ac6a5Smrg	  if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
74331f0ac6a5Smrg	    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
74341f0ac6a5Smrg	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib'
74351f0ac6a5Smrg	    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib'
74361f0ac6a5Smrg	  else
74371f0ac6a5Smrg	    _LT_AC_TAGVAR(ld_shlibs, $1)=no
74381f0ac6a5Smrg	  fi
74391f0ac6a5Smrg	;;
74401f0ac6a5Smrg      esac
74411f0ac6a5Smrg      ;;
74421f0ac6a5Smrg
74431f0ac6a5Smrg    sunos4*)
74441f0ac6a5Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
74451f0ac6a5Smrg      wlarc=
74461f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
74471f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
74481f0ac6a5Smrg      ;;
74491f0ac6a5Smrg
74501f0ac6a5Smrg    *)
74511f0ac6a5Smrg      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
74521f0ac6a5Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
74531f0ac6a5Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
74541f0ac6a5Smrg      else
74551f0ac6a5Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
74561f0ac6a5Smrg      fi
74571f0ac6a5Smrg      ;;
74581f0ac6a5Smrg    esac
74591f0ac6a5Smrg
74601f0ac6a5Smrg    if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then
74611f0ac6a5Smrg      runpath_var=
74621f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
74631f0ac6a5Smrg      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
74641f0ac6a5Smrg      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
74651f0ac6a5Smrg    fi
74661f0ac6a5Smrg  else
74671f0ac6a5Smrg    # PORTME fill in a description of your system's linker (not GNU ld)
74681f0ac6a5Smrg    case $host_os in
74691f0ac6a5Smrg    aix3*)
74701f0ac6a5Smrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
74711f0ac6a5Smrg      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
74721f0ac6a5Smrg      _LT_AC_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'
74731f0ac6a5Smrg      # Note: this linker hardcodes the directories in LIBPATH if there
74741f0ac6a5Smrg      # are no directories specified by -L.
74751f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
74761f0ac6a5Smrg      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
74771f0ac6a5Smrg	# Neither direct hardcoding nor static linking is supported with a
74781f0ac6a5Smrg	# broken collect2.
74791f0ac6a5Smrg	_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
74801f0ac6a5Smrg      fi
74811f0ac6a5Smrg      ;;
74821f0ac6a5Smrg
7483e5410a46Smrg    aix[[4-9]]*)
74841f0ac6a5Smrg      if test "$host_cpu" = ia64; then
74851f0ac6a5Smrg	# On IA64, the linker does run time linking by default, so we don't
74861f0ac6a5Smrg	# have to do anything special.
74871f0ac6a5Smrg	aix_use_runtimelinking=no
74881f0ac6a5Smrg	exp_sym_flag='-Bexport'
74891f0ac6a5Smrg	no_entry_flag=""
74901f0ac6a5Smrg      else
74911f0ac6a5Smrg	# If we're using GNU nm, then we don't want the "-C" option.
74921f0ac6a5Smrg	# -C means demangle to AIX nm, but means don't demangle with GNU nm
74931f0ac6a5Smrg	if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
74941f0ac6a5Smrg	  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
74951f0ac6a5Smrg	else
74961f0ac6a5Smrg	  _LT_AC_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'
74971f0ac6a5Smrg	fi
74981f0ac6a5Smrg	aix_use_runtimelinking=no
74991f0ac6a5Smrg
75001f0ac6a5Smrg	# Test if we are trying to use run time linking or normal
75011f0ac6a5Smrg	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
75021f0ac6a5Smrg	# need to do runtime linking.
7503e5410a46Smrg	case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
75041f0ac6a5Smrg	  for ld_flag in $LDFLAGS; do
75051f0ac6a5Smrg  	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
75061f0ac6a5Smrg  	    aix_use_runtimelinking=yes
75071f0ac6a5Smrg  	    break
75081f0ac6a5Smrg  	  fi
75091f0ac6a5Smrg	  done
75101f0ac6a5Smrg	  ;;
75111f0ac6a5Smrg	esac
75121f0ac6a5Smrg
75131f0ac6a5Smrg	exp_sym_flag='-bexport'
75141f0ac6a5Smrg	no_entry_flag='-bnoentry'
75151f0ac6a5Smrg      fi
75161f0ac6a5Smrg
75171f0ac6a5Smrg      # When large executables or shared objects are built, AIX ld can
75181f0ac6a5Smrg      # have problems creating the table of contents.  If linking a library
75191f0ac6a5Smrg      # or program results in "error TOC overflow" add -mminimal-toc to
75201f0ac6a5Smrg      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
75211f0ac6a5Smrg      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
75221f0ac6a5Smrg
75231f0ac6a5Smrg      _LT_AC_TAGVAR(archive_cmds, $1)=''
75241f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
75251f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
75261f0ac6a5Smrg      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
75271f0ac6a5Smrg
75281f0ac6a5Smrg      if test "$GCC" = yes; then
75291f0ac6a5Smrg	case $host_os in aix4.[[012]]|aix4.[[012]].*)
75301f0ac6a5Smrg	# We only want to do this on AIX 4.2 and lower, the check
75311f0ac6a5Smrg	# below for broken collect2 doesn't work under 4.3+
75321f0ac6a5Smrg	  collect2name=`${CC} -print-prog-name=collect2`
75331f0ac6a5Smrg	  if test -f "$collect2name" && \
75341f0ac6a5Smrg  	   strings "$collect2name" | grep resolve_lib_name >/dev/null
75351f0ac6a5Smrg	  then
75361f0ac6a5Smrg  	  # We have reworked collect2
7537e5410a46Smrg  	  :
75381f0ac6a5Smrg	  else
75391f0ac6a5Smrg  	  # We have old collect2
75401f0ac6a5Smrg  	  _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
75411f0ac6a5Smrg  	  # It fails to find uninstalled libraries when the uninstalled
75421f0ac6a5Smrg  	  # path is not listed in the libpath.  Setting hardcode_minus_L
75431f0ac6a5Smrg  	  # to unsupported forces relinking
75441f0ac6a5Smrg  	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
75451f0ac6a5Smrg  	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
75461f0ac6a5Smrg  	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
75471f0ac6a5Smrg	  fi
75481f0ac6a5Smrg	  ;;
75491f0ac6a5Smrg	esac
75501f0ac6a5Smrg	shared_flag='-shared'
75511f0ac6a5Smrg	if test "$aix_use_runtimelinking" = yes; then
75521f0ac6a5Smrg	  shared_flag="$shared_flag "'${wl}-G'
75531f0ac6a5Smrg	fi
75541f0ac6a5Smrg      else
75551f0ac6a5Smrg	# not using gcc
75561f0ac6a5Smrg	if test "$host_cpu" = ia64; then
75571f0ac6a5Smrg  	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
75581f0ac6a5Smrg  	# chokes on -Wl,-G. The following line is correct:
75591f0ac6a5Smrg	  shared_flag='-G'
75601f0ac6a5Smrg	else
75611f0ac6a5Smrg	  if test "$aix_use_runtimelinking" = yes; then
75621f0ac6a5Smrg	    shared_flag='${wl}-G'
75631f0ac6a5Smrg	  else
75641f0ac6a5Smrg	    shared_flag='${wl}-bM:SRE'
75651f0ac6a5Smrg	  fi
75661f0ac6a5Smrg	fi
75671f0ac6a5Smrg      fi
75681f0ac6a5Smrg
75691f0ac6a5Smrg      # It seems that -bexpall does not export symbols beginning with
75701f0ac6a5Smrg      # underscore (_), so it is better to generate a list of symbols to export.
75711f0ac6a5Smrg      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
75721f0ac6a5Smrg      if test "$aix_use_runtimelinking" = yes; then
75731f0ac6a5Smrg	# Warning - without using the other runtime loading flags (-brtl),
75741f0ac6a5Smrg	# -berok will link without error, but may produce a broken library.
75751f0ac6a5Smrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
75761f0ac6a5Smrg       # Determine the default libpath from the value encoded in an empty executable.
75771f0ac6a5Smrg       _LT_AC_SYS_LIBPATH_AIX
75781f0ac6a5Smrg       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
75791f0ac6a5Smrg	_LT_AC_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 echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
75801f0ac6a5Smrg       else
75811f0ac6a5Smrg	if test "$host_cpu" = ia64; then
75821f0ac6a5Smrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
75831f0ac6a5Smrg	  _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
75841f0ac6a5Smrg	  _LT_AC_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"
75851f0ac6a5Smrg	else
75861f0ac6a5Smrg	 # Determine the default libpath from the value encoded in an empty executable.
75871f0ac6a5Smrg	 _LT_AC_SYS_LIBPATH_AIX
75881f0ac6a5Smrg	 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
75891f0ac6a5Smrg	  # Warning - without using the other run time loading flags,
75901f0ac6a5Smrg	  # -berok will link without error, but may produce a broken library.
75911f0ac6a5Smrg	  _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
75921f0ac6a5Smrg	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
75931f0ac6a5Smrg	  # Exported symbols can be pulled into shared objects from archives
75941f0ac6a5Smrg	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
75951f0ac6a5Smrg	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
75961f0ac6a5Smrg	  # This is similar to how AIX traditionally builds its shared libraries.
75971f0ac6a5Smrg	  _LT_AC_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'
75981f0ac6a5Smrg	fi
75991f0ac6a5Smrg      fi
76001f0ac6a5Smrg      ;;
76011f0ac6a5Smrg
76021f0ac6a5Smrg    amigaos*)
76031f0ac6a5Smrg      _LT_AC_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)'
76041f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
76051f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
76061f0ac6a5Smrg      # see comment about different semantics on the GNU ld section
76071f0ac6a5Smrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
76081f0ac6a5Smrg      ;;
76091f0ac6a5Smrg
76101f0ac6a5Smrg    bsdi[[45]]*)
76111f0ac6a5Smrg      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
76121f0ac6a5Smrg      ;;
76131f0ac6a5Smrg
76141f0ac6a5Smrg    cygwin* | mingw* | pw32*)
76151f0ac6a5Smrg      # When not using gcc, we currently assume that we are using
76161f0ac6a5Smrg      # Microsoft Visual C++.
76171f0ac6a5Smrg      # hardcode_libdir_flag_spec is actually meaningless, as there is
76181f0ac6a5Smrg      # no search path for DLLs.
76191f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
76201f0ac6a5Smrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
76211f0ac6a5Smrg      # Tell ltmain to make .lib files, not .a files.
76221f0ac6a5Smrg      libext=lib
76231f0ac6a5Smrg      # Tell ltmain to make .dll files, not .so files.
76241f0ac6a5Smrg      shrext_cmds=".dll"
76251f0ac6a5Smrg      # FIXME: Setting linknames here is a bad hack.
76261f0ac6a5Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
76271f0ac6a5Smrg      # The linker will automatically build a .lib file if we build a DLL.
76281f0ac6a5Smrg      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
76291f0ac6a5Smrg      # FIXME: Should let the user specify the lib program.
7630e5410a46Smrg      _LT_AC_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
76311f0ac6a5Smrg      _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
76321f0ac6a5Smrg      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
76331f0ac6a5Smrg      ;;
76341f0ac6a5Smrg
76351f0ac6a5Smrg    darwin* | rhapsody*)
76361f0ac6a5Smrg      case $host_os in
76371f0ac6a5Smrg        rhapsody* | darwin1.[[012]])
76381f0ac6a5Smrg         _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
76391f0ac6a5Smrg         ;;
76401f0ac6a5Smrg       *) # Darwin 1.3 on
76411f0ac6a5Smrg         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
76421f0ac6a5Smrg           _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
76431f0ac6a5Smrg         else
76441f0ac6a5Smrg           case ${MACOSX_DEPLOYMENT_TARGET} in
76451f0ac6a5Smrg             10.[[012]])
76461f0ac6a5Smrg               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
76471f0ac6a5Smrg               ;;
76481f0ac6a5Smrg             10.*)
76491f0ac6a5Smrg               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
76501f0ac6a5Smrg               ;;
76511f0ac6a5Smrg           esac
76521f0ac6a5Smrg         fi
76531f0ac6a5Smrg         ;;
76541f0ac6a5Smrg      esac
76551f0ac6a5Smrg      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
76561f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=no
76571f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
76581f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
76591f0ac6a5Smrg      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
76601f0ac6a5Smrg      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
76611f0ac6a5Smrg    if test "$GCC" = yes ; then
76621f0ac6a5Smrg    	output_verbose_link_cmd='echo'
7663e5410a46Smrg        _LT_AC_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}"
7664e5410a46Smrg        _LT_AC_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
7665e5410a46Smrg        _LT_AC_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}"
7666e5410a46Smrg        _LT_AC_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}"
76671f0ac6a5Smrg    else
76681f0ac6a5Smrg      case $cc_basename in
76691f0ac6a5Smrg        xlc*)
76701f0ac6a5Smrg         output_verbose_link_cmd='echo'
7671e5410a46Smrg         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring'
76721f0ac6a5Smrg         _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
76731f0ac6a5Smrg          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
7674e5410a46Smrg         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
76751f0ac6a5Smrg          _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
76761f0ac6a5Smrg          ;;
76771f0ac6a5Smrg       *)
76781f0ac6a5Smrg         _LT_AC_TAGVAR(ld_shlibs, $1)=no
76791f0ac6a5Smrg          ;;
76801f0ac6a5Smrg      esac
76811f0ac6a5Smrg    fi
76821f0ac6a5Smrg      ;;
76831f0ac6a5Smrg
76841f0ac6a5Smrg    dgux*)
76851f0ac6a5Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
76861f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
76871f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
76881f0ac6a5Smrg      ;;
76891f0ac6a5Smrg
76901f0ac6a5Smrg    freebsd1*)
76911f0ac6a5Smrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
76921f0ac6a5Smrg      ;;
76931f0ac6a5Smrg
76941f0ac6a5Smrg    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
76951f0ac6a5Smrg    # support.  Future versions do this automatically, but an explicit c++rt0.o
76961f0ac6a5Smrg    # does not break anything, and helps significantly (at the cost of a little
76971f0ac6a5Smrg    # extra space).
76981f0ac6a5Smrg    freebsd2.2*)
76991f0ac6a5Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
77001f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
77011f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
77021f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
77031f0ac6a5Smrg      ;;
77041f0ac6a5Smrg
77051f0ac6a5Smrg    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
77061f0ac6a5Smrg    freebsd2*)
77071f0ac6a5Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
77081f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
77091f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
77101f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
77111f0ac6a5Smrg      ;;
77121f0ac6a5Smrg
77131f0ac6a5Smrg    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
7714e5410a46Smrg    freebsd* | dragonfly*)
77151f0ac6a5Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
77161f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
77171f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
77181f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
77191f0ac6a5Smrg      ;;
77201f0ac6a5Smrg
77211f0ac6a5Smrg    hpux9*)
77221f0ac6a5Smrg      if test "$GCC" = yes; then
77231f0ac6a5Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
77241f0ac6a5Smrg      else
77251f0ac6a5Smrg	_LT_AC_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'
77261f0ac6a5Smrg      fi
77271f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
77281f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
77291f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
77301f0ac6a5Smrg
77311f0ac6a5Smrg      # hardcode_minus_L: Not really in the search PATH,
77321f0ac6a5Smrg      # but as the default location of the library.
77331f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
77341f0ac6a5Smrg      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
77351f0ac6a5Smrg      ;;
77361f0ac6a5Smrg
77371f0ac6a5Smrg    hpux10*)
77381f0ac6a5Smrg      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
77391f0ac6a5Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
77401f0ac6a5Smrg      else
77411f0ac6a5Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
77421f0ac6a5Smrg      fi
77431f0ac6a5Smrg      if test "$with_gnu_ld" = no; then
77441f0ac6a5Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
77451f0ac6a5Smrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
77461f0ac6a5Smrg
77471f0ac6a5Smrg	_LT_AC_TAGVAR(hardcode_direct, $1)=yes
77481f0ac6a5Smrg	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
77491f0ac6a5Smrg
77501f0ac6a5Smrg	# hardcode_minus_L: Not really in the search PATH,
77511f0ac6a5Smrg	# but as the default location of the library.
77521f0ac6a5Smrg	_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
77531f0ac6a5Smrg      fi
77541f0ac6a5Smrg      ;;
77551f0ac6a5Smrg
77561f0ac6a5Smrg    hpux11*)
77571f0ac6a5Smrg      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
77581f0ac6a5Smrg	case $host_cpu in
77591f0ac6a5Smrg	hppa*64*)
77601f0ac6a5Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
77611f0ac6a5Smrg	  ;;
77621f0ac6a5Smrg	ia64*)
77631f0ac6a5Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
77641f0ac6a5Smrg	  ;;
77651f0ac6a5Smrg	*)
77661f0ac6a5Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
77671f0ac6a5Smrg	  ;;
77681f0ac6a5Smrg	esac
77691f0ac6a5Smrg      else
77701f0ac6a5Smrg	case $host_cpu in
77711f0ac6a5Smrg	hppa*64*)
77721f0ac6a5Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
77731f0ac6a5Smrg	  ;;
77741f0ac6a5Smrg	ia64*)
77751f0ac6a5Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
77761f0ac6a5Smrg	  ;;
77771f0ac6a5Smrg	*)
77781f0ac6a5Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
77791f0ac6a5Smrg	  ;;
77801f0ac6a5Smrg	esac
77811f0ac6a5Smrg      fi
77821f0ac6a5Smrg      if test "$with_gnu_ld" = no; then
77831f0ac6a5Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
77841f0ac6a5Smrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
77851f0ac6a5Smrg
77861f0ac6a5Smrg	case $host_cpu in
77871f0ac6a5Smrg	hppa*64*|ia64*)
77881f0ac6a5Smrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
77891f0ac6a5Smrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=no
77901f0ac6a5Smrg	  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
77911f0ac6a5Smrg	  ;;
77921f0ac6a5Smrg	*)
77931f0ac6a5Smrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes
77941f0ac6a5Smrg	  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
77951f0ac6a5Smrg
77961f0ac6a5Smrg	  # hardcode_minus_L: Not really in the search PATH,
77971f0ac6a5Smrg	  # but as the default location of the library.
77981f0ac6a5Smrg	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
77991f0ac6a5Smrg	  ;;
78001f0ac6a5Smrg	esac
78011f0ac6a5Smrg      fi
78021f0ac6a5Smrg      ;;
78031f0ac6a5Smrg
78041f0ac6a5Smrg    irix5* | irix6* | nonstopux*)
78051f0ac6a5Smrg      if test "$GCC" = yes; then
78061f0ac6a5Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
78071f0ac6a5Smrg      else
78081f0ac6a5Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
78091f0ac6a5Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
78101f0ac6a5Smrg      fi
78111f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
78121f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
78131f0ac6a5Smrg      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
78141f0ac6a5Smrg      ;;
78151f0ac6a5Smrg
78161f0ac6a5Smrg    netbsd*)
78171f0ac6a5Smrg      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
78181f0ac6a5Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
78191f0ac6a5Smrg      else
78201f0ac6a5Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
78211f0ac6a5Smrg      fi
78221f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
78231f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
78241f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
78251f0ac6a5Smrg      ;;
78261f0ac6a5Smrg
78271f0ac6a5Smrg    newsos6)
78281f0ac6a5Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
78291f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
78301f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
78311f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
78321f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
78331f0ac6a5Smrg      ;;
78341f0ac6a5Smrg
78351f0ac6a5Smrg    openbsd*)
7836e5410a46Smrg      if test -f /usr/libexec/ld.so; then
7837e5410a46Smrg	_LT_AC_TAGVAR(hardcode_direct, $1)=yes
7838e5410a46Smrg	_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7839e5410a46Smrg	if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
7840e5410a46Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
7841e5410a46Smrg	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
7842e5410a46Smrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7843e5410a46Smrg	  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7844e5410a46Smrg	else
7845e5410a46Smrg	  case $host_os in
7846e5410a46Smrg	   openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
7847e5410a46Smrg	     _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
7848e5410a46Smrg	     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7849e5410a46Smrg	     ;;
7850e5410a46Smrg	   *)
7851e5410a46Smrg	     _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
7852e5410a46Smrg	     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7853e5410a46Smrg	     ;;
7854e5410a46Smrg	  esac
7855e5410a46Smrg        fi
78561f0ac6a5Smrg      else
7857e5410a46Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
78581f0ac6a5Smrg      fi
78591f0ac6a5Smrg      ;;
78601f0ac6a5Smrg
78611f0ac6a5Smrg    os2*)
78621f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
78631f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
78641f0ac6a5Smrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
78651f0ac6a5Smrg      _LT_AC_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'
78661f0ac6a5Smrg      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
78671f0ac6a5Smrg      ;;
78681f0ac6a5Smrg
78691f0ac6a5Smrg    osf3*)
78701f0ac6a5Smrg      if test "$GCC" = yes; then
78711f0ac6a5Smrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
78721f0ac6a5Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
78731f0ac6a5Smrg      else
78741f0ac6a5Smrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
78751f0ac6a5Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
78761f0ac6a5Smrg      fi
78771f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
78781f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
78791f0ac6a5Smrg      ;;
78801f0ac6a5Smrg
78811f0ac6a5Smrg    osf4* | osf5*)	# as osf3* with the addition of -msym flag
78821f0ac6a5Smrg      if test "$GCC" = yes; then
78831f0ac6a5Smrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
78841f0ac6a5Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
78851f0ac6a5Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
78861f0ac6a5Smrg      else
78871f0ac6a5Smrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
78881f0ac6a5Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
78891f0ac6a5Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
78901f0ac6a5Smrg	$LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp'
78911f0ac6a5Smrg
78921f0ac6a5Smrg	# Both c and cxx compiler support -rpath directly
78931f0ac6a5Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
78941f0ac6a5Smrg      fi
78951f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
78961f0ac6a5Smrg      ;;
78971f0ac6a5Smrg
78981f0ac6a5Smrg    solaris*)
78991f0ac6a5Smrg      _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
79001f0ac6a5Smrg      if test "$GCC" = yes; then
79011f0ac6a5Smrg	wlarc='${wl}'
79021f0ac6a5Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
79031f0ac6a5Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
79041f0ac6a5Smrg	  $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
79051f0ac6a5Smrg      else
79061f0ac6a5Smrg	wlarc=''
79071f0ac6a5Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
79081f0ac6a5Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
79091f0ac6a5Smrg  	$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
79101f0ac6a5Smrg      fi
79111f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
79121f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
79131f0ac6a5Smrg      case $host_os in
79141f0ac6a5Smrg      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
79151f0ac6a5Smrg      *)
7916e5410a46Smrg	# The compiler driver will combine and reorder linker options,
7917e5410a46Smrg	# but understands `-z linker_flag'.  GCC discards it without `$wl',
7918e5410a46Smrg	# but is careful enough not to reorder.
79191f0ac6a5Smrg 	# Supported since Solaris 2.6 (maybe 2.5.1?)
7920e5410a46Smrg	if test "$GCC" = yes; then
7921e5410a46Smrg	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
7922e5410a46Smrg	else
7923e5410a46Smrg	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
7924e5410a46Smrg	fi
7925e5410a46Smrg	;;
79261f0ac6a5Smrg      esac
79271f0ac6a5Smrg      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
79281f0ac6a5Smrg      ;;
79291f0ac6a5Smrg
79301f0ac6a5Smrg    sunos4*)
79311f0ac6a5Smrg      if test "x$host_vendor" = xsequent; then
79321f0ac6a5Smrg	# Use $CC to link under sequent, because it throws in some extra .o
79331f0ac6a5Smrg	# files that make .init and .fini sections work.
79341f0ac6a5Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
79351f0ac6a5Smrg      else
79361f0ac6a5Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
79371f0ac6a5Smrg      fi
79381f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
79391f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
79401f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
79411f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
79421f0ac6a5Smrg      ;;
79431f0ac6a5Smrg
79441f0ac6a5Smrg    sysv4)
79451f0ac6a5Smrg      case $host_vendor in
79461f0ac6a5Smrg	sni)
79471f0ac6a5Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
79481f0ac6a5Smrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
79491f0ac6a5Smrg	;;
79501f0ac6a5Smrg	siemens)
79511f0ac6a5Smrg	  ## LD is ld it makes a PLAMLIB
79521f0ac6a5Smrg	  ## CC just makes a GrossModule.
79531f0ac6a5Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
79541f0ac6a5Smrg	  _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
79551f0ac6a5Smrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=no
79561f0ac6a5Smrg        ;;
79571f0ac6a5Smrg	motorola)
79581f0ac6a5Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
79591f0ac6a5Smrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
79601f0ac6a5Smrg	;;
79611f0ac6a5Smrg      esac
79621f0ac6a5Smrg      runpath_var='LD_RUN_PATH'
79631f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
79641f0ac6a5Smrg      ;;
79651f0ac6a5Smrg
79661f0ac6a5Smrg    sysv4.3*)
79671f0ac6a5Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
79681f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
79691f0ac6a5Smrg      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
79701f0ac6a5Smrg      ;;
79711f0ac6a5Smrg
79721f0ac6a5Smrg    sysv4*MP*)
79731f0ac6a5Smrg      if test -d /usr/nec; then
79741f0ac6a5Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
79751f0ac6a5Smrg	_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
79761f0ac6a5Smrg	runpath_var=LD_RUN_PATH
79771f0ac6a5Smrg	hardcode_runpath_var=yes
79781f0ac6a5Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=yes
79791f0ac6a5Smrg      fi
79801f0ac6a5Smrg      ;;
79811f0ac6a5Smrg
7982e5410a46Smrg    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
79831f0ac6a5Smrg      _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
79841f0ac6a5Smrg      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
79851f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
79861f0ac6a5Smrg      runpath_var='LD_RUN_PATH'
79871f0ac6a5Smrg
79881f0ac6a5Smrg      if test "$GCC" = yes; then
79891f0ac6a5Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
79901f0ac6a5Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
79911f0ac6a5Smrg      else
79921f0ac6a5Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
79931f0ac6a5Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
79941f0ac6a5Smrg      fi
79951f0ac6a5Smrg      ;;
79961f0ac6a5Smrg
79971f0ac6a5Smrg    sysv5* | sco3.2v5* | sco5v6*)
79981f0ac6a5Smrg      # Note: We can NOT use -z defs as we might desire, because we do not
79991f0ac6a5Smrg      # link with -lc, and that would cause any symbols used from libc to
80001f0ac6a5Smrg      # always be unresolved, which means just about no library would
80011f0ac6a5Smrg      # ever link correctly.  If we're not using GNU ld we use -z text
80021f0ac6a5Smrg      # though, which does catch some bad symbols but isn't as heavy-handed
80031f0ac6a5Smrg      # as -z defs.
80041f0ac6a5Smrg      _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
80051f0ac6a5Smrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
80061f0ac6a5Smrg      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
80071f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
80081f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
80091f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
80101f0ac6a5Smrg      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
80111f0ac6a5Smrg      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
80121f0ac6a5Smrg      runpath_var='LD_RUN_PATH'
80131f0ac6a5Smrg
80141f0ac6a5Smrg      if test "$GCC" = yes; then
80151f0ac6a5Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
80161f0ac6a5Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
80171f0ac6a5Smrg      else
80181f0ac6a5Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
80191f0ac6a5Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
80201f0ac6a5Smrg      fi
80211f0ac6a5Smrg      ;;
80221f0ac6a5Smrg
80231f0ac6a5Smrg    uts4*)
80241f0ac6a5Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
80251f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
80261f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
80271f0ac6a5Smrg      ;;
80281f0ac6a5Smrg
80291f0ac6a5Smrg    *)
80301f0ac6a5Smrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
80311f0ac6a5Smrg      ;;
80321f0ac6a5Smrg    esac
80331f0ac6a5Smrg  fi
80341f0ac6a5Smrg])
80351f0ac6a5SmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
80361f0ac6a5Smrgtest "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
80371f0ac6a5Smrg
80381f0ac6a5Smrg#
80391f0ac6a5Smrg# Do we need to explicitly link libc?
80401f0ac6a5Smrg#
80411f0ac6a5Smrgcase "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
80421f0ac6a5Smrgx|xyes)
80431f0ac6a5Smrg  # Assume -lc should be added
80441f0ac6a5Smrg  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
80451f0ac6a5Smrg
80461f0ac6a5Smrg  if test "$enable_shared" = yes && test "$GCC" = yes; then
80471f0ac6a5Smrg    case $_LT_AC_TAGVAR(archive_cmds, $1) in
80481f0ac6a5Smrg    *'~'*)
80491f0ac6a5Smrg      # FIXME: we may have to deal with multi-command sequences.
80501f0ac6a5Smrg      ;;
80511f0ac6a5Smrg    '$CC '*)
80521f0ac6a5Smrg      # Test whether the compiler implicitly links with -lc since on some
80531f0ac6a5Smrg      # systems, -lgcc has to come before -lc. If gcc already passes -lc
80541f0ac6a5Smrg      # to ld, don't add -lc before -lgcc.
80551f0ac6a5Smrg      AC_MSG_CHECKING([whether -lc should be explicitly linked in])
80561f0ac6a5Smrg      $rm conftest*
8057e5410a46Smrg      echo "$lt_simple_compile_test_code" > conftest.$ac_ext
80581f0ac6a5Smrg
80591f0ac6a5Smrg      if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
80601f0ac6a5Smrg        soname=conftest
80611f0ac6a5Smrg        lib=conftest
80621f0ac6a5Smrg        libobjs=conftest.$ac_objext
80631f0ac6a5Smrg        deplibs=
80641f0ac6a5Smrg        wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
80651f0ac6a5Smrg	pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
80661f0ac6a5Smrg        compiler_flags=-v
80671f0ac6a5Smrg        linker_flags=-v
80681f0ac6a5Smrg        verstring=
80691f0ac6a5Smrg        output_objdir=.
80701f0ac6a5Smrg        libname=conftest
80711f0ac6a5Smrg        lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
80721f0ac6a5Smrg        _LT_AC_TAGVAR(allow_undefined_flag, $1)=
80731f0ac6a5Smrg        if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
80741f0ac6a5Smrg        then
80751f0ac6a5Smrg	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
80761f0ac6a5Smrg        else
80771f0ac6a5Smrg	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
80781f0ac6a5Smrg        fi
80791f0ac6a5Smrg        _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
80801f0ac6a5Smrg      else
80811f0ac6a5Smrg        cat conftest.err 1>&5
80821f0ac6a5Smrg      fi
80831f0ac6a5Smrg      $rm conftest*
80841f0ac6a5Smrg      AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
80851f0ac6a5Smrg      ;;
80861f0ac6a5Smrg    esac
80871f0ac6a5Smrg  fi
80881f0ac6a5Smrg  ;;
80891f0ac6a5Smrgesac
80901f0ac6a5Smrg])# AC_LIBTOOL_PROG_LD_SHLIBS
80911f0ac6a5Smrg
80921f0ac6a5Smrg
80931f0ac6a5Smrg# _LT_AC_FILE_LTDLL_C
80941f0ac6a5Smrg# -------------------
80951f0ac6a5Smrg# Be careful that the start marker always follows a newline.
80961f0ac6a5SmrgAC_DEFUN([_LT_AC_FILE_LTDLL_C], [
80971f0ac6a5Smrg# /* ltdll.c starts here */
80981f0ac6a5Smrg# #define WIN32_LEAN_AND_MEAN
80991f0ac6a5Smrg# #include <windows.h>
81001f0ac6a5Smrg# #undef WIN32_LEAN_AND_MEAN
81011f0ac6a5Smrg# #include <stdio.h>
81021f0ac6a5Smrg#
81031f0ac6a5Smrg# #ifndef __CYGWIN__
81041f0ac6a5Smrg# #  ifdef __CYGWIN32__
81051f0ac6a5Smrg# #    define __CYGWIN__ __CYGWIN32__
81061f0ac6a5Smrg# #  endif
81071f0ac6a5Smrg# #endif
81081f0ac6a5Smrg#
81091f0ac6a5Smrg# #ifdef __cplusplus
81101f0ac6a5Smrg# extern "C" {
81111f0ac6a5Smrg# #endif
81121f0ac6a5Smrg# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
81131f0ac6a5Smrg# #ifdef __cplusplus
81141f0ac6a5Smrg# }
81151f0ac6a5Smrg# #endif
81161f0ac6a5Smrg#
81171f0ac6a5Smrg# #ifdef __CYGWIN__
81181f0ac6a5Smrg# #include <cygwin/cygwin_dll.h>
81191f0ac6a5Smrg# DECLARE_CYGWIN_DLL( DllMain );
81201f0ac6a5Smrg# #endif
81211f0ac6a5Smrg# HINSTANCE __hDllInstance_base;
81221f0ac6a5Smrg#
81231f0ac6a5Smrg# BOOL APIENTRY
81241f0ac6a5Smrg# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
81251f0ac6a5Smrg# {
81261f0ac6a5Smrg#   __hDllInstance_base = hInst;
81271f0ac6a5Smrg#   return TRUE;
81281f0ac6a5Smrg# }
81291f0ac6a5Smrg# /* ltdll.c ends here */
81301f0ac6a5Smrg])# _LT_AC_FILE_LTDLL_C
81311f0ac6a5Smrg
81321f0ac6a5Smrg
81331f0ac6a5Smrg# _LT_AC_TAGVAR(VARNAME, [TAGNAME])
81341f0ac6a5Smrg# ---------------------------------
81351f0ac6a5SmrgAC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
81361f0ac6a5Smrg
81371f0ac6a5Smrg
81381f0ac6a5Smrg# old names
81391f0ac6a5SmrgAC_DEFUN([AM_PROG_LIBTOOL],   [AC_PROG_LIBTOOL])
81401f0ac6a5SmrgAC_DEFUN([AM_ENABLE_SHARED],  [AC_ENABLE_SHARED($@)])
81411f0ac6a5SmrgAC_DEFUN([AM_ENABLE_STATIC],  [AC_ENABLE_STATIC($@)])
81421f0ac6a5SmrgAC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
81431f0ac6a5SmrgAC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
81441f0ac6a5SmrgAC_DEFUN([AM_PROG_LD],        [AC_PROG_LD])
81451f0ac6a5SmrgAC_DEFUN([AM_PROG_NM],        [AC_PROG_NM])
81461f0ac6a5Smrg
81471f0ac6a5Smrg# This is just to silence aclocal about the macro not being used
81481f0ac6a5Smrgifelse([AC_DISABLE_FAST_INSTALL])
81491f0ac6a5Smrg
81501f0ac6a5SmrgAC_DEFUN([LT_AC_PROG_GCJ],
81511f0ac6a5Smrg[AC_CHECK_TOOL(GCJ, gcj, no)
81521f0ac6a5Smrg  test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
81531f0ac6a5Smrg  AC_SUBST(GCJFLAGS)
81541f0ac6a5Smrg])
81551f0ac6a5Smrg
81561f0ac6a5SmrgAC_DEFUN([LT_AC_PROG_RC],
81571f0ac6a5Smrg[AC_CHECK_TOOL(RC, windres, no)
81581f0ac6a5Smrg])
81591f0ac6a5Smrg
8160e5410a46Smrg
8161e5410a46Smrg# Cheap backport of AS_EXECUTABLE_P and required macros
8162e5410a46Smrg# from Autoconf 2.59; we should not use $as_executable_p directly.
8163e5410a46Smrg
8164e5410a46Smrg# _AS_TEST_PREPARE
8165e5410a46Smrg# ----------------
8166e5410a46Smrgm4_ifndef([_AS_TEST_PREPARE],
8167e5410a46Smrg[m4_defun([_AS_TEST_PREPARE],
8168e5410a46Smrg[if test -x / >/dev/null 2>&1; then
8169e5410a46Smrg  as_executable_p='test -x'
8170e5410a46Smrgelse
8171e5410a46Smrg  as_executable_p='test -f'
8172e5410a46Smrgfi
8173e5410a46Smrg])])# _AS_TEST_PREPARE
8174e5410a46Smrg
8175e5410a46Smrg# AS_EXECUTABLE_P
8176e5410a46Smrg# ---------------
8177e5410a46Smrg# Check whether a file is executable.
8178e5410a46Smrgm4_ifndef([AS_EXECUTABLE_P],
8179e5410a46Smrg[m4_defun([AS_EXECUTABLE_P],
8180e5410a46Smrg[AS_REQUIRE([_AS_TEST_PREPARE])dnl
8181e5410a46Smrg$as_executable_p $1[]dnl
8182e5410a46Smrg])])# AS_EXECUTABLE_P
8183e5410a46Smrg
81841f0ac6a5Smrg# NOTE: This macro has been submitted for inclusion into   #
81851f0ac6a5Smrg#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
81861f0ac6a5Smrg#  a released version of Autoconf we should remove this    #
81871f0ac6a5Smrg#  macro and use it instead.                               #
81881f0ac6a5Smrg# LT_AC_PROG_SED
81891f0ac6a5Smrg# --------------
81901f0ac6a5Smrg# Check for a fully-functional sed program, that truncates
81911f0ac6a5Smrg# as few characters as possible.  Prefer GNU sed if found.
81921f0ac6a5SmrgAC_DEFUN([LT_AC_PROG_SED],
81931f0ac6a5Smrg[AC_MSG_CHECKING([for a sed that does not truncate output])
81941f0ac6a5SmrgAC_CACHE_VAL(lt_cv_path_SED,
81951f0ac6a5Smrg[# Loop through the user's path and test for sed and gsed.
81961f0ac6a5Smrg# Then use that list of sed's as ones to test for truncation.
81971f0ac6a5Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
81981f0ac6a5Smrgfor as_dir in $PATH
81991f0ac6a5Smrgdo
82001f0ac6a5Smrg  IFS=$as_save_IFS
82011f0ac6a5Smrg  test -z "$as_dir" && as_dir=.
82021f0ac6a5Smrg  for lt_ac_prog in sed gsed; do
82031f0ac6a5Smrg    for ac_exec_ext in '' $ac_executable_extensions; do
8204e5410a46Smrg      if AS_EXECUTABLE_P(["$as_dir/$lt_ac_prog$ac_exec_ext"]); then
82051f0ac6a5Smrg        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
82061f0ac6a5Smrg      fi
82071f0ac6a5Smrg    done
82081f0ac6a5Smrg  done
82091f0ac6a5Smrgdone
8210e5410a46SmrgIFS=$as_save_IFS
82111f0ac6a5Smrglt_ac_max=0
82121f0ac6a5Smrglt_ac_count=0
82131f0ac6a5Smrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris
82141f0ac6a5Smrg# along with /bin/sed that truncates output.
82151f0ac6a5Smrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
82161f0ac6a5Smrg  test ! -f $lt_ac_sed && continue
82171f0ac6a5Smrg  cat /dev/null > conftest.in
82181f0ac6a5Smrg  lt_ac_count=0
82191f0ac6a5Smrg  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
82201f0ac6a5Smrg  # Check for GNU sed and select it if it is found.
82211f0ac6a5Smrg  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
82221f0ac6a5Smrg    lt_cv_path_SED=$lt_ac_sed
82231f0ac6a5Smrg    break
82241f0ac6a5Smrg  fi
82251f0ac6a5Smrg  while true; do
82261f0ac6a5Smrg    cat conftest.in conftest.in >conftest.tmp
82271f0ac6a5Smrg    mv conftest.tmp conftest.in
82281f0ac6a5Smrg    cp conftest.in conftest.nl
82291f0ac6a5Smrg    echo >>conftest.nl
82301f0ac6a5Smrg    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
82311f0ac6a5Smrg    cmp -s conftest.out conftest.nl || break
82321f0ac6a5Smrg    # 10000 chars as input seems more than enough
82331f0ac6a5Smrg    test $lt_ac_count -gt 10 && break
82341f0ac6a5Smrg    lt_ac_count=`expr $lt_ac_count + 1`
82351f0ac6a5Smrg    if test $lt_ac_count -gt $lt_ac_max; then
82361f0ac6a5Smrg      lt_ac_max=$lt_ac_count
82371f0ac6a5Smrg      lt_cv_path_SED=$lt_ac_sed
82381f0ac6a5Smrg    fi
82391f0ac6a5Smrg  done
82401f0ac6a5Smrgdone
82411f0ac6a5Smrg])
82421f0ac6a5SmrgSED=$lt_cv_path_SED
8243e5410a46SmrgAC_SUBST([SED])
82441f0ac6a5SmrgAC_MSG_RESULT([$SED])
82451f0ac6a5Smrg])
82461f0ac6a5Smrg
8247e5410a46Smrg# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
8248e5410a46Smrg# 
8249e5410a46Smrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
82501f0ac6a5Smrg#
8251e5410a46Smrg# This program is free software; you can redistribute it and/or modify
8252e5410a46Smrg# it under the terms of the GNU General Public License as published by
8253e5410a46Smrg# the Free Software Foundation; either version 2 of the License, or
8254e5410a46Smrg# (at your option) any later version.
82551f0ac6a5Smrg#
8256e5410a46Smrg# This program is distributed in the hope that it will be useful, but
8257e5410a46Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of
8258e5410a46Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
8259e5410a46Smrg# General Public License for more details.
82601f0ac6a5Smrg#
8261e5410a46Smrg# You should have received a copy of the GNU General Public License
8262e5410a46Smrg# along with this program; if not, write to the Free Software
8263e5410a46Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
82641f0ac6a5Smrg#
8265e5410a46Smrg# As a special exception to the GNU General Public License, if you
8266e5410a46Smrg# distribute this file as part of a program that contains a
8267e5410a46Smrg# configuration script generated by Autoconf, you may include it under
8268e5410a46Smrg# the same distribution terms that you use for the rest of that program.
82691f0ac6a5Smrg
8270e5410a46Smrg# PKG_PROG_PKG_CONFIG([MIN-VERSION])
82711f0ac6a5Smrg# ----------------------------------
8272e5410a46SmrgAC_DEFUN([PKG_PROG_PKG_CONFIG],
8273e5410a46Smrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
8274e5410a46Smrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$])
8275e5410a46SmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
8276e5410a46Smrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
8277e5410a46Smrg	AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
8278e5410a46Smrgfi
8279e5410a46Smrgif test -n "$PKG_CONFIG"; then
8280e5410a46Smrg	_pkg_min_version=m4_default([$1], [0.9.0])
8281e5410a46Smrg	AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
8282e5410a46Smrg	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
8283e5410a46Smrg		AC_MSG_RESULT([yes])
8284e5410a46Smrg	else
8285e5410a46Smrg		AC_MSG_RESULT([no])
8286e5410a46Smrg		PKG_CONFIG=""
8287e5410a46Smrg	fi
8288e5410a46Smrg		
8289e5410a46Smrgfi[]dnl
8290e5410a46Smrg])# PKG_PROG_PKG_CONFIG
82911f0ac6a5Smrg
8292e5410a46Smrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
82931f0ac6a5Smrg#
8294e5410a46Smrg# Check to see whether a particular set of modules exists.  Similar
8295e5410a46Smrg# to PKG_CHECK_MODULES(), but does not set variables or print errors.
8296e5410a46Smrg#
8297e5410a46Smrg#
8298e5410a46Smrg# Similar to PKG_CHECK_MODULES, make sure that the first instance of
8299e5410a46Smrg# this or PKG_CHECK_MODULES is called, or make sure to call
8300e5410a46Smrg# PKG_CHECK_EXISTS manually
8301e5410a46Smrg# --------------------------------------------------------------
8302e5410a46SmrgAC_DEFUN([PKG_CHECK_EXISTS],
8303e5410a46Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
8304e5410a46Smrgif test -n "$PKG_CONFIG" && \
8305e5410a46Smrg    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
8306e5410a46Smrg  m4_ifval([$2], [$2], [:])
8307e5410a46Smrgm4_ifvaln([$3], [else
8308e5410a46Smrg  $3])dnl
8309e5410a46Smrgfi])
83101f0ac6a5Smrg
83111f0ac6a5Smrg
8312e5410a46Smrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
8313e5410a46Smrg# ---------------------------------------------
8314e5410a46Smrgm4_define([_PKG_CONFIG],
8315e5410a46Smrg[if test -n "$$1"; then
8316e5410a46Smrg    pkg_cv_[]$1="$$1"
8317e5410a46Smrg elif test -n "$PKG_CONFIG"; then
8318e5410a46Smrg    PKG_CHECK_EXISTS([$3],
8319e5410a46Smrg                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
8320e5410a46Smrg		     [pkg_failed=yes])
8321e5410a46Smrg else
8322e5410a46Smrg    pkg_failed=untried
8323e5410a46Smrgfi[]dnl
8324e5410a46Smrg])# _PKG_CONFIG
83251f0ac6a5Smrg
8326e5410a46Smrg# _PKG_SHORT_ERRORS_SUPPORTED
8327e5410a46Smrg# -----------------------------
8328e5410a46SmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
8329e5410a46Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
8330e5410a46Smrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
8331e5410a46Smrg        _pkg_short_errors_supported=yes
83321f0ac6a5Smrgelse
8333e5410a46Smrg        _pkg_short_errors_supported=no
8334e5410a46Smrgfi[]dnl
8335e5410a46Smrg])# _PKG_SHORT_ERRORS_SUPPORTED
83361f0ac6a5Smrg
8337e5410a46Smrg
8338e5410a46Smrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
8339e5410a46Smrg# [ACTION-IF-NOT-FOUND])
83401f0ac6a5Smrg#
8341e5410a46Smrg#
8342e5410a46Smrg# Note that if there is a possibility the first call to
8343e5410a46Smrg# PKG_CHECK_MODULES might not happen, you should be sure to include an
8344e5410a46Smrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
8345e5410a46Smrg#
8346e5410a46Smrg#
8347e5410a46Smrg# --------------------------------------------------------------
8348e5410a46SmrgAC_DEFUN([PKG_CHECK_MODULES],
8349e5410a46Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
8350e5410a46SmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
8351e5410a46SmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
83521f0ac6a5Smrg
8353e5410a46Smrgpkg_failed=no
8354e5410a46SmrgAC_MSG_CHECKING([for $1])
83551f0ac6a5Smrg
8356e5410a46Smrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
8357e5410a46Smrg_PKG_CONFIG([$1][_LIBS], [libs], [$2])
83581f0ac6a5Smrg
8359e5410a46Smrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
8360e5410a46Smrgand $1[]_LIBS to avoid the need to call pkg-config.
8361e5410a46SmrgSee the pkg-config man page for more details.])
83621f0ac6a5Smrg
8363e5410a46Smrgif test $pkg_failed = yes; then
8364e5410a46Smrg        _PKG_SHORT_ERRORS_SUPPORTED
8365e5410a46Smrg        if test $_pkg_short_errors_supported = yes; then
8366e5410a46Smrg	        $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
8367e5410a46Smrg        else 
8368e5410a46Smrg	        $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
8369e5410a46Smrg        fi
8370e5410a46Smrg	# Put the nasty error message in config.log where it belongs
8371e5410a46Smrg	echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
83721f0ac6a5Smrg
8373e5410a46Smrg	ifelse([$4], , [AC_MSG_ERROR(dnl
8374e5410a46Smrg[Package requirements ($2) were not met:
83751f0ac6a5Smrg
8376e5410a46Smrg$$1_PKG_ERRORS
83771f0ac6a5Smrg
8378e5410a46SmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you
8379e5410a46Smrginstalled software in a non-standard prefix.
83801f0ac6a5Smrg
8381e5410a46Smrg_PKG_TEXT
8382e5410a46Smrg])],
8383e5410a46Smrg		[AC_MSG_RESULT([no])
8384e5410a46Smrg                $4])
8385e5410a46Smrgelif test $pkg_failed = untried; then
8386e5410a46Smrg	ifelse([$4], , [AC_MSG_FAILURE(dnl
8387e5410a46Smrg[The pkg-config script could not be found or is too old.  Make sure it
8388e5410a46Smrgis in your PATH or set the PKG_CONFIG environment variable to the full
8389e5410a46Smrgpath to pkg-config.
83901f0ac6a5Smrg
8391e5410a46Smrg_PKG_TEXT
83921f0ac6a5Smrg
8393e5410a46SmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
8394e5410a46Smrg		[$4])
8395e5410a46Smrgelse
8396e5410a46Smrg	$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
8397e5410a46Smrg	$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
8398e5410a46Smrg        AC_MSG_RESULT([yes])
8399e5410a46Smrg	ifelse([$3], , :, [$3])
8400e5410a46Smrgfi[]dnl
8401e5410a46Smrg])# PKG_CHECK_MODULES
84021f0ac6a5Smrg
8403