aclocal.m4 revision 2e2dd055
12e2dd055Smrg# generated automatically by aclocal 1.11 -*- Autoconf -*-
2a966c04fSmrg
3a966c04fSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
42e2dd055Smrg# 2005, 2006, 2007, 2008, 2009  Free Software Foundation, Inc.
5a966c04fSmrg# This file is free software; the Free Software Foundation
6a966c04fSmrg# gives unlimited permission to copy and/or distribute it,
7a966c04fSmrg# with or without modifications, as long as this notice is preserved.
8a966c04fSmrg
9a966c04fSmrg# This program is distributed in the hope that it will be useful,
10a966c04fSmrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11a966c04fSmrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12a966c04fSmrg# PARTICULAR PURPOSE.
13a966c04fSmrg
142e2dd055Smrgm4_ifndef([AC_AUTOCONF_VERSION],
152e2dd055Smrg  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
162e2dd055Smrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.63],,
172e2dd055Smrg[m4_warning([this file was generated for autoconf 2.63.
182e2dd055SmrgYou have another version of autoconf.  It may work, but is not guaranteed to.
192e2dd055SmrgIf you have problems, you may need to regenerate the build system entirely.
202e2dd055SmrgTo do so, use the procedure documented by the package, typically `autoreconf'.])])
21a966c04fSmrg
222e2dd055Smrg# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
23a966c04fSmrg#
24a966c04fSmrg# This file is free software; the Free Software Foundation
25a966c04fSmrg# gives unlimited permission to copy and/or distribute it,
26a966c04fSmrg# with or without modifications, as long as this notice is preserved.
27a966c04fSmrg
28a966c04fSmrg# AM_AUTOMAKE_VERSION(VERSION)
29a966c04fSmrg# ----------------------------
30a966c04fSmrg# Automake X.Y traces this macro to ensure aclocal.m4 has been
31a966c04fSmrg# generated from the m4 files accompanying Automake X.Y.
32a966c04fSmrg# (This private macro should not be called outside this file.)
33a966c04fSmrgAC_DEFUN([AM_AUTOMAKE_VERSION],
342e2dd055Smrg[am__api_version='1.11'
35a966c04fSmrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
36a966c04fSmrgdnl require some minimum version.  Point them to the right macro.
372e2dd055Smrgm4_if([$1], [1.11], [],
38a966c04fSmrg      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
39a966c04fSmrg])
40a966c04fSmrg
41a966c04fSmrg# _AM_AUTOCONF_VERSION(VERSION)
42a966c04fSmrg# -----------------------------
43a966c04fSmrg# aclocal traces this macro to find the Autoconf version.
44a966c04fSmrg# This is a private macro too.  Using m4_define simplifies
45a966c04fSmrg# the logic in aclocal, which can simply ignore this definition.
46a966c04fSmrgm4_define([_AM_AUTOCONF_VERSION], [])
47a966c04fSmrg
48a966c04fSmrg# AM_SET_CURRENT_AUTOMAKE_VERSION
49a966c04fSmrg# -------------------------------
50a966c04fSmrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
512e2dd055Smrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
52a966c04fSmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
532e2dd055Smrg[AM_AUTOMAKE_VERSION([1.11])dnl
542e2dd055Smrgm4_ifndef([AC_AUTOCONF_VERSION],
552e2dd055Smrg  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
562e2dd055Smrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
57a966c04fSmrg
58a966c04fSmrg# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
59a966c04fSmrg
60a966c04fSmrg# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
61a966c04fSmrg#
62a966c04fSmrg# This file is free software; the Free Software Foundation
63a966c04fSmrg# gives unlimited permission to copy and/or distribute it,
64a966c04fSmrg# with or without modifications, as long as this notice is preserved.
65a966c04fSmrg
66a966c04fSmrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
67a966c04fSmrg# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
68a966c04fSmrg# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
69a966c04fSmrg#
70a966c04fSmrg# Of course, Automake must honor this variable whenever it calls a
71a966c04fSmrg# tool from the auxiliary directory.  The problem is that $srcdir (and
72a966c04fSmrg# therefore $ac_aux_dir as well) can be either absolute or relative,
73a966c04fSmrg# depending on how configure is run.  This is pretty annoying, since
74a966c04fSmrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top
75a966c04fSmrg# source directory, any form will work fine, but in subdirectories a
76a966c04fSmrg# relative path needs to be adjusted first.
77a966c04fSmrg#
78a966c04fSmrg# $ac_aux_dir/missing
79a966c04fSmrg#    fails when called from a subdirectory if $ac_aux_dir is relative
80a966c04fSmrg# $top_srcdir/$ac_aux_dir/missing
81a966c04fSmrg#    fails if $ac_aux_dir is absolute,
82a966c04fSmrg#    fails when called from a subdirectory in a VPATH build with
83a966c04fSmrg#          a relative $ac_aux_dir
84a966c04fSmrg#
85a966c04fSmrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
86a966c04fSmrg# are both prefixed by $srcdir.  In an in-source build this is usually
87a966c04fSmrg# harmless because $srcdir is `.', but things will broke when you
88a966c04fSmrg# start a VPATH build or use an absolute $srcdir.
89a966c04fSmrg#
90a966c04fSmrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
91a966c04fSmrg# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
92a966c04fSmrg#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
93a966c04fSmrg# and then we would define $MISSING as
94a966c04fSmrg#   MISSING="\${SHELL} $am_aux_dir/missing"
95a966c04fSmrg# This will work as long as MISSING is not called from configure, because
96a966c04fSmrg# unfortunately $(top_srcdir) has no meaning in configure.
97a966c04fSmrg# However there are other variables, like CC, which are often used in
98a966c04fSmrg# configure, and could therefore not use this "fixed" $ac_aux_dir.
99a966c04fSmrg#
100a966c04fSmrg# Another solution, used here, is to always expand $ac_aux_dir to an
101a966c04fSmrg# absolute PATH.  The drawback is that using absolute paths prevent a
102a966c04fSmrg# configured tree to be moved without reconfiguration.
103a966c04fSmrg
104a966c04fSmrgAC_DEFUN([AM_AUX_DIR_EXPAND],
105a966c04fSmrg[dnl Rely on autoconf to set up CDPATH properly.
106a966c04fSmrgAC_PREREQ([2.50])dnl
107a966c04fSmrg# expand $ac_aux_dir to an absolute path
108a966c04fSmrgam_aux_dir=`cd $ac_aux_dir && pwd`
109a966c04fSmrg])
110a966c04fSmrg
111a966c04fSmrg# AM_CONDITIONAL                                            -*- Autoconf -*-
112a966c04fSmrg
1132e2dd055Smrg# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
114a966c04fSmrg# Free Software Foundation, Inc.
115a966c04fSmrg#
116a966c04fSmrg# This file is free software; the Free Software Foundation
117a966c04fSmrg# gives unlimited permission to copy and/or distribute it,
118a966c04fSmrg# with or without modifications, as long as this notice is preserved.
119a966c04fSmrg
1202e2dd055Smrg# serial 9
121a966c04fSmrg
122a966c04fSmrg# AM_CONDITIONAL(NAME, SHELL-CONDITION)
123a966c04fSmrg# -------------------------------------
124a966c04fSmrg# Define a conditional.
125a966c04fSmrgAC_DEFUN([AM_CONDITIONAL],
126a966c04fSmrg[AC_PREREQ(2.52)dnl
127a966c04fSmrg ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
128a966c04fSmrg	[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
129a966c04fSmrgAC_SUBST([$1_TRUE])dnl
130a966c04fSmrgAC_SUBST([$1_FALSE])dnl
131a966c04fSmrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl
132a966c04fSmrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl
1332e2dd055Smrgm4_define([_AM_COND_VALUE_$1], [$2])dnl
134a966c04fSmrgif $2; then
135a966c04fSmrg  $1_TRUE=
136a966c04fSmrg  $1_FALSE='#'
137a966c04fSmrgelse
138a966c04fSmrg  $1_TRUE='#'
139a966c04fSmrg  $1_FALSE=
140a966c04fSmrgfi
141a966c04fSmrgAC_CONFIG_COMMANDS_PRE(
142a966c04fSmrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
143a966c04fSmrg  AC_MSG_ERROR([[conditional "$1" was never defined.
144a966c04fSmrgUsually this means the macro was only invoked conditionally.]])
145a966c04fSmrgfi])])
146a966c04fSmrg
1472e2dd055Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
148a966c04fSmrg# Free Software Foundation, Inc.
149a966c04fSmrg#
150a966c04fSmrg# This file is free software; the Free Software Foundation
151a966c04fSmrg# gives unlimited permission to copy and/or distribute it,
152a966c04fSmrg# with or without modifications, as long as this notice is preserved.
153a966c04fSmrg
1542e2dd055Smrg# serial 10
155a966c04fSmrg
156a966c04fSmrg# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
157a966c04fSmrg# written in clear, in which case automake, when reading aclocal.m4,
158a966c04fSmrg# will think it sees a *use*, and therefore will trigger all it's
159a966c04fSmrg# C support machinery.  Also note that it means that autoscan, seeing
160a966c04fSmrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
161a966c04fSmrg
162a966c04fSmrg
163a966c04fSmrg# _AM_DEPENDENCIES(NAME)
164a966c04fSmrg# ----------------------
165a966c04fSmrg# See how the compiler implements dependency checking.
166a966c04fSmrg# NAME is "CC", "CXX", "GCJ", or "OBJC".
167a966c04fSmrg# We try a few techniques and use that to set a single cache variable.
168a966c04fSmrg#
169a966c04fSmrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
170a966c04fSmrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
171a966c04fSmrg# dependency, and given that the user is not expected to run this macro,
172a966c04fSmrg# just rely on AC_PROG_CC.
173a966c04fSmrgAC_DEFUN([_AM_DEPENDENCIES],
174a966c04fSmrg[AC_REQUIRE([AM_SET_DEPDIR])dnl
175a966c04fSmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
176a966c04fSmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl
177a966c04fSmrgAC_REQUIRE([AM_DEP_TRACK])dnl
178a966c04fSmrg
179a966c04fSmrgifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
180a966c04fSmrg       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
181a966c04fSmrg       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
182a966c04fSmrg       [$1], UPC,  [depcc="$UPC"  am_compiler_list=],
183a966c04fSmrg       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
184a966c04fSmrg                   [depcc="$$1"   am_compiler_list=])
185a966c04fSmrg
186a966c04fSmrgAC_CACHE_CHECK([dependency style of $depcc],
187a966c04fSmrg               [am_cv_$1_dependencies_compiler_type],
188a966c04fSmrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
189a966c04fSmrg  # We make a subdir and do the tests there.  Otherwise we can end up
190a966c04fSmrg  # making bogus files that we don't know about and never remove.  For
191a966c04fSmrg  # instance it was reported that on HP-UX the gcc test will end up
192a966c04fSmrg  # making a dummy file named `D' -- because `-MD' means `put the output
193a966c04fSmrg  # in D'.
194a966c04fSmrg  mkdir conftest.dir
195a966c04fSmrg  # Copy depcomp to subdir because otherwise we won't find it if we're
196a966c04fSmrg  # using a relative directory.
197a966c04fSmrg  cp "$am_depcomp" conftest.dir
198a966c04fSmrg  cd conftest.dir
199a966c04fSmrg  # We will build objects and dependencies in a subdirectory because
200a966c04fSmrg  # it helps to detect inapplicable dependency modes.  For instance
201a966c04fSmrg  # both Tru64's cc and ICC support -MD to output dependencies as a
202a966c04fSmrg  # side effect of compilation, but ICC will put the dependencies in
203a966c04fSmrg  # the current directory while Tru64 will put them in the object
204a966c04fSmrg  # directory.
205a966c04fSmrg  mkdir sub
206a966c04fSmrg
207a966c04fSmrg  am_cv_$1_dependencies_compiler_type=none
208a966c04fSmrg  if test "$am_compiler_list" = ""; then
209a966c04fSmrg     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
210a966c04fSmrg  fi
2112e2dd055Smrg  am__universal=false
2122e2dd055Smrg  m4_case([$1], [CC],
2132e2dd055Smrg    [case " $depcc " in #(
2142e2dd055Smrg     *\ -arch\ *\ -arch\ *) am__universal=true ;;
2152e2dd055Smrg     esac],
2162e2dd055Smrg    [CXX],
2172e2dd055Smrg    [case " $depcc " in #(
2182e2dd055Smrg     *\ -arch\ *\ -arch\ *) am__universal=true ;;
2192e2dd055Smrg     esac])
2202e2dd055Smrg
221a966c04fSmrg  for depmode in $am_compiler_list; do
222a966c04fSmrg    # Setup a source with many dependencies, because some compilers
223a966c04fSmrg    # like to wrap large dependency lists on column 80 (with \), and
224a966c04fSmrg    # we should not choose a depcomp mode which is confused by this.
225a966c04fSmrg    #
226a966c04fSmrg    # We need to recreate these files for each test, as the compiler may
227a966c04fSmrg    # overwrite some of them when testing with obscure command lines.
228a966c04fSmrg    # This happens at least with the AIX C compiler.
229a966c04fSmrg    : > sub/conftest.c
230a966c04fSmrg    for i in 1 2 3 4 5 6; do
231a966c04fSmrg      echo '#include "conftst'$i'.h"' >> sub/conftest.c
232a966c04fSmrg      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
233a966c04fSmrg      # Solaris 8's {/usr,}/bin/sh.
234a966c04fSmrg      touch sub/conftst$i.h
235a966c04fSmrg    done
236a966c04fSmrg    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
237a966c04fSmrg
2382e2dd055Smrg    # We check with `-c' and `-o' for the sake of the "dashmstdout"
2392e2dd055Smrg    # mode.  It turns out that the SunPro C++ compiler does not properly
2402e2dd055Smrg    # handle `-M -o', and we need to detect this.  Also, some Intel
2412e2dd055Smrg    # versions had trouble with output in subdirs
2422e2dd055Smrg    am__obj=sub/conftest.${OBJEXT-o}
2432e2dd055Smrg    am__minus_obj="-o $am__obj"
244a966c04fSmrg    case $depmode in
2452e2dd055Smrg    gcc)
2462e2dd055Smrg      # This depmode causes a compiler race in universal mode.
2472e2dd055Smrg      test "$am__universal" = false || continue
2482e2dd055Smrg      ;;
249a966c04fSmrg    nosideeffect)
250a966c04fSmrg      # after this tag, mechanisms are not by side-effect, so they'll
251a966c04fSmrg      # only be used when explicitly requested
252a966c04fSmrg      if test "x$enable_dependency_tracking" = xyes; then
253a966c04fSmrg	continue
254a966c04fSmrg      else
255a966c04fSmrg	break
256a966c04fSmrg      fi
257a966c04fSmrg      ;;
2582e2dd055Smrg    msvisualcpp | msvcmsys)
2592e2dd055Smrg      # This compiler won't grok `-c -o', but also, the minuso test has
2602e2dd055Smrg      # not run yet.  These depmodes are late enough in the game, and
2612e2dd055Smrg      # so weak that their functioning should not be impacted.
2622e2dd055Smrg      am__obj=conftest.${OBJEXT-o}
2632e2dd055Smrg      am__minus_obj=
2642e2dd055Smrg      ;;
265a966c04fSmrg    none) break ;;
266a966c04fSmrg    esac
267a966c04fSmrg    if depmode=$depmode \
2682e2dd055Smrg       source=sub/conftest.c object=$am__obj \
269a966c04fSmrg       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
2702e2dd055Smrg       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
271a966c04fSmrg         >/dev/null 2>conftest.err &&
272a966c04fSmrg       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
273a966c04fSmrg       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
2742e2dd055Smrg       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
275a966c04fSmrg       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
276a966c04fSmrg      # icc doesn't choke on unknown options, it will just issue warnings
277a966c04fSmrg      # or remarks (even with -Werror).  So we grep stderr for any message
278a966c04fSmrg      # that says an option was ignored or not supported.
279a966c04fSmrg      # When given -MP, icc 7.0 and 7.1 complain thusly:
280a966c04fSmrg      #   icc: Command line warning: ignoring option '-M'; no argument required
281a966c04fSmrg      # The diagnosis changed in icc 8.0:
282a966c04fSmrg      #   icc: Command line remark: option '-MP' not supported
283a966c04fSmrg      if (grep 'ignoring option' conftest.err ||
284a966c04fSmrg          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
285a966c04fSmrg        am_cv_$1_dependencies_compiler_type=$depmode
286a966c04fSmrg        break
287a966c04fSmrg      fi
288a966c04fSmrg    fi
289a966c04fSmrg  done
290a966c04fSmrg
291a966c04fSmrg  cd ..
292a966c04fSmrg  rm -rf conftest.dir
293a966c04fSmrgelse
294a966c04fSmrg  am_cv_$1_dependencies_compiler_type=none
295a966c04fSmrgfi
296a966c04fSmrg])
297a966c04fSmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
298a966c04fSmrgAM_CONDITIONAL([am__fastdep$1], [
299a966c04fSmrg  test "x$enable_dependency_tracking" != xno \
300a966c04fSmrg  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
301a966c04fSmrg])
302a966c04fSmrg
303a966c04fSmrg
304a966c04fSmrg# AM_SET_DEPDIR
305a966c04fSmrg# -------------
306a966c04fSmrg# Choose a directory name for dependency files.
307a966c04fSmrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES
308a966c04fSmrgAC_DEFUN([AM_SET_DEPDIR],
309a966c04fSmrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
310a966c04fSmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
311a966c04fSmrg])
312a966c04fSmrg
313a966c04fSmrg
314a966c04fSmrg# AM_DEP_TRACK
315a966c04fSmrg# ------------
316a966c04fSmrgAC_DEFUN([AM_DEP_TRACK],
317a966c04fSmrg[AC_ARG_ENABLE(dependency-tracking,
318a966c04fSmrg[  --disable-dependency-tracking  speeds up one-time build
319a966c04fSmrg  --enable-dependency-tracking   do not reject slow dependency extractors])
320a966c04fSmrgif test "x$enable_dependency_tracking" != xno; then
321a966c04fSmrg  am_depcomp="$ac_aux_dir/depcomp"
322a966c04fSmrg  AMDEPBACKSLASH='\'
323a966c04fSmrgfi
324a966c04fSmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
325a966c04fSmrgAC_SUBST([AMDEPBACKSLASH])dnl
326a966c04fSmrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
327a966c04fSmrg])
328a966c04fSmrg
329a966c04fSmrg# Generate code to set up dependency tracking.              -*- Autoconf -*-
330a966c04fSmrg
3312e2dd055Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
332a966c04fSmrg# Free Software Foundation, Inc.
333a966c04fSmrg#
334a966c04fSmrg# This file is free software; the Free Software Foundation
335a966c04fSmrg# gives unlimited permission to copy and/or distribute it,
336a966c04fSmrg# with or without modifications, as long as this notice is preserved.
337a966c04fSmrg
3382e2dd055Smrg#serial 5
339a966c04fSmrg
340a966c04fSmrg# _AM_OUTPUT_DEPENDENCY_COMMANDS
341a966c04fSmrg# ------------------------------
342a966c04fSmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
3432e2dd055Smrg[{
3442e2dd055Smrg  # Autoconf 2.62 quotes --file arguments for eval, but not when files
3452e2dd055Smrg  # are listed without --file.  Let's play safe and only enable the eval
3462e2dd055Smrg  # if we detect the quoting.
3472e2dd055Smrg  case $CONFIG_FILES in
3482e2dd055Smrg  *\'*) eval set x "$CONFIG_FILES" ;;
3492e2dd055Smrg  *)   set x $CONFIG_FILES ;;
3502e2dd055Smrg  esac
3512e2dd055Smrg  shift
3522e2dd055Smrg  for mf
3532e2dd055Smrg  do
3542e2dd055Smrg    # Strip MF so we end up with the name of the file.
3552e2dd055Smrg    mf=`echo "$mf" | sed -e 's/:.*$//'`
3562e2dd055Smrg    # Check whether this is an Automake generated Makefile or not.
3572e2dd055Smrg    # We used to match only the files named `Makefile.in', but
3582e2dd055Smrg    # some people rename them; so instead we look at the file content.
3592e2dd055Smrg    # Grep'ing the first line is not enough: some people post-process
3602e2dd055Smrg    # each Makefile.in and add a new line on top of each file to say so.
3612e2dd055Smrg    # Grep'ing the whole file is not good either: AIX grep has a line
3622e2dd055Smrg    # limit of 2048, but all sed's we know have understand at least 4000.
3632e2dd055Smrg    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
3642e2dd055Smrg      dirpart=`AS_DIRNAME("$mf")`
3652e2dd055Smrg    else
3662e2dd055Smrg      continue
3672e2dd055Smrg    fi
3682e2dd055Smrg    # Extract the definition of DEPDIR, am__include, and am__quote
3692e2dd055Smrg    # from the Makefile without running `make'.
3702e2dd055Smrg    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
3712e2dd055Smrg    test -z "$DEPDIR" && continue
3722e2dd055Smrg    am__include=`sed -n 's/^am__include = //p' < "$mf"`
3732e2dd055Smrg    test -z "am__include" && continue
3742e2dd055Smrg    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
3752e2dd055Smrg    # When using ansi2knr, U may be empty or an underscore; expand it
3762e2dd055Smrg    U=`sed -n 's/^U = //p' < "$mf"`
3772e2dd055Smrg    # Find all dependency output files, they are included files with
3782e2dd055Smrg    # $(DEPDIR) in their names.  We invoke sed twice because it is the
3792e2dd055Smrg    # simplest approach to changing $(DEPDIR) to its actual value in the
3802e2dd055Smrg    # expansion.
3812e2dd055Smrg    for file in `sed -n "
3822e2dd055Smrg      s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
3832e2dd055Smrg	 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
3842e2dd055Smrg      # Make sure the directory exists.
3852e2dd055Smrg      test -f "$dirpart/$file" && continue
3862e2dd055Smrg      fdir=`AS_DIRNAME(["$file"])`
3872e2dd055Smrg      AS_MKDIR_P([$dirpart/$fdir])
3882e2dd055Smrg      # echo "creating $dirpart/$file"
3892e2dd055Smrg      echo '# dummy' > "$dirpart/$file"
3902e2dd055Smrg    done
391a966c04fSmrg  done
3922e2dd055Smrg}
393a966c04fSmrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS
394a966c04fSmrg
395a966c04fSmrg
396a966c04fSmrg# AM_OUTPUT_DEPENDENCY_COMMANDS
397a966c04fSmrg# -----------------------------
398a966c04fSmrg# This macro should only be invoked once -- use via AC_REQUIRE.
399a966c04fSmrg#
400a966c04fSmrg# This code is only required when automatic dependency tracking
401a966c04fSmrg# is enabled.  FIXME.  This creates each `.P' file that we will
402a966c04fSmrg# need in order to bootstrap the dependency handling code.
403a966c04fSmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
404a966c04fSmrg[AC_CONFIG_COMMANDS([depfiles],
405a966c04fSmrg     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
406a966c04fSmrg     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
407a966c04fSmrg])
408a966c04fSmrg
409a966c04fSmrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
410a966c04fSmrg# Free Software Foundation, Inc.
411a966c04fSmrg#
412a966c04fSmrg# This file is free software; the Free Software Foundation
413a966c04fSmrg# gives unlimited permission to copy and/or distribute it,
414a966c04fSmrg# with or without modifications, as long as this notice is preserved.
415a966c04fSmrg
416a966c04fSmrg# serial 8
417a966c04fSmrg
418a966c04fSmrg# AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
419a966c04fSmrgAU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
420a966c04fSmrg
421a966c04fSmrg# Do all the work for Automake.                             -*- Autoconf -*-
422a966c04fSmrg
423a966c04fSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4242e2dd055Smrg# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
425a966c04fSmrg#
426a966c04fSmrg# This file is free software; the Free Software Foundation
427a966c04fSmrg# gives unlimited permission to copy and/or distribute it,
428a966c04fSmrg# with or without modifications, as long as this notice is preserved.
429a966c04fSmrg
4302e2dd055Smrg# serial 16
431a966c04fSmrg
432a966c04fSmrg# This macro actually does too much.  Some checks are only needed if
433a966c04fSmrg# your package does certain things.  But this isn't really a big deal.
434a966c04fSmrg
435a966c04fSmrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
436a966c04fSmrg# AM_INIT_AUTOMAKE([OPTIONS])
437a966c04fSmrg# -----------------------------------------------
438a966c04fSmrg# The call with PACKAGE and VERSION arguments is the old style
439a966c04fSmrg# call (pre autoconf-2.50), which is being phased out.  PACKAGE
440a966c04fSmrg# and VERSION should now be passed to AC_INIT and removed from
441a966c04fSmrg# the call to AM_INIT_AUTOMAKE.
442a966c04fSmrg# We support both call styles for the transition.  After
443a966c04fSmrg# the next Automake release, Autoconf can make the AC_INIT
444a966c04fSmrg# arguments mandatory, and then we can depend on a new Autoconf
445a966c04fSmrg# release and drop the old call support.
446a966c04fSmrgAC_DEFUN([AM_INIT_AUTOMAKE],
4472e2dd055Smrg[AC_PREREQ([2.62])dnl
448a966c04fSmrgdnl Autoconf wants to disallow AM_ names.  We explicitly allow
449a966c04fSmrgdnl the ones we care about.
450a966c04fSmrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
451a966c04fSmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
452a966c04fSmrgAC_REQUIRE([AC_PROG_INSTALL])dnl
453a966c04fSmrgif test "`cd $srcdir && pwd`" != "`pwd`"; then
454a966c04fSmrg  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
455a966c04fSmrg  # is not polluted with repeated "-I."
456a966c04fSmrg  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
457a966c04fSmrg  # test to see if srcdir already configured
458a966c04fSmrg  if test -f $srcdir/config.status; then
459a966c04fSmrg    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
460a966c04fSmrg  fi
461a966c04fSmrgfi
462a966c04fSmrg
463a966c04fSmrg# test whether we have cygpath
464a966c04fSmrgif test -z "$CYGPATH_W"; then
465a966c04fSmrg  if (cygpath --version) >/dev/null 2>/dev/null; then
466a966c04fSmrg    CYGPATH_W='cygpath -w'
467a966c04fSmrg  else
468a966c04fSmrg    CYGPATH_W=echo
469a966c04fSmrg  fi
470a966c04fSmrgfi
471a966c04fSmrgAC_SUBST([CYGPATH_W])
472a966c04fSmrg
473a966c04fSmrg# Define the identity of the package.
474a966c04fSmrgdnl Distinguish between old-style and new-style calls.
475a966c04fSmrgm4_ifval([$2],
476a966c04fSmrg[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
477a966c04fSmrg AC_SUBST([PACKAGE], [$1])dnl
478a966c04fSmrg AC_SUBST([VERSION], [$2])],
479a966c04fSmrg[_AM_SET_OPTIONS([$1])dnl
480a966c04fSmrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
481a966c04fSmrgm4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
482a966c04fSmrg  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
483a966c04fSmrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
484a966c04fSmrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
485a966c04fSmrg
486a966c04fSmrg_AM_IF_OPTION([no-define],,
487a966c04fSmrg[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
488a966c04fSmrg AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
489a966c04fSmrg
490a966c04fSmrg# Some tools Automake needs.
491a966c04fSmrgAC_REQUIRE([AM_SANITY_CHECK])dnl
492a966c04fSmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl
493a966c04fSmrgAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
494a966c04fSmrgAM_MISSING_PROG(AUTOCONF, autoconf)
495a966c04fSmrgAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
496a966c04fSmrgAM_MISSING_PROG(AUTOHEADER, autoheader)
497a966c04fSmrgAM_MISSING_PROG(MAKEINFO, makeinfo)
4982e2dd055SmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl
4992e2dd055SmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
500a966c04fSmrgAC_REQUIRE([AM_PROG_MKDIR_P])dnl
501a966c04fSmrg# We need awk for the "check" target.  The system "awk" is bad on
502a966c04fSmrg# some platforms.
503a966c04fSmrgAC_REQUIRE([AC_PROG_AWK])dnl
504a966c04fSmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl
505a966c04fSmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl
506a966c04fSmrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
5072e2dd055Smrg	      [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
5082e2dd055Smrg			     [_AM_PROG_TAR([v7])])])
509a966c04fSmrg_AM_IF_OPTION([no-dependencies],,
510a966c04fSmrg[AC_PROVIDE_IFELSE([AC_PROG_CC],
5112e2dd055Smrg		  [_AM_DEPENDENCIES(CC)],
5122e2dd055Smrg		  [define([AC_PROG_CC],
5132e2dd055Smrg			  defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
514a966c04fSmrgAC_PROVIDE_IFELSE([AC_PROG_CXX],
5152e2dd055Smrg		  [_AM_DEPENDENCIES(CXX)],
5162e2dd055Smrg		  [define([AC_PROG_CXX],
5172e2dd055Smrg			  defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
518a966c04fSmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC],
5192e2dd055Smrg		  [_AM_DEPENDENCIES(OBJC)],
5202e2dd055Smrg		  [define([AC_PROG_OBJC],
5212e2dd055Smrg			  defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
522a966c04fSmrg])
5232e2dd055Smrg_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
5242e2dd055Smrgdnl The `parallel-tests' driver may need to know about EXEEXT, so add the
5252e2dd055Smrgdnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This macro
5262e2dd055Smrgdnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
5272e2dd055SmrgAC_CONFIG_COMMANDS_PRE(dnl
5282e2dd055Smrg[m4_provide_if([_AM_COMPILER_EXEEXT],
5292e2dd055Smrg  [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
530a966c04fSmrg])
531a966c04fSmrg
5322e2dd055Smrgdnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
5332e2dd055Smrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
5342e2dd055Smrgdnl mangled by Autoconf and run in a shell conditional statement.
5352e2dd055Smrgm4_define([_AC_COMPILER_EXEEXT],
5362e2dd055Smrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
5372e2dd055Smrg
538a966c04fSmrg
539a966c04fSmrg# When config.status generates a header, we must update the stamp-h file.
540a966c04fSmrg# This file resides in the same directory as the config header
541a966c04fSmrg# that is generated.  The stamp files are numbered to have different names.
542a966c04fSmrg
543a966c04fSmrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
544a966c04fSmrg# loop where config.status creates the headers, so we can generate
545a966c04fSmrg# our stamp files there.
546a966c04fSmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
547a966c04fSmrg[# Compute $1's index in $config_headers.
5482e2dd055Smrg_am_arg=$1
549a966c04fSmrg_am_stamp_count=1
550a966c04fSmrgfor _am_header in $config_headers :; do
551a966c04fSmrg  case $_am_header in
5522e2dd055Smrg    $_am_arg | $_am_arg:* )
553a966c04fSmrg      break ;;
554a966c04fSmrg    * )
555a966c04fSmrg      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
556a966c04fSmrg  esac
557a966c04fSmrgdone
5582e2dd055Smrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
559a966c04fSmrg
5602e2dd055Smrg# Copyright (C) 2001, 2003, 2005, 2008  Free Software Foundation, Inc.
561a966c04fSmrg#
562a966c04fSmrg# This file is free software; the Free Software Foundation
563a966c04fSmrg# gives unlimited permission to copy and/or distribute it,
564a966c04fSmrg# with or without modifications, as long as this notice is preserved.
565a966c04fSmrg
566a966c04fSmrg# AM_PROG_INSTALL_SH
567a966c04fSmrg# ------------------
568a966c04fSmrg# Define $install_sh.
569a966c04fSmrgAC_DEFUN([AM_PROG_INSTALL_SH],
570a966c04fSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
5712e2dd055Smrgif test x"${install_sh}" != xset; then
5722e2dd055Smrg  case $am_aux_dir in
5732e2dd055Smrg  *\ * | *\	*)
5742e2dd055Smrg    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
5752e2dd055Smrg  *)
5762e2dd055Smrg    install_sh="\${SHELL} $am_aux_dir/install-sh"
5772e2dd055Smrg  esac
5782e2dd055Smrgfi
579a966c04fSmrgAC_SUBST(install_sh)])
580a966c04fSmrg
581a966c04fSmrg# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
582a966c04fSmrg#
583a966c04fSmrg# This file is free software; the Free Software Foundation
584a966c04fSmrg# gives unlimited permission to copy and/or distribute it,
585a966c04fSmrg# with or without modifications, as long as this notice is preserved.
586a966c04fSmrg
587a966c04fSmrg# serial 2
588a966c04fSmrg
589a966c04fSmrg# Check whether the underlying file-system supports filenames
590a966c04fSmrg# with a leading dot.  For instance MS-DOS doesn't.
591a966c04fSmrgAC_DEFUN([AM_SET_LEADING_DOT],
592a966c04fSmrg[rm -rf .tst 2>/dev/null
593a966c04fSmrgmkdir .tst 2>/dev/null
594a966c04fSmrgif test -d .tst; then
595a966c04fSmrg  am__leading_dot=.
596a966c04fSmrgelse
597a966c04fSmrg  am__leading_dot=_
598a966c04fSmrgfi
599a966c04fSmrgrmdir .tst 2>/dev/null
600a966c04fSmrgAC_SUBST([am__leading_dot])])
601a966c04fSmrg
602a966c04fSmrg# Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
603a966c04fSmrg# From Jim Meyering
604a966c04fSmrg
6052e2dd055Smrg# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008
606a966c04fSmrg# Free Software Foundation, Inc.
607a966c04fSmrg#
608a966c04fSmrg# This file is free software; the Free Software Foundation
609a966c04fSmrg# gives unlimited permission to copy and/or distribute it,
610a966c04fSmrg# with or without modifications, as long as this notice is preserved.
611a966c04fSmrg
6122e2dd055Smrg# serial 5
613a966c04fSmrg
6142e2dd055Smrg# AM_MAINTAINER_MODE([DEFAULT-MODE])
6152e2dd055Smrg# ----------------------------------
6162e2dd055Smrg# Control maintainer-specific portions of Makefiles.
6172e2dd055Smrg# Default is to disable them, unless `enable' is passed literally.
6182e2dd055Smrg# For symmetry, `disable' may be passed as well.  Anyway, the user
6192e2dd055Smrg# can override the default with the --enable/--disable switch.
620a966c04fSmrgAC_DEFUN([AM_MAINTAINER_MODE],
6212e2dd055Smrg[m4_case(m4_default([$1], [disable]),
6222e2dd055Smrg       [enable], [m4_define([am_maintainer_other], [disable])],
6232e2dd055Smrg       [disable], [m4_define([am_maintainer_other], [enable])],
6242e2dd055Smrg       [m4_define([am_maintainer_other], [enable])
6252e2dd055Smrg        m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
6262e2dd055SmrgAC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles])
6272e2dd055Smrg  dnl maintainer-mode's default is 'disable' unless 'enable' is passed
6282e2dd055Smrg  AC_ARG_ENABLE([maintainer-mode],
6292e2dd055Smrg[  --][am_maintainer_other][-maintainer-mode  am_maintainer_other make rules and dependencies not useful
630a966c04fSmrg			  (and sometimes confusing) to the casual installer],
6312e2dd055Smrg      [USE_MAINTAINER_MODE=$enableval],
6322e2dd055Smrg      [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
633a966c04fSmrg  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
6342e2dd055Smrg  AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
635a966c04fSmrg  MAINT=$MAINTAINER_MODE_TRUE
6362e2dd055Smrg  AC_SUBST([MAINT])dnl
637a966c04fSmrg]
638a966c04fSmrg)
639a966c04fSmrg
640a966c04fSmrgAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
641a966c04fSmrg
642a966c04fSmrg# Check to see how 'make' treats includes.	            -*- Autoconf -*-
643a966c04fSmrg
6442e2dd055Smrg# Copyright (C) 2001, 2002, 2003, 2005, 2009  Free Software Foundation, Inc.
645a966c04fSmrg#
646a966c04fSmrg# This file is free software; the Free Software Foundation
647a966c04fSmrg# gives unlimited permission to copy and/or distribute it,
648a966c04fSmrg# with or without modifications, as long as this notice is preserved.
649a966c04fSmrg
6502e2dd055Smrg# serial 4
651a966c04fSmrg
652a966c04fSmrg# AM_MAKE_INCLUDE()
653a966c04fSmrg# -----------------
654a966c04fSmrg# Check to see how make treats includes.
655a966c04fSmrgAC_DEFUN([AM_MAKE_INCLUDE],
656a966c04fSmrg[am_make=${MAKE-make}
657a966c04fSmrgcat > confinc << 'END'
658a966c04fSmrgam__doit:
6592e2dd055Smrg	@echo this is the am__doit target
660a966c04fSmrg.PHONY: am__doit
661a966c04fSmrgEND
662a966c04fSmrg# If we don't find an include directive, just comment out the code.
663a966c04fSmrgAC_MSG_CHECKING([for style of include used by $am_make])
664a966c04fSmrgam__include="#"
665a966c04fSmrgam__quote=
666a966c04fSmrg_am_result=none
667a966c04fSmrg# First try GNU make style include.
668a966c04fSmrgecho "include confinc" > confmf
6692e2dd055Smrg# Ignore all kinds of additional output from `make'.
6702e2dd055Smrgcase `$am_make -s -f confmf 2> /dev/null` in #(
6712e2dd055Smrg*the\ am__doit\ target*)
6722e2dd055Smrg  am__include=include
6732e2dd055Smrg  am__quote=
6742e2dd055Smrg  _am_result=GNU
6752e2dd055Smrg  ;;
6762e2dd055Smrgesac
677a966c04fSmrg# Now try BSD make style include.
678a966c04fSmrgif test "$am__include" = "#"; then
679a966c04fSmrg   echo '.include "confinc"' > confmf
6802e2dd055Smrg   case `$am_make -s -f confmf 2> /dev/null` in #(
6812e2dd055Smrg   *the\ am__doit\ target*)
6822e2dd055Smrg     am__include=.include
6832e2dd055Smrg     am__quote="\""
6842e2dd055Smrg     _am_result=BSD
6852e2dd055Smrg     ;;
6862e2dd055Smrg   esac
687a966c04fSmrgfi
688a966c04fSmrgAC_SUBST([am__include])
689a966c04fSmrgAC_SUBST([am__quote])
690a966c04fSmrgAC_MSG_RESULT([$_am_result])
691a966c04fSmrgrm -f confinc confmf
692a966c04fSmrg])
693a966c04fSmrg
694a966c04fSmrg# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
695a966c04fSmrg
6962e2dd055Smrg# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
697a966c04fSmrg# Free Software Foundation, Inc.
698a966c04fSmrg#
699a966c04fSmrg# This file is free software; the Free Software Foundation
700a966c04fSmrg# gives unlimited permission to copy and/or distribute it,
701a966c04fSmrg# with or without modifications, as long as this notice is preserved.
702a966c04fSmrg
7032e2dd055Smrg# serial 6
704a966c04fSmrg
705a966c04fSmrg# AM_MISSING_PROG(NAME, PROGRAM)
706a966c04fSmrg# ------------------------------
707a966c04fSmrgAC_DEFUN([AM_MISSING_PROG],
708a966c04fSmrg[AC_REQUIRE([AM_MISSING_HAS_RUN])
709a966c04fSmrg$1=${$1-"${am_missing_run}$2"}
710a966c04fSmrgAC_SUBST($1)])
711a966c04fSmrg
712a966c04fSmrg
713a966c04fSmrg# AM_MISSING_HAS_RUN
714a966c04fSmrg# ------------------
715a966c04fSmrg# Define MISSING if not defined so far and test if it supports --run.
716a966c04fSmrg# If it does, set am_missing_run to use it, otherwise, to nothing.
717a966c04fSmrgAC_DEFUN([AM_MISSING_HAS_RUN],
718a966c04fSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
719a966c04fSmrgAC_REQUIRE_AUX_FILE([missing])dnl
7202e2dd055Smrgif test x"${MISSING+set}" != xset; then
7212e2dd055Smrg  case $am_aux_dir in
7222e2dd055Smrg  *\ * | *\	*)
7232e2dd055Smrg    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
7242e2dd055Smrg  *)
7252e2dd055Smrg    MISSING="\${SHELL} $am_aux_dir/missing" ;;
7262e2dd055Smrg  esac
7272e2dd055Smrgfi
728a966c04fSmrg# Use eval to expand $SHELL
729a966c04fSmrgif eval "$MISSING --run true"; then
730a966c04fSmrg  am_missing_run="$MISSING --run "
731a966c04fSmrgelse
732a966c04fSmrg  am_missing_run=
733a966c04fSmrg  AC_MSG_WARN([`missing' script is too old or missing])
734a966c04fSmrgfi
735a966c04fSmrg])
736a966c04fSmrg
737a966c04fSmrg# Copyright (C) 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
738a966c04fSmrg#
739a966c04fSmrg# This file is free software; the Free Software Foundation
740a966c04fSmrg# gives unlimited permission to copy and/or distribute it,
741a966c04fSmrg# with or without modifications, as long as this notice is preserved.
742a966c04fSmrg
743a966c04fSmrg# AM_PROG_MKDIR_P
744a966c04fSmrg# ---------------
745a966c04fSmrg# Check for `mkdir -p'.
746a966c04fSmrgAC_DEFUN([AM_PROG_MKDIR_P],
747a966c04fSmrg[AC_PREREQ([2.60])dnl
748a966c04fSmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl
749a966c04fSmrgdnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
750a966c04fSmrgdnl while keeping a definition of mkdir_p for backward compatibility.
751a966c04fSmrgdnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
752a966c04fSmrgdnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
753a966c04fSmrgdnl Makefile.ins that do not define MKDIR_P, so we do our own
754a966c04fSmrgdnl adjustment using top_builddir (which is defined more often than
755a966c04fSmrgdnl MKDIR_P).
756a966c04fSmrgAC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
757a966c04fSmrgcase $mkdir_p in
758a966c04fSmrg  [[\\/$]]* | ?:[[\\/]]*) ;;
759a966c04fSmrg  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
760a966c04fSmrgesac
761a966c04fSmrg])
762a966c04fSmrg
763a966c04fSmrg# Helper functions for option handling.                     -*- Autoconf -*-
764a966c04fSmrg
7652e2dd055Smrg# Copyright (C) 2001, 2002, 2003, 2005, 2008  Free Software Foundation, Inc.
766a966c04fSmrg#
767a966c04fSmrg# This file is free software; the Free Software Foundation
768a966c04fSmrg# gives unlimited permission to copy and/or distribute it,
769a966c04fSmrg# with or without modifications, as long as this notice is preserved.
770a966c04fSmrg
7712e2dd055Smrg# serial 4
772a966c04fSmrg
773a966c04fSmrg# _AM_MANGLE_OPTION(NAME)
774a966c04fSmrg# -----------------------
775a966c04fSmrgAC_DEFUN([_AM_MANGLE_OPTION],
776a966c04fSmrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
777a966c04fSmrg
778a966c04fSmrg# _AM_SET_OPTION(NAME)
779a966c04fSmrg# ------------------------------
780a966c04fSmrg# Set option NAME.  Presently that only means defining a flag for this option.
781a966c04fSmrgAC_DEFUN([_AM_SET_OPTION],
782a966c04fSmrg[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
783a966c04fSmrg
784a966c04fSmrg# _AM_SET_OPTIONS(OPTIONS)
785a966c04fSmrg# ----------------------------------
786a966c04fSmrg# OPTIONS is a space-separated list of Automake options.
787a966c04fSmrgAC_DEFUN([_AM_SET_OPTIONS],
7882e2dd055Smrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
789a966c04fSmrg
790a966c04fSmrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
791a966c04fSmrg# -------------------------------------------
792a966c04fSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
793a966c04fSmrgAC_DEFUN([_AM_IF_OPTION],
794a966c04fSmrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
795a966c04fSmrg
796a966c04fSmrg# Check to make sure that the build environment is sane.    -*- Autoconf -*-
797a966c04fSmrg
7982e2dd055Smrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
799a966c04fSmrg# Free Software Foundation, Inc.
800a966c04fSmrg#
801a966c04fSmrg# This file is free software; the Free Software Foundation
802a966c04fSmrg# gives unlimited permission to copy and/or distribute it,
803a966c04fSmrg# with or without modifications, as long as this notice is preserved.
804a966c04fSmrg
8052e2dd055Smrg# serial 5
806a966c04fSmrg
807a966c04fSmrg# AM_SANITY_CHECK
808a966c04fSmrg# ---------------
809a966c04fSmrgAC_DEFUN([AM_SANITY_CHECK],
810a966c04fSmrg[AC_MSG_CHECKING([whether build environment is sane])
811a966c04fSmrg# Just in case
812a966c04fSmrgsleep 1
813a966c04fSmrgecho timestamp > conftest.file
8142e2dd055Smrg# Reject unsafe characters in $srcdir or the absolute working directory
8152e2dd055Smrg# name.  Accept space and tab only in the latter.
8162e2dd055Smrgam_lf='
8172e2dd055Smrg'
8182e2dd055Smrgcase `pwd` in
8192e2dd055Smrg  *[[\\\"\#\$\&\'\`$am_lf]]*)
8202e2dd055Smrg    AC_MSG_ERROR([unsafe absolute working directory name]);;
8212e2dd055Smrgesac
8222e2dd055Smrgcase $srcdir in
8232e2dd055Smrg  *[[\\\"\#\$\&\'\`$am_lf\ \	]]*)
8242e2dd055Smrg    AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
8252e2dd055Smrgesac
8262e2dd055Smrg
827a966c04fSmrg# Do `set' in a subshell so we don't clobber the current shell's
828a966c04fSmrg# arguments.  Must try -L first in case configure is actually a
829a966c04fSmrg# symlink; some systems play weird games with the mod time of symlinks
830a966c04fSmrg# (eg FreeBSD returns the mod time of the symlink's containing
831a966c04fSmrg# directory).
832a966c04fSmrgif (
8332e2dd055Smrg   set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
834a966c04fSmrg   if test "$[*]" = "X"; then
835a966c04fSmrg      # -L didn't work.
8362e2dd055Smrg      set X `ls -t "$srcdir/configure" conftest.file`
837a966c04fSmrg   fi
838a966c04fSmrg   rm -f conftest.file
839a966c04fSmrg   if test "$[*]" != "X $srcdir/configure conftest.file" \
840a966c04fSmrg      && test "$[*]" != "X conftest.file $srcdir/configure"; then
841a966c04fSmrg
842a966c04fSmrg      # If neither matched, then we have a broken ls.  This can happen
843a966c04fSmrg      # if, for instance, CONFIG_SHELL is bash and it inherits a
844a966c04fSmrg      # broken ls alias from the environment.  This has actually
845a966c04fSmrg      # happened.  Such a system could not be considered "sane".
846a966c04fSmrg      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
847a966c04fSmrgalias in your environment])
848a966c04fSmrg   fi
849a966c04fSmrg
850a966c04fSmrg   test "$[2]" = conftest.file
851a966c04fSmrg   )
852a966c04fSmrgthen
853a966c04fSmrg   # Ok.
854a966c04fSmrg   :
855a966c04fSmrgelse
856a966c04fSmrg   AC_MSG_ERROR([newly created file is older than distributed files!
857a966c04fSmrgCheck your system clock])
858a966c04fSmrgfi
859a966c04fSmrgAC_MSG_RESULT(yes)])
860a966c04fSmrg
8612e2dd055Smrg# Copyright (C) 2009  Free Software Foundation, Inc.
8622e2dd055Smrg#
8632e2dd055Smrg# This file is free software; the Free Software Foundation
8642e2dd055Smrg# gives unlimited permission to copy and/or distribute it,
8652e2dd055Smrg# with or without modifications, as long as this notice is preserved.
8662e2dd055Smrg
8672e2dd055Smrg# serial 1
8682e2dd055Smrg
8692e2dd055Smrg# AM_SILENT_RULES([DEFAULT])
8702e2dd055Smrg# --------------------------
8712e2dd055Smrg# Enable less verbose build rules; with the default set to DEFAULT
8722e2dd055Smrg# (`yes' being less verbose, `no' or empty being verbose).
8732e2dd055SmrgAC_DEFUN([AM_SILENT_RULES],
8742e2dd055Smrg[AC_ARG_ENABLE([silent-rules],
8752e2dd055Smrg[  --enable-silent-rules          less verbose build output (undo: `make V=1')
8762e2dd055Smrg  --disable-silent-rules         verbose build output (undo: `make V=0')])
8772e2dd055Smrgcase $enable_silent_rules in
8782e2dd055Smrgyes) AM_DEFAULT_VERBOSITY=0;;
8792e2dd055Smrgno)  AM_DEFAULT_VERBOSITY=1;;
8802e2dd055Smrg*)   AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
8812e2dd055Smrgesac
8822e2dd055SmrgAC_SUBST([AM_DEFAULT_VERBOSITY])dnl
8832e2dd055SmrgAM_BACKSLASH='\'
8842e2dd055SmrgAC_SUBST([AM_BACKSLASH])dnl
8852e2dd055Smrg_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
8862e2dd055Smrg])
8872e2dd055Smrg
888a966c04fSmrg# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
889a966c04fSmrg#
890a966c04fSmrg# This file is free software; the Free Software Foundation
891a966c04fSmrg# gives unlimited permission to copy and/or distribute it,
892a966c04fSmrg# with or without modifications, as long as this notice is preserved.
893a966c04fSmrg
894a966c04fSmrg# AM_PROG_INSTALL_STRIP
895a966c04fSmrg# ---------------------
896a966c04fSmrg# One issue with vendor `install' (even GNU) is that you can't
897a966c04fSmrg# specify the program used to strip binaries.  This is especially
898a966c04fSmrg# annoying in cross-compiling environments, where the build's strip
899a966c04fSmrg# is unlikely to handle the host's binaries.
900a966c04fSmrg# Fortunately install-sh will honor a STRIPPROG variable, so we
901a966c04fSmrg# always use install-sh in `make install-strip', and initialize
902a966c04fSmrg# STRIPPROG with the value of the STRIP variable (set by the user).
903a966c04fSmrgAC_DEFUN([AM_PROG_INSTALL_STRIP],
904a966c04fSmrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
905a966c04fSmrg# Installed binaries are usually stripped using `strip' when the user
906a966c04fSmrg# run `make install-strip'.  However `strip' might not be the right
907a966c04fSmrg# tool to use in cross-compilation environments, therefore Automake
908a966c04fSmrg# will honor the `STRIP' environment variable to overrule this program.
909a966c04fSmrgdnl Don't test for $cross_compiling = yes, because it might be `maybe'.
910a966c04fSmrgif test "$cross_compiling" != no; then
911a966c04fSmrg  AC_CHECK_TOOL([STRIP], [strip], :)
912a966c04fSmrgfi
913a966c04fSmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
914a966c04fSmrgAC_SUBST([INSTALL_STRIP_PROGRAM])])
915a966c04fSmrg
9162e2dd055Smrg# Copyright (C) 2006, 2008  Free Software Foundation, Inc.
917a966c04fSmrg#
918a966c04fSmrg# This file is free software; the Free Software Foundation
919a966c04fSmrg# gives unlimited permission to copy and/or distribute it,
920a966c04fSmrg# with or without modifications, as long as this notice is preserved.
921a966c04fSmrg
9222e2dd055Smrg# serial 2
9232e2dd055Smrg
924a966c04fSmrg# _AM_SUBST_NOTMAKE(VARIABLE)
925a966c04fSmrg# ---------------------------
9262e2dd055Smrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
927a966c04fSmrg# This macro is traced by Automake.
928a966c04fSmrgAC_DEFUN([_AM_SUBST_NOTMAKE])
929a966c04fSmrg
9302e2dd055Smrg# AM_SUBST_NOTMAKE(VARIABLE)
9312e2dd055Smrg# ---------------------------
9322e2dd055Smrg# Public sister of _AM_SUBST_NOTMAKE.
9332e2dd055SmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
9342e2dd055Smrg
935a966c04fSmrg# Check how to create a tarball.                            -*- Autoconf -*-
936a966c04fSmrg
937a966c04fSmrg# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
938a966c04fSmrg#
939a966c04fSmrg# This file is free software; the Free Software Foundation
940a966c04fSmrg# gives unlimited permission to copy and/or distribute it,
941a966c04fSmrg# with or without modifications, as long as this notice is preserved.
942a966c04fSmrg
943a966c04fSmrg# serial 2
944a966c04fSmrg
945a966c04fSmrg# _AM_PROG_TAR(FORMAT)
946a966c04fSmrg# --------------------
947a966c04fSmrg# Check how to create a tarball in format FORMAT.
948a966c04fSmrg# FORMAT should be one of `v7', `ustar', or `pax'.
949a966c04fSmrg#
950a966c04fSmrg# Substitute a variable $(am__tar) that is a command
951a966c04fSmrg# writing to stdout a FORMAT-tarball containing the directory
952a966c04fSmrg# $tardir.
953a966c04fSmrg#     tardir=directory && $(am__tar) > result.tar
954a966c04fSmrg#
955a966c04fSmrg# Substitute a variable $(am__untar) that extract such
956a966c04fSmrg# a tarball read from stdin.
957a966c04fSmrg#     $(am__untar) < result.tar
958a966c04fSmrgAC_DEFUN([_AM_PROG_TAR],
959a966c04fSmrg[# Always define AMTAR for backward compatibility.
960a966c04fSmrgAM_MISSING_PROG([AMTAR], [tar])
961a966c04fSmrgm4_if([$1], [v7],
962a966c04fSmrg     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
963a966c04fSmrg     [m4_case([$1], [ustar],, [pax],,
964a966c04fSmrg              [m4_fatal([Unknown tar format])])
965a966c04fSmrgAC_MSG_CHECKING([how to create a $1 tar archive])
966a966c04fSmrg# Loop over all known methods to create a tar archive until one works.
967a966c04fSmrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
968a966c04fSmrg_am_tools=${am_cv_prog_tar_$1-$_am_tools}
969a966c04fSmrg# Do not fold the above two line into one, because Tru64 sh and
970a966c04fSmrg# Solaris sh will not grok spaces in the rhs of `-'.
971a966c04fSmrgfor _am_tool in $_am_tools
972a966c04fSmrgdo
973a966c04fSmrg  case $_am_tool in
974a966c04fSmrg  gnutar)
975a966c04fSmrg    for _am_tar in tar gnutar gtar;
976a966c04fSmrg    do
977a966c04fSmrg      AM_RUN_LOG([$_am_tar --version]) && break
978a966c04fSmrg    done
979a966c04fSmrg    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
980a966c04fSmrg    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
981a966c04fSmrg    am__untar="$_am_tar -xf -"
982a966c04fSmrg    ;;
983a966c04fSmrg  plaintar)
984a966c04fSmrg    # Must skip GNU tar: if it does not support --format= it doesn't create
985a966c04fSmrg    # ustar tarball either.
986a966c04fSmrg    (tar --version) >/dev/null 2>&1 && continue
987a966c04fSmrg    am__tar='tar chf - "$$tardir"'
988a966c04fSmrg    am__tar_='tar chf - "$tardir"'
989a966c04fSmrg    am__untar='tar xf -'
990a966c04fSmrg    ;;
991a966c04fSmrg  pax)
992a966c04fSmrg    am__tar='pax -L -x $1 -w "$$tardir"'
993a966c04fSmrg    am__tar_='pax -L -x $1 -w "$tardir"'
994a966c04fSmrg    am__untar='pax -r'
995a966c04fSmrg    ;;
996a966c04fSmrg  cpio)
997a966c04fSmrg    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
998a966c04fSmrg    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
999a966c04fSmrg    am__untar='cpio -i -H $1 -d'
1000a966c04fSmrg    ;;
1001a966c04fSmrg  none)
1002a966c04fSmrg    am__tar=false
1003a966c04fSmrg    am__tar_=false
1004a966c04fSmrg    am__untar=false
1005a966c04fSmrg    ;;
1006a966c04fSmrg  esac
1007a966c04fSmrg
1008a966c04fSmrg  # If the value was cached, stop now.  We just wanted to have am__tar
1009a966c04fSmrg  # and am__untar set.
1010a966c04fSmrg  test -n "${am_cv_prog_tar_$1}" && break
1011a966c04fSmrg
1012a966c04fSmrg  # tar/untar a dummy directory, and stop if the command works
1013a966c04fSmrg  rm -rf conftest.dir
1014a966c04fSmrg  mkdir conftest.dir
1015a966c04fSmrg  echo GrepMe > conftest.dir/file
1016a966c04fSmrg  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
1017a966c04fSmrg  rm -rf conftest.dir
1018a966c04fSmrg  if test -s conftest.tar; then
1019a966c04fSmrg    AM_RUN_LOG([$am__untar <conftest.tar])
1020a966c04fSmrg    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
1021a966c04fSmrg  fi
1022a966c04fSmrgdone
1023a966c04fSmrgrm -rf conftest.dir
1024a966c04fSmrg
1025a966c04fSmrgAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
1026a966c04fSmrgAC_MSG_RESULT([$am_cv_prog_tar_$1])])
1027a966c04fSmrgAC_SUBST([am__tar])
1028a966c04fSmrgAC_SUBST([am__untar])
1029a966c04fSmrg]) # _AM_PROG_TAR
1030a966c04fSmrg
10312e2dd055Smrgdnl xorg-macros.m4.  Generated from xorg-macros.m4.in xorgversion.m4 by configure.
1032a966c04fSmrgdnl
1033a966c04fSmrgdnl Copyright 2005-2006 Sun Microsystems, Inc.  All rights reserved.
1034a966c04fSmrgdnl 
1035a966c04fSmrgdnl Permission is hereby granted, free of charge, to any person obtaining a
1036a966c04fSmrgdnl copy of this software and associated documentation files (the
1037a966c04fSmrgdnl "Software"), to deal in the Software without restriction, including
1038a966c04fSmrgdnl without limitation the rights to use, copy, modify, merge, publish,
1039a966c04fSmrgdnl distribute, and/or sell copies of the Software, and to permit persons
1040a966c04fSmrgdnl to whom the Software is furnished to do so, provided that the above
1041a966c04fSmrgdnl copyright notice(s) and this permission notice appear in all copies of
1042a966c04fSmrgdnl the Software and that both the above copyright notice(s) and this
1043a966c04fSmrgdnl permission notice appear in supporting documentation.
1044a966c04fSmrgdnl
1045a966c04fSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
1046a966c04fSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
1047a966c04fSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
1048a966c04fSmrgdnl OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
1049a966c04fSmrgdnl HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
1050a966c04fSmrgdnl INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
1051a966c04fSmrgdnl FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
1052a966c04fSmrgdnl NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
1053a966c04fSmrgdnl WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
1054a966c04fSmrgdnl
1055a966c04fSmrgdnl Except as contained in this notice, the name of a copyright holder
1056a966c04fSmrgdnl shall not be used in advertising or otherwise to promote the sale, use
1057a966c04fSmrgdnl or other dealings in this Software without prior written authorization
1058a966c04fSmrgdnl of the copyright holder.
1059a966c04fSmrg
1060a966c04fSmrg# XORG_MACROS_VERSION(required-version)
1061a966c04fSmrg# -------------------------------------
1062a966c04fSmrg# Minimum version: 1.1.0
1063a966c04fSmrg#
1064a966c04fSmrg# If you're using a macro added in Version 1.1 or newer, include this in
1065a966c04fSmrg# your configure.ac with the minimum required version, such as:
1066a966c04fSmrg# XORG_MACROS_VERSION(1.1)
1067a966c04fSmrg#
10682e2dd055Smrg# To ensure that this macro is defined, also add:
10692e2dd055Smrg# m4_ifndef([XORG_MACROS_VERSION],
10702e2dd055Smrg#     [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])])
1071a966c04fSmrg#
1072a966c04fSmrg#
1073a966c04fSmrg# See the "minimum version" comment for each macro you use to see what 
1074a966c04fSmrg# version you require.
10752e2dd055Smrgm4_defun([XORG_MACROS_VERSION],[
10762e2dd055Smrgm4_define([vers_have], [1.3.0])
10772e2dd055Smrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.])))
10782e2dd055Smrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.])))
10792e2dd055Smrgm4_if(m4_cmp(maj_have, maj_needed), 0,,
10802e2dd055Smrg    [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])])
10812e2dd055Smrgm4_if(m4_version_compare(vers_have, [$1]), -1,
10822e2dd055Smrg    [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])])
10832e2dd055Smrgm4_undefine([vers_have])
10842e2dd055Smrgm4_undefine([maj_have])
10852e2dd055Smrgm4_undefine([maj_needed])
1086a966c04fSmrg]) # XORG_MACROS_VERSION
1087a966c04fSmrg
1088a966c04fSmrg# XORG_PROG_RAWCPP()
1089a966c04fSmrg# ------------------
1090a966c04fSmrg# Minimum version: 1.0.0
1091a966c04fSmrg#
1092a966c04fSmrg# Find cpp program and necessary flags for use in pre-processing text files
1093a966c04fSmrg# such as man pages and config files
1094a966c04fSmrgAC_DEFUN([XORG_PROG_RAWCPP],[
1095a966c04fSmrgAC_REQUIRE([AC_PROG_CPP])
1096a966c04fSmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 
1097a966c04fSmrg   [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib])
1098a966c04fSmrg
1099a966c04fSmrg# Check for flag to avoid builtin definitions - assumes unix is predefined,
1100a966c04fSmrg# which is not the best choice for supporting other OS'es, but covers most
1101a966c04fSmrg# of the ones we need for now.
1102a966c04fSmrgAC_MSG_CHECKING([if $RAWCPP requires -undef])
1103a966c04fSmrgAC_LANG_CONFTEST([Does cpp redefine unix ?])
1104a966c04fSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
1105a966c04fSmrg	AC_MSG_RESULT([no])
1106a966c04fSmrgelse
1107a966c04fSmrg	if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
1108a966c04fSmrg		RAWCPPFLAGS=-undef
1109a966c04fSmrg		AC_MSG_RESULT([yes])
11102e2dd055Smrg	# under Cygwin unix is still defined even with -undef
11112e2dd055Smrg	elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
11122e2dd055Smrg		RAWCPPFLAGS="-undef -ansi"
11132e2dd055Smrg		AC_MSG_RESULT([yes, with -ansi])
1114a966c04fSmrg	else
1115a966c04fSmrg		AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef.  I don't know what to do.])
1116a966c04fSmrg	fi
1117a966c04fSmrgfi
1118a966c04fSmrgrm -f conftest.$ac_ext
1119a966c04fSmrg
1120a966c04fSmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional])
1121a966c04fSmrgAC_LANG_CONFTEST([Does cpp preserve   "whitespace"?])
1122a966c04fSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
1123a966c04fSmrg	AC_MSG_RESULT([no])
1124a966c04fSmrgelse
1125a966c04fSmrg	if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
1126a966c04fSmrg		RAWCPPFLAGS="${RAWCPPFLAGS} -traditional"
1127a966c04fSmrg		AC_MSG_RESULT([yes])
1128a966c04fSmrg	else
1129a966c04fSmrg		AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional.  I don't know what to do.])
1130a966c04fSmrg	fi
1131a966c04fSmrgfi
1132a966c04fSmrgrm -f conftest.$ac_ext
1133a966c04fSmrgAC_SUBST(RAWCPPFLAGS)
1134a966c04fSmrg]) # XORG_PROG_RAWCPP
1135a966c04fSmrg
1136a966c04fSmrg# XORG_MANPAGE_SECTIONS()
1137a966c04fSmrg# -----------------------
1138a966c04fSmrg# Minimum version: 1.0.0
1139a966c04fSmrg#
1140a966c04fSmrg# Determine which sections man pages go in for the different man page types
1141a966c04fSmrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files.
1142a966c04fSmrg# Not sure if there's any better way than just hardcoding by OS name.
1143a966c04fSmrg# Override default settings by setting environment variables
1144a966c04fSmrg
1145a966c04fSmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[
1146a966c04fSmrgAC_REQUIRE([AC_CANONICAL_HOST])
1147a966c04fSmrg
1148a966c04fSmrgif test x$APP_MAN_SUFFIX = x    ; then
1149a966c04fSmrg    APP_MAN_SUFFIX=1
1150a966c04fSmrgfi
1151a966c04fSmrgif test x$APP_MAN_DIR = x    ; then
1152a966c04fSmrg    APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)'
1153a966c04fSmrgfi
1154a966c04fSmrg
1155a966c04fSmrgif test x$LIB_MAN_SUFFIX = x    ; then
1156a966c04fSmrg    LIB_MAN_SUFFIX=3
1157a966c04fSmrgfi
1158a966c04fSmrgif test x$LIB_MAN_DIR = x    ; then
1159a966c04fSmrg    LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)'
1160a966c04fSmrgfi
1161a966c04fSmrg
1162a966c04fSmrgif test x$FILE_MAN_SUFFIX = x    ; then
1163a966c04fSmrg    case $host_os in
1164a966c04fSmrg	solaris*)	FILE_MAN_SUFFIX=4  ;;
1165a966c04fSmrg	*)		FILE_MAN_SUFFIX=5  ;;
1166a966c04fSmrg    esac
1167a966c04fSmrgfi
1168a966c04fSmrgif test x$FILE_MAN_DIR = x    ; then
1169a966c04fSmrg    FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)'
1170a966c04fSmrgfi
1171a966c04fSmrg
1172a966c04fSmrgif test x$MISC_MAN_SUFFIX = x    ; then
1173a966c04fSmrg    case $host_os in
1174a966c04fSmrg	solaris*)	MISC_MAN_SUFFIX=5  ;;
1175a966c04fSmrg	*)		MISC_MAN_SUFFIX=7  ;;
1176a966c04fSmrg    esac
1177a966c04fSmrgfi
1178a966c04fSmrgif test x$MISC_MAN_DIR = x    ; then
1179a966c04fSmrg    MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)'
1180a966c04fSmrgfi
1181a966c04fSmrg
1182a966c04fSmrgif test x$DRIVER_MAN_SUFFIX = x    ; then
1183a966c04fSmrg    case $host_os in
1184a966c04fSmrg	solaris*)	DRIVER_MAN_SUFFIX=7  ;;
1185a966c04fSmrg	*)		DRIVER_MAN_SUFFIX=4  ;;
1186a966c04fSmrg    esac
1187a966c04fSmrgfi
1188a966c04fSmrgif test x$DRIVER_MAN_DIR = x    ; then
1189a966c04fSmrg    DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)'
1190a966c04fSmrgfi
1191a966c04fSmrg
1192a966c04fSmrgif test x$ADMIN_MAN_SUFFIX = x    ; then
1193a966c04fSmrg    case $host_os in
1194a966c04fSmrg	solaris*)	ADMIN_MAN_SUFFIX=1m ;;
1195a966c04fSmrg	*)		ADMIN_MAN_SUFFIX=8  ;;
1196a966c04fSmrg    esac
1197a966c04fSmrgfi
1198a966c04fSmrgif test x$ADMIN_MAN_DIR = x    ; then
1199a966c04fSmrg    ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)'
1200a966c04fSmrgfi
1201a966c04fSmrg
1202a966c04fSmrg
1203a966c04fSmrgAC_SUBST([APP_MAN_SUFFIX])
1204a966c04fSmrgAC_SUBST([LIB_MAN_SUFFIX])
1205a966c04fSmrgAC_SUBST([FILE_MAN_SUFFIX])
1206a966c04fSmrgAC_SUBST([MISC_MAN_SUFFIX])
1207a966c04fSmrgAC_SUBST([DRIVER_MAN_SUFFIX])
1208a966c04fSmrgAC_SUBST([ADMIN_MAN_SUFFIX])
1209a966c04fSmrgAC_SUBST([APP_MAN_DIR])
1210a966c04fSmrgAC_SUBST([LIB_MAN_DIR])
1211a966c04fSmrgAC_SUBST([FILE_MAN_DIR])
1212a966c04fSmrgAC_SUBST([MISC_MAN_DIR])
1213a966c04fSmrgAC_SUBST([DRIVER_MAN_DIR])
1214a966c04fSmrgAC_SUBST([ADMIN_MAN_DIR])
1215a966c04fSmrg]) # XORG_MANPAGE_SECTIONS
1216a966c04fSmrg
1217a966c04fSmrg# XORG_CHECK_LINUXDOC
1218a966c04fSmrg# -------------------
1219a966c04fSmrg# Minimum version: 1.0.0
1220a966c04fSmrg#
1221a966c04fSmrg# Defines the variable MAKE_TEXT if the necessary tools and
1222a966c04fSmrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt.
1223a966c04fSmrg# Whether or not the necessary tools and files are found can be checked
1224a966c04fSmrg# with the AM_CONDITIONAL "BUILD_LINUXDOC"
1225a966c04fSmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[
12262e2dd055Smrgif test x$XORG_SGML_PATH = x ; then
12272e2dd055Smrg    XORG_SGML_PATH=$prefix/share/sgml
12282e2dd055Smrgfi
1229a966c04fSmrgHAVE_DEFS_ENT=
1230a966c04fSmrg
1231a966c04fSmrgif test x"$cross_compiling" = x"yes" ; then
1232a966c04fSmrg  HAVE_DEFS_ENT=no
1233a966c04fSmrgelse
1234a966c04fSmrg  AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes])
1235a966c04fSmrgfi
1236a966c04fSmrg
1237a966c04fSmrgAC_PATH_PROG(LINUXDOC, linuxdoc)
1238a966c04fSmrgAC_PATH_PROG(PS2PDF, ps2pdf)
1239a966c04fSmrg
1240a966c04fSmrgAC_MSG_CHECKING([Whether to build documentation])
1241a966c04fSmrg
1242a966c04fSmrgif test x$HAVE_DEFS_ENT != x && test x$LINUXDOC != x ; then
1243a966c04fSmrg   BUILDDOC=yes
1244a966c04fSmrgelse
1245a966c04fSmrg   BUILDDOC=no
1246a966c04fSmrgfi
1247a966c04fSmrg
1248a966c04fSmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes])
1249a966c04fSmrg
1250a966c04fSmrgAC_MSG_RESULT([$BUILDDOC])
1251a966c04fSmrg
1252a966c04fSmrgAC_MSG_CHECKING([Whether to build pdf documentation])
1253a966c04fSmrg
1254a966c04fSmrgif test x$PS2PDF != x && test x$BUILD_PDFDOC != xno; then
1255a966c04fSmrg   BUILDPDFDOC=yes
1256a966c04fSmrgelse
1257a966c04fSmrg   BUILDPDFDOC=no
1258a966c04fSmrgfi
1259a966c04fSmrg
1260a966c04fSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
1261a966c04fSmrg
1262a966c04fSmrgAC_MSG_RESULT([$BUILDPDFDOC])
1263a966c04fSmrg
1264a966c04fSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt"
1265a966c04fSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps"
1266a966c04fSmrgMAKE_PDF="$PS2PDF"
1267a966c04fSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC  -B html --split=0"
1268a966c04fSmrg
1269a966c04fSmrgAC_SUBST(MAKE_TEXT)
1270a966c04fSmrgAC_SUBST(MAKE_PS)
1271a966c04fSmrgAC_SUBST(MAKE_PDF)
1272a966c04fSmrgAC_SUBST(MAKE_HTML)
1273a966c04fSmrg]) # XORG_CHECK_LINUXDOC
1274a966c04fSmrg
1275a966c04fSmrg# XORG_CHECK_DOCBOOK
1276a966c04fSmrg# -------------------
1277a966c04fSmrg# Minimum version: 1.0.0
1278a966c04fSmrg#
1279a966c04fSmrg# Checks for the ability to build output formats from SGML DocBook source.
1280a966c04fSmrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC"
1281a966c04fSmrg# indicates whether the necessary tools and files are found and, if set,
1282a966c04fSmrg# $(MAKE_XXX) blah.sgml will produce blah.xxx.
1283a966c04fSmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[
12842e2dd055Smrgif test x$XORG_SGML_PATH = x ; then
12852e2dd055Smrg    XORG_SGML_PATH=$prefix/share/sgml
12862e2dd055Smrgfi
1287a966c04fSmrgHAVE_DEFS_ENT=
1288a966c04fSmrgBUILDTXTDOC=no
1289a966c04fSmrgBUILDPDFDOC=no
1290a966c04fSmrgBUILDPSDOC=no
1291a966c04fSmrgBUILDHTMLDOC=no
1292a966c04fSmrg
1293a966c04fSmrgAC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes])
1294a966c04fSmrg
1295a966c04fSmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps)
1296a966c04fSmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf)
1297a966c04fSmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html)
1298a966c04fSmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt)
1299a966c04fSmrg
1300a966c04fSmrgAC_MSG_CHECKING([Whether to build text documentation])
1301a966c04fSmrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKTXT != x &&
1302a966c04fSmrg   test x$BUILD_TXTDOC != xno; then
1303a966c04fSmrg	BUILDTXTDOC=yes
1304a966c04fSmrgfi
1305a966c04fSmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes])
1306a966c04fSmrgAC_MSG_RESULT([$BUILDTXTDOC])
1307a966c04fSmrg
1308a966c04fSmrgAC_MSG_CHECKING([Whether to build PDF documentation])
1309a966c04fSmrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPDF != x &&
1310a966c04fSmrg   test x$BUILD_PDFDOC != xno; then
1311a966c04fSmrg	BUILDPDFDOC=yes
1312a966c04fSmrgfi
1313a966c04fSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
1314a966c04fSmrgAC_MSG_RESULT([$BUILDPDFDOC])
1315a966c04fSmrg
1316a966c04fSmrgAC_MSG_CHECKING([Whether to build PostScript documentation])
1317a966c04fSmrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPS != x &&
1318a966c04fSmrg   test x$BUILD_PSDOC != xno; then
1319a966c04fSmrg	BUILDPSDOC=yes
1320a966c04fSmrgfi
1321a966c04fSmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes])
1322a966c04fSmrgAC_MSG_RESULT([$BUILDPSDOC])
1323a966c04fSmrg
1324a966c04fSmrgAC_MSG_CHECKING([Whether to build HTML documentation])
1325a966c04fSmrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKHTML != x &&
1326a966c04fSmrg   test x$BUILD_HTMLDOC != xno; then
1327a966c04fSmrg	BUILDHTMLDOC=yes
1328a966c04fSmrgfi
1329a966c04fSmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes])
1330a966c04fSmrgAC_MSG_RESULT([$BUILDHTMLDOC])
1331a966c04fSmrg
1332a966c04fSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT"
1333a966c04fSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS"
1334a966c04fSmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF"
1335a966c04fSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML"
1336a966c04fSmrg
1337a966c04fSmrgAC_SUBST(MAKE_TEXT)
1338a966c04fSmrgAC_SUBST(MAKE_PS)
1339a966c04fSmrgAC_SUBST(MAKE_PDF)
1340a966c04fSmrgAC_SUBST(MAKE_HTML)
1341a966c04fSmrg]) # XORG_CHECK_DOCBOOK
1342a966c04fSmrg
1343a966c04fSmrg# XORG_CHECK_MALLOC_ZERO
1344a966c04fSmrg# ----------------------
1345a966c04fSmrg# Minimum version: 1.0.0
1346a966c04fSmrg#
1347a966c04fSmrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if
1348a966c04fSmrg# malloc(0) returns NULL.  Packages should add one of these cflags to
1349a966c04fSmrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them.
1350a966c04fSmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[
1351a966c04fSmrgAC_ARG_ENABLE(malloc0returnsnull,
13522e2dd055Smrg	AS_HELP_STRING([--enable-malloc0returnsnull],
1353a966c04fSmrg		       [malloc(0) returns NULL (default: auto)]),
1354a966c04fSmrg	[MALLOC_ZERO_RETURNS_NULL=$enableval],
1355a966c04fSmrg	[MALLOC_ZERO_RETURNS_NULL=auto])
1356a966c04fSmrg
1357a966c04fSmrgAC_MSG_CHECKING([whether malloc(0) returns NULL])
1358a966c04fSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then
1359a966c04fSmrg	AC_RUN_IFELSE([
1360a966c04fSmrgchar *malloc();
1361a966c04fSmrgchar *realloc();
1362a966c04fSmrgchar *calloc();
1363a966c04fSmrgmain() {
1364a966c04fSmrg    char *m0, *r0, *c0, *p;
1365a966c04fSmrg    m0 = malloc(0);
1366a966c04fSmrg    p = malloc(10);
1367a966c04fSmrg    r0 = realloc(p,0);
1368a966c04fSmrg    c0 = calloc(0);
1369a966c04fSmrg    exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1);
1370a966c04fSmrg}],
1371a966c04fSmrg		[MALLOC_ZERO_RETURNS_NULL=yes],
1372a966c04fSmrg		[MALLOC_ZERO_RETURNS_NULL=no])
1373a966c04fSmrgfi
1374a966c04fSmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL])
1375a966c04fSmrg
1376a966c04fSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then
1377a966c04fSmrg	MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL"
1378a966c04fSmrg	XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS
1379a966c04fSmrg	XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC"
1380a966c04fSmrgelse
1381a966c04fSmrg	MALLOC_ZERO_CFLAGS=""
1382a966c04fSmrg	XMALLOC_ZERO_CFLAGS=""
1383a966c04fSmrg	XTMALLOC_ZERO_CFLAGS=""
1384a966c04fSmrgfi
1385a966c04fSmrg
1386a966c04fSmrgAC_SUBST([MALLOC_ZERO_CFLAGS])
1387a966c04fSmrgAC_SUBST([XMALLOC_ZERO_CFLAGS])
1388a966c04fSmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS])
1389a966c04fSmrg]) # XORG_CHECK_MALLOC_ZERO
1390a966c04fSmrg
1391a966c04fSmrg# XORG_WITH_LINT()
1392a966c04fSmrg# ----------------
1393a966c04fSmrg# Minimum version: 1.1.0
1394a966c04fSmrg#
1395a966c04fSmrg# Sets up flags for source checkers such as lint and sparse if --with-lint
1396a966c04fSmrg# is specified.   (Use --with-lint=sparse for sparse.)
1397a966c04fSmrg# Sets $LINT to name of source checker passed with --with-lint (default: lint)
1398a966c04fSmrg# Sets $LINT_FLAGS to flags to pass to source checker
1399a966c04fSmrg# Sets LINT automake conditional if enabled (default: disabled)
1400a966c04fSmrg#
1401a966c04fSmrgAC_DEFUN([XORG_WITH_LINT],[
1402a966c04fSmrg
1403a966c04fSmrg# Allow checking code with lint, sparse, etc.
14042e2dd055SmrgAC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint],
1405a966c04fSmrg		[Use a lint-style source code checker (default: disabled)])],
1406a966c04fSmrg		[use_lint=$withval], [use_lint=no])
1407a966c04fSmrgif test "x$use_lint" = "xyes" ; then
1408a966c04fSmrg	LINT="lint"
1409a966c04fSmrgelse
1410a966c04fSmrg	LINT="$use_lint"
1411a966c04fSmrgfi
1412a966c04fSmrgif test "x$LINT_FLAGS" = "x" -a "x$LINT" != "xno" ; then
1413a966c04fSmrg    case $LINT in
1414a966c04fSmrg	lint|*/lint)
1415a966c04fSmrg	    case $host_os in
1416a966c04fSmrg		solaris*)
1417a966c04fSmrg			LINT_FLAGS="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2"
1418a966c04fSmrg			;;
1419a966c04fSmrg	    esac
1420a966c04fSmrg	    ;;
1421a966c04fSmrg    esac
1422a966c04fSmrgfi
1423a966c04fSmrg
1424a966c04fSmrgAC_SUBST(LINT)
1425a966c04fSmrgAC_SUBST(LINT_FLAGS)
1426a966c04fSmrgAM_CONDITIONAL(LINT, [test x$LINT != xno])
1427a966c04fSmrg
1428a966c04fSmrg]) # XORG_WITH_LINT
1429a966c04fSmrg
1430a966c04fSmrg# XORG_LINT_LIBRARY(LIBNAME)
1431a966c04fSmrg# --------------------------
1432a966c04fSmrg# Minimum version: 1.1.0
1433a966c04fSmrg#
1434a966c04fSmrg# Sets up flags for building lint libraries for checking programs that call
1435a966c04fSmrg# functions in the library.
1436a966c04fSmrg# Disabled by default, enable with --enable-lint-library
1437a966c04fSmrg# Sets: 
1438a966c04fSmrg#	@LINTLIB@		- name of lint library file to make
1439a966c04fSmrg#	MAKE_LINT_LIB		- automake conditional
1440a966c04fSmrg#
1441a966c04fSmrg
1442a966c04fSmrgAC_DEFUN([XORG_LINT_LIBRARY],[
1443a966c04fSmrgAC_REQUIRE([XORG_WITH_LINT])
1444a966c04fSmrg# Build lint "library" for more indepth checks of programs calling this library
14452e2dd055SmrgAC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library],
1446a966c04fSmrg	[Create lint library (default: disabled)])],
1447a966c04fSmrg	[make_lint_lib=$enableval], [make_lint_lib=no])
1448a966c04fSmrgif test "x$make_lint_lib" != "xno" ; then
1449a966c04fSmrg	if test "x$LINT" = "xno" ; then
1450a966c04fSmrg		AC_MSG_ERROR([Cannot make lint library without --with-lint])
1451a966c04fSmrg	fi
1452a966c04fSmrg	if test "x$make_lint_lib" = "xyes" ; then
1453a966c04fSmrg		LINTLIB=llib-l$1.ln
1454a966c04fSmrg	else
1455a966c04fSmrg		LINTLIB=$make_lint_lib
1456a966c04fSmrg	fi
1457a966c04fSmrgfi
1458a966c04fSmrgAC_SUBST(LINTLIB)
1459a966c04fSmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno])
1460a966c04fSmrg
1461a966c04fSmrg]) # XORG_LINT_LIBRARY
1462a966c04fSmrg
14632e2dd055Smrg# XORG_CWARNFLAGS
14642e2dd055Smrg# ---------------
14652e2dd055Smrg# Minimum version: 1.2.0
14662e2dd055Smrg#
14672e2dd055Smrg# Defines CWARNFLAGS to enable C compiler warnings.
14682e2dd055Smrg#
14692e2dd055SmrgAC_DEFUN([XORG_CWARNFLAGS], [
14702e2dd055SmrgAC_REQUIRE([AC_PROG_CC])
14712e2dd055Smrgif  test "x$GCC" = xyes ; then
14722e2dd055Smrg    CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \
14732e2dd055Smrg-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \
14742e2dd055Smrg-Wbad-function-cast"
14752e2dd055Smrg    case `$CC -dumpversion` in
14762e2dd055Smrg    3.4.* | 4.*)
14772e2dd055Smrg	CWARNFLAGS="$CWARNFLAGS -Wold-style-definition -Wdeclaration-after-statement"
14782e2dd055Smrg	;;
14792e2dd055Smrg    esac
14802e2dd055Smrgelse
14812e2dd055Smrg    AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
14822e2dd055Smrg    if test "x$SUNCC" = "xyes"; then
14832e2dd055Smrg	CWARNFLAGS="-v"
14842e2dd055Smrg    fi
14852e2dd055Smrgfi
14862e2dd055SmrgAC_SUBST(CWARNFLAGS)
14872e2dd055Smrgm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
14882e2dd055Smrg]) # XORG_CWARNFLAGS
14892e2dd055Smrg
14902e2dd055Smrg# XORG_STRICT_OPTION
14912e2dd055Smrg# -----------------------
14922e2dd055Smrg# Minimum version: 1.3.0
14932e2dd055Smrg#
14942e2dd055Smrg# Add configure option to enable strict compilation
14952e2dd055SmrgAC_DEFUN([XORG_STRICT_OPTION], [
14962e2dd055SmrgAC_REQUIRE([AC_PROG_CC])
14972e2dd055SmrgAC_REQUIRE([AC_PROG_CC_C99])
14982e2dd055SmrgAC_REQUIRE([XORG_CWARNFLAGS])
14992e2dd055Smrg
15002e2dd055SmrgAC_ARG_ENABLE(strict-compilation,
15012e2dd055Smrg			  AS_HELP_STRING([--enable-strict-compilation],
15022e2dd055Smrg			  [Enable all warnings from compiler and make them errors (default: disabled)]),
15032e2dd055Smrg			  [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no])
15042e2dd055Smrgif test "x$STRICT_COMPILE" = "xyes"; then
15052e2dd055Smrg	AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
15062e2dd055Smrg	AC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"])
15072e2dd055Smrg	if test "x$GCC" = xyes ; then
15082e2dd055Smrg		STRICT_CFLAGS="-pedantic -Werror"
15092e2dd055Smrg	elif test "x$SUNCC" = "xyes"; then
15102e2dd055Smrg		STRICT_CFLAGS="-errwarn"
15112e2dd055Smrg    elif test "x$INTELCC" = "xyes"; then
15122e2dd055Smrg		STRICT_CFLAGS="-Werror"
15132e2dd055Smrg	fi
15142e2dd055Smrgfi
15152e2dd055SmrgCWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"
15162e2dd055SmrgAC_SUBST([CWARNFLAGS])
15172e2dd055Smrg]) # XORG_STRICT_OPTION
15182e2dd055Smrg
15192e2dd055Smrg# XORG_DEFAULT_OPTIONS
15202e2dd055Smrg# --------------------
15212e2dd055Smrg# Minimum version: 1.3.0
15222e2dd055Smrg#
15232e2dd055Smrg# Defines default options for X.Org modules.
15242e2dd055Smrg#
15252e2dd055SmrgAC_DEFUN([XORG_DEFAULT_OPTIONS], [
15262e2dd055SmrgXORG_CWARNFLAGS
15272e2dd055SmrgXORG_STRICT_OPTION
15282e2dd055SmrgXORG_RELEASE_VERSION
15292e2dd055SmrgXORG_CHANGELOG
15302e2dd055SmrgXORG_MANPAGE_SECTIONS
15312e2dd055Smrg]) # XORG_DEFAULT_OPTIONS
1532a966c04fSmrgdnl Copyright 2005 Red Hat, Inc
1533a966c04fSmrgdnl
1534a966c04fSmrgdnl Permission to use, copy, modify, distribute, and sell this software and its
1535a966c04fSmrgdnl documentation for any purpose is hereby granted without fee, provided that
1536a966c04fSmrgdnl the above copyright notice appear in all copies and that both that
1537a966c04fSmrgdnl copyright notice and this permission notice appear in supporting
1538a966c04fSmrgdnl documentation.
1539a966c04fSmrgdnl
1540a966c04fSmrgdnl The above copyright notice and this permission notice shall be included
1541a966c04fSmrgdnl in all copies or substantial portions of the Software.
1542a966c04fSmrgdnl
1543a966c04fSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
1544a966c04fSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
1545a966c04fSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
1546a966c04fSmrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
1547a966c04fSmrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
1548a966c04fSmrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
1549a966c04fSmrgdnl OTHER DEALINGS IN THE SOFTWARE.
1550a966c04fSmrgdnl
1551a966c04fSmrgdnl Except as contained in this notice, the name of the copyright holders shall
1552a966c04fSmrgdnl not be used in advertising or otherwise to promote the sale, use or
1553a966c04fSmrgdnl other dealings in this Software without prior written authorization
1554a966c04fSmrgdnl from the copyright holders.
1555a966c04fSmrgdnl
1556a966c04fSmrg
1557a966c04fSmrg# XORG_RELEASE_VERSION
1558a966c04fSmrg# --------------------
1559a966c04fSmrg# Adds --with/without-release-string and changes the PACKAGE and
1560a966c04fSmrg# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION".  If
1561a966c04fSmrg# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged.  Also
1562a966c04fSmrg# defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use.
1563a966c04fSmrg 
1564a966c04fSmrgAC_DEFUN([XORG_RELEASE_VERSION],[
1565a966c04fSmrg	AC_ARG_WITH(release-version,
15662e2dd055Smrg			AS_HELP_STRING([--with-release-version=STRING],
1567a966c04fSmrg				[Use release version string in package name]),
1568a966c04fSmrg			[RELEASE_VERSION="$withval"],
1569a966c04fSmrg			[RELEASE_VERSION=""])
1570a966c04fSmrg	if test "x$RELEASE_VERSION" != "x"; then
1571a966c04fSmrg		PACKAGE="$PACKAGE-$RELEASE_VERSION"
1572a966c04fSmrg		PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION"
1573a966c04fSmrg		AC_MSG_NOTICE([Building with package name set to $PACKAGE])
1574a966c04fSmrg	fi
1575a966c04fSmrg	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR],
1576a966c04fSmrg		[`echo $PACKAGE_VERSION | cut -d . -f 1`],
1577a966c04fSmrg		[Major version of this package])
15782e2dd055Smrg	PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1`
1579a966c04fSmrg	if test "x$PVM" = "x"; then
1580a966c04fSmrg		PVM="0"
1581a966c04fSmrg	fi
1582a966c04fSmrg	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR],
1583a966c04fSmrg		[$PVM],
1584a966c04fSmrg		[Minor version of this package])
15852e2dd055Smrg	PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1`
1586a966c04fSmrg	if test "x$PVP" = "x"; then
1587a966c04fSmrg		PVP="0"
1588a966c04fSmrg	fi
1589a966c04fSmrg	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL],
1590a966c04fSmrg		[$PVP],
1591a966c04fSmrg		[Patch version of this package])
1592a966c04fSmrg])
1593a966c04fSmrg
15942e2dd055Smrg# XORG_CHANGELOG()
15952e2dd055Smrg# ----------------
15962e2dd055Smrg# Minimum version: 1.2.0
15972e2dd055Smrg#
15982e2dd055Smrg# Defines the variable CHANGELOG_CMD as the command to generate
15992e2dd055Smrg# ChangeLog from git.
16002e2dd055Smrg#
16012e2dd055Smrg# Arrange that distcleancheck ignores ChangeLog left over by distclean.
16022e2dd055Smrg#
16032e2dd055SmrgAC_DEFUN([XORG_CHANGELOG], [
16042e2dd055SmrgCHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > .changelog.tmp && \
16052e2dd055Smrgmv .changelog.tmp ChangeLog) || (rm -f .changelog.tmp; touch ChangeLog; \
16062e2dd055Smrgecho 'git directory not found: installing possibly empty changelog.' >&2)"
16072e2dd055SmrgAC_SUBST([CHANGELOG_CMD])
16082e2dd055SmrgAC_SUBST([distcleancheck_listfiles], ['find . -type f ! -name ChangeLog -print'])
16092e2dd055Smrg]) # XORG_CHANGELOG
16102e2dd055Smrg
1611a966c04fSmrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
1612a966c04fSmrg
16132e2dd055Smrg# serial 52 AC_PROG_LIBTOOL
1614a966c04fSmrg
1615a966c04fSmrg
1616a966c04fSmrg# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
1617a966c04fSmrg# -----------------------------------------------------------
1618a966c04fSmrg# If this macro is not defined by Autoconf, define it here.
1619a966c04fSmrgm4_ifdef([AC_PROVIDE_IFELSE],
1620a966c04fSmrg         [],
1621a966c04fSmrg         [m4_define([AC_PROVIDE_IFELSE],
1622a966c04fSmrg	         [m4_ifdef([AC_PROVIDE_$1],
1623a966c04fSmrg		           [$2], [$3])])])
1624a966c04fSmrg
1625a966c04fSmrg
1626a966c04fSmrg# AC_PROG_LIBTOOL
1627a966c04fSmrg# ---------------
1628a966c04fSmrgAC_DEFUN([AC_PROG_LIBTOOL],
1629a966c04fSmrg[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
1630a966c04fSmrgdnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
1631a966c04fSmrgdnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
1632a966c04fSmrg  AC_PROVIDE_IFELSE([AC_PROG_CXX],
1633a966c04fSmrg    [AC_LIBTOOL_CXX],
1634a966c04fSmrg    [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
1635a966c04fSmrg  ])])
1636a966c04fSmrgdnl And a similar setup for Fortran 77 support
1637a966c04fSmrg  AC_PROVIDE_IFELSE([AC_PROG_F77],
1638a966c04fSmrg    [AC_LIBTOOL_F77],
1639a966c04fSmrg    [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
1640a966c04fSmrg])])
1641a966c04fSmrg
1642a966c04fSmrgdnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
1643a966c04fSmrgdnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
1644a966c04fSmrgdnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
1645a966c04fSmrg  AC_PROVIDE_IFELSE([AC_PROG_GCJ],
1646a966c04fSmrg    [AC_LIBTOOL_GCJ],
1647a966c04fSmrg    [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
1648a966c04fSmrg      [AC_LIBTOOL_GCJ],
1649a966c04fSmrg      [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
1650a966c04fSmrg	[AC_LIBTOOL_GCJ],
1651a966c04fSmrg      [ifdef([AC_PROG_GCJ],
1652a966c04fSmrg	     [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
1653a966c04fSmrg       ifdef([A][M_PROG_GCJ],
1654a966c04fSmrg	     [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
1655a966c04fSmrg       ifdef([LT_AC_PROG_GCJ],
1656a966c04fSmrg	     [define([LT_AC_PROG_GCJ],
1657a966c04fSmrg		defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
1658a966c04fSmrg])])# AC_PROG_LIBTOOL
1659a966c04fSmrg
1660a966c04fSmrg
1661a966c04fSmrg# _AC_PROG_LIBTOOL
1662a966c04fSmrg# ----------------
1663a966c04fSmrgAC_DEFUN([_AC_PROG_LIBTOOL],
1664a966c04fSmrg[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
1665a966c04fSmrgAC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
1666a966c04fSmrgAC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
1667a966c04fSmrgAC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
1668a966c04fSmrg
1669a966c04fSmrg# This can be used to rebuild libtool when needed
1670a966c04fSmrgLIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
1671a966c04fSmrg
1672a966c04fSmrg# Always use our own libtool.
1673a966c04fSmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool'
1674a966c04fSmrgAC_SUBST(LIBTOOL)dnl
1675a966c04fSmrg
1676a966c04fSmrg# Prevent multiple expansion
1677a966c04fSmrgdefine([AC_PROG_LIBTOOL], [])
1678a966c04fSmrg])# _AC_PROG_LIBTOOL
1679a966c04fSmrg
1680a966c04fSmrg
1681a966c04fSmrg# AC_LIBTOOL_SETUP
1682a966c04fSmrg# ----------------
1683a966c04fSmrgAC_DEFUN([AC_LIBTOOL_SETUP],
1684a966c04fSmrg[AC_PREREQ(2.50)dnl
1685a966c04fSmrgAC_REQUIRE([AC_ENABLE_SHARED])dnl
1686a966c04fSmrgAC_REQUIRE([AC_ENABLE_STATIC])dnl
1687a966c04fSmrgAC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
1688a966c04fSmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl
1689a966c04fSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl
1690a966c04fSmrgAC_REQUIRE([AC_PROG_CC])dnl
1691a966c04fSmrgAC_REQUIRE([AC_PROG_LD])dnl
1692a966c04fSmrgAC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
1693a966c04fSmrgAC_REQUIRE([AC_PROG_NM])dnl
1694a966c04fSmrg
1695a966c04fSmrgAC_REQUIRE([AC_PROG_LN_S])dnl
1696a966c04fSmrgAC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
1697a966c04fSmrg# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
1698a966c04fSmrgAC_REQUIRE([AC_OBJEXT])dnl
1699a966c04fSmrgAC_REQUIRE([AC_EXEEXT])dnl
1700a966c04fSmrgdnl
1701a966c04fSmrgAC_LIBTOOL_SYS_MAX_CMD_LEN
1702a966c04fSmrgAC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
1703a966c04fSmrgAC_LIBTOOL_OBJDIR
1704a966c04fSmrg
1705a966c04fSmrgAC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
1706a966c04fSmrg_LT_AC_PROG_ECHO_BACKSLASH
1707a966c04fSmrg
1708a966c04fSmrgcase $host_os in
1709a966c04fSmrgaix3*)
1710a966c04fSmrg  # AIX sometimes has problems with the GCC collect2 program.  For some
1711a966c04fSmrg  # reason, if we set the COLLECT_NAMES environment variable, the problems
1712a966c04fSmrg  # vanish in a puff of smoke.
1713a966c04fSmrg  if test "X${COLLECT_NAMES+set}" != Xset; then
1714a966c04fSmrg    COLLECT_NAMES=
1715a966c04fSmrg    export COLLECT_NAMES
1716a966c04fSmrg  fi
1717a966c04fSmrg  ;;
1718a966c04fSmrgesac
1719a966c04fSmrg
1720a966c04fSmrg# Sed substitution that helps us do robust quoting.  It backslashifies
1721a966c04fSmrg# metacharacters that are still active within double-quoted strings.
1722a966c04fSmrgXsed='sed -e 1s/^X//'
1723a966c04fSmrg[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
1724a966c04fSmrg
1725a966c04fSmrg# Same as above, but do not quote variable references.
1726a966c04fSmrg[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
1727a966c04fSmrg
1728a966c04fSmrg# Sed substitution to delay expansion of an escaped shell variable in a
1729a966c04fSmrg# double_quote_subst'ed string.
1730a966c04fSmrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
1731a966c04fSmrg
1732a966c04fSmrg# Sed substitution to avoid accidental globbing in evaled expressions
1733a966c04fSmrgno_glob_subst='s/\*/\\\*/g'
1734a966c04fSmrg
1735a966c04fSmrg# Constants:
1736a966c04fSmrgrm="rm -f"
1737a966c04fSmrg
1738a966c04fSmrg# Global variables:
1739a966c04fSmrgdefault_ofile=libtool
1740a966c04fSmrgcan_build_shared=yes
1741a966c04fSmrg
1742a966c04fSmrg# All known linkers require a `.a' archive for static linking (except MSVC,
1743a966c04fSmrg# which needs '.lib').
1744a966c04fSmrglibext=a
1745a966c04fSmrgltmain="$ac_aux_dir/ltmain.sh"
1746a966c04fSmrgofile="$default_ofile"
1747a966c04fSmrgwith_gnu_ld="$lt_cv_prog_gnu_ld"
1748a966c04fSmrg
1749a966c04fSmrgAC_CHECK_TOOL(AR, ar, false)
1750a966c04fSmrgAC_CHECK_TOOL(RANLIB, ranlib, :)
1751a966c04fSmrgAC_CHECK_TOOL(STRIP, strip, :)
1752a966c04fSmrg
1753a966c04fSmrgold_CC="$CC"
1754a966c04fSmrgold_CFLAGS="$CFLAGS"
1755a966c04fSmrg
1756a966c04fSmrg# Set sane defaults for various variables
1757a966c04fSmrgtest -z "$AR" && AR=ar
1758a966c04fSmrgtest -z "$AR_FLAGS" && AR_FLAGS=cru
1759a966c04fSmrgtest -z "$AS" && AS=as
1760a966c04fSmrgtest -z "$CC" && CC=cc
1761a966c04fSmrgtest -z "$LTCC" && LTCC=$CC
1762a966c04fSmrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
1763a966c04fSmrgtest -z "$DLLTOOL" && DLLTOOL=dlltool
1764a966c04fSmrgtest -z "$LD" && LD=ld
1765a966c04fSmrgtest -z "$LN_S" && LN_S="ln -s"
1766a966c04fSmrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file
1767a966c04fSmrgtest -z "$NM" && NM=nm
1768a966c04fSmrgtest -z "$SED" && SED=sed
1769a966c04fSmrgtest -z "$OBJDUMP" && OBJDUMP=objdump
1770a966c04fSmrgtest -z "$RANLIB" && RANLIB=:
1771a966c04fSmrgtest -z "$STRIP" && STRIP=:
1772a966c04fSmrgtest -z "$ac_objext" && ac_objext=o
1773a966c04fSmrg
1774a966c04fSmrg# Determine commands to create old-style static archives.
17752e2dd055Smrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
1776a966c04fSmrgold_postinstall_cmds='chmod 644 $oldlib'
1777a966c04fSmrgold_postuninstall_cmds=
1778a966c04fSmrg
1779a966c04fSmrgif test -n "$RANLIB"; then
1780a966c04fSmrg  case $host_os in
1781a966c04fSmrg  openbsd*)
1782a966c04fSmrg    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
1783a966c04fSmrg    ;;
1784a966c04fSmrg  *)
1785a966c04fSmrg    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
1786a966c04fSmrg    ;;
1787a966c04fSmrg  esac
1788a966c04fSmrg  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
1789a966c04fSmrgfi
1790a966c04fSmrg
1791a966c04fSmrg_LT_CC_BASENAME([$compiler])
1792a966c04fSmrg
1793a966c04fSmrg# Only perform the check for file, if the check method requires it
1794a966c04fSmrgcase $deplibs_check_method in
1795a966c04fSmrgfile_magic*)
1796a966c04fSmrg  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
1797a966c04fSmrg    AC_PATH_MAGIC
1798a966c04fSmrg  fi
1799a966c04fSmrg  ;;
1800a966c04fSmrgesac
1801a966c04fSmrg
18022e2dd055Smrg_LT_REQUIRED_DARWIN_CHECKS
18032e2dd055Smrg
1804a966c04fSmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
1805a966c04fSmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
1806a966c04fSmrgenable_win32_dll=yes, enable_win32_dll=no)
1807a966c04fSmrg
1808a966c04fSmrgAC_ARG_ENABLE([libtool-lock],
1809a966c04fSmrg    [AC_HELP_STRING([--disable-libtool-lock],
1810a966c04fSmrg	[avoid locking (might break parallel builds)])])
1811a966c04fSmrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
1812a966c04fSmrg
1813a966c04fSmrgAC_ARG_WITH([pic],
1814a966c04fSmrg    [AC_HELP_STRING([--with-pic],
1815a966c04fSmrg	[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
1816a966c04fSmrg    [pic_mode="$withval"],
1817a966c04fSmrg    [pic_mode=default])
1818a966c04fSmrgtest -z "$pic_mode" && pic_mode=default
1819a966c04fSmrg
1820a966c04fSmrg# Use C for the default configuration in the libtool script
1821a966c04fSmrgtagname=
1822a966c04fSmrgAC_LIBTOOL_LANG_C_CONFIG
1823a966c04fSmrg_LT_AC_TAGCONFIG
1824a966c04fSmrg])# AC_LIBTOOL_SETUP
1825a966c04fSmrg
1826a966c04fSmrg
1827a966c04fSmrg# _LT_AC_SYS_COMPILER
1828a966c04fSmrg# -------------------
1829a966c04fSmrgAC_DEFUN([_LT_AC_SYS_COMPILER],
1830a966c04fSmrg[AC_REQUIRE([AC_PROG_CC])dnl
1831a966c04fSmrg
1832a966c04fSmrg# If no C compiler was specified, use CC.
1833a966c04fSmrgLTCC=${LTCC-"$CC"}
1834a966c04fSmrg
1835a966c04fSmrg# If no C compiler flags were specified, use CFLAGS.
1836a966c04fSmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"}
1837a966c04fSmrg
1838a966c04fSmrg# Allow CC to be a program name with arguments.
1839a966c04fSmrgcompiler=$CC
1840a966c04fSmrg])# _LT_AC_SYS_COMPILER
1841a966c04fSmrg
1842a966c04fSmrg
1843a966c04fSmrg# _LT_CC_BASENAME(CC)
1844a966c04fSmrg# -------------------
1845a966c04fSmrg# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
1846a966c04fSmrgAC_DEFUN([_LT_CC_BASENAME],
1847a966c04fSmrg[for cc_temp in $1""; do
1848a966c04fSmrg  case $cc_temp in
1849a966c04fSmrg    compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
1850a966c04fSmrg    distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
1851a966c04fSmrg    \-*) ;;
1852a966c04fSmrg    *) break;;
1853a966c04fSmrg  esac
1854a966c04fSmrgdone
1855a966c04fSmrgcc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
1856a966c04fSmrg])
1857a966c04fSmrg
1858a966c04fSmrg
1859a966c04fSmrg# _LT_COMPILER_BOILERPLATE
1860a966c04fSmrg# ------------------------
1861a966c04fSmrg# Check for compiler boilerplate output or warnings with
1862a966c04fSmrg# the simple compiler test code.
1863a966c04fSmrgAC_DEFUN([_LT_COMPILER_BOILERPLATE],
18642e2dd055Smrg[AC_REQUIRE([LT_AC_PROG_SED])dnl
18652e2dd055Smrgac_outfile=conftest.$ac_objext
18662e2dd055Smrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext
1867a966c04fSmrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
1868a966c04fSmrg_lt_compiler_boilerplate=`cat conftest.err`
1869a966c04fSmrg$rm conftest*
1870a966c04fSmrg])# _LT_COMPILER_BOILERPLATE
1871a966c04fSmrg
1872a966c04fSmrg
1873a966c04fSmrg# _LT_LINKER_BOILERPLATE
1874a966c04fSmrg# ----------------------
1875a966c04fSmrg# Check for linker boilerplate output or warnings with
1876a966c04fSmrg# the simple link test code.
1877a966c04fSmrgAC_DEFUN([_LT_LINKER_BOILERPLATE],
18782e2dd055Smrg[AC_REQUIRE([LT_AC_PROG_SED])dnl
18792e2dd055Smrgac_outfile=conftest.$ac_objext
18802e2dd055Smrgecho "$lt_simple_link_test_code" >conftest.$ac_ext
1881a966c04fSmrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
1882a966c04fSmrg_lt_linker_boilerplate=`cat conftest.err`
18832e2dd055Smrg$rm -r conftest*
1884a966c04fSmrg])# _LT_LINKER_BOILERPLATE
1885a966c04fSmrg
18862e2dd055Smrg# _LT_REQUIRED_DARWIN_CHECKS
18872e2dd055Smrg# --------------------------
18882e2dd055Smrg# Check for some things on darwin
18892e2dd055SmrgAC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS],[
18902e2dd055Smrg  case $host_os in
18912e2dd055Smrg    rhapsody* | darwin*)
18922e2dd055Smrg    AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
18932e2dd055Smrg    AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
18942e2dd055Smrg
18952e2dd055Smrg    AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
18962e2dd055Smrg      [lt_cv_apple_cc_single_mod=no
18972e2dd055Smrg      if test -z "${LT_MULTI_MODULE}"; then
18982e2dd055Smrg   # By default we will add the -single_module flag. You can override
18992e2dd055Smrg   # by either setting the environment variable LT_MULTI_MODULE
19002e2dd055Smrg   # non-empty at configure time, or by adding -multi_module to the
19012e2dd055Smrg   # link flags.
19022e2dd055Smrg   echo "int foo(void){return 1;}" > conftest.c
19032e2dd055Smrg   $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
19042e2dd055Smrg     -dynamiclib ${wl}-single_module conftest.c
19052e2dd055Smrg   if test -f libconftest.dylib; then
19062e2dd055Smrg     lt_cv_apple_cc_single_mod=yes
19072e2dd055Smrg     rm -rf libconftest.dylib*
19082e2dd055Smrg   fi
19092e2dd055Smrg   rm conftest.c
19102e2dd055Smrg      fi])
19112e2dd055Smrg    AC_CACHE_CHECK([for -exported_symbols_list linker flag],
19122e2dd055Smrg      [lt_cv_ld_exported_symbols_list],
19132e2dd055Smrg      [lt_cv_ld_exported_symbols_list=no
19142e2dd055Smrg      save_LDFLAGS=$LDFLAGS
19152e2dd055Smrg      echo "_main" > conftest.sym
19162e2dd055Smrg      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
19172e2dd055Smrg      AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
19182e2dd055Smrg   [lt_cv_ld_exported_symbols_list=yes],
19192e2dd055Smrg   [lt_cv_ld_exported_symbols_list=no])
19202e2dd055Smrg   LDFLAGS="$save_LDFLAGS"
19212e2dd055Smrg    ])
19222e2dd055Smrg    case $host_os in
19232e2dd055Smrg    rhapsody* | darwin1.[[0123]])
19242e2dd055Smrg      _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
19252e2dd055Smrg    darwin1.*)
19262e2dd055Smrg     _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
19272e2dd055Smrg    darwin*)
19282e2dd055Smrg      # if running on 10.5 or later, the deployment target defaults
19292e2dd055Smrg      # to the OS version, if on x86, and 10.4, the deployment
19302e2dd055Smrg      # target defaults to 10.4. Don't you love it?
19312e2dd055Smrg      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
19322e2dd055Smrg   10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
19332e2dd055Smrg     _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
19342e2dd055Smrg   10.[[012]]*)
19352e2dd055Smrg     _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
19362e2dd055Smrg   10.*)
19372e2dd055Smrg     _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
19382e2dd055Smrg      esac
19392e2dd055Smrg    ;;
19402e2dd055Smrg  esac
19412e2dd055Smrg    if test "$lt_cv_apple_cc_single_mod" = "yes"; then
19422e2dd055Smrg      _lt_dar_single_mod='$single_module'
19432e2dd055Smrg    fi
19442e2dd055Smrg    if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
19452e2dd055Smrg      _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
19462e2dd055Smrg    else
19472e2dd055Smrg      _lt_dar_export_syms="~$NMEDIT -s \$output_objdir/\${libname}-symbols.expsym \${lib}"
19482e2dd055Smrg    fi
19492e2dd055Smrg    if test "$DSYMUTIL" != ":"; then
19502e2dd055Smrg      _lt_dsymutil="~$DSYMUTIL \$lib || :"
19512e2dd055Smrg    else
19522e2dd055Smrg      _lt_dsymutil=
19532e2dd055Smrg    fi
19542e2dd055Smrg    ;;
19552e2dd055Smrg  esac
19562e2dd055Smrg])
1957a966c04fSmrg
1958a966c04fSmrg# _LT_AC_SYS_LIBPATH_AIX
1959a966c04fSmrg# ----------------------
1960a966c04fSmrg# Links a minimal program and checks the executable
1961a966c04fSmrg# for the system default hardcoded library path. In most cases,
1962a966c04fSmrg# this is /usr/lib:/lib, but when the MPI compilers are used
1963a966c04fSmrg# the location of the communication and MPI libs are included too.
1964a966c04fSmrg# If we don't find anything, use the default library path according
1965a966c04fSmrg# to the aix ld manual.
1966a966c04fSmrgAC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
19672e2dd055Smrg[AC_REQUIRE([LT_AC_PROG_SED])dnl
19682e2dd055SmrgAC_LINK_IFELSE(AC_LANG_PROGRAM,[
19692e2dd055Smrglt_aix_libpath_sed='
19702e2dd055Smrg    /Import File Strings/,/^$/ {
19712e2dd055Smrg	/^0/ {
19722e2dd055Smrg	    s/^0  *\(.*\)$/\1/
19732e2dd055Smrg	    p
19742e2dd055Smrg	}
19752e2dd055Smrg    }'
19762e2dd055Smrgaix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1977a966c04fSmrg# Check for a 64-bit object if we didn't find anything.
19782e2dd055Smrgif test -z "$aix_libpath"; then
19792e2dd055Smrg  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
19802e2dd055Smrgfi],[])
1981a966c04fSmrgif test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
1982a966c04fSmrg])# _LT_AC_SYS_LIBPATH_AIX
1983a966c04fSmrg
1984a966c04fSmrg
1985a966c04fSmrg# _LT_AC_SHELL_INIT(ARG)
1986a966c04fSmrg# ----------------------
1987a966c04fSmrgAC_DEFUN([_LT_AC_SHELL_INIT],
1988a966c04fSmrg[ifdef([AC_DIVERSION_NOTICE],
1989a966c04fSmrg	     [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
1990a966c04fSmrg	 [AC_DIVERT_PUSH(NOTICE)])
1991a966c04fSmrg$1
1992a966c04fSmrgAC_DIVERT_POP
1993a966c04fSmrg])# _LT_AC_SHELL_INIT
1994a966c04fSmrg
1995a966c04fSmrg
1996a966c04fSmrg# _LT_AC_PROG_ECHO_BACKSLASH
1997a966c04fSmrg# --------------------------
1998a966c04fSmrg# Add some code to the start of the generated configure script which
1999a966c04fSmrg# will find an echo command which doesn't interpret backslashes.
2000a966c04fSmrgAC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
2001a966c04fSmrg[_LT_AC_SHELL_INIT([
2002a966c04fSmrg# Check that we are running under the correct shell.
2003a966c04fSmrgSHELL=${CONFIG_SHELL-/bin/sh}
2004a966c04fSmrg
2005a966c04fSmrgcase X$ECHO in
2006a966c04fSmrgX*--fallback-echo)
2007a966c04fSmrg  # Remove one level of quotation (which was required for Make).
2008a966c04fSmrg  ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
2009a966c04fSmrg  ;;
2010a966c04fSmrgesac
2011a966c04fSmrg
2012a966c04fSmrgecho=${ECHO-echo}
2013a966c04fSmrgif test "X[$]1" = X--no-reexec; then
2014a966c04fSmrg  # Discard the --no-reexec flag, and continue.
2015a966c04fSmrg  shift
2016a966c04fSmrgelif test "X[$]1" = X--fallback-echo; then
2017a966c04fSmrg  # Avoid inline document here, it may be left over
2018a966c04fSmrg  :
2019a966c04fSmrgelif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
2020a966c04fSmrg  # Yippee, $echo works!
2021a966c04fSmrg  :
2022a966c04fSmrgelse
2023a966c04fSmrg  # Restart under the correct shell.
2024a966c04fSmrg  exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
2025a966c04fSmrgfi
2026a966c04fSmrg
2027a966c04fSmrgif test "X[$]1" = X--fallback-echo; then
2028a966c04fSmrg  # used as fallback echo
2029a966c04fSmrg  shift
2030a966c04fSmrg  cat <<EOF
2031a966c04fSmrg[$]*
2032a966c04fSmrgEOF
2033a966c04fSmrg  exit 0
2034a966c04fSmrgfi
2035a966c04fSmrg
2036a966c04fSmrg# The HP-UX ksh and POSIX shell print the target directory to stdout
2037a966c04fSmrg# if CDPATH is set.
2038a966c04fSmrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
2039a966c04fSmrg
2040a966c04fSmrgif test -z "$ECHO"; then
2041a966c04fSmrgif test "X${echo_test_string+set}" != Xset; then
2042a966c04fSmrg# find a string as large as possible, as long as the shell can cope with it
2043a966c04fSmrg  for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
2044a966c04fSmrg    # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
2045a966c04fSmrg    if (echo_test_string=`eval $cmd`) 2>/dev/null &&
2046a966c04fSmrg       echo_test_string=`eval $cmd` &&
2047a966c04fSmrg       (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
2048a966c04fSmrg    then
2049a966c04fSmrg      break
2050a966c04fSmrg    fi
2051a966c04fSmrg  done
2052a966c04fSmrgfi
2053a966c04fSmrg
2054a966c04fSmrgif test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
2055a966c04fSmrg   echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
2056a966c04fSmrg   test "X$echo_testing_string" = "X$echo_test_string"; then
2057a966c04fSmrg  :
2058a966c04fSmrgelse
2059a966c04fSmrg  # The Solaris, AIX, and Digital Unix default echo programs unquote
2060a966c04fSmrg  # backslashes.  This makes it impossible to quote backslashes using
2061a966c04fSmrg  #   echo "$something" | sed 's/\\/\\\\/g'
2062a966c04fSmrg  #
2063a966c04fSmrg  # So, first we look for a working echo in the user's PATH.
2064a966c04fSmrg
2065a966c04fSmrg  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2066a966c04fSmrg  for dir in $PATH /usr/ucb; do
2067a966c04fSmrg    IFS="$lt_save_ifs"
2068a966c04fSmrg    if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
2069a966c04fSmrg       test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
2070a966c04fSmrg       echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
2071a966c04fSmrg       test "X$echo_testing_string" = "X$echo_test_string"; then
2072a966c04fSmrg      echo="$dir/echo"
2073a966c04fSmrg      break
2074a966c04fSmrg    fi
2075a966c04fSmrg  done
2076a966c04fSmrg  IFS="$lt_save_ifs"
2077a966c04fSmrg
2078a966c04fSmrg  if test "X$echo" = Xecho; then
2079a966c04fSmrg    # We didn't find a better echo, so look for alternatives.
2080a966c04fSmrg    if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
2081a966c04fSmrg       echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
2082a966c04fSmrg       test "X$echo_testing_string" = "X$echo_test_string"; then
2083a966c04fSmrg      # This shell has a builtin print -r that does the trick.
2084a966c04fSmrg      echo='print -r'
2085a966c04fSmrg    elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
2086a966c04fSmrg	 test "X$CONFIG_SHELL" != X/bin/ksh; then
2087a966c04fSmrg      # If we have ksh, try running configure again with it.
2088a966c04fSmrg      ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
2089a966c04fSmrg      export ORIGINAL_CONFIG_SHELL
2090a966c04fSmrg      CONFIG_SHELL=/bin/ksh
2091a966c04fSmrg      export CONFIG_SHELL
2092a966c04fSmrg      exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
2093a966c04fSmrg    else
2094a966c04fSmrg      # Try using printf.
2095a966c04fSmrg      echo='printf %s\n'
2096a966c04fSmrg      if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
2097a966c04fSmrg	 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
2098a966c04fSmrg	 test "X$echo_testing_string" = "X$echo_test_string"; then
2099a966c04fSmrg	# Cool, printf works
2100a966c04fSmrg	:
2101a966c04fSmrg      elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
2102a966c04fSmrg	   test "X$echo_testing_string" = 'X\t' &&
2103a966c04fSmrg	   echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
2104a966c04fSmrg	   test "X$echo_testing_string" = "X$echo_test_string"; then
2105a966c04fSmrg	CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
2106a966c04fSmrg	export CONFIG_SHELL
2107a966c04fSmrg	SHELL="$CONFIG_SHELL"
2108a966c04fSmrg	export SHELL
2109a966c04fSmrg	echo="$CONFIG_SHELL [$]0 --fallback-echo"
2110a966c04fSmrg      elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
2111a966c04fSmrg	   test "X$echo_testing_string" = 'X\t' &&
2112a966c04fSmrg	   echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
2113a966c04fSmrg	   test "X$echo_testing_string" = "X$echo_test_string"; then
2114a966c04fSmrg	echo="$CONFIG_SHELL [$]0 --fallback-echo"
2115a966c04fSmrg      else
2116a966c04fSmrg	# maybe with a smaller string...
2117a966c04fSmrg	prev=:
2118a966c04fSmrg
2119a966c04fSmrg	for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
2120a966c04fSmrg	  if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
2121a966c04fSmrg	  then
2122a966c04fSmrg	    break
2123a966c04fSmrg	  fi
2124a966c04fSmrg	  prev="$cmd"
2125a966c04fSmrg	done
2126a966c04fSmrg
2127a966c04fSmrg	if test "$prev" != 'sed 50q "[$]0"'; then
2128a966c04fSmrg	  echo_test_string=`eval $prev`
2129a966c04fSmrg	  export echo_test_string
2130a966c04fSmrg	  exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
2131a966c04fSmrg	else
2132a966c04fSmrg	  # Oops.  We lost completely, so just stick with echo.
2133a966c04fSmrg	  echo=echo
2134a966c04fSmrg	fi
2135a966c04fSmrg      fi
2136a966c04fSmrg    fi
2137a966c04fSmrg  fi
2138a966c04fSmrgfi
2139a966c04fSmrgfi
2140a966c04fSmrg
2141a966c04fSmrg# Copy echo and quote the copy suitably for passing to libtool from
2142a966c04fSmrg# the Makefile, instead of quoting the original, which is used later.
2143a966c04fSmrgECHO=$echo
2144a966c04fSmrgif test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
2145a966c04fSmrg   ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
2146a966c04fSmrgfi
2147a966c04fSmrg
2148a966c04fSmrgAC_SUBST(ECHO)
2149a966c04fSmrg])])# _LT_AC_PROG_ECHO_BACKSLASH
2150a966c04fSmrg
2151a966c04fSmrg
2152a966c04fSmrg# _LT_AC_LOCK
2153a966c04fSmrg# -----------
2154a966c04fSmrgAC_DEFUN([_LT_AC_LOCK],
2155a966c04fSmrg[AC_ARG_ENABLE([libtool-lock],
2156a966c04fSmrg    [AC_HELP_STRING([--disable-libtool-lock],
2157a966c04fSmrg	[avoid locking (might break parallel builds)])])
2158a966c04fSmrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
2159a966c04fSmrg
2160a966c04fSmrg# Some flags need to be propagated to the compiler or linker for good
2161a966c04fSmrg# libtool support.
2162a966c04fSmrgcase $host in
2163a966c04fSmrgia64-*-hpux*)
2164a966c04fSmrg  # Find out which ABI we are using.
2165a966c04fSmrg  echo 'int i;' > conftest.$ac_ext
2166a966c04fSmrg  if AC_TRY_EVAL(ac_compile); then
2167a966c04fSmrg    case `/usr/bin/file conftest.$ac_objext` in
2168a966c04fSmrg    *ELF-32*)
2169a966c04fSmrg      HPUX_IA64_MODE="32"
2170a966c04fSmrg      ;;
2171a966c04fSmrg    *ELF-64*)
2172a966c04fSmrg      HPUX_IA64_MODE="64"
2173a966c04fSmrg      ;;
2174a966c04fSmrg    esac
2175a966c04fSmrg  fi
2176a966c04fSmrg  rm -rf conftest*
2177a966c04fSmrg  ;;
2178a966c04fSmrg*-*-irix6*)
2179a966c04fSmrg  # Find out which ABI we are using.
2180a966c04fSmrg  echo '[#]line __oline__ "configure"' > conftest.$ac_ext
2181a966c04fSmrg  if AC_TRY_EVAL(ac_compile); then
2182a966c04fSmrg   if test "$lt_cv_prog_gnu_ld" = yes; then
2183a966c04fSmrg    case `/usr/bin/file conftest.$ac_objext` in
2184a966c04fSmrg    *32-bit*)
2185a966c04fSmrg      LD="${LD-ld} -melf32bsmip"
2186a966c04fSmrg      ;;
2187a966c04fSmrg    *N32*)
2188a966c04fSmrg      LD="${LD-ld} -melf32bmipn32"
2189a966c04fSmrg      ;;
2190a966c04fSmrg    *64-bit*)
2191a966c04fSmrg      LD="${LD-ld} -melf64bmip"
2192a966c04fSmrg      ;;
2193a966c04fSmrg    esac
2194a966c04fSmrg   else
2195a966c04fSmrg    case `/usr/bin/file conftest.$ac_objext` in
2196a966c04fSmrg    *32-bit*)
2197a966c04fSmrg      LD="${LD-ld} -32"
2198a966c04fSmrg      ;;
2199a966c04fSmrg    *N32*)
2200a966c04fSmrg      LD="${LD-ld} -n32"
2201a966c04fSmrg      ;;
2202a966c04fSmrg    *64-bit*)
2203a966c04fSmrg      LD="${LD-ld} -64"
2204a966c04fSmrg      ;;
2205a966c04fSmrg    esac
2206a966c04fSmrg   fi
2207a966c04fSmrg  fi
2208a966c04fSmrg  rm -rf conftest*
2209a966c04fSmrg  ;;
2210a966c04fSmrg
22112e2dd055Smrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
22122e2dd055Smrgs390*-*linux*|sparc*-*linux*)
2213a966c04fSmrg  # Find out which ABI we are using.
2214a966c04fSmrg  echo 'int i;' > conftest.$ac_ext
2215a966c04fSmrg  if AC_TRY_EVAL(ac_compile); then
2216a966c04fSmrg    case `/usr/bin/file conftest.o` in
2217a966c04fSmrg    *32-bit*)
2218a966c04fSmrg      case $host in
22192e2dd055Smrg        x86_64-*kfreebsd*-gnu)
22202e2dd055Smrg          LD="${LD-ld} -m elf_i386_fbsd"
22212e2dd055Smrg          ;;
2222a966c04fSmrg        x86_64-*linux*)
2223a966c04fSmrg          LD="${LD-ld} -m elf_i386"
2224a966c04fSmrg          ;;
2225a966c04fSmrg        ppc64-*linux*|powerpc64-*linux*)
2226a966c04fSmrg          LD="${LD-ld} -m elf32ppclinux"
2227a966c04fSmrg          ;;
2228a966c04fSmrg        s390x-*linux*)
2229a966c04fSmrg          LD="${LD-ld} -m elf_s390"
2230a966c04fSmrg          ;;
2231a966c04fSmrg        sparc64-*linux*)
2232a966c04fSmrg          LD="${LD-ld} -m elf32_sparc"
2233a966c04fSmrg          ;;
2234a966c04fSmrg      esac
2235a966c04fSmrg      ;;
2236a966c04fSmrg    *64-bit*)
2237a966c04fSmrg      case $host in
22382e2dd055Smrg        x86_64-*kfreebsd*-gnu)
22392e2dd055Smrg          LD="${LD-ld} -m elf_x86_64_fbsd"
22402e2dd055Smrg          ;;
2241a966c04fSmrg        x86_64-*linux*)
2242a966c04fSmrg          LD="${LD-ld} -m elf_x86_64"
2243a966c04fSmrg          ;;
2244a966c04fSmrg        ppc*-*linux*|powerpc*-*linux*)
2245a966c04fSmrg          LD="${LD-ld} -m elf64ppc"
2246a966c04fSmrg          ;;
2247a966c04fSmrg        s390*-*linux*)
2248a966c04fSmrg          LD="${LD-ld} -m elf64_s390"
2249a966c04fSmrg          ;;
2250a966c04fSmrg        sparc*-*linux*)
2251a966c04fSmrg          LD="${LD-ld} -m elf64_sparc"
2252a966c04fSmrg          ;;
2253a966c04fSmrg      esac
2254a966c04fSmrg      ;;
2255a966c04fSmrg    esac
2256a966c04fSmrg  fi
2257a966c04fSmrg  rm -rf conftest*
2258a966c04fSmrg  ;;
2259a966c04fSmrg
2260a966c04fSmrg*-*-sco3.2v5*)
2261a966c04fSmrg  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
2262a966c04fSmrg  SAVE_CFLAGS="$CFLAGS"
2263a966c04fSmrg  CFLAGS="$CFLAGS -belf"
2264a966c04fSmrg  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
2265a966c04fSmrg    [AC_LANG_PUSH(C)
2266a966c04fSmrg     AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
2267a966c04fSmrg     AC_LANG_POP])
2268a966c04fSmrg  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
2269a966c04fSmrg    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
2270a966c04fSmrg    CFLAGS="$SAVE_CFLAGS"
2271a966c04fSmrg  fi
2272a966c04fSmrg  ;;
2273a966c04fSmrgsparc*-*solaris*)
2274a966c04fSmrg  # Find out which ABI we are using.
2275a966c04fSmrg  echo 'int i;' > conftest.$ac_ext
2276a966c04fSmrg  if AC_TRY_EVAL(ac_compile); then
2277a966c04fSmrg    case `/usr/bin/file conftest.o` in
2278a966c04fSmrg    *64-bit*)
2279a966c04fSmrg      case $lt_cv_prog_gnu_ld in
2280a966c04fSmrg      yes*) LD="${LD-ld} -m elf64_sparc" ;;
22812e2dd055Smrg      *)
22822e2dd055Smrg        if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
22832e2dd055Smrg	  LD="${LD-ld} -64"
22842e2dd055Smrg	fi
22852e2dd055Smrg	;;
2286a966c04fSmrg      esac
2287a966c04fSmrg      ;;
2288a966c04fSmrg    esac
2289a966c04fSmrg  fi
2290a966c04fSmrg  rm -rf conftest*
2291a966c04fSmrg  ;;
2292a966c04fSmrg
2293a966c04fSmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
2294a966c04fSmrg[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
2295a966c04fSmrg  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
2296a966c04fSmrg  AC_CHECK_TOOL(AS, as, false)
2297a966c04fSmrg  AC_CHECK_TOOL(OBJDUMP, objdump, false)
2298a966c04fSmrg  ;;
2299a966c04fSmrg  ])
2300a966c04fSmrgesac
2301a966c04fSmrg
2302a966c04fSmrgneed_locks="$enable_libtool_lock"
2303a966c04fSmrg
2304a966c04fSmrg])# _LT_AC_LOCK
2305a966c04fSmrg
2306a966c04fSmrg
2307a966c04fSmrg# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
2308a966c04fSmrg#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
2309a966c04fSmrg# ----------------------------------------------------------------
2310a966c04fSmrg# Check whether the given compiler option works
2311a966c04fSmrgAC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
2312a966c04fSmrg[AC_REQUIRE([LT_AC_PROG_SED])
2313a966c04fSmrgAC_CACHE_CHECK([$1], [$2],
2314a966c04fSmrg  [$2=no
2315a966c04fSmrg  ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
23162e2dd055Smrg   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
2317a966c04fSmrg   lt_compiler_flag="$3"
2318a966c04fSmrg   # Insert the option either (1) after the last *FLAGS variable, or
2319a966c04fSmrg   # (2) before a word containing "conftest.", or (3) at the end.
2320a966c04fSmrg   # Note that $ac_compile itself does not contain backslashes and begins
2321a966c04fSmrg   # with a dollar sign (not a hyphen), so the echo should work correctly.
2322a966c04fSmrg   # The option is referenced via a variable to avoid confusing sed.
2323a966c04fSmrg   lt_compile=`echo "$ac_compile" | $SED \
2324a966c04fSmrg   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
2325a966c04fSmrg   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
2326a966c04fSmrg   -e 's:$: $lt_compiler_flag:'`
2327a966c04fSmrg   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
2328a966c04fSmrg   (eval "$lt_compile" 2>conftest.err)
2329a966c04fSmrg   ac_status=$?
2330a966c04fSmrg   cat conftest.err >&AS_MESSAGE_LOG_FD
2331a966c04fSmrg   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
2332a966c04fSmrg   if (exit $ac_status) && test -s "$ac_outfile"; then
2333a966c04fSmrg     # The compiler can only warn and ignore the option if not recognized
2334a966c04fSmrg     # So say no if there are warnings other than the usual output.
2335a966c04fSmrg     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
2336a966c04fSmrg     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
2337a966c04fSmrg     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
2338a966c04fSmrg       $2=yes
2339a966c04fSmrg     fi
2340a966c04fSmrg   fi
2341a966c04fSmrg   $rm conftest*
2342a966c04fSmrg])
2343a966c04fSmrg
2344a966c04fSmrgif test x"[$]$2" = xyes; then
2345a966c04fSmrg    ifelse([$5], , :, [$5])
2346a966c04fSmrgelse
2347a966c04fSmrg    ifelse([$6], , :, [$6])
2348a966c04fSmrgfi
2349a966c04fSmrg])# AC_LIBTOOL_COMPILER_OPTION
2350a966c04fSmrg
2351a966c04fSmrg
2352a966c04fSmrg# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
2353a966c04fSmrg#                          [ACTION-SUCCESS], [ACTION-FAILURE])
2354a966c04fSmrg# ------------------------------------------------------------
2355a966c04fSmrg# Check whether the given compiler option works
2356a966c04fSmrgAC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
23572e2dd055Smrg[AC_REQUIRE([LT_AC_PROG_SED])dnl
23582e2dd055SmrgAC_CACHE_CHECK([$1], [$2],
2359a966c04fSmrg  [$2=no
2360a966c04fSmrg   save_LDFLAGS="$LDFLAGS"
2361a966c04fSmrg   LDFLAGS="$LDFLAGS $3"
23622e2dd055Smrg   echo "$lt_simple_link_test_code" > conftest.$ac_ext
2363a966c04fSmrg   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
2364a966c04fSmrg     # The linker can only warn and ignore the option if not recognized
2365a966c04fSmrg     # So say no if there are warnings
2366a966c04fSmrg     if test -s conftest.err; then
2367a966c04fSmrg       # Append any errors to the config.log.
2368a966c04fSmrg       cat conftest.err 1>&AS_MESSAGE_LOG_FD
2369a966c04fSmrg       $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
2370a966c04fSmrg       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
2371a966c04fSmrg       if diff conftest.exp conftest.er2 >/dev/null; then
2372a966c04fSmrg         $2=yes
2373a966c04fSmrg       fi
2374a966c04fSmrg     else
2375a966c04fSmrg       $2=yes
2376a966c04fSmrg     fi
2377a966c04fSmrg   fi
23782e2dd055Smrg   $rm -r conftest*
2379a966c04fSmrg   LDFLAGS="$save_LDFLAGS"
2380a966c04fSmrg])
2381a966c04fSmrg
2382a966c04fSmrgif test x"[$]$2" = xyes; then
2383a966c04fSmrg    ifelse([$4], , :, [$4])
2384a966c04fSmrgelse
2385a966c04fSmrg    ifelse([$5], , :, [$5])
2386a966c04fSmrgfi
2387a966c04fSmrg])# AC_LIBTOOL_LINKER_OPTION
2388a966c04fSmrg
2389a966c04fSmrg
2390a966c04fSmrg# AC_LIBTOOL_SYS_MAX_CMD_LEN
2391a966c04fSmrg# --------------------------
2392a966c04fSmrgAC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
2393a966c04fSmrg[# find the maximum length of command line arguments
2394a966c04fSmrgAC_MSG_CHECKING([the maximum length of command line arguments])
2395a966c04fSmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
2396a966c04fSmrg  i=0
2397a966c04fSmrg  teststring="ABCD"
2398a966c04fSmrg
2399a966c04fSmrg  case $build_os in
2400a966c04fSmrg  msdosdjgpp*)
2401a966c04fSmrg    # On DJGPP, this test can blow up pretty badly due to problems in libc
2402a966c04fSmrg    # (any single argument exceeding 2000 bytes causes a buffer overrun
2403a966c04fSmrg    # during glob expansion).  Even if it were fixed, the result of this
2404a966c04fSmrg    # check would be larger than it should be.
2405a966c04fSmrg    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
2406a966c04fSmrg    ;;
2407a966c04fSmrg
2408a966c04fSmrg  gnu*)
2409a966c04fSmrg    # Under GNU Hurd, this test is not required because there is
2410a966c04fSmrg    # no limit to the length of command line arguments.
2411a966c04fSmrg    # Libtool will interpret -1 as no limit whatsoever
2412a966c04fSmrg    lt_cv_sys_max_cmd_len=-1;
2413a966c04fSmrg    ;;
2414a966c04fSmrg
2415a966c04fSmrg  cygwin* | mingw*)
2416a966c04fSmrg    # On Win9x/ME, this test blows up -- it succeeds, but takes
2417a966c04fSmrg    # about 5 minutes as the teststring grows exponentially.
2418a966c04fSmrg    # Worse, since 9x/ME are not pre-emptively multitasking,
2419a966c04fSmrg    # you end up with a "frozen" computer, even though with patience
2420a966c04fSmrg    # the test eventually succeeds (with a max line length of 256k).
2421a966c04fSmrg    # Instead, let's just punt: use the minimum linelength reported by
2422a966c04fSmrg    # all of the supported platforms: 8192 (on NT/2K/XP).
2423a966c04fSmrg    lt_cv_sys_max_cmd_len=8192;
2424a966c04fSmrg    ;;
2425a966c04fSmrg
2426a966c04fSmrg  amigaos*)
2427a966c04fSmrg    # On AmigaOS with pdksh, this test takes hours, literally.
2428a966c04fSmrg    # So we just punt and use a minimum line length of 8192.
2429a966c04fSmrg    lt_cv_sys_max_cmd_len=8192;
2430a966c04fSmrg    ;;
2431a966c04fSmrg
2432a966c04fSmrg  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
2433a966c04fSmrg    # This has been around since 386BSD, at least.  Likely further.
2434a966c04fSmrg    if test -x /sbin/sysctl; then
2435a966c04fSmrg      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
2436a966c04fSmrg    elif test -x /usr/sbin/sysctl; then
2437a966c04fSmrg      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
2438a966c04fSmrg    else
2439a966c04fSmrg      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
2440a966c04fSmrg    fi
2441a966c04fSmrg    # And add a safety zone
2442a966c04fSmrg    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
2443a966c04fSmrg    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
2444a966c04fSmrg    ;;
2445a966c04fSmrg
2446a966c04fSmrg  interix*)
2447a966c04fSmrg    # We know the value 262144 and hardcode it with a safety zone (like BSD)
2448a966c04fSmrg    lt_cv_sys_max_cmd_len=196608
2449a966c04fSmrg    ;;
2450a966c04fSmrg
2451a966c04fSmrg  osf*)
2452a966c04fSmrg    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
2453a966c04fSmrg    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
2454a966c04fSmrg    # nice to cause kernel panics so lets avoid the loop below.
2455a966c04fSmrg    # First set a reasonable default.
2456a966c04fSmrg    lt_cv_sys_max_cmd_len=16384
2457a966c04fSmrg    #
2458a966c04fSmrg    if test -x /sbin/sysconfig; then
2459a966c04fSmrg      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
2460a966c04fSmrg        *1*) lt_cv_sys_max_cmd_len=-1 ;;
2461a966c04fSmrg      esac
2462a966c04fSmrg    fi
2463a966c04fSmrg    ;;
2464a966c04fSmrg  sco3.2v5*)
2465a966c04fSmrg    lt_cv_sys_max_cmd_len=102400
2466a966c04fSmrg    ;;
2467a966c04fSmrg  sysv5* | sco5v6* | sysv4.2uw2*)
2468a966c04fSmrg    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
2469a966c04fSmrg    if test -n "$kargmax"; then
2470a966c04fSmrg      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ 	]]//'`
2471a966c04fSmrg    else
2472a966c04fSmrg      lt_cv_sys_max_cmd_len=32768
2473a966c04fSmrg    fi
2474a966c04fSmrg    ;;
2475a966c04fSmrg  *)
24762e2dd055Smrg    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
24772e2dd055Smrg    if test -n "$lt_cv_sys_max_cmd_len"; then
24782e2dd055Smrg      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
24792e2dd055Smrg      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
24802e2dd055Smrg    else
24812e2dd055Smrg      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
24822e2dd055Smrg      while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
2483a966c04fSmrg	       = "XX$teststring") >/dev/null 2>&1 &&
24842e2dd055Smrg	      new_result=`expr "X$teststring" : ".*" 2>&1` &&
24852e2dd055Smrg	      lt_cv_sys_max_cmd_len=$new_result &&
24862e2dd055Smrg	      test $i != 17 # 1/2 MB should be enough
24872e2dd055Smrg      do
24882e2dd055Smrg        i=`expr $i + 1`
24892e2dd055Smrg        teststring=$teststring$teststring
24902e2dd055Smrg      done
24912e2dd055Smrg      teststring=
24922e2dd055Smrg      # Add a significant safety factor because C++ compilers can tack on massive
24932e2dd055Smrg      # amounts of additional arguments before passing them to the linker.
24942e2dd055Smrg      # It appears as though 1/2 is a usable value.
24952e2dd055Smrg      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
24962e2dd055Smrg    fi
2497a966c04fSmrg    ;;
2498a966c04fSmrg  esac
2499a966c04fSmrg])
2500a966c04fSmrgif test -n $lt_cv_sys_max_cmd_len ; then
2501a966c04fSmrg  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
2502a966c04fSmrgelse
2503a966c04fSmrg  AC_MSG_RESULT(none)
2504a966c04fSmrgfi
2505a966c04fSmrg])# AC_LIBTOOL_SYS_MAX_CMD_LEN
2506a966c04fSmrg
2507a966c04fSmrg
2508a966c04fSmrg# _LT_AC_CHECK_DLFCN
2509a966c04fSmrg# ------------------
2510a966c04fSmrgAC_DEFUN([_LT_AC_CHECK_DLFCN],
2511a966c04fSmrg[AC_CHECK_HEADERS(dlfcn.h)dnl
2512a966c04fSmrg])# _LT_AC_CHECK_DLFCN
2513a966c04fSmrg
2514a966c04fSmrg
2515a966c04fSmrg# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
2516a966c04fSmrg#                           ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
2517a966c04fSmrg# ---------------------------------------------------------------------
2518a966c04fSmrgAC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
2519a966c04fSmrg[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
2520a966c04fSmrgif test "$cross_compiling" = yes; then :
2521a966c04fSmrg  [$4]
2522a966c04fSmrgelse
2523a966c04fSmrg  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
2524a966c04fSmrg  lt_status=$lt_dlunknown
2525a966c04fSmrg  cat > conftest.$ac_ext <<EOF
2526a966c04fSmrg[#line __oline__ "configure"
2527a966c04fSmrg#include "confdefs.h"
2528a966c04fSmrg
2529a966c04fSmrg#if HAVE_DLFCN_H
2530a966c04fSmrg#include <dlfcn.h>
2531a966c04fSmrg#endif
2532a966c04fSmrg
2533a966c04fSmrg#include <stdio.h>
2534a966c04fSmrg
2535a966c04fSmrg#ifdef RTLD_GLOBAL
2536a966c04fSmrg#  define LT_DLGLOBAL		RTLD_GLOBAL
2537a966c04fSmrg#else
2538a966c04fSmrg#  ifdef DL_GLOBAL
2539a966c04fSmrg#    define LT_DLGLOBAL		DL_GLOBAL
2540a966c04fSmrg#  else
2541a966c04fSmrg#    define LT_DLGLOBAL		0
2542a966c04fSmrg#  endif
2543a966c04fSmrg#endif
2544a966c04fSmrg
2545a966c04fSmrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
2546a966c04fSmrg   find out it does not work in some platform. */
2547a966c04fSmrg#ifndef LT_DLLAZY_OR_NOW
2548a966c04fSmrg#  ifdef RTLD_LAZY
2549a966c04fSmrg#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
2550a966c04fSmrg#  else
2551a966c04fSmrg#    ifdef DL_LAZY
2552a966c04fSmrg#      define LT_DLLAZY_OR_NOW		DL_LAZY
2553a966c04fSmrg#    else
2554a966c04fSmrg#      ifdef RTLD_NOW
2555a966c04fSmrg#        define LT_DLLAZY_OR_NOW	RTLD_NOW
2556a966c04fSmrg#      else
2557a966c04fSmrg#        ifdef DL_NOW
2558a966c04fSmrg#          define LT_DLLAZY_OR_NOW	DL_NOW
2559a966c04fSmrg#        else
2560a966c04fSmrg#          define LT_DLLAZY_OR_NOW	0
2561a966c04fSmrg#        endif
2562a966c04fSmrg#      endif
2563a966c04fSmrg#    endif
2564a966c04fSmrg#  endif
2565a966c04fSmrg#endif
2566a966c04fSmrg
2567a966c04fSmrg#ifdef __cplusplus
2568a966c04fSmrgextern "C" void exit (int);
2569a966c04fSmrg#endif
2570a966c04fSmrg
2571a966c04fSmrgvoid fnord() { int i=42;}
2572a966c04fSmrgint main ()
2573a966c04fSmrg{
2574a966c04fSmrg  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
2575a966c04fSmrg  int status = $lt_dlunknown;
2576a966c04fSmrg
2577a966c04fSmrg  if (self)
2578a966c04fSmrg    {
2579a966c04fSmrg      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
2580a966c04fSmrg      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
2581a966c04fSmrg      /* dlclose (self); */
2582a966c04fSmrg    }
2583a966c04fSmrg  else
2584a966c04fSmrg    puts (dlerror ());
2585a966c04fSmrg
2586a966c04fSmrg    exit (status);
2587a966c04fSmrg}]
2588a966c04fSmrgEOF
2589a966c04fSmrg  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
2590a966c04fSmrg    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
2591a966c04fSmrg    lt_status=$?
2592a966c04fSmrg    case x$lt_status in
2593a966c04fSmrg      x$lt_dlno_uscore) $1 ;;
2594a966c04fSmrg      x$lt_dlneed_uscore) $2 ;;
2595a966c04fSmrg      x$lt_dlunknown|x*) $3 ;;
2596a966c04fSmrg    esac
2597a966c04fSmrg  else :
2598a966c04fSmrg    # compilation failed
2599a966c04fSmrg    $3
2600a966c04fSmrg  fi
2601a966c04fSmrgfi
2602a966c04fSmrgrm -fr conftest*
2603a966c04fSmrg])# _LT_AC_TRY_DLOPEN_SELF
2604a966c04fSmrg
2605a966c04fSmrg
2606a966c04fSmrg# AC_LIBTOOL_DLOPEN_SELF
2607a966c04fSmrg# ----------------------
2608a966c04fSmrgAC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
2609a966c04fSmrg[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
2610a966c04fSmrgif test "x$enable_dlopen" != xyes; then
2611a966c04fSmrg  enable_dlopen=unknown
2612a966c04fSmrg  enable_dlopen_self=unknown
2613a966c04fSmrg  enable_dlopen_self_static=unknown
2614a966c04fSmrgelse
2615a966c04fSmrg  lt_cv_dlopen=no
2616a966c04fSmrg  lt_cv_dlopen_libs=
2617a966c04fSmrg
2618a966c04fSmrg  case $host_os in
2619a966c04fSmrg  beos*)
2620a966c04fSmrg    lt_cv_dlopen="load_add_on"
2621a966c04fSmrg    lt_cv_dlopen_libs=
2622a966c04fSmrg    lt_cv_dlopen_self=yes
2623a966c04fSmrg    ;;
2624a966c04fSmrg
2625a966c04fSmrg  mingw* | pw32*)
2626a966c04fSmrg    lt_cv_dlopen="LoadLibrary"
2627a966c04fSmrg    lt_cv_dlopen_libs=
2628a966c04fSmrg   ;;
2629a966c04fSmrg
2630a966c04fSmrg  cygwin*)
2631a966c04fSmrg    lt_cv_dlopen="dlopen"
2632a966c04fSmrg    lt_cv_dlopen_libs=
2633a966c04fSmrg   ;;
2634a966c04fSmrg
2635a966c04fSmrg  darwin*)
2636a966c04fSmrg  # if libdl is installed we need to link against it
2637a966c04fSmrg    AC_CHECK_LIB([dl], [dlopen],
2638a966c04fSmrg		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
2639a966c04fSmrg    lt_cv_dlopen="dyld"
2640a966c04fSmrg    lt_cv_dlopen_libs=
2641a966c04fSmrg    lt_cv_dlopen_self=yes
2642a966c04fSmrg    ])
2643a966c04fSmrg   ;;
2644a966c04fSmrg
2645a966c04fSmrg  *)
2646a966c04fSmrg    AC_CHECK_FUNC([shl_load],
2647a966c04fSmrg	  [lt_cv_dlopen="shl_load"],
2648a966c04fSmrg      [AC_CHECK_LIB([dld], [shl_load],
26492e2dd055Smrg	    [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
2650a966c04fSmrg	[AC_CHECK_FUNC([dlopen],
2651a966c04fSmrg	      [lt_cv_dlopen="dlopen"],
2652a966c04fSmrg	  [AC_CHECK_LIB([dl], [dlopen],
2653a966c04fSmrg		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
2654a966c04fSmrg	    [AC_CHECK_LIB([svld], [dlopen],
2655a966c04fSmrg		  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
2656a966c04fSmrg	      [AC_CHECK_LIB([dld], [dld_link],
26572e2dd055Smrg		    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
2658a966c04fSmrg	      ])
2659a966c04fSmrg	    ])
2660a966c04fSmrg	  ])
2661a966c04fSmrg	])
2662a966c04fSmrg      ])
2663a966c04fSmrg    ;;
2664a966c04fSmrg  esac
2665a966c04fSmrg
2666a966c04fSmrg  if test "x$lt_cv_dlopen" != xno; then
2667a966c04fSmrg    enable_dlopen=yes
2668a966c04fSmrg  else
2669a966c04fSmrg    enable_dlopen=no
2670a966c04fSmrg  fi
2671a966c04fSmrg
2672a966c04fSmrg  case $lt_cv_dlopen in
2673a966c04fSmrg  dlopen)
2674a966c04fSmrg    save_CPPFLAGS="$CPPFLAGS"
2675a966c04fSmrg    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
2676a966c04fSmrg
2677a966c04fSmrg    save_LDFLAGS="$LDFLAGS"
2678a966c04fSmrg    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
2679a966c04fSmrg
2680a966c04fSmrg    save_LIBS="$LIBS"
2681a966c04fSmrg    LIBS="$lt_cv_dlopen_libs $LIBS"
2682a966c04fSmrg
2683a966c04fSmrg    AC_CACHE_CHECK([whether a program can dlopen itself],
2684a966c04fSmrg	  lt_cv_dlopen_self, [dnl
2685a966c04fSmrg	  _LT_AC_TRY_DLOPEN_SELF(
2686a966c04fSmrg	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
2687a966c04fSmrg	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
2688a966c04fSmrg    ])
2689a966c04fSmrg
2690a966c04fSmrg    if test "x$lt_cv_dlopen_self" = xyes; then
2691a966c04fSmrg      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
2692a966c04fSmrg      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
2693a966c04fSmrg    	  lt_cv_dlopen_self_static, [dnl
2694a966c04fSmrg	  _LT_AC_TRY_DLOPEN_SELF(
2695a966c04fSmrg	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
2696a966c04fSmrg	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
2697a966c04fSmrg      ])
2698a966c04fSmrg    fi
2699a966c04fSmrg
2700a966c04fSmrg    CPPFLAGS="$save_CPPFLAGS"
2701a966c04fSmrg    LDFLAGS="$save_LDFLAGS"
2702a966c04fSmrg    LIBS="$save_LIBS"
2703a966c04fSmrg    ;;
2704a966c04fSmrg  esac
2705a966c04fSmrg
2706a966c04fSmrg  case $lt_cv_dlopen_self in
2707a966c04fSmrg  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
2708a966c04fSmrg  *) enable_dlopen_self=unknown ;;
2709a966c04fSmrg  esac
2710a966c04fSmrg
2711a966c04fSmrg  case $lt_cv_dlopen_self_static in
2712a966c04fSmrg  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
2713a966c04fSmrg  *) enable_dlopen_self_static=unknown ;;
2714a966c04fSmrg  esac
2715a966c04fSmrgfi
2716a966c04fSmrg])# AC_LIBTOOL_DLOPEN_SELF
2717a966c04fSmrg
2718a966c04fSmrg
2719a966c04fSmrg# AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
2720a966c04fSmrg# ---------------------------------
2721a966c04fSmrg# Check to see if options -c and -o are simultaneously supported by compiler
2722a966c04fSmrgAC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
27232e2dd055Smrg[AC_REQUIRE([LT_AC_PROG_SED])dnl
27242e2dd055SmrgAC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
2725a966c04fSmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
2726a966c04fSmrg  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
2727a966c04fSmrg  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
2728a966c04fSmrg   $rm -r conftest 2>/dev/null
2729a966c04fSmrg   mkdir conftest
2730a966c04fSmrg   cd conftest
2731a966c04fSmrg   mkdir out
27322e2dd055Smrg   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
2733a966c04fSmrg
2734a966c04fSmrg   lt_compiler_flag="-o out/conftest2.$ac_objext"
2735a966c04fSmrg   # Insert the option either (1) after the last *FLAGS variable, or
2736a966c04fSmrg   # (2) before a word containing "conftest.", or (3) at the end.
2737a966c04fSmrg   # Note that $ac_compile itself does not contain backslashes and begins
2738a966c04fSmrg   # with a dollar sign (not a hyphen), so the echo should work correctly.
2739a966c04fSmrg   lt_compile=`echo "$ac_compile" | $SED \
2740a966c04fSmrg   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
2741a966c04fSmrg   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
2742a966c04fSmrg   -e 's:$: $lt_compiler_flag:'`
2743a966c04fSmrg   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
2744a966c04fSmrg   (eval "$lt_compile" 2>out/conftest.err)
2745a966c04fSmrg   ac_status=$?
2746a966c04fSmrg   cat out/conftest.err >&AS_MESSAGE_LOG_FD
2747a966c04fSmrg   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
2748a966c04fSmrg   if (exit $ac_status) && test -s out/conftest2.$ac_objext
2749a966c04fSmrg   then
2750a966c04fSmrg     # The compiler can only warn and ignore the option if not recognized
2751a966c04fSmrg     # So say no if there are warnings
2752a966c04fSmrg     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
2753a966c04fSmrg     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
2754a966c04fSmrg     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
2755a966c04fSmrg       _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
2756a966c04fSmrg     fi
2757a966c04fSmrg   fi
2758a966c04fSmrg   chmod u+w . 2>&AS_MESSAGE_LOG_FD
2759a966c04fSmrg   $rm conftest*
2760a966c04fSmrg   # SGI C++ compiler will create directory out/ii_files/ for
2761a966c04fSmrg   # template instantiation
2762a966c04fSmrg   test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
2763a966c04fSmrg   $rm out/* && rmdir out
2764a966c04fSmrg   cd ..
2765a966c04fSmrg   rmdir conftest
2766a966c04fSmrg   $rm conftest*
2767a966c04fSmrg])
2768a966c04fSmrg])# AC_LIBTOOL_PROG_CC_C_O
2769a966c04fSmrg
2770a966c04fSmrg
2771a966c04fSmrg# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
2772a966c04fSmrg# -----------------------------------------
2773a966c04fSmrg# Check to see if we can do hard links to lock some files if needed
2774a966c04fSmrgAC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
2775a966c04fSmrg[AC_REQUIRE([_LT_AC_LOCK])dnl
2776a966c04fSmrg
2777a966c04fSmrghard_links="nottested"
2778a966c04fSmrgif test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
2779a966c04fSmrg  # do not overwrite the value of need_locks provided by the user
2780a966c04fSmrg  AC_MSG_CHECKING([if we can lock with hard links])
2781a966c04fSmrg  hard_links=yes
2782a966c04fSmrg  $rm conftest*
2783a966c04fSmrg  ln conftest.a conftest.b 2>/dev/null && hard_links=no
2784a966c04fSmrg  touch conftest.a
2785a966c04fSmrg  ln conftest.a conftest.b 2>&5 || hard_links=no
2786a966c04fSmrg  ln conftest.a conftest.b 2>/dev/null && hard_links=no
2787a966c04fSmrg  AC_MSG_RESULT([$hard_links])
2788a966c04fSmrg  if test "$hard_links" = no; then
2789a966c04fSmrg    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
2790a966c04fSmrg    need_locks=warn
2791a966c04fSmrg  fi
2792a966c04fSmrgelse
2793a966c04fSmrg  need_locks=no
2794a966c04fSmrgfi
2795a966c04fSmrg])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
2796a966c04fSmrg
2797a966c04fSmrg
2798a966c04fSmrg# AC_LIBTOOL_OBJDIR
2799a966c04fSmrg# -----------------
2800a966c04fSmrgAC_DEFUN([AC_LIBTOOL_OBJDIR],
2801a966c04fSmrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
2802a966c04fSmrg[rm -f .libs 2>/dev/null
2803a966c04fSmrgmkdir .libs 2>/dev/null
2804a966c04fSmrgif test -d .libs; then
2805a966c04fSmrg  lt_cv_objdir=.libs
2806a966c04fSmrgelse
2807a966c04fSmrg  # MS-DOS does not allow filenames that begin with a dot.
2808a966c04fSmrg  lt_cv_objdir=_libs
2809a966c04fSmrgfi
2810a966c04fSmrgrmdir .libs 2>/dev/null])
2811a966c04fSmrgobjdir=$lt_cv_objdir
2812a966c04fSmrg])# AC_LIBTOOL_OBJDIR
2813a966c04fSmrg
2814a966c04fSmrg
2815a966c04fSmrg# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
2816a966c04fSmrg# ----------------------------------------------
2817a966c04fSmrg# Check hardcoding attributes.
2818a966c04fSmrgAC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
2819a966c04fSmrg[AC_MSG_CHECKING([how to hardcode library paths into programs])
2820a966c04fSmrg_LT_AC_TAGVAR(hardcode_action, $1)=
2821a966c04fSmrgif test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
2822a966c04fSmrg   test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \
2823a966c04fSmrg   test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
2824a966c04fSmrg
2825a966c04fSmrg  # We can hardcode non-existant directories.
2826a966c04fSmrg  if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
2827a966c04fSmrg     # If the only mechanism to avoid hardcoding is shlibpath_var, we
2828a966c04fSmrg     # have to relink, otherwise we might link with an installed library
2829a966c04fSmrg     # when we should be linking with a yet-to-be-installed one
2830a966c04fSmrg     ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
2831a966c04fSmrg     test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
2832a966c04fSmrg    # Linking always hardcodes the temporary library directory.
2833a966c04fSmrg    _LT_AC_TAGVAR(hardcode_action, $1)=relink
2834a966c04fSmrg  else
2835a966c04fSmrg    # We can link without hardcoding, and we can hardcode nonexisting dirs.
2836a966c04fSmrg    _LT_AC_TAGVAR(hardcode_action, $1)=immediate
2837a966c04fSmrg  fi
2838a966c04fSmrgelse
2839a966c04fSmrg  # We cannot hardcode anything, or else we can only hardcode existing
2840a966c04fSmrg  # directories.
2841a966c04fSmrg  _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
2842a966c04fSmrgfi
2843a966c04fSmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
2844a966c04fSmrg
2845a966c04fSmrgif test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
2846a966c04fSmrg  # Fast installation is not supported
2847a966c04fSmrg  enable_fast_install=no
2848a966c04fSmrgelif test "$shlibpath_overrides_runpath" = yes ||
2849a966c04fSmrg     test "$enable_shared" = no; then
2850a966c04fSmrg  # Fast installation is not necessary
2851a966c04fSmrg  enable_fast_install=needless
2852a966c04fSmrgfi
2853a966c04fSmrg])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
2854a966c04fSmrg
2855a966c04fSmrg
2856a966c04fSmrg# AC_LIBTOOL_SYS_LIB_STRIP
2857a966c04fSmrg# ------------------------
2858a966c04fSmrgAC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
2859a966c04fSmrg[striplib=
2860a966c04fSmrgold_striplib=
2861a966c04fSmrgAC_MSG_CHECKING([whether stripping libraries is possible])
2862a966c04fSmrgif test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
2863a966c04fSmrg  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
2864a966c04fSmrg  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
2865a966c04fSmrg  AC_MSG_RESULT([yes])
2866a966c04fSmrgelse
2867a966c04fSmrg# FIXME - insert some real tests, host_os isn't really good enough
2868a966c04fSmrg  case $host_os in
2869a966c04fSmrg   darwin*)
2870a966c04fSmrg       if test -n "$STRIP" ; then
2871a966c04fSmrg         striplib="$STRIP -x"
28722e2dd055Smrg         old_striplib="$STRIP -S"
2873a966c04fSmrg         AC_MSG_RESULT([yes])
2874a966c04fSmrg       else
2875a966c04fSmrg  AC_MSG_RESULT([no])
2876a966c04fSmrgfi
2877a966c04fSmrg       ;;
2878a966c04fSmrg   *)
2879a966c04fSmrg  AC_MSG_RESULT([no])
2880a966c04fSmrg    ;;
2881a966c04fSmrg  esac
2882a966c04fSmrgfi
2883a966c04fSmrg])# AC_LIBTOOL_SYS_LIB_STRIP
2884a966c04fSmrg
2885a966c04fSmrg
2886a966c04fSmrg# AC_LIBTOOL_SYS_DYNAMIC_LINKER
2887a966c04fSmrg# -----------------------------
2888a966c04fSmrg# PORTME Fill in your ld.so characteristics
2889a966c04fSmrgAC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
28902e2dd055Smrg[AC_REQUIRE([LT_AC_PROG_SED])dnl
28912e2dd055SmrgAC_MSG_CHECKING([dynamic linker characteristics])
2892a966c04fSmrglibrary_names_spec=
2893a966c04fSmrglibname_spec='lib$name'
2894a966c04fSmrgsoname_spec=
2895a966c04fSmrgshrext_cmds=".so"
2896a966c04fSmrgpostinstall_cmds=
2897a966c04fSmrgpostuninstall_cmds=
2898a966c04fSmrgfinish_cmds=
2899a966c04fSmrgfinish_eval=
2900a966c04fSmrgshlibpath_var=
2901a966c04fSmrgshlibpath_overrides_runpath=unknown
2902a966c04fSmrgversion_type=none
2903a966c04fSmrgdynamic_linker="$host_os ld.so"
2904a966c04fSmrgsys_lib_dlsearch_path_spec="/lib /usr/lib"
29052e2dd055Smrgm4_if($1,[],[
2906a966c04fSmrgif test "$GCC" = yes; then
29072e2dd055Smrg  case $host_os in
29082e2dd055Smrg    darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
29092e2dd055Smrg    *) lt_awk_arg="/^libraries:/" ;;
29102e2dd055Smrg  esac
29112e2dd055Smrg  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
29122e2dd055Smrg  if echo "$lt_search_path_spec" | grep ';' >/dev/null ; then
2913a966c04fSmrg    # if the path contains ";" then we assume it to be the separator
2914a966c04fSmrg    # otherwise default to the standard path separator (i.e. ":") - it is
2915a966c04fSmrg    # assumed that no part of a normal pathname contains ";" but that should
2916a966c04fSmrg    # okay in the real world where ";" in dirpaths is itself problematic.
29172e2dd055Smrg    lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e 's/;/ /g'`
2918a966c04fSmrg  else
29192e2dd055Smrg    lt_search_path_spec=`echo "$lt_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
2920a966c04fSmrg  fi
29212e2dd055Smrg  # Ok, now we have the path, separated by spaces, we can step through it
29222e2dd055Smrg  # and add multilib dir if necessary.
29232e2dd055Smrg  lt_tmp_lt_search_path_spec=
29242e2dd055Smrg  lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
29252e2dd055Smrg  for lt_sys_path in $lt_search_path_spec; do
29262e2dd055Smrg    if test -d "$lt_sys_path/$lt_multi_os_dir"; then
29272e2dd055Smrg      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
29282e2dd055Smrg    else
29292e2dd055Smrg      test -d "$lt_sys_path" && \
29302e2dd055Smrg	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
29312e2dd055Smrg    fi
29322e2dd055Smrg  done
29332e2dd055Smrg  lt_search_path_spec=`echo $lt_tmp_lt_search_path_spec | awk '
29342e2dd055SmrgBEGIN {RS=" "; FS="/|\n";} {
29352e2dd055Smrg  lt_foo="";
29362e2dd055Smrg  lt_count=0;
29372e2dd055Smrg  for (lt_i = NF; lt_i > 0; lt_i--) {
29382e2dd055Smrg    if ($lt_i != "" && $lt_i != ".") {
29392e2dd055Smrg      if ($lt_i == "..") {
29402e2dd055Smrg        lt_count++;
29412e2dd055Smrg      } else {
29422e2dd055Smrg        if (lt_count == 0) {
29432e2dd055Smrg          lt_foo="/" $lt_i lt_foo;
29442e2dd055Smrg        } else {
29452e2dd055Smrg          lt_count--;
29462e2dd055Smrg        }
29472e2dd055Smrg      }
29482e2dd055Smrg    }
29492e2dd055Smrg  }
29502e2dd055Smrg  if (lt_foo != "") { lt_freq[[lt_foo]]++; }
29512e2dd055Smrg  if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
29522e2dd055Smrg}'`
29532e2dd055Smrg  sys_lib_search_path_spec=`echo $lt_search_path_spec`
2954a966c04fSmrgelse
2955a966c04fSmrg  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
29562e2dd055Smrgfi])
2957a966c04fSmrgneed_lib_prefix=unknown
2958a966c04fSmrghardcode_into_libs=no
2959a966c04fSmrg
2960a966c04fSmrg# when you set need_version to no, make sure it does not cause -set_version
2961a966c04fSmrg# flags to be left without arguments
2962a966c04fSmrgneed_version=unknown
2963a966c04fSmrg
2964a966c04fSmrgcase $host_os in
2965a966c04fSmrgaix3*)
2966a966c04fSmrg  version_type=linux
2967a966c04fSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
2968a966c04fSmrg  shlibpath_var=LIBPATH
2969a966c04fSmrg
2970a966c04fSmrg  # AIX 3 has no versioning support, so we append a major version to the name.
2971a966c04fSmrg  soname_spec='${libname}${release}${shared_ext}$major'
2972a966c04fSmrg  ;;
2973a966c04fSmrg
29742e2dd055Smrgaix[[4-9]]*)
2975a966c04fSmrg  version_type=linux
2976a966c04fSmrg  need_lib_prefix=no
2977a966c04fSmrg  need_version=no
2978a966c04fSmrg  hardcode_into_libs=yes
2979a966c04fSmrg  if test "$host_cpu" = ia64; then
2980a966c04fSmrg    # AIX 5 supports IA64
2981a966c04fSmrg    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
2982a966c04fSmrg    shlibpath_var=LD_LIBRARY_PATH
2983a966c04fSmrg  else
2984a966c04fSmrg    # With GCC up to 2.95.x, collect2 would create an import file
2985a966c04fSmrg    # for dependence libraries.  The import file would start with
2986a966c04fSmrg    # the line `#! .'.  This would cause the generated library to
2987a966c04fSmrg    # depend on `.', always an invalid library.  This was fixed in
2988a966c04fSmrg    # development snapshots of GCC prior to 3.0.
2989a966c04fSmrg    case $host_os in
2990a966c04fSmrg      aix4 | aix4.[[01]] | aix4.[[01]].*)
2991a966c04fSmrg      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
2992a966c04fSmrg	   echo ' yes '
2993a966c04fSmrg	   echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
2994a966c04fSmrg	:
2995a966c04fSmrg      else
2996a966c04fSmrg	can_build_shared=no
2997a966c04fSmrg      fi
2998a966c04fSmrg      ;;
2999a966c04fSmrg    esac
3000a966c04fSmrg    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
3001a966c04fSmrg    # soname into executable. Probably we can add versioning support to
3002a966c04fSmrg    # collect2, so additional links can be useful in future.
3003a966c04fSmrg    if test "$aix_use_runtimelinking" = yes; then
3004a966c04fSmrg      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
3005a966c04fSmrg      # instead of lib<name>.a to let people know that these are not
3006a966c04fSmrg      # typical AIX shared libraries.
3007a966c04fSmrg      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3008a966c04fSmrg    else
3009a966c04fSmrg      # We preserve .a as extension for shared libraries through AIX4.2
3010a966c04fSmrg      # and later when we are not doing run time linking.
3011a966c04fSmrg      library_names_spec='${libname}${release}.a $libname.a'
3012a966c04fSmrg      soname_spec='${libname}${release}${shared_ext}$major'
3013a966c04fSmrg    fi
3014a966c04fSmrg    shlibpath_var=LIBPATH
3015a966c04fSmrg  fi
3016a966c04fSmrg  ;;
3017a966c04fSmrg
3018a966c04fSmrgamigaos*)
3019a966c04fSmrg  library_names_spec='$libname.ixlibrary $libname.a'
3020a966c04fSmrg  # Create ${libname}_ixlibrary.a entries in /sys/libs.
3021a966c04fSmrg  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'
3022a966c04fSmrg  ;;
3023a966c04fSmrg
3024a966c04fSmrgbeos*)
3025a966c04fSmrg  library_names_spec='${libname}${shared_ext}'
3026a966c04fSmrg  dynamic_linker="$host_os ld.so"
3027a966c04fSmrg  shlibpath_var=LIBRARY_PATH
3028a966c04fSmrg  ;;
3029a966c04fSmrg
3030a966c04fSmrgbsdi[[45]]*)
3031a966c04fSmrg  version_type=linux
3032a966c04fSmrg  need_version=no
3033a966c04fSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3034a966c04fSmrg  soname_spec='${libname}${release}${shared_ext}$major'
3035a966c04fSmrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
3036a966c04fSmrg  shlibpath_var=LD_LIBRARY_PATH
3037a966c04fSmrg  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
3038a966c04fSmrg  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
3039a966c04fSmrg  # the default ld.so.conf also contains /usr/contrib/lib and
3040a966c04fSmrg  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
3041a966c04fSmrg  # libtool to hard-code these into programs
3042a966c04fSmrg  ;;
3043a966c04fSmrg
3044a966c04fSmrgcygwin* | mingw* | pw32*)
3045a966c04fSmrg  version_type=windows
3046a966c04fSmrg  shrext_cmds=".dll"
3047a966c04fSmrg  need_version=no
3048a966c04fSmrg  need_lib_prefix=no
3049a966c04fSmrg
3050a966c04fSmrg  case $GCC,$host_os in
3051a966c04fSmrg  yes,cygwin* | yes,mingw* | yes,pw32*)
3052a966c04fSmrg    library_names_spec='$libname.dll.a'
3053a966c04fSmrg    # DLL is installed to $(libdir)/../bin by postinstall_cmds
3054a966c04fSmrg    postinstall_cmds='base_file=`basename \${file}`~
3055a966c04fSmrg      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
3056a966c04fSmrg      dldir=$destdir/`dirname \$dlpath`~
3057a966c04fSmrg      test -d \$dldir || mkdir -p \$dldir~
3058a966c04fSmrg      $install_prog $dir/$dlname \$dldir/$dlname~
3059a966c04fSmrg      chmod a+x \$dldir/$dlname'
3060a966c04fSmrg    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
3061a966c04fSmrg      dlpath=$dir/\$dldll~
3062a966c04fSmrg       $rm \$dlpath'
3063a966c04fSmrg    shlibpath_overrides_runpath=yes
3064a966c04fSmrg
3065a966c04fSmrg    case $host_os in
3066a966c04fSmrg    cygwin*)
3067a966c04fSmrg      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
3068a966c04fSmrg      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3069a966c04fSmrg      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
3070a966c04fSmrg      ;;
3071a966c04fSmrg    mingw*)
3072a966c04fSmrg      # MinGW DLLs use traditional 'lib' prefix
3073a966c04fSmrg      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3074a966c04fSmrg      sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
3075a966c04fSmrg      if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
3076a966c04fSmrg        # It is most probably a Windows format PATH printed by
3077a966c04fSmrg        # mingw gcc, but we are running on Cygwin. Gcc prints its search
3078a966c04fSmrg        # path with ; separators, and with drive letters. We can handle the
3079a966c04fSmrg        # drive letters (cygwin fileutils understands them), so leave them,
3080a966c04fSmrg        # especially as we might pass files found there to a mingw objdump,
3081a966c04fSmrg        # which wouldn't understand a cygwinified path. Ahh.
3082a966c04fSmrg        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
3083a966c04fSmrg      else
3084a966c04fSmrg        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
3085a966c04fSmrg      fi
3086a966c04fSmrg      ;;
3087a966c04fSmrg    pw32*)
3088a966c04fSmrg      # pw32 DLLs use 'pw' prefix rather than 'lib'
3089a966c04fSmrg      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3090a966c04fSmrg      ;;
3091a966c04fSmrg    esac
3092a966c04fSmrg    ;;
3093a966c04fSmrg
3094a966c04fSmrg  *)
3095a966c04fSmrg    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
3096a966c04fSmrg    ;;
3097a966c04fSmrg  esac
3098a966c04fSmrg  dynamic_linker='Win32 ld.exe'
3099a966c04fSmrg  # FIXME: first we should search . and the directory the executable is in
3100a966c04fSmrg  shlibpath_var=PATH
3101a966c04fSmrg  ;;
3102a966c04fSmrg
3103a966c04fSmrgdarwin* | rhapsody*)
3104a966c04fSmrg  dynamic_linker="$host_os dyld"
3105a966c04fSmrg  version_type=darwin
3106a966c04fSmrg  need_lib_prefix=no
3107a966c04fSmrg  need_version=no
3108a966c04fSmrg  library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
3109a966c04fSmrg  soname_spec='${libname}${release}${major}$shared_ext'
3110a966c04fSmrg  shlibpath_overrides_runpath=yes
3111a966c04fSmrg  shlibpath_var=DYLD_LIBRARY_PATH
3112a966c04fSmrg  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
31132e2dd055Smrg  m4_if([$1], [],[
31142e2dd055Smrg  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 
3115a966c04fSmrg  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
3116a966c04fSmrg  ;;
3117a966c04fSmrg
3118a966c04fSmrgdgux*)
3119a966c04fSmrg  version_type=linux
3120a966c04fSmrg  need_lib_prefix=no
3121a966c04fSmrg  need_version=no
3122a966c04fSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
3123a966c04fSmrg  soname_spec='${libname}${release}${shared_ext}$major'
3124a966c04fSmrg  shlibpath_var=LD_LIBRARY_PATH
3125a966c04fSmrg  ;;
3126a966c04fSmrg
3127a966c04fSmrgfreebsd1*)
3128a966c04fSmrg  dynamic_linker=no
3129a966c04fSmrg  ;;
3130a966c04fSmrg
3131a966c04fSmrgfreebsd* | dragonfly*)
3132a966c04fSmrg  # DragonFly does not have aout.  When/if they implement a new
3133a966c04fSmrg  # versioning mechanism, adjust this.
3134a966c04fSmrg  if test -x /usr/bin/objformat; then
3135a966c04fSmrg    objformat=`/usr/bin/objformat`
3136a966c04fSmrg  else
3137a966c04fSmrg    case $host_os in
3138a966c04fSmrg    freebsd[[123]]*) objformat=aout ;;
3139a966c04fSmrg    *) objformat=elf ;;
3140a966c04fSmrg    esac
3141a966c04fSmrg  fi
3142a966c04fSmrg  version_type=freebsd-$objformat
3143a966c04fSmrg  case $version_type in
3144a966c04fSmrg    freebsd-elf*)
3145a966c04fSmrg      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
3146a966c04fSmrg      need_version=no
3147a966c04fSmrg      need_lib_prefix=no
3148a966c04fSmrg      ;;
3149a966c04fSmrg    freebsd-*)
3150a966c04fSmrg      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
3151a966c04fSmrg      need_version=yes
3152a966c04fSmrg      ;;
3153a966c04fSmrg  esac
3154a966c04fSmrg  shlibpath_var=LD_LIBRARY_PATH
3155a966c04fSmrg  case $host_os in
3156a966c04fSmrg  freebsd2*)
3157a966c04fSmrg    shlibpath_overrides_runpath=yes
3158a966c04fSmrg    ;;
3159a966c04fSmrg  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
3160a966c04fSmrg    shlibpath_overrides_runpath=yes
3161a966c04fSmrg    hardcode_into_libs=yes
3162a966c04fSmrg    ;;
3163a966c04fSmrg  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
3164a966c04fSmrg  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
3165a966c04fSmrg    shlibpath_overrides_runpath=no
3166a966c04fSmrg    hardcode_into_libs=yes
3167a966c04fSmrg    ;;
31682e2dd055Smrg  *) # from 4.6 on, and DragonFly
3169a966c04fSmrg    shlibpath_overrides_runpath=yes
3170a966c04fSmrg    hardcode_into_libs=yes
3171a966c04fSmrg    ;;
3172a966c04fSmrg  esac
3173a966c04fSmrg  ;;
3174a966c04fSmrg
3175a966c04fSmrggnu*)
3176a966c04fSmrg  version_type=linux
3177a966c04fSmrg  need_lib_prefix=no
3178a966c04fSmrg  need_version=no
3179a966c04fSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
3180a966c04fSmrg  soname_spec='${libname}${release}${shared_ext}$major'
3181a966c04fSmrg  shlibpath_var=LD_LIBRARY_PATH
3182a966c04fSmrg  hardcode_into_libs=yes
3183a966c04fSmrg  ;;
3184a966c04fSmrg
3185a966c04fSmrghpux9* | hpux10* | hpux11*)
3186a966c04fSmrg  # Give a soname corresponding to the major version so that dld.sl refuses to
3187a966c04fSmrg  # link against other versions.
3188a966c04fSmrg  version_type=sunos
3189a966c04fSmrg  need_lib_prefix=no
3190a966c04fSmrg  need_version=no
3191a966c04fSmrg  case $host_cpu in
3192a966c04fSmrg  ia64*)
3193a966c04fSmrg    shrext_cmds='.so'
3194a966c04fSmrg    hardcode_into_libs=yes
3195a966c04fSmrg    dynamic_linker="$host_os dld.so"
3196a966c04fSmrg    shlibpath_var=LD_LIBRARY_PATH
3197a966c04fSmrg    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
3198a966c04fSmrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3199a966c04fSmrg    soname_spec='${libname}${release}${shared_ext}$major'
3200a966c04fSmrg    if test "X$HPUX_IA64_MODE" = X32; then
3201a966c04fSmrg      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
3202a966c04fSmrg    else
3203a966c04fSmrg      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
3204a966c04fSmrg    fi
3205a966c04fSmrg    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
3206a966c04fSmrg    ;;
3207a966c04fSmrg   hppa*64*)
3208a966c04fSmrg     shrext_cmds='.sl'
3209a966c04fSmrg     hardcode_into_libs=yes
3210a966c04fSmrg     dynamic_linker="$host_os dld.sl"
3211a966c04fSmrg     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
3212a966c04fSmrg     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
3213a966c04fSmrg     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3214a966c04fSmrg     soname_spec='${libname}${release}${shared_ext}$major'
3215a966c04fSmrg     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
3216a966c04fSmrg     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
3217a966c04fSmrg     ;;
3218a966c04fSmrg   *)
3219a966c04fSmrg    shrext_cmds='.sl'
3220a966c04fSmrg    dynamic_linker="$host_os dld.sl"
3221a966c04fSmrg    shlibpath_var=SHLIB_PATH
3222a966c04fSmrg    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
3223a966c04fSmrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3224a966c04fSmrg    soname_spec='${libname}${release}${shared_ext}$major'
3225a966c04fSmrg    ;;
3226a966c04fSmrg  esac
3227a966c04fSmrg  # HP-UX runs *really* slowly unless shared libraries are mode 555.
3228a966c04fSmrg  postinstall_cmds='chmod 555 $lib'
3229a966c04fSmrg  ;;
3230a966c04fSmrg
32312e2dd055Smrginterix[[3-9]]*)
3232a966c04fSmrg  version_type=linux
3233a966c04fSmrg  need_lib_prefix=no
3234a966c04fSmrg  need_version=no
3235a966c04fSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
3236a966c04fSmrg  soname_spec='${libname}${release}${shared_ext}$major'
3237a966c04fSmrg  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
3238a966c04fSmrg  shlibpath_var=LD_LIBRARY_PATH
3239a966c04fSmrg  shlibpath_overrides_runpath=no
3240a966c04fSmrg  hardcode_into_libs=yes
3241a966c04fSmrg  ;;
3242a966c04fSmrg
3243a966c04fSmrgirix5* | irix6* | nonstopux*)
3244a966c04fSmrg  case $host_os in
3245a966c04fSmrg    nonstopux*) version_type=nonstopux ;;
3246a966c04fSmrg    *)
3247a966c04fSmrg	if test "$lt_cv_prog_gnu_ld" = yes; then
3248a966c04fSmrg		version_type=linux
3249a966c04fSmrg	else
3250a966c04fSmrg		version_type=irix
3251a966c04fSmrg	fi ;;
3252a966c04fSmrg  esac
3253a966c04fSmrg  need_lib_prefix=no
3254a966c04fSmrg  need_version=no
3255a966c04fSmrg  soname_spec='${libname}${release}${shared_ext}$major'
3256a966c04fSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
3257a966c04fSmrg  case $host_os in
3258a966c04fSmrg  irix5* | nonstopux*)
3259a966c04fSmrg    libsuff= shlibsuff=
3260a966c04fSmrg    ;;
3261a966c04fSmrg  *)
3262a966c04fSmrg    case $LD in # libtool.m4 will add one of these switches to LD
3263a966c04fSmrg    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
3264a966c04fSmrg      libsuff= shlibsuff= libmagic=32-bit;;
3265a966c04fSmrg    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
3266a966c04fSmrg      libsuff=32 shlibsuff=N32 libmagic=N32;;
3267a966c04fSmrg    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
3268a966c04fSmrg      libsuff=64 shlibsuff=64 libmagic=64-bit;;
3269a966c04fSmrg    *) libsuff= shlibsuff= libmagic=never-match;;
3270a966c04fSmrg    esac
3271a966c04fSmrg    ;;
3272a966c04fSmrg  esac
3273a966c04fSmrg  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
3274a966c04fSmrg  shlibpath_overrides_runpath=no
3275a966c04fSmrg  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
3276a966c04fSmrg  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
3277a966c04fSmrg  hardcode_into_libs=yes
3278a966c04fSmrg  ;;
3279a966c04fSmrg
3280a966c04fSmrg# No shared lib support for Linux oldld, aout, or coff.
3281a966c04fSmrglinux*oldld* | linux*aout* | linux*coff*)
3282a966c04fSmrg  dynamic_linker=no
3283a966c04fSmrg  ;;
3284a966c04fSmrg
3285a966c04fSmrg# This must be Linux ELF.
32862e2dd055Smrglinux* | k*bsd*-gnu)
3287a966c04fSmrg  version_type=linux
3288a966c04fSmrg  need_lib_prefix=no
3289a966c04fSmrg  need_version=no
3290a966c04fSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3291a966c04fSmrg  soname_spec='${libname}${release}${shared_ext}$major'
3292a966c04fSmrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
3293a966c04fSmrg  shlibpath_var=LD_LIBRARY_PATH
3294a966c04fSmrg  shlibpath_overrides_runpath=no
3295a966c04fSmrg  # This implies no fast_install, which is unacceptable.
3296a966c04fSmrg  # Some rework will be needed to allow for fast_install
3297a966c04fSmrg  # before this can be enabled.
3298a966c04fSmrg  hardcode_into_libs=yes
3299a966c04fSmrg
3300a966c04fSmrg  # Append ld.so.conf contents to the search path
3301a966c04fSmrg  if test -f /etc/ld.so.conf; then
33022e2dd055Smrg    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' ' '`
3303a966c04fSmrg    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
3304a966c04fSmrg  fi
3305a966c04fSmrg
3306a966c04fSmrg  # We used to test for /lib/ld.so.1 and disable shared libraries on
3307a966c04fSmrg  # powerpc, because MkLinux only supported shared libraries with the
3308a966c04fSmrg  # GNU dynamic linker.  Since this was broken with cross compilers,
3309a966c04fSmrg  # most powerpc-linux boxes support dynamic linking these days and
3310a966c04fSmrg  # people can always --disable-shared, the test was removed, and we
3311a966c04fSmrg  # assume the GNU/Linux dynamic linker is in use.
3312a966c04fSmrg  dynamic_linker='GNU/Linux ld.so'
3313a966c04fSmrg  ;;
3314a966c04fSmrg
3315a966c04fSmrgnetbsd*)
3316a966c04fSmrg  version_type=sunos
3317a966c04fSmrg  need_lib_prefix=no
3318a966c04fSmrg  need_version=no
3319a966c04fSmrg  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
3320a966c04fSmrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
3321a966c04fSmrg    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
3322a966c04fSmrg    dynamic_linker='NetBSD (a.out) ld.so'
3323a966c04fSmrg  else
3324a966c04fSmrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
3325a966c04fSmrg    soname_spec='${libname}${release}${shared_ext}$major'
3326a966c04fSmrg    dynamic_linker='NetBSD ld.elf_so'
3327a966c04fSmrg  fi
3328a966c04fSmrg  shlibpath_var=LD_LIBRARY_PATH
3329a966c04fSmrg  shlibpath_overrides_runpath=yes
3330a966c04fSmrg  hardcode_into_libs=yes
3331a966c04fSmrg  ;;
3332a966c04fSmrg
3333a966c04fSmrgnewsos6)
3334a966c04fSmrg  version_type=linux
3335a966c04fSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3336a966c04fSmrg  shlibpath_var=LD_LIBRARY_PATH
3337a966c04fSmrg  shlibpath_overrides_runpath=yes
3338a966c04fSmrg  ;;
3339a966c04fSmrg
3340a966c04fSmrgnto-qnx*)
3341a966c04fSmrg  version_type=linux
3342a966c04fSmrg  need_lib_prefix=no
3343a966c04fSmrg  need_version=no
3344a966c04fSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3345a966c04fSmrg  soname_spec='${libname}${release}${shared_ext}$major'
3346a966c04fSmrg  shlibpath_var=LD_LIBRARY_PATH
3347a966c04fSmrg  shlibpath_overrides_runpath=yes
3348a966c04fSmrg  ;;
3349a966c04fSmrg
3350a966c04fSmrgopenbsd*)
3351a966c04fSmrg  version_type=sunos
3352a966c04fSmrg  sys_lib_dlsearch_path_spec="/usr/lib"
3353a966c04fSmrg  need_lib_prefix=no
3354a966c04fSmrg  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
3355a966c04fSmrg  case $host_os in
3356a966c04fSmrg    openbsd3.3 | openbsd3.3.*) need_version=yes ;;
3357a966c04fSmrg    *)                         need_version=no  ;;
3358a966c04fSmrg  esac
3359a966c04fSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
3360a966c04fSmrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
3361a966c04fSmrg  shlibpath_var=LD_LIBRARY_PATH
3362a966c04fSmrg  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3363a966c04fSmrg    case $host_os in
3364a966c04fSmrg      openbsd2.[[89]] | openbsd2.[[89]].*)
3365a966c04fSmrg	shlibpath_overrides_runpath=no
3366a966c04fSmrg	;;
3367a966c04fSmrg      *)
3368a966c04fSmrg	shlibpath_overrides_runpath=yes
3369a966c04fSmrg	;;
3370a966c04fSmrg      esac
3371a966c04fSmrg  else
3372a966c04fSmrg    shlibpath_overrides_runpath=yes
3373a966c04fSmrg  fi
3374a966c04fSmrg  ;;
3375a966c04fSmrg
3376a966c04fSmrgos2*)
3377a966c04fSmrg  libname_spec='$name'
3378a966c04fSmrg  shrext_cmds=".dll"
3379a966c04fSmrg  need_lib_prefix=no
3380a966c04fSmrg  library_names_spec='$libname${shared_ext} $libname.a'
3381a966c04fSmrg  dynamic_linker='OS/2 ld.exe'
3382a966c04fSmrg  shlibpath_var=LIBPATH
3383a966c04fSmrg  ;;
3384a966c04fSmrg
3385a966c04fSmrgosf3* | osf4* | osf5*)
3386a966c04fSmrg  version_type=osf
3387a966c04fSmrg  need_lib_prefix=no
3388a966c04fSmrg  need_version=no
3389a966c04fSmrg  soname_spec='${libname}${release}${shared_ext}$major'
3390a966c04fSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3391a966c04fSmrg  shlibpath_var=LD_LIBRARY_PATH
3392a966c04fSmrg  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
3393a966c04fSmrg  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
3394a966c04fSmrg  ;;
3395a966c04fSmrg
33962e2dd055Smrgrdos*)
33972e2dd055Smrg  dynamic_linker=no
33982e2dd055Smrg  ;;
33992e2dd055Smrg
3400a966c04fSmrgsolaris*)
3401a966c04fSmrg  version_type=linux
3402a966c04fSmrg  need_lib_prefix=no
3403a966c04fSmrg  need_version=no
3404a966c04fSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3405a966c04fSmrg  soname_spec='${libname}${release}${shared_ext}$major'
3406a966c04fSmrg  shlibpath_var=LD_LIBRARY_PATH
3407a966c04fSmrg  shlibpath_overrides_runpath=yes
3408a966c04fSmrg  hardcode_into_libs=yes
3409a966c04fSmrg  # ldd complains unless libraries are executable
3410a966c04fSmrg  postinstall_cmds='chmod +x $lib'
3411a966c04fSmrg  ;;
3412a966c04fSmrg
3413a966c04fSmrgsunos4*)
3414a966c04fSmrg  version_type=sunos
3415a966c04fSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
3416a966c04fSmrg  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
3417a966c04fSmrg  shlibpath_var=LD_LIBRARY_PATH
3418a966c04fSmrg  shlibpath_overrides_runpath=yes
3419a966c04fSmrg  if test "$with_gnu_ld" = yes; then
3420a966c04fSmrg    need_lib_prefix=no
3421a966c04fSmrg  fi
3422a966c04fSmrg  need_version=yes
3423a966c04fSmrg  ;;
3424a966c04fSmrg
3425a966c04fSmrgsysv4 | sysv4.3*)
3426a966c04fSmrg  version_type=linux
3427a966c04fSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3428a966c04fSmrg  soname_spec='${libname}${release}${shared_ext}$major'
3429a966c04fSmrg  shlibpath_var=LD_LIBRARY_PATH
3430a966c04fSmrg  case $host_vendor in
3431a966c04fSmrg    sni)
3432a966c04fSmrg      shlibpath_overrides_runpath=no
3433a966c04fSmrg      need_lib_prefix=no
3434a966c04fSmrg      export_dynamic_flag_spec='${wl}-Blargedynsym'
3435a966c04fSmrg      runpath_var=LD_RUN_PATH
3436a966c04fSmrg      ;;
3437a966c04fSmrg    siemens)
3438a966c04fSmrg      need_lib_prefix=no
3439a966c04fSmrg      ;;
3440a966c04fSmrg    motorola)
3441a966c04fSmrg      need_lib_prefix=no
3442a966c04fSmrg      need_version=no
3443a966c04fSmrg      shlibpath_overrides_runpath=no
3444a966c04fSmrg      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
3445a966c04fSmrg      ;;
3446a966c04fSmrg  esac
3447a966c04fSmrg  ;;
3448a966c04fSmrg
3449a966c04fSmrgsysv4*MP*)
3450a966c04fSmrg  if test -d /usr/nec ;then
3451a966c04fSmrg    version_type=linux
3452a966c04fSmrg    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
3453a966c04fSmrg    soname_spec='$libname${shared_ext}.$major'
3454a966c04fSmrg    shlibpath_var=LD_LIBRARY_PATH
3455a966c04fSmrg  fi
3456a966c04fSmrg  ;;
3457a966c04fSmrg
3458a966c04fSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3459a966c04fSmrg  version_type=freebsd-elf
3460a966c04fSmrg  need_lib_prefix=no
3461a966c04fSmrg  need_version=no
3462a966c04fSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
3463a966c04fSmrg  soname_spec='${libname}${release}${shared_ext}$major'
3464a966c04fSmrg  shlibpath_var=LD_LIBRARY_PATH
3465a966c04fSmrg  hardcode_into_libs=yes
3466a966c04fSmrg  if test "$with_gnu_ld" = yes; then
3467a966c04fSmrg    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
3468a966c04fSmrg    shlibpath_overrides_runpath=no
3469a966c04fSmrg  else
3470a966c04fSmrg    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
3471a966c04fSmrg    shlibpath_overrides_runpath=yes
3472a966c04fSmrg    case $host_os in
3473a966c04fSmrg      sco3.2v5*)
3474a966c04fSmrg        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
3475a966c04fSmrg	;;
3476a966c04fSmrg    esac
3477a966c04fSmrg  fi
3478a966c04fSmrg  sys_lib_dlsearch_path_spec='/usr/lib'
3479a966c04fSmrg  ;;
3480a966c04fSmrg
3481a966c04fSmrguts4*)
3482a966c04fSmrg  version_type=linux
3483a966c04fSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3484a966c04fSmrg  soname_spec='${libname}${release}${shared_ext}$major'
3485a966c04fSmrg  shlibpath_var=LD_LIBRARY_PATH
3486a966c04fSmrg  ;;
3487a966c04fSmrg
3488a966c04fSmrg*)
3489a966c04fSmrg  dynamic_linker=no
3490a966c04fSmrg  ;;
3491a966c04fSmrgesac
3492a966c04fSmrgAC_MSG_RESULT([$dynamic_linker])
3493a966c04fSmrgtest "$dynamic_linker" = no && can_build_shared=no
3494a966c04fSmrg
34952e2dd055SmrgAC_CACHE_VAL([lt_cv_sys_lib_search_path_spec],
34962e2dd055Smrg[lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec"])
34972e2dd055Smrgsys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
34982e2dd055SmrgAC_CACHE_VAL([lt_cv_sys_lib_dlsearch_path_spec],
34992e2dd055Smrg[lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec"])
35002e2dd055Smrgsys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
35012e2dd055Smrg
3502a966c04fSmrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var"
3503a966c04fSmrgif test "$GCC" = yes; then
3504a966c04fSmrg  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
3505a966c04fSmrgfi
3506a966c04fSmrg])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
3507a966c04fSmrg
3508a966c04fSmrg
3509a966c04fSmrg# _LT_AC_TAGCONFIG
3510a966c04fSmrg# ----------------
3511a966c04fSmrgAC_DEFUN([_LT_AC_TAGCONFIG],
35122e2dd055Smrg[AC_REQUIRE([LT_AC_PROG_SED])dnl
35132e2dd055SmrgAC_ARG_WITH([tags],
3514a966c04fSmrg    [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
3515a966c04fSmrg        [include additional configurations @<:@automatic@:>@])],
3516a966c04fSmrg    [tagnames="$withval"])
3517a966c04fSmrg
3518a966c04fSmrgif test -f "$ltmain" && test -n "$tagnames"; then
3519a966c04fSmrg  if test ! -f "${ofile}"; then
3520a966c04fSmrg    AC_MSG_WARN([output file `$ofile' does not exist])
3521a966c04fSmrg  fi
3522a966c04fSmrg
3523a966c04fSmrg  if test -z "$LTCC"; then
3524a966c04fSmrg    eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
3525a966c04fSmrg    if test -z "$LTCC"; then
3526a966c04fSmrg      AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
3527a966c04fSmrg    else
3528a966c04fSmrg      AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
3529a966c04fSmrg    fi
3530a966c04fSmrg  fi
3531a966c04fSmrg  if test -z "$LTCFLAGS"; then
3532a966c04fSmrg    eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`"
3533a966c04fSmrg  fi
3534a966c04fSmrg
3535a966c04fSmrg  # Extract list of available tagged configurations in $ofile.
3536a966c04fSmrg  # Note that this assumes the entire list is on one line.
3537a966c04fSmrg  available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
3538a966c04fSmrg
3539a966c04fSmrg  lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
3540a966c04fSmrg  for tagname in $tagnames; do
3541a966c04fSmrg    IFS="$lt_save_ifs"
3542a966c04fSmrg    # Check whether tagname contains only valid characters
3543a966c04fSmrg    case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
3544a966c04fSmrg    "") ;;
3545a966c04fSmrg    *)  AC_MSG_ERROR([invalid tag name: $tagname])
3546a966c04fSmrg	;;
3547a966c04fSmrg    esac
3548a966c04fSmrg
3549a966c04fSmrg    if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
3550a966c04fSmrg    then
3551a966c04fSmrg      AC_MSG_ERROR([tag name \"$tagname\" already exists])
3552a966c04fSmrg    fi
3553a966c04fSmrg
3554a966c04fSmrg    # Update the list of available tags.
3555a966c04fSmrg    if test -n "$tagname"; then
3556a966c04fSmrg      echo appending configuration tag \"$tagname\" to $ofile
3557a966c04fSmrg
3558a966c04fSmrg      case $tagname in
3559a966c04fSmrg      CXX)
3560a966c04fSmrg	if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
3561a966c04fSmrg	    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
3562a966c04fSmrg	    (test "X$CXX" != "Xg++"))) ; then
3563a966c04fSmrg	  AC_LIBTOOL_LANG_CXX_CONFIG
3564a966c04fSmrg	else
3565a966c04fSmrg	  tagname=""
3566a966c04fSmrg	fi
3567a966c04fSmrg	;;
3568a966c04fSmrg
3569a966c04fSmrg      F77)
3570a966c04fSmrg	if test -n "$F77" && test "X$F77" != "Xno"; then
3571a966c04fSmrg	  AC_LIBTOOL_LANG_F77_CONFIG
3572a966c04fSmrg	else
3573a966c04fSmrg	  tagname=""
3574a966c04fSmrg	fi
3575a966c04fSmrg	;;
3576a966c04fSmrg
3577a966c04fSmrg      GCJ)
3578a966c04fSmrg	if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
3579a966c04fSmrg	  AC_LIBTOOL_LANG_GCJ_CONFIG
3580a966c04fSmrg	else
3581a966c04fSmrg	  tagname=""
3582a966c04fSmrg	fi
3583a966c04fSmrg	;;
3584a966c04fSmrg
3585a966c04fSmrg      RC)
3586a966c04fSmrg	AC_LIBTOOL_LANG_RC_CONFIG
3587a966c04fSmrg	;;
3588a966c04fSmrg
3589a966c04fSmrg      *)
3590a966c04fSmrg	AC_MSG_ERROR([Unsupported tag name: $tagname])
3591a966c04fSmrg	;;
3592a966c04fSmrg      esac
3593a966c04fSmrg
3594a966c04fSmrg      # Append the new tag name to the list of available tags.
3595a966c04fSmrg      if test -n "$tagname" ; then
3596a966c04fSmrg      available_tags="$available_tags $tagname"
3597a966c04fSmrg    fi
3598a966c04fSmrg    fi
3599a966c04fSmrg  done
3600a966c04fSmrg  IFS="$lt_save_ifs"
3601a966c04fSmrg
3602a966c04fSmrg  # Now substitute the updated list of available tags.
3603a966c04fSmrg  if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
3604a966c04fSmrg    mv "${ofile}T" "$ofile"
3605a966c04fSmrg    chmod +x "$ofile"
3606a966c04fSmrg  else
3607a966c04fSmrg    rm -f "${ofile}T"
3608a966c04fSmrg    AC_MSG_ERROR([unable to update list of available tagged configurations.])
3609a966c04fSmrg  fi
3610a966c04fSmrgfi
3611a966c04fSmrg])# _LT_AC_TAGCONFIG
3612a966c04fSmrg
3613a966c04fSmrg
3614a966c04fSmrg# AC_LIBTOOL_DLOPEN
3615a966c04fSmrg# -----------------
3616a966c04fSmrg# enable checks for dlopen support
3617a966c04fSmrgAC_DEFUN([AC_LIBTOOL_DLOPEN],
3618a966c04fSmrg [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
3619a966c04fSmrg])# AC_LIBTOOL_DLOPEN
3620a966c04fSmrg
3621a966c04fSmrg
3622a966c04fSmrg# AC_LIBTOOL_WIN32_DLL
3623a966c04fSmrg# --------------------
3624a966c04fSmrg# declare package support for building win32 DLLs
3625a966c04fSmrgAC_DEFUN([AC_LIBTOOL_WIN32_DLL],
3626a966c04fSmrg[AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
3627a966c04fSmrg])# AC_LIBTOOL_WIN32_DLL
3628a966c04fSmrg
3629a966c04fSmrg
3630a966c04fSmrg# AC_ENABLE_SHARED([DEFAULT])
3631a966c04fSmrg# ---------------------------
3632a966c04fSmrg# implement the --enable-shared flag
3633a966c04fSmrg# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
3634a966c04fSmrgAC_DEFUN([AC_ENABLE_SHARED],
3635a966c04fSmrg[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
3636a966c04fSmrgAC_ARG_ENABLE([shared],
3637a966c04fSmrg    [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
3638a966c04fSmrg	[build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
3639a966c04fSmrg    [p=${PACKAGE-default}
3640a966c04fSmrg    case $enableval in
3641a966c04fSmrg    yes) enable_shared=yes ;;
3642a966c04fSmrg    no) enable_shared=no ;;
3643a966c04fSmrg    *)
3644a966c04fSmrg      enable_shared=no
3645a966c04fSmrg      # Look at the argument we got.  We use all the common list separators.
3646a966c04fSmrg      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
3647a966c04fSmrg      for pkg in $enableval; do
3648a966c04fSmrg	IFS="$lt_save_ifs"
3649a966c04fSmrg	if test "X$pkg" = "X$p"; then
3650a966c04fSmrg	  enable_shared=yes
3651a966c04fSmrg	fi
3652a966c04fSmrg      done
3653a966c04fSmrg      IFS="$lt_save_ifs"
3654a966c04fSmrg      ;;
3655a966c04fSmrg    esac],
3656a966c04fSmrg    [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
3657a966c04fSmrg])# AC_ENABLE_SHARED
3658a966c04fSmrg
3659a966c04fSmrg
3660a966c04fSmrg# AC_DISABLE_SHARED
3661a966c04fSmrg# -----------------
3662a966c04fSmrg# set the default shared flag to --disable-shared
3663a966c04fSmrgAC_DEFUN([AC_DISABLE_SHARED],
3664a966c04fSmrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3665a966c04fSmrgAC_ENABLE_SHARED(no)
3666a966c04fSmrg])# AC_DISABLE_SHARED
3667a966c04fSmrg
3668a966c04fSmrg
3669a966c04fSmrg# AC_ENABLE_STATIC([DEFAULT])
3670a966c04fSmrg# ---------------------------
3671a966c04fSmrg# implement the --enable-static flag
3672a966c04fSmrg# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
3673a966c04fSmrgAC_DEFUN([AC_ENABLE_STATIC],
3674a966c04fSmrg[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
3675a966c04fSmrgAC_ARG_ENABLE([static],
3676a966c04fSmrg    [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
3677a966c04fSmrg	[build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
3678a966c04fSmrg    [p=${PACKAGE-default}
3679a966c04fSmrg    case $enableval in
3680a966c04fSmrg    yes) enable_static=yes ;;
3681a966c04fSmrg    no) enable_static=no ;;
3682a966c04fSmrg    *)
3683a966c04fSmrg     enable_static=no
3684a966c04fSmrg      # Look at the argument we got.  We use all the common list separators.
3685a966c04fSmrg      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
3686a966c04fSmrg      for pkg in $enableval; do
3687a966c04fSmrg	IFS="$lt_save_ifs"
3688a966c04fSmrg	if test "X$pkg" = "X$p"; then
3689a966c04fSmrg	  enable_static=yes
3690a966c04fSmrg	fi
3691a966c04fSmrg      done
3692a966c04fSmrg      IFS="$lt_save_ifs"
3693a966c04fSmrg      ;;
3694a966c04fSmrg    esac],
3695a966c04fSmrg    [enable_static=]AC_ENABLE_STATIC_DEFAULT)
3696a966c04fSmrg])# AC_ENABLE_STATIC
3697a966c04fSmrg
3698a966c04fSmrg
3699a966c04fSmrg# AC_DISABLE_STATIC
3700a966c04fSmrg# -----------------
3701a966c04fSmrg# set the default static flag to --disable-static
3702a966c04fSmrgAC_DEFUN([AC_DISABLE_STATIC],
3703a966c04fSmrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3704a966c04fSmrgAC_ENABLE_STATIC(no)
3705a966c04fSmrg])# AC_DISABLE_STATIC
3706a966c04fSmrg
3707a966c04fSmrg
3708a966c04fSmrg# AC_ENABLE_FAST_INSTALL([DEFAULT])
3709a966c04fSmrg# ---------------------------------
3710a966c04fSmrg# implement the --enable-fast-install flag
3711a966c04fSmrg# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
3712a966c04fSmrgAC_DEFUN([AC_ENABLE_FAST_INSTALL],
3713a966c04fSmrg[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
3714a966c04fSmrgAC_ARG_ENABLE([fast-install],
3715a966c04fSmrg    [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
3716a966c04fSmrg    [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
3717a966c04fSmrg    [p=${PACKAGE-default}
3718a966c04fSmrg    case $enableval in
3719a966c04fSmrg    yes) enable_fast_install=yes ;;
3720a966c04fSmrg    no) enable_fast_install=no ;;
3721a966c04fSmrg    *)
3722a966c04fSmrg      enable_fast_install=no
3723a966c04fSmrg      # Look at the argument we got.  We use all the common list separators.
3724a966c04fSmrg      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
3725a966c04fSmrg      for pkg in $enableval; do
3726a966c04fSmrg	IFS="$lt_save_ifs"
3727a966c04fSmrg	if test "X$pkg" = "X$p"; then
3728a966c04fSmrg	  enable_fast_install=yes
3729a966c04fSmrg	fi
3730a966c04fSmrg      done
3731a966c04fSmrg      IFS="$lt_save_ifs"
3732a966c04fSmrg      ;;
3733a966c04fSmrg    esac],
3734a966c04fSmrg    [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
3735a966c04fSmrg])# AC_ENABLE_FAST_INSTALL
3736a966c04fSmrg
3737a966c04fSmrg
3738a966c04fSmrg# AC_DISABLE_FAST_INSTALL
3739a966c04fSmrg# -----------------------
3740a966c04fSmrg# set the default to --disable-fast-install
3741a966c04fSmrgAC_DEFUN([AC_DISABLE_FAST_INSTALL],
3742a966c04fSmrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3743a966c04fSmrgAC_ENABLE_FAST_INSTALL(no)
3744a966c04fSmrg])# AC_DISABLE_FAST_INSTALL
3745a966c04fSmrg
3746a966c04fSmrg
3747a966c04fSmrg# AC_LIBTOOL_PICMODE([MODE])
3748a966c04fSmrg# --------------------------
3749a966c04fSmrg# implement the --with-pic flag
3750a966c04fSmrg# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
3751a966c04fSmrgAC_DEFUN([AC_LIBTOOL_PICMODE],
3752a966c04fSmrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3753a966c04fSmrgpic_mode=ifelse($#,1,$1,default)
3754a966c04fSmrg])# AC_LIBTOOL_PICMODE
3755a966c04fSmrg
3756a966c04fSmrg
3757a966c04fSmrg# AC_PROG_EGREP
3758a966c04fSmrg# -------------
3759a966c04fSmrg# This is predefined starting with Autoconf 2.54, so this conditional
3760a966c04fSmrg# definition can be removed once we require Autoconf 2.54 or later.
3761a966c04fSmrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
3762a966c04fSmrg[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
3763a966c04fSmrg   [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3764a966c04fSmrg    then ac_cv_prog_egrep='grep -E'
3765a966c04fSmrg    else ac_cv_prog_egrep='egrep'
3766a966c04fSmrg    fi])
3767a966c04fSmrg EGREP=$ac_cv_prog_egrep
3768a966c04fSmrg AC_SUBST([EGREP])
3769a966c04fSmrg])])
3770a966c04fSmrg
3771a966c04fSmrg
3772a966c04fSmrg# AC_PATH_TOOL_PREFIX
3773a966c04fSmrg# -------------------
37742e2dd055Smrg# find a file program which can recognize shared library
3775a966c04fSmrgAC_DEFUN([AC_PATH_TOOL_PREFIX],
3776a966c04fSmrg[AC_REQUIRE([AC_PROG_EGREP])dnl
3777a966c04fSmrgAC_MSG_CHECKING([for $1])
3778a966c04fSmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
3779a966c04fSmrg[case $MAGIC_CMD in
3780a966c04fSmrg[[\\/*] |  ?:[\\/]*])
3781a966c04fSmrg  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
3782a966c04fSmrg  ;;
3783a966c04fSmrg*)
3784a966c04fSmrg  lt_save_MAGIC_CMD="$MAGIC_CMD"
3785a966c04fSmrg  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3786a966c04fSmrgdnl $ac_dummy forces splitting on constant user-supplied paths.
3787a966c04fSmrgdnl POSIX.2 word splitting is done only on the output of word expansions,
3788a966c04fSmrgdnl not every word.  This closes a longstanding sh security hole.
3789a966c04fSmrg  ac_dummy="ifelse([$2], , $PATH, [$2])"
3790a966c04fSmrg  for ac_dir in $ac_dummy; do
3791a966c04fSmrg    IFS="$lt_save_ifs"
3792a966c04fSmrg    test -z "$ac_dir" && ac_dir=.
3793a966c04fSmrg    if test -f $ac_dir/$1; then
3794a966c04fSmrg      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
3795a966c04fSmrg      if test -n "$file_magic_test_file"; then
3796a966c04fSmrg	case $deplibs_check_method in
3797a966c04fSmrg	"file_magic "*)
3798a966c04fSmrg	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
3799a966c04fSmrg	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3800a966c04fSmrg	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
3801a966c04fSmrg	    $EGREP "$file_magic_regex" > /dev/null; then
3802a966c04fSmrg	    :
3803a966c04fSmrg	  else
3804a966c04fSmrg	    cat <<EOF 1>&2
3805a966c04fSmrg
3806a966c04fSmrg*** Warning: the command libtool uses to detect shared libraries,
3807a966c04fSmrg*** $file_magic_cmd, produces output that libtool cannot recognize.
3808a966c04fSmrg*** The result is that libtool may fail to recognize shared libraries
3809a966c04fSmrg*** as such.  This will affect the creation of libtool libraries that
3810a966c04fSmrg*** depend on shared libraries, but programs linked with such libtool
3811a966c04fSmrg*** libraries will work regardless of this problem.  Nevertheless, you
3812a966c04fSmrg*** may want to report the problem to your system manager and/or to
3813a966c04fSmrg*** bug-libtool@gnu.org
3814a966c04fSmrg
3815a966c04fSmrgEOF
3816a966c04fSmrg	  fi ;;
3817a966c04fSmrg	esac
3818a966c04fSmrg      fi
3819a966c04fSmrg      break
3820a966c04fSmrg    fi
3821a966c04fSmrg  done
3822a966c04fSmrg  IFS="$lt_save_ifs"
3823a966c04fSmrg  MAGIC_CMD="$lt_save_MAGIC_CMD"
3824a966c04fSmrg  ;;
3825a966c04fSmrgesac])
3826a966c04fSmrgMAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3827a966c04fSmrgif test -n "$MAGIC_CMD"; then
3828a966c04fSmrg  AC_MSG_RESULT($MAGIC_CMD)
3829a966c04fSmrgelse
3830a966c04fSmrg  AC_MSG_RESULT(no)
3831a966c04fSmrgfi
3832a966c04fSmrg])# AC_PATH_TOOL_PREFIX
3833a966c04fSmrg
3834a966c04fSmrg
3835a966c04fSmrg# AC_PATH_MAGIC
3836a966c04fSmrg# -------------
38372e2dd055Smrg# find a file program which can recognize a shared library
3838a966c04fSmrgAC_DEFUN([AC_PATH_MAGIC],
3839a966c04fSmrg[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
3840a966c04fSmrgif test -z "$lt_cv_path_MAGIC_CMD"; then
3841a966c04fSmrg  if test -n "$ac_tool_prefix"; then
3842a966c04fSmrg    AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
3843a966c04fSmrg  else
3844a966c04fSmrg    MAGIC_CMD=:
3845a966c04fSmrg  fi
3846a966c04fSmrgfi
3847a966c04fSmrg])# AC_PATH_MAGIC
3848a966c04fSmrg
3849a966c04fSmrg
3850a966c04fSmrg# AC_PROG_LD
3851a966c04fSmrg# ----------
3852a966c04fSmrg# find the pathname to the GNU or non-GNU linker
3853a966c04fSmrgAC_DEFUN([AC_PROG_LD],
3854a966c04fSmrg[AC_ARG_WITH([gnu-ld],
3855a966c04fSmrg    [AC_HELP_STRING([--with-gnu-ld],
3856a966c04fSmrg	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
3857a966c04fSmrg    [test "$withval" = no || with_gnu_ld=yes],
3858a966c04fSmrg    [with_gnu_ld=no])
3859a966c04fSmrgAC_REQUIRE([LT_AC_PROG_SED])dnl
3860a966c04fSmrgAC_REQUIRE([AC_PROG_CC])dnl
3861a966c04fSmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl
3862a966c04fSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl
3863a966c04fSmrgac_prog=ld
3864a966c04fSmrgif test "$GCC" = yes; then
3865a966c04fSmrg  # Check if gcc -print-prog-name=ld gives a path.
3866a966c04fSmrg  AC_MSG_CHECKING([for ld used by $CC])
3867a966c04fSmrg  case $host in
3868a966c04fSmrg  *-*-mingw*)
3869a966c04fSmrg    # gcc leaves a trailing carriage return which upsets mingw
3870a966c04fSmrg    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3871a966c04fSmrg  *)
3872a966c04fSmrg    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3873a966c04fSmrg  esac
3874a966c04fSmrg  case $ac_prog in
3875a966c04fSmrg    # Accept absolute paths.
3876a966c04fSmrg    [[\\/]]* | ?:[[\\/]]*)
3877a966c04fSmrg      re_direlt='/[[^/]][[^/]]*/\.\./'
3878a966c04fSmrg      # Canonicalize the pathname of ld
3879a966c04fSmrg      ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
3880a966c04fSmrg      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3881a966c04fSmrg	ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
3882a966c04fSmrg      done
3883a966c04fSmrg      test -z "$LD" && LD="$ac_prog"
3884a966c04fSmrg      ;;
3885a966c04fSmrg  "")
3886a966c04fSmrg    # If it fails, then pretend we aren't using GCC.
3887a966c04fSmrg    ac_prog=ld
3888a966c04fSmrg    ;;
3889a966c04fSmrg  *)
3890a966c04fSmrg    # If it is relative, then search for the first ld in PATH.
3891a966c04fSmrg    with_gnu_ld=unknown
3892a966c04fSmrg    ;;
3893a966c04fSmrg  esac
3894a966c04fSmrgelif test "$with_gnu_ld" = yes; then
3895a966c04fSmrg  AC_MSG_CHECKING([for GNU ld])
3896a966c04fSmrgelse
3897a966c04fSmrg  AC_MSG_CHECKING([for non-GNU ld])
3898a966c04fSmrgfi
3899a966c04fSmrgAC_CACHE_VAL(lt_cv_path_LD,
3900a966c04fSmrg[if test -z "$LD"; then
3901a966c04fSmrg  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3902a966c04fSmrg  for ac_dir in $PATH; do
3903a966c04fSmrg    IFS="$lt_save_ifs"
3904a966c04fSmrg    test -z "$ac_dir" && ac_dir=.
3905a966c04fSmrg    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3906a966c04fSmrg      lt_cv_path_LD="$ac_dir/$ac_prog"
3907a966c04fSmrg      # Check to see if the program is GNU ld.  I'd rather use --version,
3908a966c04fSmrg      # but apparently some variants of GNU ld only accept -v.
3909a966c04fSmrg      # Break only if it was the GNU/non-GNU ld that we prefer.
3910a966c04fSmrg      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
3911a966c04fSmrg      *GNU* | *'with BFD'*)
3912a966c04fSmrg	test "$with_gnu_ld" != no && break
3913a966c04fSmrg	;;
3914a966c04fSmrg      *)
3915a966c04fSmrg	test "$with_gnu_ld" != yes && break
3916a966c04fSmrg	;;
3917a966c04fSmrg      esac
3918a966c04fSmrg    fi
3919a966c04fSmrg  done
3920a966c04fSmrg  IFS="$lt_save_ifs"
3921a966c04fSmrgelse
3922a966c04fSmrg  lt_cv_path_LD="$LD" # Let the user override the test with a path.
3923a966c04fSmrgfi])
3924a966c04fSmrgLD="$lt_cv_path_LD"
3925a966c04fSmrgif test -n "$LD"; then
3926a966c04fSmrg  AC_MSG_RESULT($LD)
3927a966c04fSmrgelse
3928a966c04fSmrg  AC_MSG_RESULT(no)
3929a966c04fSmrgfi
3930a966c04fSmrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
3931a966c04fSmrgAC_PROG_LD_GNU
3932a966c04fSmrg])# AC_PROG_LD
3933a966c04fSmrg
3934a966c04fSmrg
3935a966c04fSmrg# AC_PROG_LD_GNU
3936a966c04fSmrg# --------------
3937a966c04fSmrgAC_DEFUN([AC_PROG_LD_GNU],
3938a966c04fSmrg[AC_REQUIRE([AC_PROG_EGREP])dnl
3939a966c04fSmrgAC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
3940a966c04fSmrg[# I'd rather use --version here, but apparently some GNU lds only accept -v.
3941a966c04fSmrgcase `$LD -v 2>&1 </dev/null` in
3942a966c04fSmrg*GNU* | *'with BFD'*)
3943a966c04fSmrg  lt_cv_prog_gnu_ld=yes
3944a966c04fSmrg  ;;
3945a966c04fSmrg*)
3946a966c04fSmrg  lt_cv_prog_gnu_ld=no
3947a966c04fSmrg  ;;
3948a966c04fSmrgesac])
3949a966c04fSmrgwith_gnu_ld=$lt_cv_prog_gnu_ld
3950a966c04fSmrg])# AC_PROG_LD_GNU
3951a966c04fSmrg
3952a966c04fSmrg
3953a966c04fSmrg# AC_PROG_LD_RELOAD_FLAG
3954a966c04fSmrg# ----------------------
3955a966c04fSmrg# find reload flag for linker
3956a966c04fSmrg#   -- PORTME Some linkers may need a different reload flag.
3957a966c04fSmrgAC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
3958a966c04fSmrg[AC_CACHE_CHECK([for $LD option to reload object files],
3959a966c04fSmrg  lt_cv_ld_reload_flag,
3960a966c04fSmrg  [lt_cv_ld_reload_flag='-r'])
3961a966c04fSmrgreload_flag=$lt_cv_ld_reload_flag
3962a966c04fSmrgcase $reload_flag in
3963a966c04fSmrg"" | " "*) ;;
3964a966c04fSmrg*) reload_flag=" $reload_flag" ;;
3965a966c04fSmrgesac
3966a966c04fSmrgreload_cmds='$LD$reload_flag -o $output$reload_objs'
3967a966c04fSmrgcase $host_os in
3968a966c04fSmrg  darwin*)
3969a966c04fSmrg    if test "$GCC" = yes; then
3970a966c04fSmrg      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
3971a966c04fSmrg    else
3972a966c04fSmrg      reload_cmds='$LD$reload_flag -o $output$reload_objs'
3973a966c04fSmrg    fi
3974a966c04fSmrg    ;;
3975a966c04fSmrgesac
3976a966c04fSmrg])# AC_PROG_LD_RELOAD_FLAG
3977a966c04fSmrg
3978a966c04fSmrg
3979a966c04fSmrg# AC_DEPLIBS_CHECK_METHOD
3980a966c04fSmrg# -----------------------
3981a966c04fSmrg# how to check for library dependencies
3982a966c04fSmrg#  -- PORTME fill in with the dynamic library characteristics
3983a966c04fSmrgAC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
39842e2dd055Smrg[AC_CACHE_CHECK([how to recognize dependent libraries],
3985a966c04fSmrglt_cv_deplibs_check_method,
3986a966c04fSmrg[lt_cv_file_magic_cmd='$MAGIC_CMD'
3987a966c04fSmrglt_cv_file_magic_test_file=
3988a966c04fSmrglt_cv_deplibs_check_method='unknown'
3989a966c04fSmrg# Need to set the preceding variable on all platforms that support
3990a966c04fSmrg# interlibrary dependencies.
3991a966c04fSmrg# 'none' -- dependencies not supported.
3992a966c04fSmrg# `unknown' -- same as none, but documents that we really don't know.
3993a966c04fSmrg# 'pass_all' -- all dependencies passed with no checks.
3994a966c04fSmrg# 'test_compile' -- check by making test program.
3995a966c04fSmrg# 'file_magic [[regex]]' -- check by looking for files in library path
3996a966c04fSmrg# which responds to the $file_magic_cmd with a given extended regex.
3997a966c04fSmrg# If you have `file' or equivalent on your system and you're not sure
3998a966c04fSmrg# whether `pass_all' will *always* work, you probably want this one.
3999a966c04fSmrg
4000a966c04fSmrgcase $host_os in
40012e2dd055Smrgaix[[4-9]]*)
4002a966c04fSmrg  lt_cv_deplibs_check_method=pass_all
4003a966c04fSmrg  ;;
4004a966c04fSmrg
4005a966c04fSmrgbeos*)
4006a966c04fSmrg  lt_cv_deplibs_check_method=pass_all
4007a966c04fSmrg  ;;
4008a966c04fSmrg
4009a966c04fSmrgbsdi[[45]]*)
4010a966c04fSmrg  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
4011a966c04fSmrg  lt_cv_file_magic_cmd='/usr/bin/file -L'
4012a966c04fSmrg  lt_cv_file_magic_test_file=/shlib/libc.so
4013a966c04fSmrg  ;;
4014a966c04fSmrg
4015a966c04fSmrgcygwin*)
4016a966c04fSmrg  # func_win32_libid is a shell function defined in ltmain.sh
4017a966c04fSmrg  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
4018a966c04fSmrg  lt_cv_file_magic_cmd='func_win32_libid'
4019a966c04fSmrg  ;;
4020a966c04fSmrg
4021a966c04fSmrgmingw* | pw32*)
4022a966c04fSmrg  # Base MSYS/MinGW do not provide the 'file' command needed by
40232e2dd055Smrg  # func_win32_libid shell function, so use a weaker test based on 'objdump',
40242e2dd055Smrg  # unless we find 'file', for example because we are cross-compiling.
40252e2dd055Smrg  if ( file / ) >/dev/null 2>&1; then
40262e2dd055Smrg    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
40272e2dd055Smrg    lt_cv_file_magic_cmd='func_win32_libid'
40282e2dd055Smrg  else
40292e2dd055Smrg    lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
40302e2dd055Smrg    lt_cv_file_magic_cmd='$OBJDUMP -f'
40312e2dd055Smrg  fi
4032a966c04fSmrg  ;;
4033a966c04fSmrg
4034a966c04fSmrgdarwin* | rhapsody*)
4035a966c04fSmrg  lt_cv_deplibs_check_method=pass_all
4036a966c04fSmrg  ;;
4037a966c04fSmrg
40382e2dd055Smrgfreebsd* | dragonfly*)
4039a966c04fSmrg  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
4040a966c04fSmrg    case $host_cpu in
4041a966c04fSmrg    i*86 )
4042a966c04fSmrg      # Not sure whether the presence of OpenBSD here was a mistake.
4043a966c04fSmrg      # Let's accept both of them until this is cleared up.
4044a966c04fSmrg      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
4045a966c04fSmrg      lt_cv_file_magic_cmd=/usr/bin/file
4046a966c04fSmrg      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
4047a966c04fSmrg      ;;
4048a966c04fSmrg    esac
4049a966c04fSmrg  else
4050a966c04fSmrg    lt_cv_deplibs_check_method=pass_all
4051a966c04fSmrg  fi
4052a966c04fSmrg  ;;
4053a966c04fSmrg
4054a966c04fSmrggnu*)
4055a966c04fSmrg  lt_cv_deplibs_check_method=pass_all
4056a966c04fSmrg  ;;
4057a966c04fSmrg
4058a966c04fSmrghpux10.20* | hpux11*)
4059a966c04fSmrg  lt_cv_file_magic_cmd=/usr/bin/file
4060a966c04fSmrg  case $host_cpu in
4061a966c04fSmrg  ia64*)
4062a966c04fSmrg    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
4063a966c04fSmrg    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
4064a966c04fSmrg    ;;
4065a966c04fSmrg  hppa*64*)
4066a966c04fSmrg    [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]']
4067a966c04fSmrg    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
4068a966c04fSmrg    ;;
4069a966c04fSmrg  *)
4070a966c04fSmrg    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
4071a966c04fSmrg    lt_cv_file_magic_test_file=/usr/lib/libc.sl
4072a966c04fSmrg    ;;
4073a966c04fSmrg  esac
4074a966c04fSmrg  ;;
4075a966c04fSmrg
40762e2dd055Smrginterix[[3-9]]*)
4077a966c04fSmrg  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
4078a966c04fSmrg  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
4079a966c04fSmrg  ;;
4080a966c04fSmrg
4081a966c04fSmrgirix5* | irix6* | nonstopux*)
4082a966c04fSmrg  case $LD in
4083a966c04fSmrg  *-32|*"-32 ") libmagic=32-bit;;
4084a966c04fSmrg  *-n32|*"-n32 ") libmagic=N32;;
4085a966c04fSmrg  *-64|*"-64 ") libmagic=64-bit;;
4086a966c04fSmrg  *) libmagic=never-match;;
4087a966c04fSmrg  esac
4088a966c04fSmrg  lt_cv_deplibs_check_method=pass_all
4089a966c04fSmrg  ;;
4090a966c04fSmrg
4091a966c04fSmrg# This must be Linux ELF.
40922e2dd055Smrglinux* | k*bsd*-gnu)
4093a966c04fSmrg  lt_cv_deplibs_check_method=pass_all
4094a966c04fSmrg  ;;
4095a966c04fSmrg
4096a966c04fSmrgnetbsd*)
4097a966c04fSmrg  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
4098a966c04fSmrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
4099a966c04fSmrg  else
4100a966c04fSmrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
4101a966c04fSmrg  fi
4102a966c04fSmrg  ;;
4103a966c04fSmrg
4104a966c04fSmrgnewos6*)
4105a966c04fSmrg  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
4106a966c04fSmrg  lt_cv_file_magic_cmd=/usr/bin/file
4107a966c04fSmrg  lt_cv_file_magic_test_file=/usr/lib/libnls.so
4108a966c04fSmrg  ;;
4109a966c04fSmrg
4110a966c04fSmrgnto-qnx*)
4111a966c04fSmrg  lt_cv_deplibs_check_method=unknown
4112a966c04fSmrg  ;;
4113a966c04fSmrg
4114a966c04fSmrgopenbsd*)
4115a966c04fSmrg  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
4116a966c04fSmrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
4117a966c04fSmrg  else
4118a966c04fSmrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
4119a966c04fSmrg  fi
4120a966c04fSmrg  ;;
4121a966c04fSmrg
4122a966c04fSmrgosf3* | osf4* | osf5*)
4123a966c04fSmrg  lt_cv_deplibs_check_method=pass_all
4124a966c04fSmrg  ;;
4125a966c04fSmrg
41262e2dd055Smrgrdos*)
41272e2dd055Smrg  lt_cv_deplibs_check_method=pass_all
41282e2dd055Smrg  ;;
41292e2dd055Smrg
4130a966c04fSmrgsolaris*)
4131a966c04fSmrg  lt_cv_deplibs_check_method=pass_all
4132a966c04fSmrg  ;;
4133a966c04fSmrg
4134a966c04fSmrgsysv4 | sysv4.3*)
4135a966c04fSmrg  case $host_vendor in
4136a966c04fSmrg  motorola)
4137a966c04fSmrg    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]]'
4138a966c04fSmrg    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
4139a966c04fSmrg    ;;
4140a966c04fSmrg  ncr)
4141a966c04fSmrg    lt_cv_deplibs_check_method=pass_all
4142a966c04fSmrg    ;;
4143a966c04fSmrg  sequent)
4144a966c04fSmrg    lt_cv_file_magic_cmd='/bin/file'
4145a966c04fSmrg    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
4146a966c04fSmrg    ;;
4147a966c04fSmrg  sni)
4148a966c04fSmrg    lt_cv_file_magic_cmd='/bin/file'
4149a966c04fSmrg    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
4150a966c04fSmrg    lt_cv_file_magic_test_file=/lib/libc.so
4151a966c04fSmrg    ;;
4152a966c04fSmrg  siemens)
4153a966c04fSmrg    lt_cv_deplibs_check_method=pass_all
4154a966c04fSmrg    ;;
4155a966c04fSmrg  pc)
4156a966c04fSmrg    lt_cv_deplibs_check_method=pass_all
4157a966c04fSmrg    ;;
4158a966c04fSmrg  esac
4159a966c04fSmrg  ;;
4160a966c04fSmrg
4161a966c04fSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
4162a966c04fSmrg  lt_cv_deplibs_check_method=pass_all
4163a966c04fSmrg  ;;
4164a966c04fSmrgesac
4165a966c04fSmrg])
4166a966c04fSmrgfile_magic_cmd=$lt_cv_file_magic_cmd
4167a966c04fSmrgdeplibs_check_method=$lt_cv_deplibs_check_method
4168a966c04fSmrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown
4169a966c04fSmrg])# AC_DEPLIBS_CHECK_METHOD
4170a966c04fSmrg
4171a966c04fSmrg
4172a966c04fSmrg# AC_PROG_NM
4173a966c04fSmrg# ----------
4174a966c04fSmrg# find the pathname to a BSD-compatible name lister
4175a966c04fSmrgAC_DEFUN([AC_PROG_NM],
4176a966c04fSmrg[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
4177a966c04fSmrg[if test -n "$NM"; then
4178a966c04fSmrg  # Let the user override the test.
4179a966c04fSmrg  lt_cv_path_NM="$NM"
4180a966c04fSmrgelse
4181a966c04fSmrg  lt_nm_to_check="${ac_tool_prefix}nm"
41822e2dd055Smrg  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
4183a966c04fSmrg    lt_nm_to_check="$lt_nm_to_check nm"
4184a966c04fSmrg  fi
4185a966c04fSmrg  for lt_tmp_nm in $lt_nm_to_check; do
4186a966c04fSmrg    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4187a966c04fSmrg    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
4188a966c04fSmrg      IFS="$lt_save_ifs"
4189a966c04fSmrg      test -z "$ac_dir" && ac_dir=.
4190a966c04fSmrg      tmp_nm="$ac_dir/$lt_tmp_nm"
4191a966c04fSmrg      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
4192a966c04fSmrg	# Check to see if the nm accepts a BSD-compat flag.
4193a966c04fSmrg	# Adding the `sed 1q' prevents false positives on HP-UX, which says:
4194a966c04fSmrg	#   nm: unknown option "B" ignored
4195a966c04fSmrg	# Tru64's nm complains that /dev/null is an invalid object file
4196a966c04fSmrg	case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
4197a966c04fSmrg	*/dev/null* | *'Invalid file or object type'*)
4198a966c04fSmrg	  lt_cv_path_NM="$tmp_nm -B"
4199a966c04fSmrg	  break
4200a966c04fSmrg	  ;;
4201a966c04fSmrg	*)
4202a966c04fSmrg	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
4203a966c04fSmrg	  */dev/null*)
4204a966c04fSmrg	    lt_cv_path_NM="$tmp_nm -p"
4205a966c04fSmrg	    break
4206a966c04fSmrg	    ;;
4207a966c04fSmrg	  *)
4208a966c04fSmrg	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
4209a966c04fSmrg	    continue # so that we can try to find one that supports BSD flags
4210a966c04fSmrg	    ;;
4211a966c04fSmrg	  esac
4212a966c04fSmrg	  ;;
4213a966c04fSmrg	esac
4214a966c04fSmrg      fi
4215a966c04fSmrg    done
4216a966c04fSmrg    IFS="$lt_save_ifs"
4217a966c04fSmrg  done
4218a966c04fSmrg  test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
4219a966c04fSmrgfi])
4220a966c04fSmrgNM="$lt_cv_path_NM"
4221a966c04fSmrg])# AC_PROG_NM
4222a966c04fSmrg
4223a966c04fSmrg
4224a966c04fSmrg# AC_CHECK_LIBM
4225a966c04fSmrg# -------------
4226a966c04fSmrg# check for math library
4227a966c04fSmrgAC_DEFUN([AC_CHECK_LIBM],
4228a966c04fSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
4229a966c04fSmrgLIBM=
4230a966c04fSmrgcase $host in
4231a966c04fSmrg*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
4232a966c04fSmrg  # These system don't have libm, or don't need it
4233a966c04fSmrg  ;;
4234a966c04fSmrg*-ncr-sysv4.3*)
4235a966c04fSmrg  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
4236a966c04fSmrg  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
4237a966c04fSmrg  ;;
4238a966c04fSmrg*)
4239a966c04fSmrg  AC_CHECK_LIB(m, cos, LIBM="-lm")
4240a966c04fSmrg  ;;
4241a966c04fSmrgesac
4242a966c04fSmrg])# AC_CHECK_LIBM
4243a966c04fSmrg
4244a966c04fSmrg
4245a966c04fSmrg# AC_LIBLTDL_CONVENIENCE([DIRECTORY])
4246a966c04fSmrg# -----------------------------------
4247a966c04fSmrg# sets LIBLTDL to the link flags for the libltdl convenience library and
4248a966c04fSmrg# LTDLINCL to the include flags for the libltdl header and adds
4249a966c04fSmrg# --enable-ltdl-convenience to the configure arguments.  Note that
4250a966c04fSmrg# AC_CONFIG_SUBDIRS is not called here.  If DIRECTORY is not provided,
4251a966c04fSmrg# it is assumed to be `libltdl'.  LIBLTDL will be prefixed with
4252a966c04fSmrg# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/'
4253a966c04fSmrg# (note the single quotes!).  If your package is not flat and you're not
4254a966c04fSmrg# using automake, define top_builddir and top_srcdir appropriately in
4255a966c04fSmrg# the Makefiles.
4256a966c04fSmrgAC_DEFUN([AC_LIBLTDL_CONVENIENCE],
4257a966c04fSmrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
4258a966c04fSmrg  case $enable_ltdl_convenience in
4259a966c04fSmrg  no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
4260a966c04fSmrg  "") enable_ltdl_convenience=yes
4261a966c04fSmrg      ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
4262a966c04fSmrg  esac
4263a966c04fSmrg  LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
4264a966c04fSmrg  LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
4265a966c04fSmrg  # For backwards non-gettext consistent compatibility...
4266a966c04fSmrg  INCLTDL="$LTDLINCL"
4267a966c04fSmrg])# AC_LIBLTDL_CONVENIENCE
4268a966c04fSmrg
4269a966c04fSmrg
4270a966c04fSmrg# AC_LIBLTDL_INSTALLABLE([DIRECTORY])
4271a966c04fSmrg# -----------------------------------
4272a966c04fSmrg# sets LIBLTDL to the link flags for the libltdl installable library and
4273a966c04fSmrg# LTDLINCL to the include flags for the libltdl header and adds
4274a966c04fSmrg# --enable-ltdl-install to the configure arguments.  Note that
4275a966c04fSmrg# AC_CONFIG_SUBDIRS is not called here.  If DIRECTORY is not provided,
4276a966c04fSmrg# and an installed libltdl is not found, it is assumed to be `libltdl'.
4277a966c04fSmrg# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with
4278a966c04fSmrg# '${top_srcdir}/' (note the single quotes!).  If your package is not
4279a966c04fSmrg# flat and you're not using automake, define top_builddir and top_srcdir
4280a966c04fSmrg# appropriately in the Makefiles.
4281a966c04fSmrg# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
4282a966c04fSmrgAC_DEFUN([AC_LIBLTDL_INSTALLABLE],
4283a966c04fSmrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
4284a966c04fSmrg  AC_CHECK_LIB(ltdl, lt_dlinit,
4285a966c04fSmrg  [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
4286a966c04fSmrg  [if test x"$enable_ltdl_install" = xno; then
4287a966c04fSmrg     AC_MSG_WARN([libltdl not installed, but installation disabled])
4288a966c04fSmrg   else
4289a966c04fSmrg     enable_ltdl_install=yes
4290a966c04fSmrg   fi
4291a966c04fSmrg  ])
4292a966c04fSmrg  if test x"$enable_ltdl_install" = x"yes"; then
4293a966c04fSmrg    ac_configure_args="$ac_configure_args --enable-ltdl-install"
4294a966c04fSmrg    LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
4295a966c04fSmrg    LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
4296a966c04fSmrg  else
4297a966c04fSmrg    ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
4298a966c04fSmrg    LIBLTDL="-lltdl"
4299a966c04fSmrg    LTDLINCL=
4300a966c04fSmrg  fi
4301a966c04fSmrg  # For backwards non-gettext consistent compatibility...
4302a966c04fSmrg  INCLTDL="$LTDLINCL"
4303a966c04fSmrg])# AC_LIBLTDL_INSTALLABLE
4304a966c04fSmrg
4305a966c04fSmrg
4306a966c04fSmrg# AC_LIBTOOL_CXX
4307a966c04fSmrg# --------------
4308a966c04fSmrg# enable support for C++ libraries
4309a966c04fSmrgAC_DEFUN([AC_LIBTOOL_CXX],
4310a966c04fSmrg[AC_REQUIRE([_LT_AC_LANG_CXX])
4311a966c04fSmrg])# AC_LIBTOOL_CXX
4312a966c04fSmrg
4313a966c04fSmrg
4314a966c04fSmrg# _LT_AC_LANG_CXX
4315a966c04fSmrg# ---------------
4316a966c04fSmrgAC_DEFUN([_LT_AC_LANG_CXX],
4317a966c04fSmrg[AC_REQUIRE([AC_PROG_CXX])
4318a966c04fSmrgAC_REQUIRE([_LT_AC_PROG_CXXCPP])
4319a966c04fSmrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
4320a966c04fSmrg])# _LT_AC_LANG_CXX
4321a966c04fSmrg
4322a966c04fSmrg# _LT_AC_PROG_CXXCPP
4323a966c04fSmrg# ------------------
4324a966c04fSmrgAC_DEFUN([_LT_AC_PROG_CXXCPP],
4325a966c04fSmrg[
4326a966c04fSmrgAC_REQUIRE([AC_PROG_CXX])
4327a966c04fSmrgif test -n "$CXX" && ( test "X$CXX" != "Xno" &&
4328a966c04fSmrg    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
4329a966c04fSmrg    (test "X$CXX" != "Xg++"))) ; then
4330a966c04fSmrg  AC_PROG_CXXCPP
4331a966c04fSmrgfi
4332a966c04fSmrg])# _LT_AC_PROG_CXXCPP
4333a966c04fSmrg
4334a966c04fSmrg# AC_LIBTOOL_F77
4335a966c04fSmrg# --------------
4336a966c04fSmrg# enable support for Fortran 77 libraries
4337a966c04fSmrgAC_DEFUN([AC_LIBTOOL_F77],
4338a966c04fSmrg[AC_REQUIRE([_LT_AC_LANG_F77])
4339a966c04fSmrg])# AC_LIBTOOL_F77
4340a966c04fSmrg
4341a966c04fSmrg
4342a966c04fSmrg# _LT_AC_LANG_F77
4343a966c04fSmrg# ---------------
4344a966c04fSmrgAC_DEFUN([_LT_AC_LANG_F77],
4345a966c04fSmrg[AC_REQUIRE([AC_PROG_F77])
4346a966c04fSmrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
4347a966c04fSmrg])# _LT_AC_LANG_F77
4348a966c04fSmrg
4349a966c04fSmrg
4350a966c04fSmrg# AC_LIBTOOL_GCJ
4351a966c04fSmrg# --------------
4352a966c04fSmrg# enable support for GCJ libraries
4353a966c04fSmrgAC_DEFUN([AC_LIBTOOL_GCJ],
4354a966c04fSmrg[AC_REQUIRE([_LT_AC_LANG_GCJ])
4355a966c04fSmrg])# AC_LIBTOOL_GCJ
4356a966c04fSmrg
4357a966c04fSmrg
4358a966c04fSmrg# _LT_AC_LANG_GCJ
4359a966c04fSmrg# ---------------
4360a966c04fSmrgAC_DEFUN([_LT_AC_LANG_GCJ],
4361a966c04fSmrg[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
4362a966c04fSmrg  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
4363a966c04fSmrg    [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
4364a966c04fSmrg      [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
4365a966c04fSmrg	 [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
4366a966c04fSmrg	   [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
4367a966c04fSmrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
4368a966c04fSmrg])# _LT_AC_LANG_GCJ
4369a966c04fSmrg
4370a966c04fSmrg
4371a966c04fSmrg# AC_LIBTOOL_RC
4372a966c04fSmrg# -------------
4373a966c04fSmrg# enable support for Windows resource files
4374a966c04fSmrgAC_DEFUN([AC_LIBTOOL_RC],
4375a966c04fSmrg[AC_REQUIRE([LT_AC_PROG_RC])
4376a966c04fSmrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
4377a966c04fSmrg])# AC_LIBTOOL_RC
4378a966c04fSmrg
4379a966c04fSmrg
4380a966c04fSmrg# AC_LIBTOOL_LANG_C_CONFIG
4381a966c04fSmrg# ------------------------
4382a966c04fSmrg# Ensure that the configuration vars for the C compiler are
4383a966c04fSmrg# suitably defined.  Those variables are subsequently used by
4384a966c04fSmrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4385a966c04fSmrgAC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
4386a966c04fSmrgAC_DEFUN([_LT_AC_LANG_C_CONFIG],
4387a966c04fSmrg[lt_save_CC="$CC"
4388a966c04fSmrgAC_LANG_PUSH(C)
4389a966c04fSmrg
4390a966c04fSmrg# Source file extension for C test sources.
4391a966c04fSmrgac_ext=c
4392a966c04fSmrg
4393a966c04fSmrg# Object file extension for compiled C test sources.
4394a966c04fSmrgobjext=o
4395a966c04fSmrg_LT_AC_TAGVAR(objext, $1)=$objext
4396a966c04fSmrg
4397a966c04fSmrg# Code to be used in simple compile tests
43982e2dd055Smrglt_simple_compile_test_code="int some_variable = 0;"
4399a966c04fSmrg
4400a966c04fSmrg# Code to be used in simple link tests
44012e2dd055Smrglt_simple_link_test_code='int main(){return(0);}'
4402a966c04fSmrg
4403a966c04fSmrg_LT_AC_SYS_COMPILER
4404a966c04fSmrg
4405a966c04fSmrg# save warnings/boilerplate of simple test code
4406a966c04fSmrg_LT_COMPILER_BOILERPLATE
4407a966c04fSmrg_LT_LINKER_BOILERPLATE
4408a966c04fSmrg
4409a966c04fSmrgAC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
4410a966c04fSmrgAC_LIBTOOL_PROG_COMPILER_PIC($1)
4411a966c04fSmrgAC_LIBTOOL_PROG_CC_C_O($1)
4412a966c04fSmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
4413a966c04fSmrgAC_LIBTOOL_PROG_LD_SHLIBS($1)
4414a966c04fSmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
4415a966c04fSmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
4416a966c04fSmrgAC_LIBTOOL_SYS_LIB_STRIP
4417a966c04fSmrgAC_LIBTOOL_DLOPEN_SELF
4418a966c04fSmrg
4419a966c04fSmrg# Report which library types will actually be built
4420a966c04fSmrgAC_MSG_CHECKING([if libtool supports shared libraries])
4421a966c04fSmrgAC_MSG_RESULT([$can_build_shared])
4422a966c04fSmrg
4423a966c04fSmrgAC_MSG_CHECKING([whether to build shared libraries])
4424a966c04fSmrgtest "$can_build_shared" = "no" && enable_shared=no
4425a966c04fSmrg
4426a966c04fSmrg# On AIX, shared libraries and static libraries use the same namespace, and
4427a966c04fSmrg# are all built from PIC.
4428a966c04fSmrgcase $host_os in
4429a966c04fSmrgaix3*)
4430a966c04fSmrg  test "$enable_shared" = yes && enable_static=no
4431a966c04fSmrg  if test -n "$RANLIB"; then
4432a966c04fSmrg    archive_cmds="$archive_cmds~\$RANLIB \$lib"
4433a966c04fSmrg    postinstall_cmds='$RANLIB $lib'
4434a966c04fSmrg  fi
4435a966c04fSmrg  ;;
4436a966c04fSmrg
44372e2dd055Smrgaix[[4-9]]*)
4438a966c04fSmrg  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
4439a966c04fSmrg    test "$enable_shared" = yes && enable_static=no
4440a966c04fSmrg  fi
4441a966c04fSmrg    ;;
4442a966c04fSmrgesac
4443a966c04fSmrgAC_MSG_RESULT([$enable_shared])
4444a966c04fSmrg
4445a966c04fSmrgAC_MSG_CHECKING([whether to build static libraries])
4446a966c04fSmrg# Make sure either enable_shared or enable_static is yes.
4447a966c04fSmrgtest "$enable_shared" = yes || enable_static=yes
4448a966c04fSmrgAC_MSG_RESULT([$enable_static])
4449a966c04fSmrg
4450a966c04fSmrgAC_LIBTOOL_CONFIG($1)
4451a966c04fSmrg
4452a966c04fSmrgAC_LANG_POP
4453a966c04fSmrgCC="$lt_save_CC"
4454a966c04fSmrg])# AC_LIBTOOL_LANG_C_CONFIG
4455a966c04fSmrg
4456a966c04fSmrg
4457a966c04fSmrg# AC_LIBTOOL_LANG_CXX_CONFIG
4458a966c04fSmrg# --------------------------
4459a966c04fSmrg# Ensure that the configuration vars for the C compiler are
4460a966c04fSmrg# suitably defined.  Those variables are subsequently used by
4461a966c04fSmrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4462a966c04fSmrgAC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
4463a966c04fSmrgAC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
4464a966c04fSmrg[AC_LANG_PUSH(C++)
4465a966c04fSmrgAC_REQUIRE([AC_PROG_CXX])
4466a966c04fSmrgAC_REQUIRE([_LT_AC_PROG_CXXCPP])
4467a966c04fSmrg
4468a966c04fSmrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4469a966c04fSmrg_LT_AC_TAGVAR(allow_undefined_flag, $1)=
4470a966c04fSmrg_LT_AC_TAGVAR(always_export_symbols, $1)=no
4471a966c04fSmrg_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
4472a966c04fSmrg_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
4473a966c04fSmrg_LT_AC_TAGVAR(hardcode_direct, $1)=no
4474a966c04fSmrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
4475a966c04fSmrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
4476a966c04fSmrg_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
4477a966c04fSmrg_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
4478a966c04fSmrg_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
4479a966c04fSmrg_LT_AC_TAGVAR(hardcode_automatic, $1)=no
4480a966c04fSmrg_LT_AC_TAGVAR(module_cmds, $1)=
4481a966c04fSmrg_LT_AC_TAGVAR(module_expsym_cmds, $1)=
4482a966c04fSmrg_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
4483a966c04fSmrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
4484a966c04fSmrg_LT_AC_TAGVAR(no_undefined_flag, $1)=
4485a966c04fSmrg_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
4486a966c04fSmrg_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
4487a966c04fSmrg
4488a966c04fSmrg# Dependencies to place before and after the object being linked:
4489a966c04fSmrg_LT_AC_TAGVAR(predep_objects, $1)=
4490a966c04fSmrg_LT_AC_TAGVAR(postdep_objects, $1)=
4491a966c04fSmrg_LT_AC_TAGVAR(predeps, $1)=
4492a966c04fSmrg_LT_AC_TAGVAR(postdeps, $1)=
4493a966c04fSmrg_LT_AC_TAGVAR(compiler_lib_search_path, $1)=
44942e2dd055Smrg_LT_AC_TAGVAR(compiler_lib_search_dirs, $1)=
4495a966c04fSmrg
4496a966c04fSmrg# Source file extension for C++ test sources.
4497a966c04fSmrgac_ext=cpp
4498a966c04fSmrg
4499a966c04fSmrg# Object file extension for compiled C++ test sources.
4500a966c04fSmrgobjext=o
4501a966c04fSmrg_LT_AC_TAGVAR(objext, $1)=$objext
4502a966c04fSmrg
4503a966c04fSmrg# Code to be used in simple compile tests
45042e2dd055Smrglt_simple_compile_test_code="int some_variable = 0;"
4505a966c04fSmrg
4506a966c04fSmrg# Code to be used in simple link tests
45072e2dd055Smrglt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
4508a966c04fSmrg
4509a966c04fSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
4510a966c04fSmrg_LT_AC_SYS_COMPILER
4511a966c04fSmrg
4512a966c04fSmrg# save warnings/boilerplate of simple test code
4513a966c04fSmrg_LT_COMPILER_BOILERPLATE
4514a966c04fSmrg_LT_LINKER_BOILERPLATE
4515a966c04fSmrg
4516a966c04fSmrg# Allow CC to be a program name with arguments.
4517a966c04fSmrglt_save_CC=$CC
4518a966c04fSmrglt_save_LD=$LD
4519a966c04fSmrglt_save_GCC=$GCC
4520a966c04fSmrgGCC=$GXX
4521a966c04fSmrglt_save_with_gnu_ld=$with_gnu_ld
4522a966c04fSmrglt_save_path_LD=$lt_cv_path_LD
4523a966c04fSmrgif test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
4524a966c04fSmrg  lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
4525a966c04fSmrgelse
4526a966c04fSmrg  $as_unset lt_cv_prog_gnu_ld
4527a966c04fSmrgfi
4528a966c04fSmrgif test -n "${lt_cv_path_LDCXX+set}"; then
4529a966c04fSmrg  lt_cv_path_LD=$lt_cv_path_LDCXX
4530a966c04fSmrgelse
4531a966c04fSmrg  $as_unset lt_cv_path_LD
4532a966c04fSmrgfi
4533a966c04fSmrgtest -z "${LDCXX+set}" || LD=$LDCXX
4534a966c04fSmrgCC=${CXX-"c++"}
4535a966c04fSmrgcompiler=$CC
4536a966c04fSmrg_LT_AC_TAGVAR(compiler, $1)=$CC
4537a966c04fSmrg_LT_CC_BASENAME([$compiler])
4538a966c04fSmrg
4539a966c04fSmrg# We don't want -fno-exception wen compiling C++ code, so set the
4540a966c04fSmrg# no_builtin_flag separately
4541a966c04fSmrgif test "$GXX" = yes; then
4542a966c04fSmrg  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
4543a966c04fSmrgelse
4544a966c04fSmrg  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
4545a966c04fSmrgfi
4546a966c04fSmrg
4547a966c04fSmrgif test "$GXX" = yes; then
4548a966c04fSmrg  # Set up default GNU C++ configuration
4549a966c04fSmrg
4550a966c04fSmrg  AC_PROG_LD
4551a966c04fSmrg
4552a966c04fSmrg  # Check if GNU C++ uses GNU ld as the underlying linker, since the
4553a966c04fSmrg  # archiving commands below assume that GNU ld is being used.
4554a966c04fSmrg  if test "$with_gnu_ld" = yes; then
4555a966c04fSmrg    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
4556a966c04fSmrg    _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'
4557a966c04fSmrg
4558a966c04fSmrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
4559a966c04fSmrg    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4560a966c04fSmrg
4561a966c04fSmrg    # If archive_cmds runs LD, not CC, wlarc should be empty
4562a966c04fSmrg    # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
4563a966c04fSmrg    #     investigate it a little bit more. (MM)
4564a966c04fSmrg    wlarc='${wl}'
4565a966c04fSmrg
4566a966c04fSmrg    # ancient GNU ld didn't support --whole-archive et. al.
4567a966c04fSmrg    if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
4568a966c04fSmrg	grep 'no-whole-archive' > /dev/null; then
4569a966c04fSmrg      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
4570a966c04fSmrg    else
4571a966c04fSmrg      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
4572a966c04fSmrg    fi
4573a966c04fSmrg  else
4574a966c04fSmrg    with_gnu_ld=no
4575a966c04fSmrg    wlarc=
4576a966c04fSmrg
4577a966c04fSmrg    # A generic and very simple default shared library creation
4578a966c04fSmrg    # command for GNU C++ for the case where it uses the native
4579a966c04fSmrg    # linker, instead of GNU ld.  If possible, this setting should
4580a966c04fSmrg    # overridden to take advantage of the native linker features on
4581a966c04fSmrg    # the platform it is being used on.
4582a966c04fSmrg    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
4583a966c04fSmrg  fi
4584a966c04fSmrg
4585a966c04fSmrg  # Commands to make compiler produce verbose output that lists
4586a966c04fSmrg  # what "hidden" libraries, object files and flags are used when
4587a966c04fSmrg  # linking a shared library.
4588a966c04fSmrg  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
4589a966c04fSmrg
4590a966c04fSmrgelse
4591a966c04fSmrg  GXX=no
4592a966c04fSmrg  with_gnu_ld=no
4593a966c04fSmrg  wlarc=
4594a966c04fSmrgfi
4595a966c04fSmrg
4596a966c04fSmrg# PORTME: fill in a description of your system's C++ link characteristics
4597a966c04fSmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
4598a966c04fSmrg_LT_AC_TAGVAR(ld_shlibs, $1)=yes
4599a966c04fSmrgcase $host_os in
4600a966c04fSmrg  aix3*)
4601a966c04fSmrg    # FIXME: insert proper C++ library support
4602a966c04fSmrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
4603a966c04fSmrg    ;;
46042e2dd055Smrg  aix[[4-9]]*)
4605a966c04fSmrg    if test "$host_cpu" = ia64; then
4606a966c04fSmrg      # On IA64, the linker does run time linking by default, so we don't
4607a966c04fSmrg      # have to do anything special.
4608a966c04fSmrg      aix_use_runtimelinking=no
4609a966c04fSmrg      exp_sym_flag='-Bexport'
4610a966c04fSmrg      no_entry_flag=""
4611a966c04fSmrg    else
4612a966c04fSmrg      aix_use_runtimelinking=no
4613a966c04fSmrg
4614a966c04fSmrg      # Test if we are trying to use run time linking or normal
4615a966c04fSmrg      # AIX style linking. If -brtl is somewhere in LDFLAGS, we
4616a966c04fSmrg      # need to do runtime linking.
46172e2dd055Smrg      case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
4618a966c04fSmrg	for ld_flag in $LDFLAGS; do
4619a966c04fSmrg	  case $ld_flag in
4620a966c04fSmrg	  *-brtl*)
4621a966c04fSmrg	    aix_use_runtimelinking=yes
4622a966c04fSmrg	    break
4623a966c04fSmrg	    ;;
4624a966c04fSmrg	  esac
4625a966c04fSmrg	done
4626a966c04fSmrg	;;
4627a966c04fSmrg      esac
4628a966c04fSmrg
4629a966c04fSmrg      exp_sym_flag='-bexport'
4630a966c04fSmrg      no_entry_flag='-bnoentry'
4631a966c04fSmrg    fi
4632a966c04fSmrg
4633a966c04fSmrg    # When large executables or shared objects are built, AIX ld can
4634a966c04fSmrg    # have problems creating the table of contents.  If linking a library
4635a966c04fSmrg    # or program results in "error TOC overflow" add -mminimal-toc to
4636a966c04fSmrg    # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
4637a966c04fSmrg    # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
4638a966c04fSmrg
4639a966c04fSmrg    _LT_AC_TAGVAR(archive_cmds, $1)=''
4640a966c04fSmrg    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4641a966c04fSmrg    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
4642a966c04fSmrg    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4643a966c04fSmrg
4644a966c04fSmrg    if test "$GXX" = yes; then
4645a966c04fSmrg      case $host_os in aix4.[[012]]|aix4.[[012]].*)
4646a966c04fSmrg      # We only want to do this on AIX 4.2 and lower, the check
4647a966c04fSmrg      # below for broken collect2 doesn't work under 4.3+
4648a966c04fSmrg	collect2name=`${CC} -print-prog-name=collect2`
4649a966c04fSmrg	if test -f "$collect2name" && \
4650a966c04fSmrg	   strings "$collect2name" | grep resolve_lib_name >/dev/null
4651a966c04fSmrg	then
4652a966c04fSmrg	  # We have reworked collect2
46532e2dd055Smrg	  :
4654a966c04fSmrg	else
4655a966c04fSmrg	  # We have old collect2
4656a966c04fSmrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
4657a966c04fSmrg	  # It fails to find uninstalled libraries when the uninstalled
4658a966c04fSmrg	  # path is not listed in the libpath.  Setting hardcode_minus_L
4659a966c04fSmrg	  # to unsupported forces relinking
4660a966c04fSmrg	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
4661a966c04fSmrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4662a966c04fSmrg	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
4663a966c04fSmrg	fi
4664a966c04fSmrg	;;
4665a966c04fSmrg      esac
4666a966c04fSmrg      shared_flag='-shared'
4667a966c04fSmrg      if test "$aix_use_runtimelinking" = yes; then
4668a966c04fSmrg	shared_flag="$shared_flag "'${wl}-G'
4669a966c04fSmrg      fi
4670a966c04fSmrg    else
4671a966c04fSmrg      # not using gcc
4672a966c04fSmrg      if test "$host_cpu" = ia64; then
4673a966c04fSmrg	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
4674a966c04fSmrg	# chokes on -Wl,-G. The following line is correct:
4675a966c04fSmrg	shared_flag='-G'
4676a966c04fSmrg      else
4677a966c04fSmrg	if test "$aix_use_runtimelinking" = yes; then
4678a966c04fSmrg	  shared_flag='${wl}-G'
4679a966c04fSmrg	else
4680a966c04fSmrg	  shared_flag='${wl}-bM:SRE'
4681a966c04fSmrg	fi
4682a966c04fSmrg      fi
4683a966c04fSmrg    fi
4684a966c04fSmrg
4685a966c04fSmrg    # It seems that -bexpall does not export symbols beginning with
4686a966c04fSmrg    # underscore (_), so it is better to generate a list of symbols to export.
4687a966c04fSmrg    _LT_AC_TAGVAR(always_export_symbols, $1)=yes
4688a966c04fSmrg    if test "$aix_use_runtimelinking" = yes; then
4689a966c04fSmrg      # Warning - without using the other runtime loading flags (-brtl),
4690a966c04fSmrg      # -berok will link without error, but may produce a broken library.
4691a966c04fSmrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
4692a966c04fSmrg      # Determine the default libpath from the value encoded in an empty executable.
4693a966c04fSmrg      _LT_AC_SYS_LIBPATH_AIX
4694a966c04fSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
4695a966c04fSmrg
4696a966c04fSmrg      _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"
4697a966c04fSmrg     else
4698a966c04fSmrg      if test "$host_cpu" = ia64; then
4699a966c04fSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
4700a966c04fSmrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
4701a966c04fSmrg	_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"
4702a966c04fSmrg      else
4703a966c04fSmrg	# Determine the default libpath from the value encoded in an empty executable.
4704a966c04fSmrg	_LT_AC_SYS_LIBPATH_AIX
4705a966c04fSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
4706a966c04fSmrg	# Warning - without using the other run time loading flags,
4707a966c04fSmrg	# -berok will link without error, but may produce a broken library.
4708a966c04fSmrg	_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
4709a966c04fSmrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
4710a966c04fSmrg	# Exported symbols can be pulled into shared objects from archives
4711a966c04fSmrg	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
4712a966c04fSmrg	_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
4713a966c04fSmrg	# This is similar to how AIX traditionally builds its shared libraries.
4714a966c04fSmrg	_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'
4715a966c04fSmrg      fi
4716a966c04fSmrg    fi
4717a966c04fSmrg    ;;
4718a966c04fSmrg
4719a966c04fSmrg  beos*)
4720a966c04fSmrg    if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
4721a966c04fSmrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
4722a966c04fSmrg      # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
4723a966c04fSmrg      # support --undefined.  This deserves some investigation.  FIXME
4724a966c04fSmrg      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4725a966c04fSmrg    else
4726a966c04fSmrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
4727a966c04fSmrg    fi
4728a966c04fSmrg    ;;
4729a966c04fSmrg
4730a966c04fSmrg  chorus*)
4731a966c04fSmrg    case $cc_basename in
4732a966c04fSmrg      *)
4733a966c04fSmrg	# FIXME: insert proper C++ library support
4734a966c04fSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
4735a966c04fSmrg	;;
4736a966c04fSmrg    esac
4737a966c04fSmrg    ;;
4738a966c04fSmrg
4739a966c04fSmrg  cygwin* | mingw* | pw32*)
4740a966c04fSmrg    # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
4741a966c04fSmrg    # as there is no search path for DLLs.
4742a966c04fSmrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4743a966c04fSmrg    _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
4744a966c04fSmrg    _LT_AC_TAGVAR(always_export_symbols, $1)=no
4745a966c04fSmrg    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
4746a966c04fSmrg
4747a966c04fSmrg    if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
4748a966c04fSmrg      _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'
4749a966c04fSmrg      # If the export-symbols file already is a .def file (1st line
4750a966c04fSmrg      # is EXPORTS), use it as is; otherwise, prepend...
4751a966c04fSmrg      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
4752a966c04fSmrg	cp $export_symbols $output_objdir/$soname.def;
4753a966c04fSmrg      else
4754a966c04fSmrg	echo EXPORTS > $output_objdir/$soname.def;
4755a966c04fSmrg	cat $export_symbols >> $output_objdir/$soname.def;
4756a966c04fSmrg      fi~
4757a966c04fSmrg      $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'
4758a966c04fSmrg    else
4759a966c04fSmrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
4760a966c04fSmrg    fi
4761a966c04fSmrg  ;;
4762a966c04fSmrg      darwin* | rhapsody*)
4763a966c04fSmrg      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4764a966c04fSmrg      _LT_AC_TAGVAR(hardcode_direct, $1)=no
4765a966c04fSmrg      _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
4766a966c04fSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
4767a966c04fSmrg      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
4768a966c04fSmrg      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
47692e2dd055Smrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
47702e2dd055Smrg      if test "$GXX" = yes ; then
4771a966c04fSmrg      output_verbose_link_cmd='echo'
47722e2dd055Smrg      _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}"
47732e2dd055Smrg      _LT_AC_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
47742e2dd055Smrg      _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}"
47752e2dd055Smrg      _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}"
47762e2dd055Smrg      if test "$lt_cv_apple_cc_single_mod" != "yes"; then
47772e2dd055Smrg        _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}"
47782e2dd055Smrg        _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}"
4779a966c04fSmrg      fi
4780a966c04fSmrg      else
4781a966c04fSmrg      case $cc_basename in
4782a966c04fSmrg        xlc*)
4783a966c04fSmrg         output_verbose_link_cmd='echo'
47842e2dd055Smrg          _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'
4785a966c04fSmrg          _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
4786a966c04fSmrg          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
47872e2dd055Smrg          _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}'
4788a966c04fSmrg          _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}'
4789a966c04fSmrg          ;;
4790a966c04fSmrg       *)
4791a966c04fSmrg         _LT_AC_TAGVAR(ld_shlibs, $1)=no
4792a966c04fSmrg          ;;
4793a966c04fSmrg      esac
4794a966c04fSmrg      fi
4795a966c04fSmrg        ;;
4796a966c04fSmrg
4797a966c04fSmrg  dgux*)
4798a966c04fSmrg    case $cc_basename in
4799a966c04fSmrg      ec++*)
4800a966c04fSmrg	# FIXME: insert proper C++ library support
4801a966c04fSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
4802a966c04fSmrg	;;
4803a966c04fSmrg      ghcx*)
4804a966c04fSmrg	# Green Hills C++ Compiler
4805a966c04fSmrg	# FIXME: insert proper C++ library support
4806a966c04fSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
4807a966c04fSmrg	;;
4808a966c04fSmrg      *)
4809a966c04fSmrg	# FIXME: insert proper C++ library support
4810a966c04fSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
4811a966c04fSmrg	;;
4812a966c04fSmrg    esac
4813a966c04fSmrg    ;;
4814a966c04fSmrg  freebsd[[12]]*)
4815a966c04fSmrg    # C++ shared libraries reported to be fairly broken before switch to ELF
4816a966c04fSmrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
4817a966c04fSmrg    ;;
4818a966c04fSmrg  freebsd-elf*)
4819a966c04fSmrg    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4820a966c04fSmrg    ;;
48212e2dd055Smrg  freebsd* | dragonfly*)
4822a966c04fSmrg    # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
4823a966c04fSmrg    # conventions
4824a966c04fSmrg    _LT_AC_TAGVAR(ld_shlibs, $1)=yes
4825a966c04fSmrg    ;;
4826a966c04fSmrg  gnu*)
4827a966c04fSmrg    ;;
4828a966c04fSmrg  hpux9*)
4829a966c04fSmrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
4830a966c04fSmrg    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4831a966c04fSmrg    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4832a966c04fSmrg    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4833a966c04fSmrg    _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
4834a966c04fSmrg				# but as the default
4835a966c04fSmrg				# location of the library.
4836a966c04fSmrg
4837a966c04fSmrg    case $cc_basename in
4838a966c04fSmrg    CC*)
4839a966c04fSmrg      # FIXME: insert proper C++ library support
4840a966c04fSmrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
4841a966c04fSmrg      ;;
4842a966c04fSmrg    aCC*)
4843a966c04fSmrg      _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'
4844a966c04fSmrg      # Commands to make compiler produce verbose output that lists
4845a966c04fSmrg      # what "hidden" libraries, object files and flags are used when
4846a966c04fSmrg      # linking a shared library.
4847a966c04fSmrg      #
4848a966c04fSmrg      # There doesn't appear to be a way to prevent this compiler from
4849a966c04fSmrg      # explicitly linking system object files so we need to strip them
4850a966c04fSmrg      # from the output so that they don't get included in the library
4851a966c04fSmrg      # dependencies.
4852a966c04fSmrg      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'
4853a966c04fSmrg      ;;
4854a966c04fSmrg    *)
4855a966c04fSmrg      if test "$GXX" = yes; then
4856a966c04fSmrg        _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'
4857a966c04fSmrg      else
4858a966c04fSmrg        # FIXME: insert proper C++ library support
4859a966c04fSmrg        _LT_AC_TAGVAR(ld_shlibs, $1)=no
4860a966c04fSmrg      fi
4861a966c04fSmrg      ;;
4862a966c04fSmrg    esac
4863a966c04fSmrg    ;;
4864a966c04fSmrg  hpux10*|hpux11*)
4865a966c04fSmrg    if test $with_gnu_ld = no; then
4866a966c04fSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
4867a966c04fSmrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4868a966c04fSmrg
4869a966c04fSmrg      case $host_cpu in
48702e2dd055Smrg      hppa*64*|ia64*) ;;
4871a966c04fSmrg      *)
4872a966c04fSmrg	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4873a966c04fSmrg        ;;
4874a966c04fSmrg      esac
4875a966c04fSmrg    fi
4876a966c04fSmrg    case $host_cpu in
4877a966c04fSmrg    hppa*64*|ia64*)
4878a966c04fSmrg      _LT_AC_TAGVAR(hardcode_direct, $1)=no
4879a966c04fSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4880a966c04fSmrg      ;;
4881a966c04fSmrg    *)
4882a966c04fSmrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4883a966c04fSmrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
4884a966c04fSmrg					      # but as the default
4885a966c04fSmrg					      # location of the library.
4886a966c04fSmrg      ;;
4887a966c04fSmrg    esac
4888a966c04fSmrg
4889a966c04fSmrg    case $cc_basename in
4890a966c04fSmrg      CC*)
4891a966c04fSmrg	# FIXME: insert proper C++ library support
4892a966c04fSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
4893a966c04fSmrg	;;
4894a966c04fSmrg      aCC*)
4895a966c04fSmrg	case $host_cpu in
4896a966c04fSmrg	hppa*64*)
4897a966c04fSmrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
4898a966c04fSmrg	  ;;
4899a966c04fSmrg	ia64*)
4900a966c04fSmrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
4901a966c04fSmrg	  ;;
4902a966c04fSmrg	*)
4903a966c04fSmrg	  _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'
4904a966c04fSmrg	  ;;
4905a966c04fSmrg	esac
4906a966c04fSmrg	# Commands to make compiler produce verbose output that lists
4907a966c04fSmrg	# what "hidden" libraries, object files and flags are used when
4908a966c04fSmrg	# linking a shared library.
4909a966c04fSmrg	#
4910a966c04fSmrg	# There doesn't appear to be a way to prevent this compiler from
4911a966c04fSmrg	# explicitly linking system object files so we need to strip them
4912a966c04fSmrg	# from the output so that they don't get included in the library
4913a966c04fSmrg	# dependencies.
4914a966c04fSmrg	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'
4915a966c04fSmrg	;;
4916a966c04fSmrg      *)
4917a966c04fSmrg	if test "$GXX" = yes; then
4918a966c04fSmrg	  if test $with_gnu_ld = no; then
4919a966c04fSmrg	    case $host_cpu in
4920a966c04fSmrg	    hppa*64*)
4921a966c04fSmrg	      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
4922a966c04fSmrg	      ;;
4923a966c04fSmrg	    ia64*)
4924a966c04fSmrg	      _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'
4925a966c04fSmrg	      ;;
4926a966c04fSmrg	    *)
4927a966c04fSmrg	      _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'
4928a966c04fSmrg	      ;;
4929a966c04fSmrg	    esac
4930a966c04fSmrg	  fi
4931a966c04fSmrg	else
4932a966c04fSmrg	  # FIXME: insert proper C++ library support
4933a966c04fSmrg	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
4934a966c04fSmrg	fi
4935a966c04fSmrg	;;
4936a966c04fSmrg    esac
4937a966c04fSmrg    ;;
49382e2dd055Smrg  interix[[3-9]]*)
4939a966c04fSmrg    _LT_AC_TAGVAR(hardcode_direct, $1)=no
4940a966c04fSmrg    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4941a966c04fSmrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4942a966c04fSmrg    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4943a966c04fSmrg    # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
4944a966c04fSmrg    # Instead, shared libraries are loaded at an image base (0x10000000 by
4945a966c04fSmrg    # default) and relocated if they conflict, which is a slow very memory
4946a966c04fSmrg    # consuming and fragmenting process.  To avoid this, we pick a random,
4947a966c04fSmrg    # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
4948a966c04fSmrg    # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
4949a966c04fSmrg    _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'
4950a966c04fSmrg    _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'
4951a966c04fSmrg    ;;
4952a966c04fSmrg  irix5* | irix6*)
4953a966c04fSmrg    case $cc_basename in
4954a966c04fSmrg      CC*)
4955a966c04fSmrg	# SGI C++
4956a966c04fSmrg	_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'
4957a966c04fSmrg
4958a966c04fSmrg	# Archives containing C++ object files must be created using
4959a966c04fSmrg	# "CC -ar", where "CC" is the IRIX C++ compiler.  This is
4960a966c04fSmrg	# necessary to make sure instantiated templates are included
4961a966c04fSmrg	# in the archive.
4962a966c04fSmrg	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
4963a966c04fSmrg	;;
4964a966c04fSmrg      *)
4965a966c04fSmrg	if test "$GXX" = yes; then
4966a966c04fSmrg	  if test "$with_gnu_ld" = no; then
4967a966c04fSmrg	    _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'
4968a966c04fSmrg	  else
4969a966c04fSmrg	    _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'
4970a966c04fSmrg	  fi
4971a966c04fSmrg	fi
4972a966c04fSmrg	_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4973a966c04fSmrg	;;
4974a966c04fSmrg    esac
4975a966c04fSmrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4976a966c04fSmrg    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4977a966c04fSmrg    ;;
49782e2dd055Smrg  linux* | k*bsd*-gnu)
4979a966c04fSmrg    case $cc_basename in
4980a966c04fSmrg      KCC*)
4981a966c04fSmrg	# Kuck and Associates, Inc. (KAI) C++ Compiler
4982a966c04fSmrg
4983a966c04fSmrg	# KCC will only create a shared library if the output file
4984a966c04fSmrg	# ends with ".so" (or ".sl" for HP-UX), so rename the library
4985a966c04fSmrg	# to its proper name (with version) after linking.
4986a966c04fSmrg	_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'
4987a966c04fSmrg	_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'
4988a966c04fSmrg	# Commands to make compiler produce verbose output that lists
4989a966c04fSmrg	# what "hidden" libraries, object files and flags are used when
4990a966c04fSmrg	# linking a shared library.
4991a966c04fSmrg	#
4992a966c04fSmrg	# There doesn't appear to be a way to prevent this compiler from
4993a966c04fSmrg	# explicitly linking system object files so we need to strip them
4994a966c04fSmrg	# from the output so that they don't get included in the library
4995a966c04fSmrg	# dependencies.
4996a966c04fSmrg	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'
4997a966c04fSmrg
4998a966c04fSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
4999a966c04fSmrg	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5000a966c04fSmrg
5001a966c04fSmrg	# Archives containing C++ object files must be created using
5002a966c04fSmrg	# "CC -Bstatic", where "CC" is the KAI C++ compiler.
5003a966c04fSmrg	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
5004a966c04fSmrg	;;
5005a966c04fSmrg      icpc*)
5006a966c04fSmrg	# Intel C++
5007a966c04fSmrg	with_gnu_ld=yes
5008a966c04fSmrg	# version 8.0 and above of icpc choke on multiply defined symbols
5009a966c04fSmrg	# if we add $predep_objects and $postdep_objects, however 7.1 and
5010a966c04fSmrg	# earlier do not add the objects themselves.
5011a966c04fSmrg	case `$CC -V 2>&1` in
5012a966c04fSmrg	*"Version 7."*)
5013a966c04fSmrg  	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
5014a966c04fSmrg  	  _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'
5015a966c04fSmrg	  ;;
5016a966c04fSmrg	*)  # Version 8.0 or newer
5017a966c04fSmrg	  tmp_idyn=
5018a966c04fSmrg	  case $host_cpu in
5019a966c04fSmrg	    ia64*) tmp_idyn=' -i_dynamic';;
5020a966c04fSmrg	  esac
5021a966c04fSmrg  	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5022a966c04fSmrg	  _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'
5023a966c04fSmrg	  ;;
5024a966c04fSmrg	esac
5025a966c04fSmrg	_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
5026a966c04fSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5027a966c04fSmrg	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5028a966c04fSmrg	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
5029a966c04fSmrg	;;
50302e2dd055Smrg      pgCC* | pgcpp*)
5031a966c04fSmrg        # Portland Group C++ compiler
5032a966c04fSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
5033a966c04fSmrg  	_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'
5034a966c04fSmrg
5035a966c04fSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
5036a966c04fSmrg	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5037a966c04fSmrg	_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'
5038a966c04fSmrg        ;;
5039a966c04fSmrg      cxx*)
5040a966c04fSmrg	# Compaq C++
5041a966c04fSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
5042a966c04fSmrg	_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'
5043a966c04fSmrg
5044a966c04fSmrg	runpath_var=LD_RUN_PATH
5045a966c04fSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
5046a966c04fSmrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5047a966c04fSmrg
5048a966c04fSmrg	# Commands to make compiler produce verbose output that lists
5049a966c04fSmrg	# what "hidden" libraries, object files and flags are used when
5050a966c04fSmrg	# linking a shared library.
5051a966c04fSmrg	#
5052a966c04fSmrg	# There doesn't appear to be a way to prevent this compiler from
5053a966c04fSmrg	# explicitly linking system object files so we need to strip them
5054a966c04fSmrg	# from the output so that they don't get included in the library
5055a966c04fSmrg	# dependencies.
5056a966c04fSmrg	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'
5057a966c04fSmrg	;;
50582e2dd055Smrg      *)
50592e2dd055Smrg	case `$CC -V 2>&1 | sed 5q` in
50602e2dd055Smrg	*Sun\ C*)
50612e2dd055Smrg	  # Sun C++ 5.9
50622e2dd055Smrg	  _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
50632e2dd055Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
50642e2dd055Smrg	  _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'
50652e2dd055Smrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
50662e2dd055Smrg	  _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'
50672e2dd055Smrg
50682e2dd055Smrg	  # Not sure whether something based on
50692e2dd055Smrg	  # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
50702e2dd055Smrg	  # would be better.
50712e2dd055Smrg	  output_verbose_link_cmd='echo'
50722e2dd055Smrg
50732e2dd055Smrg	  # Archives containing C++ object files must be created using
50742e2dd055Smrg	  # "CC -xar", where "CC" is the Sun C++ compiler.  This is
50752e2dd055Smrg	  # necessary to make sure instantiated templates are included
50762e2dd055Smrg	  # in the archive.
50772e2dd055Smrg	  _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
50782e2dd055Smrg	  ;;
50792e2dd055Smrg	esac
50802e2dd055Smrg	;;
5081a966c04fSmrg    esac
5082a966c04fSmrg    ;;
5083a966c04fSmrg  lynxos*)
5084a966c04fSmrg    # FIXME: insert proper C++ library support
5085a966c04fSmrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
5086a966c04fSmrg    ;;
5087a966c04fSmrg  m88k*)
5088a966c04fSmrg    # FIXME: insert proper C++ library support
5089a966c04fSmrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
5090a966c04fSmrg    ;;
5091a966c04fSmrg  mvs*)
5092a966c04fSmrg    case $cc_basename in
5093a966c04fSmrg      cxx*)
5094a966c04fSmrg	# FIXME: insert proper C++ library support
5095a966c04fSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5096a966c04fSmrg	;;
5097a966c04fSmrg      *)
5098a966c04fSmrg	# FIXME: insert proper C++ library support
5099a966c04fSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5100a966c04fSmrg	;;
5101a966c04fSmrg    esac
5102a966c04fSmrg    ;;
5103a966c04fSmrg  netbsd*)
5104a966c04fSmrg    if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5105a966c04fSmrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
5106a966c04fSmrg      wlarc=
5107a966c04fSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5108a966c04fSmrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5109a966c04fSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5110a966c04fSmrg    fi
5111a966c04fSmrg    # Workaround some broken pre-1.5 toolchains
5112a966c04fSmrg    output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
5113a966c04fSmrg    ;;
5114a966c04fSmrg  openbsd2*)
5115a966c04fSmrg    # C++ shared libraries are fairly broken
5116a966c04fSmrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
5117a966c04fSmrg    ;;
5118a966c04fSmrg  openbsd*)
51192e2dd055Smrg    if test -f /usr/libexec/ld.so; then
51202e2dd055Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
51212e2dd055Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
51222e2dd055Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
51232e2dd055Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
51242e2dd055Smrg      if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
51252e2dd055Smrg	_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'
51262e2dd055Smrg	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
51272e2dd055Smrg	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
51282e2dd055Smrg      fi
51292e2dd055Smrg      output_verbose_link_cmd='echo'
51302e2dd055Smrg    else
51312e2dd055Smrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
5132a966c04fSmrg    fi
5133a966c04fSmrg    ;;
5134a966c04fSmrg  osf3*)
5135a966c04fSmrg    case $cc_basename in
5136a966c04fSmrg      KCC*)
5137a966c04fSmrg	# Kuck and Associates, Inc. (KAI) C++ Compiler
5138a966c04fSmrg
5139a966c04fSmrg	# KCC will only create a shared library if the output file
5140a966c04fSmrg	# ends with ".so" (or ".sl" for HP-UX), so rename the library
5141a966c04fSmrg	# to its proper name (with version) after linking.
5142a966c04fSmrg	_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'
5143a966c04fSmrg
5144a966c04fSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5145a966c04fSmrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5146a966c04fSmrg
5147a966c04fSmrg	# Archives containing C++ object files must be created using
5148a966c04fSmrg	# "CC -Bstatic", where "CC" is the KAI C++ compiler.
5149a966c04fSmrg	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
5150a966c04fSmrg
5151a966c04fSmrg	;;
5152a966c04fSmrg      RCC*)
5153a966c04fSmrg	# Rational C++ 2.4.1
5154a966c04fSmrg	# FIXME: insert proper C++ library support
5155a966c04fSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5156a966c04fSmrg	;;
5157a966c04fSmrg      cxx*)
5158a966c04fSmrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
5159a966c04fSmrg	_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'
5160a966c04fSmrg
5161a966c04fSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5162a966c04fSmrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5163a966c04fSmrg
5164a966c04fSmrg	# Commands to make compiler produce verbose output that lists
5165a966c04fSmrg	# what "hidden" libraries, object files and flags are used when
5166a966c04fSmrg	# linking a shared library.
5167a966c04fSmrg	#
5168a966c04fSmrg	# There doesn't appear to be a way to prevent this compiler from
5169a966c04fSmrg	# explicitly linking system object files so we need to strip them
5170a966c04fSmrg	# from the output so that they don't get included in the library
5171a966c04fSmrg	# dependencies.
5172a966c04fSmrg	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'
5173a966c04fSmrg	;;
5174a966c04fSmrg      *)
5175a966c04fSmrg	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
5176a966c04fSmrg	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
5177a966c04fSmrg	  _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'
5178a966c04fSmrg
5179a966c04fSmrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5180a966c04fSmrg	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5181a966c04fSmrg
5182a966c04fSmrg	  # Commands to make compiler produce verbose output that lists
5183a966c04fSmrg	  # what "hidden" libraries, object files and flags are used when
5184a966c04fSmrg	  # linking a shared library.
5185a966c04fSmrg	  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
5186a966c04fSmrg
5187a966c04fSmrg	else
5188a966c04fSmrg	  # FIXME: insert proper C++ library support
5189a966c04fSmrg	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
5190a966c04fSmrg	fi
5191a966c04fSmrg	;;
5192a966c04fSmrg    esac
5193a966c04fSmrg    ;;
5194a966c04fSmrg  osf4* | osf5*)
5195a966c04fSmrg    case $cc_basename in
5196a966c04fSmrg      KCC*)
5197a966c04fSmrg	# Kuck and Associates, Inc. (KAI) C++ Compiler
5198a966c04fSmrg
5199a966c04fSmrg	# KCC will only create a shared library if the output file
5200a966c04fSmrg	# ends with ".so" (or ".sl" for HP-UX), so rename the library
5201a966c04fSmrg	# to its proper name (with version) after linking.
5202a966c04fSmrg	_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'
5203a966c04fSmrg
5204a966c04fSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5205a966c04fSmrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5206a966c04fSmrg
5207a966c04fSmrg	# Archives containing C++ object files must be created using
5208a966c04fSmrg	# the KAI C++ compiler.
5209a966c04fSmrg	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
5210a966c04fSmrg	;;
5211a966c04fSmrg      RCC*)
5212a966c04fSmrg	# Rational C++ 2.4.1
5213a966c04fSmrg	# FIXME: insert proper C++ library support
5214a966c04fSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5215a966c04fSmrg	;;
5216a966c04fSmrg      cxx*)
5217a966c04fSmrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5218a966c04fSmrg	_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'
5219a966c04fSmrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
5220a966c04fSmrg	  echo "-hidden">> $lib.exp~
5221a966c04fSmrg	  $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~
5222a966c04fSmrg	  $rm $lib.exp'
5223a966c04fSmrg
5224a966c04fSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
5225a966c04fSmrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5226a966c04fSmrg
5227a966c04fSmrg	# Commands to make compiler produce verbose output that lists
5228a966c04fSmrg	# what "hidden" libraries, object files and flags are used when
5229a966c04fSmrg	# linking a shared library.
5230a966c04fSmrg	#
5231a966c04fSmrg	# There doesn't appear to be a way to prevent this compiler from
5232a966c04fSmrg	# explicitly linking system object files so we need to strip them
5233a966c04fSmrg	# from the output so that they don't get included in the library
5234a966c04fSmrg	# dependencies.
5235a966c04fSmrg	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'
5236a966c04fSmrg	;;
5237a966c04fSmrg      *)
5238a966c04fSmrg	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
5239a966c04fSmrg	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
5240a966c04fSmrg	 _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'
5241a966c04fSmrg
5242a966c04fSmrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5243a966c04fSmrg	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5244a966c04fSmrg
5245a966c04fSmrg	  # Commands to make compiler produce verbose output that lists
5246a966c04fSmrg	  # what "hidden" libraries, object files and flags are used when
5247a966c04fSmrg	  # linking a shared library.
5248a966c04fSmrg	  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
5249a966c04fSmrg
5250a966c04fSmrg	else
5251a966c04fSmrg	  # FIXME: insert proper C++ library support
5252a966c04fSmrg	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
5253a966c04fSmrg	fi
5254a966c04fSmrg	;;
5255a966c04fSmrg    esac
5256a966c04fSmrg    ;;
5257a966c04fSmrg  psos*)
5258a966c04fSmrg    # FIXME: insert proper C++ library support
5259a966c04fSmrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
5260a966c04fSmrg    ;;
5261a966c04fSmrg  sunos4*)
5262a966c04fSmrg    case $cc_basename in
5263a966c04fSmrg      CC*)
5264a966c04fSmrg	# Sun C++ 4.x
5265a966c04fSmrg	# FIXME: insert proper C++ library support
5266a966c04fSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5267a966c04fSmrg	;;
5268a966c04fSmrg      lcc*)
5269a966c04fSmrg	# Lucid
5270a966c04fSmrg	# FIXME: insert proper C++ library support
5271a966c04fSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5272a966c04fSmrg	;;
5273a966c04fSmrg      *)
5274a966c04fSmrg	# FIXME: insert proper C++ library support
5275a966c04fSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5276a966c04fSmrg	;;
5277a966c04fSmrg    esac
5278a966c04fSmrg    ;;
5279a966c04fSmrg  solaris*)
5280a966c04fSmrg    case $cc_basename in
5281a966c04fSmrg      CC*)
5282a966c04fSmrg	# Sun C++ 4.2, 5.x and Centerline C++
5283a966c04fSmrg        _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes
5284a966c04fSmrg	_LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
5285a966c04fSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
5286a966c04fSmrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5287a966c04fSmrg	$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'
5288a966c04fSmrg
5289a966c04fSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5290a966c04fSmrg	_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5291a966c04fSmrg	case $host_os in
5292a966c04fSmrg	  solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
5293a966c04fSmrg	  *)
52942e2dd055Smrg	    # The compiler driver will combine and reorder linker options,
52952e2dd055Smrg	    # but understands `-z linker_flag'.
5296a966c04fSmrg	    # Supported since Solaris 2.6 (maybe 2.5.1?)
52972e2dd055Smrg	    _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
5298a966c04fSmrg	    ;;
5299a966c04fSmrg	esac
5300a966c04fSmrg	_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
5301a966c04fSmrg
5302a966c04fSmrg	output_verbose_link_cmd='echo'
5303a966c04fSmrg
5304a966c04fSmrg	# Archives containing C++ object files must be created using
5305a966c04fSmrg	# "CC -xar", where "CC" is the Sun C++ compiler.  This is
5306a966c04fSmrg	# necessary to make sure instantiated templates are included
5307a966c04fSmrg	# in the archive.
5308a966c04fSmrg	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
5309a966c04fSmrg	;;
5310a966c04fSmrg      gcx*)
5311a966c04fSmrg	# Green Hills C++ Compiler
5312a966c04fSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
5313a966c04fSmrg
5314a966c04fSmrg	# The C++ compiler must be used to create the archive.
5315a966c04fSmrg	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
5316a966c04fSmrg	;;
5317a966c04fSmrg      *)
5318a966c04fSmrg	# GNU C++ compiler with Solaris linker
5319a966c04fSmrg	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
5320a966c04fSmrg	  _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
5321a966c04fSmrg	  if $CC --version | grep -v '^2\.7' > /dev/null; then
5322a966c04fSmrg	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
5323a966c04fSmrg	    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5324a966c04fSmrg		$CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
5325a966c04fSmrg
5326a966c04fSmrg	    # Commands to make compiler produce verbose output that lists
5327a966c04fSmrg	    # what "hidden" libraries, object files and flags are used when
5328a966c04fSmrg	    # linking a shared library.
5329a966c04fSmrg	    output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
5330a966c04fSmrg	  else
5331a966c04fSmrg	    # g++ 2.7 appears to require `-G' NOT `-shared' on this
5332a966c04fSmrg	    # platform.
5333a966c04fSmrg	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
5334a966c04fSmrg	    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5335a966c04fSmrg		$CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
5336a966c04fSmrg
5337a966c04fSmrg	    # Commands to make compiler produce verbose output that lists
5338a966c04fSmrg	    # what "hidden" libraries, object files and flags are used when
5339a966c04fSmrg	    # linking a shared library.
5340a966c04fSmrg	    output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
5341a966c04fSmrg	  fi
5342a966c04fSmrg
5343a966c04fSmrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
53442e2dd055Smrg	  case $host_os in
53452e2dd055Smrg	  solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
53462e2dd055Smrg	  *)
53472e2dd055Smrg	    _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
53482e2dd055Smrg	    ;;
53492e2dd055Smrg	  esac
5350a966c04fSmrg	fi
5351a966c04fSmrg	;;
5352a966c04fSmrg    esac
5353a966c04fSmrg    ;;
5354a966c04fSmrg  sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
5355a966c04fSmrg    _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
5356a966c04fSmrg    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
5357a966c04fSmrg    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5358a966c04fSmrg    runpath_var='LD_RUN_PATH'
5359a966c04fSmrg
5360a966c04fSmrg    case $cc_basename in
5361a966c04fSmrg      CC*)
5362a966c04fSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5363a966c04fSmrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5364a966c04fSmrg	;;
5365a966c04fSmrg      *)
5366a966c04fSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5367a966c04fSmrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5368a966c04fSmrg	;;
5369a966c04fSmrg    esac
5370a966c04fSmrg    ;;
5371a966c04fSmrg  sysv5* | sco3.2v5* | sco5v6*)
5372a966c04fSmrg    # Note: We can NOT use -z defs as we might desire, because we do not
5373a966c04fSmrg    # link with -lc, and that would cause any symbols used from libc to
5374a966c04fSmrg    # always be unresolved, which means just about no library would
5375a966c04fSmrg    # ever link correctly.  If we're not using GNU ld we use -z text
5376a966c04fSmrg    # though, which does catch some bad symbols but isn't as heavy-handed
5377a966c04fSmrg    # as -z defs.
5378a966c04fSmrg    # For security reasons, it is highly recommended that you always
5379a966c04fSmrg    # use absolute paths for naming shared libraries, and exclude the
5380a966c04fSmrg    # DT_RUNPATH tag from executables and libraries.  But doing so
5381a966c04fSmrg    # requires that you compile everything twice, which is a pain.
5382a966c04fSmrg    # So that behaviour is only enabled if SCOABSPATH is set to a
5383a966c04fSmrg    # non-empty value in the environment.  Most likely only useful for
5384a966c04fSmrg    # creating official distributions of packages.
5385a966c04fSmrg    # This is a hack until libtool officially supports absolute path
5386a966c04fSmrg    # names for shared libraries.
5387a966c04fSmrg    _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
5388a966c04fSmrg    _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
5389a966c04fSmrg    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
5390a966c04fSmrg    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5391a966c04fSmrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
5392a966c04fSmrg    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
5393a966c04fSmrg    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
5394a966c04fSmrg    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
5395a966c04fSmrg    runpath_var='LD_RUN_PATH'
5396a966c04fSmrg
5397a966c04fSmrg    case $cc_basename in
5398a966c04fSmrg      CC*)
5399a966c04fSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
5400a966c04fSmrg	_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'
5401a966c04fSmrg	;;
5402a966c04fSmrg      *)
5403a966c04fSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
5404a966c04fSmrg	_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'
5405a966c04fSmrg	;;
5406a966c04fSmrg    esac
5407a966c04fSmrg    ;;
5408a966c04fSmrg  tandem*)
5409a966c04fSmrg    case $cc_basename in
5410a966c04fSmrg      NCC*)
5411a966c04fSmrg	# NonStop-UX NCC 3.20
5412a966c04fSmrg	# FIXME: insert proper C++ library support
5413a966c04fSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5414a966c04fSmrg	;;
5415a966c04fSmrg      *)
5416a966c04fSmrg	# FIXME: insert proper C++ library support
5417a966c04fSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5418a966c04fSmrg	;;
5419a966c04fSmrg    esac
5420a966c04fSmrg    ;;
5421a966c04fSmrg  vxworks*)
5422a966c04fSmrg    # FIXME: insert proper C++ library support
5423a966c04fSmrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
5424a966c04fSmrg    ;;
5425a966c04fSmrg  *)
5426a966c04fSmrg    # FIXME: insert proper C++ library support
5427a966c04fSmrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
5428a966c04fSmrg    ;;
5429a966c04fSmrgesac
5430a966c04fSmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
5431a966c04fSmrgtest "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
5432a966c04fSmrg
5433a966c04fSmrg_LT_AC_TAGVAR(GCC, $1)="$GXX"
5434a966c04fSmrg_LT_AC_TAGVAR(LD, $1)="$LD"
5435a966c04fSmrg
5436a966c04fSmrgAC_LIBTOOL_POSTDEP_PREDEP($1)
5437a966c04fSmrgAC_LIBTOOL_PROG_COMPILER_PIC($1)
5438a966c04fSmrgAC_LIBTOOL_PROG_CC_C_O($1)
5439a966c04fSmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
5440a966c04fSmrgAC_LIBTOOL_PROG_LD_SHLIBS($1)
5441a966c04fSmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
5442a966c04fSmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
5443a966c04fSmrg
5444a966c04fSmrgAC_LIBTOOL_CONFIG($1)
5445a966c04fSmrg
5446a966c04fSmrgAC_LANG_POP
5447a966c04fSmrgCC=$lt_save_CC
5448a966c04fSmrgLDCXX=$LD
5449a966c04fSmrgLD=$lt_save_LD
5450a966c04fSmrgGCC=$lt_save_GCC
5451a966c04fSmrgwith_gnu_ldcxx=$with_gnu_ld
5452a966c04fSmrgwith_gnu_ld=$lt_save_with_gnu_ld
5453a966c04fSmrglt_cv_path_LDCXX=$lt_cv_path_LD
5454a966c04fSmrglt_cv_path_LD=$lt_save_path_LD
5455a966c04fSmrglt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
5456a966c04fSmrglt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
5457a966c04fSmrg])# AC_LIBTOOL_LANG_CXX_CONFIG
5458a966c04fSmrg
5459a966c04fSmrg# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
5460a966c04fSmrg# ------------------------------------
5461a966c04fSmrg# Figure out "hidden" library dependencies from verbose
5462a966c04fSmrg# compiler output when linking a shared library.
5463a966c04fSmrg# Parse the compiler output and extract the necessary
5464a966c04fSmrg# objects, libraries and library flags.
54652e2dd055SmrgAC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],
54662e2dd055Smrg[AC_REQUIRE([LT_AC_PROG_SED])dnl
5467a966c04fSmrgdnl we can't use the lt_simple_compile_test_code here,
5468a966c04fSmrgdnl because it contains code intended for an executable,
5469a966c04fSmrgdnl not a library.  It's possible we should let each
5470a966c04fSmrgdnl tag define a new lt_????_link_test_code variable,
5471a966c04fSmrgdnl but it's only used here...
5472a966c04fSmrgifelse([$1],[],[cat > conftest.$ac_ext <<EOF
5473a966c04fSmrgint a;
5474a966c04fSmrgvoid foo (void) { a = 0; }
5475a966c04fSmrgEOF
5476a966c04fSmrg],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
5477a966c04fSmrgclass Foo
5478a966c04fSmrg{
5479a966c04fSmrgpublic:
5480a966c04fSmrg  Foo (void) { a = 0; }
5481a966c04fSmrgprivate:
5482a966c04fSmrg  int a;
5483a966c04fSmrg};
5484a966c04fSmrgEOF
5485a966c04fSmrg],[$1],[F77],[cat > conftest.$ac_ext <<EOF
5486a966c04fSmrg      subroutine foo
5487a966c04fSmrg      implicit none
5488a966c04fSmrg      integer*4 a
5489a966c04fSmrg      a=0
5490a966c04fSmrg      return
5491a966c04fSmrg      end
5492a966c04fSmrgEOF
5493a966c04fSmrg],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
5494a966c04fSmrgpublic class foo {
5495a966c04fSmrg  private int a;
5496a966c04fSmrg  public void bar (void) {
5497a966c04fSmrg    a = 0;
5498a966c04fSmrg  }
5499a966c04fSmrg};
5500a966c04fSmrgEOF
5501a966c04fSmrg])
5502a966c04fSmrgdnl Parse the compiler output and extract the necessary
5503a966c04fSmrgdnl objects, libraries and library flags.
5504a966c04fSmrgif AC_TRY_EVAL(ac_compile); then
5505a966c04fSmrg  # Parse the compiler output and extract the necessary
5506a966c04fSmrg  # objects, libraries and library flags.
5507a966c04fSmrg
5508a966c04fSmrg  # Sentinel used to keep track of whether or not we are before
5509a966c04fSmrg  # the conftest object file.
5510a966c04fSmrg  pre_test_object_deps_done=no
5511a966c04fSmrg
5512a966c04fSmrg  # The `*' in the case matches for architectures that use `case' in
5513a966c04fSmrg  # $output_verbose_cmd can trigger glob expansion during the loop
5514a966c04fSmrg  # eval without this substitution.
5515a966c04fSmrg  output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"`
5516a966c04fSmrg
5517a966c04fSmrg  for p in `eval $output_verbose_link_cmd`; do
5518a966c04fSmrg    case $p in
5519a966c04fSmrg
5520a966c04fSmrg    -L* | -R* | -l*)
5521a966c04fSmrg       # Some compilers place space between "-{L,R}" and the path.
5522a966c04fSmrg       # Remove the space.
5523a966c04fSmrg       if test $p = "-L" \
5524a966c04fSmrg	  || test $p = "-R"; then
5525a966c04fSmrg	 prev=$p
5526a966c04fSmrg	 continue
5527a966c04fSmrg       else
5528a966c04fSmrg	 prev=
5529a966c04fSmrg       fi
5530a966c04fSmrg
5531a966c04fSmrg       if test "$pre_test_object_deps_done" = no; then
5532a966c04fSmrg	 case $p in
5533a966c04fSmrg	 -L* | -R*)
5534a966c04fSmrg	   # Internal compiler library paths should come after those
5535a966c04fSmrg	   # provided the user.  The postdeps already come after the
5536a966c04fSmrg	   # user supplied libs so there is no need to process them.
5537a966c04fSmrg	   if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
5538a966c04fSmrg	     _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
5539a966c04fSmrg	   else
5540a966c04fSmrg	     _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
5541a966c04fSmrg	   fi
5542a966c04fSmrg	   ;;
5543a966c04fSmrg	 # The "-l" case would never come before the object being
5544a966c04fSmrg	 # linked, so don't bother handling this case.
5545a966c04fSmrg	 esac
5546a966c04fSmrg       else
5547a966c04fSmrg	 if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
5548a966c04fSmrg	   _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
5549a966c04fSmrg	 else
5550a966c04fSmrg	   _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
5551a966c04fSmrg	 fi
5552a966c04fSmrg       fi
5553a966c04fSmrg       ;;
5554a966c04fSmrg
5555a966c04fSmrg    *.$objext)
5556a966c04fSmrg       # This assumes that the test object file only shows up
5557a966c04fSmrg       # once in the compiler output.
5558a966c04fSmrg       if test "$p" = "conftest.$objext"; then
5559a966c04fSmrg	 pre_test_object_deps_done=yes
5560a966c04fSmrg	 continue
5561a966c04fSmrg       fi
5562a966c04fSmrg
5563a966c04fSmrg       if test "$pre_test_object_deps_done" = no; then
5564a966c04fSmrg	 if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
5565a966c04fSmrg	   _LT_AC_TAGVAR(predep_objects, $1)="$p"
5566a966c04fSmrg	 else
5567a966c04fSmrg	   _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
5568a966c04fSmrg	 fi
5569a966c04fSmrg       else
5570a966c04fSmrg	 if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
5571a966c04fSmrg	   _LT_AC_TAGVAR(postdep_objects, $1)="$p"
5572a966c04fSmrg	 else
5573a966c04fSmrg	   _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
5574a966c04fSmrg	 fi
5575a966c04fSmrg       fi
5576a966c04fSmrg       ;;
5577a966c04fSmrg
5578a966c04fSmrg    *) ;; # Ignore the rest.
5579a966c04fSmrg
5580a966c04fSmrg    esac
5581a966c04fSmrg  done
5582a966c04fSmrg
5583a966c04fSmrg  # Clean up.
5584a966c04fSmrg  rm -f a.out a.exe
5585a966c04fSmrgelse
5586a966c04fSmrg  echo "libtool.m4: error: problem compiling $1 test program"
5587a966c04fSmrgfi
5588a966c04fSmrg
5589a966c04fSmrg$rm -f confest.$objext
5590a966c04fSmrg
55912e2dd055Smrg_LT_AC_TAGVAR(compiler_lib_search_dirs, $1)=
55922e2dd055Smrgif test -n "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
55932e2dd055Smrg  _LT_AC_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_AC_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
55942e2dd055Smrgfi
55952e2dd055Smrg
5596a966c04fSmrg# PORTME: override above test on systems where it is broken
5597a966c04fSmrgifelse([$1],[CXX],
5598a966c04fSmrg[case $host_os in
55992e2dd055Smrginterix[[3-9]]*)
5600a966c04fSmrg  # Interix 3.5 installs completely hosed .la files for C++, so rather than
5601a966c04fSmrg  # hack all around it, let's just trust "g++" to DTRT.
5602a966c04fSmrg  _LT_AC_TAGVAR(predep_objects,$1)=
5603a966c04fSmrg  _LT_AC_TAGVAR(postdep_objects,$1)=
5604a966c04fSmrg  _LT_AC_TAGVAR(postdeps,$1)=
5605a966c04fSmrg  ;;
5606a966c04fSmrg
56072e2dd055Smrglinux*)
56082e2dd055Smrg  case `$CC -V 2>&1 | sed 5q` in
56092e2dd055Smrg  *Sun\ C*)
56102e2dd055Smrg    # Sun C++ 5.9
56112e2dd055Smrg    #
56122e2dd055Smrg    # The more standards-conforming stlport4 library is
56132e2dd055Smrg    # incompatible with the Cstd library. Avoid specifying
56142e2dd055Smrg    # it if it's in CXXFLAGS. Ignore libCrun as
56152e2dd055Smrg    # -library=stlport4 depends on it.
56162e2dd055Smrg    case " $CXX $CXXFLAGS " in
56172e2dd055Smrg    *" -library=stlport4 "*)
56182e2dd055Smrg      solaris_use_stlport4=yes
56192e2dd055Smrg      ;;
56202e2dd055Smrg    esac
56212e2dd055Smrg    if test "$solaris_use_stlport4" != yes; then
56222e2dd055Smrg      _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
56232e2dd055Smrg    fi
56242e2dd055Smrg    ;;
56252e2dd055Smrg  esac
56262e2dd055Smrg  ;;
56272e2dd055Smrg
5628a966c04fSmrgsolaris*)
5629a966c04fSmrg  case $cc_basename in
5630a966c04fSmrg  CC*)
56312e2dd055Smrg    # The more standards-conforming stlport4 library is
56322e2dd055Smrg    # incompatible with the Cstd library. Avoid specifying
56332e2dd055Smrg    # it if it's in CXXFLAGS. Ignore libCrun as
56342e2dd055Smrg    # -library=stlport4 depends on it.
56352e2dd055Smrg    case " $CXX $CXXFLAGS " in
56362e2dd055Smrg    *" -library=stlport4 "*)
56372e2dd055Smrg      solaris_use_stlport4=yes
56382e2dd055Smrg      ;;
56392e2dd055Smrg    esac
56402e2dd055Smrg
5641a966c04fSmrg    # Adding this requires a known-good setup of shared libraries for
5642a966c04fSmrg    # Sun compiler versions before 5.6, else PIC objects from an old
5643a966c04fSmrg    # archive will be linked into the output, leading to subtle bugs.
56442e2dd055Smrg    if test "$solaris_use_stlport4" != yes; then
56452e2dd055Smrg      _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
56462e2dd055Smrg    fi
5647a966c04fSmrg    ;;
5648a966c04fSmrg  esac
5649a966c04fSmrg  ;;
5650a966c04fSmrgesac
5651a966c04fSmrg])
5652a966c04fSmrgcase " $_LT_AC_TAGVAR(postdeps, $1) " in
5653a966c04fSmrg*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
5654a966c04fSmrgesac
5655a966c04fSmrg])# AC_LIBTOOL_POSTDEP_PREDEP
5656a966c04fSmrg
5657a966c04fSmrg# AC_LIBTOOL_LANG_F77_CONFIG
5658a966c04fSmrg# --------------------------
5659a966c04fSmrg# Ensure that the configuration vars for the C compiler are
5660a966c04fSmrg# suitably defined.  Those variables are subsequently used by
5661a966c04fSmrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
5662a966c04fSmrgAC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
5663a966c04fSmrgAC_DEFUN([_LT_AC_LANG_F77_CONFIG],
5664a966c04fSmrg[AC_REQUIRE([AC_PROG_F77])
5665a966c04fSmrgAC_LANG_PUSH(Fortran 77)
5666a966c04fSmrg
5667a966c04fSmrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
5668a966c04fSmrg_LT_AC_TAGVAR(allow_undefined_flag, $1)=
5669a966c04fSmrg_LT_AC_TAGVAR(always_export_symbols, $1)=no
5670a966c04fSmrg_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
5671a966c04fSmrg_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
5672a966c04fSmrg_LT_AC_TAGVAR(hardcode_direct, $1)=no
5673a966c04fSmrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
5674a966c04fSmrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
5675a966c04fSmrg_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
5676a966c04fSmrg_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
5677a966c04fSmrg_LT_AC_TAGVAR(hardcode_automatic, $1)=no
5678a966c04fSmrg_LT_AC_TAGVAR(module_cmds, $1)=
5679a966c04fSmrg_LT_AC_TAGVAR(module_expsym_cmds, $1)=
5680a966c04fSmrg_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
5681a966c04fSmrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
5682a966c04fSmrg_LT_AC_TAGVAR(no_undefined_flag, $1)=
5683a966c04fSmrg_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5684a966c04fSmrg_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5685a966c04fSmrg
5686a966c04fSmrg# Source file extension for f77 test sources.
5687a966c04fSmrgac_ext=f
5688a966c04fSmrg
5689a966c04fSmrg# Object file extension for compiled f77 test sources.
5690a966c04fSmrgobjext=o
5691a966c04fSmrg_LT_AC_TAGVAR(objext, $1)=$objext
5692a966c04fSmrg
5693a966c04fSmrg# Code to be used in simple compile tests
56942e2dd055Smrglt_simple_compile_test_code="\
56952e2dd055Smrg      subroutine t
56962e2dd055Smrg      return
56972e2dd055Smrg      end
56982e2dd055Smrg"
5699a966c04fSmrg
5700a966c04fSmrg# Code to be used in simple link tests
57012e2dd055Smrglt_simple_link_test_code="\
57022e2dd055Smrg      program t
57032e2dd055Smrg      end
57042e2dd055Smrg"
5705a966c04fSmrg
5706a966c04fSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
5707a966c04fSmrg_LT_AC_SYS_COMPILER
5708a966c04fSmrg
5709a966c04fSmrg# save warnings/boilerplate of simple test code
5710a966c04fSmrg_LT_COMPILER_BOILERPLATE
5711a966c04fSmrg_LT_LINKER_BOILERPLATE
5712a966c04fSmrg
5713a966c04fSmrg# Allow CC to be a program name with arguments.
5714a966c04fSmrglt_save_CC="$CC"
5715a966c04fSmrgCC=${F77-"f77"}
5716a966c04fSmrgcompiler=$CC
5717a966c04fSmrg_LT_AC_TAGVAR(compiler, $1)=$CC
5718a966c04fSmrg_LT_CC_BASENAME([$compiler])
5719a966c04fSmrg
5720a966c04fSmrgAC_MSG_CHECKING([if libtool supports shared libraries])
5721a966c04fSmrgAC_MSG_RESULT([$can_build_shared])
5722a966c04fSmrg
5723a966c04fSmrgAC_MSG_CHECKING([whether to build shared libraries])
5724a966c04fSmrgtest "$can_build_shared" = "no" && enable_shared=no
5725a966c04fSmrg
5726a966c04fSmrg# On AIX, shared libraries and static libraries use the same namespace, and
5727a966c04fSmrg# are all built from PIC.
5728a966c04fSmrgcase $host_os in
5729a966c04fSmrgaix3*)
5730a966c04fSmrg  test "$enable_shared" = yes && enable_static=no
5731a966c04fSmrg  if test -n "$RANLIB"; then
5732a966c04fSmrg    archive_cmds="$archive_cmds~\$RANLIB \$lib"
5733a966c04fSmrg    postinstall_cmds='$RANLIB $lib'
5734a966c04fSmrg  fi
5735a966c04fSmrg  ;;
57362e2dd055Smrgaix[[4-9]]*)
5737a966c04fSmrg  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
5738a966c04fSmrg    test "$enable_shared" = yes && enable_static=no
5739a966c04fSmrg  fi
5740a966c04fSmrg  ;;
5741a966c04fSmrgesac
5742a966c04fSmrgAC_MSG_RESULT([$enable_shared])
5743a966c04fSmrg
5744a966c04fSmrgAC_MSG_CHECKING([whether to build static libraries])
5745a966c04fSmrg# Make sure either enable_shared or enable_static is yes.
5746a966c04fSmrgtest "$enable_shared" = yes || enable_static=yes
5747a966c04fSmrgAC_MSG_RESULT([$enable_static])
5748a966c04fSmrg
5749a966c04fSmrg_LT_AC_TAGVAR(GCC, $1)="$G77"
5750a966c04fSmrg_LT_AC_TAGVAR(LD, $1)="$LD"
5751a966c04fSmrg
5752a966c04fSmrgAC_LIBTOOL_PROG_COMPILER_PIC($1)
5753a966c04fSmrgAC_LIBTOOL_PROG_CC_C_O($1)
5754a966c04fSmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
5755a966c04fSmrgAC_LIBTOOL_PROG_LD_SHLIBS($1)
5756a966c04fSmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
5757a966c04fSmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
5758a966c04fSmrg
5759a966c04fSmrgAC_LIBTOOL_CONFIG($1)
5760a966c04fSmrg
5761a966c04fSmrgAC_LANG_POP
5762a966c04fSmrgCC="$lt_save_CC"
5763a966c04fSmrg])# AC_LIBTOOL_LANG_F77_CONFIG
5764a966c04fSmrg
5765a966c04fSmrg
5766a966c04fSmrg# AC_LIBTOOL_LANG_GCJ_CONFIG
5767a966c04fSmrg# --------------------------
5768a966c04fSmrg# Ensure that the configuration vars for the C compiler are
5769a966c04fSmrg# suitably defined.  Those variables are subsequently used by
5770a966c04fSmrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
5771a966c04fSmrgAC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
5772a966c04fSmrgAC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
5773a966c04fSmrg[AC_LANG_SAVE
5774a966c04fSmrg
5775a966c04fSmrg# Source file extension for Java test sources.
5776a966c04fSmrgac_ext=java
5777a966c04fSmrg
5778a966c04fSmrg# Object file extension for compiled Java test sources.
5779a966c04fSmrgobjext=o
5780a966c04fSmrg_LT_AC_TAGVAR(objext, $1)=$objext
5781a966c04fSmrg
5782a966c04fSmrg# Code to be used in simple compile tests
57832e2dd055Smrglt_simple_compile_test_code="class foo {}"
5784a966c04fSmrg
5785a966c04fSmrg# Code to be used in simple link tests
57862e2dd055Smrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
5787a966c04fSmrg
5788a966c04fSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
5789a966c04fSmrg_LT_AC_SYS_COMPILER
5790a966c04fSmrg
5791a966c04fSmrg# save warnings/boilerplate of simple test code
5792a966c04fSmrg_LT_COMPILER_BOILERPLATE
5793a966c04fSmrg_LT_LINKER_BOILERPLATE
5794a966c04fSmrg
5795a966c04fSmrg# Allow CC to be a program name with arguments.
5796a966c04fSmrglt_save_CC="$CC"
5797a966c04fSmrgCC=${GCJ-"gcj"}
5798a966c04fSmrgcompiler=$CC
5799a966c04fSmrg_LT_AC_TAGVAR(compiler, $1)=$CC
5800a966c04fSmrg_LT_CC_BASENAME([$compiler])
5801a966c04fSmrg
5802a966c04fSmrg# GCJ did not exist at the time GCC didn't implicitly link libc in.
5803a966c04fSmrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
5804a966c04fSmrg
5805a966c04fSmrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
5806a966c04fSmrg
5807a966c04fSmrgAC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
5808a966c04fSmrgAC_LIBTOOL_PROG_COMPILER_PIC($1)
5809a966c04fSmrgAC_LIBTOOL_PROG_CC_C_O($1)
5810a966c04fSmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
5811a966c04fSmrgAC_LIBTOOL_PROG_LD_SHLIBS($1)
5812a966c04fSmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
5813a966c04fSmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
5814a966c04fSmrg
5815a966c04fSmrgAC_LIBTOOL_CONFIG($1)
5816a966c04fSmrg
5817a966c04fSmrgAC_LANG_RESTORE
5818a966c04fSmrgCC="$lt_save_CC"
5819a966c04fSmrg])# AC_LIBTOOL_LANG_GCJ_CONFIG
5820a966c04fSmrg
5821a966c04fSmrg
5822a966c04fSmrg# AC_LIBTOOL_LANG_RC_CONFIG
5823a966c04fSmrg# -------------------------
5824a966c04fSmrg# Ensure that the configuration vars for the Windows resource compiler are
5825a966c04fSmrg# suitably defined.  Those variables are subsequently used by
5826a966c04fSmrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
5827a966c04fSmrgAC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
5828a966c04fSmrgAC_DEFUN([_LT_AC_LANG_RC_CONFIG],
5829a966c04fSmrg[AC_LANG_SAVE
5830a966c04fSmrg
5831a966c04fSmrg# Source file extension for RC test sources.
5832a966c04fSmrgac_ext=rc
5833a966c04fSmrg
5834a966c04fSmrg# Object file extension for compiled RC test sources.
5835a966c04fSmrgobjext=o
5836a966c04fSmrg_LT_AC_TAGVAR(objext, $1)=$objext
5837a966c04fSmrg
5838a966c04fSmrg# Code to be used in simple compile tests
58392e2dd055Smrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
5840a966c04fSmrg
5841a966c04fSmrg# Code to be used in simple link tests
5842a966c04fSmrglt_simple_link_test_code="$lt_simple_compile_test_code"
5843a966c04fSmrg
5844a966c04fSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
5845a966c04fSmrg_LT_AC_SYS_COMPILER
5846a966c04fSmrg
5847a966c04fSmrg# save warnings/boilerplate of simple test code
5848a966c04fSmrg_LT_COMPILER_BOILERPLATE
5849a966c04fSmrg_LT_LINKER_BOILERPLATE
5850a966c04fSmrg
5851a966c04fSmrg# Allow CC to be a program name with arguments.
5852a966c04fSmrglt_save_CC="$CC"
5853a966c04fSmrgCC=${RC-"windres"}
5854a966c04fSmrgcompiler=$CC
5855a966c04fSmrg_LT_AC_TAGVAR(compiler, $1)=$CC
5856a966c04fSmrg_LT_CC_BASENAME([$compiler])
5857a966c04fSmrg_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
5858a966c04fSmrg
5859a966c04fSmrgAC_LIBTOOL_CONFIG($1)
5860a966c04fSmrg
5861a966c04fSmrgAC_LANG_RESTORE
5862a966c04fSmrgCC="$lt_save_CC"
5863a966c04fSmrg])# AC_LIBTOOL_LANG_RC_CONFIG
5864a966c04fSmrg
5865a966c04fSmrg
5866a966c04fSmrg# AC_LIBTOOL_CONFIG([TAGNAME])
5867a966c04fSmrg# ----------------------------
5868a966c04fSmrg# If TAGNAME is not passed, then create an initial libtool script
5869a966c04fSmrg# with a default configuration from the untagged config vars.  Otherwise
5870a966c04fSmrg# add code to config.status for appending the configuration named by
5871a966c04fSmrg# TAGNAME from the matching tagged config vars.
5872a966c04fSmrgAC_DEFUN([AC_LIBTOOL_CONFIG],
5873a966c04fSmrg[# The else clause should only fire when bootstrapping the
5874a966c04fSmrg# libtool distribution, otherwise you forgot to ship ltmain.sh
5875a966c04fSmrg# with your package, and you will get complaints that there are
5876a966c04fSmrg# no rules to generate ltmain.sh.
5877a966c04fSmrgif test -f "$ltmain"; then
5878a966c04fSmrg  # See if we are running on zsh, and set the options which allow our commands through
5879a966c04fSmrg  # without removal of \ escapes.
5880a966c04fSmrg  if test -n "${ZSH_VERSION+set}" ; then
5881a966c04fSmrg    setopt NO_GLOB_SUBST
5882a966c04fSmrg  fi
5883a966c04fSmrg  # Now quote all the things that may contain metacharacters while being
5884a966c04fSmrg  # careful not to overquote the AC_SUBSTed values.  We take copies of the
5885a966c04fSmrg  # variables and quote the copies for generation of the libtool script.
5886a966c04fSmrg  for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
5887a966c04fSmrg    SED SHELL STRIP \
5888a966c04fSmrg    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
5889a966c04fSmrg    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
5890a966c04fSmrg    deplibs_check_method reload_flag reload_cmds need_locks \
5891a966c04fSmrg    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
5892a966c04fSmrg    lt_cv_sys_global_symbol_to_c_name_address \
5893a966c04fSmrg    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
5894a966c04fSmrg    old_postinstall_cmds old_postuninstall_cmds \
5895a966c04fSmrg    _LT_AC_TAGVAR(compiler, $1) \
5896a966c04fSmrg    _LT_AC_TAGVAR(CC, $1) \
5897a966c04fSmrg    _LT_AC_TAGVAR(LD, $1) \
5898a966c04fSmrg    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
5899a966c04fSmrg    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
5900a966c04fSmrg    _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
5901a966c04fSmrg    _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
5902a966c04fSmrg    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
5903a966c04fSmrg    _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
5904a966c04fSmrg    _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
5905a966c04fSmrg    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
5906a966c04fSmrg    _LT_AC_TAGVAR(old_archive_cmds, $1) \
5907a966c04fSmrg    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
5908a966c04fSmrg    _LT_AC_TAGVAR(predep_objects, $1) \
5909a966c04fSmrg    _LT_AC_TAGVAR(postdep_objects, $1) \
5910a966c04fSmrg    _LT_AC_TAGVAR(predeps, $1) \
5911a966c04fSmrg    _LT_AC_TAGVAR(postdeps, $1) \
5912a966c04fSmrg    _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
59132e2dd055Smrg    _LT_AC_TAGVAR(compiler_lib_search_dirs, $1) \
5914a966c04fSmrg    _LT_AC_TAGVAR(archive_cmds, $1) \
5915a966c04fSmrg    _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
5916a966c04fSmrg    _LT_AC_TAGVAR(postinstall_cmds, $1) \
5917a966c04fSmrg    _LT_AC_TAGVAR(postuninstall_cmds, $1) \
5918a966c04fSmrg    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
5919a966c04fSmrg    _LT_AC_TAGVAR(allow_undefined_flag, $1) \
5920a966c04fSmrg    _LT_AC_TAGVAR(no_undefined_flag, $1) \
5921a966c04fSmrg    _LT_AC_TAGVAR(export_symbols_cmds, $1) \
5922a966c04fSmrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
5923a966c04fSmrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
5924a966c04fSmrg    _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
5925a966c04fSmrg    _LT_AC_TAGVAR(hardcode_automatic, $1) \
5926a966c04fSmrg    _LT_AC_TAGVAR(module_cmds, $1) \
5927a966c04fSmrg    _LT_AC_TAGVAR(module_expsym_cmds, $1) \
5928a966c04fSmrg    _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
59292e2dd055Smrg    _LT_AC_TAGVAR(fix_srcfile_path, $1) \
5930a966c04fSmrg    _LT_AC_TAGVAR(exclude_expsyms, $1) \
5931a966c04fSmrg    _LT_AC_TAGVAR(include_expsyms, $1); do
5932a966c04fSmrg
5933a966c04fSmrg    case $var in
5934a966c04fSmrg    _LT_AC_TAGVAR(old_archive_cmds, $1) | \
5935a966c04fSmrg    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
5936a966c04fSmrg    _LT_AC_TAGVAR(archive_cmds, $1) | \
5937a966c04fSmrg    _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
5938a966c04fSmrg    _LT_AC_TAGVAR(module_cmds, $1) | \
5939a966c04fSmrg    _LT_AC_TAGVAR(module_expsym_cmds, $1) | \
5940a966c04fSmrg    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
5941a966c04fSmrg    _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
5942a966c04fSmrg    extract_expsyms_cmds | reload_cmds | finish_cmds | \
5943a966c04fSmrg    postinstall_cmds | postuninstall_cmds | \
5944a966c04fSmrg    old_postinstall_cmds | old_postuninstall_cmds | \
5945a966c04fSmrg    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
5946a966c04fSmrg      # Double-quote double-evaled strings.
5947a966c04fSmrg      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
5948a966c04fSmrg      ;;
5949a966c04fSmrg    *)
5950a966c04fSmrg      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
5951a966c04fSmrg      ;;
5952a966c04fSmrg    esac
5953a966c04fSmrg  done
5954a966c04fSmrg
5955a966c04fSmrg  case $lt_echo in
5956a966c04fSmrg  *'\[$]0 --fallback-echo"')
5957a966c04fSmrg    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
5958a966c04fSmrg    ;;
5959a966c04fSmrg  esac
5960a966c04fSmrg
5961a966c04fSmrgifelse([$1], [],
5962a966c04fSmrg  [cfgfile="${ofile}T"
5963a966c04fSmrg  trap "$rm \"$cfgfile\"; exit 1" 1 2 15
5964a966c04fSmrg  $rm -f "$cfgfile"
5965a966c04fSmrg  AC_MSG_NOTICE([creating $ofile])],
5966a966c04fSmrg  [cfgfile="$ofile"])
5967a966c04fSmrg
5968a966c04fSmrg  cat <<__EOF__ >> "$cfgfile"
5969a966c04fSmrgifelse([$1], [],
5970a966c04fSmrg[#! $SHELL
5971a966c04fSmrg
5972a966c04fSmrg# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
5973a966c04fSmrg# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
5974a966c04fSmrg# NOTE: Changes made to this file will be lost: look at ltmain.sh.
5975a966c04fSmrg#
59762e2dd055Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
5977a966c04fSmrg# Free Software Foundation, Inc.
5978a966c04fSmrg#
5979a966c04fSmrg# This file is part of GNU Libtool:
5980a966c04fSmrg# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
5981a966c04fSmrg#
5982a966c04fSmrg# This program is free software; you can redistribute it and/or modify
5983a966c04fSmrg# it under the terms of the GNU General Public License as published by
5984a966c04fSmrg# the Free Software Foundation; either version 2 of the License, or
5985a966c04fSmrg# (at your option) any later version.
5986a966c04fSmrg#
5987a966c04fSmrg# This program is distributed in the hope that it will be useful, but
5988a966c04fSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of
5989a966c04fSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
5990a966c04fSmrg# General Public License for more details.
5991a966c04fSmrg#
5992a966c04fSmrg# You should have received a copy of the GNU General Public License
5993a966c04fSmrg# along with this program; if not, write to the Free Software
5994a966c04fSmrg# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
5995a966c04fSmrg#
5996a966c04fSmrg# As a special exception to the GNU General Public License, if you
5997a966c04fSmrg# distribute this file as part of a program that contains a
5998a966c04fSmrg# configuration script generated by Autoconf, you may include it under
5999a966c04fSmrg# the same distribution terms that you use for the rest of that program.
6000a966c04fSmrg
6001a966c04fSmrg# A sed program that does not truncate output.
6002a966c04fSmrgSED=$lt_SED
6003a966c04fSmrg
6004a966c04fSmrg# Sed that helps us avoid accidentally triggering echo(1) options like -n.
6005a966c04fSmrgXsed="$SED -e 1s/^X//"
6006a966c04fSmrg
6007a966c04fSmrg# The HP-UX ksh and POSIX shell print the target directory to stdout
6008a966c04fSmrg# if CDPATH is set.
6009a966c04fSmrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
6010a966c04fSmrg
6011a966c04fSmrg# The names of the tagged configurations supported by this script.
6012a966c04fSmrgavailable_tags=
6013a966c04fSmrg
6014a966c04fSmrg# ### BEGIN LIBTOOL CONFIG],
6015a966c04fSmrg[# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
6016a966c04fSmrg
6017a966c04fSmrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
6018a966c04fSmrg
6019a966c04fSmrg# Shell to use when invoking shell scripts.
6020a966c04fSmrgSHELL=$lt_SHELL
6021a966c04fSmrg
6022a966c04fSmrg# Whether or not to build shared libraries.
6023a966c04fSmrgbuild_libtool_libs=$enable_shared
6024a966c04fSmrg
6025a966c04fSmrg# Whether or not to build static libraries.
6026a966c04fSmrgbuild_old_libs=$enable_static
6027a966c04fSmrg
6028a966c04fSmrg# Whether or not to add -lc for building shared libraries.
6029a966c04fSmrgbuild_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
6030a966c04fSmrg
6031a966c04fSmrg# Whether or not to disallow shared libs when runtime libs are static
6032a966c04fSmrgallow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
6033a966c04fSmrg
6034a966c04fSmrg# Whether or not to optimize for fast installation.
6035a966c04fSmrgfast_install=$enable_fast_install
6036a966c04fSmrg
6037a966c04fSmrg# The host system.
6038a966c04fSmrghost_alias=$host_alias
6039a966c04fSmrghost=$host
6040a966c04fSmrghost_os=$host_os
6041a966c04fSmrg
6042a966c04fSmrg# The build system.
6043a966c04fSmrgbuild_alias=$build_alias
6044a966c04fSmrgbuild=$build
6045a966c04fSmrgbuild_os=$build_os
6046a966c04fSmrg
6047a966c04fSmrg# An echo program that does not interpret backslashes.
6048a966c04fSmrgecho=$lt_echo
6049a966c04fSmrg
6050a966c04fSmrg# The archiver.
6051a966c04fSmrgAR=$lt_AR
6052a966c04fSmrgAR_FLAGS=$lt_AR_FLAGS
6053a966c04fSmrg
6054a966c04fSmrg# A C compiler.
6055a966c04fSmrgLTCC=$lt_LTCC
6056a966c04fSmrg
6057a966c04fSmrg# LTCC compiler flags.
6058a966c04fSmrgLTCFLAGS=$lt_LTCFLAGS
6059a966c04fSmrg
6060a966c04fSmrg# A language-specific compiler.
6061a966c04fSmrgCC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
6062a966c04fSmrg
6063a966c04fSmrg# Is the compiler the GNU C compiler?
6064a966c04fSmrgwith_gcc=$_LT_AC_TAGVAR(GCC, $1)
6065a966c04fSmrg
6066a966c04fSmrg# An ERE matcher.
6067a966c04fSmrgEGREP=$lt_EGREP
6068a966c04fSmrg
6069a966c04fSmrg# The linker used to build libraries.
6070a966c04fSmrgLD=$lt_[]_LT_AC_TAGVAR(LD, $1)
6071a966c04fSmrg
6072a966c04fSmrg# Whether we need hard or soft links.
6073a966c04fSmrgLN_S=$lt_LN_S
6074a966c04fSmrg
6075a966c04fSmrg# A BSD-compatible nm program.
6076a966c04fSmrgNM=$lt_NM
6077a966c04fSmrg
6078a966c04fSmrg# A symbol stripping program
6079a966c04fSmrgSTRIP=$lt_STRIP
6080a966c04fSmrg
6081a966c04fSmrg# Used to examine libraries when file_magic_cmd begins "file"
6082a966c04fSmrgMAGIC_CMD=$MAGIC_CMD
6083a966c04fSmrg
6084a966c04fSmrg# Used on cygwin: DLL creation program.
6085a966c04fSmrgDLLTOOL="$DLLTOOL"
6086a966c04fSmrg
6087a966c04fSmrg# Used on cygwin: object dumper.
6088a966c04fSmrgOBJDUMP="$OBJDUMP"
6089a966c04fSmrg
6090a966c04fSmrg# Used on cygwin: assembler.
6091a966c04fSmrgAS="$AS"
6092a966c04fSmrg
6093a966c04fSmrg# The name of the directory that contains temporary libtool files.
6094a966c04fSmrgobjdir=$objdir
6095a966c04fSmrg
6096a966c04fSmrg# How to create reloadable object files.
6097a966c04fSmrgreload_flag=$lt_reload_flag
6098a966c04fSmrgreload_cmds=$lt_reload_cmds
6099a966c04fSmrg
6100a966c04fSmrg# How to pass a linker flag through the compiler.
6101a966c04fSmrgwl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
6102a966c04fSmrg
6103a966c04fSmrg# Object file suffix (normally "o").
6104a966c04fSmrgobjext="$ac_objext"
6105a966c04fSmrg
6106a966c04fSmrg# Old archive suffix (normally "a").
6107a966c04fSmrglibext="$libext"
6108a966c04fSmrg
6109a966c04fSmrg# Shared library suffix (normally ".so").
6110a966c04fSmrgshrext_cmds='$shrext_cmds'
6111a966c04fSmrg
6112a966c04fSmrg# Executable file suffix (normally "").
6113a966c04fSmrgexeext="$exeext"
6114a966c04fSmrg
6115a966c04fSmrg# Additional compiler flags for building library objects.
6116a966c04fSmrgpic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
6117a966c04fSmrgpic_mode=$pic_mode
6118a966c04fSmrg
6119a966c04fSmrg# What is the maximum length of a command?
6120a966c04fSmrgmax_cmd_len=$lt_cv_sys_max_cmd_len
6121a966c04fSmrg
6122a966c04fSmrg# Does compiler simultaneously support -c and -o options?
6123a966c04fSmrgcompiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
6124a966c04fSmrg
6125a966c04fSmrg# Must we lock files when doing compilation?
6126a966c04fSmrgneed_locks=$lt_need_locks
6127a966c04fSmrg
6128a966c04fSmrg# Do we need the lib prefix for modules?
6129a966c04fSmrgneed_lib_prefix=$need_lib_prefix
6130a966c04fSmrg
6131a966c04fSmrg# Do we need a version for libraries?
6132a966c04fSmrgneed_version=$need_version
6133a966c04fSmrg
6134a966c04fSmrg# Whether dlopen is supported.
6135a966c04fSmrgdlopen_support=$enable_dlopen
6136a966c04fSmrg
6137a966c04fSmrg# Whether dlopen of programs is supported.
6138a966c04fSmrgdlopen_self=$enable_dlopen_self
6139a966c04fSmrg
6140a966c04fSmrg# Whether dlopen of statically linked programs is supported.
6141a966c04fSmrgdlopen_self_static=$enable_dlopen_self_static
6142a966c04fSmrg
6143a966c04fSmrg# Compiler flag to prevent dynamic linking.
6144a966c04fSmrglink_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
6145a966c04fSmrg
6146a966c04fSmrg# Compiler flag to turn off builtin functions.
6147a966c04fSmrgno_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
6148a966c04fSmrg
6149a966c04fSmrg# Compiler flag to allow reflexive dlopens.
6150a966c04fSmrgexport_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
6151a966c04fSmrg
6152a966c04fSmrg# Compiler flag to generate shared objects directly from archives.
6153a966c04fSmrgwhole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
6154a966c04fSmrg
6155a966c04fSmrg# Compiler flag to generate thread-safe objects.
6156a966c04fSmrgthread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
6157a966c04fSmrg
6158a966c04fSmrg# Library versioning type.
6159a966c04fSmrgversion_type=$version_type
6160a966c04fSmrg
6161a966c04fSmrg# Format of library name prefix.
6162a966c04fSmrglibname_spec=$lt_libname_spec
6163a966c04fSmrg
6164a966c04fSmrg# List of archive names.  First name is the real one, the rest are links.
6165a966c04fSmrg# The last name is the one that the linker finds with -lNAME.
6166a966c04fSmrglibrary_names_spec=$lt_library_names_spec
6167a966c04fSmrg
6168a966c04fSmrg# The coded name of the library, if different from the real name.
6169a966c04fSmrgsoname_spec=$lt_soname_spec
6170a966c04fSmrg
6171a966c04fSmrg# Commands used to build and install an old-style archive.
6172a966c04fSmrgRANLIB=$lt_RANLIB
6173a966c04fSmrgold_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
6174a966c04fSmrgold_postinstall_cmds=$lt_old_postinstall_cmds
6175a966c04fSmrgold_postuninstall_cmds=$lt_old_postuninstall_cmds
6176a966c04fSmrg
6177a966c04fSmrg# Create an old-style archive from a shared archive.
6178a966c04fSmrgold_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
6179a966c04fSmrg
6180a966c04fSmrg# Create a temporary old-style archive to link instead of a shared archive.
6181a966c04fSmrgold_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
6182a966c04fSmrg
6183a966c04fSmrg# Commands used to build and install a shared archive.
6184a966c04fSmrgarchive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
6185a966c04fSmrgarchive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
6186a966c04fSmrgpostinstall_cmds=$lt_postinstall_cmds
6187a966c04fSmrgpostuninstall_cmds=$lt_postuninstall_cmds
6188a966c04fSmrg
6189a966c04fSmrg# Commands used to build a loadable module (assumed same as above if empty)
6190a966c04fSmrgmodule_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
6191a966c04fSmrgmodule_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
6192a966c04fSmrg
6193a966c04fSmrg# Commands to strip libraries.
6194a966c04fSmrgold_striplib=$lt_old_striplib
6195a966c04fSmrgstriplib=$lt_striplib
6196a966c04fSmrg
6197a966c04fSmrg# Dependencies to place before the objects being linked to create a
6198a966c04fSmrg# shared library.
6199a966c04fSmrgpredep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
6200a966c04fSmrg
6201a966c04fSmrg# Dependencies to place after the objects being linked to create a
6202a966c04fSmrg# shared library.
6203a966c04fSmrgpostdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
6204a966c04fSmrg
6205a966c04fSmrg# Dependencies to place before the objects being linked to create a
6206a966c04fSmrg# shared library.
6207a966c04fSmrgpredeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
6208a966c04fSmrg
6209a966c04fSmrg# Dependencies to place after the objects being linked to create a
6210a966c04fSmrg# shared library.
6211a966c04fSmrgpostdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
6212a966c04fSmrg
62132e2dd055Smrg# The directories searched by this compiler when creating a shared
62142e2dd055Smrg# library
62152e2dd055Smrgcompiler_lib_search_dirs=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_dirs, $1)
62162e2dd055Smrg
6217a966c04fSmrg# The library search path used internally by the compiler when linking
6218a966c04fSmrg# a shared library.
6219a966c04fSmrgcompiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
6220a966c04fSmrg
6221a966c04fSmrg# Method to check whether dependent libraries are shared objects.
6222a966c04fSmrgdeplibs_check_method=$lt_deplibs_check_method
6223a966c04fSmrg
6224a966c04fSmrg# Command to use when deplibs_check_method == file_magic.
6225a966c04fSmrgfile_magic_cmd=$lt_file_magic_cmd
6226a966c04fSmrg
6227a966c04fSmrg# Flag that allows shared libraries with undefined symbols to be built.
6228a966c04fSmrgallow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
6229a966c04fSmrg
6230a966c04fSmrg# Flag that forces no undefined symbols.
6231a966c04fSmrgno_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
6232a966c04fSmrg
6233a966c04fSmrg# Commands used to finish a libtool library installation in a directory.
6234a966c04fSmrgfinish_cmds=$lt_finish_cmds
6235a966c04fSmrg
6236a966c04fSmrg# Same as above, but a single script fragment to be evaled but not shown.
6237a966c04fSmrgfinish_eval=$lt_finish_eval
6238a966c04fSmrg
6239a966c04fSmrg# Take the output of nm and produce a listing of raw symbols and C names.
6240a966c04fSmrgglobal_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
6241a966c04fSmrg
6242a966c04fSmrg# Transform the output of nm in a proper C declaration
6243a966c04fSmrgglobal_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
6244a966c04fSmrg
6245a966c04fSmrg# Transform the output of nm in a C name address pair
6246a966c04fSmrgglobal_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
6247a966c04fSmrg
6248a966c04fSmrg# This is the shared library runtime path variable.
6249a966c04fSmrgrunpath_var=$runpath_var
6250a966c04fSmrg
6251a966c04fSmrg# This is the shared library path variable.
6252a966c04fSmrgshlibpath_var=$shlibpath_var
6253a966c04fSmrg
6254a966c04fSmrg# Is shlibpath searched before the hard-coded library search path?
6255a966c04fSmrgshlibpath_overrides_runpath=$shlibpath_overrides_runpath
6256a966c04fSmrg
6257a966c04fSmrg# How to hardcode a shared library path into an executable.
6258a966c04fSmrghardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
6259a966c04fSmrg
6260a966c04fSmrg# Whether we should hardcode library paths into libraries.
6261a966c04fSmrghardcode_into_libs=$hardcode_into_libs
6262a966c04fSmrg
6263a966c04fSmrg# Flag to hardcode \$libdir into a binary during linking.
6264a966c04fSmrg# This must work even if \$libdir does not exist.
6265a966c04fSmrghardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
6266a966c04fSmrg
6267a966c04fSmrg# If ld is used when linking, flag to hardcode \$libdir into
6268a966c04fSmrg# a binary during linking. This must work even if \$libdir does
6269a966c04fSmrg# not exist.
6270a966c04fSmrghardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
6271a966c04fSmrg
6272a966c04fSmrg# Whether we need a single -rpath flag with a separated argument.
6273a966c04fSmrghardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
6274a966c04fSmrg
6275a966c04fSmrg# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
6276a966c04fSmrg# resulting binary.
6277a966c04fSmrghardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
6278a966c04fSmrg
6279a966c04fSmrg# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
6280a966c04fSmrg# resulting binary.
6281a966c04fSmrghardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
6282a966c04fSmrg
6283a966c04fSmrg# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
6284a966c04fSmrg# the resulting binary.
6285a966c04fSmrghardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
6286a966c04fSmrg
6287a966c04fSmrg# Set to yes if building a shared library automatically hardcodes DIR into the library
6288a966c04fSmrg# and all subsequent libraries and executables linked against it.
6289a966c04fSmrghardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)
6290a966c04fSmrg
6291a966c04fSmrg# Variables whose values should be saved in libtool wrapper scripts and
6292a966c04fSmrg# restored at relink time.
6293a966c04fSmrgvariables_saved_for_relink="$variables_saved_for_relink"
6294a966c04fSmrg
6295a966c04fSmrg# Whether libtool must link a program against all its dependency libraries.
6296a966c04fSmrglink_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
6297a966c04fSmrg
6298a966c04fSmrg# Compile-time system search path for libraries
6299a966c04fSmrgsys_lib_search_path_spec=$lt_sys_lib_search_path_spec
6300a966c04fSmrg
6301a966c04fSmrg# Run-time system search path for libraries
6302a966c04fSmrgsys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
6303a966c04fSmrg
6304a966c04fSmrg# Fix the shell variable \$srcfile for the compiler.
63052e2dd055Smrgfix_srcfile_path=$lt_fix_srcfile_path
6306a966c04fSmrg
6307a966c04fSmrg# Set to yes if exported symbols are required.
6308a966c04fSmrgalways_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
6309a966c04fSmrg
6310a966c04fSmrg# The commands to list exported symbols.
6311a966c04fSmrgexport_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
6312a966c04fSmrg
6313a966c04fSmrg# The commands to extract the exported symbol list from a shared archive.
6314a966c04fSmrgextract_expsyms_cmds=$lt_extract_expsyms_cmds
6315a966c04fSmrg
6316a966c04fSmrg# Symbols that should not be listed in the preloaded symbols.
6317a966c04fSmrgexclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
6318a966c04fSmrg
6319a966c04fSmrg# Symbols that must always be exported.
6320a966c04fSmrginclude_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
6321a966c04fSmrg
6322a966c04fSmrgifelse([$1],[],
6323a966c04fSmrg[# ### END LIBTOOL CONFIG],
6324a966c04fSmrg[# ### END LIBTOOL TAG CONFIG: $tagname])
6325a966c04fSmrg
6326a966c04fSmrg__EOF__
6327a966c04fSmrg
6328a966c04fSmrgifelse([$1],[], [
6329a966c04fSmrg  case $host_os in
6330a966c04fSmrg  aix3*)
6331a966c04fSmrg    cat <<\EOF >> "$cfgfile"
6332a966c04fSmrg
6333a966c04fSmrg# AIX sometimes has problems with the GCC collect2 program.  For some
6334a966c04fSmrg# reason, if we set the COLLECT_NAMES environment variable, the problems
6335a966c04fSmrg# vanish in a puff of smoke.
6336a966c04fSmrgif test "X${COLLECT_NAMES+set}" != Xset; then
6337a966c04fSmrg  COLLECT_NAMES=
6338a966c04fSmrg  export COLLECT_NAMES
6339a966c04fSmrgfi
6340a966c04fSmrgEOF
6341a966c04fSmrg    ;;
6342a966c04fSmrg  esac
6343a966c04fSmrg
6344a966c04fSmrg  # We use sed instead of cat because bash on DJGPP gets confused if
6345a966c04fSmrg  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
6346a966c04fSmrg  # text mode, it properly converts lines to CR/LF.  This bash problem
6347a966c04fSmrg  # is reportedly fixed, but why not run on old versions too?
6348a966c04fSmrg  sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
6349a966c04fSmrg
6350a966c04fSmrg  mv -f "$cfgfile" "$ofile" || \
6351a966c04fSmrg    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
6352a966c04fSmrg  chmod +x "$ofile"
6353a966c04fSmrg])
6354a966c04fSmrgelse
6355a966c04fSmrg  # If there is no Makefile yet, we rely on a make rule to execute
6356a966c04fSmrg  # `config.status --recheck' to rerun these tests and create the
6357a966c04fSmrg  # libtool script then.
6358a966c04fSmrg  ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
6359a966c04fSmrg  if test -f "$ltmain_in"; then
6360a966c04fSmrg    test -f Makefile && make "$ltmain"
6361a966c04fSmrg  fi
6362a966c04fSmrgfi
6363a966c04fSmrg])# AC_LIBTOOL_CONFIG
6364a966c04fSmrg
6365a966c04fSmrg
6366a966c04fSmrg# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
6367a966c04fSmrg# -------------------------------------------
6368a966c04fSmrgAC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
6369a966c04fSmrg[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
6370a966c04fSmrg
6371a966c04fSmrg_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
6372a966c04fSmrg
6373a966c04fSmrgif test "$GCC" = yes; then
6374a966c04fSmrg  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
6375a966c04fSmrg
6376a966c04fSmrg  AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
6377a966c04fSmrg    lt_cv_prog_compiler_rtti_exceptions,
6378a966c04fSmrg    [-fno-rtti -fno-exceptions], [],
6379a966c04fSmrg    [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
6380a966c04fSmrgfi
6381a966c04fSmrg])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
6382a966c04fSmrg
6383a966c04fSmrg
6384a966c04fSmrg# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
6385a966c04fSmrg# ---------------------------------
6386a966c04fSmrgAC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
6387a966c04fSmrg[AC_REQUIRE([AC_CANONICAL_HOST])
63882e2dd055SmrgAC_REQUIRE([LT_AC_PROG_SED])
6389a966c04fSmrgAC_REQUIRE([AC_PROG_NM])
6390a966c04fSmrgAC_REQUIRE([AC_OBJEXT])
6391a966c04fSmrg# Check for command to grab the raw symbol name followed by C symbol from nm.
6392a966c04fSmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object])
6393a966c04fSmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
6394a966c04fSmrg[
6395a966c04fSmrg# These are sane defaults that work on at least a few old systems.
6396a966c04fSmrg# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
6397a966c04fSmrg
6398a966c04fSmrg# Character class describing NM global symbol codes.
6399a966c04fSmrgsymcode='[[BCDEGRST]]'
6400a966c04fSmrg
6401a966c04fSmrg# Regexp to match symbols that can be accessed directly from C.
6402a966c04fSmrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
6403a966c04fSmrg
6404a966c04fSmrg# Transform an extracted symbol line into a proper C declaration
6405a966c04fSmrglt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
6406a966c04fSmrg
6407a966c04fSmrg# Transform an extracted symbol line into symbol name and symbol address
6408a966c04fSmrglt_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'"
6409a966c04fSmrg
6410a966c04fSmrg# Define system-specific variables.
6411a966c04fSmrgcase $host_os in
6412a966c04fSmrgaix*)
6413a966c04fSmrg  symcode='[[BCDT]]'
6414a966c04fSmrg  ;;
6415a966c04fSmrgcygwin* | mingw* | pw32*)
6416a966c04fSmrg  symcode='[[ABCDGISTW]]'
6417a966c04fSmrg  ;;
6418a966c04fSmrghpux*) # Its linker distinguishes data from code symbols
6419a966c04fSmrg  if test "$host_cpu" = ia64; then
6420a966c04fSmrg    symcode='[[ABCDEGRST]]'
6421a966c04fSmrg  fi
6422a966c04fSmrg  lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
6423a966c04fSmrg  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'"
6424a966c04fSmrg  ;;
64252e2dd055Smrglinux* | k*bsd*-gnu)
6426a966c04fSmrg  if test "$host_cpu" = ia64; then
6427a966c04fSmrg    symcode='[[ABCDGIRSTW]]'
6428a966c04fSmrg    lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
6429a966c04fSmrg    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'"
6430a966c04fSmrg  fi
6431a966c04fSmrg  ;;
6432a966c04fSmrgirix* | nonstopux*)
6433a966c04fSmrg  symcode='[[BCDEGRST]]'
6434a966c04fSmrg  ;;
6435a966c04fSmrgosf*)
6436a966c04fSmrg  symcode='[[BCDEGQRST]]'
6437a966c04fSmrg  ;;
6438a966c04fSmrgsolaris*)
6439a966c04fSmrg  symcode='[[BDRT]]'
6440a966c04fSmrg  ;;
6441a966c04fSmrgsco3.2v5*)
6442a966c04fSmrg  symcode='[[DT]]'
6443a966c04fSmrg  ;;
6444a966c04fSmrgsysv4.2uw2*)
6445a966c04fSmrg  symcode='[[DT]]'
6446a966c04fSmrg  ;;
6447a966c04fSmrgsysv5* | sco5v6* | unixware* | OpenUNIX*)
6448a966c04fSmrg  symcode='[[ABDT]]'
6449a966c04fSmrg  ;;
6450a966c04fSmrgsysv4)
6451a966c04fSmrg  symcode='[[DFNSTU]]'
6452a966c04fSmrg  ;;
6453a966c04fSmrgesac
6454a966c04fSmrg
6455a966c04fSmrg# Handle CRLF in mingw tool chain
6456a966c04fSmrgopt_cr=
6457a966c04fSmrgcase $build_os in
6458a966c04fSmrgmingw*)
6459a966c04fSmrg  opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
6460a966c04fSmrg  ;;
6461a966c04fSmrgesac
6462a966c04fSmrg
6463a966c04fSmrg# If we're using GNU nm, then use its standard symbol codes.
6464a966c04fSmrgcase `$NM -V 2>&1` in
6465a966c04fSmrg*GNU* | *'with BFD'*)
6466a966c04fSmrg  symcode='[[ABCDGIRSTW]]' ;;
6467a966c04fSmrgesac
6468a966c04fSmrg
6469a966c04fSmrg# Try without a prefix undercore, then with it.
6470a966c04fSmrgfor ac_symprfx in "" "_"; do
6471a966c04fSmrg
6472a966c04fSmrg  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
6473a966c04fSmrg  symxfrm="\\1 $ac_symprfx\\2 \\2"
6474a966c04fSmrg
6475a966c04fSmrg  # Write the raw and C identifiers.
6476a966c04fSmrg  lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ 	]]\($symcode$symcode*\)[[ 	]][[ 	]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
6477a966c04fSmrg
6478a966c04fSmrg  # Check to see that the pipe works correctly.
6479a966c04fSmrg  pipe_works=no
6480a966c04fSmrg
6481a966c04fSmrg  rm -f conftest*
6482a966c04fSmrg  cat > conftest.$ac_ext <<EOF
6483a966c04fSmrg#ifdef __cplusplus
6484a966c04fSmrgextern "C" {
6485a966c04fSmrg#endif
6486a966c04fSmrgchar nm_test_var;
6487a966c04fSmrgvoid nm_test_func(){}
6488a966c04fSmrg#ifdef __cplusplus
6489a966c04fSmrg}
6490a966c04fSmrg#endif
6491a966c04fSmrgint main(){nm_test_var='a';nm_test_func();return(0);}
6492a966c04fSmrgEOF
6493a966c04fSmrg
6494a966c04fSmrg  if AC_TRY_EVAL(ac_compile); then
6495a966c04fSmrg    # Now try to grab the symbols.
6496a966c04fSmrg    nlist=conftest.nm
6497a966c04fSmrg    if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
6498a966c04fSmrg      # Try sorting and uniquifying the output.
6499a966c04fSmrg      if sort "$nlist" | uniq > "$nlist"T; then
6500a966c04fSmrg	mv -f "$nlist"T "$nlist"
6501a966c04fSmrg      else
6502a966c04fSmrg	rm -f "$nlist"T
6503a966c04fSmrg      fi
6504a966c04fSmrg
6505a966c04fSmrg      # Make sure that we snagged all the symbols we need.
6506a966c04fSmrg      if grep ' nm_test_var$' "$nlist" >/dev/null; then
6507a966c04fSmrg	if grep ' nm_test_func$' "$nlist" >/dev/null; then
6508a966c04fSmrg	  cat <<EOF > conftest.$ac_ext
6509a966c04fSmrg#ifdef __cplusplus
6510a966c04fSmrgextern "C" {
6511a966c04fSmrg#endif
6512a966c04fSmrg
6513a966c04fSmrgEOF
6514a966c04fSmrg	  # Now generate the symbol file.
6515a966c04fSmrg	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
6516a966c04fSmrg
6517a966c04fSmrg	  cat <<EOF >> conftest.$ac_ext
6518a966c04fSmrg#if defined (__STDC__) && __STDC__
6519a966c04fSmrg# define lt_ptr_t void *
6520a966c04fSmrg#else
6521a966c04fSmrg# define lt_ptr_t char *
6522a966c04fSmrg# define const
6523a966c04fSmrg#endif
6524a966c04fSmrg
6525a966c04fSmrg/* The mapping between symbol names and symbols. */
6526a966c04fSmrgconst struct {
6527a966c04fSmrg  const char *name;
6528a966c04fSmrg  lt_ptr_t address;
6529a966c04fSmrg}
6530a966c04fSmrglt_preloaded_symbols[[]] =
6531a966c04fSmrg{
6532a966c04fSmrgEOF
6533a966c04fSmrg	  $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
6534a966c04fSmrg	  cat <<\EOF >> conftest.$ac_ext
6535a966c04fSmrg  {0, (lt_ptr_t) 0}
6536a966c04fSmrg};
6537a966c04fSmrg
6538a966c04fSmrg#ifdef __cplusplus
6539a966c04fSmrg}
6540a966c04fSmrg#endif
6541a966c04fSmrgEOF
6542a966c04fSmrg	  # Now try linking the two files.
6543a966c04fSmrg	  mv conftest.$ac_objext conftstm.$ac_objext
6544a966c04fSmrg	  lt_save_LIBS="$LIBS"
6545a966c04fSmrg	  lt_save_CFLAGS="$CFLAGS"
6546a966c04fSmrg	  LIBS="conftstm.$ac_objext"
6547a966c04fSmrg	  CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
6548a966c04fSmrg	  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
6549a966c04fSmrg	    pipe_works=yes
6550a966c04fSmrg	  fi
6551a966c04fSmrg	  LIBS="$lt_save_LIBS"
6552a966c04fSmrg	  CFLAGS="$lt_save_CFLAGS"
6553a966c04fSmrg	else
6554a966c04fSmrg	  echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
6555a966c04fSmrg	fi
6556a966c04fSmrg      else
6557a966c04fSmrg	echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
6558a966c04fSmrg      fi
6559a966c04fSmrg    else
6560a966c04fSmrg      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
6561a966c04fSmrg    fi
6562a966c04fSmrg  else
6563a966c04fSmrg    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
6564a966c04fSmrg    cat conftest.$ac_ext >&5
6565a966c04fSmrg  fi
65662e2dd055Smrg  rm -rf conftest* conftst*
6567a966c04fSmrg
6568a966c04fSmrg  # Do not use the global_symbol_pipe unless it works.
6569a966c04fSmrg  if test "$pipe_works" = yes; then
6570a966c04fSmrg    break
6571a966c04fSmrg  else
6572a966c04fSmrg    lt_cv_sys_global_symbol_pipe=
6573a966c04fSmrg  fi
6574a966c04fSmrgdone
6575a966c04fSmrg])
6576a966c04fSmrgif test -z "$lt_cv_sys_global_symbol_pipe"; then
6577a966c04fSmrg  lt_cv_sys_global_symbol_to_cdecl=
6578a966c04fSmrgfi
6579a966c04fSmrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
6580a966c04fSmrg  AC_MSG_RESULT(failed)
6581a966c04fSmrgelse
6582a966c04fSmrg  AC_MSG_RESULT(ok)
6583a966c04fSmrgfi
6584a966c04fSmrg]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
6585a966c04fSmrg
6586a966c04fSmrg
6587a966c04fSmrg# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
6588a966c04fSmrg# ---------------------------------------
6589a966c04fSmrgAC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
6590a966c04fSmrg[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
6591a966c04fSmrg_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
6592a966c04fSmrg_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
6593a966c04fSmrg
6594a966c04fSmrgAC_MSG_CHECKING([for $compiler option to produce PIC])
6595a966c04fSmrg ifelse([$1],[CXX],[
6596a966c04fSmrg  # C++ specific cases for pic, static, wl, etc.
6597a966c04fSmrg  if test "$GXX" = yes; then
6598a966c04fSmrg    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6599a966c04fSmrg    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
6600a966c04fSmrg
6601a966c04fSmrg    case $host_os in
6602a966c04fSmrg    aix*)
6603a966c04fSmrg      # All AIX code is PIC.
6604a966c04fSmrg      if test "$host_cpu" = ia64; then
6605a966c04fSmrg	# AIX 5 now supports IA64 processor
6606a966c04fSmrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6607a966c04fSmrg      fi
6608a966c04fSmrg      ;;
6609a966c04fSmrg    amigaos*)
6610a966c04fSmrg      # FIXME: we need at least 68020 code to build shared libraries, but
6611a966c04fSmrg      # adding the `-m68020' flag to GCC prevents building anything better,
6612a966c04fSmrg      # like `-m68040'.
6613a966c04fSmrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
6614a966c04fSmrg      ;;
66152e2dd055Smrg    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
6616a966c04fSmrg      # PIC is the default for these OSes.
6617a966c04fSmrg      ;;
66182e2dd055Smrg    mingw* | cygwin* | os2* | pw32*)
6619a966c04fSmrg      # This hack is so that the source file can tell whether it is being
6620a966c04fSmrg      # built for inclusion in a dll (and should export symbols for example).
66212e2dd055Smrg      # Although the cygwin gcc ignores -fPIC, still need this for old-style
66222e2dd055Smrg      # (--disable-auto-import) libraries
66232e2dd055Smrg      m4_if([$1], [GCJ], [],
66242e2dd055Smrg	[_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
6625a966c04fSmrg      ;;
6626a966c04fSmrg    darwin* | rhapsody*)
6627a966c04fSmrg      # PIC is the default on this platform
6628a966c04fSmrg      # Common symbols not allowed in MH_DYLIB files
6629a966c04fSmrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
6630a966c04fSmrg      ;;
6631a966c04fSmrg    *djgpp*)
6632a966c04fSmrg      # DJGPP does not support shared libraries at all
6633a966c04fSmrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
6634a966c04fSmrg      ;;
66352e2dd055Smrg    interix[[3-9]]*)
6636a966c04fSmrg      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
6637a966c04fSmrg      # Instead, we relocate shared libraries at runtime.
6638a966c04fSmrg      ;;
6639a966c04fSmrg    sysv4*MP*)
6640a966c04fSmrg      if test -d /usr/nec; then
6641a966c04fSmrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
6642a966c04fSmrg      fi
6643a966c04fSmrg      ;;
6644a966c04fSmrg    hpux*)
6645a966c04fSmrg      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
6646a966c04fSmrg      # not for PA HP-UX.
6647a966c04fSmrg      case $host_cpu in
6648a966c04fSmrg      hppa*64*|ia64*)
6649a966c04fSmrg	;;
6650a966c04fSmrg      *)
6651a966c04fSmrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6652a966c04fSmrg	;;
6653a966c04fSmrg      esac
6654a966c04fSmrg      ;;
6655a966c04fSmrg    *)
6656a966c04fSmrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6657a966c04fSmrg      ;;
6658a966c04fSmrg    esac
6659a966c04fSmrg  else
6660a966c04fSmrg    case $host_os in
66612e2dd055Smrg      aix[[4-9]]*)
6662a966c04fSmrg	# All AIX code is PIC.
6663a966c04fSmrg	if test "$host_cpu" = ia64; then
6664a966c04fSmrg	  # AIX 5 now supports IA64 processor
6665a966c04fSmrg	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6666a966c04fSmrg	else
6667a966c04fSmrg	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
6668a966c04fSmrg	fi
6669a966c04fSmrg	;;
6670a966c04fSmrg      chorus*)
6671a966c04fSmrg	case $cc_basename in
6672a966c04fSmrg	cxch68*)
6673a966c04fSmrg	  # Green Hills C++ Compiler
6674a966c04fSmrg	  # _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"
6675a966c04fSmrg	  ;;
6676a966c04fSmrg	esac
6677a966c04fSmrg	;;
6678a966c04fSmrg       darwin*)
6679a966c04fSmrg         # PIC is the default on this platform
6680a966c04fSmrg         # Common symbols not allowed in MH_DYLIB files
6681a966c04fSmrg         case $cc_basename in
6682a966c04fSmrg           xlc*)
6683a966c04fSmrg           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
6684a966c04fSmrg           _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6685a966c04fSmrg           ;;
6686a966c04fSmrg         esac
6687a966c04fSmrg       ;;
6688a966c04fSmrg      dgux*)
6689a966c04fSmrg	case $cc_basename in
6690a966c04fSmrg	  ec++*)
6691a966c04fSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6692a966c04fSmrg	    ;;
6693a966c04fSmrg	  ghcx*)
6694a966c04fSmrg	    # Green Hills C++ Compiler
6695a966c04fSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6696a966c04fSmrg	    ;;
6697a966c04fSmrg	  *)
6698a966c04fSmrg	    ;;
6699a966c04fSmrg	esac
6700a966c04fSmrg	;;
67012e2dd055Smrg      freebsd* | dragonfly*)
6702a966c04fSmrg	# FreeBSD uses GNU C++
6703a966c04fSmrg	;;
6704a966c04fSmrg      hpux9* | hpux10* | hpux11*)
6705a966c04fSmrg	case $cc_basename in
6706a966c04fSmrg	  CC*)
6707a966c04fSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6708a966c04fSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
6709a966c04fSmrg	    if test "$host_cpu" != ia64; then
6710a966c04fSmrg	      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
6711a966c04fSmrg	    fi
6712a966c04fSmrg	    ;;
6713a966c04fSmrg	  aCC*)
6714a966c04fSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6715a966c04fSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
6716a966c04fSmrg	    case $host_cpu in
6717a966c04fSmrg	    hppa*64*|ia64*)
6718a966c04fSmrg	      # +Z the default
6719a966c04fSmrg	      ;;
6720a966c04fSmrg	    *)
6721a966c04fSmrg	      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
6722a966c04fSmrg	      ;;
6723a966c04fSmrg	    esac
6724a966c04fSmrg	    ;;
6725a966c04fSmrg	  *)
6726a966c04fSmrg	    ;;
6727a966c04fSmrg	esac
6728a966c04fSmrg	;;
6729a966c04fSmrg      interix*)
6730a966c04fSmrg	# This is c89, which is MS Visual C++ (no shared libs)
6731a966c04fSmrg	# Anyone wants to do a port?
6732a966c04fSmrg	;;
6733a966c04fSmrg      irix5* | irix6* | nonstopux*)
6734a966c04fSmrg	case $cc_basename in
6735a966c04fSmrg	  CC*)
6736a966c04fSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6737a966c04fSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6738a966c04fSmrg	    # CC pic flag -KPIC is the default.
6739a966c04fSmrg	    ;;
6740a966c04fSmrg	  *)
6741a966c04fSmrg	    ;;
6742a966c04fSmrg	esac
6743a966c04fSmrg	;;
67442e2dd055Smrg      linux* | k*bsd*-gnu)
6745a966c04fSmrg	case $cc_basename in
6746a966c04fSmrg	  KCC*)
6747a966c04fSmrg	    # KAI C++ Compiler
6748a966c04fSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
6749a966c04fSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6750a966c04fSmrg	    ;;
6751a966c04fSmrg	  icpc* | ecpc*)
6752a966c04fSmrg	    # Intel C++
6753a966c04fSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6754a966c04fSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6755a966c04fSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
6756a966c04fSmrg	    ;;
67572e2dd055Smrg	  pgCC* | pgcpp*)
6758a966c04fSmrg	    # Portland Group C++ compiler.
6759a966c04fSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6760a966c04fSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
6761a966c04fSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6762a966c04fSmrg	    ;;
6763a966c04fSmrg	  cxx*)
6764a966c04fSmrg	    # Compaq C++
6765a966c04fSmrg	    # Make sure the PIC flag is empty.  It appears that all Alpha
6766a966c04fSmrg	    # Linux and Compaq Tru64 Unix objects are PIC.
6767a966c04fSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
6768a966c04fSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6769a966c04fSmrg	    ;;
6770a966c04fSmrg	  *)
67712e2dd055Smrg	    case `$CC -V 2>&1 | sed 5q` in
67722e2dd055Smrg	    *Sun\ C*)
67732e2dd055Smrg	      # Sun C++ 5.9
67742e2dd055Smrg	      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
67752e2dd055Smrg	      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
67762e2dd055Smrg	      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
67772e2dd055Smrg	      ;;
67782e2dd055Smrg	    esac
6779a966c04fSmrg	    ;;
6780a966c04fSmrg	esac
6781a966c04fSmrg	;;
6782a966c04fSmrg      lynxos*)
6783a966c04fSmrg	;;
6784a966c04fSmrg      m88k*)
6785a966c04fSmrg	;;
6786a966c04fSmrg      mvs*)
6787a966c04fSmrg	case $cc_basename in
6788a966c04fSmrg	  cxx*)
6789a966c04fSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
6790a966c04fSmrg	    ;;
6791a966c04fSmrg	  *)
6792a966c04fSmrg	    ;;
6793a966c04fSmrg	esac
6794a966c04fSmrg	;;
6795a966c04fSmrg      netbsd*)
6796a966c04fSmrg	;;
6797a966c04fSmrg      osf3* | osf4* | osf5*)
6798a966c04fSmrg	case $cc_basename in
6799a966c04fSmrg	  KCC*)
6800a966c04fSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
6801a966c04fSmrg	    ;;
6802a966c04fSmrg	  RCC*)
6803a966c04fSmrg	    # Rational C++ 2.4.1
6804a966c04fSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6805a966c04fSmrg	    ;;
6806a966c04fSmrg	  cxx*)
6807a966c04fSmrg	    # Digital/Compaq C++
6808a966c04fSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6809a966c04fSmrg	    # Make sure the PIC flag is empty.  It appears that all Alpha
6810a966c04fSmrg	    # Linux and Compaq Tru64 Unix objects are PIC.
6811a966c04fSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
6812a966c04fSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6813a966c04fSmrg	    ;;
6814a966c04fSmrg	  *)
6815a966c04fSmrg	    ;;
6816a966c04fSmrg	esac
6817a966c04fSmrg	;;
6818a966c04fSmrg      psos*)
6819a966c04fSmrg	;;
6820a966c04fSmrg      solaris*)
6821a966c04fSmrg	case $cc_basename in
6822a966c04fSmrg	  CC*)
6823a966c04fSmrg	    # Sun C++ 4.2, 5.x and Centerline C++
6824a966c04fSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6825a966c04fSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6826a966c04fSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
6827a966c04fSmrg	    ;;
6828a966c04fSmrg	  gcx*)
6829a966c04fSmrg	    # Green Hills C++ Compiler
6830a966c04fSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
6831a966c04fSmrg	    ;;
6832a966c04fSmrg	  *)
6833a966c04fSmrg	    ;;
6834a966c04fSmrg	esac
6835a966c04fSmrg	;;
6836a966c04fSmrg      sunos4*)
6837a966c04fSmrg	case $cc_basename in
6838a966c04fSmrg	  CC*)
6839a966c04fSmrg	    # Sun C++ 4.x
6840a966c04fSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6841a966c04fSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6842a966c04fSmrg	    ;;
6843a966c04fSmrg	  lcc*)
6844a966c04fSmrg	    # Lucid
6845a966c04fSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6846a966c04fSmrg	    ;;
6847a966c04fSmrg	  *)
6848a966c04fSmrg	    ;;
6849a966c04fSmrg	esac
6850a966c04fSmrg	;;
6851a966c04fSmrg      tandem*)
6852a966c04fSmrg	case $cc_basename in
6853a966c04fSmrg	  NCC*)
6854a966c04fSmrg	    # NonStop-UX NCC 3.20
6855a966c04fSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6856a966c04fSmrg	    ;;
6857a966c04fSmrg	  *)
6858a966c04fSmrg	    ;;
6859a966c04fSmrg	esac
6860a966c04fSmrg	;;
6861a966c04fSmrg      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
6862a966c04fSmrg	case $cc_basename in
6863a966c04fSmrg	  CC*)
6864a966c04fSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6865a966c04fSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6866a966c04fSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6867a966c04fSmrg	    ;;
6868a966c04fSmrg	esac
6869a966c04fSmrg	;;
6870a966c04fSmrg      vxworks*)
6871a966c04fSmrg	;;
6872a966c04fSmrg      *)
6873a966c04fSmrg	_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
6874a966c04fSmrg	;;
6875a966c04fSmrg    esac
6876a966c04fSmrg  fi
6877a966c04fSmrg],
6878a966c04fSmrg[
6879a966c04fSmrg  if test "$GCC" = yes; then
6880a966c04fSmrg    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6881a966c04fSmrg    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
6882a966c04fSmrg
6883a966c04fSmrg    case $host_os in
6884a966c04fSmrg      aix*)
6885a966c04fSmrg      # All AIX code is PIC.
6886a966c04fSmrg      if test "$host_cpu" = ia64; then
6887a966c04fSmrg	# AIX 5 now supports IA64 processor
6888a966c04fSmrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6889a966c04fSmrg      fi
6890a966c04fSmrg      ;;
6891a966c04fSmrg
6892a966c04fSmrg    amigaos*)
6893a966c04fSmrg      # FIXME: we need at least 68020 code to build shared libraries, but
6894a966c04fSmrg      # adding the `-m68020' flag to GCC prevents building anything better,
6895a966c04fSmrg      # like `-m68040'.
6896a966c04fSmrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
6897a966c04fSmrg      ;;
6898a966c04fSmrg
68992e2dd055Smrg    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
6900a966c04fSmrg      # PIC is the default for these OSes.
6901a966c04fSmrg      ;;
6902a966c04fSmrg
69032e2dd055Smrg    mingw* | cygwin* | pw32* | os2*)
6904a966c04fSmrg      # This hack is so that the source file can tell whether it is being
6905a966c04fSmrg      # built for inclusion in a dll (and should export symbols for example).
69062e2dd055Smrg      # Although the cygwin gcc ignores -fPIC, still need this for old-style
69072e2dd055Smrg      # (--disable-auto-import) libraries
69082e2dd055Smrg      m4_if([$1], [GCJ], [],
69092e2dd055Smrg	[_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
6910a966c04fSmrg      ;;
6911a966c04fSmrg
6912a966c04fSmrg    darwin* | rhapsody*)
6913a966c04fSmrg      # PIC is the default on this platform
6914a966c04fSmrg      # Common symbols not allowed in MH_DYLIB files
6915a966c04fSmrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
6916a966c04fSmrg      ;;
6917a966c04fSmrg
69182e2dd055Smrg    interix[[3-9]]*)
6919a966c04fSmrg      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
6920a966c04fSmrg      # Instead, we relocate shared libraries at runtime.
6921a966c04fSmrg      ;;
6922a966c04fSmrg
6923a966c04fSmrg    msdosdjgpp*)
6924a966c04fSmrg      # Just because we use GCC doesn't mean we suddenly get shared libraries
6925a966c04fSmrg      # on systems that don't support them.
6926a966c04fSmrg      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
6927a966c04fSmrg      enable_shared=no
6928a966c04fSmrg      ;;
6929a966c04fSmrg
6930a966c04fSmrg    sysv4*MP*)
6931a966c04fSmrg      if test -d /usr/nec; then
6932a966c04fSmrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
6933a966c04fSmrg      fi
6934a966c04fSmrg      ;;
6935a966c04fSmrg
6936a966c04fSmrg    hpux*)
6937a966c04fSmrg      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
6938a966c04fSmrg      # not for PA HP-UX.
6939a966c04fSmrg      case $host_cpu in
6940a966c04fSmrg      hppa*64*|ia64*)
6941a966c04fSmrg	# +Z the default
6942a966c04fSmrg	;;
6943a966c04fSmrg      *)
6944a966c04fSmrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6945a966c04fSmrg	;;
6946a966c04fSmrg      esac
6947a966c04fSmrg      ;;
6948a966c04fSmrg
6949a966c04fSmrg    *)
6950a966c04fSmrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6951a966c04fSmrg      ;;
6952a966c04fSmrg    esac
6953a966c04fSmrg  else
6954a966c04fSmrg    # PORTME Check for flag to pass linker flags through the system compiler.
6955a966c04fSmrg    case $host_os in
6956a966c04fSmrg    aix*)
6957a966c04fSmrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6958a966c04fSmrg      if test "$host_cpu" = ia64; then
6959a966c04fSmrg	# AIX 5 now supports IA64 processor
6960a966c04fSmrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6961a966c04fSmrg      else
6962a966c04fSmrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
6963a966c04fSmrg      fi
6964a966c04fSmrg      ;;
6965a966c04fSmrg      darwin*)
6966a966c04fSmrg        # PIC is the default on this platform
6967a966c04fSmrg        # Common symbols not allowed in MH_DYLIB files
6968a966c04fSmrg       case $cc_basename in
6969a966c04fSmrg         xlc*)
6970a966c04fSmrg         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
6971a966c04fSmrg         _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6972a966c04fSmrg         ;;
6973a966c04fSmrg       esac
6974a966c04fSmrg       ;;
6975a966c04fSmrg
69762e2dd055Smrg    mingw* | cygwin* | pw32* | os2*)
6977a966c04fSmrg      # This hack is so that the source file can tell whether it is being
6978a966c04fSmrg      # built for inclusion in a dll (and should export symbols for example).
69792e2dd055Smrg      m4_if([$1], [GCJ], [],
69802e2dd055Smrg	[_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
6981a966c04fSmrg      ;;
6982a966c04fSmrg
6983a966c04fSmrg    hpux9* | hpux10* | hpux11*)
6984a966c04fSmrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6985a966c04fSmrg      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
6986a966c04fSmrg      # not for PA HP-UX.
6987a966c04fSmrg      case $host_cpu in
6988a966c04fSmrg      hppa*64*|ia64*)
6989a966c04fSmrg	# +Z the default
6990a966c04fSmrg	;;
6991a966c04fSmrg      *)
6992a966c04fSmrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
6993a966c04fSmrg	;;
6994a966c04fSmrg      esac
6995a966c04fSmrg      # Is there a better lt_prog_compiler_static that works with the bundled CC?
6996a966c04fSmrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
6997a966c04fSmrg      ;;
6998a966c04fSmrg
6999a966c04fSmrg    irix5* | irix6* | nonstopux*)
7000a966c04fSmrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7001a966c04fSmrg      # PIC (with -KPIC) is the default.
7002a966c04fSmrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
7003a966c04fSmrg      ;;
7004a966c04fSmrg
7005a966c04fSmrg    newsos6)
7006a966c04fSmrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
7007a966c04fSmrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
7008a966c04fSmrg      ;;
7009a966c04fSmrg
70102e2dd055Smrg    linux* | k*bsd*-gnu)
7011a966c04fSmrg      case $cc_basename in
7012a966c04fSmrg      icc* | ecc*)
7013a966c04fSmrg	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7014a966c04fSmrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
7015a966c04fSmrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
7016a966c04fSmrg        ;;
7017a966c04fSmrg      pgcc* | pgf77* | pgf90* | pgf95*)
7018a966c04fSmrg        # Portland Group compilers (*not* the Pentium gcc compiler,
7019a966c04fSmrg	# which looks to be a dead project)
7020a966c04fSmrg	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7021a966c04fSmrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
7022a966c04fSmrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
7023a966c04fSmrg        ;;
7024a966c04fSmrg      ccc*)
7025a966c04fSmrg        _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7026a966c04fSmrg        # All Alpha code is PIC.
7027a966c04fSmrg        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
7028a966c04fSmrg        ;;
70292e2dd055Smrg      *)
70302e2dd055Smrg        case `$CC -V 2>&1 | sed 5q` in
70312e2dd055Smrg	*Sun\ C*)
70322e2dd055Smrg	  # Sun C 5.9
70332e2dd055Smrg	  _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
70342e2dd055Smrg	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
70352e2dd055Smrg	  _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
70362e2dd055Smrg	  ;;
70372e2dd055Smrg	*Sun\ F*)
70382e2dd055Smrg	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
70392e2dd055Smrg	  _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
70402e2dd055Smrg	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
70412e2dd055Smrg	  _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=''
70422e2dd055Smrg	  ;;
70432e2dd055Smrg	esac
70442e2dd055Smrg	;;
7045a966c04fSmrg      esac
7046a966c04fSmrg      ;;
7047a966c04fSmrg
7048a966c04fSmrg    osf3* | osf4* | osf5*)
7049a966c04fSmrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7050a966c04fSmrg      # All OSF/1 code is PIC.
7051a966c04fSmrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
7052a966c04fSmrg      ;;
7053a966c04fSmrg
70542e2dd055Smrg    rdos*)
70552e2dd055Smrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
70562e2dd055Smrg      ;;
70572e2dd055Smrg
7058a966c04fSmrg    solaris*)
7059a966c04fSmrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
7060a966c04fSmrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
7061a966c04fSmrg      case $cc_basename in
7062a966c04fSmrg      f77* | f90* | f95*)
7063a966c04fSmrg	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
7064a966c04fSmrg      *)
7065a966c04fSmrg	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
7066a966c04fSmrg      esac
7067a966c04fSmrg      ;;
7068a966c04fSmrg
7069a966c04fSmrg    sunos4*)
7070a966c04fSmrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
7071a966c04fSmrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
7072a966c04fSmrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
7073a966c04fSmrg      ;;
7074a966c04fSmrg
7075a966c04fSmrg    sysv4 | sysv4.2uw2* | sysv4.3*)
7076a966c04fSmrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7077a966c04fSmrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
7078a966c04fSmrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
7079a966c04fSmrg      ;;
7080a966c04fSmrg
7081a966c04fSmrg    sysv4*MP*)
7082a966c04fSmrg      if test -d /usr/nec ;then
7083a966c04fSmrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
7084a966c04fSmrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
7085a966c04fSmrg      fi
7086a966c04fSmrg      ;;
7087a966c04fSmrg
7088a966c04fSmrg    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
7089a966c04fSmrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7090a966c04fSmrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
7091a966c04fSmrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
7092a966c04fSmrg      ;;
7093a966c04fSmrg
7094a966c04fSmrg    unicos*)
7095a966c04fSmrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7096a966c04fSmrg      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
7097a966c04fSmrg      ;;
7098a966c04fSmrg
7099a966c04fSmrg    uts4*)
7100a966c04fSmrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
7101a966c04fSmrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
7102a966c04fSmrg      ;;
7103a966c04fSmrg
7104a966c04fSmrg    *)
7105a966c04fSmrg      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
7106a966c04fSmrg      ;;
7107a966c04fSmrg    esac
7108a966c04fSmrg  fi
7109a966c04fSmrg])
7110a966c04fSmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
7111a966c04fSmrg
7112a966c04fSmrg#
7113a966c04fSmrg# Check to make sure the PIC flag actually works.
7114a966c04fSmrg#
7115a966c04fSmrgif test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
7116a966c04fSmrg  AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
71172e2dd055Smrg    _LT_AC_TAGVAR(lt_cv_prog_compiler_pic_works, $1),
7118a966c04fSmrg    [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
7119a966c04fSmrg    [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
7120a966c04fSmrg     "" | " "*) ;;
7121a966c04fSmrg     *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
7122a966c04fSmrg     esac],
7123a966c04fSmrg    [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
7124a966c04fSmrg     _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
7125a966c04fSmrgfi
7126a966c04fSmrgcase $host_os in
7127a966c04fSmrg  # For platforms which do not support PIC, -DPIC is meaningless:
7128a966c04fSmrg  *djgpp*)
7129a966c04fSmrg    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
7130a966c04fSmrg    ;;
7131a966c04fSmrg  *)
7132a966c04fSmrg    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
7133a966c04fSmrg    ;;
7134a966c04fSmrgesac
7135a966c04fSmrg
7136a966c04fSmrg#
7137a966c04fSmrg# Check to make sure the static flag actually works.
7138a966c04fSmrg#
7139a966c04fSmrgwl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\"
7140a966c04fSmrgAC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
71412e2dd055Smrg  _LT_AC_TAGVAR(lt_cv_prog_compiler_static_works, $1),
7142a966c04fSmrg  $lt_tmp_static_flag,
7143a966c04fSmrg  [],
7144a966c04fSmrg  [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
7145a966c04fSmrg])
7146a966c04fSmrg
7147a966c04fSmrg
7148a966c04fSmrg# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
7149a966c04fSmrg# ------------------------------------
7150a966c04fSmrg# See if the linker supports building shared libraries.
7151a966c04fSmrgAC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
71522e2dd055Smrg[AC_REQUIRE([LT_AC_PROG_SED])dnl
71532e2dd055SmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
7154a966c04fSmrgifelse([$1],[CXX],[
7155a966c04fSmrg  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
7156a966c04fSmrg  case $host_os in
71572e2dd055Smrg  aix[[4-9]]*)
7158a966c04fSmrg    # If we're using GNU nm, then we don't want the "-C" option.
7159a966c04fSmrg    # -C means demangle to AIX nm, but means don't demangle with GNU nm
7160a966c04fSmrg    if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
7161a966c04fSmrg      _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'
7162a966c04fSmrg    else
7163a966c04fSmrg      _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'
7164a966c04fSmrg    fi
7165a966c04fSmrg    ;;
7166a966c04fSmrg  pw32*)
7167a966c04fSmrg    _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
7168a966c04fSmrg  ;;
7169a966c04fSmrg  cygwin* | mingw*)
71702e2dd055Smrg    _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'
7171a966c04fSmrg  ;;
7172a966c04fSmrg  *)
7173a966c04fSmrg    _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
7174a966c04fSmrg  ;;
7175a966c04fSmrg  esac
71762e2dd055Smrg  _LT_AC_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
7177a966c04fSmrg],[
7178a966c04fSmrg  runpath_var=
7179a966c04fSmrg  _LT_AC_TAGVAR(allow_undefined_flag, $1)=
7180a966c04fSmrg  _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
7181a966c04fSmrg  _LT_AC_TAGVAR(archive_cmds, $1)=
7182a966c04fSmrg  _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
7183a966c04fSmrg  _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
7184a966c04fSmrg  _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
7185a966c04fSmrg  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
7186a966c04fSmrg  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
7187a966c04fSmrg  _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
7188a966c04fSmrg  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
7189a966c04fSmrg  _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
7190a966c04fSmrg  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
7191a966c04fSmrg  _LT_AC_TAGVAR(hardcode_direct, $1)=no
7192a966c04fSmrg  _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
7193a966c04fSmrg  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
7194a966c04fSmrg  _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
7195a966c04fSmrg  _LT_AC_TAGVAR(hardcode_automatic, $1)=no
7196a966c04fSmrg  _LT_AC_TAGVAR(module_cmds, $1)=
7197a966c04fSmrg  _LT_AC_TAGVAR(module_expsym_cmds, $1)=
7198a966c04fSmrg  _LT_AC_TAGVAR(always_export_symbols, $1)=no
7199a966c04fSmrg  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
7200a966c04fSmrg  # include_expsyms should be a list of space-separated symbols to be *always*
7201a966c04fSmrg  # included in the symbol list
7202a966c04fSmrg  _LT_AC_TAGVAR(include_expsyms, $1)=
7203a966c04fSmrg  # exclude_expsyms can be an extended regexp of symbols to exclude
7204a966c04fSmrg  # it will be wrapped by ` (' and `)$', so one must not match beginning or
7205a966c04fSmrg  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
7206a966c04fSmrg  # as well as any symbol that contains `d'.
72072e2dd055Smrg  _LT_AC_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
7208a966c04fSmrg  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
7209a966c04fSmrg  # platforms (ab)use it in PIC code, but their linkers get confused if
7210a966c04fSmrg  # the symbol is explicitly referenced.  Since portable code cannot
7211a966c04fSmrg  # rely on this symbol name, it's probably fine to never include it in
7212a966c04fSmrg  # preloaded symbol tables.
72132e2dd055Smrg  # Exclude shared library initialization/finalization symbols.
72142e2dd055Smrgdnl Note also adjust exclude_expsyms for C++ above.
7215a966c04fSmrg  extract_expsyms_cmds=
7216a966c04fSmrg  # Just being paranoid about ensuring that cc_basename is set.
7217a966c04fSmrg  _LT_CC_BASENAME([$compiler])
7218a966c04fSmrg  case $host_os in
7219a966c04fSmrg  cygwin* | mingw* | pw32*)
7220a966c04fSmrg    # FIXME: the MSVC++ port hasn't been tested in a loooong time
7221a966c04fSmrg    # When not using gcc, we currently assume that we are using
7222a966c04fSmrg    # Microsoft Visual C++.
7223a966c04fSmrg    if test "$GCC" != yes; then
7224a966c04fSmrg      with_gnu_ld=no
7225a966c04fSmrg    fi
7226a966c04fSmrg    ;;
7227a966c04fSmrg  interix*)
7228a966c04fSmrg    # we just hope/assume this is gcc and not c89 (= MSVC++)
7229a966c04fSmrg    with_gnu_ld=yes
7230a966c04fSmrg    ;;
7231a966c04fSmrg  openbsd*)
7232a966c04fSmrg    with_gnu_ld=no
7233a966c04fSmrg    ;;
7234a966c04fSmrg  esac
7235a966c04fSmrg
7236a966c04fSmrg  _LT_AC_TAGVAR(ld_shlibs, $1)=yes
7237a966c04fSmrg  if test "$with_gnu_ld" = yes; then
7238a966c04fSmrg    # If archive_cmds runs LD, not CC, wlarc should be empty
7239a966c04fSmrg    wlarc='${wl}'
7240a966c04fSmrg
7241a966c04fSmrg    # Set some defaults for GNU ld with shared library support. These
7242a966c04fSmrg    # are reset later if shared libraries are not supported. Putting them
7243a966c04fSmrg    # here allows them to be overridden if necessary.
7244a966c04fSmrg    runpath_var=LD_RUN_PATH
7245a966c04fSmrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
7246a966c04fSmrg    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7247a966c04fSmrg    # ancient GNU ld didn't support --whole-archive et. al.
7248a966c04fSmrg    if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
7249a966c04fSmrg	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
7250a966c04fSmrg      else
7251a966c04fSmrg  	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
7252a966c04fSmrg    fi
7253a966c04fSmrg    supports_anon_versioning=no
7254a966c04fSmrg    case `$LD -v 2>/dev/null` in
7255a966c04fSmrg      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
7256a966c04fSmrg      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
7257a966c04fSmrg      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
7258a966c04fSmrg      *\ 2.11.*) ;; # other 2.11 versions
7259a966c04fSmrg      *) supports_anon_versioning=yes ;;
7260a966c04fSmrg    esac
7261a966c04fSmrg
7262a966c04fSmrg    # See if GNU ld supports shared libraries.
7263a966c04fSmrg    case $host_os in
72642e2dd055Smrg    aix[[3-9]]*)
7265a966c04fSmrg      # On AIX/PPC, the GNU linker is very broken
7266a966c04fSmrg      if test "$host_cpu" != ia64; then
7267a966c04fSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
7268a966c04fSmrg	cat <<EOF 1>&2
7269a966c04fSmrg
7270a966c04fSmrg*** Warning: the GNU linker, at least up to release 2.9.1, is reported
7271a966c04fSmrg*** to be unable to reliably create shared libraries on AIX.
7272a966c04fSmrg*** Therefore, libtool is disabling shared libraries support.  If you
7273a966c04fSmrg*** really care for shared libraries, you may want to modify your PATH
7274a966c04fSmrg*** so that a non-GNU linker is found, and then restart.
7275a966c04fSmrg
7276a966c04fSmrgEOF
7277a966c04fSmrg      fi
7278a966c04fSmrg      ;;
7279a966c04fSmrg
7280a966c04fSmrg    amigaos*)
7281a966c04fSmrg      _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)'
7282a966c04fSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7283a966c04fSmrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
7284a966c04fSmrg
7285a966c04fSmrg      # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
7286a966c04fSmrg      # that the semantics of dynamic libraries on AmigaOS, at least up
7287a966c04fSmrg      # to version 4, is to share data among multiple programs linked
7288a966c04fSmrg      # with the same dynamic library.  Since this doesn't match the
7289a966c04fSmrg      # behavior of shared libraries on other platforms, we can't use
7290a966c04fSmrg      # them.
7291a966c04fSmrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
7292a966c04fSmrg      ;;
7293a966c04fSmrg
7294a966c04fSmrg    beos*)
7295a966c04fSmrg      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
7296a966c04fSmrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
7297a966c04fSmrg	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
7298a966c04fSmrg	# support --undefined.  This deserves some investigation.  FIXME
7299a966c04fSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7300a966c04fSmrg      else
7301a966c04fSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
7302a966c04fSmrg      fi
7303a966c04fSmrg      ;;
7304a966c04fSmrg
7305a966c04fSmrg    cygwin* | mingw* | pw32*)
7306a966c04fSmrg      # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
7307a966c04fSmrg      # as there is no search path for DLLs.
7308a966c04fSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7309a966c04fSmrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
7310a966c04fSmrg      _LT_AC_TAGVAR(always_export_symbols, $1)=no
7311a966c04fSmrg      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
73122e2dd055Smrg      _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'
7313a966c04fSmrg
7314a966c04fSmrg      if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
7315a966c04fSmrg        _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'
7316a966c04fSmrg	# If the export-symbols file already is a .def file (1st line
7317a966c04fSmrg	# is EXPORTS), use it as is; otherwise, prepend...
7318a966c04fSmrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
7319a966c04fSmrg	  cp $export_symbols $output_objdir/$soname.def;
7320a966c04fSmrg	else
7321a966c04fSmrg	  echo EXPORTS > $output_objdir/$soname.def;
7322a966c04fSmrg	  cat $export_symbols >> $output_objdir/$soname.def;
7323a966c04fSmrg	fi~
7324a966c04fSmrg	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
7325a966c04fSmrg      else
7326a966c04fSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
7327a966c04fSmrg      fi
7328a966c04fSmrg      ;;
7329a966c04fSmrg
73302e2dd055Smrg    interix[[3-9]]*)
7331a966c04fSmrg      _LT_AC_TAGVAR(hardcode_direct, $1)=no
7332a966c04fSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7333a966c04fSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7334a966c04fSmrg      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7335a966c04fSmrg      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
7336a966c04fSmrg      # Instead, shared libraries are loaded at an image base (0x10000000 by
7337a966c04fSmrg      # default) and relocated if they conflict, which is a slow very memory
7338a966c04fSmrg      # consuming and fragmenting process.  To avoid this, we pick a random,
7339a966c04fSmrg      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
7340a966c04fSmrg      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
7341a966c04fSmrg      _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'
7342a966c04fSmrg      _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'
7343a966c04fSmrg      ;;
7344a966c04fSmrg
73452e2dd055Smrg    gnu* | linux* | k*bsd*-gnu)
7346a966c04fSmrg      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
7347a966c04fSmrg	tmp_addflag=
7348a966c04fSmrg	case $cc_basename,$host_cpu in
7349a966c04fSmrg	pgcc*)				# Portland Group C compiler
7350a966c04fSmrg	  _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'
7351a966c04fSmrg	  tmp_addflag=' $pic_flag'
7352a966c04fSmrg	  ;;
7353a966c04fSmrg	pgf77* | pgf90* | pgf95*)	# Portland Group f77 and f90 compilers
7354a966c04fSmrg	  _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'
7355a966c04fSmrg	  tmp_addflag=' $pic_flag -Mnomain' ;;
7356a966c04fSmrg	ecc*,ia64* | icc*,ia64*)		# Intel C compiler on ia64
7357a966c04fSmrg	  tmp_addflag=' -i_dynamic' ;;
7358a966c04fSmrg	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
7359a966c04fSmrg	  tmp_addflag=' -i_dynamic -nofor_main' ;;
7360a966c04fSmrg	ifc* | ifort*)			# Intel Fortran compiler
7361a966c04fSmrg	  tmp_addflag=' -nofor_main' ;;
7362a966c04fSmrg	esac
73632e2dd055Smrg	case `$CC -V 2>&1 | sed 5q` in
73642e2dd055Smrg	*Sun\ C*)			# Sun C 5.9
73652e2dd055Smrg	  _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'
73662e2dd055Smrg	  tmp_sharedflag='-G' ;;
73672e2dd055Smrg	*Sun\ F*)			# Sun Fortran 8.3
73682e2dd055Smrg	  tmp_sharedflag='-G' ;;
73692e2dd055Smrg	*)
73702e2dd055Smrg	  tmp_sharedflag='-shared' ;;
73712e2dd055Smrg	esac
73722e2dd055Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7373a966c04fSmrg
7374a966c04fSmrg	if test $supports_anon_versioning = yes; then
7375a966c04fSmrg	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~
7376a966c04fSmrg  cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
7377a966c04fSmrg  $echo "local: *; };" >> $output_objdir/$libname.ver~
73782e2dd055Smrg	  $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
7379a966c04fSmrg	fi
7380a966c04fSmrg      else
7381a966c04fSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
7382a966c04fSmrg      fi
7383a966c04fSmrg      ;;
7384a966c04fSmrg
7385a966c04fSmrg    netbsd*)
7386a966c04fSmrg      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
7387a966c04fSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
7388a966c04fSmrg	wlarc=
7389a966c04fSmrg      else
7390a966c04fSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7391a966c04fSmrg	_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'
7392a966c04fSmrg      fi
7393a966c04fSmrg      ;;
7394a966c04fSmrg
7395a966c04fSmrg    solaris*)
7396a966c04fSmrg      if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
7397a966c04fSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
7398a966c04fSmrg	cat <<EOF 1>&2
7399a966c04fSmrg
7400a966c04fSmrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably
7401a966c04fSmrg*** create shared libraries on Solaris systems.  Therefore, libtool
7402a966c04fSmrg*** is disabling shared libraries support.  We urge you to upgrade GNU
7403a966c04fSmrg*** binutils to release 2.9.1 or newer.  Another option is to modify
7404a966c04fSmrg*** your PATH or compiler configuration so that the native linker is
7405a966c04fSmrg*** used, and then restart.
7406a966c04fSmrg
7407a966c04fSmrgEOF
7408a966c04fSmrg      elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
7409a966c04fSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7410a966c04fSmrg	_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'
7411a966c04fSmrg      else
7412a966c04fSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
7413a966c04fSmrg      fi
7414a966c04fSmrg      ;;
7415a966c04fSmrg
7416a966c04fSmrg    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
7417a966c04fSmrg      case `$LD -v 2>&1` in
74182e2dd055Smrg        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
7419a966c04fSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
7420a966c04fSmrg	cat <<_LT_EOF 1>&2
7421a966c04fSmrg
7422a966c04fSmrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
7423a966c04fSmrg*** reliably create shared libraries on SCO systems.  Therefore, libtool
7424a966c04fSmrg*** is disabling shared libraries support.  We urge you to upgrade GNU
7425a966c04fSmrg*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
7426a966c04fSmrg*** your PATH or compiler configuration so that the native linker is
7427a966c04fSmrg*** used, and then restart.
7428a966c04fSmrg
7429a966c04fSmrg_LT_EOF
7430a966c04fSmrg	;;
7431a966c04fSmrg	*)
7432a966c04fSmrg	  if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
7433a966c04fSmrg	    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
7434a966c04fSmrg	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib'
7435a966c04fSmrg	    _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'
7436a966c04fSmrg	  else
7437a966c04fSmrg	    _LT_AC_TAGVAR(ld_shlibs, $1)=no
7438a966c04fSmrg	  fi
7439a966c04fSmrg	;;
7440a966c04fSmrg      esac
7441a966c04fSmrg      ;;
7442a966c04fSmrg
7443a966c04fSmrg    sunos4*)
7444a966c04fSmrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
7445a966c04fSmrg      wlarc=
7446a966c04fSmrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
7447a966c04fSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7448a966c04fSmrg      ;;
7449a966c04fSmrg
7450a966c04fSmrg    *)
7451a966c04fSmrg      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
7452a966c04fSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7453a966c04fSmrg	_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'
7454a966c04fSmrg      else
7455a966c04fSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
7456a966c04fSmrg      fi
7457a966c04fSmrg      ;;
7458a966c04fSmrg    esac
7459a966c04fSmrg
7460a966c04fSmrg    if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then
7461a966c04fSmrg      runpath_var=
7462a966c04fSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
7463a966c04fSmrg      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
7464a966c04fSmrg      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
7465a966c04fSmrg    fi
7466a966c04fSmrg  else
7467a966c04fSmrg    # PORTME fill in a description of your system's linker (not GNU ld)
7468a966c04fSmrg    case $host_os in
7469a966c04fSmrg    aix3*)
7470a966c04fSmrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
7471a966c04fSmrg      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
7472a966c04fSmrg      _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'
7473a966c04fSmrg      # Note: this linker hardcodes the directories in LIBPATH if there
7474a966c04fSmrg      # are no directories specified by -L.
7475a966c04fSmrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
7476a966c04fSmrg      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
7477a966c04fSmrg	# Neither direct hardcoding nor static linking is supported with a
7478a966c04fSmrg	# broken collect2.
7479a966c04fSmrg	_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
7480a966c04fSmrg      fi
7481a966c04fSmrg      ;;
7482a966c04fSmrg
74832e2dd055Smrg    aix[[4-9]]*)
7484a966c04fSmrg      if test "$host_cpu" = ia64; then
7485a966c04fSmrg	# On IA64, the linker does run time linking by default, so we don't
7486a966c04fSmrg	# have to do anything special.
7487a966c04fSmrg	aix_use_runtimelinking=no
7488a966c04fSmrg	exp_sym_flag='-Bexport'
7489a966c04fSmrg	no_entry_flag=""
7490a966c04fSmrg      else
7491a966c04fSmrg	# If we're using GNU nm, then we don't want the "-C" option.
7492a966c04fSmrg	# -C means demangle to AIX nm, but means don't demangle with GNU nm
7493a966c04fSmrg	if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
7494a966c04fSmrg	  _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'
7495a966c04fSmrg	else
7496a966c04fSmrg	  _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'
7497a966c04fSmrg	fi
7498a966c04fSmrg	aix_use_runtimelinking=no
7499a966c04fSmrg
7500a966c04fSmrg	# Test if we are trying to use run time linking or normal
7501a966c04fSmrg	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
7502a966c04fSmrg	# need to do runtime linking.
75032e2dd055Smrg	case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
7504a966c04fSmrg	  for ld_flag in $LDFLAGS; do
7505a966c04fSmrg  	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
7506a966c04fSmrg  	    aix_use_runtimelinking=yes
7507a966c04fSmrg  	    break
7508a966c04fSmrg  	  fi
7509a966c04fSmrg	  done
7510a966c04fSmrg	  ;;
7511a966c04fSmrg	esac
7512a966c04fSmrg
7513a966c04fSmrg	exp_sym_flag='-bexport'
7514a966c04fSmrg	no_entry_flag='-bnoentry'
7515a966c04fSmrg      fi
7516a966c04fSmrg
7517a966c04fSmrg      # When large executables or shared objects are built, AIX ld can
7518a966c04fSmrg      # have problems creating the table of contents.  If linking a library
7519a966c04fSmrg      # or program results in "error TOC overflow" add -mminimal-toc to
7520a966c04fSmrg      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
7521a966c04fSmrg      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
7522a966c04fSmrg
7523a966c04fSmrg      _LT_AC_TAGVAR(archive_cmds, $1)=''
7524a966c04fSmrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
7525a966c04fSmrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
7526a966c04fSmrg      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
7527a966c04fSmrg
7528a966c04fSmrg      if test "$GCC" = yes; then
7529a966c04fSmrg	case $host_os in aix4.[[012]]|aix4.[[012]].*)
7530a966c04fSmrg	# We only want to do this on AIX 4.2 and lower, the check
7531a966c04fSmrg	# below for broken collect2 doesn't work under 4.3+
7532a966c04fSmrg	  collect2name=`${CC} -print-prog-name=collect2`
7533a966c04fSmrg	  if test -f "$collect2name" && \
7534a966c04fSmrg  	   strings "$collect2name" | grep resolve_lib_name >/dev/null
7535a966c04fSmrg	  then
7536a966c04fSmrg  	  # We have reworked collect2
75372e2dd055Smrg  	  :
7538a966c04fSmrg	  else
7539a966c04fSmrg  	  # We have old collect2
7540a966c04fSmrg  	  _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
7541a966c04fSmrg  	  # It fails to find uninstalled libraries when the uninstalled
7542a966c04fSmrg  	  # path is not listed in the libpath.  Setting hardcode_minus_L
7543a966c04fSmrg  	  # to unsupported forces relinking
7544a966c04fSmrg  	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
7545a966c04fSmrg  	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7546a966c04fSmrg  	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
7547a966c04fSmrg	  fi
7548a966c04fSmrg	  ;;
7549a966c04fSmrg	esac
7550a966c04fSmrg	shared_flag='-shared'
7551a966c04fSmrg	if test "$aix_use_runtimelinking" = yes; then
7552a966c04fSmrg	  shared_flag="$shared_flag "'${wl}-G'
7553a966c04fSmrg	fi
7554a966c04fSmrg      else
7555a966c04fSmrg	# not using gcc
7556a966c04fSmrg	if test "$host_cpu" = ia64; then
7557a966c04fSmrg  	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
7558a966c04fSmrg  	# chokes on -Wl,-G. The following line is correct:
7559a966c04fSmrg	  shared_flag='-G'
7560a966c04fSmrg	else
7561a966c04fSmrg	  if test "$aix_use_runtimelinking" = yes; then
7562a966c04fSmrg	    shared_flag='${wl}-G'
7563a966c04fSmrg	  else
7564a966c04fSmrg	    shared_flag='${wl}-bM:SRE'
7565a966c04fSmrg	  fi
7566a966c04fSmrg	fi
7567a966c04fSmrg      fi
7568a966c04fSmrg
7569a966c04fSmrg      # It seems that -bexpall does not export symbols beginning with
7570a966c04fSmrg      # underscore (_), so it is better to generate a list of symbols to export.
7571a966c04fSmrg      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
7572a966c04fSmrg      if test "$aix_use_runtimelinking" = yes; then
7573a966c04fSmrg	# Warning - without using the other runtime loading flags (-brtl),
7574a966c04fSmrg	# -berok will link without error, but may produce a broken library.
7575a966c04fSmrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
7576a966c04fSmrg       # Determine the default libpath from the value encoded in an empty executable.
7577a966c04fSmrg       _LT_AC_SYS_LIBPATH_AIX
7578a966c04fSmrg       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
7579a966c04fSmrg	_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"
7580a966c04fSmrg       else
7581a966c04fSmrg	if test "$host_cpu" = ia64; then
7582a966c04fSmrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
7583a966c04fSmrg	  _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
7584a966c04fSmrg	  _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"
7585a966c04fSmrg	else
7586a966c04fSmrg	 # Determine the default libpath from the value encoded in an empty executable.
7587a966c04fSmrg	 _LT_AC_SYS_LIBPATH_AIX
7588a966c04fSmrg	 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
7589a966c04fSmrg	  # Warning - without using the other run time loading flags,
7590a966c04fSmrg	  # -berok will link without error, but may produce a broken library.
7591a966c04fSmrg	  _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
7592a966c04fSmrg	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
7593a966c04fSmrg	  # Exported symbols can be pulled into shared objects from archives
7594a966c04fSmrg	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
7595a966c04fSmrg	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
7596a966c04fSmrg	  # This is similar to how AIX traditionally builds its shared libraries.
7597a966c04fSmrg	  _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'
7598a966c04fSmrg	fi
7599a966c04fSmrg      fi
7600a966c04fSmrg      ;;
7601a966c04fSmrg
7602a966c04fSmrg    amigaos*)
7603a966c04fSmrg      _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)'
7604a966c04fSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7605a966c04fSmrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
7606a966c04fSmrg      # see comment about different semantics on the GNU ld section
7607a966c04fSmrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
7608a966c04fSmrg      ;;
7609a966c04fSmrg
7610a966c04fSmrg    bsdi[[45]]*)
7611a966c04fSmrg      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
7612a966c04fSmrg      ;;
7613a966c04fSmrg
7614a966c04fSmrg    cygwin* | mingw* | pw32*)
7615a966c04fSmrg      # When not using gcc, we currently assume that we are using
7616a966c04fSmrg      # Microsoft Visual C++.
7617a966c04fSmrg      # hardcode_libdir_flag_spec is actually meaningless, as there is
7618a966c04fSmrg      # no search path for DLLs.
7619a966c04fSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
7620a966c04fSmrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
7621a966c04fSmrg      # Tell ltmain to make .lib files, not .a files.
7622a966c04fSmrg      libext=lib
7623a966c04fSmrg      # Tell ltmain to make .dll files, not .so files.
7624a966c04fSmrg      shrext_cmds=".dll"
7625a966c04fSmrg      # FIXME: Setting linknames here is a bad hack.
7626a966c04fSmrg      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
7627a966c04fSmrg      # The linker will automatically build a .lib file if we build a DLL.
7628a966c04fSmrg      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
7629a966c04fSmrg      # FIXME: Should let the user specify the lib program.
76302e2dd055Smrg      _LT_AC_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
7631a966c04fSmrg      _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
7632a966c04fSmrg      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
7633a966c04fSmrg      ;;
7634a966c04fSmrg
7635a966c04fSmrg    darwin* | rhapsody*)
7636a966c04fSmrg      case $host_os in
7637a966c04fSmrg        rhapsody* | darwin1.[[012]])
7638a966c04fSmrg         _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
7639a966c04fSmrg         ;;
7640a966c04fSmrg       *) # Darwin 1.3 on
7641a966c04fSmrg         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
7642a966c04fSmrg           _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
7643a966c04fSmrg         else
7644a966c04fSmrg           case ${MACOSX_DEPLOYMENT_TARGET} in
7645a966c04fSmrg             10.[[012]])
7646a966c04fSmrg               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
7647a966c04fSmrg               ;;
7648a966c04fSmrg             10.*)
7649a966c04fSmrg               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
7650a966c04fSmrg               ;;
7651a966c04fSmrg           esac
7652a966c04fSmrg         fi
7653a966c04fSmrg         ;;
7654a966c04fSmrg      esac
7655a966c04fSmrg      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
7656a966c04fSmrg      _LT_AC_TAGVAR(hardcode_direct, $1)=no
7657a966c04fSmrg      _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
7658a966c04fSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
7659a966c04fSmrg      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
7660a966c04fSmrg      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
7661a966c04fSmrg    if test "$GCC" = yes ; then
7662a966c04fSmrg    	output_verbose_link_cmd='echo'
76632e2dd055Smrg        _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}"
76642e2dd055Smrg        _LT_AC_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
76652e2dd055Smrg        _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}"
76662e2dd055Smrg        _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}"
7667a966c04fSmrg    else
7668a966c04fSmrg      case $cc_basename in
7669a966c04fSmrg        xlc*)
7670a966c04fSmrg         output_verbose_link_cmd='echo'
76712e2dd055Smrg         _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'
7672a966c04fSmrg         _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
7673a966c04fSmrg          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
76742e2dd055Smrg         _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}'
7675a966c04fSmrg          _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}'
7676a966c04fSmrg          ;;
7677a966c04fSmrg       *)
7678a966c04fSmrg         _LT_AC_TAGVAR(ld_shlibs, $1)=no
7679a966c04fSmrg          ;;
7680a966c04fSmrg      esac
7681a966c04fSmrg    fi
7682a966c04fSmrg      ;;
7683a966c04fSmrg
7684a966c04fSmrg    dgux*)
7685a966c04fSmrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7686a966c04fSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7687a966c04fSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7688a966c04fSmrg      ;;
7689a966c04fSmrg
7690a966c04fSmrg    freebsd1*)
7691a966c04fSmrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
7692a966c04fSmrg      ;;
7693a966c04fSmrg
7694a966c04fSmrg    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
7695a966c04fSmrg    # support.  Future versions do this automatically, but an explicit c++rt0.o
7696a966c04fSmrg    # does not break anything, and helps significantly (at the cost of a little
7697a966c04fSmrg    # extra space).
7698a966c04fSmrg    freebsd2.2*)
7699a966c04fSmrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
7700a966c04fSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7701a966c04fSmrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
7702a966c04fSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7703a966c04fSmrg      ;;
7704a966c04fSmrg
7705a966c04fSmrg    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
7706a966c04fSmrg    freebsd2*)
7707a966c04fSmrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
7708a966c04fSmrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
7709a966c04fSmrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
7710a966c04fSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7711a966c04fSmrg      ;;
7712a966c04fSmrg
7713a966c04fSmrg    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
77142e2dd055Smrg    freebsd* | dragonfly*)
7715a966c04fSmrg      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
7716a966c04fSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7717a966c04fSmrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
7718a966c04fSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7719a966c04fSmrg      ;;
7720a966c04fSmrg
7721a966c04fSmrg    hpux9*)
7722a966c04fSmrg      if test "$GCC" = yes; then
7723a966c04fSmrg	_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'
7724a966c04fSmrg      else
7725a966c04fSmrg	_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'
7726a966c04fSmrg      fi
7727a966c04fSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
7728a966c04fSmrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
7729a966c04fSmrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
7730a966c04fSmrg
7731a966c04fSmrg      # hardcode_minus_L: Not really in the search PATH,
7732a966c04fSmrg      # but as the default location of the library.
7733a966c04fSmrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
7734a966c04fSmrg      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7735a966c04fSmrg      ;;
7736a966c04fSmrg
7737a966c04fSmrg    hpux10*)
7738a966c04fSmrg      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
7739a966c04fSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
7740a966c04fSmrg      else
7741a966c04fSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
7742a966c04fSmrg      fi
7743a966c04fSmrg      if test "$with_gnu_ld" = no; then
7744a966c04fSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
7745a966c04fSmrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
7746a966c04fSmrg
7747a966c04fSmrg	_LT_AC_TAGVAR(hardcode_direct, $1)=yes
7748a966c04fSmrg	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7749a966c04fSmrg
7750a966c04fSmrg	# hardcode_minus_L: Not really in the search PATH,
7751a966c04fSmrg	# but as the default location of the library.
7752a966c04fSmrg	_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
7753a966c04fSmrg      fi
7754a966c04fSmrg      ;;
7755a966c04fSmrg
7756a966c04fSmrg    hpux11*)
7757a966c04fSmrg      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
7758a966c04fSmrg	case $host_cpu in
7759a966c04fSmrg	hppa*64*)
7760a966c04fSmrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
7761a966c04fSmrg	  ;;
7762a966c04fSmrg	ia64*)
7763a966c04fSmrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
7764a966c04fSmrg	  ;;
7765a966c04fSmrg	*)
7766a966c04fSmrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
7767a966c04fSmrg	  ;;
7768a966c04fSmrg	esac
7769a966c04fSmrg      else
7770a966c04fSmrg	case $host_cpu in
7771a966c04fSmrg	hppa*64*)
7772a966c04fSmrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
7773a966c04fSmrg	  ;;
7774a966c04fSmrg	ia64*)
7775a966c04fSmrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
7776a966c04fSmrg	  ;;
7777a966c04fSmrg	*)
7778a966c04fSmrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
7779a966c04fSmrg	  ;;
7780a966c04fSmrg	esac
7781a966c04fSmrg      fi
7782a966c04fSmrg      if test "$with_gnu_ld" = no; then
7783a966c04fSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
7784a966c04fSmrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
7785a966c04fSmrg
7786a966c04fSmrg	case $host_cpu in
7787a966c04fSmrg	hppa*64*|ia64*)
7788a966c04fSmrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
7789a966c04fSmrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=no
7790a966c04fSmrg	  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7791a966c04fSmrg	  ;;
7792a966c04fSmrg	*)
7793a966c04fSmrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes
7794a966c04fSmrg	  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7795a966c04fSmrg
7796a966c04fSmrg	  # hardcode_minus_L: Not really in the search PATH,
7797a966c04fSmrg	  # but as the default location of the library.
7798a966c04fSmrg	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
7799a966c04fSmrg	  ;;
7800a966c04fSmrg	esac
7801a966c04fSmrg      fi
7802a966c04fSmrg      ;;
7803a966c04fSmrg
7804a966c04fSmrg    irix5* | irix6* | nonstopux*)
7805a966c04fSmrg      if test "$GCC" = yes; then
7806a966c04fSmrg	_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'
7807a966c04fSmrg      else
7808a966c04fSmrg	_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'
7809a966c04fSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
7810a966c04fSmrg      fi
7811a966c04fSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7812a966c04fSmrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
7813a966c04fSmrg      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
7814a966c04fSmrg      ;;
7815a966c04fSmrg
7816a966c04fSmrg    netbsd*)
7817a966c04fSmrg      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
7818a966c04fSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
7819a966c04fSmrg      else
7820a966c04fSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
7821a966c04fSmrg      fi
7822a966c04fSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7823a966c04fSmrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
7824a966c04fSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7825a966c04fSmrg      ;;
7826a966c04fSmrg
7827a966c04fSmrg    newsos6)
7828a966c04fSmrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7829a966c04fSmrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
7830a966c04fSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7831a966c04fSmrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
7832a966c04fSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7833a966c04fSmrg      ;;
7834a966c04fSmrg
7835a966c04fSmrg    openbsd*)
78362e2dd055Smrg      if test -f /usr/libexec/ld.so; then
78372e2dd055Smrg	_LT_AC_TAGVAR(hardcode_direct, $1)=yes
78382e2dd055Smrg	_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
78392e2dd055Smrg	if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
78402e2dd055Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
78412e2dd055Smrg	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
78422e2dd055Smrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
78432e2dd055Smrg	  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
78442e2dd055Smrg	else
78452e2dd055Smrg	  case $host_os in
78462e2dd055Smrg	   openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
78472e2dd055Smrg	     _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
78482e2dd055Smrg	     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
78492e2dd055Smrg	     ;;
78502e2dd055Smrg	   *)
78512e2dd055Smrg	     _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
78522e2dd055Smrg	     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
78532e2dd055Smrg	     ;;
78542e2dd055Smrg	  esac
78552e2dd055Smrg        fi
7856a966c04fSmrg      else
78572e2dd055Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
7858a966c04fSmrg      fi
7859a966c04fSmrg      ;;
7860a966c04fSmrg
7861a966c04fSmrg    os2*)
7862a966c04fSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7863a966c04fSmrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
7864a966c04fSmrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
7865a966c04fSmrg      _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'
7866a966c04fSmrg      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
7867a966c04fSmrg      ;;
7868a966c04fSmrg
7869a966c04fSmrg    osf3*)
7870a966c04fSmrg      if test "$GCC" = yes; then
7871a966c04fSmrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
7872a966c04fSmrg	_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'
7873a966c04fSmrg      else
7874a966c04fSmrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
7875a966c04fSmrg	_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'
7876a966c04fSmrg      fi
7877a966c04fSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7878a966c04fSmrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
7879a966c04fSmrg      ;;
7880a966c04fSmrg
7881a966c04fSmrg    osf4* | osf5*)	# as osf3* with the addition of -msym flag
7882a966c04fSmrg      if test "$GCC" = yes; then
7883a966c04fSmrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
7884a966c04fSmrg	_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'
7885a966c04fSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7886a966c04fSmrg      else
7887a966c04fSmrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
7888a966c04fSmrg	_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'
7889a966c04fSmrg	_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~
7890a966c04fSmrg	$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'
7891a966c04fSmrg
7892a966c04fSmrg	# Both c and cxx compiler support -rpath directly
7893a966c04fSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
7894a966c04fSmrg      fi
7895a966c04fSmrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
7896a966c04fSmrg      ;;
7897a966c04fSmrg
7898a966c04fSmrg    solaris*)
7899a966c04fSmrg      _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
7900a966c04fSmrg      if test "$GCC" = yes; then
7901a966c04fSmrg	wlarc='${wl}'
7902a966c04fSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
7903a966c04fSmrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
7904a966c04fSmrg	  $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
7905a966c04fSmrg      else
7906a966c04fSmrg	wlarc=''
7907a966c04fSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
7908a966c04fSmrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
7909a966c04fSmrg  	$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
7910a966c04fSmrg      fi
7911a966c04fSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7912a966c04fSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7913a966c04fSmrg      case $host_os in
7914a966c04fSmrg      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
7915a966c04fSmrg      *)
79162e2dd055Smrg	# The compiler driver will combine and reorder linker options,
79172e2dd055Smrg	# but understands `-z linker_flag'.  GCC discards it without `$wl',
79182e2dd055Smrg	# but is careful enough not to reorder.
7919a966c04fSmrg 	# Supported since Solaris 2.6 (maybe 2.5.1?)
79202e2dd055Smrg	if test "$GCC" = yes; then
79212e2dd055Smrg	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
79222e2dd055Smrg	else
79232e2dd055Smrg	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
79242e2dd055Smrg	fi
79252e2dd055Smrg	;;
7926a966c04fSmrg      esac
7927a966c04fSmrg      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
7928a966c04fSmrg      ;;
7929a966c04fSmrg
7930a966c04fSmrg    sunos4*)
7931a966c04fSmrg      if test "x$host_vendor" = xsequent; then
7932a966c04fSmrg	# Use $CC to link under sequent, because it throws in some extra .o
7933a966c04fSmrg	# files that make .init and .fini sections work.
7934a966c04fSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
7935a966c04fSmrg      else
7936a966c04fSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
7937a966c04fSmrg      fi
7938a966c04fSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7939a966c04fSmrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
7940a966c04fSmrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
7941a966c04fSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7942a966c04fSmrg      ;;
7943a966c04fSmrg
7944a966c04fSmrg    sysv4)
7945a966c04fSmrg      case $host_vendor in
7946a966c04fSmrg	sni)
7947a966c04fSmrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7948a966c04fSmrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
7949a966c04fSmrg	;;
7950a966c04fSmrg	siemens)
7951a966c04fSmrg	  ## LD is ld it makes a PLAMLIB
7952a966c04fSmrg	  ## CC just makes a GrossModule.
7953a966c04fSmrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
7954a966c04fSmrg	  _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
7955a966c04fSmrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=no
7956a966c04fSmrg        ;;
7957a966c04fSmrg	motorola)
7958a966c04fSmrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7959a966c04fSmrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
7960a966c04fSmrg	;;
7961a966c04fSmrg      esac
7962a966c04fSmrg      runpath_var='LD_RUN_PATH'
7963a966c04fSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7964a966c04fSmrg      ;;
7965a966c04fSmrg
7966a966c04fSmrg    sysv4.3*)
7967a966c04fSmrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7968a966c04fSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7969a966c04fSmrg      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
7970a966c04fSmrg      ;;
7971a966c04fSmrg
7972a966c04fSmrg    sysv4*MP*)
7973a966c04fSmrg      if test -d /usr/nec; then
7974a966c04fSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7975a966c04fSmrg	_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7976a966c04fSmrg	runpath_var=LD_RUN_PATH
7977a966c04fSmrg	hardcode_runpath_var=yes
7978a966c04fSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=yes
7979a966c04fSmrg      fi
7980a966c04fSmrg      ;;
7981a966c04fSmrg
79822e2dd055Smrg    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
7983a966c04fSmrg      _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
7984a966c04fSmrg      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
7985a966c04fSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7986a966c04fSmrg      runpath_var='LD_RUN_PATH'
7987a966c04fSmrg
7988a966c04fSmrg      if test "$GCC" = yes; then
7989a966c04fSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7990a966c04fSmrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7991a966c04fSmrg      else
7992a966c04fSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7993a966c04fSmrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7994a966c04fSmrg      fi
7995a966c04fSmrg      ;;
7996a966c04fSmrg
7997a966c04fSmrg    sysv5* | sco3.2v5* | sco5v6*)
7998a966c04fSmrg      # Note: We can NOT use -z defs as we might desire, because we do not
7999a966c04fSmrg      # link with -lc, and that would cause any symbols used from libc to
8000a966c04fSmrg      # always be unresolved, which means just about no library would
8001a966c04fSmrg      # ever link correctly.  If we're not using GNU ld we use -z text
8002a966c04fSmrg      # though, which does catch some bad symbols but isn't as heavy-handed
8003a966c04fSmrg      # as -z defs.
8004a966c04fSmrg      _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
8005a966c04fSmrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
8006a966c04fSmrg      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
8007a966c04fSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
8008a966c04fSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
8009a966c04fSmrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
8010a966c04fSmrg      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
8011a966c04fSmrg      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
8012a966c04fSmrg      runpath_var='LD_RUN_PATH'
8013a966c04fSmrg
8014a966c04fSmrg      if test "$GCC" = yes; then
8015a966c04fSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
8016a966c04fSmrg	_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'
8017a966c04fSmrg      else
8018a966c04fSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
8019a966c04fSmrg	_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'
8020a966c04fSmrg      fi
8021a966c04fSmrg      ;;
8022a966c04fSmrg
8023a966c04fSmrg    uts4*)
8024a966c04fSmrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8025a966c04fSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
8026a966c04fSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
8027a966c04fSmrg      ;;
8028a966c04fSmrg
8029a966c04fSmrg    *)
8030a966c04fSmrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
8031a966c04fSmrg      ;;
8032a966c04fSmrg    esac
8033a966c04fSmrg  fi
8034a966c04fSmrg])
8035a966c04fSmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
8036a966c04fSmrgtest "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
8037a966c04fSmrg
8038a966c04fSmrg#
8039a966c04fSmrg# Do we need to explicitly link libc?
8040a966c04fSmrg#
8041a966c04fSmrgcase "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
8042a966c04fSmrgx|xyes)
8043a966c04fSmrg  # Assume -lc should be added
8044a966c04fSmrg  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
8045a966c04fSmrg
8046a966c04fSmrg  if test "$enable_shared" = yes && test "$GCC" = yes; then
8047a966c04fSmrg    case $_LT_AC_TAGVAR(archive_cmds, $1) in
8048a966c04fSmrg    *'~'*)
8049a966c04fSmrg      # FIXME: we may have to deal with multi-command sequences.
8050a966c04fSmrg      ;;
8051a966c04fSmrg    '$CC '*)
8052a966c04fSmrg      # Test whether the compiler implicitly links with -lc since on some
8053a966c04fSmrg      # systems, -lgcc has to come before -lc. If gcc already passes -lc
8054a966c04fSmrg      # to ld, don't add -lc before -lgcc.
8055a966c04fSmrg      AC_MSG_CHECKING([whether -lc should be explicitly linked in])
8056a966c04fSmrg      $rm conftest*
80572e2dd055Smrg      echo "$lt_simple_compile_test_code" > conftest.$ac_ext
8058a966c04fSmrg
8059a966c04fSmrg      if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
8060a966c04fSmrg        soname=conftest
8061a966c04fSmrg        lib=conftest
8062a966c04fSmrg        libobjs=conftest.$ac_objext
8063a966c04fSmrg        deplibs=
8064a966c04fSmrg        wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
8065a966c04fSmrg	pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
8066a966c04fSmrg        compiler_flags=-v
8067a966c04fSmrg        linker_flags=-v
8068a966c04fSmrg        verstring=
8069a966c04fSmrg        output_objdir=.
8070a966c04fSmrg        libname=conftest
8071a966c04fSmrg        lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
8072a966c04fSmrg        _LT_AC_TAGVAR(allow_undefined_flag, $1)=
8073a966c04fSmrg        if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
8074a966c04fSmrg        then
8075a966c04fSmrg	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
8076a966c04fSmrg        else
8077a966c04fSmrg	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
8078a966c04fSmrg        fi
8079a966c04fSmrg        _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
8080a966c04fSmrg      else
8081a966c04fSmrg        cat conftest.err 1>&5
8082a966c04fSmrg      fi
8083a966c04fSmrg      $rm conftest*
8084a966c04fSmrg      AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
8085a966c04fSmrg      ;;
8086a966c04fSmrg    esac
8087a966c04fSmrg  fi
8088a966c04fSmrg  ;;
8089a966c04fSmrgesac
8090a966c04fSmrg])# AC_LIBTOOL_PROG_LD_SHLIBS
8091a966c04fSmrg
8092a966c04fSmrg
8093a966c04fSmrg# _LT_AC_FILE_LTDLL_C
8094a966c04fSmrg# -------------------
8095a966c04fSmrg# Be careful that the start marker always follows a newline.
8096a966c04fSmrgAC_DEFUN([_LT_AC_FILE_LTDLL_C], [
8097a966c04fSmrg# /* ltdll.c starts here */
8098a966c04fSmrg# #define WIN32_LEAN_AND_MEAN
8099a966c04fSmrg# #include <windows.h>
8100a966c04fSmrg# #undef WIN32_LEAN_AND_MEAN
8101a966c04fSmrg# #include <stdio.h>
8102a966c04fSmrg#
8103a966c04fSmrg# #ifndef __CYGWIN__
8104a966c04fSmrg# #  ifdef __CYGWIN32__
8105a966c04fSmrg# #    define __CYGWIN__ __CYGWIN32__
8106a966c04fSmrg# #  endif
8107a966c04fSmrg# #endif
8108a966c04fSmrg#
8109a966c04fSmrg# #ifdef __cplusplus
8110a966c04fSmrg# extern "C" {
8111a966c04fSmrg# #endif
8112a966c04fSmrg# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
8113a966c04fSmrg# #ifdef __cplusplus
8114a966c04fSmrg# }
8115a966c04fSmrg# #endif
8116a966c04fSmrg#
8117a966c04fSmrg# #ifdef __CYGWIN__
8118a966c04fSmrg# #include <cygwin/cygwin_dll.h>
8119a966c04fSmrg# DECLARE_CYGWIN_DLL( DllMain );
8120a966c04fSmrg# #endif
8121a966c04fSmrg# HINSTANCE __hDllInstance_base;
8122a966c04fSmrg#
8123a966c04fSmrg# BOOL APIENTRY
8124a966c04fSmrg# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
8125a966c04fSmrg# {
8126a966c04fSmrg#   __hDllInstance_base = hInst;
8127a966c04fSmrg#   return TRUE;
8128a966c04fSmrg# }
8129a966c04fSmrg# /* ltdll.c ends here */
8130a966c04fSmrg])# _LT_AC_FILE_LTDLL_C
8131a966c04fSmrg
8132a966c04fSmrg
8133a966c04fSmrg# _LT_AC_TAGVAR(VARNAME, [TAGNAME])
8134a966c04fSmrg# ---------------------------------
8135a966c04fSmrgAC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
8136a966c04fSmrg
8137a966c04fSmrg
8138a966c04fSmrg# old names
8139a966c04fSmrgAC_DEFUN([AM_PROG_LIBTOOL],   [AC_PROG_LIBTOOL])
8140a966c04fSmrgAC_DEFUN([AM_ENABLE_SHARED],  [AC_ENABLE_SHARED($@)])
8141a966c04fSmrgAC_DEFUN([AM_ENABLE_STATIC],  [AC_ENABLE_STATIC($@)])
8142a966c04fSmrgAC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
8143a966c04fSmrgAC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
8144a966c04fSmrgAC_DEFUN([AM_PROG_LD],        [AC_PROG_LD])
8145a966c04fSmrgAC_DEFUN([AM_PROG_NM],        [AC_PROG_NM])
8146a966c04fSmrg
8147a966c04fSmrg# This is just to silence aclocal about the macro not being used
8148a966c04fSmrgifelse([AC_DISABLE_FAST_INSTALL])
8149a966c04fSmrg
8150a966c04fSmrgAC_DEFUN([LT_AC_PROG_GCJ],
8151a966c04fSmrg[AC_CHECK_TOOL(GCJ, gcj, no)
8152a966c04fSmrg  test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
8153a966c04fSmrg  AC_SUBST(GCJFLAGS)
8154a966c04fSmrg])
8155a966c04fSmrg
8156a966c04fSmrgAC_DEFUN([LT_AC_PROG_RC],
8157a966c04fSmrg[AC_CHECK_TOOL(RC, windres, no)
8158a966c04fSmrg])
8159a966c04fSmrg
81602e2dd055Smrg
81612e2dd055Smrg# Cheap backport of AS_EXECUTABLE_P and required macros
81622e2dd055Smrg# from Autoconf 2.59; we should not use $as_executable_p directly.
81632e2dd055Smrg
81642e2dd055Smrg# _AS_TEST_PREPARE
81652e2dd055Smrg# ----------------
81662e2dd055Smrgm4_ifndef([_AS_TEST_PREPARE],
81672e2dd055Smrg[m4_defun([_AS_TEST_PREPARE],
81682e2dd055Smrg[if test -x / >/dev/null 2>&1; then
81692e2dd055Smrg  as_executable_p='test -x'
81702e2dd055Smrgelse
81712e2dd055Smrg  as_executable_p='test -f'
81722e2dd055Smrgfi
81732e2dd055Smrg])])# _AS_TEST_PREPARE
81742e2dd055Smrg
81752e2dd055Smrg# AS_EXECUTABLE_P
81762e2dd055Smrg# ---------------
81772e2dd055Smrg# Check whether a file is executable.
81782e2dd055Smrgm4_ifndef([AS_EXECUTABLE_P],
81792e2dd055Smrg[m4_defun([AS_EXECUTABLE_P],
81802e2dd055Smrg[AS_REQUIRE([_AS_TEST_PREPARE])dnl
81812e2dd055Smrg$as_executable_p $1[]dnl
81822e2dd055Smrg])])# AS_EXECUTABLE_P
81832e2dd055Smrg
8184a966c04fSmrg# NOTE: This macro has been submitted for inclusion into   #
8185a966c04fSmrg#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
8186a966c04fSmrg#  a released version of Autoconf we should remove this    #
8187a966c04fSmrg#  macro and use it instead.                               #
8188a966c04fSmrg# LT_AC_PROG_SED
8189a966c04fSmrg# --------------
8190a966c04fSmrg# Check for a fully-functional sed program, that truncates
8191a966c04fSmrg# as few characters as possible.  Prefer GNU sed if found.
8192a966c04fSmrgAC_DEFUN([LT_AC_PROG_SED],
8193a966c04fSmrg[AC_MSG_CHECKING([for a sed that does not truncate output])
8194a966c04fSmrgAC_CACHE_VAL(lt_cv_path_SED,
8195a966c04fSmrg[# Loop through the user's path and test for sed and gsed.
8196a966c04fSmrg# Then use that list of sed's as ones to test for truncation.
8197a966c04fSmrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8198a966c04fSmrgfor as_dir in $PATH
8199a966c04fSmrgdo
8200a966c04fSmrg  IFS=$as_save_IFS
8201a966c04fSmrg  test -z "$as_dir" && as_dir=.
8202a966c04fSmrg  for lt_ac_prog in sed gsed; do
8203a966c04fSmrg    for ac_exec_ext in '' $ac_executable_extensions; do
82042e2dd055Smrg      if AS_EXECUTABLE_P(["$as_dir/$lt_ac_prog$ac_exec_ext"]); then
8205a966c04fSmrg        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
8206a966c04fSmrg      fi
8207a966c04fSmrg    done
8208a966c04fSmrg  done
8209a966c04fSmrgdone
82102e2dd055SmrgIFS=$as_save_IFS
8211a966c04fSmrglt_ac_max=0
8212a966c04fSmrglt_ac_count=0
8213a966c04fSmrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris
8214a966c04fSmrg# along with /bin/sed that truncates output.
8215a966c04fSmrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
8216a966c04fSmrg  test ! -f $lt_ac_sed && continue
8217a966c04fSmrg  cat /dev/null > conftest.in
8218a966c04fSmrg  lt_ac_count=0
8219a966c04fSmrg  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
8220a966c04fSmrg  # Check for GNU sed and select it if it is found.
8221a966c04fSmrg  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
8222a966c04fSmrg    lt_cv_path_SED=$lt_ac_sed
8223a966c04fSmrg    break
8224a966c04fSmrg  fi
8225a966c04fSmrg  while true; do
8226a966c04fSmrg    cat conftest.in conftest.in >conftest.tmp
8227a966c04fSmrg    mv conftest.tmp conftest.in
8228a966c04fSmrg    cp conftest.in conftest.nl
8229a966c04fSmrg    echo >>conftest.nl
8230a966c04fSmrg    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
8231a966c04fSmrg    cmp -s conftest.out conftest.nl || break
8232a966c04fSmrg    # 10000 chars as input seems more than enough
8233a966c04fSmrg    test $lt_ac_count -gt 10 && break
8234a966c04fSmrg    lt_ac_count=`expr $lt_ac_count + 1`
8235a966c04fSmrg    if test $lt_ac_count -gt $lt_ac_max; then
8236a966c04fSmrg      lt_ac_max=$lt_ac_count
8237a966c04fSmrg      lt_cv_path_SED=$lt_ac_sed
8238a966c04fSmrg    fi
8239a966c04fSmrg  done
8240a966c04fSmrgdone
8241a966c04fSmrg])
8242a966c04fSmrgSED=$lt_cv_path_SED
82432e2dd055SmrgAC_SUBST([SED])
8244a966c04fSmrgAC_MSG_RESULT([$SED])
8245a966c04fSmrg])
8246a966c04fSmrg
8247a966c04fSmrg# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
8248a966c04fSmrg# 
8249a966c04fSmrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
8250a966c04fSmrg#
8251a966c04fSmrg# This program is free software; you can redistribute it and/or modify
8252a966c04fSmrg# it under the terms of the GNU General Public License as published by
8253a966c04fSmrg# the Free Software Foundation; either version 2 of the License, or
8254a966c04fSmrg# (at your option) any later version.
8255a966c04fSmrg#
8256a966c04fSmrg# This program is distributed in the hope that it will be useful, but
8257a966c04fSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of
8258a966c04fSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
8259a966c04fSmrg# General Public License for more details.
8260a966c04fSmrg#
8261a966c04fSmrg# You should have received a copy of the GNU General Public License
8262a966c04fSmrg# along with this program; if not, write to the Free Software
8263a966c04fSmrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
8264a966c04fSmrg#
8265a966c04fSmrg# As a special exception to the GNU General Public License, if you
8266a966c04fSmrg# distribute this file as part of a program that contains a
8267a966c04fSmrg# configuration script generated by Autoconf, you may include it under
8268a966c04fSmrg# the same distribution terms that you use for the rest of that program.
8269a966c04fSmrg
8270a966c04fSmrg# PKG_PROG_PKG_CONFIG([MIN-VERSION])
8271a966c04fSmrg# ----------------------------------
8272a966c04fSmrgAC_DEFUN([PKG_PROG_PKG_CONFIG],
8273a966c04fSmrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
8274a966c04fSmrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$])
8275a966c04fSmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
8276a966c04fSmrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
8277a966c04fSmrg	AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
8278a966c04fSmrgfi
8279a966c04fSmrgif test -n "$PKG_CONFIG"; then
82802e2dd055Smrg	_pkg_min_version=m4_default([$1], [0.9.0])
8281a966c04fSmrg	AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
8282a966c04fSmrg	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
8283a966c04fSmrg		AC_MSG_RESULT([yes])
8284a966c04fSmrg	else
8285a966c04fSmrg		AC_MSG_RESULT([no])
8286a966c04fSmrg		PKG_CONFIG=""
8287a966c04fSmrg	fi
8288a966c04fSmrg		
8289a966c04fSmrgfi[]dnl
8290a966c04fSmrg])# PKG_PROG_PKG_CONFIG
8291a966c04fSmrg
8292a966c04fSmrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
8293a966c04fSmrg#
8294a966c04fSmrg# Check to see whether a particular set of modules exists.  Similar
8295a966c04fSmrg# to PKG_CHECK_MODULES(), but does not set variables or print errors.
8296a966c04fSmrg#
8297a966c04fSmrg#
8298a966c04fSmrg# Similar to PKG_CHECK_MODULES, make sure that the first instance of
8299a966c04fSmrg# this or PKG_CHECK_MODULES is called, or make sure to call
8300a966c04fSmrg# PKG_CHECK_EXISTS manually
8301a966c04fSmrg# --------------------------------------------------------------
8302a966c04fSmrgAC_DEFUN([PKG_CHECK_EXISTS],
8303a966c04fSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
8304a966c04fSmrgif test -n "$PKG_CONFIG" && \
8305a966c04fSmrg    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
8306a966c04fSmrg  m4_ifval([$2], [$2], [:])
8307a966c04fSmrgm4_ifvaln([$3], [else
8308a966c04fSmrg  $3])dnl
8309a966c04fSmrgfi])
8310a966c04fSmrg
8311a966c04fSmrg
8312a966c04fSmrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
8313a966c04fSmrg# ---------------------------------------------
8314a966c04fSmrgm4_define([_PKG_CONFIG],
83152e2dd055Smrg[if test -n "$$1"; then
83162e2dd055Smrg    pkg_cv_[]$1="$$1"
83172e2dd055Smrg elif test -n "$PKG_CONFIG"; then
83182e2dd055Smrg    PKG_CHECK_EXISTS([$3],
83192e2dd055Smrg                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
83202e2dd055Smrg		     [pkg_failed=yes])
83212e2dd055Smrg else
83222e2dd055Smrg    pkg_failed=untried
8323a966c04fSmrgfi[]dnl
8324a966c04fSmrg])# _PKG_CONFIG
8325a966c04fSmrg
83262e2dd055Smrg# _PKG_SHORT_ERRORS_SUPPORTED
83272e2dd055Smrg# -----------------------------
83282e2dd055SmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
83292e2dd055Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
83302e2dd055Smrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
83312e2dd055Smrg        _pkg_short_errors_supported=yes
83322e2dd055Smrgelse
83332e2dd055Smrg        _pkg_short_errors_supported=no
83342e2dd055Smrgfi[]dnl
83352e2dd055Smrg])# _PKG_SHORT_ERRORS_SUPPORTED
83362e2dd055Smrg
83372e2dd055Smrg
8338a966c04fSmrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
8339a966c04fSmrg# [ACTION-IF-NOT-FOUND])
8340a966c04fSmrg#
8341a966c04fSmrg#
8342a966c04fSmrg# Note that if there is a possibility the first call to
8343a966c04fSmrg# PKG_CHECK_MODULES might not happen, you should be sure to include an
8344a966c04fSmrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
8345a966c04fSmrg#
8346a966c04fSmrg#
8347a966c04fSmrg# --------------------------------------------------------------
8348a966c04fSmrgAC_DEFUN([PKG_CHECK_MODULES],
8349a966c04fSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
8350a966c04fSmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
8351a966c04fSmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
8352a966c04fSmrg
8353a966c04fSmrgpkg_failed=no
8354a966c04fSmrgAC_MSG_CHECKING([for $1])
8355a966c04fSmrg
8356a966c04fSmrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
8357a966c04fSmrg_PKG_CONFIG([$1][_LIBS], [libs], [$2])
8358a966c04fSmrg
83592e2dd055Smrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
83602e2dd055Smrgand $1[]_LIBS to avoid the need to call pkg-config.
83612e2dd055SmrgSee the pkg-config man page for more details.])
83622e2dd055Smrg
8363a966c04fSmrgif test $pkg_failed = yes; then
83642e2dd055Smrg        _PKG_SHORT_ERRORS_SUPPORTED
83652e2dd055Smrg        if test $_pkg_short_errors_supported = yes; then
83662e2dd055Smrg	        $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
83672e2dd055Smrg        else 
83682e2dd055Smrg	        $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
83692e2dd055Smrg        fi
8370a966c04fSmrg	# Put the nasty error message in config.log where it belongs
83712e2dd055Smrg	echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
8372a966c04fSmrg
8373a966c04fSmrg	ifelse([$4], , [AC_MSG_ERROR(dnl
83742e2dd055Smrg[Package requirements ($2) were not met:
83752e2dd055Smrg
83762e2dd055Smrg$$1_PKG_ERRORS
83772e2dd055Smrg
8378a966c04fSmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you
8379a966c04fSmrginstalled software in a non-standard prefix.
8380a966c04fSmrg
83812e2dd055Smrg_PKG_TEXT
83822e2dd055Smrg])],
83832e2dd055Smrg		[AC_MSG_RESULT([no])
83842e2dd055Smrg                $4])
8385a966c04fSmrgelif test $pkg_failed = untried; then
8386a966c04fSmrg	ifelse([$4], , [AC_MSG_FAILURE(dnl
8387a966c04fSmrg[The pkg-config script could not be found or is too old.  Make sure it
8388a966c04fSmrgis in your PATH or set the PKG_CONFIG environment variable to the full
8389a966c04fSmrgpath to pkg-config.
8390a966c04fSmrg
83912e2dd055Smrg_PKG_TEXT
8392a966c04fSmrg
83932e2dd055SmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
8394a966c04fSmrg		[$4])
8395a966c04fSmrgelse
8396a966c04fSmrg	$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
8397a966c04fSmrg	$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
8398a966c04fSmrg        AC_MSG_RESULT([yes])
8399a966c04fSmrg	ifelse([$3], , :, [$3])
8400a966c04fSmrgfi[]dnl
8401a966c04fSmrg])# PKG_CHECK_MODULES
8402a966c04fSmrg
8403a966c04fSmrgm4_include([acinclude.m4])
8404