aclocal.m4 revision 629baa8c
15ffd6003Smrg# generated automatically by aclocal 1.11.1 -*- Autoconf -*-
2145b7b3cSmrg
3145b7b3cSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4578741aaSmrg# 2005, 2006, 2007, 2008, 2009  Free Software Foundation, Inc.
5145b7b3cSmrg# This file is free software; the Free Software Foundation
6145b7b3cSmrg# gives unlimited permission to copy and/or distribute it,
7145b7b3cSmrg# with or without modifications, as long as this notice is preserved.
8145b7b3cSmrg
9145b7b3cSmrg# This program is distributed in the hope that it will be useful,
10145b7b3cSmrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11145b7b3cSmrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12145b7b3cSmrg# PARTICULAR PURPOSE.
13145b7b3cSmrg
14578741aaSmrgm4_ifndef([AC_AUTOCONF_VERSION],
15578741aaSmrg  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
16629baa8cSmrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],,
17629baa8cSmrg[m4_warning([this file was generated for autoconf 2.68.
18578741aaSmrgYou have another version of autoconf.  It may work, but is not guaranteed to.
19578741aaSmrgIf you have problems, you may need to regenerate the build system entirely.
20578741aaSmrgTo do so, use the procedure documented by the package, typically `autoreconf'.])])
21145b7b3cSmrg
22629baa8cSmrg# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
235ffd6003Smrg#
24629baa8cSmrg# This file is free software; the Free Software Foundation
25629baa8cSmrg# gives unlimited permission to copy and/or distribute it,
26629baa8cSmrg# with or without modifications, as long as this notice is preserved.
27145b7b3cSmrg
28629baa8cSmrg# AM_AUTOMAKE_VERSION(VERSION)
29629baa8cSmrg# ----------------------------
30629baa8cSmrg# Automake X.Y traces this macro to ensure aclocal.m4 has been
31629baa8cSmrg# generated from the m4 files accompanying Automake X.Y.
32629baa8cSmrg# (This private macro should not be called outside this file.)
33629baa8cSmrgAC_DEFUN([AM_AUTOMAKE_VERSION],
34629baa8cSmrg[am__api_version='1.11'
35629baa8cSmrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
36629baa8cSmrgdnl require some minimum version.  Point them to the right macro.
37629baa8cSmrgm4_if([$1], [1.11.1], [],
38629baa8cSmrg      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
39629baa8cSmrg])
40145b7b3cSmrg
41629baa8cSmrg# _AM_AUTOCONF_VERSION(VERSION)
42629baa8cSmrg# -----------------------------
43629baa8cSmrg# aclocal traces this macro to find the Autoconf version.
44629baa8cSmrg# This is a private macro too.  Using m4_define simplifies
45629baa8cSmrg# the logic in aclocal, which can simply ignore this definition.
46629baa8cSmrgm4_define([_AM_AUTOCONF_VERSION], [])
47145b7b3cSmrg
48629baa8cSmrg# AM_SET_CURRENT_AUTOMAKE_VERSION
49629baa8cSmrg# -------------------------------
50629baa8cSmrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
51629baa8cSmrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
52629baa8cSmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
53629baa8cSmrg[AM_AUTOMAKE_VERSION([1.11.1])dnl
54629baa8cSmrgm4_ifndef([AC_AUTOCONF_VERSION],
55629baa8cSmrg  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
56629baa8cSmrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
57145b7b3cSmrg
58629baa8cSmrg# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
59145b7b3cSmrg
60629baa8cSmrg# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
61629baa8cSmrg#
62629baa8cSmrg# This file is free software; the Free Software Foundation
63629baa8cSmrg# gives unlimited permission to copy and/or distribute it,
64629baa8cSmrg# with or without modifications, as long as this notice is preserved.
655ffd6003Smrg
66629baa8cSmrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
67629baa8cSmrg# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
68629baa8cSmrg# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
69145b7b3cSmrg#
70629baa8cSmrg# Of course, Automake must honor this variable whenever it calls a
71629baa8cSmrg# tool from the auxiliary directory.  The problem is that $srcdir (and
72629baa8cSmrg# therefore $ac_aux_dir as well) can be either absolute or relative,
73629baa8cSmrg# depending on how configure is run.  This is pretty annoying, since
74629baa8cSmrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top
75629baa8cSmrg# source directory, any form will work fine, but in subdirectories a
76629baa8cSmrg# relative path needs to be adjusted first.
77145b7b3cSmrg#
78629baa8cSmrg# $ac_aux_dir/missing
79629baa8cSmrg#    fails when called from a subdirectory if $ac_aux_dir is relative
80629baa8cSmrg# $top_srcdir/$ac_aux_dir/missing
81629baa8cSmrg#    fails if $ac_aux_dir is absolute,
82629baa8cSmrg#    fails when called from a subdirectory in a VPATH build with
83629baa8cSmrg#          a relative $ac_aux_dir
84145b7b3cSmrg#
85629baa8cSmrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
86629baa8cSmrg# are both prefixed by $srcdir.  In an in-source build this is usually
87629baa8cSmrg# harmless because $srcdir is `.', but things will broke when you
88629baa8cSmrg# start a VPATH build or use an absolute $srcdir.
89145b7b3cSmrg#
90629baa8cSmrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
91629baa8cSmrg# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
92629baa8cSmrg#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
93629baa8cSmrg# and then we would define $MISSING as
94629baa8cSmrg#   MISSING="\${SHELL} $am_aux_dir/missing"
95629baa8cSmrg# This will work as long as MISSING is not called from configure, because
96629baa8cSmrg# unfortunately $(top_srcdir) has no meaning in configure.
97629baa8cSmrg# However there are other variables, like CC, which are often used in
98629baa8cSmrg# configure, and could therefore not use this "fixed" $ac_aux_dir.
99629baa8cSmrg#
100629baa8cSmrg# Another solution, used here, is to always expand $ac_aux_dir to an
101629baa8cSmrg# absolute PATH.  The drawback is that using absolute paths prevent a
102629baa8cSmrg# configured tree to be moved without reconfiguration.
103145b7b3cSmrg
104629baa8cSmrgAC_DEFUN([AM_AUX_DIR_EXPAND],
105629baa8cSmrg[dnl Rely on autoconf to set up CDPATH properly.
106629baa8cSmrgAC_PREREQ([2.50])dnl
107629baa8cSmrg# expand $ac_aux_dir to an absolute path
108629baa8cSmrgam_aux_dir=`cd $ac_aux_dir && pwd`
109629baa8cSmrg])
110145b7b3cSmrg
111629baa8cSmrg# AM_CONDITIONAL                                            -*- Autoconf -*-
112145b7b3cSmrg
113629baa8cSmrg# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
114629baa8cSmrg# Free Software Foundation, Inc.
115629baa8cSmrg#
116629baa8cSmrg# This file is free software; the Free Software Foundation
117629baa8cSmrg# gives unlimited permission to copy and/or distribute it,
118629baa8cSmrg# with or without modifications, as long as this notice is preserved.
119145b7b3cSmrg
120629baa8cSmrg# serial 9
121145b7b3cSmrg
122629baa8cSmrg# AM_CONDITIONAL(NAME, SHELL-CONDITION)
123629baa8cSmrg# -------------------------------------
124629baa8cSmrg# Define a conditional.
125629baa8cSmrgAC_DEFUN([AM_CONDITIONAL],
126629baa8cSmrg[AC_PREREQ(2.52)dnl
127629baa8cSmrg ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
128629baa8cSmrg	[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
129629baa8cSmrgAC_SUBST([$1_TRUE])dnl
130629baa8cSmrgAC_SUBST([$1_FALSE])dnl
131629baa8cSmrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl
132629baa8cSmrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl
133629baa8cSmrgm4_define([_AM_COND_VALUE_$1], [$2])dnl
134629baa8cSmrgif $2; then
135629baa8cSmrg  $1_TRUE=
136629baa8cSmrg  $1_FALSE='#'
137629baa8cSmrgelse
138629baa8cSmrg  $1_TRUE='#'
139629baa8cSmrg  $1_FALSE=
140629baa8cSmrgfi
141629baa8cSmrgAC_CONFIG_COMMANDS_PRE(
142629baa8cSmrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
143629baa8cSmrg  AC_MSG_ERROR([[conditional "$1" was never defined.
144629baa8cSmrgUsually this means the macro was only invoked conditionally.]])
145629baa8cSmrgfi])])
146145b7b3cSmrg
147629baa8cSmrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
148629baa8cSmrg# Free Software Foundation, Inc.
149629baa8cSmrg#
150629baa8cSmrg# This file is free software; the Free Software Foundation
151629baa8cSmrg# gives unlimited permission to copy and/or distribute it,
152629baa8cSmrg# with or without modifications, as long as this notice is preserved.
153145b7b3cSmrg
154629baa8cSmrg# serial 10
155145b7b3cSmrg
156629baa8cSmrg# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
157629baa8cSmrg# written in clear, in which case automake, when reading aclocal.m4,
158629baa8cSmrg# will think it sees a *use*, and therefore will trigger all it's
159629baa8cSmrg# C support machinery.  Also note that it means that autoscan, seeing
160629baa8cSmrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
161145b7b3cSmrg
162145b7b3cSmrg
163629baa8cSmrg# _AM_DEPENDENCIES(NAME)
164629baa8cSmrg# ----------------------
165629baa8cSmrg# See how the compiler implements dependency checking.
166629baa8cSmrg# NAME is "CC", "CXX", "GCJ", or "OBJC".
167629baa8cSmrg# We try a few techniques and use that to set a single cache variable.
168629baa8cSmrg#
169629baa8cSmrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
170629baa8cSmrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
171629baa8cSmrg# dependency, and given that the user is not expected to run this macro,
172629baa8cSmrg# just rely on AC_PROG_CC.
173629baa8cSmrgAC_DEFUN([_AM_DEPENDENCIES],
174629baa8cSmrg[AC_REQUIRE([AM_SET_DEPDIR])dnl
175629baa8cSmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
176629baa8cSmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl
177629baa8cSmrgAC_REQUIRE([AM_DEP_TRACK])dnl
178145b7b3cSmrg
179629baa8cSmrgifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
180629baa8cSmrg       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
181629baa8cSmrg       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
182629baa8cSmrg       [$1], UPC,  [depcc="$UPC"  am_compiler_list=],
183629baa8cSmrg       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
184629baa8cSmrg                   [depcc="$$1"   am_compiler_list=])
185578741aaSmrg
186629baa8cSmrgAC_CACHE_CHECK([dependency style of $depcc],
187629baa8cSmrg               [am_cv_$1_dependencies_compiler_type],
188629baa8cSmrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
189629baa8cSmrg  # We make a subdir and do the tests there.  Otherwise we can end up
190629baa8cSmrg  # making bogus files that we don't know about and never remove.  For
191629baa8cSmrg  # instance it was reported that on HP-UX the gcc test will end up
192629baa8cSmrg  # making a dummy file named `D' -- because `-MD' means `put the output
193629baa8cSmrg  # in D'.
194629baa8cSmrg  mkdir conftest.dir
195629baa8cSmrg  # Copy depcomp to subdir because otherwise we won't find it if we're
196629baa8cSmrg  # using a relative directory.
197629baa8cSmrg  cp "$am_depcomp" conftest.dir
198629baa8cSmrg  cd conftest.dir
199629baa8cSmrg  # We will build objects and dependencies in a subdirectory because
200629baa8cSmrg  # it helps to detect inapplicable dependency modes.  For instance
201629baa8cSmrg  # both Tru64's cc and ICC support -MD to output dependencies as a
202629baa8cSmrg  # side effect of compilation, but ICC will put the dependencies in
203629baa8cSmrg  # the current directory while Tru64 will put them in the object
204629baa8cSmrg  # directory.
205629baa8cSmrg  mkdir sub
206145b7b3cSmrg
207629baa8cSmrg  am_cv_$1_dependencies_compiler_type=none
208629baa8cSmrg  if test "$am_compiler_list" = ""; then
209629baa8cSmrg     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
210629baa8cSmrg  fi
211629baa8cSmrg  am__universal=false
212629baa8cSmrg  m4_case([$1], [CC],
213629baa8cSmrg    [case " $depcc " in #(
214629baa8cSmrg     *\ -arch\ *\ -arch\ *) am__universal=true ;;
215629baa8cSmrg     esac],
216629baa8cSmrg    [CXX],
217629baa8cSmrg    [case " $depcc " in #(
218629baa8cSmrg     *\ -arch\ *\ -arch\ *) am__universal=true ;;
219629baa8cSmrg     esac])
220145b7b3cSmrg
221629baa8cSmrg  for depmode in $am_compiler_list; do
222629baa8cSmrg    # Setup a source with many dependencies, because some compilers
223629baa8cSmrg    # like to wrap large dependency lists on column 80 (with \), and
224629baa8cSmrg    # we should not choose a depcomp mode which is confused by this.
225629baa8cSmrg    #
226629baa8cSmrg    # We need to recreate these files for each test, as the compiler may
227629baa8cSmrg    # overwrite some of them when testing with obscure command lines.
228629baa8cSmrg    # This happens at least with the AIX C compiler.
229629baa8cSmrg    : > sub/conftest.c
230629baa8cSmrg    for i in 1 2 3 4 5 6; do
231629baa8cSmrg      echo '#include "conftst'$i'.h"' >> sub/conftest.c
232629baa8cSmrg      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
233629baa8cSmrg      # Solaris 8's {/usr,}/bin/sh.
234629baa8cSmrg      touch sub/conftst$i.h
235629baa8cSmrg    done
236629baa8cSmrg    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
237145b7b3cSmrg
238629baa8cSmrg    # We check with `-c' and `-o' for the sake of the "dashmstdout"
239629baa8cSmrg    # mode.  It turns out that the SunPro C++ compiler does not properly
240629baa8cSmrg    # handle `-M -o', and we need to detect this.  Also, some Intel
241629baa8cSmrg    # versions had trouble with output in subdirs
242629baa8cSmrg    am__obj=sub/conftest.${OBJEXT-o}
243629baa8cSmrg    am__minus_obj="-o $am__obj"
244629baa8cSmrg    case $depmode in
245629baa8cSmrg    gcc)
246629baa8cSmrg      # This depmode causes a compiler race in universal mode.
247629baa8cSmrg      test "$am__universal" = false || continue
248629baa8cSmrg      ;;
249629baa8cSmrg    nosideeffect)
250629baa8cSmrg      # after this tag, mechanisms are not by side-effect, so they'll
251629baa8cSmrg      # only be used when explicitly requested
252629baa8cSmrg      if test "x$enable_dependency_tracking" = xyes; then
253629baa8cSmrg	continue
254629baa8cSmrg      else
255629baa8cSmrg	break
256629baa8cSmrg      fi
257629baa8cSmrg      ;;
258629baa8cSmrg    msvisualcpp | msvcmsys)
259629baa8cSmrg      # This compiler won't grok `-c -o', but also, the minuso test has
260629baa8cSmrg      # not run yet.  These depmodes are late enough in the game, and
261629baa8cSmrg      # so weak that their functioning should not be impacted.
262629baa8cSmrg      am__obj=conftest.${OBJEXT-o}
263629baa8cSmrg      am__minus_obj=
264629baa8cSmrg      ;;
265629baa8cSmrg    none) break ;;
266629baa8cSmrg    esac
267629baa8cSmrg    if depmode=$depmode \
268629baa8cSmrg       source=sub/conftest.c object=$am__obj \
269629baa8cSmrg       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
270629baa8cSmrg       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
271629baa8cSmrg         >/dev/null 2>conftest.err &&
272629baa8cSmrg       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
273629baa8cSmrg       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
274629baa8cSmrg       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
275629baa8cSmrg       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
276629baa8cSmrg      # icc doesn't choke on unknown options, it will just issue warnings
277629baa8cSmrg      # or remarks (even with -Werror).  So we grep stderr for any message
278629baa8cSmrg      # that says an option was ignored or not supported.
279629baa8cSmrg      # When given -MP, icc 7.0 and 7.1 complain thusly:
280629baa8cSmrg      #   icc: Command line warning: ignoring option '-M'; no argument required
281629baa8cSmrg      # The diagnosis changed in icc 8.0:
282629baa8cSmrg      #   icc: Command line remark: option '-MP' not supported
283629baa8cSmrg      if (grep 'ignoring option' conftest.err ||
284629baa8cSmrg          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
285629baa8cSmrg        am_cv_$1_dependencies_compiler_type=$depmode
286629baa8cSmrg        break
287629baa8cSmrg      fi
288629baa8cSmrg    fi
289629baa8cSmrg  done
290629baa8cSmrg
291629baa8cSmrg  cd ..
292629baa8cSmrg  rm -rf conftest.dir
2935ffd6003Smrgelse
294629baa8cSmrg  am_cv_$1_dependencies_compiler_type=none
2955ffd6003Smrgfi
296629baa8cSmrg])
297629baa8cSmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
298629baa8cSmrgAM_CONDITIONAL([am__fastdep$1], [
299629baa8cSmrg  test "x$enable_dependency_tracking" != xno \
300629baa8cSmrg  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
301629baa8cSmrg])
302145b7b3cSmrg
303145b7b3cSmrg
304629baa8cSmrg# AM_SET_DEPDIR
305629baa8cSmrg# -------------
306629baa8cSmrg# Choose a directory name for dependency files.
307629baa8cSmrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES
308629baa8cSmrgAC_DEFUN([AM_SET_DEPDIR],
309629baa8cSmrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
310629baa8cSmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
311629baa8cSmrg])
312145b7b3cSmrg
313145b7b3cSmrg
314629baa8cSmrg# AM_DEP_TRACK
315629baa8cSmrg# ------------
316629baa8cSmrgAC_DEFUN([AM_DEP_TRACK],
317629baa8cSmrg[AC_ARG_ENABLE(dependency-tracking,
318629baa8cSmrg[  --disable-dependency-tracking  speeds up one-time build
319629baa8cSmrg  --enable-dependency-tracking   do not reject slow dependency extractors])
320629baa8cSmrgif test "x$enable_dependency_tracking" != xno; then
321629baa8cSmrg  am_depcomp="$ac_aux_dir/depcomp"
322629baa8cSmrg  AMDEPBACKSLASH='\'
3235ffd6003Smrgfi
324629baa8cSmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
325629baa8cSmrgAC_SUBST([AMDEPBACKSLASH])dnl
326629baa8cSmrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
327629baa8cSmrg])
328145b7b3cSmrg
329629baa8cSmrg# Generate code to set up dependency tracking.              -*- Autoconf -*-
330145b7b3cSmrg
331629baa8cSmrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
332629baa8cSmrg# Free Software Foundation, Inc.
333629baa8cSmrg#
334629baa8cSmrg# This file is free software; the Free Software Foundation
335629baa8cSmrg# gives unlimited permission to copy and/or distribute it,
336629baa8cSmrg# with or without modifications, as long as this notice is preserved.
337145b7b3cSmrg
338629baa8cSmrg#serial 5
339145b7b3cSmrg
340629baa8cSmrg# _AM_OUTPUT_DEPENDENCY_COMMANDS
341629baa8cSmrg# ------------------------------
342629baa8cSmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
343629baa8cSmrg[{
344629baa8cSmrg  # Autoconf 2.62 quotes --file arguments for eval, but not when files
345629baa8cSmrg  # are listed without --file.  Let's play safe and only enable the eval
346629baa8cSmrg  # if we detect the quoting.
347629baa8cSmrg  case $CONFIG_FILES in
348629baa8cSmrg  *\'*) eval set x "$CONFIG_FILES" ;;
349629baa8cSmrg  *)   set x $CONFIG_FILES ;;
350629baa8cSmrg  esac
351629baa8cSmrg  shift
352629baa8cSmrg  for mf
353629baa8cSmrg  do
354629baa8cSmrg    # Strip MF so we end up with the name of the file.
355629baa8cSmrg    mf=`echo "$mf" | sed -e 's/:.*$//'`
356629baa8cSmrg    # Check whether this is an Automake generated Makefile or not.
357629baa8cSmrg    # We used to match only the files named `Makefile.in', but
358629baa8cSmrg    # some people rename them; so instead we look at the file content.
359629baa8cSmrg    # Grep'ing the first line is not enough: some people post-process
360629baa8cSmrg    # each Makefile.in and add a new line on top of each file to say so.
361629baa8cSmrg    # Grep'ing the whole file is not good either: AIX grep has a line
362629baa8cSmrg    # limit of 2048, but all sed's we know have understand at least 4000.
363629baa8cSmrg    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
364629baa8cSmrg      dirpart=`AS_DIRNAME("$mf")`
365629baa8cSmrg    else
366629baa8cSmrg      continue
367629baa8cSmrg    fi
368629baa8cSmrg    # Extract the definition of DEPDIR, am__include, and am__quote
369629baa8cSmrg    # from the Makefile without running `make'.
370629baa8cSmrg    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
371629baa8cSmrg    test -z "$DEPDIR" && continue
372629baa8cSmrg    am__include=`sed -n 's/^am__include = //p' < "$mf"`
373629baa8cSmrg    test -z "am__include" && continue
374629baa8cSmrg    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
375629baa8cSmrg    # When using ansi2knr, U may be empty or an underscore; expand it
376629baa8cSmrg    U=`sed -n 's/^U = //p' < "$mf"`
377629baa8cSmrg    # Find all dependency output files, they are included files with
378629baa8cSmrg    # $(DEPDIR) in their names.  We invoke sed twice because it is the
379629baa8cSmrg    # simplest approach to changing $(DEPDIR) to its actual value in the
380629baa8cSmrg    # expansion.
381629baa8cSmrg    for file in `sed -n "
382629baa8cSmrg      s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
383629baa8cSmrg	 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
384629baa8cSmrg      # Make sure the directory exists.
385629baa8cSmrg      test -f "$dirpart/$file" && continue
386629baa8cSmrg      fdir=`AS_DIRNAME(["$file"])`
387629baa8cSmrg      AS_MKDIR_P([$dirpart/$fdir])
388629baa8cSmrg      # echo "creating $dirpart/$file"
389629baa8cSmrg      echo '# dummy' > "$dirpart/$file"
390629baa8cSmrg    done
391629baa8cSmrg  done
392629baa8cSmrg}
393629baa8cSmrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS
394145b7b3cSmrg
3955ffd6003Smrg
396629baa8cSmrg# AM_OUTPUT_DEPENDENCY_COMMANDS
397629baa8cSmrg# -----------------------------
398629baa8cSmrg# This macro should only be invoked once -- use via AC_REQUIRE.
399145b7b3cSmrg#
400629baa8cSmrg# This code is only required when automatic dependency tracking
401629baa8cSmrg# is enabled.  FIXME.  This creates each `.P' file that we will
402629baa8cSmrg# need in order to bootstrap the dependency handling code.
403629baa8cSmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
404629baa8cSmrg[AC_CONFIG_COMMANDS([depfiles],
405629baa8cSmrg     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
406629baa8cSmrg     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
407629baa8cSmrg])
408145b7b3cSmrg
409629baa8cSmrg# Do all the work for Automake.                             -*- Autoconf -*-
410145b7b3cSmrg
411629baa8cSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
412629baa8cSmrg# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
413629baa8cSmrg#
414629baa8cSmrg# This file is free software; the Free Software Foundation
415629baa8cSmrg# gives unlimited permission to copy and/or distribute it,
416629baa8cSmrg# with or without modifications, as long as this notice is preserved.
417145b7b3cSmrg
418629baa8cSmrg# serial 16
419145b7b3cSmrg
420629baa8cSmrg# This macro actually does too much.  Some checks are only needed if
421629baa8cSmrg# your package does certain things.  But this isn't really a big deal.
422145b7b3cSmrg
423629baa8cSmrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
424629baa8cSmrg# AM_INIT_AUTOMAKE([OPTIONS])
425629baa8cSmrg# -----------------------------------------------
426629baa8cSmrg# The call with PACKAGE and VERSION arguments is the old style
427629baa8cSmrg# call (pre autoconf-2.50), which is being phased out.  PACKAGE
428629baa8cSmrg# and VERSION should now be passed to AC_INIT and removed from
429629baa8cSmrg# the call to AM_INIT_AUTOMAKE.
430629baa8cSmrg# We support both call styles for the transition.  After
431629baa8cSmrg# the next Automake release, Autoconf can make the AC_INIT
432629baa8cSmrg# arguments mandatory, and then we can depend on a new Autoconf
433629baa8cSmrg# release and drop the old call support.
434629baa8cSmrgAC_DEFUN([AM_INIT_AUTOMAKE],
435629baa8cSmrg[AC_PREREQ([2.62])dnl
436629baa8cSmrgdnl Autoconf wants to disallow AM_ names.  We explicitly allow
437629baa8cSmrgdnl the ones we care about.
438629baa8cSmrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
439629baa8cSmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
440629baa8cSmrgAC_REQUIRE([AC_PROG_INSTALL])dnl
441629baa8cSmrgif test "`cd $srcdir && pwd`" != "`pwd`"; then
442629baa8cSmrg  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
443629baa8cSmrg  # is not polluted with repeated "-I."
444629baa8cSmrg  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
445629baa8cSmrg  # test to see if srcdir already configured
446629baa8cSmrg  if test -f $srcdir/config.status; then
447629baa8cSmrg    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
448629baa8cSmrg  fi
449629baa8cSmrgfi
450145b7b3cSmrg
451629baa8cSmrg# test whether we have cygpath
452629baa8cSmrgif test -z "$CYGPATH_W"; then
453629baa8cSmrg  if (cygpath --version) >/dev/null 2>/dev/null; then
454629baa8cSmrg    CYGPATH_W='cygpath -w'
455629baa8cSmrg  else
456629baa8cSmrg    CYGPATH_W=echo
457629baa8cSmrg  fi
458629baa8cSmrgfi
459629baa8cSmrgAC_SUBST([CYGPATH_W])
460145b7b3cSmrg
461629baa8cSmrg# Define the identity of the package.
462629baa8cSmrgdnl Distinguish between old-style and new-style calls.
463629baa8cSmrgm4_ifval([$2],
464629baa8cSmrg[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
465629baa8cSmrg AC_SUBST([PACKAGE], [$1])dnl
466629baa8cSmrg AC_SUBST([VERSION], [$2])],
467629baa8cSmrg[_AM_SET_OPTIONS([$1])dnl
468629baa8cSmrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
469629baa8cSmrgm4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
470629baa8cSmrg  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
471629baa8cSmrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
472629baa8cSmrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
473145b7b3cSmrg
474629baa8cSmrg_AM_IF_OPTION([no-define],,
475629baa8cSmrg[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
476629baa8cSmrg AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
477145b7b3cSmrg
478629baa8cSmrg# Some tools Automake needs.
479629baa8cSmrgAC_REQUIRE([AM_SANITY_CHECK])dnl
480629baa8cSmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl
481629baa8cSmrgAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
482629baa8cSmrgAM_MISSING_PROG(AUTOCONF, autoconf)
483629baa8cSmrgAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
484629baa8cSmrgAM_MISSING_PROG(AUTOHEADER, autoheader)
485629baa8cSmrgAM_MISSING_PROG(MAKEINFO, makeinfo)
486629baa8cSmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl
487629baa8cSmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
488629baa8cSmrgAC_REQUIRE([AM_PROG_MKDIR_P])dnl
489629baa8cSmrg# We need awk for the "check" target.  The system "awk" is bad on
490629baa8cSmrg# some platforms.
491629baa8cSmrgAC_REQUIRE([AC_PROG_AWK])dnl
492629baa8cSmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl
493629baa8cSmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl
494629baa8cSmrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
495629baa8cSmrg	      [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
496629baa8cSmrg			     [_AM_PROG_TAR([v7])])])
497629baa8cSmrg_AM_IF_OPTION([no-dependencies],,
498629baa8cSmrg[AC_PROVIDE_IFELSE([AC_PROG_CC],
499629baa8cSmrg		  [_AM_DEPENDENCIES(CC)],
500629baa8cSmrg		  [define([AC_PROG_CC],
501629baa8cSmrg			  defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
502629baa8cSmrgAC_PROVIDE_IFELSE([AC_PROG_CXX],
503629baa8cSmrg		  [_AM_DEPENDENCIES(CXX)],
504629baa8cSmrg		  [define([AC_PROG_CXX],
505629baa8cSmrg			  defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
506629baa8cSmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC],
507629baa8cSmrg		  [_AM_DEPENDENCIES(OBJC)],
508629baa8cSmrg		  [define([AC_PROG_OBJC],
509629baa8cSmrg			  defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
510629baa8cSmrg])
511629baa8cSmrg_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
512629baa8cSmrgdnl The `parallel-tests' driver may need to know about EXEEXT, so add the
513629baa8cSmrgdnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This macro
514629baa8cSmrgdnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
515629baa8cSmrgAC_CONFIG_COMMANDS_PRE(dnl
516629baa8cSmrg[m4_provide_if([_AM_COMPILER_EXEEXT],
517629baa8cSmrg  [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
518629baa8cSmrg])
519145b7b3cSmrg
520629baa8cSmrgdnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
521629baa8cSmrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
522629baa8cSmrgdnl mangled by Autoconf and run in a shell conditional statement.
523629baa8cSmrgm4_define([_AC_COMPILER_EXEEXT],
524629baa8cSmrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
525145b7b3cSmrg
526145b7b3cSmrg
527629baa8cSmrg# When config.status generates a header, we must update the stamp-h file.
528629baa8cSmrg# This file resides in the same directory as the config header
529629baa8cSmrg# that is generated.  The stamp files are numbered to have different names.
530578741aaSmrg
531629baa8cSmrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
532629baa8cSmrg# loop where config.status creates the headers, so we can generate
533629baa8cSmrg# our stamp files there.
534629baa8cSmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
535629baa8cSmrg[# Compute $1's index in $config_headers.
536629baa8cSmrg_am_arg=$1
537629baa8cSmrg_am_stamp_count=1
538629baa8cSmrgfor _am_header in $config_headers :; do
539629baa8cSmrg  case $_am_header in
540629baa8cSmrg    $_am_arg | $_am_arg:* )
541629baa8cSmrg      break ;;
542629baa8cSmrg    * )
543629baa8cSmrg      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
544629baa8cSmrg  esac
545629baa8cSmrgdone
546629baa8cSmrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
547629baa8cSmrg
548629baa8cSmrg# Copyright (C) 2001, 2003, 2005, 2008  Free Software Foundation, Inc.
549629baa8cSmrg#
550629baa8cSmrg# This file is free software; the Free Software Foundation
551629baa8cSmrg# gives unlimited permission to copy and/or distribute it,
552629baa8cSmrg# with or without modifications, as long as this notice is preserved.
553629baa8cSmrg
554629baa8cSmrg# AM_PROG_INSTALL_SH
555629baa8cSmrg# ------------------
556629baa8cSmrg# Define $install_sh.
557629baa8cSmrgAC_DEFUN([AM_PROG_INSTALL_SH],
558629baa8cSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
559629baa8cSmrgif test x"${install_sh}" != xset; then
560629baa8cSmrg  case $am_aux_dir in
561629baa8cSmrg  *\ * | *\	*)
562629baa8cSmrg    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
563629baa8cSmrg  *)
564629baa8cSmrg    install_sh="\${SHELL} $am_aux_dir/install-sh"
565629baa8cSmrg  esac
5665ffd6003Smrgfi
567629baa8cSmrgAC_SUBST(install_sh)])
568145b7b3cSmrg
569629baa8cSmrg# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
570629baa8cSmrg#
571629baa8cSmrg# This file is free software; the Free Software Foundation
572629baa8cSmrg# gives unlimited permission to copy and/or distribute it,
573629baa8cSmrg# with or without modifications, as long as this notice is preserved.
574145b7b3cSmrg
575629baa8cSmrg# serial 2
576145b7b3cSmrg
577629baa8cSmrg# Check whether the underlying file-system supports filenames
578629baa8cSmrg# with a leading dot.  For instance MS-DOS doesn't.
579629baa8cSmrgAC_DEFUN([AM_SET_LEADING_DOT],
580629baa8cSmrg[rm -rf .tst 2>/dev/null
581629baa8cSmrgmkdir .tst 2>/dev/null
582629baa8cSmrgif test -d .tst; then
583629baa8cSmrg  am__leading_dot=.
584629baa8cSmrgelse
585629baa8cSmrg  am__leading_dot=_
5865ffd6003Smrgfi
587629baa8cSmrgrmdir .tst 2>/dev/null
588629baa8cSmrgAC_SUBST([am__leading_dot])])
589145b7b3cSmrg
590629baa8cSmrg# Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
591629baa8cSmrg# From Jim Meyering
592145b7b3cSmrg
593629baa8cSmrg# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008
594629baa8cSmrg# Free Software Foundation, Inc.
595629baa8cSmrg#
596629baa8cSmrg# This file is free software; the Free Software Foundation
597629baa8cSmrg# gives unlimited permission to copy and/or distribute it,
598629baa8cSmrg# with or without modifications, as long as this notice is preserved.
599145b7b3cSmrg
600629baa8cSmrg# serial 5
601145b7b3cSmrg
602629baa8cSmrg# AM_MAINTAINER_MODE([DEFAULT-MODE])
603629baa8cSmrg# ----------------------------------
604629baa8cSmrg# Control maintainer-specific portions of Makefiles.
605629baa8cSmrg# Default is to disable them, unless `enable' is passed literally.
606629baa8cSmrg# For symmetry, `disable' may be passed as well.  Anyway, the user
607629baa8cSmrg# can override the default with the --enable/--disable switch.
608629baa8cSmrgAC_DEFUN([AM_MAINTAINER_MODE],
609629baa8cSmrg[m4_case(m4_default([$1], [disable]),
610629baa8cSmrg       [enable], [m4_define([am_maintainer_other], [disable])],
611629baa8cSmrg       [disable], [m4_define([am_maintainer_other], [enable])],
612629baa8cSmrg       [m4_define([am_maintainer_other], [enable])
613629baa8cSmrg        m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
614629baa8cSmrgAC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles])
615629baa8cSmrg  dnl maintainer-mode's default is 'disable' unless 'enable' is passed
616629baa8cSmrg  AC_ARG_ENABLE([maintainer-mode],
617629baa8cSmrg[  --][am_maintainer_other][-maintainer-mode  am_maintainer_other make rules and dependencies not useful
618629baa8cSmrg			  (and sometimes confusing) to the casual installer],
619629baa8cSmrg      [USE_MAINTAINER_MODE=$enableval],
620629baa8cSmrg      [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
621629baa8cSmrg  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
622629baa8cSmrg  AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
623629baa8cSmrg  MAINT=$MAINTAINER_MODE_TRUE
624629baa8cSmrg  AC_SUBST([MAINT])dnl
625629baa8cSmrg]
626629baa8cSmrg)
6275ffd6003Smrg
628629baa8cSmrgAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
6295ffd6003Smrg
630629baa8cSmrg# Check to see how 'make' treats includes.	            -*- Autoconf -*-
631629baa8cSmrg
632629baa8cSmrg# Copyright (C) 2001, 2002, 2003, 2005, 2009  Free Software Foundation, Inc.
6335ffd6003Smrg#
634629baa8cSmrg# This file is free software; the Free Software Foundation
635629baa8cSmrg# gives unlimited permission to copy and/or distribute it,
636629baa8cSmrg# with or without modifications, as long as this notice is preserved.
6375ffd6003Smrg
638629baa8cSmrg# serial 4
639629baa8cSmrg
640629baa8cSmrg# AM_MAKE_INCLUDE()
641629baa8cSmrg# -----------------
642629baa8cSmrg# Check to see how make treats includes.
643629baa8cSmrgAC_DEFUN([AM_MAKE_INCLUDE],
644629baa8cSmrg[am_make=${MAKE-make}
645629baa8cSmrgcat > confinc << 'END'
646629baa8cSmrgam__doit:
647629baa8cSmrg	@echo this is the am__doit target
648629baa8cSmrg.PHONY: am__doit
649629baa8cSmrgEND
650629baa8cSmrg# If we don't find an include directive, just comment out the code.
651629baa8cSmrgAC_MSG_CHECKING([for style of include used by $am_make])
652629baa8cSmrgam__include="#"
653629baa8cSmrgam__quote=
654629baa8cSmrg_am_result=none
655629baa8cSmrg# First try GNU make style include.
656629baa8cSmrgecho "include confinc" > confmf
657629baa8cSmrg# Ignore all kinds of additional output from `make'.
658629baa8cSmrgcase `$am_make -s -f confmf 2> /dev/null` in #(
659629baa8cSmrg*the\ am__doit\ target*)
660629baa8cSmrg  am__include=include
661629baa8cSmrg  am__quote=
662629baa8cSmrg  _am_result=GNU
663629baa8cSmrg  ;;
664629baa8cSmrgesac
665629baa8cSmrg# Now try BSD make style include.
666629baa8cSmrgif test "$am__include" = "#"; then
667629baa8cSmrg   echo '.include "confinc"' > confmf
668629baa8cSmrg   case `$am_make -s -f confmf 2> /dev/null` in #(
669629baa8cSmrg   *the\ am__doit\ target*)
670629baa8cSmrg     am__include=.include
671629baa8cSmrg     am__quote="\""
672629baa8cSmrg     _am_result=BSD
673629baa8cSmrg     ;;
674629baa8cSmrg   esac
675145b7b3cSmrgfi
676629baa8cSmrgAC_SUBST([am__include])
677629baa8cSmrgAC_SUBST([am__quote])
678629baa8cSmrgAC_MSG_RESULT([$_am_result])
679629baa8cSmrgrm -f confinc confmf
680629baa8cSmrg])
681145b7b3cSmrg
682629baa8cSmrg# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
683629baa8cSmrg
684629baa8cSmrg# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
685629baa8cSmrg# Free Software Foundation, Inc.
6865ffd6003Smrg#
687629baa8cSmrg# This file is free software; the Free Software Foundation
688629baa8cSmrg# gives unlimited permission to copy and/or distribute it,
689629baa8cSmrg# with or without modifications, as long as this notice is preserved.
6905ffd6003Smrg
691629baa8cSmrg# serial 6
692145b7b3cSmrg
693629baa8cSmrg# AM_MISSING_PROG(NAME, PROGRAM)
694629baa8cSmrg# ------------------------------
695629baa8cSmrgAC_DEFUN([AM_MISSING_PROG],
696629baa8cSmrg[AC_REQUIRE([AM_MISSING_HAS_RUN])
697629baa8cSmrg$1=${$1-"${am_missing_run}$2"}
698629baa8cSmrgAC_SUBST($1)])
6995ffd6003Smrg
700629baa8cSmrg
701629baa8cSmrg# AM_MISSING_HAS_RUN
702629baa8cSmrg# ------------------
703629baa8cSmrg# Define MISSING if not defined so far and test if it supports --run.
704629baa8cSmrg# If it does, set am_missing_run to use it, otherwise, to nothing.
705629baa8cSmrgAC_DEFUN([AM_MISSING_HAS_RUN],
706629baa8cSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
707629baa8cSmrgAC_REQUIRE_AUX_FILE([missing])dnl
708629baa8cSmrgif test x"${MISSING+set}" != xset; then
709629baa8cSmrg  case $am_aux_dir in
710629baa8cSmrg  *\ * | *\	*)
711629baa8cSmrg    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
712629baa8cSmrg  *)
713629baa8cSmrg    MISSING="\${SHELL} $am_aux_dir/missing" ;;
714629baa8cSmrg  esac
715629baa8cSmrgfi
716629baa8cSmrg# Use eval to expand $SHELL
717629baa8cSmrgif eval "$MISSING --run true"; then
718629baa8cSmrg  am_missing_run="$MISSING --run "
7195ffd6003Smrgelse
720629baa8cSmrg  am_missing_run=
721629baa8cSmrg  AC_MSG_WARN([`missing' script is too old or missing])
7225ffd6003Smrgfi
723629baa8cSmrg])
724145b7b3cSmrg
725629baa8cSmrg# Copyright (C) 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
7265ffd6003Smrg#
727629baa8cSmrg# This file is free software; the Free Software Foundation
728629baa8cSmrg# gives unlimited permission to copy and/or distribute it,
729629baa8cSmrg# with or without modifications, as long as this notice is preserved.
730145b7b3cSmrg
731629baa8cSmrg# AM_PROG_MKDIR_P
732629baa8cSmrg# ---------------
733629baa8cSmrg# Check for `mkdir -p'.
734629baa8cSmrgAC_DEFUN([AM_PROG_MKDIR_P],
735629baa8cSmrg[AC_PREREQ([2.60])dnl
736629baa8cSmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl
737629baa8cSmrgdnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
738629baa8cSmrgdnl while keeping a definition of mkdir_p for backward compatibility.
739629baa8cSmrgdnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
740629baa8cSmrgdnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
741629baa8cSmrgdnl Makefile.ins that do not define MKDIR_P, so we do our own
742629baa8cSmrgdnl adjustment using top_builddir (which is defined more often than
743629baa8cSmrgdnl MKDIR_P).
744629baa8cSmrgAC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
745629baa8cSmrgcase $mkdir_p in
746629baa8cSmrg  [[\\/$]]* | ?:[[\\/]]*) ;;
747629baa8cSmrg  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
748629baa8cSmrgesac
749629baa8cSmrg])
750145b7b3cSmrg
751629baa8cSmrg# Helper functions for option handling.                     -*- Autoconf -*-
752145b7b3cSmrg
753629baa8cSmrg# Copyright (C) 2001, 2002, 2003, 2005, 2008  Free Software Foundation, Inc.
7545ffd6003Smrg#
755629baa8cSmrg# This file is free software; the Free Software Foundation
756629baa8cSmrg# gives unlimited permission to copy and/or distribute it,
757629baa8cSmrg# with or without modifications, as long as this notice is preserved.
758145b7b3cSmrg
759629baa8cSmrg# serial 4
760145b7b3cSmrg
761629baa8cSmrg# _AM_MANGLE_OPTION(NAME)
762629baa8cSmrg# -----------------------
763629baa8cSmrgAC_DEFUN([_AM_MANGLE_OPTION],
764629baa8cSmrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
765145b7b3cSmrg
766629baa8cSmrg# _AM_SET_OPTION(NAME)
767629baa8cSmrg# ------------------------------
768629baa8cSmrg# Set option NAME.  Presently that only means defining a flag for this option.
769629baa8cSmrgAC_DEFUN([_AM_SET_OPTION],
770629baa8cSmrg[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
771145b7b3cSmrg
772629baa8cSmrg# _AM_SET_OPTIONS(OPTIONS)
773629baa8cSmrg# ----------------------------------
774629baa8cSmrg# OPTIONS is a space-separated list of Automake options.
775629baa8cSmrgAC_DEFUN([_AM_SET_OPTIONS],
776629baa8cSmrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
777145b7b3cSmrg
778629baa8cSmrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
779629baa8cSmrg# -------------------------------------------
780629baa8cSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
781629baa8cSmrgAC_DEFUN([_AM_IF_OPTION],
782629baa8cSmrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
783145b7b3cSmrg
784629baa8cSmrg# Check to make sure that the build environment is sane.    -*- Autoconf -*-
785145b7b3cSmrg
786629baa8cSmrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
787629baa8cSmrg# Free Software Foundation, Inc.
788145b7b3cSmrg#
789629baa8cSmrg# This file is free software; the Free Software Foundation
790629baa8cSmrg# gives unlimited permission to copy and/or distribute it,
791629baa8cSmrg# with or without modifications, as long as this notice is preserved.
792145b7b3cSmrg
793629baa8cSmrg# serial 5
794145b7b3cSmrg
795629baa8cSmrg# AM_SANITY_CHECK
796629baa8cSmrg# ---------------
797629baa8cSmrgAC_DEFUN([AM_SANITY_CHECK],
798629baa8cSmrg[AC_MSG_CHECKING([whether build environment is sane])
799629baa8cSmrg# Just in case
800629baa8cSmrgsleep 1
801629baa8cSmrgecho timestamp > conftest.file
802629baa8cSmrg# Reject unsafe characters in $srcdir or the absolute working directory
803629baa8cSmrg# name.  Accept space and tab only in the latter.
804629baa8cSmrgam_lf='
805629baa8cSmrg'
806629baa8cSmrgcase `pwd` in
807629baa8cSmrg  *[[\\\"\#\$\&\'\`$am_lf]]*)
808629baa8cSmrg    AC_MSG_ERROR([unsafe absolute working directory name]);;
809629baa8cSmrgesac
810629baa8cSmrgcase $srcdir in
811629baa8cSmrg  *[[\\\"\#\$\&\'\`$am_lf\ \	]]*)
812629baa8cSmrg    AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
813629baa8cSmrgesac
814629baa8cSmrg
815629baa8cSmrg# Do `set' in a subshell so we don't clobber the current shell's
816629baa8cSmrg# arguments.  Must try -L first in case configure is actually a
817629baa8cSmrg# symlink; some systems play weird games with the mod time of symlinks
818629baa8cSmrg# (eg FreeBSD returns the mod time of the symlink's containing
819629baa8cSmrg# directory).
820629baa8cSmrgif (
821629baa8cSmrg   set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
822629baa8cSmrg   if test "$[*]" = "X"; then
823629baa8cSmrg      # -L didn't work.
824629baa8cSmrg      set X `ls -t "$srcdir/configure" conftest.file`
825629baa8cSmrg   fi
826629baa8cSmrg   rm -f conftest.file
827629baa8cSmrg   if test "$[*]" != "X $srcdir/configure conftest.file" \
828629baa8cSmrg      && test "$[*]" != "X conftest.file $srcdir/configure"; then
829629baa8cSmrg
830629baa8cSmrg      # If neither matched, then we have a broken ls.  This can happen
831629baa8cSmrg      # if, for instance, CONFIG_SHELL is bash and it inherits a
832629baa8cSmrg      # broken ls alias from the environment.  This has actually
833629baa8cSmrg      # happened.  Such a system could not be considered "sane".
834629baa8cSmrg      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
835629baa8cSmrgalias in your environment])
836629baa8cSmrg   fi
837629baa8cSmrg
838629baa8cSmrg   test "$[2]" = conftest.file
839629baa8cSmrg   )
840629baa8cSmrgthen
841629baa8cSmrg   # Ok.
842629baa8cSmrg   :
843629baa8cSmrgelse
844629baa8cSmrg   AC_MSG_ERROR([newly created file is older than distributed files!
845629baa8cSmrgCheck your system clock])
846629baa8cSmrgfi
847629baa8cSmrgAC_MSG_RESULT(yes)])
848629baa8cSmrg
849629baa8cSmrg# Copyright (C) 2009  Free Software Foundation, Inc.
850629baa8cSmrg#
851629baa8cSmrg# This file is free software; the Free Software Foundation
852629baa8cSmrg# gives unlimited permission to copy and/or distribute it,
853629baa8cSmrg# with or without modifications, as long as this notice is preserved.
854629baa8cSmrg
855629baa8cSmrg# serial 1
856629baa8cSmrg
857629baa8cSmrg# AM_SILENT_RULES([DEFAULT])
858629baa8cSmrg# --------------------------
859629baa8cSmrg# Enable less verbose build rules; with the default set to DEFAULT
860629baa8cSmrg# (`yes' being less verbose, `no' or empty being verbose).
861629baa8cSmrgAC_DEFUN([AM_SILENT_RULES],
862629baa8cSmrg[AC_ARG_ENABLE([silent-rules],
863629baa8cSmrg[  --enable-silent-rules          less verbose build output (undo: `make V=1')
864629baa8cSmrg  --disable-silent-rules         verbose build output (undo: `make V=0')])
865629baa8cSmrgcase $enable_silent_rules in
866629baa8cSmrgyes) AM_DEFAULT_VERBOSITY=0;;
867629baa8cSmrgno)  AM_DEFAULT_VERBOSITY=1;;
868629baa8cSmrg*)   AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
869629baa8cSmrgesac
870629baa8cSmrgAC_SUBST([AM_DEFAULT_VERBOSITY])dnl
871629baa8cSmrgAM_BACKSLASH='\'
872629baa8cSmrgAC_SUBST([AM_BACKSLASH])dnl
873629baa8cSmrg_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
874629baa8cSmrg])
875629baa8cSmrg
876629baa8cSmrg# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
877629baa8cSmrg#
878629baa8cSmrg# This file is free software; the Free Software Foundation
879629baa8cSmrg# gives unlimited permission to copy and/or distribute it,
880629baa8cSmrg# with or without modifications, as long as this notice is preserved.
881629baa8cSmrg
882629baa8cSmrg# AM_PROG_INSTALL_STRIP
883629baa8cSmrg# ---------------------
884629baa8cSmrg# One issue with vendor `install' (even GNU) is that you can't
885629baa8cSmrg# specify the program used to strip binaries.  This is especially
886629baa8cSmrg# annoying in cross-compiling environments, where the build's strip
887629baa8cSmrg# is unlikely to handle the host's binaries.
888629baa8cSmrg# Fortunately install-sh will honor a STRIPPROG variable, so we
889629baa8cSmrg# always use install-sh in `make install-strip', and initialize
890629baa8cSmrg# STRIPPROG with the value of the STRIP variable (set by the user).
891629baa8cSmrgAC_DEFUN([AM_PROG_INSTALL_STRIP],
892629baa8cSmrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
893629baa8cSmrg# Installed binaries are usually stripped using `strip' when the user
894629baa8cSmrg# run `make install-strip'.  However `strip' might not be the right
895629baa8cSmrg# tool to use in cross-compilation environments, therefore Automake
896629baa8cSmrg# will honor the `STRIP' environment variable to overrule this program.
897629baa8cSmrgdnl Don't test for $cross_compiling = yes, because it might be `maybe'.
898629baa8cSmrgif test "$cross_compiling" != no; then
899629baa8cSmrg  AC_CHECK_TOOL([STRIP], [strip], :)
900629baa8cSmrgfi
901629baa8cSmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
902629baa8cSmrgAC_SUBST([INSTALL_STRIP_PROGRAM])])
903629baa8cSmrg
904629baa8cSmrg# Copyright (C) 2006, 2008  Free Software Foundation, Inc.
905629baa8cSmrg#
906629baa8cSmrg# This file is free software; the Free Software Foundation
907629baa8cSmrg# gives unlimited permission to copy and/or distribute it,
908629baa8cSmrg# with or without modifications, as long as this notice is preserved.
909629baa8cSmrg
910629baa8cSmrg# serial 2
911629baa8cSmrg
912629baa8cSmrg# _AM_SUBST_NOTMAKE(VARIABLE)
913629baa8cSmrg# ---------------------------
914629baa8cSmrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
915629baa8cSmrg# This macro is traced by Automake.
916629baa8cSmrgAC_DEFUN([_AM_SUBST_NOTMAKE])
917629baa8cSmrg
918629baa8cSmrg# AM_SUBST_NOTMAKE(VARIABLE)
919629baa8cSmrg# ---------------------------
920629baa8cSmrg# Public sister of _AM_SUBST_NOTMAKE.
921629baa8cSmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
922629baa8cSmrg
923629baa8cSmrg# Check how to create a tarball.                            -*- Autoconf -*-
924629baa8cSmrg
925629baa8cSmrg# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
926629baa8cSmrg#
927629baa8cSmrg# This file is free software; the Free Software Foundation
928629baa8cSmrg# gives unlimited permission to copy and/or distribute it,
929629baa8cSmrg# with or without modifications, as long as this notice is preserved.
930629baa8cSmrg
931629baa8cSmrg# serial 2
932629baa8cSmrg
933629baa8cSmrg# _AM_PROG_TAR(FORMAT)
934629baa8cSmrg# --------------------
935629baa8cSmrg# Check how to create a tarball in format FORMAT.
936629baa8cSmrg# FORMAT should be one of `v7', `ustar', or `pax'.
937629baa8cSmrg#
938629baa8cSmrg# Substitute a variable $(am__tar) that is a command
939629baa8cSmrg# writing to stdout a FORMAT-tarball containing the directory
940629baa8cSmrg# $tardir.
941629baa8cSmrg#     tardir=directory && $(am__tar) > result.tar
942629baa8cSmrg#
943629baa8cSmrg# Substitute a variable $(am__untar) that extract such
944629baa8cSmrg# a tarball read from stdin.
945629baa8cSmrg#     $(am__untar) < result.tar
946629baa8cSmrgAC_DEFUN([_AM_PROG_TAR],
947629baa8cSmrg[# Always define AMTAR for backward compatibility.
948629baa8cSmrgAM_MISSING_PROG([AMTAR], [tar])
949629baa8cSmrgm4_if([$1], [v7],
950629baa8cSmrg     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
951629baa8cSmrg     [m4_case([$1], [ustar],, [pax],,
952629baa8cSmrg              [m4_fatal([Unknown tar format])])
953629baa8cSmrgAC_MSG_CHECKING([how to create a $1 tar archive])
954629baa8cSmrg# Loop over all known methods to create a tar archive until one works.
955629baa8cSmrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
956629baa8cSmrg_am_tools=${am_cv_prog_tar_$1-$_am_tools}
957629baa8cSmrg# Do not fold the above two line into one, because Tru64 sh and
958629baa8cSmrg# Solaris sh will not grok spaces in the rhs of `-'.
959629baa8cSmrgfor _am_tool in $_am_tools
960629baa8cSmrgdo
961629baa8cSmrg  case $_am_tool in
962629baa8cSmrg  gnutar)
963629baa8cSmrg    for _am_tar in tar gnutar gtar;
964629baa8cSmrg    do
965629baa8cSmrg      AM_RUN_LOG([$_am_tar --version]) && break
966629baa8cSmrg    done
967629baa8cSmrg    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
968629baa8cSmrg    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
969629baa8cSmrg    am__untar="$_am_tar -xf -"
970629baa8cSmrg    ;;
971629baa8cSmrg  plaintar)
972629baa8cSmrg    # Must skip GNU tar: if it does not support --format= it doesn't create
973629baa8cSmrg    # ustar tarball either.
974629baa8cSmrg    (tar --version) >/dev/null 2>&1 && continue
975629baa8cSmrg    am__tar='tar chf - "$$tardir"'
976629baa8cSmrg    am__tar_='tar chf - "$tardir"'
977629baa8cSmrg    am__untar='tar xf -'
978629baa8cSmrg    ;;
979629baa8cSmrg  pax)
980629baa8cSmrg    am__tar='pax -L -x $1 -w "$$tardir"'
981629baa8cSmrg    am__tar_='pax -L -x $1 -w "$tardir"'
982629baa8cSmrg    am__untar='pax -r'
983629baa8cSmrg    ;;
984629baa8cSmrg  cpio)
985629baa8cSmrg    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
986629baa8cSmrg    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
987629baa8cSmrg    am__untar='cpio -i -H $1 -d'
988629baa8cSmrg    ;;
989629baa8cSmrg  none)
990629baa8cSmrg    am__tar=false
991629baa8cSmrg    am__tar_=false
992629baa8cSmrg    am__untar=false
993629baa8cSmrg    ;;
994629baa8cSmrg  esac
995629baa8cSmrg
996629baa8cSmrg  # If the value was cached, stop now.  We just wanted to have am__tar
997629baa8cSmrg  # and am__untar set.
998629baa8cSmrg  test -n "${am_cv_prog_tar_$1}" && break
999629baa8cSmrg
1000629baa8cSmrg  # tar/untar a dummy directory, and stop if the command works
1001629baa8cSmrg  rm -rf conftest.dir
1002629baa8cSmrg  mkdir conftest.dir
1003629baa8cSmrg  echo GrepMe > conftest.dir/file
1004629baa8cSmrg  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
1005629baa8cSmrg  rm -rf conftest.dir
1006629baa8cSmrg  if test -s conftest.tar; then
1007629baa8cSmrg    AM_RUN_LOG([$am__untar <conftest.tar])
1008629baa8cSmrg    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
1009629baa8cSmrg  fi
1010629baa8cSmrgdone
1011629baa8cSmrgrm -rf conftest.dir
1012629baa8cSmrg
1013629baa8cSmrgAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
1014629baa8cSmrgAC_MSG_RESULT([$am_cv_prog_tar_$1])])
1015629baa8cSmrgAC_SUBST([am__tar])
1016629baa8cSmrgAC_SUBST([am__untar])
1017629baa8cSmrg]) # _AM_PROG_TAR
1018629baa8cSmrg
1019629baa8cSmrgm4_include([m4/ax_define_dir.m4])
1020629baa8cSmrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
1021629baa8cSmrg#
1022629baa8cSmrg#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
1023629baa8cSmrg#                 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
1024629baa8cSmrg#                 Inc.
1025629baa8cSmrg#   Written by Gordon Matzigkeit, 1996
1026629baa8cSmrg#
1027629baa8cSmrg# This file is free software; the Free Software Foundation gives
1028629baa8cSmrg# unlimited permission to copy and/or distribute it, with or without
1029629baa8cSmrg# modifications, as long as this notice is preserved.
1030629baa8cSmrg
1031629baa8cSmrgm4_define([_LT_COPYING], [dnl
1032629baa8cSmrg#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
1033629baa8cSmrg#                 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
1034629baa8cSmrg#                 Inc.
1035629baa8cSmrg#   Written by Gordon Matzigkeit, 1996
1036629baa8cSmrg#
1037629baa8cSmrg#   This file is part of GNU Libtool.
1038629baa8cSmrg#
1039629baa8cSmrg# GNU Libtool is free software; you can redistribute it and/or
1040629baa8cSmrg# modify it under the terms of the GNU General Public License as
1041629baa8cSmrg# published by the Free Software Foundation; either version 2 of
1042629baa8cSmrg# the License, or (at your option) any later version.
1043629baa8cSmrg#
1044629baa8cSmrg# As a special exception to the GNU General Public License,
1045629baa8cSmrg# if you distribute this file as part of a program or library that
1046629baa8cSmrg# is built using GNU Libtool, you may include this file under the
1047629baa8cSmrg# same distribution terms that you use for the rest of that program.
1048629baa8cSmrg#
1049629baa8cSmrg# GNU Libtool is distributed in the hope that it will be useful,
1050629baa8cSmrg# but WITHOUT ANY WARRANTY; without even the implied warranty of
1051629baa8cSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1052629baa8cSmrg# GNU General Public License for more details.
1053629baa8cSmrg#
1054629baa8cSmrg# You should have received a copy of the GNU General Public License
1055629baa8cSmrg# along with GNU Libtool; see the file COPYING.  If not, a copy
1056629baa8cSmrg# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
1057629baa8cSmrg# obtained by writing to the Free Software Foundation, Inc.,
1058629baa8cSmrg# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
1059629baa8cSmrg])
1060629baa8cSmrg
1061629baa8cSmrg# serial 57 LT_INIT
1062629baa8cSmrg
1063629baa8cSmrg
1064629baa8cSmrg# LT_PREREQ(VERSION)
1065629baa8cSmrg# ------------------
1066629baa8cSmrg# Complain and exit if this libtool version is less that VERSION.
1067629baa8cSmrgm4_defun([LT_PREREQ],
1068629baa8cSmrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
1069629baa8cSmrg       [m4_default([$3],
1070629baa8cSmrg		   [m4_fatal([Libtool version $1 or higher is required],
1071629baa8cSmrg		             63)])],
1072629baa8cSmrg       [$2])])
1073629baa8cSmrg
1074629baa8cSmrg
1075629baa8cSmrg# _LT_CHECK_BUILDDIR
1076629baa8cSmrg# ------------------
1077629baa8cSmrg# Complain if the absolute build directory name contains unusual characters
1078629baa8cSmrgm4_defun([_LT_CHECK_BUILDDIR],
1079629baa8cSmrg[case `pwd` in
1080629baa8cSmrg  *\ * | *\	*)
1081629baa8cSmrg    AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
1082629baa8cSmrgesac
1083629baa8cSmrg])
1084629baa8cSmrg
1085629baa8cSmrg
1086629baa8cSmrg# LT_INIT([OPTIONS])
1087629baa8cSmrg# ------------------
1088629baa8cSmrgAC_DEFUN([LT_INIT],
1089629baa8cSmrg[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
1090629baa8cSmrgAC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
1091629baa8cSmrgAC_BEFORE([$0], [LT_LANG])dnl
1092629baa8cSmrgAC_BEFORE([$0], [LT_OUTPUT])dnl
1093629baa8cSmrgAC_BEFORE([$0], [LTDL_INIT])dnl
1094629baa8cSmrgm4_require([_LT_CHECK_BUILDDIR])dnl
1095629baa8cSmrg
1096629baa8cSmrgdnl Autoconf doesn't catch unexpanded LT_ macros by default:
1097629baa8cSmrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
1098629baa8cSmrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
1099629baa8cSmrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
1100629baa8cSmrgdnl unless we require an AC_DEFUNed macro:
1101629baa8cSmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl
1102629baa8cSmrgAC_REQUIRE([LTSUGAR_VERSION])dnl
1103629baa8cSmrgAC_REQUIRE([LTVERSION_VERSION])dnl
1104629baa8cSmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl
1105629baa8cSmrgm4_require([_LT_PROG_LTMAIN])dnl
1106629baa8cSmrg
1107629baa8cSmrg_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
1108629baa8cSmrg
1109629baa8cSmrgdnl Parse OPTIONS
1110629baa8cSmrg_LT_SET_OPTIONS([$0], [$1])
1111629baa8cSmrg
1112629baa8cSmrg# This can be used to rebuild libtool when needed
1113629baa8cSmrgLIBTOOL_DEPS="$ltmain"
1114629baa8cSmrg
1115629baa8cSmrg# Always use our own libtool.
1116629baa8cSmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool'
1117629baa8cSmrgAC_SUBST(LIBTOOL)dnl
1118629baa8cSmrg
1119629baa8cSmrg_LT_SETUP
1120629baa8cSmrg
1121629baa8cSmrg# Only expand once:
1122629baa8cSmrgm4_define([LT_INIT])
1123629baa8cSmrg])# LT_INIT
1124629baa8cSmrg
1125629baa8cSmrg# Old names:
1126629baa8cSmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
1127629baa8cSmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
1128629baa8cSmrgdnl aclocal-1.4 backwards compatibility:
1129629baa8cSmrgdnl AC_DEFUN([AC_PROG_LIBTOOL], [])
1130629baa8cSmrgdnl AC_DEFUN([AM_PROG_LIBTOOL], [])
1131629baa8cSmrg
1132629baa8cSmrg
1133629baa8cSmrg# _LT_CC_BASENAME(CC)
1134629baa8cSmrg# -------------------
1135629baa8cSmrg# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
1136629baa8cSmrgm4_defun([_LT_CC_BASENAME],
1137629baa8cSmrg[for cc_temp in $1""; do
1138629baa8cSmrg  case $cc_temp in
1139629baa8cSmrg    compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
1140629baa8cSmrg    distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
1141629baa8cSmrg    \-*) ;;
1142629baa8cSmrg    *) break;;
1143629baa8cSmrg  esac
1144629baa8cSmrgdone
1145629baa8cSmrgcc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
1146629baa8cSmrg])
1147629baa8cSmrg
1148629baa8cSmrg
1149629baa8cSmrg# _LT_FILEUTILS_DEFAULTS
1150629baa8cSmrg# ----------------------
1151629baa8cSmrg# It is okay to use these file commands and assume they have been set
1152629baa8cSmrg# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
1153629baa8cSmrgm4_defun([_LT_FILEUTILS_DEFAULTS],
1154629baa8cSmrg[: ${CP="cp -f"}
1155629baa8cSmrg: ${MV="mv -f"}
1156629baa8cSmrg: ${RM="rm -f"}
1157629baa8cSmrg])# _LT_FILEUTILS_DEFAULTS
1158629baa8cSmrg
1159629baa8cSmrg
1160629baa8cSmrg# _LT_SETUP
1161629baa8cSmrg# ---------
1162629baa8cSmrgm4_defun([_LT_SETUP],
1163629baa8cSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
1164629baa8cSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl
1165629baa8cSmrgAC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
1166629baa8cSmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
1167629baa8cSmrg
1168629baa8cSmrg_LT_DECL([], [host_alias], [0], [The host system])dnl
1169629baa8cSmrg_LT_DECL([], [host], [0])dnl
1170629baa8cSmrg_LT_DECL([], [host_os], [0])dnl
1171629baa8cSmrgdnl
1172629baa8cSmrg_LT_DECL([], [build_alias], [0], [The build system])dnl
1173629baa8cSmrg_LT_DECL([], [build], [0])dnl
1174629baa8cSmrg_LT_DECL([], [build_os], [0])dnl
1175629baa8cSmrgdnl
1176629baa8cSmrgAC_REQUIRE([AC_PROG_CC])dnl
1177629baa8cSmrgAC_REQUIRE([LT_PATH_LD])dnl
1178629baa8cSmrgAC_REQUIRE([LT_PATH_NM])dnl
1179629baa8cSmrgdnl
1180629baa8cSmrgAC_REQUIRE([AC_PROG_LN_S])dnl
1181629baa8cSmrgtest -z "$LN_S" && LN_S="ln -s"
1182629baa8cSmrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
1183629baa8cSmrgdnl
1184629baa8cSmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl
1185629baa8cSmrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
1186629baa8cSmrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
1187629baa8cSmrgdnl
1188629baa8cSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
1189629baa8cSmrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl
1190629baa8cSmrgm4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
1191629baa8cSmrgm4_require([_LT_CMD_RELOAD])dnl
1192629baa8cSmrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl
1193629baa8cSmrgm4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
1194629baa8cSmrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl
1195629baa8cSmrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
1196629baa8cSmrgm4_require([_LT_WITH_SYSROOT])dnl
1197629baa8cSmrg
1198629baa8cSmrg_LT_CONFIG_LIBTOOL_INIT([
1199629baa8cSmrg# See if we are running on zsh, and set the options which allow our
1200629baa8cSmrg# commands through without removal of \ escapes INIT.
1201629baa8cSmrgif test -n "\${ZSH_VERSION+set}" ; then
1202629baa8cSmrg   setopt NO_GLOB_SUBST
1203629baa8cSmrgfi
1204629baa8cSmrg])
1205629baa8cSmrgif test -n "${ZSH_VERSION+set}" ; then
1206629baa8cSmrg   setopt NO_GLOB_SUBST
1207629baa8cSmrgfi
1208629baa8cSmrg
1209629baa8cSmrg_LT_CHECK_OBJDIR
1210629baa8cSmrg
1211629baa8cSmrgm4_require([_LT_TAG_COMPILER])dnl
1212629baa8cSmrg
1213629baa8cSmrgcase $host_os in
1214629baa8cSmrgaix3*)
1215629baa8cSmrg  # AIX sometimes has problems with the GCC collect2 program.  For some
1216629baa8cSmrg  # reason, if we set the COLLECT_NAMES environment variable, the problems
1217629baa8cSmrg  # vanish in a puff of smoke.
1218629baa8cSmrg  if test "X${COLLECT_NAMES+set}" != Xset; then
1219629baa8cSmrg    COLLECT_NAMES=
1220629baa8cSmrg    export COLLECT_NAMES
1221629baa8cSmrg  fi
1222629baa8cSmrg  ;;
1223629baa8cSmrgesac
1224629baa8cSmrg
1225629baa8cSmrg# Global variables:
1226629baa8cSmrgofile=libtool
1227629baa8cSmrgcan_build_shared=yes
1228629baa8cSmrg
1229629baa8cSmrg# All known linkers require a `.a' archive for static linking (except MSVC,
1230629baa8cSmrg# which needs '.lib').
1231629baa8cSmrglibext=a
1232629baa8cSmrg
1233629baa8cSmrgwith_gnu_ld="$lt_cv_prog_gnu_ld"
1234629baa8cSmrg
1235629baa8cSmrgold_CC="$CC"
1236629baa8cSmrgold_CFLAGS="$CFLAGS"
1237629baa8cSmrg
1238629baa8cSmrg# Set sane defaults for various variables
1239629baa8cSmrgtest -z "$CC" && CC=cc
1240629baa8cSmrgtest -z "$LTCC" && LTCC=$CC
1241629baa8cSmrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
1242629baa8cSmrgtest -z "$LD" && LD=ld
1243629baa8cSmrgtest -z "$ac_objext" && ac_objext=o
1244629baa8cSmrg
1245629baa8cSmrg_LT_CC_BASENAME([$compiler])
1246629baa8cSmrg
1247629baa8cSmrg# Only perform the check for file, if the check method requires it
1248629baa8cSmrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file
1249629baa8cSmrgcase $deplibs_check_method in
1250629baa8cSmrgfile_magic*)
1251629baa8cSmrg  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
1252629baa8cSmrg    _LT_PATH_MAGIC
1253629baa8cSmrg  fi
1254629baa8cSmrg  ;;
1255629baa8cSmrgesac
1256629baa8cSmrg
1257629baa8cSmrg# Use C for the default configuration in the libtool script
1258629baa8cSmrgLT_SUPPORTED_TAG([CC])
1259629baa8cSmrg_LT_LANG_C_CONFIG
1260629baa8cSmrg_LT_LANG_DEFAULT_CONFIG
1261629baa8cSmrg_LT_CONFIG_COMMANDS
1262629baa8cSmrg])# _LT_SETUP
1263629baa8cSmrg
1264629baa8cSmrg
1265629baa8cSmrg# _LT_PREPARE_SED_QUOTE_VARS
1266629baa8cSmrg# --------------------------
1267629baa8cSmrg# Define a few sed substitution that help us do robust quoting.
1268629baa8cSmrgm4_defun([_LT_PREPARE_SED_QUOTE_VARS],
1269629baa8cSmrg[# Backslashify metacharacters that are still active within
1270629baa8cSmrg# double-quoted strings.
1271629baa8cSmrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
1272629baa8cSmrg
1273629baa8cSmrg# Same as above, but do not quote variable references.
1274629baa8cSmrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g'
1275629baa8cSmrg
1276629baa8cSmrg# Sed substitution to delay expansion of an escaped shell variable in a
1277629baa8cSmrg# double_quote_subst'ed string.
1278629baa8cSmrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
1279629baa8cSmrg
1280629baa8cSmrg# Sed substitution to delay expansion of an escaped single quote.
1281629baa8cSmrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
1282629baa8cSmrg
1283629baa8cSmrg# Sed substitution to avoid accidental globbing in evaled expressions
1284629baa8cSmrgno_glob_subst='s/\*/\\\*/g'
1285629baa8cSmrg])
1286629baa8cSmrg
1287629baa8cSmrg# _LT_PROG_LTMAIN
1288629baa8cSmrg# ---------------
1289629baa8cSmrg# Note that this code is called both from `configure', and `config.status'
1290629baa8cSmrg# now that we use AC_CONFIG_COMMANDS to generate libtool.  Notably,
1291629baa8cSmrg# `config.status' has no value for ac_aux_dir unless we are using Automake,
1292629baa8cSmrg# so we pass a copy along to make sure it has a sensible value anyway.
1293629baa8cSmrgm4_defun([_LT_PROG_LTMAIN],
1294629baa8cSmrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
1295629baa8cSmrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
1296629baa8cSmrgltmain="$ac_aux_dir/ltmain.sh"
1297629baa8cSmrg])# _LT_PROG_LTMAIN
1298629baa8cSmrg
1299629baa8cSmrg
1300629baa8cSmrg
1301629baa8cSmrg# So that we can recreate a full libtool script including additional
1302629baa8cSmrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
1303629baa8cSmrg# in macros and then make a single call at the end using the `libtool'
1304629baa8cSmrg# label.
1305629baa8cSmrg
1306629baa8cSmrg
1307629baa8cSmrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
1308629baa8cSmrg# ----------------------------------------
1309629baa8cSmrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
1310629baa8cSmrgm4_define([_LT_CONFIG_LIBTOOL_INIT],
1311629baa8cSmrg[m4_ifval([$1],
1312629baa8cSmrg          [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
1313629baa8cSmrg                     [$1
1314629baa8cSmrg])])])
1315629baa8cSmrg
1316629baa8cSmrg# Initialize.
1317629baa8cSmrgm4_define([_LT_OUTPUT_LIBTOOL_INIT])
1318629baa8cSmrg
1319629baa8cSmrg
1320629baa8cSmrg# _LT_CONFIG_LIBTOOL([COMMANDS])
1321629baa8cSmrg# ------------------------------
1322629baa8cSmrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
1323629baa8cSmrgm4_define([_LT_CONFIG_LIBTOOL],
1324629baa8cSmrg[m4_ifval([$1],
1325629baa8cSmrg          [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
1326629baa8cSmrg                     [$1
1327629baa8cSmrg])])])
1328629baa8cSmrg
1329629baa8cSmrg# Initialize.
1330629baa8cSmrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
1331629baa8cSmrg
1332629baa8cSmrg
1333629baa8cSmrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
1334629baa8cSmrg# -----------------------------------------------------
1335629baa8cSmrgm4_defun([_LT_CONFIG_SAVE_COMMANDS],
1336629baa8cSmrg[_LT_CONFIG_LIBTOOL([$1])
1337629baa8cSmrg_LT_CONFIG_LIBTOOL_INIT([$2])
1338629baa8cSmrg])
1339629baa8cSmrg
1340629baa8cSmrg
1341629baa8cSmrg# _LT_FORMAT_COMMENT([COMMENT])
1342629baa8cSmrg# -----------------------------
1343629baa8cSmrg# Add leading comment marks to the start of each line, and a trailing
1344629baa8cSmrg# full-stop to the whole comment if one is not present already.
1345629baa8cSmrgm4_define([_LT_FORMAT_COMMENT],
1346629baa8cSmrg[m4_ifval([$1], [
1347629baa8cSmrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
1348629baa8cSmrg              [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
1349629baa8cSmrg)])
1350629baa8cSmrg
1351629baa8cSmrg
1352629baa8cSmrg
1353629baa8cSmrg
1354629baa8cSmrg
1355629baa8cSmrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
1356629baa8cSmrg# -------------------------------------------------------------------
1357629baa8cSmrg# CONFIGNAME is the name given to the value in the libtool script.
1358629baa8cSmrg# VARNAME is the (base) name used in the configure script.
1359629baa8cSmrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
1360629baa8cSmrg# VARNAME.  Any other value will be used directly.
1361629baa8cSmrgm4_define([_LT_DECL],
1362629baa8cSmrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
1363629baa8cSmrg    [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
1364629baa8cSmrg	[m4_ifval([$1], [$1], [$2])])
1365629baa8cSmrg    lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
1366629baa8cSmrg    m4_ifval([$4],
1367629baa8cSmrg	[lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
1368629baa8cSmrg    lt_dict_add_subkey([lt_decl_dict], [$2],
1369629baa8cSmrg	[tagged?], [m4_ifval([$5], [yes], [no])])])
1370629baa8cSmrg])
1371629baa8cSmrg
1372629baa8cSmrg
1373629baa8cSmrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
1374629baa8cSmrg# --------------------------------------------------------
1375629baa8cSmrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
1376629baa8cSmrg
1377629baa8cSmrg
1378629baa8cSmrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
1379629baa8cSmrg# ------------------------------------------------
1380629baa8cSmrgm4_define([lt_decl_tag_varnames],
1381629baa8cSmrg[_lt_decl_filter([tagged?], [yes], $@)])
1382629baa8cSmrg
1383629baa8cSmrg
1384629baa8cSmrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
1385629baa8cSmrg# ---------------------------------------------------------
1386629baa8cSmrgm4_define([_lt_decl_filter],
1387629baa8cSmrg[m4_case([$#],
1388629baa8cSmrg  [0], [m4_fatal([$0: too few arguments: $#])],
1389629baa8cSmrg  [1], [m4_fatal([$0: too few arguments: $#: $1])],
1390629baa8cSmrg  [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
1391629baa8cSmrg  [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
1392629baa8cSmrg  [lt_dict_filter([lt_decl_dict], $@)])[]dnl
1393629baa8cSmrg])
1394629baa8cSmrg
1395629baa8cSmrg
1396629baa8cSmrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
1397629baa8cSmrg# --------------------------------------------------
1398629baa8cSmrgm4_define([lt_decl_quote_varnames],
1399629baa8cSmrg[_lt_decl_filter([value], [1], $@)])
1400629baa8cSmrg
1401629baa8cSmrg
1402629baa8cSmrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
1403629baa8cSmrg# ---------------------------------------------------
1404629baa8cSmrgm4_define([lt_decl_dquote_varnames],
1405629baa8cSmrg[_lt_decl_filter([value], [2], $@)])
1406629baa8cSmrg
1407629baa8cSmrg
1408629baa8cSmrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
1409629baa8cSmrg# ---------------------------------------------------
1410629baa8cSmrgm4_define([lt_decl_varnames_tagged],
1411629baa8cSmrg[m4_assert([$# <= 2])dnl
1412629baa8cSmrg_$0(m4_quote(m4_default([$1], [[, ]])),
1413629baa8cSmrg    m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
1414629baa8cSmrg    m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
1415629baa8cSmrgm4_define([_lt_decl_varnames_tagged],
1416629baa8cSmrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
1417629baa8cSmrg
1418629baa8cSmrg
1419629baa8cSmrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
1420629baa8cSmrg# ------------------------------------------------
1421629baa8cSmrgm4_define([lt_decl_all_varnames],
1422629baa8cSmrg[_$0(m4_quote(m4_default([$1], [[, ]])),
1423629baa8cSmrg     m4_if([$2], [],
1424629baa8cSmrg	   m4_quote(lt_decl_varnames),
1425629baa8cSmrg	m4_quote(m4_shift($@))))[]dnl
1426629baa8cSmrg])
1427629baa8cSmrgm4_define([_lt_decl_all_varnames],
1428629baa8cSmrg[lt_join($@, lt_decl_varnames_tagged([$1],
1429629baa8cSmrg			lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
1430629baa8cSmrg])
1431629baa8cSmrg
1432629baa8cSmrg
1433629baa8cSmrg# _LT_CONFIG_STATUS_DECLARE([VARNAME])
1434629baa8cSmrg# ------------------------------------
1435629baa8cSmrg# Quote a variable value, and forward it to `config.status' so that its
1436629baa8cSmrg# declaration there will have the same value as in `configure'.  VARNAME
1437629baa8cSmrg# must have a single quote delimited value for this to work.
1438629baa8cSmrgm4_define([_LT_CONFIG_STATUS_DECLARE],
1439629baa8cSmrg[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
1440629baa8cSmrg
1441629baa8cSmrg
1442629baa8cSmrg# _LT_CONFIG_STATUS_DECLARATIONS
1443629baa8cSmrg# ------------------------------
1444629baa8cSmrg# We delimit libtool config variables with single quotes, so when
1445629baa8cSmrg# we write them to config.status, we have to be sure to quote all
1446629baa8cSmrg# embedded single quotes properly.  In configure, this macro expands
1447629baa8cSmrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
1448629baa8cSmrg#
1449629baa8cSmrg#    <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
1450629baa8cSmrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
1451629baa8cSmrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
1452629baa8cSmrg    [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
1453629baa8cSmrg
1454629baa8cSmrg
1455629baa8cSmrg# _LT_LIBTOOL_TAGS
1456629baa8cSmrg# ----------------
1457629baa8cSmrg# Output comment and list of tags supported by the script
1458629baa8cSmrgm4_defun([_LT_LIBTOOL_TAGS],
1459629baa8cSmrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
1460629baa8cSmrgavailable_tags="_LT_TAGS"dnl
1461629baa8cSmrg])
1462629baa8cSmrg
1463629baa8cSmrg
1464629baa8cSmrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
1465629baa8cSmrg# -----------------------------------
1466629baa8cSmrg# Extract the dictionary values for VARNAME (optionally with TAG) and
1467629baa8cSmrg# expand to a commented shell variable setting:
1468629baa8cSmrg#
1469629baa8cSmrg#    # Some comment about what VAR is for.
1470629baa8cSmrg#    visible_name=$lt_internal_name
1471629baa8cSmrgm4_define([_LT_LIBTOOL_DECLARE],
1472629baa8cSmrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
1473629baa8cSmrg					   [description])))[]dnl
1474629baa8cSmrgm4_pushdef([_libtool_name],
1475629baa8cSmrg    m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
1476629baa8cSmrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
1477629baa8cSmrg    [0], [_libtool_name=[$]$1],
1478629baa8cSmrg    [1], [_libtool_name=$lt_[]$1],
1479629baa8cSmrg    [2], [_libtool_name=$lt_[]$1],
1480629baa8cSmrg    [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
1481629baa8cSmrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
1482629baa8cSmrg])
1483629baa8cSmrg
1484629baa8cSmrg
1485629baa8cSmrg# _LT_LIBTOOL_CONFIG_VARS
1486629baa8cSmrg# -----------------------
1487629baa8cSmrg# Produce commented declarations of non-tagged libtool config variables
1488629baa8cSmrg# suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
1489629baa8cSmrg# script.  Tagged libtool config variables (even for the LIBTOOL CONFIG
1490629baa8cSmrg# section) are produced by _LT_LIBTOOL_TAG_VARS.
1491629baa8cSmrgm4_defun([_LT_LIBTOOL_CONFIG_VARS],
1492629baa8cSmrg[m4_foreach([_lt_var],
1493629baa8cSmrg    m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
1494629baa8cSmrg    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
1495629baa8cSmrg
1496629baa8cSmrg
1497629baa8cSmrg# _LT_LIBTOOL_TAG_VARS(TAG)
1498629baa8cSmrg# -------------------------
1499629baa8cSmrgm4_define([_LT_LIBTOOL_TAG_VARS],
1500629baa8cSmrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
1501629baa8cSmrg    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
1502629baa8cSmrg
1503629baa8cSmrg
1504629baa8cSmrg# _LT_TAGVAR(VARNAME, [TAGNAME])
1505629baa8cSmrg# ------------------------------
1506629baa8cSmrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
1507629baa8cSmrg
1508629baa8cSmrg
1509629baa8cSmrg# _LT_CONFIG_COMMANDS
1510629baa8cSmrg# -------------------
1511629baa8cSmrg# Send accumulated output to $CONFIG_STATUS.  Thanks to the lists of
1512629baa8cSmrg# variables for single and double quote escaping we saved from calls
1513629baa8cSmrg# to _LT_DECL, we can put quote escaped variables declarations
1514629baa8cSmrg# into `config.status', and then the shell code to quote escape them in
1515629baa8cSmrg# for loops in `config.status'.  Finally, any additional code accumulated
1516629baa8cSmrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
1517629baa8cSmrgm4_defun([_LT_CONFIG_COMMANDS],
1518629baa8cSmrg[AC_PROVIDE_IFELSE([LT_OUTPUT],
1519629baa8cSmrg	dnl If the libtool generation code has been placed in $CONFIG_LT,
1520629baa8cSmrg	dnl instead of duplicating it all over again into config.status,
1521629baa8cSmrg	dnl then we will have config.status run $CONFIG_LT later, so it
1522629baa8cSmrg	dnl needs to know what name is stored there:
1523629baa8cSmrg        [AC_CONFIG_COMMANDS([libtool],
1524629baa8cSmrg            [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
1525629baa8cSmrg    dnl If the libtool generation code is destined for config.status,
1526629baa8cSmrg    dnl expand the accumulated commands and init code now:
1527629baa8cSmrg    [AC_CONFIG_COMMANDS([libtool],
1528629baa8cSmrg        [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
1529629baa8cSmrg])#_LT_CONFIG_COMMANDS
1530629baa8cSmrg
1531629baa8cSmrg
1532629baa8cSmrg# Initialize.
1533629baa8cSmrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
1534629baa8cSmrg[
1535629baa8cSmrg
1536629baa8cSmrg# The HP-UX ksh and POSIX shell print the target directory to stdout
1537629baa8cSmrg# if CDPATH is set.
1538629baa8cSmrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
1539629baa8cSmrg
1540629baa8cSmrgsed_quote_subst='$sed_quote_subst'
1541629baa8cSmrgdouble_quote_subst='$double_quote_subst'
1542629baa8cSmrgdelay_variable_subst='$delay_variable_subst'
1543629baa8cSmrg_LT_CONFIG_STATUS_DECLARATIONS
1544629baa8cSmrgLTCC='$LTCC'
1545629baa8cSmrgLTCFLAGS='$LTCFLAGS'
1546629baa8cSmrgcompiler='$compiler_DEFAULT'
1547629baa8cSmrg
1548629baa8cSmrg# A function that is used when there is no print builtin or printf.
1549629baa8cSmrgfunc_fallback_echo ()
1550629baa8cSmrg{
1551629baa8cSmrg  eval 'cat <<_LTECHO_EOF
1552629baa8cSmrg\$[]1
1553629baa8cSmrg_LTECHO_EOF'
1554629baa8cSmrg}
1555629baa8cSmrg
1556629baa8cSmrg# Quote evaled strings.
1557629baa8cSmrgfor var in lt_decl_all_varnames([[ \
1558629baa8cSmrg]], lt_decl_quote_varnames); do
1559629baa8cSmrg    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
1560629baa8cSmrg    *[[\\\\\\\`\\"\\\$]]*)
1561629baa8cSmrg      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
1562629baa8cSmrg      ;;
1563629baa8cSmrg    *)
1564629baa8cSmrg      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
1565629baa8cSmrg      ;;
1566629baa8cSmrg    esac
1567629baa8cSmrgdone
1568629baa8cSmrg
1569629baa8cSmrg# Double-quote double-evaled strings.
1570629baa8cSmrgfor var in lt_decl_all_varnames([[ \
1571629baa8cSmrg]], lt_decl_dquote_varnames); do
1572629baa8cSmrg    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
1573629baa8cSmrg    *[[\\\\\\\`\\"\\\$]]*)
1574629baa8cSmrg      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
1575629baa8cSmrg      ;;
1576629baa8cSmrg    *)
1577629baa8cSmrg      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
1578629baa8cSmrg      ;;
1579629baa8cSmrg    esac
1580629baa8cSmrgdone
1581629baa8cSmrg
1582629baa8cSmrg_LT_OUTPUT_LIBTOOL_INIT
1583629baa8cSmrg])
1584629baa8cSmrg
1585629baa8cSmrg# _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
1586629baa8cSmrg# ------------------------------------
1587629baa8cSmrg# Generate a child script FILE with all initialization necessary to
1588629baa8cSmrg# reuse the environment learned by the parent script, and make the
1589629baa8cSmrg# file executable.  If COMMENT is supplied, it is inserted after the
1590629baa8cSmrg# `#!' sequence but before initialization text begins.  After this
1591629baa8cSmrg# macro, additional text can be appended to FILE to form the body of
1592629baa8cSmrg# the child script.  The macro ends with non-zero status if the
1593629baa8cSmrg# file could not be fully written (such as if the disk is full).
1594629baa8cSmrgm4_ifdef([AS_INIT_GENERATED],
1595629baa8cSmrg[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
1596629baa8cSmrg[m4_defun([_LT_GENERATED_FILE_INIT],
1597629baa8cSmrg[m4_require([AS_PREPARE])]dnl
1598629baa8cSmrg[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
1599629baa8cSmrg[lt_write_fail=0
1600629baa8cSmrgcat >$1 <<_ASEOF || lt_write_fail=1
1601629baa8cSmrg#! $SHELL
1602629baa8cSmrg# Generated by $as_me.
1603629baa8cSmrg$2
1604629baa8cSmrgSHELL=\${CONFIG_SHELL-$SHELL}
1605629baa8cSmrgexport SHELL
1606629baa8cSmrg_ASEOF
1607629baa8cSmrgcat >>$1 <<\_ASEOF || lt_write_fail=1
1608629baa8cSmrgAS_SHELL_SANITIZE
1609629baa8cSmrg_AS_PREPARE
1610629baa8cSmrgexec AS_MESSAGE_FD>&1
1611629baa8cSmrg_ASEOF
1612629baa8cSmrgtest $lt_write_fail = 0 && chmod +x $1[]dnl
1613629baa8cSmrgm4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
1614629baa8cSmrg
1615629baa8cSmrg# LT_OUTPUT
1616629baa8cSmrg# ---------
1617629baa8cSmrg# This macro allows early generation of the libtool script (before
1618629baa8cSmrg# AC_OUTPUT is called), incase it is used in configure for compilation
1619629baa8cSmrg# tests.
1620629baa8cSmrgAC_DEFUN([LT_OUTPUT],
1621629baa8cSmrg[: ${CONFIG_LT=./config.lt}
1622629baa8cSmrgAC_MSG_NOTICE([creating $CONFIG_LT])
1623629baa8cSmrg_LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
1624629baa8cSmrg[# Run this file to recreate a libtool stub with the current configuration.])
1625629baa8cSmrg
1626629baa8cSmrgcat >>"$CONFIG_LT" <<\_LTEOF
1627629baa8cSmrglt_cl_silent=false
1628629baa8cSmrgexec AS_MESSAGE_LOG_FD>>config.log
1629629baa8cSmrg{
1630629baa8cSmrg  echo
1631629baa8cSmrg  AS_BOX([Running $as_me.])
1632629baa8cSmrg} >&AS_MESSAGE_LOG_FD
1633629baa8cSmrg
1634629baa8cSmrglt_cl_help="\
1635629baa8cSmrg\`$as_me' creates a local libtool stub from the current configuration,
1636629baa8cSmrgfor use in further configure time tests before the real libtool is
1637629baa8cSmrggenerated.
1638629baa8cSmrg
1639629baa8cSmrgUsage: $[0] [[OPTIONS]]
1640629baa8cSmrg
1641629baa8cSmrg  -h, --help      print this help, then exit
1642629baa8cSmrg  -V, --version   print version number, then exit
1643629baa8cSmrg  -q, --quiet     do not print progress messages
1644629baa8cSmrg  -d, --debug     don't remove temporary files
1645629baa8cSmrg
1646629baa8cSmrgReport bugs to <bug-libtool@gnu.org>."
1647629baa8cSmrg
1648629baa8cSmrglt_cl_version="\
1649629baa8cSmrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
1650629baa8cSmrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
1651629baa8cSmrgconfigured by $[0], generated by m4_PACKAGE_STRING.
1652629baa8cSmrg
1653629baa8cSmrgCopyright (C) 2010 Free Software Foundation, Inc.
1654629baa8cSmrgThis config.lt script is free software; the Free Software Foundation
1655629baa8cSmrggives unlimited permision to copy, distribute and modify it."
1656629baa8cSmrg
1657629baa8cSmrgwhile test $[#] != 0
1658629baa8cSmrgdo
1659629baa8cSmrg  case $[1] in
1660629baa8cSmrg    --version | --v* | -V )
1661629baa8cSmrg      echo "$lt_cl_version"; exit 0 ;;
1662629baa8cSmrg    --help | --h* | -h )
1663629baa8cSmrg      echo "$lt_cl_help"; exit 0 ;;
1664629baa8cSmrg    --debug | --d* | -d )
1665629baa8cSmrg      debug=: ;;
1666629baa8cSmrg    --quiet | --q* | --silent | --s* | -q )
1667629baa8cSmrg      lt_cl_silent=: ;;
1668629baa8cSmrg
1669629baa8cSmrg    -*) AC_MSG_ERROR([unrecognized option: $[1]
1670629baa8cSmrgTry \`$[0] --help' for more information.]) ;;
1671629baa8cSmrg
1672629baa8cSmrg    *) AC_MSG_ERROR([unrecognized argument: $[1]
1673629baa8cSmrgTry \`$[0] --help' for more information.]) ;;
1674629baa8cSmrg  esac
1675629baa8cSmrg  shift
1676629baa8cSmrgdone
1677629baa8cSmrg
1678629baa8cSmrgif $lt_cl_silent; then
1679629baa8cSmrg  exec AS_MESSAGE_FD>/dev/null
1680629baa8cSmrgfi
1681629baa8cSmrg_LTEOF
1682629baa8cSmrg
1683629baa8cSmrgcat >>"$CONFIG_LT" <<_LTEOF
1684629baa8cSmrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
1685629baa8cSmrg_LTEOF
1686629baa8cSmrg
1687629baa8cSmrgcat >>"$CONFIG_LT" <<\_LTEOF
1688629baa8cSmrgAC_MSG_NOTICE([creating $ofile])
1689629baa8cSmrg_LT_OUTPUT_LIBTOOL_COMMANDS
1690629baa8cSmrgAS_EXIT(0)
1691629baa8cSmrg_LTEOF
1692629baa8cSmrgchmod +x "$CONFIG_LT"
1693629baa8cSmrg
1694629baa8cSmrg# configure is writing to config.log, but config.lt does its own redirection,
1695629baa8cSmrg# appending to config.log, which fails on DOS, as config.log is still kept
1696629baa8cSmrg# open by configure.  Here we exec the FD to /dev/null, effectively closing
1697629baa8cSmrg# config.log, so it can be properly (re)opened and appended to by config.lt.
1698629baa8cSmrglt_cl_success=:
1699629baa8cSmrgtest "$silent" = yes &&
1700629baa8cSmrg  lt_config_lt_args="$lt_config_lt_args --quiet"
1701629baa8cSmrgexec AS_MESSAGE_LOG_FD>/dev/null
1702629baa8cSmrg$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
1703629baa8cSmrgexec AS_MESSAGE_LOG_FD>>config.log
1704629baa8cSmrg$lt_cl_success || AS_EXIT(1)
1705629baa8cSmrg])# LT_OUTPUT
1706629baa8cSmrg
1707629baa8cSmrg
1708629baa8cSmrg# _LT_CONFIG(TAG)
1709629baa8cSmrg# ---------------
1710629baa8cSmrg# If TAG is the built-in tag, create an initial libtool script with a
1711629baa8cSmrg# default configuration from the untagged config vars.  Otherwise add code
1712629baa8cSmrg# to config.status for appending the configuration named by TAG from the
1713629baa8cSmrg# matching tagged config vars.
1714629baa8cSmrgm4_defun([_LT_CONFIG],
1715629baa8cSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1716629baa8cSmrg_LT_CONFIG_SAVE_COMMANDS([
1717629baa8cSmrg  m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
1718629baa8cSmrg  m4_if(_LT_TAG, [C], [
1719629baa8cSmrg    # See if we are running on zsh, and set the options which allow our
1720629baa8cSmrg    # commands through without removal of \ escapes.
1721629baa8cSmrg    if test -n "${ZSH_VERSION+set}" ; then
1722629baa8cSmrg      setopt NO_GLOB_SUBST
1723629baa8cSmrg    fi
1724629baa8cSmrg
1725629baa8cSmrg    cfgfile="${ofile}T"
1726629baa8cSmrg    trap "$RM \"$cfgfile\"; exit 1" 1 2 15
1727629baa8cSmrg    $RM "$cfgfile"
1728629baa8cSmrg
1729629baa8cSmrg    cat <<_LT_EOF >> "$cfgfile"
1730629baa8cSmrg#! $SHELL
1731629baa8cSmrg
1732629baa8cSmrg# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
1733629baa8cSmrg# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
1734629baa8cSmrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
1735629baa8cSmrg# NOTE: Changes made to this file will be lost: look at ltmain.sh.
1736629baa8cSmrg#
1737629baa8cSmrg_LT_COPYING
1738629baa8cSmrg_LT_LIBTOOL_TAGS
1739629baa8cSmrg
1740629baa8cSmrg# ### BEGIN LIBTOOL CONFIG
1741629baa8cSmrg_LT_LIBTOOL_CONFIG_VARS
1742629baa8cSmrg_LT_LIBTOOL_TAG_VARS
1743629baa8cSmrg# ### END LIBTOOL CONFIG
1744629baa8cSmrg
1745629baa8cSmrg_LT_EOF
1746629baa8cSmrg
1747629baa8cSmrg  case $host_os in
1748629baa8cSmrg  aix3*)
1749629baa8cSmrg    cat <<\_LT_EOF >> "$cfgfile"
1750629baa8cSmrg# AIX sometimes has problems with the GCC collect2 program.  For some
1751629baa8cSmrg# reason, if we set the COLLECT_NAMES environment variable, the problems
1752629baa8cSmrg# vanish in a puff of smoke.
1753629baa8cSmrgif test "X${COLLECT_NAMES+set}" != Xset; then
1754629baa8cSmrg  COLLECT_NAMES=
1755629baa8cSmrg  export COLLECT_NAMES
1756629baa8cSmrgfi
1757629baa8cSmrg_LT_EOF
1758629baa8cSmrg    ;;
1759629baa8cSmrg  esac
1760629baa8cSmrg
1761629baa8cSmrg  _LT_PROG_LTMAIN
1762629baa8cSmrg
1763629baa8cSmrg  # We use sed instead of cat because bash on DJGPP gets confused if
1764629baa8cSmrg  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
1765629baa8cSmrg  # text mode, it properly converts lines to CR/LF.  This bash problem
1766629baa8cSmrg  # is reportedly fixed, but why not run on old versions too?
1767629baa8cSmrg  sed '$q' "$ltmain" >> "$cfgfile" \
1768629baa8cSmrg     || (rm -f "$cfgfile"; exit 1)
1769629baa8cSmrg
1770629baa8cSmrg  _LT_PROG_REPLACE_SHELLFNS
1771629baa8cSmrg
1772629baa8cSmrg   mv -f "$cfgfile" "$ofile" ||
1773629baa8cSmrg    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
1774629baa8cSmrg  chmod +x "$ofile"
1775629baa8cSmrg],
1776629baa8cSmrg[cat <<_LT_EOF >> "$ofile"
1777629baa8cSmrg
1778629baa8cSmrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
1779629baa8cSmrgdnl in a comment (ie after a #).
1780629baa8cSmrg# ### BEGIN LIBTOOL TAG CONFIG: $1
1781629baa8cSmrg_LT_LIBTOOL_TAG_VARS(_LT_TAG)
1782629baa8cSmrg# ### END LIBTOOL TAG CONFIG: $1
1783629baa8cSmrg_LT_EOF
1784629baa8cSmrg])dnl /m4_if
1785629baa8cSmrg],
1786629baa8cSmrg[m4_if([$1], [], [
1787629baa8cSmrg    PACKAGE='$PACKAGE'
1788629baa8cSmrg    VERSION='$VERSION'
1789629baa8cSmrg    TIMESTAMP='$TIMESTAMP'
1790629baa8cSmrg    RM='$RM'
1791629baa8cSmrg    ofile='$ofile'], [])
1792629baa8cSmrg])dnl /_LT_CONFIG_SAVE_COMMANDS
1793629baa8cSmrg])# _LT_CONFIG
1794629baa8cSmrg
1795629baa8cSmrg
1796629baa8cSmrg# LT_SUPPORTED_TAG(TAG)
1797629baa8cSmrg# ---------------------
1798629baa8cSmrg# Trace this macro to discover what tags are supported by the libtool
1799629baa8cSmrg# --tag option, using:
1800629baa8cSmrg#    autoconf --trace 'LT_SUPPORTED_TAG:$1'
1801629baa8cSmrgAC_DEFUN([LT_SUPPORTED_TAG], [])
1802629baa8cSmrg
1803629baa8cSmrg
1804629baa8cSmrg# C support is built-in for now
1805629baa8cSmrgm4_define([_LT_LANG_C_enabled], [])
1806629baa8cSmrgm4_define([_LT_TAGS], [])
1807629baa8cSmrg
1808629baa8cSmrg
1809629baa8cSmrg# LT_LANG(LANG)
1810629baa8cSmrg# -------------
1811629baa8cSmrg# Enable libtool support for the given language if not already enabled.
1812629baa8cSmrgAC_DEFUN([LT_LANG],
1813629baa8cSmrg[AC_BEFORE([$0], [LT_OUTPUT])dnl
1814629baa8cSmrgm4_case([$1],
1815629baa8cSmrg  [C],			[_LT_LANG(C)],
1816629baa8cSmrg  [C++],		[_LT_LANG(CXX)],
1817629baa8cSmrg  [Java],		[_LT_LANG(GCJ)],
1818629baa8cSmrg  [Fortran 77],		[_LT_LANG(F77)],
1819629baa8cSmrg  [Fortran],		[_LT_LANG(FC)],
1820629baa8cSmrg  [Windows Resource],	[_LT_LANG(RC)],
1821629baa8cSmrg  [m4_ifdef([_LT_LANG_]$1[_CONFIG],
1822629baa8cSmrg    [_LT_LANG($1)],
1823629baa8cSmrg    [m4_fatal([$0: unsupported language: "$1"])])])dnl
1824629baa8cSmrg])# LT_LANG
1825629baa8cSmrg
1826629baa8cSmrg
1827629baa8cSmrg# _LT_LANG(LANGNAME)
1828629baa8cSmrg# ------------------
1829629baa8cSmrgm4_defun([_LT_LANG],
1830629baa8cSmrg[m4_ifdef([_LT_LANG_]$1[_enabled], [],
1831629baa8cSmrg  [LT_SUPPORTED_TAG([$1])dnl
1832629baa8cSmrg  m4_append([_LT_TAGS], [$1 ])dnl
1833629baa8cSmrg  m4_define([_LT_LANG_]$1[_enabled], [])dnl
1834629baa8cSmrg  _LT_LANG_$1_CONFIG($1)])dnl
1835629baa8cSmrg])# _LT_LANG
1836629baa8cSmrg
1837629baa8cSmrg
1838629baa8cSmrg# _LT_LANG_DEFAULT_CONFIG
1839629baa8cSmrg# -----------------------
1840629baa8cSmrgm4_defun([_LT_LANG_DEFAULT_CONFIG],
1841629baa8cSmrg[AC_PROVIDE_IFELSE([AC_PROG_CXX],
1842629baa8cSmrg  [LT_LANG(CXX)],
1843629baa8cSmrg  [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
1844629baa8cSmrg
1845629baa8cSmrgAC_PROVIDE_IFELSE([AC_PROG_F77],
1846629baa8cSmrg  [LT_LANG(F77)],
1847629baa8cSmrg  [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
1848629baa8cSmrg
1849629baa8cSmrgAC_PROVIDE_IFELSE([AC_PROG_FC],
1850629baa8cSmrg  [LT_LANG(FC)],
1851629baa8cSmrg  [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
1852629baa8cSmrg
1853629baa8cSmrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
1854629baa8cSmrgdnl pulling things in needlessly.
1855629baa8cSmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ],
1856629baa8cSmrg  [LT_LANG(GCJ)],
1857629baa8cSmrg  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
1858629baa8cSmrg    [LT_LANG(GCJ)],
1859629baa8cSmrg    [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
1860629baa8cSmrg      [LT_LANG(GCJ)],
1861629baa8cSmrg      [m4_ifdef([AC_PROG_GCJ],
1862629baa8cSmrg	[m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
1863629baa8cSmrg       m4_ifdef([A][M_PROG_GCJ],
1864629baa8cSmrg	[m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
1865629baa8cSmrg       m4_ifdef([LT_PROG_GCJ],
1866629baa8cSmrg	[m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
1867629baa8cSmrg
1868629baa8cSmrgAC_PROVIDE_IFELSE([LT_PROG_RC],
1869629baa8cSmrg  [LT_LANG(RC)],
1870629baa8cSmrg  [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
1871629baa8cSmrg])# _LT_LANG_DEFAULT_CONFIG
1872629baa8cSmrg
1873629baa8cSmrg# Obsolete macros:
1874629baa8cSmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
1875629baa8cSmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
1876629baa8cSmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
1877629baa8cSmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
1878629baa8cSmrgAU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
1879629baa8cSmrgdnl aclocal-1.4 backwards compatibility:
1880629baa8cSmrgdnl AC_DEFUN([AC_LIBTOOL_CXX], [])
1881629baa8cSmrgdnl AC_DEFUN([AC_LIBTOOL_F77], [])
1882629baa8cSmrgdnl AC_DEFUN([AC_LIBTOOL_FC], [])
1883629baa8cSmrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
1884629baa8cSmrgdnl AC_DEFUN([AC_LIBTOOL_RC], [])
1885629baa8cSmrg
1886629baa8cSmrg
1887629baa8cSmrg# _LT_TAG_COMPILER
1888629baa8cSmrg# ----------------
1889629baa8cSmrgm4_defun([_LT_TAG_COMPILER],
1890629baa8cSmrg[AC_REQUIRE([AC_PROG_CC])dnl
1891629baa8cSmrg
1892629baa8cSmrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
1893629baa8cSmrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
1894629baa8cSmrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
1895629baa8cSmrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
1896629baa8cSmrg
1897629baa8cSmrg# If no C compiler was specified, use CC.
1898629baa8cSmrgLTCC=${LTCC-"$CC"}
1899629baa8cSmrg
1900629baa8cSmrg# If no C compiler flags were specified, use CFLAGS.
1901629baa8cSmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"}
1902629baa8cSmrg
1903629baa8cSmrg# Allow CC to be a program name with arguments.
1904629baa8cSmrgcompiler=$CC
1905629baa8cSmrg])# _LT_TAG_COMPILER
1906629baa8cSmrg
1907629baa8cSmrg
1908629baa8cSmrg# _LT_COMPILER_BOILERPLATE
1909629baa8cSmrg# ------------------------
1910629baa8cSmrg# Check for compiler boilerplate output or warnings with
1911629baa8cSmrg# the simple compiler test code.
1912629baa8cSmrgm4_defun([_LT_COMPILER_BOILERPLATE],
1913629baa8cSmrg[m4_require([_LT_DECL_SED])dnl
1914629baa8cSmrgac_outfile=conftest.$ac_objext
1915629baa8cSmrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext
1916629baa8cSmrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
1917629baa8cSmrg_lt_compiler_boilerplate=`cat conftest.err`
1918629baa8cSmrg$RM conftest*
1919629baa8cSmrg])# _LT_COMPILER_BOILERPLATE
1920629baa8cSmrg
1921629baa8cSmrg
1922629baa8cSmrg# _LT_LINKER_BOILERPLATE
1923629baa8cSmrg# ----------------------
1924629baa8cSmrg# Check for linker boilerplate output or warnings with
1925629baa8cSmrg# the simple link test code.
1926629baa8cSmrgm4_defun([_LT_LINKER_BOILERPLATE],
1927629baa8cSmrg[m4_require([_LT_DECL_SED])dnl
1928629baa8cSmrgac_outfile=conftest.$ac_objext
1929629baa8cSmrgecho "$lt_simple_link_test_code" >conftest.$ac_ext
1930629baa8cSmrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
1931629baa8cSmrg_lt_linker_boilerplate=`cat conftest.err`
1932629baa8cSmrg$RM -r conftest*
1933629baa8cSmrg])# _LT_LINKER_BOILERPLATE
1934629baa8cSmrg
1935629baa8cSmrg# _LT_REQUIRED_DARWIN_CHECKS
1936629baa8cSmrg# -------------------------
1937629baa8cSmrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
1938629baa8cSmrg  case $host_os in
1939629baa8cSmrg    rhapsody* | darwin*)
1940629baa8cSmrg    AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
1941629baa8cSmrg    AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
1942629baa8cSmrg    AC_CHECK_TOOL([LIPO], [lipo], [:])
1943629baa8cSmrg    AC_CHECK_TOOL([OTOOL], [otool], [:])
1944629baa8cSmrg    AC_CHECK_TOOL([OTOOL64], [otool64], [:])
1945629baa8cSmrg    _LT_DECL([], [DSYMUTIL], [1],
1946629baa8cSmrg      [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
1947629baa8cSmrg    _LT_DECL([], [NMEDIT], [1],
1948629baa8cSmrg      [Tool to change global to local symbols on Mac OS X])
1949629baa8cSmrg    _LT_DECL([], [LIPO], [1],
1950629baa8cSmrg      [Tool to manipulate fat objects and archives on Mac OS X])
1951629baa8cSmrg    _LT_DECL([], [OTOOL], [1],
1952629baa8cSmrg      [ldd/readelf like tool for Mach-O binaries on Mac OS X])
1953629baa8cSmrg    _LT_DECL([], [OTOOL64], [1],
1954629baa8cSmrg      [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
1955629baa8cSmrg
1956629baa8cSmrg    AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
1957629baa8cSmrg      [lt_cv_apple_cc_single_mod=no
1958629baa8cSmrg      if test -z "${LT_MULTI_MODULE}"; then
1959629baa8cSmrg	# By default we will add the -single_module flag. You can override
1960629baa8cSmrg	# by either setting the environment variable LT_MULTI_MODULE
1961629baa8cSmrg	# non-empty at configure time, or by adding -multi_module to the
1962629baa8cSmrg	# link flags.
1963629baa8cSmrg	rm -rf libconftest.dylib*
1964629baa8cSmrg	echo "int foo(void){return 1;}" > conftest.c
1965629baa8cSmrg	echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
1966629baa8cSmrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
1967629baa8cSmrg	$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
1968629baa8cSmrg	  -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
1969629baa8cSmrg        _lt_result=$?
1970629baa8cSmrg	if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
1971629baa8cSmrg	  lt_cv_apple_cc_single_mod=yes
1972629baa8cSmrg	else
1973629baa8cSmrg	  cat conftest.err >&AS_MESSAGE_LOG_FD
1974629baa8cSmrg	fi
1975629baa8cSmrg	rm -rf libconftest.dylib*
1976629baa8cSmrg	rm -f conftest.*
1977629baa8cSmrg      fi])
1978629baa8cSmrg    AC_CACHE_CHECK([for -exported_symbols_list linker flag],
1979629baa8cSmrg      [lt_cv_ld_exported_symbols_list],
1980629baa8cSmrg      [lt_cv_ld_exported_symbols_list=no
1981629baa8cSmrg      save_LDFLAGS=$LDFLAGS
1982629baa8cSmrg      echo "_main" > conftest.sym
1983629baa8cSmrg      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
1984629baa8cSmrg      AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
1985629baa8cSmrg	[lt_cv_ld_exported_symbols_list=yes],
1986629baa8cSmrg	[lt_cv_ld_exported_symbols_list=no])
1987629baa8cSmrg	LDFLAGS="$save_LDFLAGS"
1988629baa8cSmrg    ])
1989629baa8cSmrg    AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
1990629baa8cSmrg      [lt_cv_ld_force_load=no
1991629baa8cSmrg      cat > conftest.c << _LT_EOF
1992629baa8cSmrgint forced_loaded() { return 2;}
1993629baa8cSmrg_LT_EOF
1994629baa8cSmrg      echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
1995629baa8cSmrg      $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
1996629baa8cSmrg      echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
1997629baa8cSmrg      $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
1998629baa8cSmrg      echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
1999629baa8cSmrg      $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
2000629baa8cSmrg      cat > conftest.c << _LT_EOF
2001629baa8cSmrgint main() { return 0;}
2002629baa8cSmrg_LT_EOF
2003629baa8cSmrg      echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
2004629baa8cSmrg      $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
2005629baa8cSmrg      _lt_result=$?
2006629baa8cSmrg      if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then
2007629baa8cSmrg	lt_cv_ld_force_load=yes
2008629baa8cSmrg      else
2009629baa8cSmrg	cat conftest.err >&AS_MESSAGE_LOG_FD
2010629baa8cSmrg      fi
2011629baa8cSmrg        rm -f conftest.err libconftest.a conftest conftest.c
2012629baa8cSmrg        rm -rf conftest.dSYM
2013629baa8cSmrg    ])
2014629baa8cSmrg    case $host_os in
2015629baa8cSmrg    rhapsody* | darwin1.[[012]])
2016629baa8cSmrg      _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
2017629baa8cSmrg    darwin1.*)
2018629baa8cSmrg      _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
2019629baa8cSmrg    darwin*) # darwin 5.x on
2020629baa8cSmrg      # if running on 10.5 or later, the deployment target defaults
2021629baa8cSmrg      # to the OS version, if on x86, and 10.4, the deployment
2022629baa8cSmrg      # target defaults to 10.4. Don't you love it?
2023629baa8cSmrg      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
2024629baa8cSmrg	10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
2025629baa8cSmrg	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
2026629baa8cSmrg	10.[[012]]*)
2027629baa8cSmrg	  _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
2028629baa8cSmrg	10.*)
2029629baa8cSmrg	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
2030629baa8cSmrg      esac
2031629baa8cSmrg    ;;
2032629baa8cSmrg  esac
2033629baa8cSmrg    if test "$lt_cv_apple_cc_single_mod" = "yes"; then
2034629baa8cSmrg      _lt_dar_single_mod='$single_module'
2035629baa8cSmrg    fi
2036629baa8cSmrg    if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
2037629baa8cSmrg      _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
2038629baa8cSmrg    else
2039629baa8cSmrg      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
2040629baa8cSmrg    fi
2041629baa8cSmrg    if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
2042629baa8cSmrg      _lt_dsymutil='~$DSYMUTIL $lib || :'
2043629baa8cSmrg    else
2044629baa8cSmrg      _lt_dsymutil=
2045629baa8cSmrg    fi
2046629baa8cSmrg    ;;
2047629baa8cSmrg  esac
2048629baa8cSmrg])
2049629baa8cSmrg
2050629baa8cSmrg
2051629baa8cSmrg# _LT_DARWIN_LINKER_FEATURES
2052629baa8cSmrg# --------------------------
2053629baa8cSmrg# Checks for linker and compiler features on darwin
2054629baa8cSmrgm4_defun([_LT_DARWIN_LINKER_FEATURES],
2055629baa8cSmrg[
2056629baa8cSmrg  m4_require([_LT_REQUIRED_DARWIN_CHECKS])
2057629baa8cSmrg  _LT_TAGVAR(archive_cmds_need_lc, $1)=no
2058629baa8cSmrg  _LT_TAGVAR(hardcode_direct, $1)=no
2059629baa8cSmrg  _LT_TAGVAR(hardcode_automatic, $1)=yes
2060629baa8cSmrg  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
2061629baa8cSmrg  if test "$lt_cv_ld_force_load" = "yes"; then
2062629baa8cSmrg    _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
2063629baa8cSmrg  else
2064629baa8cSmrg    _LT_TAGVAR(whole_archive_flag_spec, $1)=''
2065629baa8cSmrg  fi
2066629baa8cSmrg  _LT_TAGVAR(link_all_deplibs, $1)=yes
2067629baa8cSmrg  _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
2068629baa8cSmrg  case $cc_basename in
2069629baa8cSmrg     ifort*) _lt_dar_can_shared=yes ;;
2070629baa8cSmrg     *) _lt_dar_can_shared=$GCC ;;
2071629baa8cSmrg  esac
2072629baa8cSmrg  if test "$_lt_dar_can_shared" = "yes"; then
2073629baa8cSmrg    output_verbose_link_cmd=func_echo_all
2074629baa8cSmrg    _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
2075629baa8cSmrg    _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
2076629baa8cSmrg    _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
2077629baa8cSmrg    _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
2078629baa8cSmrg    m4_if([$1], [CXX],
2079629baa8cSmrg[   if test "$lt_cv_apple_cc_single_mod" != "yes"; then
2080629baa8cSmrg      _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}"
2081629baa8cSmrg      _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}"
2082629baa8cSmrg    fi
2083629baa8cSmrg],[])
2084629baa8cSmrg  else
2085629baa8cSmrg  _LT_TAGVAR(ld_shlibs, $1)=no
2086629baa8cSmrg  fi
2087629baa8cSmrg])
2088629baa8cSmrg
2089629baa8cSmrg# _LT_SYS_MODULE_PATH_AIX([TAGNAME])
2090629baa8cSmrg# ----------------------------------
2091629baa8cSmrg# Links a minimal program and checks the executable
2092629baa8cSmrg# for the system default hardcoded library path. In most cases,
2093629baa8cSmrg# this is /usr/lib:/lib, but when the MPI compilers are used
2094629baa8cSmrg# the location of the communication and MPI libs are included too.
2095629baa8cSmrg# If we don't find anything, use the default library path according
2096629baa8cSmrg# to the aix ld manual.
2097629baa8cSmrg# Store the results from the different compilers for each TAGNAME.
2098629baa8cSmrg# Allow to override them for all tags through lt_cv_aix_libpath.
2099629baa8cSmrgm4_defun([_LT_SYS_MODULE_PATH_AIX],
2100629baa8cSmrg[m4_require([_LT_DECL_SED])dnl
2101629baa8cSmrgif test "${lt_cv_aix_libpath+set}" = set; then
2102629baa8cSmrg  aix_libpath=$lt_cv_aix_libpath
2103629baa8cSmrgelse
2104629baa8cSmrg  AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
2105629baa8cSmrg  [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
2106629baa8cSmrg  lt_aix_libpath_sed='[
2107629baa8cSmrg      /Import File Strings/,/^$/ {
2108629baa8cSmrg	  /^0/ {
2109629baa8cSmrg	      s/^0  *\([^ ]*\) *$/\1/
2110629baa8cSmrg	      p
2111629baa8cSmrg	  }
2112629baa8cSmrg      }]'
2113629baa8cSmrg  _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
2114629baa8cSmrg  # Check for a 64-bit object if we didn't find anything.
2115629baa8cSmrg  if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
2116629baa8cSmrg    _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
2117629baa8cSmrg  fi],[])
2118629baa8cSmrg  if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
2119629baa8cSmrg    _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib"
2120629baa8cSmrg  fi
2121629baa8cSmrg  ])
2122629baa8cSmrg  aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
2123629baa8cSmrgfi
2124629baa8cSmrg])# _LT_SYS_MODULE_PATH_AIX
2125629baa8cSmrg
2126629baa8cSmrg
2127629baa8cSmrg# _LT_SHELL_INIT(ARG)
2128629baa8cSmrg# -------------------
2129629baa8cSmrgm4_define([_LT_SHELL_INIT],
2130629baa8cSmrg[m4_divert_text([M4SH-INIT], [$1
2131629baa8cSmrg])])# _LT_SHELL_INIT
2132629baa8cSmrg
2133629baa8cSmrg
2134629baa8cSmrg
2135629baa8cSmrg# _LT_PROG_ECHO_BACKSLASH
2136629baa8cSmrg# -----------------------
2137629baa8cSmrg# Find how we can fake an echo command that does not interpret backslash.
2138629baa8cSmrg# In particular, with Autoconf 2.60 or later we add some code to the start
2139629baa8cSmrg# of the generated configure script which will find a shell with a builtin
2140629baa8cSmrg# printf (which we can use as an echo command).
2141629baa8cSmrgm4_defun([_LT_PROG_ECHO_BACKSLASH],
2142629baa8cSmrg[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
2143629baa8cSmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
2144629baa8cSmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
2145629baa8cSmrg
2146629baa8cSmrgAC_MSG_CHECKING([how to print strings])
2147629baa8cSmrg# Test print first, because it will be a builtin if present.
2148629baa8cSmrgif test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
2149629baa8cSmrg   test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
2150629baa8cSmrg  ECHO='print -r --'
2151629baa8cSmrgelif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
2152629baa8cSmrg  ECHO='printf %s\n'
2153629baa8cSmrgelse
2154629baa8cSmrg  # Use this function as a fallback that always works.
2155629baa8cSmrg  func_fallback_echo ()
2156629baa8cSmrg  {
2157629baa8cSmrg    eval 'cat <<_LTECHO_EOF
2158629baa8cSmrg$[]1
2159629baa8cSmrg_LTECHO_EOF'
2160629baa8cSmrg  }
2161629baa8cSmrg  ECHO='func_fallback_echo'
2162629baa8cSmrgfi
2163629baa8cSmrg
2164629baa8cSmrg# func_echo_all arg...
2165629baa8cSmrg# Invoke $ECHO with all args, space-separated.
2166629baa8cSmrgfunc_echo_all ()
2167629baa8cSmrg{
2168629baa8cSmrg    $ECHO "$*" 
2169629baa8cSmrg}
2170629baa8cSmrg
2171629baa8cSmrgcase "$ECHO" in
2172629baa8cSmrg  printf*) AC_MSG_RESULT([printf]) ;;
2173629baa8cSmrg  print*) AC_MSG_RESULT([print -r]) ;;
2174629baa8cSmrg  *) AC_MSG_RESULT([cat]) ;;
2175629baa8cSmrgesac
2176629baa8cSmrg
2177629baa8cSmrgm4_ifdef([_AS_DETECT_SUGGESTED],
2178629baa8cSmrg[_AS_DETECT_SUGGESTED([
2179629baa8cSmrg  test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
2180629baa8cSmrg    ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
2181629baa8cSmrg    ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
2182629baa8cSmrg    ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
2183629baa8cSmrg    PATH=/empty FPATH=/empty; export PATH FPATH
2184629baa8cSmrg    test "X`printf %s $ECHO`" = "X$ECHO" \
2185629baa8cSmrg      || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
2186629baa8cSmrg
2187629baa8cSmrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
2188629baa8cSmrg_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
2189629baa8cSmrg])# _LT_PROG_ECHO_BACKSLASH
2190629baa8cSmrg
2191629baa8cSmrg
2192629baa8cSmrg# _LT_WITH_SYSROOT
2193629baa8cSmrg# ----------------
2194629baa8cSmrgAC_DEFUN([_LT_WITH_SYSROOT],
2195629baa8cSmrg[AC_MSG_CHECKING([for sysroot])
2196629baa8cSmrgAC_ARG_WITH([sysroot],
2197629baa8cSmrg[  --with-sysroot[=DIR] Search for dependent libraries within DIR
2198629baa8cSmrg                        (or the compiler's sysroot if not specified).],
2199629baa8cSmrg[], [with_sysroot=no])
2200629baa8cSmrg
2201629baa8cSmrgdnl lt_sysroot will always be passed unquoted.  We quote it here
2202629baa8cSmrgdnl in case the user passed a directory name.
2203629baa8cSmrglt_sysroot=
2204629baa8cSmrgcase ${with_sysroot} in #(
2205629baa8cSmrg yes)
2206629baa8cSmrg   if test "$GCC" = yes; then
2207629baa8cSmrg     lt_sysroot=`$CC --print-sysroot 2>/dev/null`
2208629baa8cSmrg   fi
2209629baa8cSmrg   ;; #(
2210629baa8cSmrg /*)
2211629baa8cSmrg   lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
2212629baa8cSmrg   ;; #(
2213629baa8cSmrg no|'')
2214629baa8cSmrg   ;; #(
2215629baa8cSmrg *)
2216629baa8cSmrg   AC_MSG_RESULT([${with_sysroot}])
2217629baa8cSmrg   AC_MSG_ERROR([The sysroot must be an absolute path.])
2218629baa8cSmrg   ;;
2219629baa8cSmrgesac
2220629baa8cSmrg
2221629baa8cSmrg AC_MSG_RESULT([${lt_sysroot:-no}])
2222629baa8cSmrg_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
2223629baa8cSmrg[dependent libraries, and in which our libraries should be installed.])])
2224629baa8cSmrg
2225629baa8cSmrg# _LT_ENABLE_LOCK
2226629baa8cSmrg# ---------------
2227629baa8cSmrgm4_defun([_LT_ENABLE_LOCK],
2228629baa8cSmrg[AC_ARG_ENABLE([libtool-lock],
2229629baa8cSmrg  [AS_HELP_STRING([--disable-libtool-lock],
2230629baa8cSmrg    [avoid locking (might break parallel builds)])])
2231629baa8cSmrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
2232629baa8cSmrg
2233629baa8cSmrg# Some flags need to be propagated to the compiler or linker for good
2234629baa8cSmrg# libtool support.
2235629baa8cSmrgcase $host in
2236629baa8cSmrgia64-*-hpux*)
2237629baa8cSmrg  # Find out which ABI we are using.
2238629baa8cSmrg  echo 'int i;' > conftest.$ac_ext
2239629baa8cSmrg  if AC_TRY_EVAL(ac_compile); then
2240629baa8cSmrg    case `/usr/bin/file conftest.$ac_objext` in
2241629baa8cSmrg      *ELF-32*)
2242629baa8cSmrg	HPUX_IA64_MODE="32"
2243629baa8cSmrg	;;
2244629baa8cSmrg      *ELF-64*)
2245629baa8cSmrg	HPUX_IA64_MODE="64"
2246629baa8cSmrg	;;
2247629baa8cSmrg    esac
2248629baa8cSmrg  fi
2249629baa8cSmrg  rm -rf conftest*
2250629baa8cSmrg  ;;
2251629baa8cSmrg*-*-irix6*)
2252629baa8cSmrg  # Find out which ABI we are using.
2253629baa8cSmrg  echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
2254629baa8cSmrg  if AC_TRY_EVAL(ac_compile); then
2255629baa8cSmrg    if test "$lt_cv_prog_gnu_ld" = yes; then
2256629baa8cSmrg      case `/usr/bin/file conftest.$ac_objext` in
2257629baa8cSmrg	*32-bit*)
2258629baa8cSmrg	  LD="${LD-ld} -melf32bsmip"
2259629baa8cSmrg	  ;;
2260629baa8cSmrg	*N32*)
2261629baa8cSmrg	  LD="${LD-ld} -melf32bmipn32"
2262629baa8cSmrg	  ;;
2263629baa8cSmrg	*64-bit*)
2264629baa8cSmrg	  LD="${LD-ld} -melf64bmip"
2265629baa8cSmrg	;;
2266629baa8cSmrg      esac
2267629baa8cSmrg    else
2268629baa8cSmrg      case `/usr/bin/file conftest.$ac_objext` in
2269629baa8cSmrg	*32-bit*)
2270629baa8cSmrg	  LD="${LD-ld} -32"
2271629baa8cSmrg	  ;;
2272629baa8cSmrg	*N32*)
2273629baa8cSmrg	  LD="${LD-ld} -n32"
2274629baa8cSmrg	  ;;
2275629baa8cSmrg	*64-bit*)
2276629baa8cSmrg	  LD="${LD-ld} -64"
2277629baa8cSmrg	  ;;
2278629baa8cSmrg      esac
2279629baa8cSmrg    fi
2280629baa8cSmrg  fi
2281629baa8cSmrg  rm -rf conftest*
2282629baa8cSmrg  ;;
2283629baa8cSmrg
2284629baa8cSmrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
2285629baa8cSmrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*)
2286629baa8cSmrg  # Find out which ABI we are using.
2287629baa8cSmrg  echo 'int i;' > conftest.$ac_ext
2288629baa8cSmrg  if AC_TRY_EVAL(ac_compile); then
2289629baa8cSmrg    case `/usr/bin/file conftest.o` in
2290629baa8cSmrg      *32-bit*)
2291629baa8cSmrg	case $host in
2292629baa8cSmrg	  x86_64-*kfreebsd*-gnu)
2293629baa8cSmrg	    LD="${LD-ld} -m elf_i386_fbsd"
2294629baa8cSmrg	    ;;
2295629baa8cSmrg	  x86_64-*linux*)
2296629baa8cSmrg	    LD="${LD-ld} -m elf_i386"
2297629baa8cSmrg	    ;;
2298629baa8cSmrg	  ppc64-*linux*|powerpc64-*linux*)
2299629baa8cSmrg	    LD="${LD-ld} -m elf32ppclinux"
2300629baa8cSmrg	    ;;
2301629baa8cSmrg	  s390x-*linux*)
2302629baa8cSmrg	    LD="${LD-ld} -m elf_s390"
2303629baa8cSmrg	    ;;
2304629baa8cSmrg	  sparc64-*linux*)
2305629baa8cSmrg	    LD="${LD-ld} -m elf32_sparc"
2306629baa8cSmrg	    ;;
2307629baa8cSmrg	esac
2308629baa8cSmrg	;;
2309629baa8cSmrg      *64-bit*)
2310629baa8cSmrg	case $host in
2311629baa8cSmrg	  x86_64-*kfreebsd*-gnu)
2312629baa8cSmrg	    LD="${LD-ld} -m elf_x86_64_fbsd"
2313629baa8cSmrg	    ;;
2314629baa8cSmrg	  x86_64-*linux*)
2315629baa8cSmrg	    LD="${LD-ld} -m elf_x86_64"
2316629baa8cSmrg	    ;;
2317629baa8cSmrg	  ppc*-*linux*|powerpc*-*linux*)
2318629baa8cSmrg	    LD="${LD-ld} -m elf64ppc"
2319629baa8cSmrg	    ;;
2320629baa8cSmrg	  s390*-*linux*|s390*-*tpf*)
2321629baa8cSmrg	    LD="${LD-ld} -m elf64_s390"
2322629baa8cSmrg	    ;;
2323629baa8cSmrg	  sparc*-*linux*)
2324629baa8cSmrg	    LD="${LD-ld} -m elf64_sparc"
2325629baa8cSmrg	    ;;
2326629baa8cSmrg	esac
2327629baa8cSmrg	;;
2328629baa8cSmrg    esac
2329629baa8cSmrg  fi
2330629baa8cSmrg  rm -rf conftest*
2331629baa8cSmrg  ;;
2332629baa8cSmrg
2333629baa8cSmrg*-*-sco3.2v5*)
2334629baa8cSmrg  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
2335629baa8cSmrg  SAVE_CFLAGS="$CFLAGS"
2336629baa8cSmrg  CFLAGS="$CFLAGS -belf"
2337629baa8cSmrg  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
2338629baa8cSmrg    [AC_LANG_PUSH(C)
2339629baa8cSmrg     AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
2340629baa8cSmrg     AC_LANG_POP])
2341629baa8cSmrg  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
2342629baa8cSmrg    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
2343629baa8cSmrg    CFLAGS="$SAVE_CFLAGS"
2344629baa8cSmrg  fi
2345629baa8cSmrg  ;;
2346629baa8cSmrgsparc*-*solaris*)
2347629baa8cSmrg  # Find out which ABI we are using.
2348629baa8cSmrg  echo 'int i;' > conftest.$ac_ext
2349629baa8cSmrg  if AC_TRY_EVAL(ac_compile); then
2350629baa8cSmrg    case `/usr/bin/file conftest.o` in
2351629baa8cSmrg    *64-bit*)
2352629baa8cSmrg      case $lt_cv_prog_gnu_ld in
2353629baa8cSmrg      yes*) LD="${LD-ld} -m elf64_sparc" ;;
2354629baa8cSmrg      *)
2355629baa8cSmrg	if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
2356629baa8cSmrg	  LD="${LD-ld} -64"
2357629baa8cSmrg	fi
2358629baa8cSmrg	;;
2359629baa8cSmrg      esac
2360629baa8cSmrg      ;;
2361629baa8cSmrg    esac
2362629baa8cSmrg  fi
2363629baa8cSmrg  rm -rf conftest*
2364629baa8cSmrg  ;;
2365629baa8cSmrgesac
2366629baa8cSmrg
2367629baa8cSmrgneed_locks="$enable_libtool_lock"
2368629baa8cSmrg])# _LT_ENABLE_LOCK
2369629baa8cSmrg
2370629baa8cSmrg
2371629baa8cSmrg# _LT_PROG_AR
2372629baa8cSmrg# -----------
2373629baa8cSmrgm4_defun([_LT_PROG_AR],
2374629baa8cSmrg[AC_CHECK_TOOLS(AR, [ar], false)
2375629baa8cSmrg: ${AR=ar}
2376629baa8cSmrg: ${AR_FLAGS=cru}
2377629baa8cSmrg_LT_DECL([], [AR], [1], [The archiver])
2378629baa8cSmrg_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
2379629baa8cSmrg
2380629baa8cSmrgAC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
2381629baa8cSmrg  [lt_cv_ar_at_file=no
2382629baa8cSmrg   AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
2383629baa8cSmrg     [echo conftest.$ac_objext > conftest.lst
2384629baa8cSmrg      lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
2385629baa8cSmrg      AC_TRY_EVAL([lt_ar_try])
2386629baa8cSmrg      if test "$ac_status" -eq 0; then
2387629baa8cSmrg	# Ensure the archiver fails upon bogus file names.
2388629baa8cSmrg	rm -f conftest.$ac_objext libconftest.a
2389629baa8cSmrg	AC_TRY_EVAL([lt_ar_try])
2390629baa8cSmrg	if test "$ac_status" -ne 0; then
2391629baa8cSmrg          lt_cv_ar_at_file=@
2392629baa8cSmrg        fi
2393629baa8cSmrg      fi
2394629baa8cSmrg      rm -f conftest.* libconftest.a
2395629baa8cSmrg     ])
2396629baa8cSmrg  ])
2397629baa8cSmrg
2398629baa8cSmrgif test "x$lt_cv_ar_at_file" = xno; then
2399629baa8cSmrg  archiver_list_spec=
2400629baa8cSmrgelse
2401629baa8cSmrg  archiver_list_spec=$lt_cv_ar_at_file
2402629baa8cSmrgfi
2403629baa8cSmrg_LT_DECL([], [archiver_list_spec], [1],
2404629baa8cSmrg  [How to feed a file listing to the archiver])
2405629baa8cSmrg])# _LT_PROG_AR
2406629baa8cSmrg
2407629baa8cSmrg
2408629baa8cSmrg# _LT_CMD_OLD_ARCHIVE
2409629baa8cSmrg# -------------------
2410629baa8cSmrgm4_defun([_LT_CMD_OLD_ARCHIVE],
2411629baa8cSmrg[_LT_PROG_AR
2412629baa8cSmrg
2413629baa8cSmrgAC_CHECK_TOOL(STRIP, strip, :)
2414629baa8cSmrgtest -z "$STRIP" && STRIP=:
2415629baa8cSmrg_LT_DECL([], [STRIP], [1], [A symbol stripping program])
2416629baa8cSmrg
2417629baa8cSmrgAC_CHECK_TOOL(RANLIB, ranlib, :)
2418629baa8cSmrgtest -z "$RANLIB" && RANLIB=:
2419629baa8cSmrg_LT_DECL([], [RANLIB], [1],
2420629baa8cSmrg    [Commands used to install an old-style archive])
2421629baa8cSmrg
2422629baa8cSmrg# Determine commands to create old-style static archives.
2423629baa8cSmrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
2424629baa8cSmrgold_postinstall_cmds='chmod 644 $oldlib'
2425629baa8cSmrgold_postuninstall_cmds=
2426629baa8cSmrg
2427629baa8cSmrgif test -n "$RANLIB"; then
2428629baa8cSmrg  case $host_os in
2429629baa8cSmrg  openbsd*)
2430629baa8cSmrg    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
2431629baa8cSmrg    ;;
2432629baa8cSmrg  *)
2433629baa8cSmrg    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
2434629baa8cSmrg    ;;
2435629baa8cSmrg  esac
2436629baa8cSmrg  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
2437629baa8cSmrgfi
2438629baa8cSmrg
2439629baa8cSmrgcase $host_os in
2440629baa8cSmrg  darwin*)
2441629baa8cSmrg    lock_old_archive_extraction=yes ;;
2442629baa8cSmrg  *)
2443629baa8cSmrg    lock_old_archive_extraction=no ;;
2444629baa8cSmrgesac
2445629baa8cSmrg_LT_DECL([], [old_postinstall_cmds], [2])
2446629baa8cSmrg_LT_DECL([], [old_postuninstall_cmds], [2])
2447629baa8cSmrg_LT_TAGDECL([], [old_archive_cmds], [2],
2448629baa8cSmrg    [Commands used to build an old-style archive])
2449629baa8cSmrg_LT_DECL([], [lock_old_archive_extraction], [0],
2450629baa8cSmrg    [Whether to use a lock for old archive extraction])
2451629baa8cSmrg])# _LT_CMD_OLD_ARCHIVE
2452629baa8cSmrg
2453629baa8cSmrg
2454629baa8cSmrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
2455629baa8cSmrg#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
2456629baa8cSmrg# ----------------------------------------------------------------
2457629baa8cSmrg# Check whether the given compiler option works
2458629baa8cSmrgAC_DEFUN([_LT_COMPILER_OPTION],
2459629baa8cSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2460629baa8cSmrgm4_require([_LT_DECL_SED])dnl
2461629baa8cSmrgAC_CACHE_CHECK([$1], [$2],
2462629baa8cSmrg  [$2=no
2463629baa8cSmrg   m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
2464629baa8cSmrg   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
2465629baa8cSmrg   lt_compiler_flag="$3"
2466629baa8cSmrg   # Insert the option either (1) after the last *FLAGS variable, or
2467629baa8cSmrg   # (2) before a word containing "conftest.", or (3) at the end.
2468629baa8cSmrg   # Note that $ac_compile itself does not contain backslashes and begins
2469629baa8cSmrg   # with a dollar sign (not a hyphen), so the echo should work correctly.
2470629baa8cSmrg   # The option is referenced via a variable to avoid confusing sed.
2471629baa8cSmrg   lt_compile=`echo "$ac_compile" | $SED \
2472629baa8cSmrg   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
2473629baa8cSmrg   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
2474629baa8cSmrg   -e 's:$: $lt_compiler_flag:'`
2475629baa8cSmrg   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
2476629baa8cSmrg   (eval "$lt_compile" 2>conftest.err)
2477629baa8cSmrg   ac_status=$?
2478629baa8cSmrg   cat conftest.err >&AS_MESSAGE_LOG_FD
2479629baa8cSmrg   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
2480629baa8cSmrg   if (exit $ac_status) && test -s "$ac_outfile"; then
2481629baa8cSmrg     # The compiler can only warn and ignore the option if not recognized
2482629baa8cSmrg     # So say no if there are warnings other than the usual output.
2483629baa8cSmrg     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
2484629baa8cSmrg     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
2485629baa8cSmrg     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
2486629baa8cSmrg       $2=yes
2487629baa8cSmrg     fi
2488629baa8cSmrg   fi
2489629baa8cSmrg   $RM conftest*
2490629baa8cSmrg])
2491629baa8cSmrg
2492629baa8cSmrgif test x"[$]$2" = xyes; then
2493629baa8cSmrg    m4_if([$5], , :, [$5])
2494629baa8cSmrgelse
2495629baa8cSmrg    m4_if([$6], , :, [$6])
2496629baa8cSmrgfi
2497629baa8cSmrg])# _LT_COMPILER_OPTION
2498629baa8cSmrg
2499629baa8cSmrg# Old name:
2500629baa8cSmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
2501629baa8cSmrgdnl aclocal-1.4 backwards compatibility:
2502629baa8cSmrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
2503629baa8cSmrg
2504629baa8cSmrg
2505629baa8cSmrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
2506629baa8cSmrg#                  [ACTION-SUCCESS], [ACTION-FAILURE])
2507629baa8cSmrg# ----------------------------------------------------
2508629baa8cSmrg# Check whether the given linker option works
2509629baa8cSmrgAC_DEFUN([_LT_LINKER_OPTION],
2510629baa8cSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2511629baa8cSmrgm4_require([_LT_DECL_SED])dnl
2512629baa8cSmrgAC_CACHE_CHECK([$1], [$2],
2513629baa8cSmrg  [$2=no
2514629baa8cSmrg   save_LDFLAGS="$LDFLAGS"
2515629baa8cSmrg   LDFLAGS="$LDFLAGS $3"
2516629baa8cSmrg   echo "$lt_simple_link_test_code" > conftest.$ac_ext
2517629baa8cSmrg   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
2518629baa8cSmrg     # The linker can only warn and ignore the option if not recognized
2519629baa8cSmrg     # So say no if there are warnings
2520629baa8cSmrg     if test -s conftest.err; then
2521629baa8cSmrg       # Append any errors to the config.log.
2522629baa8cSmrg       cat conftest.err 1>&AS_MESSAGE_LOG_FD
2523629baa8cSmrg       $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
2524629baa8cSmrg       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
2525629baa8cSmrg       if diff conftest.exp conftest.er2 >/dev/null; then
2526629baa8cSmrg         $2=yes
2527629baa8cSmrg       fi
2528629baa8cSmrg     else
2529629baa8cSmrg       $2=yes
2530629baa8cSmrg     fi
2531629baa8cSmrg   fi
2532629baa8cSmrg   $RM -r conftest*
2533629baa8cSmrg   LDFLAGS="$save_LDFLAGS"
2534629baa8cSmrg])
2535629baa8cSmrg
2536629baa8cSmrgif test x"[$]$2" = xyes; then
2537629baa8cSmrg    m4_if([$4], , :, [$4])
2538629baa8cSmrgelse
2539629baa8cSmrg    m4_if([$5], , :, [$5])
2540629baa8cSmrgfi
2541629baa8cSmrg])# _LT_LINKER_OPTION
2542629baa8cSmrg
2543629baa8cSmrg# Old name:
2544629baa8cSmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
2545629baa8cSmrgdnl aclocal-1.4 backwards compatibility:
2546629baa8cSmrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
2547629baa8cSmrg
2548629baa8cSmrg
2549629baa8cSmrg# LT_CMD_MAX_LEN
2550629baa8cSmrg#---------------
2551629baa8cSmrgAC_DEFUN([LT_CMD_MAX_LEN],
2552629baa8cSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
2553629baa8cSmrg# find the maximum length of command line arguments
2554629baa8cSmrgAC_MSG_CHECKING([the maximum length of command line arguments])
2555629baa8cSmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
2556629baa8cSmrg  i=0
2557629baa8cSmrg  teststring="ABCD"
2558629baa8cSmrg
2559629baa8cSmrg  case $build_os in
2560629baa8cSmrg  msdosdjgpp*)
2561629baa8cSmrg    # On DJGPP, this test can blow up pretty badly due to problems in libc
2562629baa8cSmrg    # (any single argument exceeding 2000 bytes causes a buffer overrun
2563629baa8cSmrg    # during glob expansion).  Even if it were fixed, the result of this
2564629baa8cSmrg    # check would be larger than it should be.
2565629baa8cSmrg    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
2566629baa8cSmrg    ;;
2567629baa8cSmrg
2568629baa8cSmrg  gnu*)
2569629baa8cSmrg    # Under GNU Hurd, this test is not required because there is
2570629baa8cSmrg    # no limit to the length of command line arguments.
2571629baa8cSmrg    # Libtool will interpret -1 as no limit whatsoever
2572629baa8cSmrg    lt_cv_sys_max_cmd_len=-1;
2573629baa8cSmrg    ;;
2574629baa8cSmrg
2575629baa8cSmrg  cygwin* | mingw* | cegcc*)
2576629baa8cSmrg    # On Win9x/ME, this test blows up -- it succeeds, but takes
2577629baa8cSmrg    # about 5 minutes as the teststring grows exponentially.
2578629baa8cSmrg    # Worse, since 9x/ME are not pre-emptively multitasking,
2579629baa8cSmrg    # you end up with a "frozen" computer, even though with patience
2580629baa8cSmrg    # the test eventually succeeds (with a max line length of 256k).
2581629baa8cSmrg    # Instead, let's just punt: use the minimum linelength reported by
2582629baa8cSmrg    # all of the supported platforms: 8192 (on NT/2K/XP).
2583629baa8cSmrg    lt_cv_sys_max_cmd_len=8192;
2584629baa8cSmrg    ;;
2585629baa8cSmrg
2586629baa8cSmrg  mint*)
2587629baa8cSmrg    # On MiNT this can take a long time and run out of memory.
2588629baa8cSmrg    lt_cv_sys_max_cmd_len=8192;
2589629baa8cSmrg    ;;
2590629baa8cSmrg
2591629baa8cSmrg  amigaos*)
2592629baa8cSmrg    # On AmigaOS with pdksh, this test takes hours, literally.
2593629baa8cSmrg    # So we just punt and use a minimum line length of 8192.
2594629baa8cSmrg    lt_cv_sys_max_cmd_len=8192;
2595629baa8cSmrg    ;;
2596629baa8cSmrg
2597629baa8cSmrg  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
2598629baa8cSmrg    # This has been around since 386BSD, at least.  Likely further.
2599629baa8cSmrg    if test -x /sbin/sysctl; then
2600629baa8cSmrg      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
2601629baa8cSmrg    elif test -x /usr/sbin/sysctl; then
2602629baa8cSmrg      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
2603629baa8cSmrg    else
2604629baa8cSmrg      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
2605629baa8cSmrg    fi
2606629baa8cSmrg    # And add a safety zone
2607629baa8cSmrg    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
2608629baa8cSmrg    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
2609629baa8cSmrg    ;;
2610629baa8cSmrg
2611629baa8cSmrg  interix*)
2612629baa8cSmrg    # We know the value 262144 and hardcode it with a safety zone (like BSD)
2613629baa8cSmrg    lt_cv_sys_max_cmd_len=196608
2614629baa8cSmrg    ;;
2615629baa8cSmrg
2616629baa8cSmrg  osf*)
2617629baa8cSmrg    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
2618629baa8cSmrg    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
2619629baa8cSmrg    # nice to cause kernel panics so lets avoid the loop below.
2620629baa8cSmrg    # First set a reasonable default.
2621629baa8cSmrg    lt_cv_sys_max_cmd_len=16384
2622629baa8cSmrg    #
2623629baa8cSmrg    if test -x /sbin/sysconfig; then
2624629baa8cSmrg      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
2625629baa8cSmrg        *1*) lt_cv_sys_max_cmd_len=-1 ;;
2626629baa8cSmrg      esac
2627629baa8cSmrg    fi
2628629baa8cSmrg    ;;
2629629baa8cSmrg  sco3.2v5*)
2630629baa8cSmrg    lt_cv_sys_max_cmd_len=102400
2631629baa8cSmrg    ;;
2632629baa8cSmrg  sysv5* | sco5v6* | sysv4.2uw2*)
2633629baa8cSmrg    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
2634629baa8cSmrg    if test -n "$kargmax"; then
2635629baa8cSmrg      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[	 ]]//'`
2636629baa8cSmrg    else
2637629baa8cSmrg      lt_cv_sys_max_cmd_len=32768
2638629baa8cSmrg    fi
2639629baa8cSmrg    ;;
2640629baa8cSmrg  *)
2641629baa8cSmrg    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
2642629baa8cSmrg    if test -n "$lt_cv_sys_max_cmd_len"; then
2643629baa8cSmrg      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
2644629baa8cSmrg      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
2645629baa8cSmrg    else
2646629baa8cSmrg      # Make teststring a little bigger before we do anything with it.
2647629baa8cSmrg      # a 1K string should be a reasonable start.
2648629baa8cSmrg      for i in 1 2 3 4 5 6 7 8 ; do
2649629baa8cSmrg        teststring=$teststring$teststring
2650629baa8cSmrg      done
2651629baa8cSmrg      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
2652629baa8cSmrg      # If test is not a shell built-in, we'll probably end up computing a
2653629baa8cSmrg      # maximum length that is only half of the actual maximum length, but
2654629baa8cSmrg      # we can't tell.
2655629baa8cSmrg      while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \
2656629baa8cSmrg	         = "X$teststring$teststring"; } >/dev/null 2>&1 &&
2657629baa8cSmrg	      test $i != 17 # 1/2 MB should be enough
2658629baa8cSmrg      do
2659629baa8cSmrg        i=`expr $i + 1`
2660629baa8cSmrg        teststring=$teststring$teststring
2661629baa8cSmrg      done
2662629baa8cSmrg      # Only check the string length outside the loop.
2663629baa8cSmrg      lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
2664629baa8cSmrg      teststring=
2665629baa8cSmrg      # Add a significant safety factor because C++ compilers can tack on
2666629baa8cSmrg      # massive amounts of additional arguments before passing them to the
2667629baa8cSmrg      # linker.  It appears as though 1/2 is a usable value.
2668629baa8cSmrg      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
2669629baa8cSmrg    fi
2670629baa8cSmrg    ;;
2671629baa8cSmrg  esac
2672629baa8cSmrg])
2673629baa8cSmrgif test -n $lt_cv_sys_max_cmd_len ; then
2674629baa8cSmrg  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
2675629baa8cSmrgelse
2676629baa8cSmrg  AC_MSG_RESULT(none)
2677629baa8cSmrgfi
2678629baa8cSmrgmax_cmd_len=$lt_cv_sys_max_cmd_len
2679629baa8cSmrg_LT_DECL([], [max_cmd_len], [0],
2680629baa8cSmrg    [What is the maximum length of a command?])
2681629baa8cSmrg])# LT_CMD_MAX_LEN
2682629baa8cSmrg
2683629baa8cSmrg# Old name:
2684629baa8cSmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
2685629baa8cSmrgdnl aclocal-1.4 backwards compatibility:
2686629baa8cSmrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
2687629baa8cSmrg
2688629baa8cSmrg
2689629baa8cSmrg# _LT_HEADER_DLFCN
2690629baa8cSmrg# ----------------
2691629baa8cSmrgm4_defun([_LT_HEADER_DLFCN],
2692629baa8cSmrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
2693629baa8cSmrg])# _LT_HEADER_DLFCN
2694629baa8cSmrg
2695629baa8cSmrg
2696629baa8cSmrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
2697629baa8cSmrg#                      ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
2698629baa8cSmrg# ----------------------------------------------------------------
2699629baa8cSmrgm4_defun([_LT_TRY_DLOPEN_SELF],
2700629baa8cSmrg[m4_require([_LT_HEADER_DLFCN])dnl
2701629baa8cSmrgif test "$cross_compiling" = yes; then :
2702629baa8cSmrg  [$4]
2703629baa8cSmrgelse
2704629baa8cSmrg  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
2705629baa8cSmrg  lt_status=$lt_dlunknown
2706629baa8cSmrg  cat > conftest.$ac_ext <<_LT_EOF
2707629baa8cSmrg[#line $LINENO "configure"
2708629baa8cSmrg#include "confdefs.h"
2709629baa8cSmrg
2710629baa8cSmrg#if HAVE_DLFCN_H
2711629baa8cSmrg#include <dlfcn.h>
2712629baa8cSmrg#endif
2713629baa8cSmrg
2714629baa8cSmrg#include <stdio.h>
2715629baa8cSmrg
2716629baa8cSmrg#ifdef RTLD_GLOBAL
2717629baa8cSmrg#  define LT_DLGLOBAL		RTLD_GLOBAL
2718629baa8cSmrg#else
2719629baa8cSmrg#  ifdef DL_GLOBAL
2720629baa8cSmrg#    define LT_DLGLOBAL		DL_GLOBAL
2721629baa8cSmrg#  else
2722629baa8cSmrg#    define LT_DLGLOBAL		0
2723629baa8cSmrg#  endif
2724629baa8cSmrg#endif
2725629baa8cSmrg
2726629baa8cSmrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
2727629baa8cSmrg   find out it does not work in some platform. */
2728629baa8cSmrg#ifndef LT_DLLAZY_OR_NOW
2729629baa8cSmrg#  ifdef RTLD_LAZY
2730629baa8cSmrg#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
2731629baa8cSmrg#  else
2732629baa8cSmrg#    ifdef DL_LAZY
2733629baa8cSmrg#      define LT_DLLAZY_OR_NOW		DL_LAZY
2734629baa8cSmrg#    else
2735629baa8cSmrg#      ifdef RTLD_NOW
2736629baa8cSmrg#        define LT_DLLAZY_OR_NOW	RTLD_NOW
2737629baa8cSmrg#      else
2738629baa8cSmrg#        ifdef DL_NOW
2739629baa8cSmrg#          define LT_DLLAZY_OR_NOW	DL_NOW
2740629baa8cSmrg#        else
2741629baa8cSmrg#          define LT_DLLAZY_OR_NOW	0
2742629baa8cSmrg#        endif
2743629baa8cSmrg#      endif
2744629baa8cSmrg#    endif
2745629baa8cSmrg#  endif
2746629baa8cSmrg#endif
2747629baa8cSmrg
2748629baa8cSmrg/* When -fvisbility=hidden is used, assume the code has been annotated
2749629baa8cSmrg   correspondingly for the symbols needed.  */
2750629baa8cSmrg#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
2751629baa8cSmrgint fnord () __attribute__((visibility("default")));
2752629baa8cSmrg#endif
2753629baa8cSmrg
2754629baa8cSmrgint fnord () { return 42; }
2755629baa8cSmrgint main ()
2756629baa8cSmrg{
2757629baa8cSmrg  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
2758629baa8cSmrg  int status = $lt_dlunknown;
2759629baa8cSmrg
2760629baa8cSmrg  if (self)
2761629baa8cSmrg    {
2762629baa8cSmrg      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
2763629baa8cSmrg      else
2764629baa8cSmrg        {
2765629baa8cSmrg	  if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
2766629baa8cSmrg          else puts (dlerror ());
2767629baa8cSmrg	}
2768629baa8cSmrg      /* dlclose (self); */
2769629baa8cSmrg    }
2770629baa8cSmrg  else
2771629baa8cSmrg    puts (dlerror ());
2772629baa8cSmrg
2773629baa8cSmrg  return status;
2774629baa8cSmrg}]
2775629baa8cSmrg_LT_EOF
2776629baa8cSmrg  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
2777629baa8cSmrg    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
2778629baa8cSmrg    lt_status=$?
2779629baa8cSmrg    case x$lt_status in
2780629baa8cSmrg      x$lt_dlno_uscore) $1 ;;
2781629baa8cSmrg      x$lt_dlneed_uscore) $2 ;;
2782629baa8cSmrg      x$lt_dlunknown|x*) $3 ;;
2783629baa8cSmrg    esac
2784629baa8cSmrg  else :
2785629baa8cSmrg    # compilation failed
2786629baa8cSmrg    $3
2787629baa8cSmrg  fi
2788629baa8cSmrgfi
2789629baa8cSmrgrm -fr conftest*
2790629baa8cSmrg])# _LT_TRY_DLOPEN_SELF
2791629baa8cSmrg
2792629baa8cSmrg
2793629baa8cSmrg# LT_SYS_DLOPEN_SELF
2794629baa8cSmrg# ------------------
2795629baa8cSmrgAC_DEFUN([LT_SYS_DLOPEN_SELF],
2796629baa8cSmrg[m4_require([_LT_HEADER_DLFCN])dnl
2797629baa8cSmrgif test "x$enable_dlopen" != xyes; then
2798629baa8cSmrg  enable_dlopen=unknown
2799629baa8cSmrg  enable_dlopen_self=unknown
2800629baa8cSmrg  enable_dlopen_self_static=unknown
2801629baa8cSmrgelse
2802629baa8cSmrg  lt_cv_dlopen=no
2803629baa8cSmrg  lt_cv_dlopen_libs=
2804629baa8cSmrg
2805629baa8cSmrg  case $host_os in
2806629baa8cSmrg  beos*)
2807629baa8cSmrg    lt_cv_dlopen="load_add_on"
2808629baa8cSmrg    lt_cv_dlopen_libs=
2809629baa8cSmrg    lt_cv_dlopen_self=yes
2810629baa8cSmrg    ;;
2811629baa8cSmrg
2812629baa8cSmrg  mingw* | pw32* | cegcc*)
2813629baa8cSmrg    lt_cv_dlopen="LoadLibrary"
2814629baa8cSmrg    lt_cv_dlopen_libs=
2815629baa8cSmrg    ;;
2816629baa8cSmrg
2817629baa8cSmrg  cygwin*)
2818629baa8cSmrg    lt_cv_dlopen="dlopen"
2819629baa8cSmrg    lt_cv_dlopen_libs=
2820629baa8cSmrg    ;;
2821629baa8cSmrg
2822629baa8cSmrg  darwin*)
2823629baa8cSmrg  # if libdl is installed we need to link against it
2824629baa8cSmrg    AC_CHECK_LIB([dl], [dlopen],
2825629baa8cSmrg		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
2826629baa8cSmrg    lt_cv_dlopen="dyld"
2827629baa8cSmrg    lt_cv_dlopen_libs=
2828629baa8cSmrg    lt_cv_dlopen_self=yes
2829629baa8cSmrg    ])
2830629baa8cSmrg    ;;
2831629baa8cSmrg
2832629baa8cSmrg  *)
2833629baa8cSmrg    AC_CHECK_FUNC([shl_load],
2834629baa8cSmrg	  [lt_cv_dlopen="shl_load"],
2835629baa8cSmrg      [AC_CHECK_LIB([dld], [shl_load],
2836629baa8cSmrg	    [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
2837629baa8cSmrg	[AC_CHECK_FUNC([dlopen],
2838629baa8cSmrg	      [lt_cv_dlopen="dlopen"],
2839629baa8cSmrg	  [AC_CHECK_LIB([dl], [dlopen],
2840629baa8cSmrg		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
2841629baa8cSmrg	    [AC_CHECK_LIB([svld], [dlopen],
2842629baa8cSmrg		  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
2843629baa8cSmrg	      [AC_CHECK_LIB([dld], [dld_link],
2844629baa8cSmrg		    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
2845629baa8cSmrg	      ])
2846629baa8cSmrg	    ])
2847629baa8cSmrg	  ])
2848629baa8cSmrg	])
2849629baa8cSmrg      ])
2850629baa8cSmrg    ;;
2851629baa8cSmrg  esac
2852629baa8cSmrg
2853629baa8cSmrg  if test "x$lt_cv_dlopen" != xno; then
2854629baa8cSmrg    enable_dlopen=yes
2855629baa8cSmrg  else
2856629baa8cSmrg    enable_dlopen=no
2857629baa8cSmrg  fi
2858629baa8cSmrg
2859629baa8cSmrg  case $lt_cv_dlopen in
2860629baa8cSmrg  dlopen)
2861629baa8cSmrg    save_CPPFLAGS="$CPPFLAGS"
2862629baa8cSmrg    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
2863629baa8cSmrg
2864629baa8cSmrg    save_LDFLAGS="$LDFLAGS"
2865629baa8cSmrg    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
2866629baa8cSmrg
2867629baa8cSmrg    save_LIBS="$LIBS"
2868629baa8cSmrg    LIBS="$lt_cv_dlopen_libs $LIBS"
2869629baa8cSmrg
2870629baa8cSmrg    AC_CACHE_CHECK([whether a program can dlopen itself],
2871629baa8cSmrg	  lt_cv_dlopen_self, [dnl
2872629baa8cSmrg	  _LT_TRY_DLOPEN_SELF(
2873629baa8cSmrg	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
2874629baa8cSmrg	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
2875629baa8cSmrg    ])
2876629baa8cSmrg
2877629baa8cSmrg    if test "x$lt_cv_dlopen_self" = xyes; then
2878629baa8cSmrg      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
2879629baa8cSmrg      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
2880629baa8cSmrg	  lt_cv_dlopen_self_static, [dnl
2881629baa8cSmrg	  _LT_TRY_DLOPEN_SELF(
2882629baa8cSmrg	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
2883629baa8cSmrg	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
2884629baa8cSmrg      ])
2885629baa8cSmrg    fi
2886629baa8cSmrg
2887629baa8cSmrg    CPPFLAGS="$save_CPPFLAGS"
2888629baa8cSmrg    LDFLAGS="$save_LDFLAGS"
2889629baa8cSmrg    LIBS="$save_LIBS"
2890629baa8cSmrg    ;;
2891629baa8cSmrg  esac
2892629baa8cSmrg
2893629baa8cSmrg  case $lt_cv_dlopen_self in
2894629baa8cSmrg  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
2895629baa8cSmrg  *) enable_dlopen_self=unknown ;;
2896629baa8cSmrg  esac
2897629baa8cSmrg
2898629baa8cSmrg  case $lt_cv_dlopen_self_static in
2899629baa8cSmrg  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
2900629baa8cSmrg  *) enable_dlopen_self_static=unknown ;;
2901629baa8cSmrg  esac
2902629baa8cSmrgfi
2903629baa8cSmrg_LT_DECL([dlopen_support], [enable_dlopen], [0],
2904629baa8cSmrg	 [Whether dlopen is supported])
2905629baa8cSmrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
2906629baa8cSmrg	 [Whether dlopen of programs is supported])
2907629baa8cSmrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
2908629baa8cSmrg	 [Whether dlopen of statically linked programs is supported])
2909629baa8cSmrg])# LT_SYS_DLOPEN_SELF
2910629baa8cSmrg
2911629baa8cSmrg# Old name:
2912629baa8cSmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
2913629baa8cSmrgdnl aclocal-1.4 backwards compatibility:
2914629baa8cSmrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
2915629baa8cSmrg
2916629baa8cSmrg
2917629baa8cSmrg# _LT_COMPILER_C_O([TAGNAME])
2918629baa8cSmrg# ---------------------------
2919629baa8cSmrg# Check to see if options -c and -o are simultaneously supported by compiler.
2920629baa8cSmrg# This macro does not hard code the compiler like AC_PROG_CC_C_O.
2921629baa8cSmrgm4_defun([_LT_COMPILER_C_O],
2922629baa8cSmrg[m4_require([_LT_DECL_SED])dnl
2923629baa8cSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
2924629baa8cSmrgm4_require([_LT_TAG_COMPILER])dnl
2925629baa8cSmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
2926629baa8cSmrg  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
2927629baa8cSmrg  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
2928629baa8cSmrg   $RM -r conftest 2>/dev/null
2929629baa8cSmrg   mkdir conftest
2930629baa8cSmrg   cd conftest
2931629baa8cSmrg   mkdir out
2932629baa8cSmrg   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
2933629baa8cSmrg
2934629baa8cSmrg   lt_compiler_flag="-o out/conftest2.$ac_objext"
2935629baa8cSmrg   # Insert the option either (1) after the last *FLAGS variable, or
2936629baa8cSmrg   # (2) before a word containing "conftest.", or (3) at the end.
2937629baa8cSmrg   # Note that $ac_compile itself does not contain backslashes and begins
2938629baa8cSmrg   # with a dollar sign (not a hyphen), so the echo should work correctly.
2939629baa8cSmrg   lt_compile=`echo "$ac_compile" | $SED \
2940629baa8cSmrg   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
2941629baa8cSmrg   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
2942629baa8cSmrg   -e 's:$: $lt_compiler_flag:'`
2943629baa8cSmrg   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
2944629baa8cSmrg   (eval "$lt_compile" 2>out/conftest.err)
2945629baa8cSmrg   ac_status=$?
2946629baa8cSmrg   cat out/conftest.err >&AS_MESSAGE_LOG_FD
2947629baa8cSmrg   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
2948629baa8cSmrg   if (exit $ac_status) && test -s out/conftest2.$ac_objext
2949629baa8cSmrg   then
2950629baa8cSmrg     # The compiler can only warn and ignore the option if not recognized
2951629baa8cSmrg     # So say no if there are warnings
2952629baa8cSmrg     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
2953629baa8cSmrg     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
2954629baa8cSmrg     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
2955629baa8cSmrg       _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
2956629baa8cSmrg     fi
2957629baa8cSmrg   fi
2958629baa8cSmrg   chmod u+w . 2>&AS_MESSAGE_LOG_FD
2959629baa8cSmrg   $RM conftest*
2960629baa8cSmrg   # SGI C++ compiler will create directory out/ii_files/ for
2961629baa8cSmrg   # template instantiation
2962629baa8cSmrg   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
2963629baa8cSmrg   $RM out/* && rmdir out
2964629baa8cSmrg   cd ..
2965629baa8cSmrg   $RM -r conftest
2966629baa8cSmrg   $RM conftest*
2967629baa8cSmrg])
2968629baa8cSmrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
2969629baa8cSmrg	[Does compiler simultaneously support -c and -o options?])
2970629baa8cSmrg])# _LT_COMPILER_C_O
2971629baa8cSmrg
2972629baa8cSmrg
2973629baa8cSmrg# _LT_COMPILER_FILE_LOCKS([TAGNAME])
2974629baa8cSmrg# ----------------------------------
2975629baa8cSmrg# Check to see if we can do hard links to lock some files if needed
2976629baa8cSmrgm4_defun([_LT_COMPILER_FILE_LOCKS],
2977629baa8cSmrg[m4_require([_LT_ENABLE_LOCK])dnl
2978629baa8cSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
2979629baa8cSmrg_LT_COMPILER_C_O([$1])
2980629baa8cSmrg
2981629baa8cSmrghard_links="nottested"
2982629baa8cSmrgif test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
2983629baa8cSmrg  # do not overwrite the value of need_locks provided by the user
2984629baa8cSmrg  AC_MSG_CHECKING([if we can lock with hard links])
2985629baa8cSmrg  hard_links=yes
2986629baa8cSmrg  $RM conftest*
2987629baa8cSmrg  ln conftest.a conftest.b 2>/dev/null && hard_links=no
2988629baa8cSmrg  touch conftest.a
2989629baa8cSmrg  ln conftest.a conftest.b 2>&5 || hard_links=no
2990629baa8cSmrg  ln conftest.a conftest.b 2>/dev/null && hard_links=no
2991629baa8cSmrg  AC_MSG_RESULT([$hard_links])
2992629baa8cSmrg  if test "$hard_links" = no; then
2993629baa8cSmrg    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
2994629baa8cSmrg    need_locks=warn
2995629baa8cSmrg  fi
2996629baa8cSmrgelse
2997629baa8cSmrg  need_locks=no
2998629baa8cSmrgfi
2999629baa8cSmrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
3000629baa8cSmrg])# _LT_COMPILER_FILE_LOCKS
3001629baa8cSmrg
3002629baa8cSmrg
3003629baa8cSmrg# _LT_CHECK_OBJDIR
3004629baa8cSmrg# ----------------
3005629baa8cSmrgm4_defun([_LT_CHECK_OBJDIR],
3006629baa8cSmrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
3007629baa8cSmrg[rm -f .libs 2>/dev/null
3008629baa8cSmrgmkdir .libs 2>/dev/null
3009629baa8cSmrgif test -d .libs; then
3010629baa8cSmrg  lt_cv_objdir=.libs
3011629baa8cSmrgelse
3012629baa8cSmrg  # MS-DOS does not allow filenames that begin with a dot.
3013629baa8cSmrg  lt_cv_objdir=_libs
3014629baa8cSmrgfi
3015629baa8cSmrgrmdir .libs 2>/dev/null])
3016629baa8cSmrgobjdir=$lt_cv_objdir
3017629baa8cSmrg_LT_DECL([], [objdir], [0],
3018629baa8cSmrg         [The name of the directory that contains temporary libtool files])dnl
3019629baa8cSmrgm4_pattern_allow([LT_OBJDIR])dnl
3020629baa8cSmrgAC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
3021629baa8cSmrg  [Define to the sub-directory in which libtool stores uninstalled libraries.])
3022629baa8cSmrg])# _LT_CHECK_OBJDIR
3023629baa8cSmrg
3024629baa8cSmrg
3025629baa8cSmrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
3026629baa8cSmrg# --------------------------------------
3027629baa8cSmrg# Check hardcoding attributes.
3028629baa8cSmrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH],
3029629baa8cSmrg[AC_MSG_CHECKING([how to hardcode library paths into programs])
3030629baa8cSmrg_LT_TAGVAR(hardcode_action, $1)=
3031629baa8cSmrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
3032629baa8cSmrg   test -n "$_LT_TAGVAR(runpath_var, $1)" ||
3033629baa8cSmrg   test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
3034629baa8cSmrg
3035629baa8cSmrg  # We can hardcode non-existent directories.
3036629baa8cSmrg  if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
3037629baa8cSmrg     # If the only mechanism to avoid hardcoding is shlibpath_var, we
3038629baa8cSmrg     # have to relink, otherwise we might link with an installed library
3039629baa8cSmrg     # when we should be linking with a yet-to-be-installed one
3040629baa8cSmrg     ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
3041629baa8cSmrg     test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
3042629baa8cSmrg    # Linking always hardcodes the temporary library directory.
3043629baa8cSmrg    _LT_TAGVAR(hardcode_action, $1)=relink
3044629baa8cSmrg  else
3045629baa8cSmrg    # We can link without hardcoding, and we can hardcode nonexisting dirs.
3046629baa8cSmrg    _LT_TAGVAR(hardcode_action, $1)=immediate
3047629baa8cSmrg  fi
3048629baa8cSmrgelse
3049629baa8cSmrg  # We cannot hardcode anything, or else we can only hardcode existing
3050629baa8cSmrg  # directories.
3051629baa8cSmrg  _LT_TAGVAR(hardcode_action, $1)=unsupported
3052629baa8cSmrgfi
3053629baa8cSmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
3054629baa8cSmrg
3055629baa8cSmrgif test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
3056629baa8cSmrg   test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
3057629baa8cSmrg  # Fast installation is not supported
3058629baa8cSmrg  enable_fast_install=no
3059629baa8cSmrgelif test "$shlibpath_overrides_runpath" = yes ||
3060629baa8cSmrg     test "$enable_shared" = no; then
3061629baa8cSmrg  # Fast installation is not necessary
3062629baa8cSmrg  enable_fast_install=needless
3063629baa8cSmrgfi
3064629baa8cSmrg_LT_TAGDECL([], [hardcode_action], [0],
3065629baa8cSmrg    [How to hardcode a shared library path into an executable])
3066629baa8cSmrg])# _LT_LINKER_HARDCODE_LIBPATH
3067629baa8cSmrg
3068629baa8cSmrg
3069629baa8cSmrg# _LT_CMD_STRIPLIB
3070629baa8cSmrg# ----------------
3071629baa8cSmrgm4_defun([_LT_CMD_STRIPLIB],
3072629baa8cSmrg[m4_require([_LT_DECL_EGREP])
3073629baa8cSmrgstriplib=
3074629baa8cSmrgold_striplib=
3075629baa8cSmrgAC_MSG_CHECKING([whether stripping libraries is possible])
3076629baa8cSmrgif test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
3077629baa8cSmrg  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
3078629baa8cSmrg  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
3079629baa8cSmrg  AC_MSG_RESULT([yes])
3080629baa8cSmrgelse
3081629baa8cSmrg# FIXME - insert some real tests, host_os isn't really good enough
3082629baa8cSmrg  case $host_os in
3083629baa8cSmrg  darwin*)
3084629baa8cSmrg    if test -n "$STRIP" ; then
3085629baa8cSmrg      striplib="$STRIP -x"
3086629baa8cSmrg      old_striplib="$STRIP -S"
3087629baa8cSmrg      AC_MSG_RESULT([yes])
3088629baa8cSmrg    else
3089629baa8cSmrg      AC_MSG_RESULT([no])
3090629baa8cSmrg    fi
3091629baa8cSmrg    ;;
3092629baa8cSmrg  *)
3093629baa8cSmrg    AC_MSG_RESULT([no])
3094629baa8cSmrg    ;;
3095629baa8cSmrg  esac
3096629baa8cSmrgfi
3097629baa8cSmrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
3098629baa8cSmrg_LT_DECL([], [striplib], [1])
3099629baa8cSmrg])# _LT_CMD_STRIPLIB
3100629baa8cSmrg
3101629baa8cSmrg
3102629baa8cSmrg# _LT_SYS_DYNAMIC_LINKER([TAG])
3103629baa8cSmrg# -----------------------------
3104629baa8cSmrg# PORTME Fill in your ld.so characteristics
3105629baa8cSmrgm4_defun([_LT_SYS_DYNAMIC_LINKER],
3106629baa8cSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
3107629baa8cSmrgm4_require([_LT_DECL_EGREP])dnl
3108629baa8cSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
3109629baa8cSmrgm4_require([_LT_DECL_OBJDUMP])dnl
3110629baa8cSmrgm4_require([_LT_DECL_SED])dnl
3111629baa8cSmrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl
3112629baa8cSmrgAC_MSG_CHECKING([dynamic linker characteristics])
3113629baa8cSmrgm4_if([$1],
3114629baa8cSmrg	[], [
3115629baa8cSmrgif test "$GCC" = yes; then
3116629baa8cSmrg  case $host_os in
3117629baa8cSmrg    darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
3118629baa8cSmrg    *) lt_awk_arg="/^libraries:/" ;;
3119629baa8cSmrg  esac
3120629baa8cSmrg  case $host_os in
3121629baa8cSmrg    mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;;
3122629baa8cSmrg    *) lt_sed_strip_eq="s,=/,/,g" ;;
3123629baa8cSmrg  esac
3124629baa8cSmrg  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
3125629baa8cSmrg  case $lt_search_path_spec in
3126629baa8cSmrg  *\;*)
3127629baa8cSmrg    # if the path contains ";" then we assume it to be the separator
3128629baa8cSmrg    # otherwise default to the standard path separator (i.e. ":") - it is
3129629baa8cSmrg    # assumed that no part of a normal pathname contains ";" but that should
3130629baa8cSmrg    # okay in the real world where ";" in dirpaths is itself problematic.
3131629baa8cSmrg    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
3132629baa8cSmrg    ;;
3133629baa8cSmrg  *)
3134629baa8cSmrg    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
3135629baa8cSmrg    ;;
3136629baa8cSmrg  esac
3137629baa8cSmrg  # Ok, now we have the path, separated by spaces, we can step through it
3138629baa8cSmrg  # and add multilib dir if necessary.
3139629baa8cSmrg  lt_tmp_lt_search_path_spec=
3140629baa8cSmrg  lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
3141629baa8cSmrg  for lt_sys_path in $lt_search_path_spec; do
3142629baa8cSmrg    if test -d "$lt_sys_path/$lt_multi_os_dir"; then
3143629baa8cSmrg      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
3144629baa8cSmrg    else
3145629baa8cSmrg      test -d "$lt_sys_path" && \
3146629baa8cSmrg	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
3147629baa8cSmrg    fi
3148629baa8cSmrg  done
3149629baa8cSmrg  lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
3150629baa8cSmrgBEGIN {RS=" "; FS="/|\n";} {
3151629baa8cSmrg  lt_foo="";
3152629baa8cSmrg  lt_count=0;
3153629baa8cSmrg  for (lt_i = NF; lt_i > 0; lt_i--) {
3154629baa8cSmrg    if ($lt_i != "" && $lt_i != ".") {
3155629baa8cSmrg      if ($lt_i == "..") {
3156629baa8cSmrg        lt_count++;
3157629baa8cSmrg      } else {
3158629baa8cSmrg        if (lt_count == 0) {
3159629baa8cSmrg          lt_foo="/" $lt_i lt_foo;
3160629baa8cSmrg        } else {
3161629baa8cSmrg          lt_count--;
3162629baa8cSmrg        }
3163629baa8cSmrg      }
3164629baa8cSmrg    }
3165629baa8cSmrg  }
3166629baa8cSmrg  if (lt_foo != "") { lt_freq[[lt_foo]]++; }
3167629baa8cSmrg  if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
3168629baa8cSmrg}'`
3169629baa8cSmrg  # AWK program above erroneously prepends '/' to C:/dos/paths
3170629baa8cSmrg  # for these hosts.
3171629baa8cSmrg  case $host_os in
3172629baa8cSmrg    mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
3173629baa8cSmrg      $SED 's,/\([[A-Za-z]]:\),\1,g'` ;;
3174629baa8cSmrg  esac
3175629baa8cSmrg  sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
3176629baa8cSmrgelse
3177629baa8cSmrg  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
3178629baa8cSmrgfi])
3179629baa8cSmrglibrary_names_spec=
3180629baa8cSmrglibname_spec='lib$name'
3181629baa8cSmrgsoname_spec=
3182629baa8cSmrgshrext_cmds=".so"
3183629baa8cSmrgpostinstall_cmds=
3184629baa8cSmrgpostuninstall_cmds=
3185629baa8cSmrgfinish_cmds=
3186629baa8cSmrgfinish_eval=
3187629baa8cSmrgshlibpath_var=
3188629baa8cSmrgshlibpath_overrides_runpath=unknown
3189629baa8cSmrgversion_type=none
3190629baa8cSmrgdynamic_linker="$host_os ld.so"
3191629baa8cSmrgsys_lib_dlsearch_path_spec="/lib /usr/lib"
3192629baa8cSmrgneed_lib_prefix=unknown
3193629baa8cSmrghardcode_into_libs=no
3194629baa8cSmrg
3195629baa8cSmrg# when you set need_version to no, make sure it does not cause -set_version
3196629baa8cSmrg# flags to be left without arguments
3197629baa8cSmrgneed_version=unknown
3198629baa8cSmrg
3199629baa8cSmrgcase $host_os in
3200629baa8cSmrgaix3*)
3201629baa8cSmrg  version_type=linux
3202629baa8cSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
3203629baa8cSmrg  shlibpath_var=LIBPATH
3204629baa8cSmrg
3205629baa8cSmrg  # AIX 3 has no versioning support, so we append a major version to the name.
3206629baa8cSmrg  soname_spec='${libname}${release}${shared_ext}$major'
3207629baa8cSmrg  ;;
3208629baa8cSmrg
3209629baa8cSmrgaix[[4-9]]*)
3210629baa8cSmrg  version_type=linux
3211629baa8cSmrg  need_lib_prefix=no
3212629baa8cSmrg  need_version=no
3213629baa8cSmrg  hardcode_into_libs=yes
3214629baa8cSmrg  if test "$host_cpu" = ia64; then
3215629baa8cSmrg    # AIX 5 supports IA64
3216629baa8cSmrg    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
3217629baa8cSmrg    shlibpath_var=LD_LIBRARY_PATH
3218629baa8cSmrg  else
3219629baa8cSmrg    # With GCC up to 2.95.x, collect2 would create an import file
3220629baa8cSmrg    # for dependence libraries.  The import file would start with
3221629baa8cSmrg    # the line `#! .'.  This would cause the generated library to
3222629baa8cSmrg    # depend on `.', always an invalid library.  This was fixed in
3223629baa8cSmrg    # development snapshots of GCC prior to 3.0.
3224629baa8cSmrg    case $host_os in
3225629baa8cSmrg      aix4 | aix4.[[01]] | aix4.[[01]].*)
3226629baa8cSmrg      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
3227629baa8cSmrg	   echo ' yes '
3228629baa8cSmrg	   echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
3229629baa8cSmrg	:
3230629baa8cSmrg      else
3231629baa8cSmrg	can_build_shared=no
3232629baa8cSmrg      fi
3233629baa8cSmrg      ;;
3234629baa8cSmrg    esac
3235629baa8cSmrg    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
3236629baa8cSmrg    # soname into executable. Probably we can add versioning support to
3237629baa8cSmrg    # collect2, so additional links can be useful in future.
3238629baa8cSmrg    if test "$aix_use_runtimelinking" = yes; then
3239629baa8cSmrg      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
3240629baa8cSmrg      # instead of lib<name>.a to let people know that these are not
3241629baa8cSmrg      # typical AIX shared libraries.
3242629baa8cSmrg      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3243629baa8cSmrg    else
3244629baa8cSmrg      # We preserve .a as extension for shared libraries through AIX4.2
3245629baa8cSmrg      # and later when we are not doing run time linking.
3246629baa8cSmrg      library_names_spec='${libname}${release}.a $libname.a'
3247629baa8cSmrg      soname_spec='${libname}${release}${shared_ext}$major'
3248629baa8cSmrg    fi
3249629baa8cSmrg    shlibpath_var=LIBPATH
3250629baa8cSmrg  fi
3251629baa8cSmrg  ;;
3252629baa8cSmrg
3253629baa8cSmrgamigaos*)
3254629baa8cSmrg  case $host_cpu in
3255629baa8cSmrg  powerpc)
3256629baa8cSmrg    # Since July 2007 AmigaOS4 officially supports .so libraries.
3257629baa8cSmrg    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
3258629baa8cSmrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3259629baa8cSmrg    ;;
3260629baa8cSmrg  m68k)
3261629baa8cSmrg    library_names_spec='$libname.ixlibrary $libname.a'
3262629baa8cSmrg    # Create ${libname}_ixlibrary.a entries in /sys/libs.
3263629baa8cSmrg    finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
3264629baa8cSmrg    ;;
3265629baa8cSmrg  esac
3266629baa8cSmrg  ;;
3267629baa8cSmrg
3268629baa8cSmrgbeos*)
3269629baa8cSmrg  library_names_spec='${libname}${shared_ext}'
3270629baa8cSmrg  dynamic_linker="$host_os ld.so"
3271629baa8cSmrg  shlibpath_var=LIBRARY_PATH
3272629baa8cSmrg  ;;
3273629baa8cSmrg
3274629baa8cSmrgbsdi[[45]]*)
3275629baa8cSmrg  version_type=linux
3276629baa8cSmrg  need_version=no
3277629baa8cSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3278629baa8cSmrg  soname_spec='${libname}${release}${shared_ext}$major'
3279629baa8cSmrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
3280629baa8cSmrg  shlibpath_var=LD_LIBRARY_PATH
3281629baa8cSmrg  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
3282629baa8cSmrg  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
3283629baa8cSmrg  # the default ld.so.conf also contains /usr/contrib/lib and
3284629baa8cSmrg  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
3285629baa8cSmrg  # libtool to hard-code these into programs
3286629baa8cSmrg  ;;
3287629baa8cSmrg
3288629baa8cSmrgcygwin* | mingw* | pw32* | cegcc*)
3289629baa8cSmrg  version_type=windows
3290629baa8cSmrg  shrext_cmds=".dll"
3291629baa8cSmrg  need_version=no
3292629baa8cSmrg  need_lib_prefix=no
3293629baa8cSmrg
3294629baa8cSmrg  case $GCC,$cc_basename in
3295629baa8cSmrg  yes,*)
3296629baa8cSmrg    # gcc
3297629baa8cSmrg    library_names_spec='$libname.dll.a'
3298629baa8cSmrg    # DLL is installed to $(libdir)/../bin by postinstall_cmds
3299629baa8cSmrg    postinstall_cmds='base_file=`basename \${file}`~
3300629baa8cSmrg      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
3301629baa8cSmrg      dldir=$destdir/`dirname \$dlpath`~
3302629baa8cSmrg      test -d \$dldir || mkdir -p \$dldir~
3303629baa8cSmrg      $install_prog $dir/$dlname \$dldir/$dlname~
3304629baa8cSmrg      chmod a+x \$dldir/$dlname~
3305629baa8cSmrg      if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
3306629baa8cSmrg        eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
3307629baa8cSmrg      fi'
3308629baa8cSmrg    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
3309629baa8cSmrg      dlpath=$dir/\$dldll~
3310629baa8cSmrg       $RM \$dlpath'
3311629baa8cSmrg    shlibpath_overrides_runpath=yes
3312629baa8cSmrg
3313629baa8cSmrg    case $host_os in
3314629baa8cSmrg    cygwin*)
3315629baa8cSmrg      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
3316629baa8cSmrg      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3317629baa8cSmrgm4_if([$1], [],[
3318629baa8cSmrg      sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
3319629baa8cSmrg      ;;
3320629baa8cSmrg    mingw* | cegcc*)
3321629baa8cSmrg      # MinGW DLLs use traditional 'lib' prefix
3322629baa8cSmrg      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3323629baa8cSmrg      ;;
3324629baa8cSmrg    pw32*)
3325629baa8cSmrg      # pw32 DLLs use 'pw' prefix rather than 'lib'
3326629baa8cSmrg      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3327629baa8cSmrg      ;;
3328629baa8cSmrg    esac
3329629baa8cSmrg    dynamic_linker='Win32 ld.exe'
3330629baa8cSmrg    ;;
3331629baa8cSmrg
3332629baa8cSmrg  *,cl*)
3333629baa8cSmrg    # Native MSVC
3334629baa8cSmrg    libname_spec='$name'
3335629baa8cSmrg    soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3336629baa8cSmrg    library_names_spec='${libname}.dll.lib'
3337629baa8cSmrg
3338629baa8cSmrg    case $build_os in
3339629baa8cSmrg    mingw*)
3340629baa8cSmrg      sys_lib_search_path_spec=
3341629baa8cSmrg      lt_save_ifs=$IFS
3342629baa8cSmrg      IFS=';'
3343629baa8cSmrg      for lt_path in $LIB
3344629baa8cSmrg      do
3345629baa8cSmrg        IFS=$lt_save_ifs
3346629baa8cSmrg        # Let DOS variable expansion print the short 8.3 style file name.
3347629baa8cSmrg        lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
3348629baa8cSmrg        sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
3349629baa8cSmrg      done
3350629baa8cSmrg      IFS=$lt_save_ifs
3351629baa8cSmrg      # Convert to MSYS style.
3352629baa8cSmrg      sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
3353629baa8cSmrg      ;;
3354629baa8cSmrg    cygwin*)
3355629baa8cSmrg      # Convert to unix form, then to dos form, then back to unix form
3356629baa8cSmrg      # but this time dos style (no spaces!) so that the unix form looks
3357629baa8cSmrg      # like /cygdrive/c/PROGRA~1:/cygdr...
3358629baa8cSmrg      sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
3359629baa8cSmrg      sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
3360629baa8cSmrg      sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
3361629baa8cSmrg      ;;
3362629baa8cSmrg    *)
3363629baa8cSmrg      sys_lib_search_path_spec="$LIB"
3364629baa8cSmrg      if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
3365629baa8cSmrg        # It is most probably a Windows format PATH.
3366629baa8cSmrg        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
3367629baa8cSmrg      else
3368629baa8cSmrg        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
3369629baa8cSmrg      fi
3370629baa8cSmrg      # FIXME: find the short name or the path components, as spaces are
3371629baa8cSmrg      # common. (e.g. "Program Files" -> "PROGRA~1")
3372629baa8cSmrg      ;;
3373629baa8cSmrg    esac
3374629baa8cSmrg
3375629baa8cSmrg    # DLL is installed to $(libdir)/../bin by postinstall_cmds
3376629baa8cSmrg    postinstall_cmds='base_file=`basename \${file}`~
3377629baa8cSmrg      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
3378629baa8cSmrg      dldir=$destdir/`dirname \$dlpath`~
3379629baa8cSmrg      test -d \$dldir || mkdir -p \$dldir~
3380629baa8cSmrg      $install_prog $dir/$dlname \$dldir/$dlname'
3381629baa8cSmrg    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
3382629baa8cSmrg      dlpath=$dir/\$dldll~
3383629baa8cSmrg       $RM \$dlpath'
3384629baa8cSmrg    shlibpath_overrides_runpath=yes
3385629baa8cSmrg    dynamic_linker='Win32 link.exe'
3386629baa8cSmrg    ;;
3387629baa8cSmrg
3388629baa8cSmrg  *)
3389629baa8cSmrg    # Assume MSVC wrapper
3390629baa8cSmrg    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
3391629baa8cSmrg    dynamic_linker='Win32 ld.exe'
3392629baa8cSmrg    ;;
3393629baa8cSmrg  esac
3394629baa8cSmrg  # FIXME: first we should search . and the directory the executable is in
3395629baa8cSmrg  shlibpath_var=PATH
3396629baa8cSmrg  ;;
3397629baa8cSmrg
3398629baa8cSmrgdarwin* | rhapsody*)
3399629baa8cSmrg  dynamic_linker="$host_os dyld"
3400629baa8cSmrg  version_type=darwin
3401629baa8cSmrg  need_lib_prefix=no
3402629baa8cSmrg  need_version=no
3403629baa8cSmrg  library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
3404629baa8cSmrg  soname_spec='${libname}${release}${major}$shared_ext'
3405629baa8cSmrg  shlibpath_overrides_runpath=yes
3406629baa8cSmrg  shlibpath_var=DYLD_LIBRARY_PATH
3407629baa8cSmrg  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
3408629baa8cSmrgm4_if([$1], [],[
3409629baa8cSmrg  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
3410629baa8cSmrg  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
3411629baa8cSmrg  ;;
3412629baa8cSmrg
3413629baa8cSmrgdgux*)
3414629baa8cSmrg  version_type=linux
3415629baa8cSmrg  need_lib_prefix=no
3416629baa8cSmrg  need_version=no
3417629baa8cSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
3418629baa8cSmrg  soname_spec='${libname}${release}${shared_ext}$major'
3419629baa8cSmrg  shlibpath_var=LD_LIBRARY_PATH
3420629baa8cSmrg  ;;
3421629baa8cSmrg
3422629baa8cSmrgfreebsd1*)
3423629baa8cSmrg  dynamic_linker=no
3424629baa8cSmrg  ;;
3425629baa8cSmrg
3426629baa8cSmrgfreebsd* | dragonfly*)
3427629baa8cSmrg  # DragonFly does not have aout.  When/if they implement a new
3428629baa8cSmrg  # versioning mechanism, adjust this.
3429629baa8cSmrg  if test -x /usr/bin/objformat; then
3430629baa8cSmrg    objformat=`/usr/bin/objformat`
3431629baa8cSmrg  else
3432629baa8cSmrg    case $host_os in
3433629baa8cSmrg    freebsd[[123]]*) objformat=aout ;;
3434629baa8cSmrg    *) objformat=elf ;;
3435629baa8cSmrg    esac
3436629baa8cSmrg  fi
3437629baa8cSmrg  version_type=freebsd-$objformat
3438629baa8cSmrg  case $version_type in
3439629baa8cSmrg    freebsd-elf*)
3440629baa8cSmrg      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
3441629baa8cSmrg      need_version=no
3442629baa8cSmrg      need_lib_prefix=no
3443629baa8cSmrg      ;;
3444629baa8cSmrg    freebsd-*)
3445629baa8cSmrg      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
3446629baa8cSmrg      need_version=yes
3447629baa8cSmrg      ;;
3448629baa8cSmrg  esac
3449629baa8cSmrg  shlibpath_var=LD_LIBRARY_PATH
3450629baa8cSmrg  case $host_os in
3451629baa8cSmrg  freebsd2*)
3452629baa8cSmrg    shlibpath_overrides_runpath=yes
3453629baa8cSmrg    ;;
3454629baa8cSmrg  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
3455629baa8cSmrg    shlibpath_overrides_runpath=yes
3456629baa8cSmrg    hardcode_into_libs=yes
3457629baa8cSmrg    ;;
3458629baa8cSmrg  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
3459629baa8cSmrg  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
3460629baa8cSmrg    shlibpath_overrides_runpath=no
3461629baa8cSmrg    hardcode_into_libs=yes
3462629baa8cSmrg    ;;
3463629baa8cSmrg  *) # from 4.6 on, and DragonFly
3464629baa8cSmrg    shlibpath_overrides_runpath=yes
3465629baa8cSmrg    hardcode_into_libs=yes
3466629baa8cSmrg    ;;
3467629baa8cSmrg  esac
3468629baa8cSmrg  ;;
3469629baa8cSmrg
3470629baa8cSmrggnu*)
3471629baa8cSmrg  version_type=linux
3472629baa8cSmrg  need_lib_prefix=no
3473629baa8cSmrg  need_version=no
3474629baa8cSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
3475629baa8cSmrg  soname_spec='${libname}${release}${shared_ext}$major'
3476629baa8cSmrg  shlibpath_var=LD_LIBRARY_PATH
3477629baa8cSmrg  hardcode_into_libs=yes
3478629baa8cSmrg  ;;
3479629baa8cSmrg
3480629baa8cSmrghaiku*)
3481629baa8cSmrg  version_type=linux
3482629baa8cSmrg  need_lib_prefix=no
3483629baa8cSmrg  need_version=no
3484629baa8cSmrg  dynamic_linker="$host_os runtime_loader"
3485629baa8cSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
3486629baa8cSmrg  soname_spec='${libname}${release}${shared_ext}$major'
3487629baa8cSmrg  shlibpath_var=LIBRARY_PATH
3488629baa8cSmrg  shlibpath_overrides_runpath=yes
3489629baa8cSmrg  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
3490629baa8cSmrg  hardcode_into_libs=yes
3491629baa8cSmrg  ;;
3492629baa8cSmrg
3493629baa8cSmrghpux9* | hpux10* | hpux11*)
3494629baa8cSmrg  # Give a soname corresponding to the major version so that dld.sl refuses to
3495629baa8cSmrg  # link against other versions.
3496629baa8cSmrg  version_type=sunos
3497629baa8cSmrg  need_lib_prefix=no
3498629baa8cSmrg  need_version=no
3499629baa8cSmrg  case $host_cpu in
3500629baa8cSmrg  ia64*)
3501629baa8cSmrg    shrext_cmds='.so'
3502629baa8cSmrg    hardcode_into_libs=yes
3503629baa8cSmrg    dynamic_linker="$host_os dld.so"
3504629baa8cSmrg    shlibpath_var=LD_LIBRARY_PATH
3505629baa8cSmrg    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
3506629baa8cSmrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3507629baa8cSmrg    soname_spec='${libname}${release}${shared_ext}$major'
3508629baa8cSmrg    if test "X$HPUX_IA64_MODE" = X32; then
3509629baa8cSmrg      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
3510629baa8cSmrg    else
3511629baa8cSmrg      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
3512629baa8cSmrg    fi
3513629baa8cSmrg    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
3514629baa8cSmrg    ;;
3515629baa8cSmrg  hppa*64*)
3516629baa8cSmrg    shrext_cmds='.sl'
3517629baa8cSmrg    hardcode_into_libs=yes
3518629baa8cSmrg    dynamic_linker="$host_os dld.sl"
3519629baa8cSmrg    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
3520629baa8cSmrg    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
3521629baa8cSmrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3522629baa8cSmrg    soname_spec='${libname}${release}${shared_ext}$major'
3523629baa8cSmrg    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
3524629baa8cSmrg    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
3525629baa8cSmrg    ;;
3526629baa8cSmrg  *)
3527629baa8cSmrg    shrext_cmds='.sl'
3528629baa8cSmrg    dynamic_linker="$host_os dld.sl"
3529629baa8cSmrg    shlibpath_var=SHLIB_PATH
3530629baa8cSmrg    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
3531629baa8cSmrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3532629baa8cSmrg    soname_spec='${libname}${release}${shared_ext}$major'
3533629baa8cSmrg    ;;
3534629baa8cSmrg  esac
3535629baa8cSmrg  # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
3536629baa8cSmrg  postinstall_cmds='chmod 555 $lib'
3537629baa8cSmrg  # or fails outright, so override atomically:
3538629baa8cSmrg  install_override_mode=555
3539629baa8cSmrg  ;;
3540629baa8cSmrg
3541629baa8cSmrginterix[[3-9]]*)
3542629baa8cSmrg  version_type=linux
3543629baa8cSmrg  need_lib_prefix=no
3544629baa8cSmrg  need_version=no
3545629baa8cSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
3546629baa8cSmrg  soname_spec='${libname}${release}${shared_ext}$major'
3547629baa8cSmrg  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
3548629baa8cSmrg  shlibpath_var=LD_LIBRARY_PATH
3549629baa8cSmrg  shlibpath_overrides_runpath=no
3550629baa8cSmrg  hardcode_into_libs=yes
3551629baa8cSmrg  ;;
3552629baa8cSmrg
3553629baa8cSmrgirix5* | irix6* | nonstopux*)
3554629baa8cSmrg  case $host_os in
3555629baa8cSmrg    nonstopux*) version_type=nonstopux ;;
3556629baa8cSmrg    *)
3557629baa8cSmrg	if test "$lt_cv_prog_gnu_ld" = yes; then
3558629baa8cSmrg		version_type=linux
3559629baa8cSmrg	else
3560629baa8cSmrg		version_type=irix
3561629baa8cSmrg	fi ;;
3562629baa8cSmrg  esac
3563629baa8cSmrg  need_lib_prefix=no
3564629baa8cSmrg  need_version=no
3565629baa8cSmrg  soname_spec='${libname}${release}${shared_ext}$major'
3566629baa8cSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
3567629baa8cSmrg  case $host_os in
3568629baa8cSmrg  irix5* | nonstopux*)
3569629baa8cSmrg    libsuff= shlibsuff=
3570629baa8cSmrg    ;;
3571629baa8cSmrg  *)
3572629baa8cSmrg    case $LD in # libtool.m4 will add one of these switches to LD
3573629baa8cSmrg    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
3574629baa8cSmrg      libsuff= shlibsuff= libmagic=32-bit;;
3575629baa8cSmrg    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
3576629baa8cSmrg      libsuff=32 shlibsuff=N32 libmagic=N32;;
3577629baa8cSmrg    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
3578629baa8cSmrg      libsuff=64 shlibsuff=64 libmagic=64-bit;;
3579629baa8cSmrg    *) libsuff= shlibsuff= libmagic=never-match;;
3580629baa8cSmrg    esac
3581629baa8cSmrg    ;;
3582629baa8cSmrg  esac
3583629baa8cSmrg  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
3584629baa8cSmrg  shlibpath_overrides_runpath=no
3585629baa8cSmrg  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
3586629baa8cSmrg  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
3587629baa8cSmrg  hardcode_into_libs=yes
3588629baa8cSmrg  ;;
3589629baa8cSmrg
3590629baa8cSmrg# No shared lib support for Linux oldld, aout, or coff.
3591629baa8cSmrglinux*oldld* | linux*aout* | linux*coff*)
3592629baa8cSmrg  dynamic_linker=no
3593629baa8cSmrg  ;;
3594629baa8cSmrg
3595629baa8cSmrg# This must be Linux ELF.
3596629baa8cSmrglinux* | k*bsd*-gnu | kopensolaris*-gnu)
3597629baa8cSmrg  version_type=linux
3598629baa8cSmrg  need_lib_prefix=no
3599629baa8cSmrg  need_version=no
3600629baa8cSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3601629baa8cSmrg  soname_spec='${libname}${release}${shared_ext}$major'
3602629baa8cSmrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
3603629baa8cSmrg  shlibpath_var=LD_LIBRARY_PATH
3604629baa8cSmrg  shlibpath_overrides_runpath=no
3605629baa8cSmrg
3606629baa8cSmrg  # Some binutils ld are patched to set DT_RUNPATH
3607629baa8cSmrg  AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
3608629baa8cSmrg    [lt_cv_shlibpath_overrides_runpath=no
3609629baa8cSmrg    save_LDFLAGS=$LDFLAGS
3610629baa8cSmrg    save_libdir=$libdir
3611629baa8cSmrg    eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
3612629baa8cSmrg	 LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
3613629baa8cSmrg    AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
3614629baa8cSmrg      [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
3615629baa8cSmrg	 [lt_cv_shlibpath_overrides_runpath=yes])])
3616629baa8cSmrg    LDFLAGS=$save_LDFLAGS
3617629baa8cSmrg    libdir=$save_libdir
3618629baa8cSmrg    ])
3619629baa8cSmrg  shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
3620629baa8cSmrg
3621629baa8cSmrg  # This implies no fast_install, which is unacceptable.
3622629baa8cSmrg  # Some rework will be needed to allow for fast_install
3623629baa8cSmrg  # before this can be enabled.
3624629baa8cSmrg  hardcode_into_libs=yes
3625629baa8cSmrg
3626629baa8cSmrg  # Append ld.so.conf contents to the search path
3627629baa8cSmrg  if test -f /etc/ld.so.conf; then
3628629baa8cSmrg    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[	 ]*hwcap[	 ]/d;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
3629629baa8cSmrg    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
3630629baa8cSmrg  fi
3631629baa8cSmrg
3632629baa8cSmrg  # We used to test for /lib/ld.so.1 and disable shared libraries on
3633629baa8cSmrg  # powerpc, because MkLinux only supported shared libraries with the
3634629baa8cSmrg  # GNU dynamic linker.  Since this was broken with cross compilers,
3635629baa8cSmrg  # most powerpc-linux boxes support dynamic linking these days and
3636629baa8cSmrg  # people can always --disable-shared, the test was removed, and we
3637629baa8cSmrg  # assume the GNU/Linux dynamic linker is in use.
3638629baa8cSmrg  dynamic_linker='GNU/Linux ld.so'
3639629baa8cSmrg  ;;
3640629baa8cSmrg
3641629baa8cSmrgnetbsd*)
3642629baa8cSmrg  version_type=sunos
3643629baa8cSmrg  need_lib_prefix=no
3644629baa8cSmrg  need_version=no
3645629baa8cSmrg  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
3646629baa8cSmrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
3647629baa8cSmrg    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
3648629baa8cSmrg    dynamic_linker='NetBSD (a.out) ld.so'
3649629baa8cSmrg  else
3650629baa8cSmrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
3651629baa8cSmrg    soname_spec='${libname}${release}${shared_ext}$major'
3652629baa8cSmrg    dynamic_linker='NetBSD ld.elf_so'
3653629baa8cSmrg  fi
3654629baa8cSmrg  shlibpath_var=LD_LIBRARY_PATH
3655629baa8cSmrg  shlibpath_overrides_runpath=yes
3656629baa8cSmrg  hardcode_into_libs=yes
3657629baa8cSmrg  ;;
3658629baa8cSmrg
3659629baa8cSmrgnewsos6)
3660629baa8cSmrg  version_type=linux
3661629baa8cSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3662629baa8cSmrg  shlibpath_var=LD_LIBRARY_PATH
3663629baa8cSmrg  shlibpath_overrides_runpath=yes
3664629baa8cSmrg  ;;
3665629baa8cSmrg
3666629baa8cSmrg*nto* | *qnx*)
3667629baa8cSmrg  version_type=qnx
3668629baa8cSmrg  need_lib_prefix=no
3669629baa8cSmrg  need_version=no
3670629baa8cSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3671629baa8cSmrg  soname_spec='${libname}${release}${shared_ext}$major'
3672629baa8cSmrg  shlibpath_var=LD_LIBRARY_PATH
3673629baa8cSmrg  shlibpath_overrides_runpath=no
3674629baa8cSmrg  hardcode_into_libs=yes
3675629baa8cSmrg  dynamic_linker='ldqnx.so'
3676629baa8cSmrg  ;;
3677629baa8cSmrg
3678629baa8cSmrgopenbsd*)
3679629baa8cSmrg  version_type=sunos
3680629baa8cSmrg  sys_lib_dlsearch_path_spec="/usr/lib"
3681629baa8cSmrg  need_lib_prefix=no
3682629baa8cSmrg  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
3683629baa8cSmrg  case $host_os in
3684629baa8cSmrg    openbsd3.3 | openbsd3.3.*)	need_version=yes ;;
3685629baa8cSmrg    *)				need_version=no  ;;
3686629baa8cSmrg  esac
3687629baa8cSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
3688629baa8cSmrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
3689629baa8cSmrg  shlibpath_var=LD_LIBRARY_PATH
3690629baa8cSmrg  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3691629baa8cSmrg    case $host_os in
3692629baa8cSmrg      openbsd2.[[89]] | openbsd2.[[89]].*)
3693629baa8cSmrg	shlibpath_overrides_runpath=no
3694629baa8cSmrg	;;
3695629baa8cSmrg      *)
3696629baa8cSmrg	shlibpath_overrides_runpath=yes
3697629baa8cSmrg	;;
3698629baa8cSmrg      esac
3699629baa8cSmrg  else
3700629baa8cSmrg    shlibpath_overrides_runpath=yes
3701629baa8cSmrg  fi
3702629baa8cSmrg  ;;
3703629baa8cSmrg
3704629baa8cSmrgos2*)
3705629baa8cSmrg  libname_spec='$name'
3706629baa8cSmrg  shrext_cmds=".dll"
3707629baa8cSmrg  need_lib_prefix=no
3708629baa8cSmrg  library_names_spec='$libname${shared_ext} $libname.a'
3709629baa8cSmrg  dynamic_linker='OS/2 ld.exe'
3710629baa8cSmrg  shlibpath_var=LIBPATH
3711629baa8cSmrg  ;;
3712629baa8cSmrg
3713629baa8cSmrgosf3* | osf4* | osf5*)
3714629baa8cSmrg  version_type=osf
3715629baa8cSmrg  need_lib_prefix=no
3716629baa8cSmrg  need_version=no
3717629baa8cSmrg  soname_spec='${libname}${release}${shared_ext}$major'
3718629baa8cSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3719629baa8cSmrg  shlibpath_var=LD_LIBRARY_PATH
3720629baa8cSmrg  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
3721629baa8cSmrg  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
3722629baa8cSmrg  ;;
3723629baa8cSmrg
3724629baa8cSmrgrdos*)
3725629baa8cSmrg  dynamic_linker=no
3726629baa8cSmrg  ;;
3727629baa8cSmrg
3728629baa8cSmrgsolaris*)
3729629baa8cSmrg  version_type=linux
3730629baa8cSmrg  need_lib_prefix=no
3731629baa8cSmrg  need_version=no
3732629baa8cSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3733629baa8cSmrg  soname_spec='${libname}${release}${shared_ext}$major'
3734629baa8cSmrg  shlibpath_var=LD_LIBRARY_PATH
3735629baa8cSmrg  shlibpath_overrides_runpath=yes
3736629baa8cSmrg  hardcode_into_libs=yes
3737629baa8cSmrg  # ldd complains unless libraries are executable
3738629baa8cSmrg  postinstall_cmds='chmod +x $lib'
3739629baa8cSmrg  ;;
3740629baa8cSmrg
3741629baa8cSmrgsunos4*)
3742629baa8cSmrg  version_type=sunos
3743629baa8cSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
3744629baa8cSmrg  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
3745629baa8cSmrg  shlibpath_var=LD_LIBRARY_PATH
3746629baa8cSmrg  shlibpath_overrides_runpath=yes
3747629baa8cSmrg  if test "$with_gnu_ld" = yes; then
3748629baa8cSmrg    need_lib_prefix=no
3749629baa8cSmrg  fi
3750629baa8cSmrg  need_version=yes
3751629baa8cSmrg  ;;
3752629baa8cSmrg
3753629baa8cSmrgsysv4 | sysv4.3*)
3754629baa8cSmrg  version_type=linux
3755629baa8cSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3756629baa8cSmrg  soname_spec='${libname}${release}${shared_ext}$major'
3757629baa8cSmrg  shlibpath_var=LD_LIBRARY_PATH
3758629baa8cSmrg  case $host_vendor in
3759629baa8cSmrg    sni)
3760629baa8cSmrg      shlibpath_overrides_runpath=no
3761629baa8cSmrg      need_lib_prefix=no
3762629baa8cSmrg      runpath_var=LD_RUN_PATH
3763629baa8cSmrg      ;;
3764629baa8cSmrg    siemens)
3765629baa8cSmrg      need_lib_prefix=no
3766629baa8cSmrg      ;;
3767629baa8cSmrg    motorola)
3768629baa8cSmrg      need_lib_prefix=no
3769629baa8cSmrg      need_version=no
3770629baa8cSmrg      shlibpath_overrides_runpath=no
3771629baa8cSmrg      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
3772629baa8cSmrg      ;;
3773629baa8cSmrg  esac
3774629baa8cSmrg  ;;
3775629baa8cSmrg
3776629baa8cSmrgsysv4*MP*)
3777629baa8cSmrg  if test -d /usr/nec ;then
3778629baa8cSmrg    version_type=linux
3779629baa8cSmrg    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
3780629baa8cSmrg    soname_spec='$libname${shared_ext}.$major'
3781629baa8cSmrg    shlibpath_var=LD_LIBRARY_PATH
3782629baa8cSmrg  fi
3783629baa8cSmrg  ;;
3784629baa8cSmrg
3785629baa8cSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3786629baa8cSmrg  version_type=freebsd-elf
3787629baa8cSmrg  need_lib_prefix=no
3788629baa8cSmrg  need_version=no
3789629baa8cSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
3790629baa8cSmrg  soname_spec='${libname}${release}${shared_ext}$major'
3791629baa8cSmrg  shlibpath_var=LD_LIBRARY_PATH
3792629baa8cSmrg  shlibpath_overrides_runpath=yes
3793629baa8cSmrg  hardcode_into_libs=yes
3794629baa8cSmrg  if test "$with_gnu_ld" = yes; then
3795629baa8cSmrg    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
3796629baa8cSmrg  else
3797629baa8cSmrg    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
3798629baa8cSmrg    case $host_os in
3799629baa8cSmrg      sco3.2v5*)
3800629baa8cSmrg        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
3801629baa8cSmrg	;;
3802629baa8cSmrg    esac
3803629baa8cSmrg  fi
3804629baa8cSmrg  sys_lib_dlsearch_path_spec='/usr/lib'
3805629baa8cSmrg  ;;
3806629baa8cSmrg
3807629baa8cSmrgtpf*)
3808629baa8cSmrg  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
3809629baa8cSmrg  version_type=linux
3810629baa8cSmrg  need_lib_prefix=no
3811629baa8cSmrg  need_version=no
3812629baa8cSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3813629baa8cSmrg  shlibpath_var=LD_LIBRARY_PATH
3814629baa8cSmrg  shlibpath_overrides_runpath=no
3815629baa8cSmrg  hardcode_into_libs=yes
3816629baa8cSmrg  ;;
3817629baa8cSmrg
3818629baa8cSmrguts4*)
3819629baa8cSmrg  version_type=linux
3820629baa8cSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3821629baa8cSmrg  soname_spec='${libname}${release}${shared_ext}$major'
3822629baa8cSmrg  shlibpath_var=LD_LIBRARY_PATH
3823629baa8cSmrg  ;;
3824629baa8cSmrg
3825629baa8cSmrg*)
3826629baa8cSmrg  dynamic_linker=no
3827629baa8cSmrg  ;;
3828629baa8cSmrgesac
3829629baa8cSmrgAC_MSG_RESULT([$dynamic_linker])
3830629baa8cSmrgtest "$dynamic_linker" = no && can_build_shared=no
3831629baa8cSmrg
3832629baa8cSmrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var"
3833629baa8cSmrgif test "$GCC" = yes; then
3834629baa8cSmrg  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
3835629baa8cSmrgfi
3836629baa8cSmrg
3837629baa8cSmrgif test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
3838629baa8cSmrg  sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
3839629baa8cSmrgfi
3840629baa8cSmrgif test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
3841629baa8cSmrg  sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
3842629baa8cSmrgfi
3843629baa8cSmrg
3844629baa8cSmrg_LT_DECL([], [variables_saved_for_relink], [1],
3845629baa8cSmrg    [Variables whose values should be saved in libtool wrapper scripts and
3846629baa8cSmrg    restored at link time])
3847629baa8cSmrg_LT_DECL([], [need_lib_prefix], [0],
3848629baa8cSmrg    [Do we need the "lib" prefix for modules?])
3849629baa8cSmrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
3850629baa8cSmrg_LT_DECL([], [version_type], [0], [Library versioning type])
3851629baa8cSmrg_LT_DECL([], [runpath_var], [0],  [Shared library runtime path variable])
3852629baa8cSmrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
3853629baa8cSmrg_LT_DECL([], [shlibpath_overrides_runpath], [0],
3854629baa8cSmrg    [Is shlibpath searched before the hard-coded library search path?])
3855629baa8cSmrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix])
3856629baa8cSmrg_LT_DECL([], [library_names_spec], [1],
3857629baa8cSmrg    [[List of archive names.  First name is the real one, the rest are links.
3858629baa8cSmrg    The last name is the one that the linker finds with -lNAME]])
3859629baa8cSmrg_LT_DECL([], [soname_spec], [1],
3860629baa8cSmrg    [[The coded name of the library, if different from the real name]])
3861629baa8cSmrg_LT_DECL([], [install_override_mode], [1],
3862629baa8cSmrg    [Permission mode override for installation of shared libraries])
3863629baa8cSmrg_LT_DECL([], [postinstall_cmds], [2],
3864629baa8cSmrg    [Command to use after installation of a shared archive])
3865629baa8cSmrg_LT_DECL([], [postuninstall_cmds], [2],
3866629baa8cSmrg    [Command to use after uninstallation of a shared archive])
3867629baa8cSmrg_LT_DECL([], [finish_cmds], [2],
3868629baa8cSmrg    [Commands used to finish a libtool library installation in a directory])
3869629baa8cSmrg_LT_DECL([], [finish_eval], [1],
3870629baa8cSmrg    [[As "finish_cmds", except a single script fragment to be evaled but
3871629baa8cSmrg    not shown]])
3872629baa8cSmrg_LT_DECL([], [hardcode_into_libs], [0],
3873629baa8cSmrg    [Whether we should hardcode library paths into libraries])
3874629baa8cSmrg_LT_DECL([], [sys_lib_search_path_spec], [2],
3875629baa8cSmrg    [Compile-time system search path for libraries])
3876629baa8cSmrg_LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
3877629baa8cSmrg    [Run-time system search path for libraries])
3878629baa8cSmrg])# _LT_SYS_DYNAMIC_LINKER
3879629baa8cSmrg
3880629baa8cSmrg
3881629baa8cSmrg# _LT_PATH_TOOL_PREFIX(TOOL)
3882629baa8cSmrg# --------------------------
3883629baa8cSmrg# find a file program which can recognize shared library
3884629baa8cSmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX],
3885629baa8cSmrg[m4_require([_LT_DECL_EGREP])dnl
3886629baa8cSmrgAC_MSG_CHECKING([for $1])
3887629baa8cSmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
3888629baa8cSmrg[case $MAGIC_CMD in
3889629baa8cSmrg[[\\/*] |  ?:[\\/]*])
3890629baa8cSmrg  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
3891629baa8cSmrg  ;;
3892629baa8cSmrg*)
3893629baa8cSmrg  lt_save_MAGIC_CMD="$MAGIC_CMD"
3894629baa8cSmrg  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3895629baa8cSmrgdnl $ac_dummy forces splitting on constant user-supplied paths.
3896629baa8cSmrgdnl POSIX.2 word splitting is done only on the output of word expansions,
3897629baa8cSmrgdnl not every word.  This closes a longstanding sh security hole.
3898629baa8cSmrg  ac_dummy="m4_if([$2], , $PATH, [$2])"
3899629baa8cSmrg  for ac_dir in $ac_dummy; do
3900629baa8cSmrg    IFS="$lt_save_ifs"
3901629baa8cSmrg    test -z "$ac_dir" && ac_dir=.
3902629baa8cSmrg    if test -f $ac_dir/$1; then
3903629baa8cSmrg      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
3904629baa8cSmrg      if test -n "$file_magic_test_file"; then
3905629baa8cSmrg	case $deplibs_check_method in
3906629baa8cSmrg	"file_magic "*)
3907629baa8cSmrg	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
3908629baa8cSmrg	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3909629baa8cSmrg	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
3910629baa8cSmrg	    $EGREP "$file_magic_regex" > /dev/null; then
3911629baa8cSmrg	    :
3912629baa8cSmrg	  else
3913629baa8cSmrg	    cat <<_LT_EOF 1>&2
3914629baa8cSmrg
3915629baa8cSmrg*** Warning: the command libtool uses to detect shared libraries,
3916629baa8cSmrg*** $file_magic_cmd, produces output that libtool cannot recognize.
3917629baa8cSmrg*** The result is that libtool may fail to recognize shared libraries
3918629baa8cSmrg*** as such.  This will affect the creation of libtool libraries that
3919629baa8cSmrg*** depend on shared libraries, but programs linked with such libtool
3920629baa8cSmrg*** libraries will work regardless of this problem.  Nevertheless, you
3921629baa8cSmrg*** may want to report the problem to your system manager and/or to
3922629baa8cSmrg*** bug-libtool@gnu.org
3923629baa8cSmrg
3924629baa8cSmrg_LT_EOF
3925629baa8cSmrg	  fi ;;
3926629baa8cSmrg	esac
3927629baa8cSmrg      fi
3928629baa8cSmrg      break
3929629baa8cSmrg    fi
3930629baa8cSmrg  done
3931629baa8cSmrg  IFS="$lt_save_ifs"
3932629baa8cSmrg  MAGIC_CMD="$lt_save_MAGIC_CMD"
3933629baa8cSmrg  ;;
3934629baa8cSmrgesac])
3935629baa8cSmrgMAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3936629baa8cSmrgif test -n "$MAGIC_CMD"; then
3937629baa8cSmrg  AC_MSG_RESULT($MAGIC_CMD)
3938629baa8cSmrgelse
3939629baa8cSmrg  AC_MSG_RESULT(no)
3940629baa8cSmrgfi
3941629baa8cSmrg_LT_DECL([], [MAGIC_CMD], [0],
3942629baa8cSmrg	 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
3943629baa8cSmrg])# _LT_PATH_TOOL_PREFIX
3944629baa8cSmrg
3945629baa8cSmrg# Old name:
3946629baa8cSmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
3947629baa8cSmrgdnl aclocal-1.4 backwards compatibility:
3948629baa8cSmrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
3949629baa8cSmrg
3950629baa8cSmrg
3951629baa8cSmrg# _LT_PATH_MAGIC
3952629baa8cSmrg# --------------
3953629baa8cSmrg# find a file program which can recognize a shared library
3954629baa8cSmrgm4_defun([_LT_PATH_MAGIC],
3955629baa8cSmrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
3956629baa8cSmrgif test -z "$lt_cv_path_MAGIC_CMD"; then
3957629baa8cSmrg  if test -n "$ac_tool_prefix"; then
3958629baa8cSmrg    _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
3959629baa8cSmrg  else
3960629baa8cSmrg    MAGIC_CMD=:
3961629baa8cSmrg  fi
3962629baa8cSmrgfi
3963629baa8cSmrg])# _LT_PATH_MAGIC
3964629baa8cSmrg
3965629baa8cSmrg
3966629baa8cSmrg# LT_PATH_LD
3967629baa8cSmrg# ----------
3968629baa8cSmrg# find the pathname to the GNU or non-GNU linker
3969629baa8cSmrgAC_DEFUN([LT_PATH_LD],
3970629baa8cSmrg[AC_REQUIRE([AC_PROG_CC])dnl
3971629baa8cSmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl
3972629baa8cSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl
3973629baa8cSmrgm4_require([_LT_DECL_SED])dnl
3974629baa8cSmrgm4_require([_LT_DECL_EGREP])dnl
3975629baa8cSmrgm4_require([_LT_PROG_ECHO_BACKSLASH])dnl
3976629baa8cSmrg
3977629baa8cSmrgAC_ARG_WITH([gnu-ld],
3978629baa8cSmrg    [AS_HELP_STRING([--with-gnu-ld],
3979629baa8cSmrg	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
3980629baa8cSmrg    [test "$withval" = no || with_gnu_ld=yes],
3981629baa8cSmrg    [with_gnu_ld=no])dnl
3982629baa8cSmrg
3983629baa8cSmrgac_prog=ld
3984629baa8cSmrgif test "$GCC" = yes; then
3985629baa8cSmrg  # Check if gcc -print-prog-name=ld gives a path.
3986629baa8cSmrg  AC_MSG_CHECKING([for ld used by $CC])
3987629baa8cSmrg  case $host in
3988629baa8cSmrg  *-*-mingw*)
3989629baa8cSmrg    # gcc leaves a trailing carriage return which upsets mingw
3990629baa8cSmrg    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3991629baa8cSmrg  *)
3992629baa8cSmrg    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3993629baa8cSmrg  esac
3994629baa8cSmrg  case $ac_prog in
3995629baa8cSmrg    # Accept absolute paths.
3996629baa8cSmrg    [[\\/]]* | ?:[[\\/]]*)
3997629baa8cSmrg      re_direlt='/[[^/]][[^/]]*/\.\./'
3998629baa8cSmrg      # Canonicalize the pathname of ld
3999629baa8cSmrg      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
4000629baa8cSmrg      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
4001629baa8cSmrg	ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
4002629baa8cSmrg      done
4003629baa8cSmrg      test -z "$LD" && LD="$ac_prog"
4004629baa8cSmrg      ;;
4005629baa8cSmrg  "")
4006629baa8cSmrg    # If it fails, then pretend we aren't using GCC.
4007629baa8cSmrg    ac_prog=ld
4008629baa8cSmrg    ;;
4009629baa8cSmrg  *)
4010629baa8cSmrg    # If it is relative, then search for the first ld in PATH.
4011629baa8cSmrg    with_gnu_ld=unknown
4012629baa8cSmrg    ;;
4013629baa8cSmrg  esac
4014629baa8cSmrgelif test "$with_gnu_ld" = yes; then
4015629baa8cSmrg  AC_MSG_CHECKING([for GNU ld])
4016629baa8cSmrgelse
4017629baa8cSmrg  AC_MSG_CHECKING([for non-GNU ld])
4018629baa8cSmrgfi
4019629baa8cSmrgAC_CACHE_VAL(lt_cv_path_LD,
4020629baa8cSmrg[if test -z "$LD"; then
4021629baa8cSmrg  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4022629baa8cSmrg  for ac_dir in $PATH; do
4023629baa8cSmrg    IFS="$lt_save_ifs"
4024629baa8cSmrg    test -z "$ac_dir" && ac_dir=.
4025629baa8cSmrg    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
4026629baa8cSmrg      lt_cv_path_LD="$ac_dir/$ac_prog"
4027629baa8cSmrg      # Check to see if the program is GNU ld.  I'd rather use --version,
4028629baa8cSmrg      # but apparently some variants of GNU ld only accept -v.
4029629baa8cSmrg      # Break only if it was the GNU/non-GNU ld that we prefer.
4030629baa8cSmrg      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
4031629baa8cSmrg      *GNU* | *'with BFD'*)
4032629baa8cSmrg	test "$with_gnu_ld" != no && break
4033629baa8cSmrg	;;
4034629baa8cSmrg      *)
4035629baa8cSmrg	test "$with_gnu_ld" != yes && break
4036629baa8cSmrg	;;
4037629baa8cSmrg      esac
4038629baa8cSmrg    fi
4039629baa8cSmrg  done
4040629baa8cSmrg  IFS="$lt_save_ifs"
4041629baa8cSmrgelse
4042629baa8cSmrg  lt_cv_path_LD="$LD" # Let the user override the test with a path.
4043629baa8cSmrgfi])
4044629baa8cSmrgLD="$lt_cv_path_LD"
4045629baa8cSmrgif test -n "$LD"; then
4046629baa8cSmrg  AC_MSG_RESULT($LD)
4047629baa8cSmrgelse
4048629baa8cSmrg  AC_MSG_RESULT(no)
4049629baa8cSmrgfi
4050629baa8cSmrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
4051629baa8cSmrg_LT_PATH_LD_GNU
4052629baa8cSmrgAC_SUBST([LD])
4053629baa8cSmrg
4054629baa8cSmrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
4055629baa8cSmrg])# LT_PATH_LD
4056629baa8cSmrg
4057629baa8cSmrg# Old names:
4058629baa8cSmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
4059629baa8cSmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
4060629baa8cSmrgdnl aclocal-1.4 backwards compatibility:
4061629baa8cSmrgdnl AC_DEFUN([AM_PROG_LD], [])
4062629baa8cSmrgdnl AC_DEFUN([AC_PROG_LD], [])
4063629baa8cSmrg
4064629baa8cSmrg
4065629baa8cSmrg# _LT_PATH_LD_GNU
4066629baa8cSmrg#- --------------
4067629baa8cSmrgm4_defun([_LT_PATH_LD_GNU],
4068629baa8cSmrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
4069629baa8cSmrg[# I'd rather use --version here, but apparently some GNU lds only accept -v.
4070629baa8cSmrgcase `$LD -v 2>&1 </dev/null` in
4071629baa8cSmrg*GNU* | *'with BFD'*)
4072629baa8cSmrg  lt_cv_prog_gnu_ld=yes
4073629baa8cSmrg  ;;
4074629baa8cSmrg*)
4075629baa8cSmrg  lt_cv_prog_gnu_ld=no
4076629baa8cSmrg  ;;
4077629baa8cSmrgesac])
4078629baa8cSmrgwith_gnu_ld=$lt_cv_prog_gnu_ld
4079629baa8cSmrg])# _LT_PATH_LD_GNU
4080629baa8cSmrg
4081629baa8cSmrg
4082629baa8cSmrg# _LT_CMD_RELOAD
4083629baa8cSmrg# --------------
4084629baa8cSmrg# find reload flag for linker
4085629baa8cSmrg#   -- PORTME Some linkers may need a different reload flag.
4086629baa8cSmrgm4_defun([_LT_CMD_RELOAD],
4087629baa8cSmrg[AC_CACHE_CHECK([for $LD option to reload object files],
4088629baa8cSmrg  lt_cv_ld_reload_flag,
4089629baa8cSmrg  [lt_cv_ld_reload_flag='-r'])
4090629baa8cSmrgreload_flag=$lt_cv_ld_reload_flag
4091629baa8cSmrgcase $reload_flag in
4092629baa8cSmrg"" | " "*) ;;
4093629baa8cSmrg*) reload_flag=" $reload_flag" ;;
4094629baa8cSmrgesac
4095629baa8cSmrgreload_cmds='$LD$reload_flag -o $output$reload_objs'
4096629baa8cSmrgcase $host_os in
4097629baa8cSmrg  cygwin* | mingw* | pw32* | cegcc*)
4098629baa8cSmrg    if test "$GCC" != yes; then
4099629baa8cSmrg      reload_cmds=false
4100629baa8cSmrg    fi
4101629baa8cSmrg    ;;
4102629baa8cSmrg  darwin*)
4103629baa8cSmrg    if test "$GCC" = yes; then
4104629baa8cSmrg      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
4105629baa8cSmrg    else
4106629baa8cSmrg      reload_cmds='$LD$reload_flag -o $output$reload_objs'
4107629baa8cSmrg    fi
4108629baa8cSmrg    ;;
4109629baa8cSmrgesac
4110629baa8cSmrg_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
4111629baa8cSmrg_LT_TAGDECL([], [reload_cmds], [2])dnl
4112629baa8cSmrg])# _LT_CMD_RELOAD
4113629baa8cSmrg
4114629baa8cSmrg
4115629baa8cSmrg# _LT_CHECK_MAGIC_METHOD
4116629baa8cSmrg# ----------------------
4117629baa8cSmrg# how to check for library dependencies
4118629baa8cSmrg#  -- PORTME fill in with the dynamic library characteristics
4119629baa8cSmrgm4_defun([_LT_CHECK_MAGIC_METHOD],
4120629baa8cSmrg[m4_require([_LT_DECL_EGREP])
4121629baa8cSmrgm4_require([_LT_DECL_OBJDUMP])
4122629baa8cSmrgAC_CACHE_CHECK([how to recognize dependent libraries],
4123629baa8cSmrglt_cv_deplibs_check_method,
4124629baa8cSmrg[lt_cv_file_magic_cmd='$MAGIC_CMD'
4125629baa8cSmrglt_cv_file_magic_test_file=
4126629baa8cSmrglt_cv_deplibs_check_method='unknown'
4127629baa8cSmrg# Need to set the preceding variable on all platforms that support
4128629baa8cSmrg# interlibrary dependencies.
4129629baa8cSmrg# 'none' -- dependencies not supported.
4130629baa8cSmrg# `unknown' -- same as none, but documents that we really don't know.
4131629baa8cSmrg# 'pass_all' -- all dependencies passed with no checks.
4132629baa8cSmrg# 'test_compile' -- check by making test program.
4133629baa8cSmrg# 'file_magic [[regex]]' -- check by looking for files in library path
4134629baa8cSmrg# which responds to the $file_magic_cmd with a given extended regex.
4135629baa8cSmrg# If you have `file' or equivalent on your system and you're not sure
4136629baa8cSmrg# whether `pass_all' will *always* work, you probably want this one.
4137629baa8cSmrg
4138629baa8cSmrgcase $host_os in
4139629baa8cSmrgaix[[4-9]]*)
4140629baa8cSmrg  lt_cv_deplibs_check_method=pass_all
4141629baa8cSmrg  ;;
4142629baa8cSmrg
4143629baa8cSmrgbeos*)
4144629baa8cSmrg  lt_cv_deplibs_check_method=pass_all
4145629baa8cSmrg  ;;
4146629baa8cSmrg
4147629baa8cSmrgbsdi[[45]]*)
4148629baa8cSmrg  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
4149629baa8cSmrg  lt_cv_file_magic_cmd='/usr/bin/file -L'
4150629baa8cSmrg  lt_cv_file_magic_test_file=/shlib/libc.so
4151629baa8cSmrg  ;;
4152629baa8cSmrg
4153629baa8cSmrgcygwin*)
4154629baa8cSmrg  # func_win32_libid is a shell function defined in ltmain.sh
4155629baa8cSmrg  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
4156629baa8cSmrg  lt_cv_file_magic_cmd='func_win32_libid'
4157629baa8cSmrg  ;;
4158629baa8cSmrg
4159629baa8cSmrgmingw* | pw32*)
4160629baa8cSmrg  # Base MSYS/MinGW do not provide the 'file' command needed by
4161629baa8cSmrg  # func_win32_libid shell function, so use a weaker test based on 'objdump',
4162629baa8cSmrg  # unless we find 'file', for example because we are cross-compiling.
4163629baa8cSmrg  # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
4164629baa8cSmrg  if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
4165629baa8cSmrg    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
4166629baa8cSmrg    lt_cv_file_magic_cmd='func_win32_libid'
4167629baa8cSmrg  else
4168629baa8cSmrg    # Keep this pattern in sync with the one in func_win32_libid.
4169629baa8cSmrg    lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
4170629baa8cSmrg    lt_cv_file_magic_cmd='$OBJDUMP -f'
4171629baa8cSmrg  fi
4172629baa8cSmrg  ;;
4173629baa8cSmrg
4174629baa8cSmrgcegcc*)
4175629baa8cSmrg  # use the weaker test based on 'objdump'. See mingw*.
4176629baa8cSmrg  lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
4177629baa8cSmrg  lt_cv_file_magic_cmd='$OBJDUMP -f'
4178629baa8cSmrg  ;;
4179629baa8cSmrg
4180629baa8cSmrgdarwin* | rhapsody*)
4181629baa8cSmrg  lt_cv_deplibs_check_method=pass_all
4182629baa8cSmrg  ;;
4183629baa8cSmrg
4184629baa8cSmrgfreebsd* | dragonfly*)
4185629baa8cSmrg  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
4186629baa8cSmrg    case $host_cpu in
4187629baa8cSmrg    i*86 )
4188629baa8cSmrg      # Not sure whether the presence of OpenBSD here was a mistake.
4189629baa8cSmrg      # Let's accept both of them until this is cleared up.
4190629baa8cSmrg      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
4191629baa8cSmrg      lt_cv_file_magic_cmd=/usr/bin/file
4192629baa8cSmrg      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
4193629baa8cSmrg      ;;
4194629baa8cSmrg    esac
4195629baa8cSmrg  else
4196629baa8cSmrg    lt_cv_deplibs_check_method=pass_all
4197629baa8cSmrg  fi
4198629baa8cSmrg  ;;
4199629baa8cSmrg
4200629baa8cSmrggnu*)
4201629baa8cSmrg  lt_cv_deplibs_check_method=pass_all
4202629baa8cSmrg  ;;
4203629baa8cSmrg
4204629baa8cSmrghaiku*)
4205629baa8cSmrg  lt_cv_deplibs_check_method=pass_all
4206629baa8cSmrg  ;;
4207629baa8cSmrg
4208629baa8cSmrghpux10.20* | hpux11*)
4209629baa8cSmrg  lt_cv_file_magic_cmd=/usr/bin/file
4210629baa8cSmrg  case $host_cpu in
4211629baa8cSmrg  ia64*)
4212629baa8cSmrg    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
4213629baa8cSmrg    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
4214629baa8cSmrg    ;;
4215629baa8cSmrg  hppa*64*)
4216629baa8cSmrg    [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]']
4217629baa8cSmrg    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
4218629baa8cSmrg    ;;
4219629baa8cSmrg  *)
4220629baa8cSmrg    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
4221629baa8cSmrg    lt_cv_file_magic_test_file=/usr/lib/libc.sl
4222629baa8cSmrg    ;;
4223629baa8cSmrg  esac
4224629baa8cSmrg  ;;
4225629baa8cSmrg
4226629baa8cSmrginterix[[3-9]]*)
4227629baa8cSmrg  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
4228629baa8cSmrg  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
4229629baa8cSmrg  ;;
4230629baa8cSmrg
4231629baa8cSmrgirix5* | irix6* | nonstopux*)
4232629baa8cSmrg  case $LD in
4233629baa8cSmrg  *-32|*"-32 ") libmagic=32-bit;;
4234629baa8cSmrg  *-n32|*"-n32 ") libmagic=N32;;
4235629baa8cSmrg  *-64|*"-64 ") libmagic=64-bit;;
4236629baa8cSmrg  *) libmagic=never-match;;
4237629baa8cSmrg  esac
4238629baa8cSmrg  lt_cv_deplibs_check_method=pass_all
4239629baa8cSmrg  ;;
4240629baa8cSmrg
4241629baa8cSmrg# This must be Linux ELF.
4242629baa8cSmrglinux* | k*bsd*-gnu | kopensolaris*-gnu)
4243629baa8cSmrg  lt_cv_deplibs_check_method=pass_all
4244629baa8cSmrg  ;;
4245629baa8cSmrg
4246629baa8cSmrgnetbsd*)
4247629baa8cSmrg  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
4248629baa8cSmrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
4249629baa8cSmrg  else
4250629baa8cSmrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
4251629baa8cSmrg  fi
4252629baa8cSmrg  ;;
4253629baa8cSmrg
4254629baa8cSmrgnewos6*)
4255629baa8cSmrg  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
4256629baa8cSmrg  lt_cv_file_magic_cmd=/usr/bin/file
4257629baa8cSmrg  lt_cv_file_magic_test_file=/usr/lib/libnls.so
4258629baa8cSmrg  ;;
4259629baa8cSmrg
4260629baa8cSmrg*nto* | *qnx*)
4261629baa8cSmrg  lt_cv_deplibs_check_method=pass_all
4262629baa8cSmrg  ;;
4263629baa8cSmrg
4264629baa8cSmrgopenbsd*)
4265629baa8cSmrg  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
4266629baa8cSmrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
4267629baa8cSmrg  else
4268629baa8cSmrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
4269629baa8cSmrg  fi
4270629baa8cSmrg  ;;
4271629baa8cSmrg
4272629baa8cSmrgosf3* | osf4* | osf5*)
4273629baa8cSmrg  lt_cv_deplibs_check_method=pass_all
4274629baa8cSmrg  ;;
4275629baa8cSmrg
4276629baa8cSmrgrdos*)
4277629baa8cSmrg  lt_cv_deplibs_check_method=pass_all
4278629baa8cSmrg  ;;
4279629baa8cSmrg
4280629baa8cSmrgsolaris*)
4281629baa8cSmrg  lt_cv_deplibs_check_method=pass_all
4282629baa8cSmrg  ;;
4283629baa8cSmrg
4284629baa8cSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
4285629baa8cSmrg  lt_cv_deplibs_check_method=pass_all
4286629baa8cSmrg  ;;
4287629baa8cSmrg
4288629baa8cSmrgsysv4 | sysv4.3*)
4289629baa8cSmrg  case $host_vendor in
4290629baa8cSmrg  motorola)
4291629baa8cSmrg    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]]'
4292629baa8cSmrg    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
4293629baa8cSmrg    ;;
4294629baa8cSmrg  ncr)
4295629baa8cSmrg    lt_cv_deplibs_check_method=pass_all
4296629baa8cSmrg    ;;
4297629baa8cSmrg  sequent)
4298629baa8cSmrg    lt_cv_file_magic_cmd='/bin/file'
4299629baa8cSmrg    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
4300629baa8cSmrg    ;;
4301629baa8cSmrg  sni)
4302629baa8cSmrg    lt_cv_file_magic_cmd='/bin/file'
4303629baa8cSmrg    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
4304629baa8cSmrg    lt_cv_file_magic_test_file=/lib/libc.so
4305629baa8cSmrg    ;;
4306629baa8cSmrg  siemens)
4307629baa8cSmrg    lt_cv_deplibs_check_method=pass_all
4308629baa8cSmrg    ;;
4309629baa8cSmrg  pc)
4310629baa8cSmrg    lt_cv_deplibs_check_method=pass_all
4311629baa8cSmrg    ;;
4312629baa8cSmrg  esac
4313629baa8cSmrg  ;;
4314629baa8cSmrg
4315629baa8cSmrgtpf*)
4316629baa8cSmrg  lt_cv_deplibs_check_method=pass_all
4317629baa8cSmrg  ;;
4318629baa8cSmrgesac
4319629baa8cSmrg])
4320629baa8cSmrg
4321629baa8cSmrgfile_magic_glob=
4322629baa8cSmrgwant_nocaseglob=no
4323629baa8cSmrgif test "$build" = "$host"; then
4324629baa8cSmrg  case $host_os in
4325629baa8cSmrg  mingw* | pw32*)
4326629baa8cSmrg    if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
4327629baa8cSmrg      want_nocaseglob=yes
4328629baa8cSmrg    else
4329629baa8cSmrg      file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
4330629baa8cSmrg    fi
4331629baa8cSmrg    ;;
4332629baa8cSmrg  esac
4333629baa8cSmrgfi
4334629baa8cSmrg
4335629baa8cSmrgfile_magic_cmd=$lt_cv_file_magic_cmd
4336629baa8cSmrgdeplibs_check_method=$lt_cv_deplibs_check_method
4337629baa8cSmrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown
4338629baa8cSmrg
4339629baa8cSmrg_LT_DECL([], [deplibs_check_method], [1],
4340629baa8cSmrg    [Method to check whether dependent libraries are shared objects])
4341629baa8cSmrg_LT_DECL([], [file_magic_cmd], [1],
4342629baa8cSmrg    [Command to use when deplibs_check_method = "file_magic"])
4343629baa8cSmrg_LT_DECL([], [file_magic_glob], [1],
4344629baa8cSmrg    [How to find potential files when deplibs_check_method = "file_magic"])
4345629baa8cSmrg_LT_DECL([], [want_nocaseglob], [1],
4346629baa8cSmrg    [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
4347629baa8cSmrg])# _LT_CHECK_MAGIC_METHOD
4348629baa8cSmrg
4349629baa8cSmrg
4350629baa8cSmrg# LT_PATH_NM
4351629baa8cSmrg# ----------
4352629baa8cSmrg# find the pathname to a BSD- or MS-compatible name lister
4353629baa8cSmrgAC_DEFUN([LT_PATH_NM],
4354629baa8cSmrg[AC_REQUIRE([AC_PROG_CC])dnl
4355629baa8cSmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
4356629baa8cSmrg[if test -n "$NM"; then
4357629baa8cSmrg  # Let the user override the test.
4358629baa8cSmrg  lt_cv_path_NM="$NM"
4359629baa8cSmrgelse
4360629baa8cSmrg  lt_nm_to_check="${ac_tool_prefix}nm"
4361629baa8cSmrg  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
4362629baa8cSmrg    lt_nm_to_check="$lt_nm_to_check nm"
4363629baa8cSmrg  fi
4364629baa8cSmrg  for lt_tmp_nm in $lt_nm_to_check; do
4365629baa8cSmrg    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4366629baa8cSmrg    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
4367629baa8cSmrg      IFS="$lt_save_ifs"
4368629baa8cSmrg      test -z "$ac_dir" && ac_dir=.
4369629baa8cSmrg      tmp_nm="$ac_dir/$lt_tmp_nm"
4370629baa8cSmrg      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
4371629baa8cSmrg	# Check to see if the nm accepts a BSD-compat flag.
4372629baa8cSmrg	# Adding the `sed 1q' prevents false positives on HP-UX, which says:
4373629baa8cSmrg	#   nm: unknown option "B" ignored
4374629baa8cSmrg	# Tru64's nm complains that /dev/null is an invalid object file
4375629baa8cSmrg	case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
4376629baa8cSmrg	*/dev/null* | *'Invalid file or object type'*)
4377629baa8cSmrg	  lt_cv_path_NM="$tmp_nm -B"
4378629baa8cSmrg	  break
4379629baa8cSmrg	  ;;
4380629baa8cSmrg	*)
4381629baa8cSmrg	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
4382629baa8cSmrg	  */dev/null*)
4383629baa8cSmrg	    lt_cv_path_NM="$tmp_nm -p"
4384629baa8cSmrg	    break
4385629baa8cSmrg	    ;;
4386629baa8cSmrg	  *)
4387629baa8cSmrg	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
4388629baa8cSmrg	    continue # so that we can try to find one that supports BSD flags
4389629baa8cSmrg	    ;;
4390629baa8cSmrg	  esac
4391629baa8cSmrg	  ;;
4392629baa8cSmrg	esac
4393629baa8cSmrg      fi
4394629baa8cSmrg    done
4395629baa8cSmrg    IFS="$lt_save_ifs"
4396629baa8cSmrg  done
4397629baa8cSmrg  : ${lt_cv_path_NM=no}
4398629baa8cSmrgfi])
4399629baa8cSmrgif test "$lt_cv_path_NM" != "no"; then
4400629baa8cSmrg  NM="$lt_cv_path_NM"
4401629baa8cSmrgelse
4402629baa8cSmrg  # Didn't find any BSD compatible name lister, look for dumpbin.
4403629baa8cSmrg  if test -n "$DUMPBIN"; then :
4404629baa8cSmrg    # Let the user override the test.
4405629baa8cSmrg  else
4406629baa8cSmrg    AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
4407629baa8cSmrg    case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
4408629baa8cSmrg    *COFF*)
4409629baa8cSmrg      DUMPBIN="$DUMPBIN -symbols"
4410629baa8cSmrg      ;;
4411629baa8cSmrg    *)
4412629baa8cSmrg      DUMPBIN=:
4413629baa8cSmrg      ;;
4414629baa8cSmrg    esac
4415629baa8cSmrg  fi
4416629baa8cSmrg  AC_SUBST([DUMPBIN])
4417629baa8cSmrg  if test "$DUMPBIN" != ":"; then
4418629baa8cSmrg    NM="$DUMPBIN"
4419629baa8cSmrg  fi
4420629baa8cSmrgfi
4421629baa8cSmrgtest -z "$NM" && NM=nm
4422629baa8cSmrgAC_SUBST([NM])
4423629baa8cSmrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
4424629baa8cSmrg
4425629baa8cSmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
4426629baa8cSmrg  [lt_cv_nm_interface="BSD nm"
4427629baa8cSmrg  echo "int some_variable = 0;" > conftest.$ac_ext
4428629baa8cSmrg  (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
4429629baa8cSmrg  (eval "$ac_compile" 2>conftest.err)
4430629baa8cSmrg  cat conftest.err >&AS_MESSAGE_LOG_FD
4431629baa8cSmrg  (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
4432629baa8cSmrg  (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
4433629baa8cSmrg  cat conftest.err >&AS_MESSAGE_LOG_FD
4434629baa8cSmrg  (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
4435629baa8cSmrg  cat conftest.out >&AS_MESSAGE_LOG_FD
4436629baa8cSmrg  if $GREP 'External.*some_variable' conftest.out > /dev/null; then
4437629baa8cSmrg    lt_cv_nm_interface="MS dumpbin"
4438629baa8cSmrg  fi
4439629baa8cSmrg  rm -f conftest*])
4440629baa8cSmrg])# LT_PATH_NM
4441629baa8cSmrg
4442629baa8cSmrg# Old names:
4443629baa8cSmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
4444629baa8cSmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
4445629baa8cSmrgdnl aclocal-1.4 backwards compatibility:
4446629baa8cSmrgdnl AC_DEFUN([AM_PROG_NM], [])
4447629baa8cSmrgdnl AC_DEFUN([AC_PROG_NM], [])
4448629baa8cSmrg
4449629baa8cSmrg# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
4450629baa8cSmrg# --------------------------------
4451629baa8cSmrg# how to determine the name of the shared library
4452629baa8cSmrg# associated with a specific link library.
4453629baa8cSmrg#  -- PORTME fill in with the dynamic library characteristics
4454629baa8cSmrgm4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
4455629baa8cSmrg[m4_require([_LT_DECL_EGREP])
4456629baa8cSmrgm4_require([_LT_DECL_OBJDUMP])
4457629baa8cSmrgm4_require([_LT_DECL_DLLTOOL])
4458629baa8cSmrgAC_CACHE_CHECK([how to associate runtime and link libraries],
4459629baa8cSmrglt_cv_sharedlib_from_linklib_cmd,
4460629baa8cSmrg[lt_cv_sharedlib_from_linklib_cmd='unknown'
4461629baa8cSmrg
4462629baa8cSmrgcase $host_os in
4463629baa8cSmrgcygwin* | mingw* | pw32* | cegcc*)
4464629baa8cSmrg  # two different shell functions defined in ltmain.sh
4465629baa8cSmrg  # decide which to use based on capabilities of $DLLTOOL
4466629baa8cSmrg  case `$DLLTOOL --help 2>&1` in
4467629baa8cSmrg  *--identify-strict*)
4468629baa8cSmrg    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
4469629baa8cSmrg    ;;
4470629baa8cSmrg  *)
4471629baa8cSmrg    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
4472629baa8cSmrg    ;;
4473629baa8cSmrg  esac
4474629baa8cSmrg  ;;
4475629baa8cSmrg*)
4476629baa8cSmrg  # fallback: assume linklib IS sharedlib
4477629baa8cSmrg  lt_cv_sharedlib_from_linklib_cmd="$ECHO"
4478629baa8cSmrg  ;;
4479629baa8cSmrgesac
4480629baa8cSmrg])
4481629baa8cSmrgsharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
4482629baa8cSmrgtest -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
4483629baa8cSmrg
4484629baa8cSmrg_LT_DECL([], [sharedlib_from_linklib_cmd], [1],
4485629baa8cSmrg    [Command to associate shared and link libraries])
4486629baa8cSmrg])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
4487629baa8cSmrg
4488629baa8cSmrg
4489629baa8cSmrg# _LT_PATH_MANIFEST_TOOL
4490629baa8cSmrg# ----------------------
4491629baa8cSmrg# locate the manifest tool
4492629baa8cSmrgm4_defun([_LT_PATH_MANIFEST_TOOL],
4493629baa8cSmrg[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
4494629baa8cSmrgtest -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
4495629baa8cSmrgAC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
4496629baa8cSmrg  [lt_cv_path_mainfest_tool=no
4497629baa8cSmrg  echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
4498629baa8cSmrg  $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
4499629baa8cSmrg  cat conftest.err >&AS_MESSAGE_LOG_FD
4500629baa8cSmrg  if $GREP 'Manifest Tool' conftest.out > /dev/null; then
4501629baa8cSmrg    lt_cv_path_mainfest_tool=yes
4502629baa8cSmrg  fi
4503629baa8cSmrg  rm -f conftest*])
4504629baa8cSmrgif test "x$lt_cv_path_mainfest_tool" != xyes; then
4505629baa8cSmrg  MANIFEST_TOOL=:
4506629baa8cSmrgfi
4507629baa8cSmrg_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
4508629baa8cSmrg])# _LT_PATH_MANIFEST_TOOL
4509629baa8cSmrg
4510629baa8cSmrg
4511629baa8cSmrg# LT_LIB_M
4512629baa8cSmrg# --------
4513629baa8cSmrg# check for math library
4514629baa8cSmrgAC_DEFUN([LT_LIB_M],
4515629baa8cSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
4516629baa8cSmrgLIBM=
4517629baa8cSmrgcase $host in
4518629baa8cSmrg*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
4519629baa8cSmrg  # These system don't have libm, or don't need it
4520629baa8cSmrg  ;;
4521629baa8cSmrg*-ncr-sysv4.3*)
4522629baa8cSmrg  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
4523629baa8cSmrg  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
4524629baa8cSmrg  ;;
4525629baa8cSmrg*)
4526629baa8cSmrg  AC_CHECK_LIB(m, cos, LIBM="-lm")
4527629baa8cSmrg  ;;
4528629baa8cSmrgesac
4529629baa8cSmrgAC_SUBST([LIBM])
4530629baa8cSmrg])# LT_LIB_M
4531629baa8cSmrg
4532629baa8cSmrg# Old name:
4533629baa8cSmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
4534629baa8cSmrgdnl aclocal-1.4 backwards compatibility:
4535629baa8cSmrgdnl AC_DEFUN([AC_CHECK_LIBM], [])
4536629baa8cSmrg
4537629baa8cSmrg
4538629baa8cSmrg# _LT_COMPILER_NO_RTTI([TAGNAME])
4539629baa8cSmrg# -------------------------------
4540629baa8cSmrgm4_defun([_LT_COMPILER_NO_RTTI],
4541629baa8cSmrg[m4_require([_LT_TAG_COMPILER])dnl
4542629baa8cSmrg
4543629baa8cSmrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
4544629baa8cSmrg
4545629baa8cSmrgif test "$GCC" = yes; then
4546629baa8cSmrg  case $cc_basename in
4547629baa8cSmrg  nvcc*)
4548629baa8cSmrg    _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
4549629baa8cSmrg  *)
4550629baa8cSmrg    _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
4551629baa8cSmrg  esac
4552629baa8cSmrg
4553629baa8cSmrg  _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
4554629baa8cSmrg    lt_cv_prog_compiler_rtti_exceptions,
4555629baa8cSmrg    [-fno-rtti -fno-exceptions], [],
4556629baa8cSmrg    [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
4557629baa8cSmrgfi
4558629baa8cSmrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
4559629baa8cSmrg	[Compiler flag to turn off builtin functions])
4560629baa8cSmrg])# _LT_COMPILER_NO_RTTI
4561629baa8cSmrg
4562629baa8cSmrg
4563629baa8cSmrg# _LT_CMD_GLOBAL_SYMBOLS
4564629baa8cSmrg# ----------------------
4565629baa8cSmrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS],
4566629baa8cSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
4567629baa8cSmrgAC_REQUIRE([AC_PROG_CC])dnl
4568629baa8cSmrgAC_REQUIRE([AC_PROG_AWK])dnl
4569629baa8cSmrgAC_REQUIRE([LT_PATH_NM])dnl
4570629baa8cSmrgAC_REQUIRE([LT_PATH_LD])dnl
4571629baa8cSmrgm4_require([_LT_DECL_SED])dnl
4572629baa8cSmrgm4_require([_LT_DECL_EGREP])dnl
4573629baa8cSmrgm4_require([_LT_TAG_COMPILER])dnl
4574629baa8cSmrg
4575629baa8cSmrg# Check for command to grab the raw symbol name followed by C symbol from nm.
4576629baa8cSmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object])
4577629baa8cSmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
4578629baa8cSmrg[
4579629baa8cSmrg# These are sane defaults that work on at least a few old systems.
4580629baa8cSmrg# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
4581629baa8cSmrg
4582629baa8cSmrg# Character class describing NM global symbol codes.
4583629baa8cSmrgsymcode='[[BCDEGRST]]'
4584629baa8cSmrg
4585629baa8cSmrg# Regexp to match symbols that can be accessed directly from C.
4586629baa8cSmrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
4587629baa8cSmrg
4588629baa8cSmrg# Define system-specific variables.
4589629baa8cSmrgcase $host_os in
4590629baa8cSmrgaix*)
4591629baa8cSmrg  symcode='[[BCDT]]'
4592629baa8cSmrg  ;;
4593629baa8cSmrgcygwin* | mingw* | pw32* | cegcc*)
4594629baa8cSmrg  symcode='[[ABCDGISTW]]'
4595629baa8cSmrg  ;;
4596629baa8cSmrghpux*)
4597629baa8cSmrg  if test "$host_cpu" = ia64; then
4598629baa8cSmrg    symcode='[[ABCDEGRST]]'
4599629baa8cSmrg  fi
4600629baa8cSmrg  ;;
4601629baa8cSmrgirix* | nonstopux*)
4602629baa8cSmrg  symcode='[[BCDEGRST]]'
4603629baa8cSmrg  ;;
4604629baa8cSmrgosf*)
4605629baa8cSmrg  symcode='[[BCDEGQRST]]'
4606629baa8cSmrg  ;;
4607629baa8cSmrgsolaris*)
4608629baa8cSmrg  symcode='[[BDRT]]'
4609629baa8cSmrg  ;;
4610629baa8cSmrgsco3.2v5*)
4611629baa8cSmrg  symcode='[[DT]]'
4612629baa8cSmrg  ;;
4613629baa8cSmrgsysv4.2uw2*)
4614629baa8cSmrg  symcode='[[DT]]'
4615629baa8cSmrg  ;;
4616629baa8cSmrgsysv5* | sco5v6* | unixware* | OpenUNIX*)
4617629baa8cSmrg  symcode='[[ABDT]]'
4618629baa8cSmrg  ;;
4619629baa8cSmrgsysv4)
4620629baa8cSmrg  symcode='[[DFNSTU]]'
4621629baa8cSmrg  ;;
4622629baa8cSmrgesac
4623629baa8cSmrg
4624629baa8cSmrg# If we're using GNU nm, then use its standard symbol codes.
4625629baa8cSmrgcase `$NM -V 2>&1` in
4626629baa8cSmrg*GNU* | *'with BFD'*)
4627629baa8cSmrg  symcode='[[ABCDGIRSTW]]' ;;
4628629baa8cSmrgesac
4629629baa8cSmrg
4630629baa8cSmrg# Transform an extracted symbol line into a proper C declaration.
4631629baa8cSmrg# Some systems (esp. on ia64) link data and code symbols differently,
4632629baa8cSmrg# so use this general approach.
4633629baa8cSmrglt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4634629baa8cSmrg
4635629baa8cSmrg# Transform an extracted symbol line into symbol name and symbol address
4636629baa8cSmrglt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p'"
4637629baa8cSmrglt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"lib\2\", (void *) \&\2},/p'"
4638629baa8cSmrg
4639629baa8cSmrg# Handle CRLF in mingw tool chain
4640629baa8cSmrgopt_cr=
4641629baa8cSmrgcase $build_os in
4642629baa8cSmrgmingw*)
4643629baa8cSmrg  opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
4644629baa8cSmrg  ;;
4645629baa8cSmrgesac
4646629baa8cSmrg
4647629baa8cSmrg# Try without a prefix underscore, then with it.
4648629baa8cSmrgfor ac_symprfx in "" "_"; do
4649629baa8cSmrg
4650629baa8cSmrg  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
4651629baa8cSmrg  symxfrm="\\1 $ac_symprfx\\2 \\2"
4652629baa8cSmrg
4653629baa8cSmrg  # Write the raw and C identifiers.
4654629baa8cSmrg  if test "$lt_cv_nm_interface" = "MS dumpbin"; then
4655629baa8cSmrg    # Fake it for dumpbin and say T for any non-static function
4656629baa8cSmrg    # and D for any global variable.
4657629baa8cSmrg    # Also find C++ and __fastcall symbols from MSVC++,
4658629baa8cSmrg    # which start with @ or ?.
4659629baa8cSmrg    lt_cv_sys_global_symbol_pipe="$AWK ['"\
4660629baa8cSmrg"     {last_section=section; section=\$ 3};"\
4661629baa8cSmrg"     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
4662629baa8cSmrg"     \$ 0!~/External *\|/{next};"\
4663629baa8cSmrg"     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
4664629baa8cSmrg"     {if(hide[section]) next};"\
4665629baa8cSmrg"     {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
4666629baa8cSmrg"     {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
4667629baa8cSmrg"     s[1]~/^[@?]/{print s[1], s[1]; next};"\
4668629baa8cSmrg"     s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
4669629baa8cSmrg"     ' prfx=^$ac_symprfx]"
4670629baa8cSmrg  else
4671629baa8cSmrg    lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[	 ]]\($symcode$symcode*\)[[	 ]][[	 ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
4672629baa8cSmrg  fi
4673629baa8cSmrg  lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
4674629baa8cSmrg
4675629baa8cSmrg  # Check to see that the pipe works correctly.
4676629baa8cSmrg  pipe_works=no
4677629baa8cSmrg
4678629baa8cSmrg  rm -f conftest*
4679629baa8cSmrg  cat > conftest.$ac_ext <<_LT_EOF
4680629baa8cSmrg#ifdef __cplusplus
4681629baa8cSmrgextern "C" {
4682629baa8cSmrg#endif
4683629baa8cSmrgchar nm_test_var;
4684629baa8cSmrgvoid nm_test_func(void);
4685629baa8cSmrgvoid nm_test_func(void){}
4686629baa8cSmrg#ifdef __cplusplus
4687629baa8cSmrg}
4688629baa8cSmrg#endif
4689629baa8cSmrgint main(){nm_test_var='a';nm_test_func();return(0);}
4690629baa8cSmrg_LT_EOF
4691629baa8cSmrg
4692629baa8cSmrg  if AC_TRY_EVAL(ac_compile); then
4693629baa8cSmrg    # Now try to grab the symbols.
4694629baa8cSmrg    nlist=conftest.nm
4695629baa8cSmrg    if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
4696629baa8cSmrg      # Try sorting and uniquifying the output.
4697629baa8cSmrg      if sort "$nlist" | uniq > "$nlist"T; then
4698629baa8cSmrg	mv -f "$nlist"T "$nlist"
4699629baa8cSmrg      else
4700629baa8cSmrg	rm -f "$nlist"T
4701629baa8cSmrg      fi
4702629baa8cSmrg
4703629baa8cSmrg      # Make sure that we snagged all the symbols we need.
4704629baa8cSmrg      if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
4705629baa8cSmrg	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
4706629baa8cSmrg	  cat <<_LT_EOF > conftest.$ac_ext
4707629baa8cSmrg/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
4708629baa8cSmrg#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
4709629baa8cSmrg/* DATA imports from DLLs on WIN32 con't be const, because runtime
4710629baa8cSmrg   relocations are performed -- see ld's documentation on pseudo-relocs.  */
4711629baa8cSmrg# define LT@&t@_DLSYM_CONST
4712629baa8cSmrg#elif defined(__osf__)
4713629baa8cSmrg/* This system does not cope well with relocations in const data.  */
4714629baa8cSmrg# define LT@&t@_DLSYM_CONST
4715629baa8cSmrg#else
4716629baa8cSmrg# define LT@&t@_DLSYM_CONST const
4717629baa8cSmrg#endif
4718629baa8cSmrg
4719629baa8cSmrg#ifdef __cplusplus
4720629baa8cSmrgextern "C" {
4721629baa8cSmrg#endif
4722629baa8cSmrg
4723629baa8cSmrg_LT_EOF
4724629baa8cSmrg	  # Now generate the symbol file.
4725629baa8cSmrg	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
4726629baa8cSmrg
4727629baa8cSmrg	  cat <<_LT_EOF >> conftest.$ac_ext
4728629baa8cSmrg
4729629baa8cSmrg/* The mapping between symbol names and symbols.  */
4730629baa8cSmrgLT@&t@_DLSYM_CONST struct {
4731629baa8cSmrg  const char *name;
4732629baa8cSmrg  void       *address;
4733629baa8cSmrg}
4734629baa8cSmrglt__PROGRAM__LTX_preloaded_symbols[[]] =
4735629baa8cSmrg{
4736629baa8cSmrg  { "@PROGRAM@", (void *) 0 },
4737629baa8cSmrg_LT_EOF
4738629baa8cSmrg	  $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
4739629baa8cSmrg	  cat <<\_LT_EOF >> conftest.$ac_ext
4740629baa8cSmrg  {0, (void *) 0}
4741629baa8cSmrg};
4742629baa8cSmrg
4743629baa8cSmrg/* This works around a problem in FreeBSD linker */
4744629baa8cSmrg#ifdef FREEBSD_WORKAROUND
4745629baa8cSmrgstatic const void *lt_preloaded_setup() {
4746629baa8cSmrg  return lt__PROGRAM__LTX_preloaded_symbols;
4747629baa8cSmrg}
4748629baa8cSmrg#endif
4749629baa8cSmrg
4750629baa8cSmrg#ifdef __cplusplus
4751629baa8cSmrg}
4752629baa8cSmrg#endif
4753629baa8cSmrg_LT_EOF
4754629baa8cSmrg	  # Now try linking the two files.
4755629baa8cSmrg	  mv conftest.$ac_objext conftstm.$ac_objext
4756629baa8cSmrg	  lt_globsym_save_LIBS=$LIBS
4757629baa8cSmrg	  lt_globsym_save_CFLAGS=$CFLAGS
4758629baa8cSmrg	  LIBS="conftstm.$ac_objext"
4759629baa8cSmrg	  CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
4760629baa8cSmrg	  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
4761629baa8cSmrg	    pipe_works=yes
4762629baa8cSmrg	  fi
4763629baa8cSmrg	  LIBS=$lt_globsym_save_LIBS
4764629baa8cSmrg	  CFLAGS=$lt_globsym_save_CFLAGS
4765629baa8cSmrg	else
4766629baa8cSmrg	  echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
4767629baa8cSmrg	fi
4768629baa8cSmrg      else
4769629baa8cSmrg	echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
4770629baa8cSmrg      fi
4771629baa8cSmrg    else
4772629baa8cSmrg      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
4773629baa8cSmrg    fi
4774629baa8cSmrg  else
4775629baa8cSmrg    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
4776629baa8cSmrg    cat conftest.$ac_ext >&5
4777629baa8cSmrg  fi
4778629baa8cSmrg  rm -rf conftest* conftst*
4779629baa8cSmrg
4780629baa8cSmrg  # Do not use the global_symbol_pipe unless it works.
4781629baa8cSmrg  if test "$pipe_works" = yes; then
4782629baa8cSmrg    break
4783629baa8cSmrg  else
4784629baa8cSmrg    lt_cv_sys_global_symbol_pipe=
4785629baa8cSmrg  fi
4786629baa8cSmrgdone
4787629baa8cSmrg])
4788629baa8cSmrgif test -z "$lt_cv_sys_global_symbol_pipe"; then
4789629baa8cSmrg  lt_cv_sys_global_symbol_to_cdecl=
4790629baa8cSmrgfi
4791629baa8cSmrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
4792629baa8cSmrg  AC_MSG_RESULT(failed)
4793629baa8cSmrgelse
4794629baa8cSmrg  AC_MSG_RESULT(ok)
4795629baa8cSmrgfi
4796629baa8cSmrg
4797629baa8cSmrg# Response file support.
4798629baa8cSmrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then
4799629baa8cSmrg  nm_file_list_spec='@'
4800629baa8cSmrgelif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
4801629baa8cSmrg  nm_file_list_spec='@'
4802629baa8cSmrgfi
4803629baa8cSmrg
4804629baa8cSmrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
4805629baa8cSmrg    [Take the output of nm and produce a listing of raw symbols and C names])
4806629baa8cSmrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
4807629baa8cSmrg    [Transform the output of nm in a proper C declaration])
4808629baa8cSmrg_LT_DECL([global_symbol_to_c_name_address],
4809629baa8cSmrg    [lt_cv_sys_global_symbol_to_c_name_address], [1],
4810629baa8cSmrg    [Transform the output of nm in a C name address pair])
4811629baa8cSmrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix],
4812629baa8cSmrg    [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
4813629baa8cSmrg    [Transform the output of nm in a C name address pair when lib prefix is needed])
4814629baa8cSmrg_LT_DECL([], [nm_file_list_spec], [1],
4815629baa8cSmrg    [Specify filename containing input files for $NM])
4816629baa8cSmrg]) # _LT_CMD_GLOBAL_SYMBOLS
4817629baa8cSmrg
4818629baa8cSmrg
4819629baa8cSmrg# _LT_COMPILER_PIC([TAGNAME])
4820629baa8cSmrg# ---------------------------
4821629baa8cSmrgm4_defun([_LT_COMPILER_PIC],
4822629baa8cSmrg[m4_require([_LT_TAG_COMPILER])dnl
4823629baa8cSmrg_LT_TAGVAR(lt_prog_compiler_wl, $1)=
4824629baa8cSmrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=
4825629baa8cSmrg_LT_TAGVAR(lt_prog_compiler_static, $1)=
4826629baa8cSmrg
4827629baa8cSmrgm4_if([$1], [CXX], [
4828629baa8cSmrg  # C++ specific cases for pic, static, wl, etc.
4829629baa8cSmrg  if test "$GXX" = yes; then
4830629baa8cSmrg    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4831629baa8cSmrg    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4832629baa8cSmrg
4833629baa8cSmrg    case $host_os in
4834629baa8cSmrg    aix*)
4835629baa8cSmrg      # All AIX code is PIC.
4836629baa8cSmrg      if test "$host_cpu" = ia64; then
4837629baa8cSmrg	# AIX 5 now supports IA64 processor
4838629baa8cSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4839629baa8cSmrg      fi
4840629baa8cSmrg      ;;
4841629baa8cSmrg
4842629baa8cSmrg    amigaos*)
4843629baa8cSmrg      case $host_cpu in
4844629baa8cSmrg      powerpc)
4845629baa8cSmrg            # see comment about AmigaOS4 .so support
4846629baa8cSmrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4847629baa8cSmrg        ;;
4848629baa8cSmrg      m68k)
4849629baa8cSmrg            # FIXME: we need at least 68020 code to build shared libraries, but
4850629baa8cSmrg            # adding the `-m68020' flag to GCC prevents building anything better,
4851629baa8cSmrg            # like `-m68040'.
4852629baa8cSmrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4853629baa8cSmrg        ;;
4854629baa8cSmrg      esac
4855629baa8cSmrg      ;;
4856629baa8cSmrg
4857629baa8cSmrg    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4858629baa8cSmrg      # PIC is the default for these OSes.
4859629baa8cSmrg      ;;
4860629baa8cSmrg    mingw* | cygwin* | os2* | pw32* | cegcc*)
4861629baa8cSmrg      # This hack is so that the source file can tell whether it is being
4862629baa8cSmrg      # built for inclusion in a dll (and should export symbols for example).
4863629baa8cSmrg      # Although the cygwin gcc ignores -fPIC, still need this for old-style
4864629baa8cSmrg      # (--disable-auto-import) libraries
4865629baa8cSmrg      m4_if([$1], [GCJ], [],
4866629baa8cSmrg	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4867629baa8cSmrg      ;;
4868629baa8cSmrg    darwin* | rhapsody*)
4869629baa8cSmrg      # PIC is the default on this platform
4870629baa8cSmrg      # Common symbols not allowed in MH_DYLIB files
4871629baa8cSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4872629baa8cSmrg      ;;
4873629baa8cSmrg    *djgpp*)
4874629baa8cSmrg      # DJGPP does not support shared libraries at all
4875629baa8cSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4876629baa8cSmrg      ;;
4877629baa8cSmrg    haiku*)
4878629baa8cSmrg      # PIC is the default for Haiku.
4879629baa8cSmrg      # The "-static" flag exists, but is broken.
4880629baa8cSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)=
4881629baa8cSmrg      ;;
4882629baa8cSmrg    interix[[3-9]]*)
4883629baa8cSmrg      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
4884629baa8cSmrg      # Instead, we relocate shared libraries at runtime.
4885629baa8cSmrg      ;;
4886629baa8cSmrg    sysv4*MP*)
4887629baa8cSmrg      if test -d /usr/nec; then
4888629baa8cSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4889629baa8cSmrg      fi
4890629baa8cSmrg      ;;
4891629baa8cSmrg    hpux*)
4892629baa8cSmrg      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
4893629baa8cSmrg      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
4894629baa8cSmrg      # sets the default TLS model and affects inlining.
4895629baa8cSmrg      case $host_cpu in
4896629baa8cSmrg      hppa*64*)
4897629baa8cSmrg	;;
4898629baa8cSmrg      *)
4899629baa8cSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4900629baa8cSmrg	;;
4901629baa8cSmrg      esac
4902629baa8cSmrg      ;;
4903629baa8cSmrg    *qnx* | *nto*)
4904629baa8cSmrg      # QNX uses GNU C++, but need to define -shared option too, otherwise
4905629baa8cSmrg      # it will coredump.
4906629baa8cSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4907629baa8cSmrg      ;;
4908629baa8cSmrg    *)
4909629baa8cSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4910629baa8cSmrg      ;;
4911629baa8cSmrg    esac
4912629baa8cSmrg  else
4913629baa8cSmrg    case $host_os in
4914629baa8cSmrg      aix[[4-9]]*)
4915629baa8cSmrg	# All AIX code is PIC.
4916629baa8cSmrg	if test "$host_cpu" = ia64; then
4917629baa8cSmrg	  # AIX 5 now supports IA64 processor
4918629baa8cSmrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4919629baa8cSmrg	else
4920629baa8cSmrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
4921629baa8cSmrg	fi
4922629baa8cSmrg	;;
4923629baa8cSmrg      chorus*)
4924629baa8cSmrg	case $cc_basename in
4925629baa8cSmrg	cxch68*)
4926629baa8cSmrg	  # Green Hills C++ Compiler
4927629baa8cSmrg	  # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
4928629baa8cSmrg	  ;;
4929629baa8cSmrg	esac
4930629baa8cSmrg	;;
4931629baa8cSmrg      mingw* | cygwin* | os2* | pw32* | cegcc*)
4932629baa8cSmrg	# This hack is so that the source file can tell whether it is being
4933629baa8cSmrg	# built for inclusion in a dll (and should export symbols for example).
4934629baa8cSmrg	m4_if([$1], [GCJ], [],
4935629baa8cSmrg	  [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4936629baa8cSmrg	;;
4937629baa8cSmrg      dgux*)
4938629baa8cSmrg	case $cc_basename in
4939629baa8cSmrg	  ec++*)
4940629baa8cSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4941629baa8cSmrg	    ;;
4942629baa8cSmrg	  ghcx*)
4943629baa8cSmrg	    # Green Hills C++ Compiler
4944629baa8cSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4945629baa8cSmrg	    ;;
4946629baa8cSmrg	  *)
4947629baa8cSmrg	    ;;
4948629baa8cSmrg	esac
4949629baa8cSmrg	;;
4950629baa8cSmrg      freebsd* | dragonfly*)
4951629baa8cSmrg	# FreeBSD uses GNU C++
4952629baa8cSmrg	;;
4953629baa8cSmrg      hpux9* | hpux10* | hpux11*)
4954629baa8cSmrg	case $cc_basename in
4955629baa8cSmrg	  CC*)
4956629baa8cSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4957629baa8cSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4958629baa8cSmrg	    if test "$host_cpu" != ia64; then
4959629baa8cSmrg	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4960629baa8cSmrg	    fi
4961629baa8cSmrg	    ;;
4962629baa8cSmrg	  aCC*)
4963629baa8cSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4964629baa8cSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4965629baa8cSmrg	    case $host_cpu in
4966629baa8cSmrg	    hppa*64*|ia64*)
4967629baa8cSmrg	      # +Z the default
4968629baa8cSmrg	      ;;
4969629baa8cSmrg	    *)
4970629baa8cSmrg	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4971629baa8cSmrg	      ;;
4972629baa8cSmrg	    esac
4973629baa8cSmrg	    ;;
4974629baa8cSmrg	  *)
4975629baa8cSmrg	    ;;
4976629baa8cSmrg	esac
4977629baa8cSmrg	;;
4978629baa8cSmrg      interix*)
4979629baa8cSmrg	# This is c89, which is MS Visual C++ (no shared libs)
4980629baa8cSmrg	# Anyone wants to do a port?
4981629baa8cSmrg	;;
4982629baa8cSmrg      irix5* | irix6* | nonstopux*)
4983629baa8cSmrg	case $cc_basename in
4984629baa8cSmrg	  CC*)
4985629baa8cSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4986629baa8cSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4987629baa8cSmrg	    # CC pic flag -KPIC is the default.
4988629baa8cSmrg	    ;;
4989629baa8cSmrg	  *)
4990629baa8cSmrg	    ;;
4991629baa8cSmrg	esac
4992629baa8cSmrg	;;
4993629baa8cSmrg      linux* | k*bsd*-gnu | kopensolaris*-gnu)
4994629baa8cSmrg	case $cc_basename in
4995629baa8cSmrg	  KCC*)
4996629baa8cSmrg	    # KAI C++ Compiler
4997629baa8cSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4998629baa8cSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4999629baa8cSmrg	    ;;
5000629baa8cSmrg	  ecpc* )
5001629baa8cSmrg	    # old Intel C++ for x86_64 which still supported -KPIC.
5002629baa8cSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5003629baa8cSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5004629baa8cSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5005629baa8cSmrg	    ;;
5006629baa8cSmrg	  icpc* )
5007629baa8cSmrg	    # Intel C++, used to be incompatible with GCC.
5008629baa8cSmrg	    # ICC 10 doesn't accept -KPIC any more.
5009629baa8cSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5010629baa8cSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5011629baa8cSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5012629baa8cSmrg	    ;;
5013629baa8cSmrg	  pgCC* | pgcpp*)
5014629baa8cSmrg	    # Portland Group C++ compiler
5015629baa8cSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5016629baa8cSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5017629baa8cSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5018629baa8cSmrg	    ;;
5019629baa8cSmrg	  cxx*)
5020629baa8cSmrg	    # Compaq C++
5021629baa8cSmrg	    # Make sure the PIC flag is empty.  It appears that all Alpha
5022629baa8cSmrg	    # Linux and Compaq Tru64 Unix objects are PIC.
5023629baa8cSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
5024629baa8cSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5025629baa8cSmrg	    ;;
5026629baa8cSmrg	  xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
5027629baa8cSmrg	    # IBM XL 8.0, 9.0 on PPC and BlueGene
5028629baa8cSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5029629baa8cSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
5030629baa8cSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
5031629baa8cSmrg	    ;;
5032629baa8cSmrg	  *)
5033629baa8cSmrg	    case `$CC -V 2>&1 | sed 5q` in
5034629baa8cSmrg	    *Sun\ C*)
5035629baa8cSmrg	      # Sun C++ 5.9
5036629baa8cSmrg	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5037629baa8cSmrg	      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5038629baa8cSmrg	      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5039629baa8cSmrg	      ;;
5040629baa8cSmrg	    esac
5041629baa8cSmrg	    ;;
5042629baa8cSmrg	esac
5043629baa8cSmrg	;;
5044629baa8cSmrg      lynxos*)
5045629baa8cSmrg	;;
5046629baa8cSmrg      m88k*)
5047629baa8cSmrg	;;
5048629baa8cSmrg      mvs*)
5049629baa8cSmrg	case $cc_basename in
5050629baa8cSmrg	  cxx*)
5051629baa8cSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
5052629baa8cSmrg	    ;;
5053629baa8cSmrg	  *)
5054629baa8cSmrg	    ;;
5055629baa8cSmrg	esac
5056629baa8cSmrg	;;
5057629baa8cSmrg      netbsd*)
5058629baa8cSmrg	;;
5059629baa8cSmrg      *qnx* | *nto*)
5060629baa8cSmrg        # QNX uses GNU C++, but need to define -shared option too, otherwise
5061629baa8cSmrg        # it will coredump.
5062629baa8cSmrg        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
5063629baa8cSmrg        ;;
5064629baa8cSmrg      osf3* | osf4* | osf5*)
5065629baa8cSmrg	case $cc_basename in
5066629baa8cSmrg	  KCC*)
5067629baa8cSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
5068629baa8cSmrg	    ;;
5069629baa8cSmrg	  RCC*)
5070629baa8cSmrg	    # Rational C++ 2.4.1
5071629baa8cSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5072629baa8cSmrg	    ;;
5073629baa8cSmrg	  cxx*)
5074629baa8cSmrg	    # Digital/Compaq C++
5075629baa8cSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5076629baa8cSmrg	    # Make sure the PIC flag is empty.  It appears that all Alpha
5077629baa8cSmrg	    # Linux and Compaq Tru64 Unix objects are PIC.
5078629baa8cSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
5079629baa8cSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5080629baa8cSmrg	    ;;
5081629baa8cSmrg	  *)
5082629baa8cSmrg	    ;;
5083629baa8cSmrg	esac
5084629baa8cSmrg	;;
5085629baa8cSmrg      psos*)
5086629baa8cSmrg	;;
5087629baa8cSmrg      solaris*)
5088629baa8cSmrg	case $cc_basename in
5089629baa8cSmrg	  CC* | sunCC*)
5090629baa8cSmrg	    # Sun C++ 4.2, 5.x and Centerline C++
5091629baa8cSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5092629baa8cSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5093629baa8cSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5094629baa8cSmrg	    ;;
5095629baa8cSmrg	  gcx*)
5096629baa8cSmrg	    # Green Hills C++ Compiler
5097629baa8cSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5098629baa8cSmrg	    ;;
5099629baa8cSmrg	  *)
5100629baa8cSmrg	    ;;
5101629baa8cSmrg	esac
5102629baa8cSmrg	;;
5103629baa8cSmrg      sunos4*)
5104629baa8cSmrg	case $cc_basename in
5105629baa8cSmrg	  CC*)
5106629baa8cSmrg	    # Sun C++ 4.x
5107629baa8cSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5108629baa8cSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5109629baa8cSmrg	    ;;
5110629baa8cSmrg	  lcc*)
5111629baa8cSmrg	    # Lucid
5112629baa8cSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5113629baa8cSmrg	    ;;
5114629baa8cSmrg	  *)
5115629baa8cSmrg	    ;;
5116629baa8cSmrg	esac
5117629baa8cSmrg	;;
5118629baa8cSmrg      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
5119629baa8cSmrg	case $cc_basename in
5120629baa8cSmrg	  CC*)
5121629baa8cSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5122629baa8cSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5123629baa8cSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5124629baa8cSmrg	    ;;
5125629baa8cSmrg	esac
5126629baa8cSmrg	;;
5127629baa8cSmrg      tandem*)
5128629baa8cSmrg	case $cc_basename in
5129629baa8cSmrg	  NCC*)
5130629baa8cSmrg	    # NonStop-UX NCC 3.20
5131629baa8cSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5132629baa8cSmrg	    ;;
5133629baa8cSmrg	  *)
5134629baa8cSmrg	    ;;
5135629baa8cSmrg	esac
5136629baa8cSmrg	;;
5137629baa8cSmrg      vxworks*)
5138629baa8cSmrg	;;
5139629baa8cSmrg      *)
5140629baa8cSmrg	_LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5141629baa8cSmrg	;;
5142629baa8cSmrg    esac
5143629baa8cSmrg  fi
5144629baa8cSmrg],
5145629baa8cSmrg[
5146629baa8cSmrg  if test "$GCC" = yes; then
5147629baa8cSmrg    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5148629baa8cSmrg    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5149629baa8cSmrg
5150629baa8cSmrg    case $host_os in
5151629baa8cSmrg      aix*)
5152629baa8cSmrg      # All AIX code is PIC.
5153629baa8cSmrg      if test "$host_cpu" = ia64; then
5154629baa8cSmrg	# AIX 5 now supports IA64 processor
5155629baa8cSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5156629baa8cSmrg      fi
5157629baa8cSmrg      ;;
5158629baa8cSmrg
5159629baa8cSmrg    amigaos*)
5160629baa8cSmrg      case $host_cpu in
5161629baa8cSmrg      powerpc)
5162629baa8cSmrg            # see comment about AmigaOS4 .so support
5163629baa8cSmrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5164629baa8cSmrg        ;;
5165629baa8cSmrg      m68k)
5166629baa8cSmrg            # FIXME: we need at least 68020 code to build shared libraries, but
5167629baa8cSmrg            # adding the `-m68020' flag to GCC prevents building anything better,
5168629baa8cSmrg            # like `-m68040'.
5169629baa8cSmrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
5170629baa8cSmrg        ;;
5171629baa8cSmrg      esac
5172629baa8cSmrg      ;;
5173629baa8cSmrg
5174629baa8cSmrg    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5175629baa8cSmrg      # PIC is the default for these OSes.
5176629baa8cSmrg      ;;
5177629baa8cSmrg
5178629baa8cSmrg    mingw* | cygwin* | pw32* | os2* | cegcc*)
5179629baa8cSmrg      # This hack is so that the source file can tell whether it is being
5180629baa8cSmrg      # built for inclusion in a dll (and should export symbols for example).
5181629baa8cSmrg      # Although the cygwin gcc ignores -fPIC, still need this for old-style
5182629baa8cSmrg      # (--disable-auto-import) libraries
5183629baa8cSmrg      m4_if([$1], [GCJ], [],
5184629baa8cSmrg	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
5185629baa8cSmrg      ;;
5186629baa8cSmrg
5187629baa8cSmrg    darwin* | rhapsody*)
5188629baa8cSmrg      # PIC is the default on this platform
5189629baa8cSmrg      # Common symbols not allowed in MH_DYLIB files
5190629baa8cSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5191629baa8cSmrg      ;;
5192629baa8cSmrg
5193629baa8cSmrg    haiku*)
5194629baa8cSmrg      # PIC is the default for Haiku.
5195629baa8cSmrg      # The "-static" flag exists, but is broken.
5196629baa8cSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)=
5197629baa8cSmrg      ;;
5198629baa8cSmrg
5199629baa8cSmrg    hpux*)
5200629baa8cSmrg      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
5201629baa8cSmrg      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
5202629baa8cSmrg      # sets the default TLS model and affects inlining.
5203629baa8cSmrg      case $host_cpu in
5204629baa8cSmrg      hppa*64*)
5205629baa8cSmrg	# +Z the default
5206629baa8cSmrg	;;
5207629baa8cSmrg      *)
5208629baa8cSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5209629baa8cSmrg	;;
5210629baa8cSmrg      esac
5211629baa8cSmrg      ;;
5212629baa8cSmrg
5213629baa8cSmrg    interix[[3-9]]*)
5214629baa8cSmrg      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
5215629baa8cSmrg      # Instead, we relocate shared libraries at runtime.
5216629baa8cSmrg      ;;
5217629baa8cSmrg
5218629baa8cSmrg    msdosdjgpp*)
5219629baa8cSmrg      # Just because we use GCC doesn't mean we suddenly get shared libraries
5220629baa8cSmrg      # on systems that don't support them.
5221629baa8cSmrg      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5222629baa8cSmrg      enable_shared=no
5223629baa8cSmrg      ;;
5224629baa8cSmrg
5225629baa8cSmrg    *nto* | *qnx*)
5226629baa8cSmrg      # QNX uses GNU C++, but need to define -shared option too, otherwise
5227629baa8cSmrg      # it will coredump.
5228629baa8cSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
5229629baa8cSmrg      ;;
5230629baa8cSmrg
5231629baa8cSmrg    sysv4*MP*)
5232629baa8cSmrg      if test -d /usr/nec; then
5233629baa8cSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
5234629baa8cSmrg      fi
5235629baa8cSmrg      ;;
5236629baa8cSmrg
5237629baa8cSmrg    *)
5238629baa8cSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5239629baa8cSmrg      ;;
5240629baa8cSmrg    esac
5241629baa8cSmrg
5242629baa8cSmrg    case $cc_basename in
5243629baa8cSmrg    nvcc*) # Cuda Compiler Driver 2.2
5244629baa8cSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
5245629baa8cSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Xcompiler -fPIC'
5246629baa8cSmrg      ;;
5247629baa8cSmrg    esac
5248629baa8cSmrg  else
5249629baa8cSmrg    # PORTME Check for flag to pass linker flags through the system compiler.
5250629baa8cSmrg    case $host_os in
5251629baa8cSmrg    aix*)
5252629baa8cSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5253629baa8cSmrg      if test "$host_cpu" = ia64; then
5254629baa8cSmrg	# AIX 5 now supports IA64 processor
5255629baa8cSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5256629baa8cSmrg      else
5257629baa8cSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5258629baa8cSmrg      fi
5259629baa8cSmrg      ;;
5260629baa8cSmrg
5261629baa8cSmrg    mingw* | cygwin* | pw32* | os2* | cegcc*)
5262629baa8cSmrg      # This hack is so that the source file can tell whether it is being
5263629baa8cSmrg      # built for inclusion in a dll (and should export symbols for example).
5264629baa8cSmrg      m4_if([$1], [GCJ], [],
5265629baa8cSmrg	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
5266629baa8cSmrg      ;;
5267629baa8cSmrg
5268629baa8cSmrg    hpux9* | hpux10* | hpux11*)
5269629baa8cSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5270629baa8cSmrg      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5271629baa8cSmrg      # not for PA HP-UX.
5272629baa8cSmrg      case $host_cpu in
5273629baa8cSmrg      hppa*64*|ia64*)
5274629baa8cSmrg	# +Z the default
5275629baa8cSmrg	;;
5276629baa8cSmrg      *)
5277629baa8cSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5278629baa8cSmrg	;;
5279629baa8cSmrg      esac
5280629baa8cSmrg      # Is there a better lt_prog_compiler_static that works with the bundled CC?
5281629baa8cSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5282629baa8cSmrg      ;;
5283629baa8cSmrg
5284629baa8cSmrg    irix5* | irix6* | nonstopux*)
5285629baa8cSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5286629baa8cSmrg      # PIC (with -KPIC) is the default.
5287629baa8cSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5288629baa8cSmrg      ;;
5289629baa8cSmrg
5290629baa8cSmrg    linux* | k*bsd*-gnu | kopensolaris*-gnu)
5291629baa8cSmrg      case $cc_basename in
5292629baa8cSmrg      # old Intel for x86_64 which still supported -KPIC.
5293629baa8cSmrg      ecc*)
5294629baa8cSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5295629baa8cSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5296629baa8cSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5297629baa8cSmrg        ;;
5298629baa8cSmrg      # icc used to be incompatible with GCC.
5299629baa8cSmrg      # ICC 10 doesn't accept -KPIC any more.
5300629baa8cSmrg      icc* | ifort*)
5301629baa8cSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5302629baa8cSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5303629baa8cSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5304629baa8cSmrg        ;;
5305629baa8cSmrg      # Lahey Fortran 8.1.
5306629baa8cSmrg      lf95*)
5307629baa8cSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5308629baa8cSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
5309629baa8cSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
5310629baa8cSmrg	;;
5311629baa8cSmrg      nagfor*)
5312629baa8cSmrg	# NAG Fortran compiler
5313629baa8cSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
5314629baa8cSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5315629baa8cSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5316629baa8cSmrg	;;
5317629baa8cSmrg      pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
5318629baa8cSmrg        # Portland Group compilers (*not* the Pentium gcc compiler,
5319629baa8cSmrg	# which looks to be a dead project)
5320629baa8cSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5321629baa8cSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5322629baa8cSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5323629baa8cSmrg        ;;
5324629baa8cSmrg      ccc*)
5325629baa8cSmrg        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5326629baa8cSmrg        # All Alpha code is PIC.
5327629baa8cSmrg        _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5328629baa8cSmrg        ;;
5329629baa8cSmrg      xl* | bgxl* | bgf* | mpixl*)
5330629baa8cSmrg	# IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
5331629baa8cSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5332629baa8cSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
5333629baa8cSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
5334629baa8cSmrg	;;
5335629baa8cSmrg      *)
5336629baa8cSmrg	case `$CC -V 2>&1 | sed 5q` in
5337629baa8cSmrg	*Sun\ F* | *Sun*Fortran*)
5338629baa8cSmrg	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
5339629baa8cSmrg	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5340629baa8cSmrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5341629baa8cSmrg	  _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
5342629baa8cSmrg	  ;;
5343629baa8cSmrg	*Sun\ C*)
5344629baa8cSmrg	  # Sun C 5.9
5345629baa8cSmrg	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5346629baa8cSmrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5347629baa8cSmrg	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5348629baa8cSmrg	  ;;
5349629baa8cSmrg	esac
5350629baa8cSmrg	;;
5351629baa8cSmrg      esac
5352629baa8cSmrg      ;;
5353629baa8cSmrg
5354629baa8cSmrg    newsos6)
5355629baa8cSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5356629baa8cSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5357629baa8cSmrg      ;;
5358629baa8cSmrg
5359629baa8cSmrg    *nto* | *qnx*)
5360629baa8cSmrg      # QNX uses GNU C++, but need to define -shared option too, otherwise
5361629baa8cSmrg      # it will coredump.
5362629baa8cSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
5363629baa8cSmrg      ;;
5364629baa8cSmrg
5365629baa8cSmrg    osf3* | osf4* | osf5*)
5366629baa8cSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5367629baa8cSmrg      # All OSF/1 code is PIC.
5368629baa8cSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5369629baa8cSmrg      ;;
5370629baa8cSmrg
5371629baa8cSmrg    rdos*)
5372629baa8cSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5373629baa8cSmrg      ;;
5374629baa8cSmrg
5375629baa8cSmrg    solaris*)
5376629baa8cSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5377629baa8cSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5378629baa8cSmrg      case $cc_basename in
5379629baa8cSmrg      f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
5380629baa8cSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
5381629baa8cSmrg      *)
5382629baa8cSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
5383629baa8cSmrg      esac
5384629baa8cSmrg      ;;
5385629baa8cSmrg
5386629baa8cSmrg    sunos4*)
5387629baa8cSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5388629baa8cSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5389629baa8cSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5390629baa8cSmrg      ;;
5391629baa8cSmrg
5392629baa8cSmrg    sysv4 | sysv4.2uw2* | sysv4.3*)
5393629baa8cSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5394629baa8cSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5395629baa8cSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5396629baa8cSmrg      ;;
5397629baa8cSmrg
5398629baa8cSmrg    sysv4*MP*)
5399629baa8cSmrg      if test -d /usr/nec ;then
5400629baa8cSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
5401629baa8cSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5402629baa8cSmrg      fi
5403629baa8cSmrg      ;;
5404629baa8cSmrg
5405629baa8cSmrg    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
5406629baa8cSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5407629baa8cSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5408629baa8cSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5409629baa8cSmrg      ;;
5410629baa8cSmrg
5411629baa8cSmrg    unicos*)
5412629baa8cSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5413629baa8cSmrg      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5414629baa8cSmrg      ;;
5415629baa8cSmrg
5416629baa8cSmrg    uts4*)
5417629baa8cSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5418629baa8cSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5419629baa8cSmrg      ;;
5420629baa8cSmrg
5421629baa8cSmrg    *)
5422629baa8cSmrg      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5423629baa8cSmrg      ;;
5424629baa8cSmrg    esac
5425629baa8cSmrg  fi
5426629baa8cSmrg])
5427629baa8cSmrgcase $host_os in
5428629baa8cSmrg  # For platforms which do not support PIC, -DPIC is meaningless:
5429629baa8cSmrg  *djgpp*)
5430629baa8cSmrg    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
5431629baa8cSmrg    ;;
5432629baa8cSmrg  *)
5433629baa8cSmrg    _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
5434629baa8cSmrg    ;;
5435629baa8cSmrgesac
5436629baa8cSmrg
5437629baa8cSmrgAC_CACHE_CHECK([for $compiler option to produce PIC],
5438629baa8cSmrg  [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
5439629baa8cSmrg  [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
5440629baa8cSmrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
5441629baa8cSmrg
5442629baa8cSmrg#
5443629baa8cSmrg# Check to make sure the PIC flag actually works.
5444629baa8cSmrg#
5445629baa8cSmrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
5446629baa8cSmrg  _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
5447629baa8cSmrg    [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
5448629baa8cSmrg    [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
5449629baa8cSmrg    [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
5450629baa8cSmrg     "" | " "*) ;;
5451629baa8cSmrg     *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
5452629baa8cSmrg     esac],
5453629baa8cSmrg    [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
5454629baa8cSmrg     _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
5455629baa8cSmrgfi
5456629baa8cSmrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
5457629baa8cSmrg	[Additional compiler flags for building library objects])
5458629baa8cSmrg
5459629baa8cSmrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
5460629baa8cSmrg	[How to pass a linker flag through the compiler])
5461629baa8cSmrg#
5462629baa8cSmrg# Check to make sure the static flag actually works.
5463629baa8cSmrg#
5464629baa8cSmrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
5465629baa8cSmrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
5466629baa8cSmrg  _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
5467629baa8cSmrg  $lt_tmp_static_flag,
5468629baa8cSmrg  [],
5469629baa8cSmrg  [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
5470629baa8cSmrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
5471629baa8cSmrg	[Compiler flag to prevent dynamic linking])
5472629baa8cSmrg])# _LT_COMPILER_PIC
5473629baa8cSmrg
5474629baa8cSmrg
5475629baa8cSmrg# _LT_LINKER_SHLIBS([TAGNAME])
5476629baa8cSmrg# ----------------------------
5477629baa8cSmrg# See if the linker supports building shared libraries.
5478629baa8cSmrgm4_defun([_LT_LINKER_SHLIBS],
5479629baa8cSmrg[AC_REQUIRE([LT_PATH_LD])dnl
5480629baa8cSmrgAC_REQUIRE([LT_PATH_NM])dnl
5481629baa8cSmrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl
5482629baa8cSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
5483629baa8cSmrgm4_require([_LT_DECL_EGREP])dnl
5484629baa8cSmrgm4_require([_LT_DECL_SED])dnl
5485629baa8cSmrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
5486629baa8cSmrgm4_require([_LT_TAG_COMPILER])dnl
5487629baa8cSmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
5488629baa8cSmrgm4_if([$1], [CXX], [
5489629baa8cSmrg  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5490629baa8cSmrg  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
5491629baa8cSmrg  case $host_os in
5492629baa8cSmrg  aix[[4-9]]*)
5493629baa8cSmrg    # If we're using GNU nm, then we don't want the "-C" option.
5494629baa8cSmrg    # -C means demangle to AIX nm, but means don't demangle with GNU nm
5495629baa8cSmrg    # Also, AIX nm treats weak defined symbols like other global defined
5496629baa8cSmrg    # symbols, whereas GNU nm marks them as "W".
5497629baa8cSmrg    if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
5498629baa8cSmrg      _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
5499629baa8cSmrg    else
5500629baa8cSmrg      _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
5501629baa8cSmrg    fi
5502629baa8cSmrg    ;;
5503629baa8cSmrg  pw32*)
5504629baa8cSmrg    _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
5505629baa8cSmrg    ;;
5506629baa8cSmrg  cygwin* | mingw* | cegcc*)
5507629baa8cSmrg    case $cc_basename in
5508629baa8cSmrg    cl*) ;;
5509629baa8cSmrg    *)
5510629baa8cSmrg      _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
5511629baa8cSmrg      _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
5512629baa8cSmrg      ;;
5513629baa8cSmrg    esac
5514629baa8cSmrg    ;;
5515629baa8cSmrg  *)
5516629baa8cSmrg    _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5517629baa8cSmrg    ;;
5518629baa8cSmrg  esac
5519629baa8cSmrg], [
5520629baa8cSmrg  runpath_var=
5521629baa8cSmrg  _LT_TAGVAR(allow_undefined_flag, $1)=
5522629baa8cSmrg  _LT_TAGVAR(always_export_symbols, $1)=no
5523629baa8cSmrg  _LT_TAGVAR(archive_cmds, $1)=
5524629baa8cSmrg  _LT_TAGVAR(archive_expsym_cmds, $1)=
5525629baa8cSmrg  _LT_TAGVAR(compiler_needs_object, $1)=no
5526629baa8cSmrg  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5527629baa8cSmrg  _LT_TAGVAR(export_dynamic_flag_spec, $1)=
5528629baa8cSmrg  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5529629baa8cSmrg  _LT_TAGVAR(hardcode_automatic, $1)=no
5530629baa8cSmrg  _LT_TAGVAR(hardcode_direct, $1)=no
5531629baa8cSmrg  _LT_TAGVAR(hardcode_direct_absolute, $1)=no
5532629baa8cSmrg  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5533629baa8cSmrg  _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
5534629baa8cSmrg  _LT_TAGVAR(hardcode_libdir_separator, $1)=
5535629baa8cSmrg  _LT_TAGVAR(hardcode_minus_L, $1)=no
5536629baa8cSmrg  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5537629baa8cSmrg  _LT_TAGVAR(inherit_rpath, $1)=no
5538629baa8cSmrg  _LT_TAGVAR(link_all_deplibs, $1)=unknown
5539629baa8cSmrg  _LT_TAGVAR(module_cmds, $1)=
5540629baa8cSmrg  _LT_TAGVAR(module_expsym_cmds, $1)=
5541629baa8cSmrg  _LT_TAGVAR(old_archive_from_new_cmds, $1)=
5542629baa8cSmrg  _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
5543629baa8cSmrg  _LT_TAGVAR(thread_safe_flag_spec, $1)=
5544629baa8cSmrg  _LT_TAGVAR(whole_archive_flag_spec, $1)=
5545629baa8cSmrg  # include_expsyms should be a list of space-separated symbols to be *always*
5546629baa8cSmrg  # included in the symbol list
5547629baa8cSmrg  _LT_TAGVAR(include_expsyms, $1)=
5548629baa8cSmrg  # exclude_expsyms can be an extended regexp of symbols to exclude
5549629baa8cSmrg  # it will be wrapped by ` (' and `)$', so one must not match beginning or
5550629baa8cSmrg  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5551629baa8cSmrg  # as well as any symbol that contains `d'.
5552629baa8cSmrg  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
5553629baa8cSmrg  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5554629baa8cSmrg  # platforms (ab)use it in PIC code, but their linkers get confused if
5555629baa8cSmrg  # the symbol is explicitly referenced.  Since portable code cannot
5556629baa8cSmrg  # rely on this symbol name, it's probably fine to never include it in
5557629baa8cSmrg  # preloaded symbol tables.
5558629baa8cSmrg  # Exclude shared library initialization/finalization symbols.
5559629baa8cSmrgdnl Note also adjust exclude_expsyms for C++ above.
5560629baa8cSmrg  extract_expsyms_cmds=
5561629baa8cSmrg
5562629baa8cSmrg  case $host_os in
5563629baa8cSmrg  cygwin* | mingw* | pw32* | cegcc*)
5564629baa8cSmrg    # FIXME: the MSVC++ port hasn't been tested in a loooong time
5565629baa8cSmrg    # When not using gcc, we currently assume that we are using
5566629baa8cSmrg    # Microsoft Visual C++.
5567629baa8cSmrg    if test "$GCC" != yes; then
5568629baa8cSmrg      with_gnu_ld=no
5569629baa8cSmrg    fi
5570629baa8cSmrg    ;;
5571629baa8cSmrg  interix*)
5572629baa8cSmrg    # we just hope/assume this is gcc and not c89 (= MSVC++)
5573629baa8cSmrg    with_gnu_ld=yes
5574629baa8cSmrg    ;;
5575629baa8cSmrg  openbsd*)
5576629baa8cSmrg    with_gnu_ld=no
5577629baa8cSmrg    ;;
5578629baa8cSmrg  esac
5579629baa8cSmrg
5580629baa8cSmrg  _LT_TAGVAR(ld_shlibs, $1)=yes
5581629baa8cSmrg
5582629baa8cSmrg  # On some targets, GNU ld is compatible enough with the native linker
5583629baa8cSmrg  # that we're better off using the native interface for both.
5584629baa8cSmrg  lt_use_gnu_ld_interface=no
5585629baa8cSmrg  if test "$with_gnu_ld" = yes; then
5586629baa8cSmrg    case $host_os in
5587629baa8cSmrg      aix*)
5588629baa8cSmrg	# The AIX port of GNU ld has always aspired to compatibility
5589629baa8cSmrg	# with the native linker.  However, as the warning in the GNU ld
5590629baa8cSmrg	# block says, versions before 2.19.5* couldn't really create working
5591629baa8cSmrg	# shared libraries, regardless of the interface used.
5592629baa8cSmrg	case `$LD -v 2>&1` in
5593629baa8cSmrg	  *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
5594629baa8cSmrg	  *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
5595629baa8cSmrg	  *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
5596629baa8cSmrg	  *)
5597629baa8cSmrg	    lt_use_gnu_ld_interface=yes
5598629baa8cSmrg	    ;;
5599629baa8cSmrg	esac
5600629baa8cSmrg	;;
5601629baa8cSmrg      *)
5602629baa8cSmrg	lt_use_gnu_ld_interface=yes
5603629baa8cSmrg	;;
5604629baa8cSmrg    esac
5605629baa8cSmrg  fi
5606629baa8cSmrg
5607629baa8cSmrg  if test "$lt_use_gnu_ld_interface" = yes; then
5608629baa8cSmrg    # If archive_cmds runs LD, not CC, wlarc should be empty
5609629baa8cSmrg    wlarc='${wl}'
5610629baa8cSmrg
5611629baa8cSmrg    # Set some defaults for GNU ld with shared library support. These
5612629baa8cSmrg    # are reset later if shared libraries are not supported. Putting them
5613629baa8cSmrg    # here allows them to be overridden if necessary.
5614629baa8cSmrg    runpath_var=LD_RUN_PATH
5615629baa8cSmrg    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5616629baa8cSmrg    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5617629baa8cSmrg    # ancient GNU ld didn't support --whole-archive et. al.
5618629baa8cSmrg    if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
5619629baa8cSmrg      _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5620629baa8cSmrg    else
5621629baa8cSmrg      _LT_TAGVAR(whole_archive_flag_spec, $1)=
5622629baa8cSmrg    fi
5623629baa8cSmrg    supports_anon_versioning=no
5624629baa8cSmrg    case `$LD -v 2>&1` in
5625629baa8cSmrg      *GNU\ gold*) supports_anon_versioning=yes ;;
5626629baa8cSmrg      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
5627629baa8cSmrg      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
5628629baa8cSmrg      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
5629629baa8cSmrg      *\ 2.11.*) ;; # other 2.11 versions
5630629baa8cSmrg      *) supports_anon_versioning=yes ;;
5631629baa8cSmrg    esac
5632629baa8cSmrg
5633629baa8cSmrg    # See if GNU ld supports shared libraries.
5634629baa8cSmrg    case $host_os in
5635629baa8cSmrg    aix[[3-9]]*)
5636629baa8cSmrg      # On AIX/PPC, the GNU linker is very broken
5637629baa8cSmrg      if test "$host_cpu" != ia64; then
5638629baa8cSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
5639629baa8cSmrg	cat <<_LT_EOF 1>&2
5640629baa8cSmrg
5641629baa8cSmrg*** Warning: the GNU linker, at least up to release 2.19, is reported
5642629baa8cSmrg*** to be unable to reliably create shared libraries on AIX.
5643629baa8cSmrg*** Therefore, libtool is disabling shared libraries support.  If you
5644629baa8cSmrg*** really care for shared libraries, you may want to install binutils
5645629baa8cSmrg*** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
5646629baa8cSmrg*** You will then need to restart the configuration process.
5647629baa8cSmrg
5648629baa8cSmrg_LT_EOF
5649629baa8cSmrg      fi
5650629baa8cSmrg      ;;
5651629baa8cSmrg
5652629baa8cSmrg    amigaos*)
5653629baa8cSmrg      case $host_cpu in
5654629baa8cSmrg      powerpc)
5655629baa8cSmrg            # see comment about AmigaOS4 .so support
5656629baa8cSmrg            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5657629baa8cSmrg            _LT_TAGVAR(archive_expsym_cmds, $1)=''
5658629baa8cSmrg        ;;
5659629baa8cSmrg      m68k)
5660629baa8cSmrg            _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
5661629baa8cSmrg            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5662629baa8cSmrg            _LT_TAGVAR(hardcode_minus_L, $1)=yes
5663629baa8cSmrg        ;;
5664629baa8cSmrg      esac
5665629baa8cSmrg      ;;
5666629baa8cSmrg
5667629baa8cSmrg    beos*)
5668629baa8cSmrg      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5669629baa8cSmrg	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5670629baa8cSmrg	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5671629baa8cSmrg	# support --undefined.  This deserves some investigation.  FIXME
5672629baa8cSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5673629baa8cSmrg      else
5674629baa8cSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
5675629baa8cSmrg      fi
5676629baa8cSmrg      ;;
5677629baa8cSmrg
5678629baa8cSmrg    cygwin* | mingw* | pw32* | cegcc*)
5679629baa8cSmrg      # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
5680629baa8cSmrg      # as there is no search path for DLLs.
5681629baa8cSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5682629baa8cSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
5683629baa8cSmrg      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5684629baa8cSmrg      _LT_TAGVAR(always_export_symbols, $1)=no
5685629baa8cSmrg      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5686629baa8cSmrg      _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
5687629baa8cSmrg      _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
5688629baa8cSmrg
5689629baa8cSmrg      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
5690629baa8cSmrg        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
5691629baa8cSmrg	# If the export-symbols file already is a .def file (1st line
5692629baa8cSmrg	# is EXPORTS), use it as is; otherwise, prepend...
5693629baa8cSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
5694629baa8cSmrg	  cp $export_symbols $output_objdir/$soname.def;
5695629baa8cSmrg	else
5696629baa8cSmrg	  echo EXPORTS > $output_objdir/$soname.def;
5697629baa8cSmrg	  cat $export_symbols >> $output_objdir/$soname.def;
5698629baa8cSmrg	fi~
5699629baa8cSmrg	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
5700629baa8cSmrg      else
5701629baa8cSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
5702629baa8cSmrg      fi
5703629baa8cSmrg      ;;
5704629baa8cSmrg
5705629baa8cSmrg    haiku*)
5706629baa8cSmrg      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5707629baa8cSmrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
5708629baa8cSmrg      ;;
5709629baa8cSmrg
5710629baa8cSmrg    interix[[3-9]]*)
5711629baa8cSmrg      _LT_TAGVAR(hardcode_direct, $1)=no
5712629baa8cSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5713629baa8cSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5714629baa8cSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5715629baa8cSmrg      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
5716629baa8cSmrg      # Instead, shared libraries are loaded at an image base (0x10000000 by
5717629baa8cSmrg      # default) and relocated if they conflict, which is a slow very memory
5718629baa8cSmrg      # consuming and fragmenting process.  To avoid this, we pick a random,
5719629baa8cSmrg      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
5720629baa8cSmrg      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
5721629baa8cSmrg      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
5722629baa8cSmrg      _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
5723629baa8cSmrg      ;;
5724629baa8cSmrg
5725629baa8cSmrg    gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
5726629baa8cSmrg      tmp_diet=no
5727629baa8cSmrg      if test "$host_os" = linux-dietlibc; then
5728629baa8cSmrg	case $cc_basename in
5729629baa8cSmrg	  diet\ *) tmp_diet=yes;;	# linux-dietlibc with static linking (!diet-dyn)
5730629baa8cSmrg	esac
5731629baa8cSmrg      fi
5732629baa8cSmrg      if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
5733629baa8cSmrg	 && test "$tmp_diet" = no
5734629baa8cSmrg      then
5735629baa8cSmrg	tmp_addflag=' $pic_flag'
5736629baa8cSmrg	tmp_sharedflag='-shared'
5737629baa8cSmrg	case $cc_basename,$host_cpu in
5738629baa8cSmrg        pgcc*)				# Portland Group C compiler
5739629baa8cSmrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
5740629baa8cSmrg	  tmp_addflag=' $pic_flag'
5741629baa8cSmrg	  ;;
5742629baa8cSmrg	pgf77* | pgf90* | pgf95* | pgfortran*)
5743629baa8cSmrg					# Portland Group f77 and f90 compilers
5744629baa8cSmrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
5745629baa8cSmrg	  tmp_addflag=' $pic_flag -Mnomain' ;;
5746629baa8cSmrg	ecc*,ia64* | icc*,ia64*)	# Intel C compiler on ia64
5747629baa8cSmrg	  tmp_addflag=' -i_dynamic' ;;
5748629baa8cSmrg	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
5749629baa8cSmrg	  tmp_addflag=' -i_dynamic -nofor_main' ;;
5750629baa8cSmrg	ifc* | ifort*)			# Intel Fortran compiler
5751629baa8cSmrg	  tmp_addflag=' -nofor_main' ;;
5752629baa8cSmrg	lf95*)				# Lahey Fortran 8.1
5753629baa8cSmrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)=
5754629baa8cSmrg	  tmp_sharedflag='--shared' ;;
5755629baa8cSmrg	xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
5756629baa8cSmrg	  tmp_sharedflag='-qmkshrobj'
5757629baa8cSmrg	  tmp_addflag= ;;
5758629baa8cSmrg	nvcc*)	# Cuda Compiler Driver 2.2
5759629baa8cSmrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
5760629baa8cSmrg	  _LT_TAGVAR(compiler_needs_object, $1)=yes
5761629baa8cSmrg	  ;;
5762629baa8cSmrg	esac
5763629baa8cSmrg	case `$CC -V 2>&1 | sed 5q` in
5764629baa8cSmrg	*Sun\ C*)			# Sun C 5.9
5765629baa8cSmrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
5766629baa8cSmrg	  _LT_TAGVAR(compiler_needs_object, $1)=yes
5767629baa8cSmrg	  tmp_sharedflag='-G' ;;
5768629baa8cSmrg	*Sun\ F*)			# Sun Fortran 8.3
5769629baa8cSmrg	  tmp_sharedflag='-G' ;;
5770629baa8cSmrg	esac
5771629baa8cSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5772629baa8cSmrg
5773629baa8cSmrg        if test "x$supports_anon_versioning" = xyes; then
5774629baa8cSmrg          _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
5775629baa8cSmrg	    cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5776629baa8cSmrg	    echo "local: *; };" >> $output_objdir/$libname.ver~
5777629baa8cSmrg	    $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
5778629baa8cSmrg        fi
5779629baa8cSmrg
5780629baa8cSmrg	case $cc_basename in
5781629baa8cSmrg	xlf* | bgf* | bgxlf* | mpixlf*)
5782629baa8cSmrg	  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
5783629baa8cSmrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
5784629baa8cSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5785629baa8cSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
5786629baa8cSmrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
5787629baa8cSmrg	  if test "x$supports_anon_versioning" = xyes; then
5788629baa8cSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
5789629baa8cSmrg	      cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5790629baa8cSmrg	      echo "local: *; };" >> $output_objdir/$libname.ver~
5791629baa8cSmrg	      $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
5792629baa8cSmrg	  fi
5793629baa8cSmrg	  ;;
5794629baa8cSmrg	esac
5795629baa8cSmrg      else
5796629baa8cSmrg        _LT_TAGVAR(ld_shlibs, $1)=no
5797629baa8cSmrg      fi
5798629baa8cSmrg      ;;
5799629baa8cSmrg
5800629baa8cSmrg    netbsd*)
5801629baa8cSmrg      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
5802629baa8cSmrg	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5803629baa8cSmrg	wlarc=
5804629baa8cSmrg      else
5805629baa8cSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5806629baa8cSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5807629baa8cSmrg      fi
5808629baa8cSmrg      ;;
5809629baa8cSmrg
5810629baa8cSmrg    solaris*)
5811629baa8cSmrg      if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
5812629baa8cSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
5813629baa8cSmrg	cat <<_LT_EOF 1>&2
5814629baa8cSmrg
5815629baa8cSmrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably
5816629baa8cSmrg*** create shared libraries on Solaris systems.  Therefore, libtool
5817629baa8cSmrg*** is disabling shared libraries support.  We urge you to upgrade GNU
5818629baa8cSmrg*** binutils to release 2.9.1 or newer.  Another option is to modify
5819629baa8cSmrg*** your PATH or compiler configuration so that the native linker is
5820629baa8cSmrg*** used, and then restart.
5821629baa8cSmrg
5822629baa8cSmrg_LT_EOF
5823629baa8cSmrg      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5824629baa8cSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5825629baa8cSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5826629baa8cSmrg      else
5827629baa8cSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
5828629baa8cSmrg      fi
5829629baa8cSmrg      ;;
5830629baa8cSmrg
5831629baa8cSmrg    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
5832629baa8cSmrg      case `$LD -v 2>&1` in
5833629baa8cSmrg        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
5834629baa8cSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
5835629baa8cSmrg	cat <<_LT_EOF 1>&2
5836629baa8cSmrg
5837629baa8cSmrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
5838629baa8cSmrg*** reliably create shared libraries on SCO systems.  Therefore, libtool
5839629baa8cSmrg*** is disabling shared libraries support.  We urge you to upgrade GNU
5840629baa8cSmrg*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
5841629baa8cSmrg*** your PATH or compiler configuration so that the native linker is
5842629baa8cSmrg*** used, and then restart.
5843629baa8cSmrg
5844629baa8cSmrg_LT_EOF
5845629baa8cSmrg	;;
5846629baa8cSmrg	*)
5847629baa8cSmrg	  # For security reasons, it is highly recommended that you always
5848629baa8cSmrg	  # use absolute paths for naming shared libraries, and exclude the
5849629baa8cSmrg	  # DT_RUNPATH tag from executables and libraries.  But doing so
5850629baa8cSmrg	  # requires that you compile everything twice, which is a pain.
5851629baa8cSmrg	  if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5852629baa8cSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5853629baa8cSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5854629baa8cSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5855629baa8cSmrg	  else
5856629baa8cSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
5857629baa8cSmrg	  fi
5858629baa8cSmrg	;;
5859629baa8cSmrg      esac
5860629baa8cSmrg      ;;
5861629baa8cSmrg
5862629baa8cSmrg    sunos4*)
5863629baa8cSmrg      _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5864629baa8cSmrg      wlarc=
5865629baa8cSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
5866629baa8cSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5867629baa8cSmrg      ;;
5868629baa8cSmrg
5869629baa8cSmrg    *)
5870629baa8cSmrg      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5871629baa8cSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5872629baa8cSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5873629baa8cSmrg      else
5874629baa8cSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
5875629baa8cSmrg      fi
5876629baa8cSmrg      ;;
5877629baa8cSmrg    esac
5878629baa8cSmrg
5879629baa8cSmrg    if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
5880629baa8cSmrg      runpath_var=
5881629baa8cSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5882629baa8cSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)=
5883629baa8cSmrg      _LT_TAGVAR(whole_archive_flag_spec, $1)=
5884629baa8cSmrg    fi
5885629baa8cSmrg  else
5886629baa8cSmrg    # PORTME fill in a description of your system's linker (not GNU ld)
5887629baa8cSmrg    case $host_os in
5888629baa8cSmrg    aix3*)
5889629baa8cSmrg      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5890629baa8cSmrg      _LT_TAGVAR(always_export_symbols, $1)=yes
5891629baa8cSmrg      _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
5892629baa8cSmrg      # Note: this linker hardcodes the directories in LIBPATH if there
5893629baa8cSmrg      # are no directories specified by -L.
5894629baa8cSmrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
5895629baa8cSmrg      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
5896629baa8cSmrg	# Neither direct hardcoding nor static linking is supported with a
5897629baa8cSmrg	# broken collect2.
5898629baa8cSmrg	_LT_TAGVAR(hardcode_direct, $1)=unsupported
5899629baa8cSmrg      fi
5900629baa8cSmrg      ;;
5901629baa8cSmrg
5902629baa8cSmrg    aix[[4-9]]*)
5903629baa8cSmrg      if test "$host_cpu" = ia64; then
5904629baa8cSmrg	# On IA64, the linker does run time linking by default, so we don't
5905629baa8cSmrg	# have to do anything special.
5906629baa8cSmrg	aix_use_runtimelinking=no
5907629baa8cSmrg	exp_sym_flag='-Bexport'
5908629baa8cSmrg	no_entry_flag=""
5909629baa8cSmrg      else
5910629baa8cSmrg	# If we're using GNU nm, then we don't want the "-C" option.
5911629baa8cSmrg	# -C means demangle to AIX nm, but means don't demangle with GNU nm
5912629baa8cSmrg	# Also, AIX nm treats weak defined symbols like other global
5913629baa8cSmrg	# defined symbols, whereas GNU nm marks them as "W".
5914629baa8cSmrg	if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
5915629baa8cSmrg	  _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
5916629baa8cSmrg	else
5917629baa8cSmrg	  _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
5918629baa8cSmrg	fi
5919629baa8cSmrg	aix_use_runtimelinking=no
5920629baa8cSmrg
5921629baa8cSmrg	# Test if we are trying to use run time linking or normal
5922629baa8cSmrg	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
5923629baa8cSmrg	# need to do runtime linking.
5924629baa8cSmrg	case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
5925629baa8cSmrg	  for ld_flag in $LDFLAGS; do
5926629baa8cSmrg	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
5927629baa8cSmrg	    aix_use_runtimelinking=yes
5928629baa8cSmrg	    break
5929629baa8cSmrg	  fi
5930629baa8cSmrg	  done
5931629baa8cSmrg	  ;;
5932629baa8cSmrg	esac
5933629baa8cSmrg
5934629baa8cSmrg	exp_sym_flag='-bexport'
5935629baa8cSmrg	no_entry_flag='-bnoentry'
5936629baa8cSmrg      fi
5937629baa8cSmrg
5938629baa8cSmrg      # When large executables or shared objects are built, AIX ld can
5939629baa8cSmrg      # have problems creating the table of contents.  If linking a library
5940629baa8cSmrg      # or program results in "error TOC overflow" add -mminimal-toc to
5941629baa8cSmrg      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
5942629baa8cSmrg      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5943629baa8cSmrg
5944629baa8cSmrg      _LT_TAGVAR(archive_cmds, $1)=''
5945629baa8cSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
5946629baa8cSmrg      _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5947629baa8cSmrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
5948629baa8cSmrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
5949629baa8cSmrg      _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
5950629baa8cSmrg
5951629baa8cSmrg      if test "$GCC" = yes; then
5952629baa8cSmrg	case $host_os in aix4.[[012]]|aix4.[[012]].*)
5953629baa8cSmrg	# We only want to do this on AIX 4.2 and lower, the check
5954629baa8cSmrg	# below for broken collect2 doesn't work under 4.3+
5955629baa8cSmrg	  collect2name=`${CC} -print-prog-name=collect2`
5956629baa8cSmrg	  if test -f "$collect2name" &&
5957629baa8cSmrg	   strings "$collect2name" | $GREP resolve_lib_name >/dev/null
5958629baa8cSmrg	  then
5959629baa8cSmrg	  # We have reworked collect2
5960629baa8cSmrg	  :
5961629baa8cSmrg	  else
5962629baa8cSmrg	  # We have old collect2
5963629baa8cSmrg	  _LT_TAGVAR(hardcode_direct, $1)=unsupported
5964629baa8cSmrg	  # It fails to find uninstalled libraries when the uninstalled
5965629baa8cSmrg	  # path is not listed in the libpath.  Setting hardcode_minus_L
5966629baa8cSmrg	  # to unsupported forces relinking
5967629baa8cSmrg	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
5968629baa8cSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5969629baa8cSmrg	  _LT_TAGVAR(hardcode_libdir_separator, $1)=
5970629baa8cSmrg	  fi
5971629baa8cSmrg	  ;;
5972629baa8cSmrg	esac
5973629baa8cSmrg	shared_flag='-shared'
5974629baa8cSmrg	if test "$aix_use_runtimelinking" = yes; then
5975629baa8cSmrg	  shared_flag="$shared_flag "'${wl}-G'
5976629baa8cSmrg	fi
5977629baa8cSmrg      else
5978629baa8cSmrg	# not using gcc
5979629baa8cSmrg	if test "$host_cpu" = ia64; then
5980629baa8cSmrg	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
5981629baa8cSmrg	# chokes on -Wl,-G. The following line is correct:
5982629baa8cSmrg	  shared_flag='-G'
5983629baa8cSmrg	else
5984629baa8cSmrg	  if test "$aix_use_runtimelinking" = yes; then
5985629baa8cSmrg	    shared_flag='${wl}-G'
5986629baa8cSmrg	  else
5987629baa8cSmrg	    shared_flag='${wl}-bM:SRE'
5988629baa8cSmrg	  fi
5989629baa8cSmrg	fi
5990629baa8cSmrg      fi
5991629baa8cSmrg
5992629baa8cSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
5993629baa8cSmrg      # It seems that -bexpall does not export symbols beginning with
5994629baa8cSmrg      # underscore (_), so it is better to generate a list of symbols to export.
5995629baa8cSmrg      _LT_TAGVAR(always_export_symbols, $1)=yes
5996629baa8cSmrg      if test "$aix_use_runtimelinking" = yes; then
5997629baa8cSmrg	# Warning - without using the other runtime loading flags (-brtl),
5998629baa8cSmrg	# -berok will link without error, but may produce a broken library.
5999629baa8cSmrg	_LT_TAGVAR(allow_undefined_flag, $1)='-berok'
6000629baa8cSmrg        # Determine the default libpath from the value encoded in an
6001629baa8cSmrg        # empty executable.
6002629baa8cSmrg        _LT_SYS_MODULE_PATH_AIX([$1])
6003629baa8cSmrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6004629baa8cSmrg        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
6005629baa8cSmrg      else
6006629baa8cSmrg	if test "$host_cpu" = ia64; then
6007629baa8cSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
6008629baa8cSmrg	  _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
6009629baa8cSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
6010629baa8cSmrg	else
6011629baa8cSmrg	 # Determine the default libpath from the value encoded in an
6012629baa8cSmrg	 # empty executable.
6013629baa8cSmrg	 _LT_SYS_MODULE_PATH_AIX([$1])
6014629baa8cSmrg	 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6015629baa8cSmrg	  # Warning - without using the other run time loading flags,
6016629baa8cSmrg	  # -berok will link without error, but may produce a broken library.
6017629baa8cSmrg	  _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
6018629baa8cSmrg	  _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
6019629baa8cSmrg	  if test "$with_gnu_ld" = yes; then
6020629baa8cSmrg	    # We only use this code for GNU lds that support --whole-archive.
6021629baa8cSmrg	    _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
6022629baa8cSmrg	  else
6023629baa8cSmrg	    # Exported symbols can be pulled into shared objects from archives
6024629baa8cSmrg	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
6025629baa8cSmrg	  fi
6026629baa8cSmrg	  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6027629baa8cSmrg	  # This is similar to how AIX traditionally builds its shared libraries.
6028629baa8cSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
6029629baa8cSmrg	fi
6030629baa8cSmrg      fi
6031629baa8cSmrg      ;;
6032629baa8cSmrg
6033629baa8cSmrg    amigaos*)
6034629baa8cSmrg      case $host_cpu in
6035629baa8cSmrg      powerpc)
6036629baa8cSmrg            # see comment about AmigaOS4 .so support
6037629baa8cSmrg            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6038629baa8cSmrg            _LT_TAGVAR(archive_expsym_cmds, $1)=''
6039629baa8cSmrg        ;;
6040629baa8cSmrg      m68k)
6041629baa8cSmrg            _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
6042629baa8cSmrg            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6043629baa8cSmrg            _LT_TAGVAR(hardcode_minus_L, $1)=yes
6044629baa8cSmrg        ;;
6045629baa8cSmrg      esac
6046629baa8cSmrg      ;;
6047629baa8cSmrg
6048629baa8cSmrg    bsdi[[45]]*)
6049629baa8cSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
6050629baa8cSmrg      ;;
6051629baa8cSmrg
6052629baa8cSmrg    cygwin* | mingw* | pw32* | cegcc*)
6053629baa8cSmrg      # When not using gcc, we currently assume that we are using
6054629baa8cSmrg      # Microsoft Visual C++.
6055629baa8cSmrg      # hardcode_libdir_flag_spec is actually meaningless, as there is
6056629baa8cSmrg      # no search path for DLLs.
6057629baa8cSmrg      case $cc_basename in
6058629baa8cSmrg      cl*)
6059629baa8cSmrg	# Native MSVC
6060629baa8cSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
6061629baa8cSmrg	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6062629baa8cSmrg	_LT_TAGVAR(always_export_symbols, $1)=yes
6063629baa8cSmrg	_LT_TAGVAR(file_list_spec, $1)='@'
6064629baa8cSmrg	# Tell ltmain to make .lib files, not .a files.
6065629baa8cSmrg	libext=lib
6066629baa8cSmrg	# Tell ltmain to make .dll files, not .so files.
6067629baa8cSmrg	shrext_cmds=".dll"
6068629baa8cSmrg	# FIXME: Setting linknames here is a bad hack.
6069629baa8cSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
6070629baa8cSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6071629baa8cSmrg	    sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
6072629baa8cSmrg	  else
6073629baa8cSmrg	    sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
6074629baa8cSmrg	  fi~
6075629baa8cSmrg	  $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
6076629baa8cSmrg	  linknames='
6077629baa8cSmrg	# The linker will not automatically build a static lib if we build a DLL.
6078629baa8cSmrg	# _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
6079629baa8cSmrg	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6080629baa8cSmrg	_LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
6081629baa8cSmrg	# Don't use ranlib
6082629baa8cSmrg	_LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
6083629baa8cSmrg	_LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
6084629baa8cSmrg	  lt_tool_outputfile="@TOOL_OUTPUT@"~
6085629baa8cSmrg	  case $lt_outputfile in
6086629baa8cSmrg	    *.exe|*.EXE) ;;
6087629baa8cSmrg	    *)
6088629baa8cSmrg	      lt_outputfile="$lt_outputfile.exe"
6089629baa8cSmrg	      lt_tool_outputfile="$lt_tool_outputfile.exe"
6090629baa8cSmrg	      ;;
6091629baa8cSmrg	  esac~
6092629baa8cSmrg	  if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
6093629baa8cSmrg	    $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
6094629baa8cSmrg	    $RM "$lt_outputfile.manifest";
6095629baa8cSmrg	  fi'
6096629baa8cSmrg	;;
6097629baa8cSmrg      *)
6098629baa8cSmrg	# Assume MSVC wrapper
6099629baa8cSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
6100629baa8cSmrg	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6101629baa8cSmrg	# Tell ltmain to make .lib files, not .a files.
6102629baa8cSmrg	libext=lib
6103629baa8cSmrg	# Tell ltmain to make .dll files, not .so files.
6104629baa8cSmrg	shrext_cmds=".dll"
6105629baa8cSmrg	# FIXME: Setting linknames here is a bad hack.
6106629baa8cSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
6107629baa8cSmrg	# The linker will automatically build a .lib file if we build a DLL.
6108629baa8cSmrg	_LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
6109629baa8cSmrg	# FIXME: Should let the user specify the lib program.
6110629baa8cSmrg	_LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
6111629baa8cSmrg	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6112629baa8cSmrg	;;
6113629baa8cSmrg      esac
6114629baa8cSmrg      ;;
6115629baa8cSmrg
6116629baa8cSmrg    darwin* | rhapsody*)
6117629baa8cSmrg      _LT_DARWIN_LINKER_FEATURES($1)
6118629baa8cSmrg      ;;
6119629baa8cSmrg
6120629baa8cSmrg    dgux*)
6121629baa8cSmrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6122629baa8cSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6123629baa8cSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6124629baa8cSmrg      ;;
6125629baa8cSmrg
6126629baa8cSmrg    freebsd1*)
6127629baa8cSmrg      _LT_TAGVAR(ld_shlibs, $1)=no
6128629baa8cSmrg      ;;
6129629baa8cSmrg
6130629baa8cSmrg    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
6131629baa8cSmrg    # support.  Future versions do this automatically, but an explicit c++rt0.o
6132629baa8cSmrg    # does not break anything, and helps significantly (at the cost of a little
6133629baa8cSmrg    # extra space).
6134629baa8cSmrg    freebsd2.2*)
6135629baa8cSmrg      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
6136629baa8cSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6137629baa8cSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
6138629baa8cSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6139629baa8cSmrg      ;;
6140629baa8cSmrg
6141629baa8cSmrg    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
6142629baa8cSmrg    freebsd2*)
6143629baa8cSmrg      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6144629baa8cSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
6145629baa8cSmrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
6146629baa8cSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6147629baa8cSmrg      ;;
6148629baa8cSmrg
6149629baa8cSmrg    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
6150629baa8cSmrg    freebsd* | dragonfly*)
6151629baa8cSmrg      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6152629baa8cSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6153629baa8cSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
6154629baa8cSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6155629baa8cSmrg      ;;
6156629baa8cSmrg
6157629baa8cSmrg    hpux9*)
6158629baa8cSmrg      if test "$GCC" = yes; then
6159629baa8cSmrg	_LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
6160629baa8cSmrg      else
6161629baa8cSmrg	_LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
6162629baa8cSmrg      fi
6163629baa8cSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6164629baa8cSmrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6165629baa8cSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
6166629baa8cSmrg
6167629baa8cSmrg      # hardcode_minus_L: Not really in the search PATH,
6168629baa8cSmrg      # but as the default location of the library.
6169629baa8cSmrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
6170629baa8cSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6171629baa8cSmrg      ;;
6172629baa8cSmrg
6173629baa8cSmrg    hpux10*)
6174629baa8cSmrg      if test "$GCC" = yes && test "$with_gnu_ld" = no; then
6175629baa8cSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6176629baa8cSmrg      else
6177629baa8cSmrg	_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
6178629baa8cSmrg      fi
6179629baa8cSmrg      if test "$with_gnu_ld" = no; then
6180629baa8cSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6181629baa8cSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
6182629baa8cSmrg	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
6183629baa8cSmrg	_LT_TAGVAR(hardcode_direct, $1)=yes
6184629baa8cSmrg	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6185629baa8cSmrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6186629baa8cSmrg	# hardcode_minus_L: Not really in the search PATH,
6187629baa8cSmrg	# but as the default location of the library.
6188629baa8cSmrg	_LT_TAGVAR(hardcode_minus_L, $1)=yes
6189629baa8cSmrg      fi
6190629baa8cSmrg      ;;
6191629baa8cSmrg
6192629baa8cSmrg    hpux11*)
6193629baa8cSmrg      if test "$GCC" = yes && test "$with_gnu_ld" = no; then
6194629baa8cSmrg	case $host_cpu in
6195629baa8cSmrg	hppa*64*)
6196629baa8cSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6197629baa8cSmrg	  ;;
6198629baa8cSmrg	ia64*)
6199629baa8cSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
6200629baa8cSmrg	  ;;
6201629baa8cSmrg	*)
6202629baa8cSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6203629baa8cSmrg	  ;;
6204629baa8cSmrg	esac
6205629baa8cSmrg      else
6206629baa8cSmrg	case $host_cpu in
6207629baa8cSmrg	hppa*64*)
6208629baa8cSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6209629baa8cSmrg	  ;;
6210629baa8cSmrg	ia64*)
6211629baa8cSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
6212629baa8cSmrg	  ;;
6213629baa8cSmrg	*)
6214629baa8cSmrg	m4_if($1, [], [
6215629baa8cSmrg	  # Older versions of the 11.00 compiler do not understand -b yet
6216629baa8cSmrg	  # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
6217629baa8cSmrg	  _LT_LINKER_OPTION([if $CC understands -b],
6218629baa8cSmrg	    _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
6219629baa8cSmrg	    [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
6220629baa8cSmrg	    [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
6221629baa8cSmrg	  [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
6222629baa8cSmrg	  ;;
6223629baa8cSmrg	esac
6224629baa8cSmrg      fi
6225629baa8cSmrg      if test "$with_gnu_ld" = no; then
6226629baa8cSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6227629baa8cSmrg	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
6228629baa8cSmrg
6229629baa8cSmrg	case $host_cpu in
6230629baa8cSmrg	hppa*64*|ia64*)
6231629baa8cSmrg	  _LT_TAGVAR(hardcode_direct, $1)=no
6232629baa8cSmrg	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6233629baa8cSmrg	  ;;
6234629baa8cSmrg	*)
6235629baa8cSmrg	  _LT_TAGVAR(hardcode_direct, $1)=yes
6236629baa8cSmrg	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6237629baa8cSmrg	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6238629baa8cSmrg
6239629baa8cSmrg	  # hardcode_minus_L: Not really in the search PATH,
6240629baa8cSmrg	  # but as the default location of the library.
6241629baa8cSmrg	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
6242629baa8cSmrg	  ;;
6243629baa8cSmrg	esac
6244629baa8cSmrg      fi
6245629baa8cSmrg      ;;
6246629baa8cSmrg
6247629baa8cSmrg    irix5* | irix6* | nonstopux*)
6248629baa8cSmrg      if test "$GCC" = yes; then
6249629baa8cSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6250629baa8cSmrg	# Try to use the -exported_symbol ld option, if it does not
6251629baa8cSmrg	# work, assume that -exports_file does not work either and
6252629baa8cSmrg	# implicitly export all symbols.
6253629baa8cSmrg	# This should be the same for all languages, so no per-tag cache variable.
6254629baa8cSmrg	AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
6255629baa8cSmrg	  [lt_cv_irix_exported_symbol],
6256629baa8cSmrg	  [save_LDFLAGS="$LDFLAGS"
6257629baa8cSmrg	   LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
6258629baa8cSmrg	   AC_LINK_IFELSE(
6259629baa8cSmrg	     [AC_LANG_SOURCE(
6260629baa8cSmrg	        [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
6261629baa8cSmrg			      [C++], [[int foo (void) { return 0; }]],
6262629baa8cSmrg			      [Fortran 77], [[
6263629baa8cSmrg      subroutine foo
6264629baa8cSmrg      end]],
6265629baa8cSmrg			      [Fortran], [[
6266629baa8cSmrg      subroutine foo
6267629baa8cSmrg      end]])])],
6268629baa8cSmrg	      [lt_cv_irix_exported_symbol=yes],
6269629baa8cSmrg	      [lt_cv_irix_exported_symbol=no])
6270629baa8cSmrg           LDFLAGS="$save_LDFLAGS"])
6271629baa8cSmrg	if test "$lt_cv_irix_exported_symbol" = yes; then
6272629baa8cSmrg          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
6273629baa8cSmrg	fi
6274629baa8cSmrg      else
6275629baa8cSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
6276629baa8cSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
6277629baa8cSmrg      fi
6278629baa8cSmrg      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
6279629baa8cSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6280629baa8cSmrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6281629baa8cSmrg      _LT_TAGVAR(inherit_rpath, $1)=yes
6282629baa8cSmrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
6283629baa8cSmrg      ;;
6284629baa8cSmrg
6285629baa8cSmrg    netbsd*)
6286629baa8cSmrg      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
6287629baa8cSmrg	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
6288629baa8cSmrg      else
6289629baa8cSmrg	_LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
6290629baa8cSmrg      fi
6291629baa8cSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6292629baa8cSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
6293629baa8cSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6294629baa8cSmrg      ;;
6295629baa8cSmrg
6296629baa8cSmrg    newsos6)
6297629baa8cSmrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6298629baa8cSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
6299629baa8cSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6300629baa8cSmrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6301629baa8cSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6302629baa8cSmrg      ;;
6303629baa8cSmrg
6304629baa8cSmrg    *nto* | *qnx*)
6305629baa8cSmrg      ;;
6306629baa8cSmrg
6307629baa8cSmrg    openbsd*)
6308629baa8cSmrg      if test -f /usr/libexec/ld.so; then
6309629baa8cSmrg	_LT_TAGVAR(hardcode_direct, $1)=yes
6310629baa8cSmrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6311629baa8cSmrg	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6312629baa8cSmrg	if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6313629baa8cSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6314629baa8cSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
6315629baa8cSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6316629baa8cSmrg	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6317629baa8cSmrg	else
6318629baa8cSmrg	  case $host_os in
6319629baa8cSmrg	   openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
6320629baa8cSmrg	     _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6321629baa8cSmrg	     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6322629baa8cSmrg	     ;;
6323629baa8cSmrg	   *)
6324629baa8cSmrg	     _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6325629baa8cSmrg	     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6326629baa8cSmrg	     ;;
6327629baa8cSmrg	  esac
6328629baa8cSmrg	fi
6329629baa8cSmrg      else
6330629baa8cSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
6331629baa8cSmrg      fi
6332629baa8cSmrg      ;;
6333629baa8cSmrg
6334629baa8cSmrg    os2*)
6335629baa8cSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6336629baa8cSmrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
6337629baa8cSmrg      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6338629baa8cSmrg      _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
6339629baa8cSmrg      _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
6340629baa8cSmrg      ;;
6341629baa8cSmrg
6342629baa8cSmrg    osf3*)
6343629baa8cSmrg      if test "$GCC" = yes; then
6344629baa8cSmrg	_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6345629baa8cSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6346629baa8cSmrg      else
6347629baa8cSmrg	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6348629baa8cSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
6349629baa8cSmrg      fi
6350629baa8cSmrg      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
6351629baa8cSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6352629baa8cSmrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6353629baa8cSmrg      ;;
6354629baa8cSmrg
6355629baa8cSmrg    osf4* | osf5*)	# as osf3* with the addition of -msym flag
6356629baa8cSmrg      if test "$GCC" = yes; then
6357629baa8cSmrg	_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6358629baa8cSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6359629baa8cSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6360629baa8cSmrg      else
6361629baa8cSmrg	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6362629baa8cSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
6363629baa8cSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
6364629baa8cSmrg	$CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
6365629baa8cSmrg
6366629baa8cSmrg	# Both c and cxx compiler support -rpath directly
6367629baa8cSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6368629baa8cSmrg      fi
6369629baa8cSmrg      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
6370629baa8cSmrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6371629baa8cSmrg      ;;
6372629baa8cSmrg
6373629baa8cSmrg    solaris*)
6374629baa8cSmrg      _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
6375629baa8cSmrg      if test "$GCC" = yes; then
6376629baa8cSmrg	wlarc='${wl}'
6377629baa8cSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6378629baa8cSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6379629baa8cSmrg	  $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
6380629baa8cSmrg      else
6381629baa8cSmrg	case `$CC -V 2>&1` in
6382629baa8cSmrg	*"Compilers 5.0"*)
6383629baa8cSmrg	  wlarc=''
6384629baa8cSmrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6385629baa8cSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6386629baa8cSmrg	  $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
6387629baa8cSmrg	  ;;
6388629baa8cSmrg	*)
6389629baa8cSmrg	  wlarc='${wl}'
6390629baa8cSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
6391629baa8cSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6392629baa8cSmrg	  $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
6393629baa8cSmrg	  ;;
6394629baa8cSmrg	esac
6395629baa8cSmrg      fi
6396629baa8cSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6397629baa8cSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6398629baa8cSmrg      case $host_os in
6399629baa8cSmrg      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6400629baa8cSmrg      *)
6401629baa8cSmrg	# The compiler driver will combine and reorder linker options,
6402629baa8cSmrg	# but understands `-z linker_flag'.  GCC discards it without `$wl',
6403629baa8cSmrg	# but is careful enough not to reorder.
6404629baa8cSmrg	# Supported since Solaris 2.6 (maybe 2.5.1?)
6405629baa8cSmrg	if test "$GCC" = yes; then
6406629baa8cSmrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
6407629baa8cSmrg	else
6408629baa8cSmrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
6409629baa8cSmrg	fi
6410629baa8cSmrg	;;
6411629baa8cSmrg      esac
6412629baa8cSmrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
6413629baa8cSmrg      ;;
6414629baa8cSmrg
6415629baa8cSmrg    sunos4*)
6416629baa8cSmrg      if test "x$host_vendor" = xsequent; then
6417629baa8cSmrg	# Use $CC to link under sequent, because it throws in some extra .o
6418629baa8cSmrg	# files that make .init and .fini sections work.
6419629baa8cSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
6420629baa8cSmrg      else
6421629baa8cSmrg	_LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
6422629baa8cSmrg      fi
6423629baa8cSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6424629baa8cSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
6425629baa8cSmrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
6426629baa8cSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6427629baa8cSmrg      ;;
6428629baa8cSmrg
6429629baa8cSmrg    sysv4)
6430629baa8cSmrg      case $host_vendor in
6431629baa8cSmrg	sni)
6432629baa8cSmrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6433629baa8cSmrg	  _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
6434629baa8cSmrg	;;
6435629baa8cSmrg	siemens)
6436629baa8cSmrg	  ## LD is ld it makes a PLAMLIB
6437629baa8cSmrg	  ## CC just makes a GrossModule.
6438629baa8cSmrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6439629baa8cSmrg	  _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
6440629baa8cSmrg	  _LT_TAGVAR(hardcode_direct, $1)=no
6441629baa8cSmrg        ;;
6442629baa8cSmrg	motorola)
6443629baa8cSmrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6444629baa8cSmrg	  _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
6445629baa8cSmrg	;;
6446629baa8cSmrg      esac
6447629baa8cSmrg      runpath_var='LD_RUN_PATH'
6448629baa8cSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6449629baa8cSmrg      ;;
6450629baa8cSmrg
6451629baa8cSmrg    sysv4.3*)
6452629baa8cSmrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6453629baa8cSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6454629baa8cSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
6455629baa8cSmrg      ;;
6456629baa8cSmrg
6457629baa8cSmrg    sysv4*MP*)
6458629baa8cSmrg      if test -d /usr/nec; then
6459629baa8cSmrg	_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6460629baa8cSmrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6461629baa8cSmrg	runpath_var=LD_RUN_PATH
6462629baa8cSmrg	hardcode_runpath_var=yes
6463629baa8cSmrg	_LT_TAGVAR(ld_shlibs, $1)=yes
6464629baa8cSmrg      fi
6465629baa8cSmrg      ;;
6466629baa8cSmrg
6467629baa8cSmrg    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
6468629baa8cSmrg      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6469629baa8cSmrg      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6470629baa8cSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6471629baa8cSmrg      runpath_var='LD_RUN_PATH'
6472629baa8cSmrg
6473629baa8cSmrg      if test "$GCC" = yes; then
6474629baa8cSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6475629baa8cSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6476629baa8cSmrg      else
6477629baa8cSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6478629baa8cSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6479629baa8cSmrg      fi
6480629baa8cSmrg      ;;
6481629baa8cSmrg
6482629baa8cSmrg    sysv5* | sco3.2v5* | sco5v6*)
6483629baa8cSmrg      # Note: We can NOT use -z defs as we might desire, because we do not
6484629baa8cSmrg      # link with -lc, and that would cause any symbols used from libc to
6485629baa8cSmrg      # always be unresolved, which means just about no library would
6486629baa8cSmrg      # ever link correctly.  If we're not using GNU ld we use -z text
6487629baa8cSmrg      # though, which does catch some bad symbols but isn't as heavy-handed
6488629baa8cSmrg      # as -z defs.
6489629baa8cSmrg      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6490629baa8cSmrg      _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
6491629baa8cSmrg      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6492629baa8cSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6493629baa8cSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
6494629baa8cSmrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6495629baa8cSmrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
6496629baa8cSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
6497629baa8cSmrg      runpath_var='LD_RUN_PATH'
6498629baa8cSmrg
6499629baa8cSmrg      if test "$GCC" = yes; then
6500629baa8cSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6501629baa8cSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6502629baa8cSmrg      else
6503629baa8cSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6504629baa8cSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6505629baa8cSmrg      fi
6506629baa8cSmrg      ;;
6507629baa8cSmrg
6508629baa8cSmrg    uts4*)
6509629baa8cSmrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6510629baa8cSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6511629baa8cSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6512629baa8cSmrg      ;;
6513629baa8cSmrg
6514629baa8cSmrg    *)
6515629baa8cSmrg      _LT_TAGVAR(ld_shlibs, $1)=no
6516629baa8cSmrg      ;;
6517629baa8cSmrg    esac
6518629baa8cSmrg
6519629baa8cSmrg    if test x$host_vendor = xsni; then
6520629baa8cSmrg      case $host in
6521629baa8cSmrg      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6522629baa8cSmrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
6523629baa8cSmrg	;;
6524629baa8cSmrg      esac
6525629baa8cSmrg    fi
6526629baa8cSmrg  fi
6527629baa8cSmrg])
6528629baa8cSmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
6529629baa8cSmrgtest "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
6530629baa8cSmrg
6531629baa8cSmrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
6532629baa8cSmrg
6533629baa8cSmrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
6534629baa8cSmrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
6535629baa8cSmrg_LT_DECL([], [extract_expsyms_cmds], [2],
6536629baa8cSmrg    [The commands to extract the exported symbol list from a shared archive])
6537629baa8cSmrg
6538629baa8cSmrg#
6539629baa8cSmrg# Do we need to explicitly link libc?
6540629baa8cSmrg#
6541629baa8cSmrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
6542629baa8cSmrgx|xyes)
6543629baa8cSmrg  # Assume -lc should be added
6544629baa8cSmrg  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6545629baa8cSmrg
6546629baa8cSmrg  if test "$enable_shared" = yes && test "$GCC" = yes; then
6547629baa8cSmrg    case $_LT_TAGVAR(archive_cmds, $1) in
6548629baa8cSmrg    *'~'*)
6549629baa8cSmrg      # FIXME: we may have to deal with multi-command sequences.
6550629baa8cSmrg      ;;
6551629baa8cSmrg    '$CC '*)
6552629baa8cSmrg      # Test whether the compiler implicitly links with -lc since on some
6553629baa8cSmrg      # systems, -lgcc has to come before -lc. If gcc already passes -lc
6554629baa8cSmrg      # to ld, don't add -lc before -lgcc.
6555629baa8cSmrg      AC_CACHE_CHECK([whether -lc should be explicitly linked in],
6556629baa8cSmrg	[lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
6557629baa8cSmrg	[$RM conftest*
6558629baa8cSmrg	echo "$lt_simple_compile_test_code" > conftest.$ac_ext
6559629baa8cSmrg
6560629baa8cSmrg	if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
6561629baa8cSmrg	  soname=conftest
6562629baa8cSmrg	  lib=conftest
6563629baa8cSmrg	  libobjs=conftest.$ac_objext
6564629baa8cSmrg	  deplibs=
6565629baa8cSmrg	  wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
6566629baa8cSmrg	  pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
6567629baa8cSmrg	  compiler_flags=-v
6568629baa8cSmrg	  linker_flags=-v
6569629baa8cSmrg	  verstring=
6570629baa8cSmrg	  output_objdir=.
6571629baa8cSmrg	  libname=conftest
6572629baa8cSmrg	  lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
6573629baa8cSmrg	  _LT_TAGVAR(allow_undefined_flag, $1)=
6574629baa8cSmrg	  if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
6575629baa8cSmrg	  then
6576629baa8cSmrg	    lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
6577629baa8cSmrg	  else
6578629baa8cSmrg	    lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6579629baa8cSmrg	  fi
6580629baa8cSmrg	  _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
6581629baa8cSmrg	else
6582629baa8cSmrg	  cat conftest.err 1>&5
6583629baa8cSmrg	fi
6584629baa8cSmrg	$RM conftest*
6585629baa8cSmrg	])
6586629baa8cSmrg      _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
6587629baa8cSmrg      ;;
6588629baa8cSmrg    esac
6589629baa8cSmrg  fi
6590629baa8cSmrg  ;;
6591629baa8cSmrgesac
6592629baa8cSmrg
6593629baa8cSmrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
6594629baa8cSmrg    [Whether or not to add -lc for building shared libraries])
6595629baa8cSmrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
6596629baa8cSmrg    [enable_shared_with_static_runtimes], [0],
6597629baa8cSmrg    [Whether or not to disallow shared libs when runtime libs are static])
6598629baa8cSmrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1],
6599629baa8cSmrg    [Compiler flag to allow reflexive dlopens])
6600629baa8cSmrg_LT_TAGDECL([], [whole_archive_flag_spec], [1],
6601629baa8cSmrg    [Compiler flag to generate shared objects directly from archives])
6602629baa8cSmrg_LT_TAGDECL([], [compiler_needs_object], [1],
6603629baa8cSmrg    [Whether the compiler copes with passing no objects directly])
6604629baa8cSmrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2],
6605629baa8cSmrg    [Create an old-style archive from a shared archive])
6606629baa8cSmrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
6607629baa8cSmrg    [Create a temporary old-style archive to link instead of a shared archive])
6608629baa8cSmrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
6609629baa8cSmrg_LT_TAGDECL([], [archive_expsym_cmds], [2])
6610629baa8cSmrg_LT_TAGDECL([], [module_cmds], [2],
6611629baa8cSmrg    [Commands used to build a loadable module if different from building
6612629baa8cSmrg    a shared archive.])
6613629baa8cSmrg_LT_TAGDECL([], [module_expsym_cmds], [2])
6614629baa8cSmrg_LT_TAGDECL([], [with_gnu_ld], [1],
6615629baa8cSmrg    [Whether we are building with GNU ld or not])
6616629baa8cSmrg_LT_TAGDECL([], [allow_undefined_flag], [1],
6617629baa8cSmrg    [Flag that allows shared libraries with undefined symbols to be built])
6618629baa8cSmrg_LT_TAGDECL([], [no_undefined_flag], [1],
6619629baa8cSmrg    [Flag that enforces no undefined symbols])
6620629baa8cSmrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
6621629baa8cSmrg    [Flag to hardcode $libdir into a binary during linking.
6622629baa8cSmrg    This must work even if $libdir does not exist])
6623629baa8cSmrg_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1],
6624629baa8cSmrg    [[If ld is used when linking, flag to hardcode $libdir into a binary
6625629baa8cSmrg    during linking.  This must work even if $libdir does not exist]])
6626629baa8cSmrg_LT_TAGDECL([], [hardcode_libdir_separator], [1],
6627629baa8cSmrg    [Whether we need a single "-rpath" flag with a separated argument])
6628629baa8cSmrg_LT_TAGDECL([], [hardcode_direct], [0],
6629629baa8cSmrg    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
6630629baa8cSmrg    DIR into the resulting binary])
6631629baa8cSmrg_LT_TAGDECL([], [hardcode_direct_absolute], [0],
6632629baa8cSmrg    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
6633629baa8cSmrg    DIR into the resulting binary and the resulting library dependency is
6634629baa8cSmrg    "absolute", i.e impossible to change by setting ${shlibpath_var} if the
6635629baa8cSmrg    library is relocated])
6636629baa8cSmrg_LT_TAGDECL([], [hardcode_minus_L], [0],
6637629baa8cSmrg    [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
6638629baa8cSmrg    into the resulting binary])
6639629baa8cSmrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0],
6640629baa8cSmrg    [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
6641629baa8cSmrg    into the resulting binary])
6642629baa8cSmrg_LT_TAGDECL([], [hardcode_automatic], [0],
6643629baa8cSmrg    [Set to "yes" if building a shared library automatically hardcodes DIR
6644629baa8cSmrg    into the library and all subsequent libraries and executables linked
6645629baa8cSmrg    against it])
6646629baa8cSmrg_LT_TAGDECL([], [inherit_rpath], [0],
6647629baa8cSmrg    [Set to yes if linker adds runtime paths of dependent libraries
6648629baa8cSmrg    to runtime path list])
6649629baa8cSmrg_LT_TAGDECL([], [link_all_deplibs], [0],
6650629baa8cSmrg    [Whether libtool must link a program against all its dependency libraries])
6651629baa8cSmrg_LT_TAGDECL([], [always_export_symbols], [0],
6652629baa8cSmrg    [Set to "yes" if exported symbols are required])
6653629baa8cSmrg_LT_TAGDECL([], [export_symbols_cmds], [2],
6654629baa8cSmrg    [The commands to list exported symbols])
6655629baa8cSmrg_LT_TAGDECL([], [exclude_expsyms], [1],
6656629baa8cSmrg    [Symbols that should not be listed in the preloaded symbols])
6657629baa8cSmrg_LT_TAGDECL([], [include_expsyms], [1],
6658629baa8cSmrg    [Symbols that must always be exported])
6659629baa8cSmrg_LT_TAGDECL([], [prelink_cmds], [2],
6660629baa8cSmrg    [Commands necessary for linking programs (against libraries) with templates])
6661629baa8cSmrg_LT_TAGDECL([], [postlink_cmds], [2],
6662629baa8cSmrg    [Commands necessary for finishing linking programs])
6663629baa8cSmrg_LT_TAGDECL([], [file_list_spec], [1],
6664629baa8cSmrg    [Specify filename containing input files])
6665629baa8cSmrgdnl FIXME: Not yet implemented
6666629baa8cSmrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
6667629baa8cSmrgdnl    [Compiler flag to generate thread safe objects])
6668629baa8cSmrg])# _LT_LINKER_SHLIBS
6669629baa8cSmrg
6670629baa8cSmrg
6671629baa8cSmrg# _LT_LANG_C_CONFIG([TAG])
6672629baa8cSmrg# ------------------------
6673629baa8cSmrg# Ensure that the configuration variables for a C compiler are suitably
6674629baa8cSmrg# defined.  These variables are subsequently used by _LT_CONFIG to write
6675629baa8cSmrg# the compiler configuration to `libtool'.
6676629baa8cSmrgm4_defun([_LT_LANG_C_CONFIG],
6677629baa8cSmrg[m4_require([_LT_DECL_EGREP])dnl
6678629baa8cSmrglt_save_CC="$CC"
6679629baa8cSmrgAC_LANG_PUSH(C)
6680629baa8cSmrg
6681629baa8cSmrg# Source file extension for C test sources.
6682629baa8cSmrgac_ext=c
6683629baa8cSmrg
6684629baa8cSmrg# Object file extension for compiled C test sources.
6685629baa8cSmrgobjext=o
6686629baa8cSmrg_LT_TAGVAR(objext, $1)=$objext
6687629baa8cSmrg
6688629baa8cSmrg# Code to be used in simple compile tests
6689629baa8cSmrglt_simple_compile_test_code="int some_variable = 0;"
6690629baa8cSmrg
6691629baa8cSmrg# Code to be used in simple link tests
6692629baa8cSmrglt_simple_link_test_code='int main(){return(0);}'
6693629baa8cSmrg
6694629baa8cSmrg_LT_TAG_COMPILER
6695629baa8cSmrg# Save the default compiler, since it gets overwritten when the other
6696629baa8cSmrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
6697629baa8cSmrgcompiler_DEFAULT=$CC
6698629baa8cSmrg
6699629baa8cSmrg# save warnings/boilerplate of simple test code
6700629baa8cSmrg_LT_COMPILER_BOILERPLATE
6701629baa8cSmrg_LT_LINKER_BOILERPLATE
6702629baa8cSmrg
6703629baa8cSmrgif test -n "$compiler"; then
6704629baa8cSmrg  _LT_COMPILER_NO_RTTI($1)
6705629baa8cSmrg  _LT_COMPILER_PIC($1)
6706629baa8cSmrg  _LT_COMPILER_C_O($1)
6707629baa8cSmrg  _LT_COMPILER_FILE_LOCKS($1)
6708629baa8cSmrg  _LT_LINKER_SHLIBS($1)
6709629baa8cSmrg  _LT_SYS_DYNAMIC_LINKER($1)
6710629baa8cSmrg  _LT_LINKER_HARDCODE_LIBPATH($1)
6711629baa8cSmrg  LT_SYS_DLOPEN_SELF
6712629baa8cSmrg  _LT_CMD_STRIPLIB
6713629baa8cSmrg
6714629baa8cSmrg  # Report which library types will actually be built
6715629baa8cSmrg  AC_MSG_CHECKING([if libtool supports shared libraries])
6716629baa8cSmrg  AC_MSG_RESULT([$can_build_shared])
6717629baa8cSmrg
6718629baa8cSmrg  AC_MSG_CHECKING([whether to build shared libraries])
6719629baa8cSmrg  test "$can_build_shared" = "no" && enable_shared=no
6720629baa8cSmrg
6721629baa8cSmrg  # On AIX, shared libraries and static libraries use the same namespace, and
6722629baa8cSmrg  # are all built from PIC.
6723629baa8cSmrg  case $host_os in
6724629baa8cSmrg  aix3*)
6725629baa8cSmrg    test "$enable_shared" = yes && enable_static=no
6726629baa8cSmrg    if test -n "$RANLIB"; then
6727629baa8cSmrg      archive_cmds="$archive_cmds~\$RANLIB \$lib"
6728629baa8cSmrg      postinstall_cmds='$RANLIB $lib'
6729629baa8cSmrg    fi
6730629baa8cSmrg    ;;
6731629baa8cSmrg
6732629baa8cSmrg  aix[[4-9]]*)
6733629baa8cSmrg    if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6734629baa8cSmrg      test "$enable_shared" = yes && enable_static=no
6735629baa8cSmrg    fi
6736629baa8cSmrg    ;;
6737629baa8cSmrg  esac
6738629baa8cSmrg  AC_MSG_RESULT([$enable_shared])
6739629baa8cSmrg
6740629baa8cSmrg  AC_MSG_CHECKING([whether to build static libraries])
6741629baa8cSmrg  # Make sure either enable_shared or enable_static is yes.
6742629baa8cSmrg  test "$enable_shared" = yes || enable_static=yes
6743629baa8cSmrg  AC_MSG_RESULT([$enable_static])
6744629baa8cSmrg
6745629baa8cSmrg  _LT_CONFIG($1)
6746629baa8cSmrgfi
6747629baa8cSmrgAC_LANG_POP
6748629baa8cSmrgCC="$lt_save_CC"
6749629baa8cSmrg])# _LT_LANG_C_CONFIG
6750629baa8cSmrg
6751629baa8cSmrg
6752629baa8cSmrg# _LT_LANG_CXX_CONFIG([TAG])
6753629baa8cSmrg# --------------------------
6754629baa8cSmrg# Ensure that the configuration variables for a C++ compiler are suitably
6755629baa8cSmrg# defined.  These variables are subsequently used by _LT_CONFIG to write
6756629baa8cSmrg# the compiler configuration to `libtool'.
6757629baa8cSmrgm4_defun([_LT_LANG_CXX_CONFIG],
6758629baa8cSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
6759629baa8cSmrgm4_require([_LT_DECL_EGREP])dnl
6760629baa8cSmrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl
6761629baa8cSmrgif test -n "$CXX" && ( test "X$CXX" != "Xno" &&
6762629baa8cSmrg    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
6763629baa8cSmrg    (test "X$CXX" != "Xg++"))) ; then
6764629baa8cSmrg  AC_PROG_CXXCPP
6765629baa8cSmrgelse
6766629baa8cSmrg  _lt_caught_CXX_error=yes
6767629baa8cSmrgfi
6768629baa8cSmrg
6769629baa8cSmrgAC_LANG_PUSH(C++)
6770629baa8cSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
6771629baa8cSmrg_LT_TAGVAR(allow_undefined_flag, $1)=
6772629baa8cSmrg_LT_TAGVAR(always_export_symbols, $1)=no
6773629baa8cSmrg_LT_TAGVAR(archive_expsym_cmds, $1)=
6774629baa8cSmrg_LT_TAGVAR(compiler_needs_object, $1)=no
6775629baa8cSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)=
6776629baa8cSmrg_LT_TAGVAR(hardcode_direct, $1)=no
6777629baa8cSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no
6778629baa8cSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6779629baa8cSmrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
6780629baa8cSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)=
6781629baa8cSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no
6782629baa8cSmrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
6783629baa8cSmrg_LT_TAGVAR(hardcode_automatic, $1)=no
6784629baa8cSmrg_LT_TAGVAR(inherit_rpath, $1)=no
6785629baa8cSmrg_LT_TAGVAR(module_cmds, $1)=
6786629baa8cSmrg_LT_TAGVAR(module_expsym_cmds, $1)=
6787629baa8cSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown
6788629baa8cSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
6789629baa8cSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag
6790629baa8cSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
6791629baa8cSmrg_LT_TAGVAR(no_undefined_flag, $1)=
6792629baa8cSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)=
6793629baa8cSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
6794629baa8cSmrg
6795629baa8cSmrg# Source file extension for C++ test sources.
6796629baa8cSmrgac_ext=cpp
6797629baa8cSmrg
6798629baa8cSmrg# Object file extension for compiled C++ test sources.
6799629baa8cSmrgobjext=o
6800629baa8cSmrg_LT_TAGVAR(objext, $1)=$objext
6801629baa8cSmrg
6802629baa8cSmrg# No sense in running all these tests if we already determined that
6803629baa8cSmrg# the CXX compiler isn't working.  Some variables (like enable_shared)
6804629baa8cSmrg# are currently assumed to apply to all compilers on this platform,
6805629baa8cSmrg# and will be corrupted by setting them based on a non-working compiler.
6806629baa8cSmrgif test "$_lt_caught_CXX_error" != yes; then
6807629baa8cSmrg  # Code to be used in simple compile tests
6808629baa8cSmrg  lt_simple_compile_test_code="int some_variable = 0;"
6809629baa8cSmrg
6810629baa8cSmrg  # Code to be used in simple link tests
6811629baa8cSmrg  lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
6812629baa8cSmrg
6813629baa8cSmrg  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
6814629baa8cSmrg  _LT_TAG_COMPILER
6815629baa8cSmrg
6816629baa8cSmrg  # save warnings/boilerplate of simple test code
6817629baa8cSmrg  _LT_COMPILER_BOILERPLATE
6818629baa8cSmrg  _LT_LINKER_BOILERPLATE
6819629baa8cSmrg
6820629baa8cSmrg  # Allow CC to be a program name with arguments.
6821629baa8cSmrg  lt_save_CC=$CC
6822629baa8cSmrg  lt_save_CFLAGS=$CFLAGS
6823629baa8cSmrg  lt_save_LD=$LD
6824629baa8cSmrg  lt_save_GCC=$GCC
6825629baa8cSmrg  GCC=$GXX
6826629baa8cSmrg  lt_save_with_gnu_ld=$with_gnu_ld
6827629baa8cSmrg  lt_save_path_LD=$lt_cv_path_LD
6828629baa8cSmrg  if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
6829629baa8cSmrg    lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
6830629baa8cSmrg  else
6831629baa8cSmrg    $as_unset lt_cv_prog_gnu_ld
6832629baa8cSmrg  fi
6833629baa8cSmrg  if test -n "${lt_cv_path_LDCXX+set}"; then
6834629baa8cSmrg    lt_cv_path_LD=$lt_cv_path_LDCXX
6835629baa8cSmrg  else
6836629baa8cSmrg    $as_unset lt_cv_path_LD
6837629baa8cSmrg  fi
6838629baa8cSmrg  test -z "${LDCXX+set}" || LD=$LDCXX
6839629baa8cSmrg  CC=${CXX-"c++"}
6840629baa8cSmrg  CFLAGS=$CXXFLAGS
6841629baa8cSmrg  compiler=$CC
6842629baa8cSmrg  _LT_TAGVAR(compiler, $1)=$CC
6843629baa8cSmrg  _LT_CC_BASENAME([$compiler])
6844629baa8cSmrg
6845629baa8cSmrg  if test -n "$compiler"; then
6846629baa8cSmrg    # We don't want -fno-exception when compiling C++ code, so set the
6847629baa8cSmrg    # no_builtin_flag separately
6848629baa8cSmrg    if test "$GXX" = yes; then
6849629baa8cSmrg      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
6850629baa8cSmrg    else
6851629baa8cSmrg      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
6852629baa8cSmrg    fi
6853629baa8cSmrg
6854629baa8cSmrg    if test "$GXX" = yes; then
6855629baa8cSmrg      # Set up default GNU C++ configuration
6856629baa8cSmrg
6857629baa8cSmrg      LT_PATH_LD
6858629baa8cSmrg
6859629baa8cSmrg      # Check if GNU C++ uses GNU ld as the underlying linker, since the
6860629baa8cSmrg      # archiving commands below assume that GNU ld is being used.
6861629baa8cSmrg      if test "$with_gnu_ld" = yes; then
6862629baa8cSmrg        _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
6863629baa8cSmrg        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
6864629baa8cSmrg
6865629baa8cSmrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6866629baa8cSmrg        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6867629baa8cSmrg
6868629baa8cSmrg        # If archive_cmds runs LD, not CC, wlarc should be empty
6869629baa8cSmrg        # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
6870629baa8cSmrg        #     investigate it a little bit more. (MM)
6871629baa8cSmrg        wlarc='${wl}'
6872629baa8cSmrg
6873629baa8cSmrg        # ancient GNU ld didn't support --whole-archive et. al.
6874629baa8cSmrg        if eval "`$CC -print-prog-name=ld` --help 2>&1" |
6875629baa8cSmrg	  $GREP 'no-whole-archive' > /dev/null; then
6876629baa8cSmrg          _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
6877629baa8cSmrg        else
6878629baa8cSmrg          _LT_TAGVAR(whole_archive_flag_spec, $1)=
6879629baa8cSmrg        fi
6880629baa8cSmrg      else
6881629baa8cSmrg        with_gnu_ld=no
6882629baa8cSmrg        wlarc=
6883629baa8cSmrg
6884629baa8cSmrg        # A generic and very simple default shared library creation
6885629baa8cSmrg        # command for GNU C++ for the case where it uses the native
6886629baa8cSmrg        # linker, instead of GNU ld.  If possible, this setting should
6887629baa8cSmrg        # overridden to take advantage of the native linker features on
6888629baa8cSmrg        # the platform it is being used on.
6889629baa8cSmrg        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
6890629baa8cSmrg      fi
6891629baa8cSmrg
6892629baa8cSmrg      # Commands to make compiler produce verbose output that lists
6893629baa8cSmrg      # what "hidden" libraries, object files and flags are used when
6894629baa8cSmrg      # linking a shared library.
6895629baa8cSmrg      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
6896629baa8cSmrg
6897629baa8cSmrg    else
6898629baa8cSmrg      GXX=no
6899629baa8cSmrg      with_gnu_ld=no
6900629baa8cSmrg      wlarc=
6901629baa8cSmrg    fi
6902629baa8cSmrg
6903629baa8cSmrg    # PORTME: fill in a description of your system's C++ link characteristics
6904629baa8cSmrg    AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
6905629baa8cSmrg    _LT_TAGVAR(ld_shlibs, $1)=yes
6906629baa8cSmrg    case $host_os in
6907629baa8cSmrg      aix3*)
6908629baa8cSmrg        # FIXME: insert proper C++ library support
6909629baa8cSmrg        _LT_TAGVAR(ld_shlibs, $1)=no
6910629baa8cSmrg        ;;
6911629baa8cSmrg      aix[[4-9]]*)
6912629baa8cSmrg        if test "$host_cpu" = ia64; then
6913629baa8cSmrg          # On IA64, the linker does run time linking by default, so we don't
6914629baa8cSmrg          # have to do anything special.
6915629baa8cSmrg          aix_use_runtimelinking=no
6916629baa8cSmrg          exp_sym_flag='-Bexport'
6917629baa8cSmrg          no_entry_flag=""
6918629baa8cSmrg        else
6919629baa8cSmrg          aix_use_runtimelinking=no
6920629baa8cSmrg
6921629baa8cSmrg          # Test if we are trying to use run time linking or normal
6922629baa8cSmrg          # AIX style linking. If -brtl is somewhere in LDFLAGS, we
6923629baa8cSmrg          # need to do runtime linking.
6924629baa8cSmrg          case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
6925629baa8cSmrg	    for ld_flag in $LDFLAGS; do
6926629baa8cSmrg	      case $ld_flag in
6927629baa8cSmrg	      *-brtl*)
6928629baa8cSmrg	        aix_use_runtimelinking=yes
6929629baa8cSmrg	        break
6930629baa8cSmrg	        ;;
6931629baa8cSmrg	      esac
6932629baa8cSmrg	    done
6933629baa8cSmrg	    ;;
6934629baa8cSmrg          esac
6935629baa8cSmrg
6936629baa8cSmrg          exp_sym_flag='-bexport'
6937629baa8cSmrg          no_entry_flag='-bnoentry'
6938629baa8cSmrg        fi
6939629baa8cSmrg
6940629baa8cSmrg        # When large executables or shared objects are built, AIX ld can
6941629baa8cSmrg        # have problems creating the table of contents.  If linking a library
6942629baa8cSmrg        # or program results in "error TOC overflow" add -mminimal-toc to
6943629baa8cSmrg        # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
6944629baa8cSmrg        # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
6945629baa8cSmrg
6946629baa8cSmrg        _LT_TAGVAR(archive_cmds, $1)=''
6947629baa8cSmrg        _LT_TAGVAR(hardcode_direct, $1)=yes
6948629baa8cSmrg        _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6949629baa8cSmrg        _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6950629baa8cSmrg        _LT_TAGVAR(link_all_deplibs, $1)=yes
6951629baa8cSmrg        _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
6952629baa8cSmrg
6953629baa8cSmrg        if test "$GXX" = yes; then
6954629baa8cSmrg          case $host_os in aix4.[[012]]|aix4.[[012]].*)
6955629baa8cSmrg          # We only want to do this on AIX 4.2 and lower, the check
6956629baa8cSmrg          # below for broken collect2 doesn't work under 4.3+
6957629baa8cSmrg	  collect2name=`${CC} -print-prog-name=collect2`
6958629baa8cSmrg	  if test -f "$collect2name" &&
6959629baa8cSmrg	     strings "$collect2name" | $GREP resolve_lib_name >/dev/null
6960629baa8cSmrg	  then
6961629baa8cSmrg	    # We have reworked collect2
6962629baa8cSmrg	    :
6963629baa8cSmrg	  else
6964629baa8cSmrg	    # We have old collect2
6965629baa8cSmrg	    _LT_TAGVAR(hardcode_direct, $1)=unsupported
6966629baa8cSmrg	    # It fails to find uninstalled libraries when the uninstalled
6967629baa8cSmrg	    # path is not listed in the libpath.  Setting hardcode_minus_L
6968629baa8cSmrg	    # to unsupported forces relinking
6969629baa8cSmrg	    _LT_TAGVAR(hardcode_minus_L, $1)=yes
6970629baa8cSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6971629baa8cSmrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=
6972629baa8cSmrg	  fi
6973629baa8cSmrg          esac
6974629baa8cSmrg          shared_flag='-shared'
6975629baa8cSmrg	  if test "$aix_use_runtimelinking" = yes; then
6976629baa8cSmrg	    shared_flag="$shared_flag "'${wl}-G'
6977629baa8cSmrg	  fi
6978629baa8cSmrg        else
6979629baa8cSmrg          # not using gcc
6980629baa8cSmrg          if test "$host_cpu" = ia64; then
6981629baa8cSmrg	  # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
6982629baa8cSmrg	  # chokes on -Wl,-G. The following line is correct:
6983629baa8cSmrg	  shared_flag='-G'
6984629baa8cSmrg          else
6985629baa8cSmrg	    if test "$aix_use_runtimelinking" = yes; then
6986629baa8cSmrg	      shared_flag='${wl}-G'
6987629baa8cSmrg	    else
6988629baa8cSmrg	      shared_flag='${wl}-bM:SRE'
6989629baa8cSmrg	    fi
6990629baa8cSmrg          fi
6991629baa8cSmrg        fi
6992629baa8cSmrg
6993629baa8cSmrg        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
6994629baa8cSmrg        # It seems that -bexpall does not export symbols beginning with
6995629baa8cSmrg        # underscore (_), so it is better to generate a list of symbols to
6996629baa8cSmrg	# export.
6997629baa8cSmrg        _LT_TAGVAR(always_export_symbols, $1)=yes
6998629baa8cSmrg        if test "$aix_use_runtimelinking" = yes; then
6999629baa8cSmrg          # Warning - without using the other runtime loading flags (-brtl),
7000629baa8cSmrg          # -berok will link without error, but may produce a broken library.
7001629baa8cSmrg          _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
7002629baa8cSmrg          # Determine the default libpath from the value encoded in an empty
7003629baa8cSmrg          # executable.
7004629baa8cSmrg          _LT_SYS_MODULE_PATH_AIX([$1])
7005629baa8cSmrg          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
7006629baa8cSmrg
7007629baa8cSmrg          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
7008629baa8cSmrg        else
7009629baa8cSmrg          if test "$host_cpu" = ia64; then
7010629baa8cSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
7011629baa8cSmrg	    _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
7012629baa8cSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
7013629baa8cSmrg          else
7014629baa8cSmrg	    # Determine the default libpath from the value encoded in an
7015629baa8cSmrg	    # empty executable.
7016629baa8cSmrg	    _LT_SYS_MODULE_PATH_AIX([$1])
7017629baa8cSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
7018629baa8cSmrg	    # Warning - without using the other run time loading flags,
7019629baa8cSmrg	    # -berok will link without error, but may produce a broken library.
7020629baa8cSmrg	    _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
7021629baa8cSmrg	    _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
7022629baa8cSmrg	    if test "$with_gnu_ld" = yes; then
7023629baa8cSmrg	      # We only use this code for GNU lds that support --whole-archive.
7024629baa8cSmrg	      _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
7025629baa8cSmrg	    else
7026629baa8cSmrg	      # Exported symbols can be pulled into shared objects from archives
7027629baa8cSmrg	      _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
7028629baa8cSmrg	    fi
7029629baa8cSmrg	    _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
7030629baa8cSmrg	    # This is similar to how AIX traditionally builds its shared
7031629baa8cSmrg	    # libraries.
7032629baa8cSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
7033629baa8cSmrg          fi
7034629baa8cSmrg        fi
7035629baa8cSmrg        ;;
7036629baa8cSmrg
7037629baa8cSmrg      beos*)
7038629baa8cSmrg	if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
7039629baa8cSmrg	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7040629baa8cSmrg	  # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
7041629baa8cSmrg	  # support --undefined.  This deserves some investigation.  FIXME
7042629baa8cSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7043629baa8cSmrg	else
7044629baa8cSmrg	  _LT_TAGVAR(ld_shlibs, $1)=no
7045629baa8cSmrg	fi
7046629baa8cSmrg	;;
7047629baa8cSmrg
7048629baa8cSmrg      chorus*)
7049629baa8cSmrg        case $cc_basename in
7050629baa8cSmrg          *)
7051629baa8cSmrg	  # FIXME: insert proper C++ library support
7052629baa8cSmrg	  _LT_TAGVAR(ld_shlibs, $1)=no
7053629baa8cSmrg	  ;;
7054629baa8cSmrg        esac
7055629baa8cSmrg        ;;
7056629baa8cSmrg
7057629baa8cSmrg      cygwin* | mingw* | pw32* | cegcc*)
7058629baa8cSmrg	case $GXX,$cc_basename in
7059629baa8cSmrg	,cl* | no,cl*)
7060629baa8cSmrg	  # Native MSVC
7061629baa8cSmrg	  # hardcode_libdir_flag_spec is actually meaningless, as there is
7062629baa8cSmrg	  # no search path for DLLs.
7063629baa8cSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
7064629baa8cSmrg	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7065629baa8cSmrg	  _LT_TAGVAR(always_export_symbols, $1)=yes
7066629baa8cSmrg	  _LT_TAGVAR(file_list_spec, $1)='@'
7067629baa8cSmrg	  # Tell ltmain to make .lib files, not .a files.
7068629baa8cSmrg	  libext=lib
7069629baa8cSmrg	  # Tell ltmain to make .dll files, not .so files.
7070629baa8cSmrg	  shrext_cmds=".dll"
7071629baa8cSmrg	  # FIXME: Setting linknames here is a bad hack.
7072629baa8cSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
7073629baa8cSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
7074629baa8cSmrg	      $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
7075629baa8cSmrg	    else
7076629baa8cSmrg	      $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
7077629baa8cSmrg	    fi~
7078629baa8cSmrg	    $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
7079629baa8cSmrg	    linknames='
7080629baa8cSmrg	  # The linker will not automatically build a static lib if we build a DLL.
7081629baa8cSmrg	  # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
7082629baa8cSmrg	  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
7083629baa8cSmrg	  # Don't use ranlib
7084629baa8cSmrg	  _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
7085629baa8cSmrg	  _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
7086629baa8cSmrg	    lt_tool_outputfile="@TOOL_OUTPUT@"~
7087629baa8cSmrg	    case $lt_outputfile in
7088629baa8cSmrg	      *.exe|*.EXE) ;;
7089629baa8cSmrg	      *)
7090629baa8cSmrg		lt_outputfile="$lt_outputfile.exe"
7091629baa8cSmrg		lt_tool_outputfile="$lt_tool_outputfile.exe"
7092629baa8cSmrg		;;
7093629baa8cSmrg	    esac~
7094629baa8cSmrg	    func_to_tool_file "$lt_outputfile"~
7095629baa8cSmrg	    if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
7096629baa8cSmrg	      $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
7097629baa8cSmrg	      $RM "$lt_outputfile.manifest";
7098629baa8cSmrg	    fi'
7099629baa8cSmrg	  ;;
7100629baa8cSmrg	*)
7101629baa8cSmrg	  # g++
7102629baa8cSmrg	  # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
7103629baa8cSmrg	  # as there is no search path for DLLs.
7104629baa8cSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7105629baa8cSmrg	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
7106629baa8cSmrg	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7107629baa8cSmrg	  _LT_TAGVAR(always_export_symbols, $1)=no
7108629baa8cSmrg	  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
7109629baa8cSmrg
7110629baa8cSmrg	  if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
7111629baa8cSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
7112629baa8cSmrg	    # If the export-symbols file already is a .def file (1st line
7113629baa8cSmrg	    # is EXPORTS), use it as is; otherwise, prepend...
7114629baa8cSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
7115629baa8cSmrg	      cp $export_symbols $output_objdir/$soname.def;
7116629baa8cSmrg	    else
7117629baa8cSmrg	      echo EXPORTS > $output_objdir/$soname.def;
7118629baa8cSmrg	      cat $export_symbols >> $output_objdir/$soname.def;
7119629baa8cSmrg	    fi~
7120629baa8cSmrg	    $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'
7121629baa8cSmrg	  else
7122629baa8cSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
7123629baa8cSmrg	  fi
7124629baa8cSmrg	  ;;
7125629baa8cSmrg	esac
7126629baa8cSmrg	;;
7127629baa8cSmrg      darwin* | rhapsody*)
7128629baa8cSmrg        _LT_DARWIN_LINKER_FEATURES($1)
7129629baa8cSmrg	;;
7130629baa8cSmrg
7131629baa8cSmrg      dgux*)
7132629baa8cSmrg        case $cc_basename in
7133629baa8cSmrg          ec++*)
7134629baa8cSmrg	    # FIXME: insert proper C++ library support
7135629baa8cSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
7136629baa8cSmrg	    ;;
7137629baa8cSmrg          ghcx*)
7138629baa8cSmrg	    # Green Hills C++ Compiler
7139629baa8cSmrg	    # FIXME: insert proper C++ library support
7140629baa8cSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
7141629baa8cSmrg	    ;;
7142629baa8cSmrg          *)
7143629baa8cSmrg	    # FIXME: insert proper C++ library support
7144629baa8cSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
7145629baa8cSmrg	    ;;
7146629baa8cSmrg        esac
7147629baa8cSmrg        ;;
7148629baa8cSmrg
7149629baa8cSmrg      freebsd[[12]]*)
7150629baa8cSmrg        # C++ shared libraries reported to be fairly broken before
7151629baa8cSmrg	# switch to ELF
7152629baa8cSmrg        _LT_TAGVAR(ld_shlibs, $1)=no
7153629baa8cSmrg        ;;
7154629baa8cSmrg
7155629baa8cSmrg      freebsd-elf*)
7156629baa8cSmrg        _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7157629baa8cSmrg        ;;
7158629baa8cSmrg
7159629baa8cSmrg      freebsd* | dragonfly*)
7160629baa8cSmrg        # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
7161629baa8cSmrg        # conventions
7162629baa8cSmrg        _LT_TAGVAR(ld_shlibs, $1)=yes
7163629baa8cSmrg        ;;
7164629baa8cSmrg
7165629baa8cSmrg      gnu*)
7166629baa8cSmrg        ;;
7167629baa8cSmrg
7168629baa8cSmrg      haiku*)
7169629baa8cSmrg        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7170629baa8cSmrg        _LT_TAGVAR(link_all_deplibs, $1)=yes
7171629baa8cSmrg        ;;
7172629baa8cSmrg
7173629baa8cSmrg      hpux9*)
7174629baa8cSmrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
7175629baa8cSmrg        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7176629baa8cSmrg        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7177629baa8cSmrg        _LT_TAGVAR(hardcode_direct, $1)=yes
7178629baa8cSmrg        _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
7179629baa8cSmrg				             # but as the default
7180629baa8cSmrg				             # location of the library.
7181629baa8cSmrg
7182629baa8cSmrg        case $cc_basename in
7183629baa8cSmrg          CC*)
7184629baa8cSmrg            # FIXME: insert proper C++ library support
7185629baa8cSmrg            _LT_TAGVAR(ld_shlibs, $1)=no
7186629baa8cSmrg            ;;
7187629baa8cSmrg          aCC*)
7188629baa8cSmrg            _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
7189629baa8cSmrg            # Commands to make compiler produce verbose output that lists
7190629baa8cSmrg            # what "hidden" libraries, object files and flags are used when
7191629baa8cSmrg            # linking a shared library.
7192629baa8cSmrg            #
7193629baa8cSmrg            # There doesn't appear to be a way to prevent this compiler from
7194629baa8cSmrg            # explicitly linking system object files so we need to strip them
7195629baa8cSmrg            # from the output so that they don't get included in the library
7196629baa8cSmrg            # dependencies.
7197629baa8cSmrg            output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
7198629baa8cSmrg            ;;
7199629baa8cSmrg          *)
7200629baa8cSmrg            if test "$GXX" = yes; then
7201629baa8cSmrg              _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
7202629baa8cSmrg            else
7203629baa8cSmrg              # FIXME: insert proper C++ library support
7204629baa8cSmrg              _LT_TAGVAR(ld_shlibs, $1)=no
7205629baa8cSmrg            fi
7206629baa8cSmrg            ;;
7207629baa8cSmrg        esac
7208629baa8cSmrg        ;;
7209629baa8cSmrg
7210629baa8cSmrg      hpux10*|hpux11*)
7211629baa8cSmrg        if test $with_gnu_ld = no; then
7212629baa8cSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
7213629baa8cSmrg	  _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7214629baa8cSmrg
7215629baa8cSmrg          case $host_cpu in
7216629baa8cSmrg            hppa*64*|ia64*)
7217629baa8cSmrg              ;;
7218629baa8cSmrg            *)
7219629baa8cSmrg	      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7220629baa8cSmrg              ;;
7221629baa8cSmrg          esac
7222629baa8cSmrg        fi
7223629baa8cSmrg        case $host_cpu in
7224629baa8cSmrg          hppa*64*|ia64*)
7225629baa8cSmrg            _LT_TAGVAR(hardcode_direct, $1)=no
7226629baa8cSmrg            _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7227629baa8cSmrg            ;;
7228629baa8cSmrg          *)
7229629baa8cSmrg            _LT_TAGVAR(hardcode_direct, $1)=yes
7230629baa8cSmrg            _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7231629baa8cSmrg            _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
7232629baa8cSmrg					         # but as the default
7233629baa8cSmrg					         # location of the library.
7234629baa8cSmrg            ;;
7235629baa8cSmrg        esac
7236629baa8cSmrg
7237629baa8cSmrg        case $cc_basename in
7238629baa8cSmrg          CC*)
7239629baa8cSmrg	    # FIXME: insert proper C++ library support
7240629baa8cSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
7241629baa8cSmrg	    ;;
7242629baa8cSmrg          aCC*)
7243629baa8cSmrg	    case $host_cpu in
7244629baa8cSmrg	      hppa*64*)
7245629baa8cSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7246629baa8cSmrg	        ;;
7247629baa8cSmrg	      ia64*)
7248629baa8cSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7249629baa8cSmrg	        ;;
7250629baa8cSmrg	      *)
7251629baa8cSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7252629baa8cSmrg	        ;;
7253629baa8cSmrg	    esac
7254629baa8cSmrg	    # Commands to make compiler produce verbose output that lists
7255629baa8cSmrg	    # what "hidden" libraries, object files and flags are used when
7256629baa8cSmrg	    # linking a shared library.
7257629baa8cSmrg	    #
7258629baa8cSmrg	    # There doesn't appear to be a way to prevent this compiler from
7259629baa8cSmrg	    # explicitly linking system object files so we need to strip them
7260629baa8cSmrg	    # from the output so that they don't get included in the library
7261629baa8cSmrg	    # dependencies.
7262629baa8cSmrg	    output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
7263629baa8cSmrg	    ;;
7264629baa8cSmrg          *)
7265629baa8cSmrg	    if test "$GXX" = yes; then
7266629baa8cSmrg	      if test $with_gnu_ld = no; then
7267629baa8cSmrg	        case $host_cpu in
7268629baa8cSmrg	          hppa*64*)
7269629baa8cSmrg	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7270629baa8cSmrg	            ;;
7271629baa8cSmrg	          ia64*)
7272629baa8cSmrg	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7273629baa8cSmrg	            ;;
7274629baa8cSmrg	          *)
7275629baa8cSmrg	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7276629baa8cSmrg	            ;;
7277629baa8cSmrg	        esac
7278629baa8cSmrg	      fi
7279629baa8cSmrg	    else
7280629baa8cSmrg	      # FIXME: insert proper C++ library support
7281629baa8cSmrg	      _LT_TAGVAR(ld_shlibs, $1)=no
7282629baa8cSmrg	    fi
7283629baa8cSmrg	    ;;
7284629baa8cSmrg        esac
7285629baa8cSmrg        ;;
7286629baa8cSmrg
7287629baa8cSmrg      interix[[3-9]]*)
7288629baa8cSmrg	_LT_TAGVAR(hardcode_direct, $1)=no
7289629baa8cSmrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7290629baa8cSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7291629baa8cSmrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7292629baa8cSmrg	# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
7293629baa8cSmrg	# Instead, shared libraries are loaded at an image base (0x10000000 by
7294629baa8cSmrg	# default) and relocated if they conflict, which is a slow very memory
7295629baa8cSmrg	# consuming and fragmenting process.  To avoid this, we pick a random,
7296629baa8cSmrg	# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
7297629baa8cSmrg	# time.  Moving up from 0x10000000 also allows more sbrk(2) space.
7298629baa8cSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
7299629baa8cSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
7300629baa8cSmrg	;;
7301629baa8cSmrg      irix5* | irix6*)
7302629baa8cSmrg        case $cc_basename in
7303629baa8cSmrg          CC*)
7304629baa8cSmrg	    # SGI C++
7305629baa8cSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
7306629baa8cSmrg
7307629baa8cSmrg	    # Archives containing C++ object files must be created using
7308629baa8cSmrg	    # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
7309629baa8cSmrg	    # necessary to make sure instantiated templates are included
7310629baa8cSmrg	    # in the archive.
7311629baa8cSmrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
7312629baa8cSmrg	    ;;
7313629baa8cSmrg          *)
7314629baa8cSmrg	    if test "$GXX" = yes; then
7315629baa8cSmrg	      if test "$with_gnu_ld" = no; then
7316629baa8cSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
7317629baa8cSmrg	      else
7318629baa8cSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib'
7319629baa8cSmrg	      fi
7320629baa8cSmrg	    fi
7321629baa8cSmrg	    _LT_TAGVAR(link_all_deplibs, $1)=yes
7322629baa8cSmrg	    ;;
7323629baa8cSmrg        esac
7324629baa8cSmrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7325629baa8cSmrg        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7326629baa8cSmrg        _LT_TAGVAR(inherit_rpath, $1)=yes
7327629baa8cSmrg        ;;
7328629baa8cSmrg
7329629baa8cSmrg      linux* | k*bsd*-gnu | kopensolaris*-gnu)
7330629baa8cSmrg        case $cc_basename in
7331629baa8cSmrg          KCC*)
7332629baa8cSmrg	    # Kuck and Associates, Inc. (KAI) C++ Compiler
7333629baa8cSmrg
7334629baa8cSmrg	    # KCC will only create a shared library if the output file
7335629baa8cSmrg	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
7336629baa8cSmrg	    # to its proper name (with version) after linking.
7337629baa8cSmrg	    _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
7338629baa8cSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
7339629baa8cSmrg	    # Commands to make compiler produce verbose output that lists
7340629baa8cSmrg	    # what "hidden" libraries, object files and flags are used when
7341629baa8cSmrg	    # linking a shared library.
7342629baa8cSmrg	    #
7343629baa8cSmrg	    # There doesn't appear to be a way to prevent this compiler from
7344629baa8cSmrg	    # explicitly linking system object files so we need to strip them
7345629baa8cSmrg	    # from the output so that they don't get included in the library
7346629baa8cSmrg	    # dependencies.
7347629baa8cSmrg	    output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
7348629baa8cSmrg
7349629baa8cSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7350629baa8cSmrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7351629baa8cSmrg
7352629baa8cSmrg	    # Archives containing C++ object files must be created using
7353629baa8cSmrg	    # "CC -Bstatic", where "CC" is the KAI C++ compiler.
7354629baa8cSmrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
7355629baa8cSmrg	    ;;
7356629baa8cSmrg	  icpc* | ecpc* )
7357629baa8cSmrg	    # Intel C++
7358629baa8cSmrg	    with_gnu_ld=yes
7359629baa8cSmrg	    # version 8.0 and above of icpc choke on multiply defined symbols
7360629baa8cSmrg	    # if we add $predep_objects and $postdep_objects, however 7.1 and
7361629baa8cSmrg	    # earlier do not add the objects themselves.
7362629baa8cSmrg	    case `$CC -V 2>&1` in
7363629baa8cSmrg	      *"Version 7."*)
7364629baa8cSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
7365629baa8cSmrg		_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
7366629baa8cSmrg		;;
7367629baa8cSmrg	      *)  # Version 8.0 or newer
7368629baa8cSmrg	        tmp_idyn=
7369629baa8cSmrg	        case $host_cpu in
7370629baa8cSmrg		  ia64*) tmp_idyn=' -i_dynamic';;
7371629baa8cSmrg		esac
7372629baa8cSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7373629baa8cSmrg		_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
7374629baa8cSmrg		;;
7375629baa8cSmrg	    esac
7376629baa8cSmrg	    _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7377629baa8cSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7378629baa8cSmrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7379629baa8cSmrg	    _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
7380629baa8cSmrg	    ;;
7381629baa8cSmrg          pgCC* | pgcpp*)
7382629baa8cSmrg            # Portland Group C++ compiler
7383629baa8cSmrg	    case `$CC -V` in
7384629baa8cSmrg	    *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
7385629baa8cSmrg	      _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
7386629baa8cSmrg		rm -rf $tpldir~
7387629baa8cSmrg		$CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
7388629baa8cSmrg		compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
7389629baa8cSmrg	      _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
7390629baa8cSmrg		rm -rf $tpldir~
7391629baa8cSmrg		$CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
7392629baa8cSmrg		$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
7393629baa8cSmrg		$RANLIB $oldlib'
7394629baa8cSmrg	      _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
7395629baa8cSmrg		rm -rf $tpldir~
7396629baa8cSmrg		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
7397629baa8cSmrg		$CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
7398629baa8cSmrg	      _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
7399629baa8cSmrg		rm -rf $tpldir~
7400629baa8cSmrg		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
7401629baa8cSmrg		$CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
7402629baa8cSmrg	      ;;
7403629baa8cSmrg	    *) # Version 6 and above use weak symbols
7404629baa8cSmrg	      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
7405629baa8cSmrg	      _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
7406629baa8cSmrg	      ;;
7407629baa8cSmrg	    esac
7408629baa8cSmrg
7409629baa8cSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
7410629baa8cSmrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7411629baa8cSmrg	    _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
7412629baa8cSmrg            ;;
7413629baa8cSmrg	  cxx*)
7414629baa8cSmrg	    # Compaq C++
7415629baa8cSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
7416629baa8cSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname  -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
7417629baa8cSmrg
7418629baa8cSmrg	    runpath_var=LD_RUN_PATH
7419629baa8cSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
7420629baa8cSmrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7421629baa8cSmrg
7422629baa8cSmrg	    # Commands to make compiler produce verbose output that lists
7423629baa8cSmrg	    # what "hidden" libraries, object files and flags are used when
7424629baa8cSmrg	    # linking a shared library.
7425629baa8cSmrg	    #
7426629baa8cSmrg	    # There doesn't appear to be a way to prevent this compiler from
7427629baa8cSmrg	    # explicitly linking system object files so we need to strip them
7428629baa8cSmrg	    # from the output so that they don't get included in the library
7429629baa8cSmrg	    # dependencies.
7430629baa8cSmrg	    output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed'
7431629baa8cSmrg	    ;;
7432629baa8cSmrg	  xl* | mpixl* | bgxl*)
7433629baa8cSmrg	    # IBM XL 8.0 on PPC, with GNU ld
7434629baa8cSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7435629baa8cSmrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7436629baa8cSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7437629baa8cSmrg	    if test "x$supports_anon_versioning" = xyes; then
7438629baa8cSmrg	      _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
7439629baa8cSmrg		cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
7440629baa8cSmrg		echo "local: *; };" >> $output_objdir/$libname.ver~
7441629baa8cSmrg		$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
7442629baa8cSmrg	    fi
7443629baa8cSmrg	    ;;
7444629baa8cSmrg	  *)
7445629baa8cSmrg	    case `$CC -V 2>&1 | sed 5q` in
7446629baa8cSmrg	    *Sun\ C*)
7447629baa8cSmrg	      # Sun C++ 5.9
7448629baa8cSmrg	      _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
7449629baa8cSmrg	      _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7450629baa8cSmrg	      _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
7451629baa8cSmrg	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7452629baa8cSmrg	      _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
7453629baa8cSmrg	      _LT_TAGVAR(compiler_needs_object, $1)=yes
7454629baa8cSmrg
7455629baa8cSmrg	      # Not sure whether something based on
7456629baa8cSmrg	      # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
7457629baa8cSmrg	      # would be better.
7458629baa8cSmrg	      output_verbose_link_cmd='func_echo_all'
7459629baa8cSmrg
7460629baa8cSmrg	      # Archives containing C++ object files must be created using
7461629baa8cSmrg	      # "CC -xar", where "CC" is the Sun C++ compiler.  This is
7462629baa8cSmrg	      # necessary to make sure instantiated templates are included
7463629baa8cSmrg	      # in the archive.
7464629baa8cSmrg	      _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
7465629baa8cSmrg	      ;;
7466629baa8cSmrg	    esac
7467629baa8cSmrg	    ;;
7468629baa8cSmrg	esac
7469629baa8cSmrg	;;
7470629baa8cSmrg
7471629baa8cSmrg      lynxos*)
7472629baa8cSmrg        # FIXME: insert proper C++ library support
7473629baa8cSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
7474629baa8cSmrg	;;
7475629baa8cSmrg
7476629baa8cSmrg      m88k*)
7477629baa8cSmrg        # FIXME: insert proper C++ library support
7478629baa8cSmrg        _LT_TAGVAR(ld_shlibs, $1)=no
7479629baa8cSmrg	;;
7480629baa8cSmrg
7481629baa8cSmrg      mvs*)
7482629baa8cSmrg        case $cc_basename in
7483629baa8cSmrg          cxx*)
7484629baa8cSmrg	    # FIXME: insert proper C++ library support
7485629baa8cSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
7486629baa8cSmrg	    ;;
7487629baa8cSmrg	  *)
7488629baa8cSmrg	    # FIXME: insert proper C++ library support
7489629baa8cSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
7490629baa8cSmrg	    ;;
7491629baa8cSmrg	esac
7492629baa8cSmrg	;;
7493629baa8cSmrg
7494629baa8cSmrg      netbsd*)
7495629baa8cSmrg        if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
7496629baa8cSmrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
7497629baa8cSmrg	  wlarc=
7498629baa8cSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7499629baa8cSmrg	  _LT_TAGVAR(hardcode_direct, $1)=yes
7500629baa8cSmrg	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7501629baa8cSmrg	fi
7502629baa8cSmrg	# Workaround some broken pre-1.5 toolchains
7503629baa8cSmrg	output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
7504629baa8cSmrg	;;
7505629baa8cSmrg
7506629baa8cSmrg      *nto* | *qnx*)
7507629baa8cSmrg        _LT_TAGVAR(ld_shlibs, $1)=yes
7508629baa8cSmrg	;;
7509629baa8cSmrg
7510629baa8cSmrg      openbsd2*)
7511629baa8cSmrg        # C++ shared libraries are fairly broken
7512629baa8cSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
7513629baa8cSmrg	;;
7514629baa8cSmrg
7515629baa8cSmrg      openbsd*)
7516629baa8cSmrg	if test -f /usr/libexec/ld.so; then
7517629baa8cSmrg	  _LT_TAGVAR(hardcode_direct, $1)=yes
7518629baa8cSmrg	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7519629baa8cSmrg	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7520629baa8cSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
7521629baa8cSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7522629baa8cSmrg	  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
7523629baa8cSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
7524629baa8cSmrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7525629baa8cSmrg	    _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
7526629baa8cSmrg	  fi
7527629baa8cSmrg	  output_verbose_link_cmd=func_echo_all
7528629baa8cSmrg	else
7529629baa8cSmrg	  _LT_TAGVAR(ld_shlibs, $1)=no
7530629baa8cSmrg	fi
7531629baa8cSmrg	;;
7532629baa8cSmrg
7533629baa8cSmrg      osf3* | osf4* | osf5*)
7534629baa8cSmrg        case $cc_basename in
7535629baa8cSmrg          KCC*)
7536629baa8cSmrg	    # Kuck and Associates, Inc. (KAI) C++ Compiler
7537629baa8cSmrg
7538629baa8cSmrg	    # KCC will only create a shared library if the output file
7539629baa8cSmrg	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
7540629baa8cSmrg	    # to its proper name (with version) after linking.
7541629baa8cSmrg	    _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
7542629baa8cSmrg
7543629baa8cSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7544629baa8cSmrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7545145b7b3cSmrg
7546629baa8cSmrg	    # Archives containing C++ object files must be created using
7547629baa8cSmrg	    # the KAI C++ compiler.
7548629baa8cSmrg	    case $host in
7549629baa8cSmrg	      osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
7550629baa8cSmrg	      *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
7551629baa8cSmrg	    esac
7552629baa8cSmrg	    ;;
7553629baa8cSmrg          RCC*)
7554629baa8cSmrg	    # Rational C++ 2.4.1
7555629baa8cSmrg	    # FIXME: insert proper C++ library support
7556629baa8cSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
7557629baa8cSmrg	    ;;
7558629baa8cSmrg          cxx*)
7559629baa8cSmrg	    case $host in
7560629baa8cSmrg	      osf3*)
7561629baa8cSmrg	        _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
7562629baa8cSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
7563629baa8cSmrg	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7564629baa8cSmrg		;;
7565629baa8cSmrg	      *)
7566629baa8cSmrg	        _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
7567629baa8cSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
7568629baa8cSmrg	        _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
7569629baa8cSmrg	          echo "-hidden">> $lib.exp~
7570629baa8cSmrg	          $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~
7571629baa8cSmrg	          $RM $lib.exp'
7572629baa8cSmrg	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
7573629baa8cSmrg		;;
7574629baa8cSmrg	    esac
7575629baa8cSmrg
7576629baa8cSmrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7577629baa8cSmrg
7578629baa8cSmrg	    # Commands to make compiler produce verbose output that lists
7579629baa8cSmrg	    # what "hidden" libraries, object files and flags are used when
7580629baa8cSmrg	    # linking a shared library.
7581629baa8cSmrg	    #
7582629baa8cSmrg	    # There doesn't appear to be a way to prevent this compiler from
7583629baa8cSmrg	    # explicitly linking system object files so we need to strip them
7584629baa8cSmrg	    # from the output so that they don't get included in the library
7585629baa8cSmrg	    # dependencies.
7586629baa8cSmrg	    output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
7587629baa8cSmrg	    ;;
7588629baa8cSmrg	  *)
7589629baa8cSmrg	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
7590629baa8cSmrg	      _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
7591629baa8cSmrg	      case $host in
7592629baa8cSmrg	        osf3*)
7593629baa8cSmrg	          _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
7594629baa8cSmrg		  ;;
7595629baa8cSmrg	        *)
7596629baa8cSmrg	          _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
7597629baa8cSmrg		  ;;
7598629baa8cSmrg	      esac
7599629baa8cSmrg
7600629baa8cSmrg	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7601629baa8cSmrg	      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7602629baa8cSmrg
7603629baa8cSmrg	      # Commands to make compiler produce verbose output that lists
7604629baa8cSmrg	      # what "hidden" libraries, object files and flags are used when
7605629baa8cSmrg	      # linking a shared library.
7606629baa8cSmrg	      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
7607629baa8cSmrg
7608629baa8cSmrg	    else
7609629baa8cSmrg	      # FIXME: insert proper C++ library support
7610629baa8cSmrg	      _LT_TAGVAR(ld_shlibs, $1)=no
7611629baa8cSmrg	    fi
7612629baa8cSmrg	    ;;
7613629baa8cSmrg        esac
7614629baa8cSmrg        ;;
7615629baa8cSmrg
7616629baa8cSmrg      psos*)
7617629baa8cSmrg        # FIXME: insert proper C++ library support
7618629baa8cSmrg        _LT_TAGVAR(ld_shlibs, $1)=no
7619629baa8cSmrg        ;;
7620629baa8cSmrg
7621629baa8cSmrg      sunos4*)
7622629baa8cSmrg        case $cc_basename in
7623629baa8cSmrg          CC*)
7624629baa8cSmrg	    # Sun C++ 4.x
7625629baa8cSmrg	    # FIXME: insert proper C++ library support
7626629baa8cSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
7627629baa8cSmrg	    ;;
7628629baa8cSmrg          lcc*)
7629629baa8cSmrg	    # Lucid
7630629baa8cSmrg	    # FIXME: insert proper C++ library support
7631629baa8cSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
7632629baa8cSmrg	    ;;
7633629baa8cSmrg          *)
7634629baa8cSmrg	    # FIXME: insert proper C++ library support
7635629baa8cSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
7636629baa8cSmrg	    ;;
7637629baa8cSmrg        esac
7638629baa8cSmrg        ;;
7639629baa8cSmrg
7640629baa8cSmrg      solaris*)
7641629baa8cSmrg        case $cc_basename in
7642629baa8cSmrg          CC* | sunCC*)
7643629baa8cSmrg	    # Sun C++ 4.2, 5.x and Centerline C++
7644629baa8cSmrg            _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
7645629baa8cSmrg	    _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
7646629baa8cSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7647629baa8cSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7648629baa8cSmrg	      $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'
7649629baa8cSmrg
7650629baa8cSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7651629baa8cSmrg	    _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7652629baa8cSmrg	    case $host_os in
7653629baa8cSmrg	      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
7654629baa8cSmrg	      *)
7655629baa8cSmrg		# The compiler driver will combine and reorder linker options,
7656629baa8cSmrg		# but understands `-z linker_flag'.
7657629baa8cSmrg	        # Supported since Solaris 2.6 (maybe 2.5.1?)
7658629baa8cSmrg		_LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
7659629baa8cSmrg	        ;;
7660629baa8cSmrg	    esac
7661629baa8cSmrg	    _LT_TAGVAR(link_all_deplibs, $1)=yes
7662629baa8cSmrg
7663629baa8cSmrg	    output_verbose_link_cmd='func_echo_all'
7664629baa8cSmrg
7665629baa8cSmrg	    # Archives containing C++ object files must be created using
7666629baa8cSmrg	    # "CC -xar", where "CC" is the Sun C++ compiler.  This is
7667629baa8cSmrg	    # necessary to make sure instantiated templates are included
7668629baa8cSmrg	    # in the archive.
7669629baa8cSmrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
7670629baa8cSmrg	    ;;
7671629baa8cSmrg          gcx*)
7672629baa8cSmrg	    # Green Hills C++ Compiler
7673629baa8cSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
7674629baa8cSmrg
7675629baa8cSmrg	    # The C++ compiler must be used to create the archive.
7676629baa8cSmrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
7677629baa8cSmrg	    ;;
7678629baa8cSmrg          *)
7679629baa8cSmrg	    # GNU C++ compiler with Solaris linker
7680629baa8cSmrg	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
7681629baa8cSmrg	      _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
7682629baa8cSmrg	      if $CC --version | $GREP -v '^2\.7' > /dev/null; then
7683629baa8cSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
7684629baa8cSmrg	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7685629baa8cSmrg		  $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
7686629baa8cSmrg
7687629baa8cSmrg	        # Commands to make compiler produce verbose output that lists
7688629baa8cSmrg	        # what "hidden" libraries, object files and flags are used when
7689629baa8cSmrg	        # linking a shared library.
7690629baa8cSmrg	        output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
7691629baa8cSmrg	      else
7692629baa8cSmrg	        # g++ 2.7 appears to require `-G' NOT `-shared' on this
7693629baa8cSmrg	        # platform.
7694629baa8cSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
7695629baa8cSmrg	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7696629baa8cSmrg		  $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
7697629baa8cSmrg
7698629baa8cSmrg	        # Commands to make compiler produce verbose output that lists
7699629baa8cSmrg	        # what "hidden" libraries, object files and flags are used when
7700629baa8cSmrg	        # linking a shared library.
7701629baa8cSmrg	        output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
7702629baa8cSmrg	      fi
7703629baa8cSmrg
7704629baa8cSmrg	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
7705629baa8cSmrg	      case $host_os in
7706629baa8cSmrg		solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
7707629baa8cSmrg		*)
7708629baa8cSmrg		  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
7709629baa8cSmrg		  ;;
7710629baa8cSmrg	      esac
7711629baa8cSmrg	    fi
7712629baa8cSmrg	    ;;
7713629baa8cSmrg        esac
7714629baa8cSmrg        ;;
7715629baa8cSmrg
7716629baa8cSmrg    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
7717629baa8cSmrg      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
7718629baa8cSmrg      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7719629baa8cSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7720629baa8cSmrg      runpath_var='LD_RUN_PATH'
7721629baa8cSmrg
7722629baa8cSmrg      case $cc_basename in
7723629baa8cSmrg        CC*)
7724629baa8cSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7725629baa8cSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7726629baa8cSmrg	  ;;
7727629baa8cSmrg	*)
7728629baa8cSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7729629baa8cSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7730629baa8cSmrg	  ;;
7731629baa8cSmrg      esac
7732629baa8cSmrg      ;;
7733629baa8cSmrg
7734629baa8cSmrg      sysv5* | sco3.2v5* | sco5v6*)
7735629baa8cSmrg	# Note: We can NOT use -z defs as we might desire, because we do not
7736629baa8cSmrg	# link with -lc, and that would cause any symbols used from libc to
7737629baa8cSmrg	# always be unresolved, which means just about no library would
7738629baa8cSmrg	# ever link correctly.  If we're not using GNU ld we use -z text
7739629baa8cSmrg	# though, which does catch some bad symbols but isn't as heavy-handed
7740629baa8cSmrg	# as -z defs.
7741629baa8cSmrg	_LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
7742629baa8cSmrg	_LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
7743629baa8cSmrg	_LT_TAGVAR(archive_cmds_need_lc, $1)=no
7744629baa8cSmrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7745629baa8cSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
7746629baa8cSmrg	_LT_TAGVAR(hardcode_libdir_separator, $1)=':'
7747629baa8cSmrg	_LT_TAGVAR(link_all_deplibs, $1)=yes
7748629baa8cSmrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
7749629baa8cSmrg	runpath_var='LD_RUN_PATH'
7750629baa8cSmrg
7751629baa8cSmrg	case $cc_basename in
7752629baa8cSmrg          CC*)
7753629baa8cSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7754629baa8cSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7755629baa8cSmrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
7756629baa8cSmrg	      '"$_LT_TAGVAR(old_archive_cmds, $1)"
7757629baa8cSmrg	    _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
7758629baa8cSmrg	      '"$_LT_TAGVAR(reload_cmds, $1)"
7759629baa8cSmrg	    ;;
7760629baa8cSmrg	  *)
7761629baa8cSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7762629baa8cSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7763629baa8cSmrg	    ;;
7764629baa8cSmrg	esac
7765629baa8cSmrg      ;;
7766629baa8cSmrg
7767629baa8cSmrg      tandem*)
7768629baa8cSmrg        case $cc_basename in
7769629baa8cSmrg          NCC*)
7770629baa8cSmrg	    # NonStop-UX NCC 3.20
7771629baa8cSmrg	    # FIXME: insert proper C++ library support
7772629baa8cSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
7773629baa8cSmrg	    ;;
7774629baa8cSmrg          *)
7775629baa8cSmrg	    # FIXME: insert proper C++ library support
7776629baa8cSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
7777629baa8cSmrg	    ;;
7778629baa8cSmrg        esac
7779629baa8cSmrg        ;;
7780629baa8cSmrg
7781629baa8cSmrg      vxworks*)
7782629baa8cSmrg        # FIXME: insert proper C++ library support
7783629baa8cSmrg        _LT_TAGVAR(ld_shlibs, $1)=no
7784629baa8cSmrg        ;;
7785629baa8cSmrg
7786629baa8cSmrg      *)
7787629baa8cSmrg        # FIXME: insert proper C++ library support
7788629baa8cSmrg        _LT_TAGVAR(ld_shlibs, $1)=no
7789629baa8cSmrg        ;;
7790629baa8cSmrg    esac
7791629baa8cSmrg
7792629baa8cSmrg    AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
7793629baa8cSmrg    test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
7794629baa8cSmrg
7795629baa8cSmrg    _LT_TAGVAR(GCC, $1)="$GXX"
7796629baa8cSmrg    _LT_TAGVAR(LD, $1)="$LD"
7797629baa8cSmrg
7798629baa8cSmrg    ## CAVEAT EMPTOR:
7799629baa8cSmrg    ## There is no encapsulation within the following macros, do not change
7800629baa8cSmrg    ## the running order or otherwise move them around unless you know exactly
7801629baa8cSmrg    ## what you are doing...
7802629baa8cSmrg    _LT_SYS_HIDDEN_LIBDEPS($1)
7803629baa8cSmrg    _LT_COMPILER_PIC($1)
7804629baa8cSmrg    _LT_COMPILER_C_O($1)
7805629baa8cSmrg    _LT_COMPILER_FILE_LOCKS($1)
7806629baa8cSmrg    _LT_LINKER_SHLIBS($1)
7807629baa8cSmrg    _LT_SYS_DYNAMIC_LINKER($1)
7808629baa8cSmrg    _LT_LINKER_HARDCODE_LIBPATH($1)
7809629baa8cSmrg
7810629baa8cSmrg    _LT_CONFIG($1)
7811629baa8cSmrg  fi # test -n "$compiler"
7812629baa8cSmrg
7813629baa8cSmrg  CC=$lt_save_CC
7814629baa8cSmrg  CFLAGS=$lt_save_CFLAGS
7815629baa8cSmrg  LDCXX=$LD
7816629baa8cSmrg  LD=$lt_save_LD
7817629baa8cSmrg  GCC=$lt_save_GCC
7818629baa8cSmrg  with_gnu_ld=$lt_save_with_gnu_ld
7819629baa8cSmrg  lt_cv_path_LDCXX=$lt_cv_path_LD
7820629baa8cSmrg  lt_cv_path_LD=$lt_save_path_LD
7821629baa8cSmrg  lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
7822629baa8cSmrg  lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
7823629baa8cSmrgfi # test "$_lt_caught_CXX_error" != yes
7824629baa8cSmrg
7825629baa8cSmrgAC_LANG_POP
7826629baa8cSmrg])# _LT_LANG_CXX_CONFIG
7827629baa8cSmrg
7828629baa8cSmrg
7829629baa8cSmrg# _LT_FUNC_STRIPNAME_CNF
7830629baa8cSmrg# ----------------------
7831629baa8cSmrg# func_stripname_cnf prefix suffix name
7832629baa8cSmrg# strip PREFIX and SUFFIX off of NAME.
7833629baa8cSmrg# PREFIX and SUFFIX must not contain globbing or regex special
7834629baa8cSmrg# characters, hashes, percent signs, but SUFFIX may contain a leading
7835629baa8cSmrg# dot (in which case that matches only a dot).
78365ffd6003Smrg#
7837629baa8cSmrg# This function is identical to the (non-XSI) version of func_stripname,
7838629baa8cSmrg# except this one can be used by m4 code that may be executed by configure,
7839629baa8cSmrg# rather than the libtool script.
7840629baa8cSmrgm4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
7841629baa8cSmrgAC_REQUIRE([_LT_DECL_SED])
7842629baa8cSmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
7843629baa8cSmrgfunc_stripname_cnf ()
7844629baa8cSmrg{
7845629baa8cSmrg  case ${2} in
7846629baa8cSmrg  .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
7847629baa8cSmrg  *)  func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
7848629baa8cSmrg  esac
7849629baa8cSmrg} # func_stripname_cnf
7850629baa8cSmrg])# _LT_FUNC_STRIPNAME_CNF
7851629baa8cSmrg
7852629baa8cSmrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
7853629baa8cSmrg# ---------------------------------
7854629baa8cSmrg# Figure out "hidden" library dependencies from verbose
7855629baa8cSmrg# compiler output when linking a shared library.
7856629baa8cSmrg# Parse the compiler output and extract the necessary
7857629baa8cSmrg# objects, libraries and library flags.
7858629baa8cSmrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS],
7859629baa8cSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
7860629baa8cSmrgAC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
7861629baa8cSmrg# Dependencies to place before and after the object being linked:
7862629baa8cSmrg_LT_TAGVAR(predep_objects, $1)=
7863629baa8cSmrg_LT_TAGVAR(postdep_objects, $1)=
7864629baa8cSmrg_LT_TAGVAR(predeps, $1)=
7865629baa8cSmrg_LT_TAGVAR(postdeps, $1)=
7866629baa8cSmrg_LT_TAGVAR(compiler_lib_search_path, $1)=
7867629baa8cSmrg
7868629baa8cSmrgdnl we can't use the lt_simple_compile_test_code here,
7869629baa8cSmrgdnl because it contains code intended for an executable,
7870629baa8cSmrgdnl not a library.  It's possible we should let each
7871629baa8cSmrgdnl tag define a new lt_????_link_test_code variable,
7872629baa8cSmrgdnl but it's only used here...
7873629baa8cSmrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
7874629baa8cSmrgint a;
7875629baa8cSmrgvoid foo (void) { a = 0; }
7876629baa8cSmrg_LT_EOF
7877629baa8cSmrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
7878629baa8cSmrgclass Foo
7879629baa8cSmrg{
7880629baa8cSmrgpublic:
7881629baa8cSmrg  Foo (void) { a = 0; }
7882629baa8cSmrgprivate:
7883629baa8cSmrg  int a;
7884629baa8cSmrg};
7885629baa8cSmrg_LT_EOF
7886629baa8cSmrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
7887629baa8cSmrg      subroutine foo
7888629baa8cSmrg      implicit none
7889629baa8cSmrg      integer*4 a
7890629baa8cSmrg      a=0
7891629baa8cSmrg      return
7892629baa8cSmrg      end
7893629baa8cSmrg_LT_EOF
7894629baa8cSmrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
7895629baa8cSmrg      subroutine foo
7896629baa8cSmrg      implicit none
7897629baa8cSmrg      integer a
7898629baa8cSmrg      a=0
7899629baa8cSmrg      return
7900629baa8cSmrg      end
7901629baa8cSmrg_LT_EOF
7902629baa8cSmrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
7903629baa8cSmrgpublic class foo {
7904629baa8cSmrg  private int a;
7905629baa8cSmrg  public void bar (void) {
7906629baa8cSmrg    a = 0;
7907629baa8cSmrg  }
7908629baa8cSmrg};
7909629baa8cSmrg_LT_EOF
7910629baa8cSmrg])
7911145b7b3cSmrg
7912629baa8cSmrg_lt_libdeps_save_CFLAGS=$CFLAGS
7913629baa8cSmrgcase "$CC $CFLAGS " in #(
7914629baa8cSmrg*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
7915629baa8cSmrg*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
7916629baa8cSmrgesac
7917629baa8cSmrg
7918629baa8cSmrgdnl Parse the compiler output and extract the necessary
7919629baa8cSmrgdnl objects, libraries and library flags.
7920629baa8cSmrgif AC_TRY_EVAL(ac_compile); then
7921629baa8cSmrg  # Parse the compiler output and extract the necessary
7922629baa8cSmrg  # objects, libraries and library flags.
7923629baa8cSmrg
7924629baa8cSmrg  # Sentinel used to keep track of whether or not we are before
7925629baa8cSmrg  # the conftest object file.
7926629baa8cSmrg  pre_test_object_deps_done=no
7927629baa8cSmrg
7928629baa8cSmrg  for p in `eval "$output_verbose_link_cmd"`; do
7929629baa8cSmrg    case ${prev}${p} in
7930629baa8cSmrg
7931629baa8cSmrg    -L* | -R* | -l*)
7932629baa8cSmrg       # Some compilers place space between "-{L,R}" and the path.
7933629baa8cSmrg       # Remove the space.
7934629baa8cSmrg       if test $p = "-L" ||
7935629baa8cSmrg          test $p = "-R"; then
7936629baa8cSmrg	 prev=$p
7937629baa8cSmrg	 continue
7938629baa8cSmrg       fi
7939629baa8cSmrg
7940629baa8cSmrg       # Expand the sysroot to ease extracting the directories later.
7941629baa8cSmrg       if test -z "$prev"; then
7942629baa8cSmrg         case $p in
7943629baa8cSmrg         -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
7944629baa8cSmrg         -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
7945629baa8cSmrg         -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
7946629baa8cSmrg         esac
7947629baa8cSmrg       fi
7948629baa8cSmrg       case $p in
7949629baa8cSmrg       =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
7950629baa8cSmrg       esac
7951629baa8cSmrg       if test "$pre_test_object_deps_done" = no; then
7952629baa8cSmrg	 case ${prev} in
7953629baa8cSmrg	 -L | -R)
7954629baa8cSmrg	   # Internal compiler library paths should come after those
7955629baa8cSmrg	   # provided the user.  The postdeps already come after the
7956629baa8cSmrg	   # user supplied libs so there is no need to process them.
7957629baa8cSmrg	   if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
7958629baa8cSmrg	     _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
7959629baa8cSmrg	   else
7960629baa8cSmrg	     _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
7961629baa8cSmrg	   fi
7962629baa8cSmrg	   ;;
7963629baa8cSmrg	 # The "-l" case would never come before the object being
7964629baa8cSmrg	 # linked, so don't bother handling this case.
7965629baa8cSmrg	 esac
7966629baa8cSmrg       else
7967629baa8cSmrg	 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
7968629baa8cSmrg	   _LT_TAGVAR(postdeps, $1)="${prev}${p}"
7969629baa8cSmrg	 else
7970629baa8cSmrg	   _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
7971629baa8cSmrg	 fi
7972629baa8cSmrg       fi
7973629baa8cSmrg       prev=
7974629baa8cSmrg       ;;
7975629baa8cSmrg
7976629baa8cSmrg    *.lto.$objext) ;; # Ignore GCC LTO objects
7977629baa8cSmrg    *.$objext)
7978629baa8cSmrg       # This assumes that the test object file only shows up
7979629baa8cSmrg       # once in the compiler output.
7980629baa8cSmrg       if test "$p" = "conftest.$objext"; then
7981629baa8cSmrg	 pre_test_object_deps_done=yes
7982629baa8cSmrg	 continue
7983629baa8cSmrg       fi
7984629baa8cSmrg
7985629baa8cSmrg       if test "$pre_test_object_deps_done" = no; then
7986629baa8cSmrg	 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
7987629baa8cSmrg	   _LT_TAGVAR(predep_objects, $1)="$p"
7988629baa8cSmrg	 else
7989629baa8cSmrg	   _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
7990629baa8cSmrg	 fi
7991629baa8cSmrg       else
7992629baa8cSmrg	 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
7993629baa8cSmrg	   _LT_TAGVAR(postdep_objects, $1)="$p"
7994629baa8cSmrg	 else
7995629baa8cSmrg	   _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
7996629baa8cSmrg	 fi
7997629baa8cSmrg       fi
7998629baa8cSmrg       ;;
7999629baa8cSmrg
8000629baa8cSmrg    *) ;; # Ignore the rest.
8001629baa8cSmrg
8002629baa8cSmrg    esac
8003629baa8cSmrg  done
8004629baa8cSmrg
8005629baa8cSmrg  # Clean up.
8006629baa8cSmrg  rm -f a.out a.exe
8007629baa8cSmrgelse
8008629baa8cSmrg  echo "libtool.m4: error: problem compiling $1 test program"
8009629baa8cSmrgfi
8010629baa8cSmrg
8011629baa8cSmrg$RM -f confest.$objext
8012629baa8cSmrgCFLAGS=$_lt_libdeps_save_CFLAGS
8013629baa8cSmrg
8014629baa8cSmrg# PORTME: override above test on systems where it is broken
8015629baa8cSmrgm4_if([$1], [CXX],
8016629baa8cSmrg[case $host_os in
8017629baa8cSmrginterix[[3-9]]*)
8018629baa8cSmrg  # Interix 3.5 installs completely hosed .la files for C++, so rather than
8019629baa8cSmrg  # hack all around it, let's just trust "g++" to DTRT.
8020629baa8cSmrg  _LT_TAGVAR(predep_objects,$1)=
8021629baa8cSmrg  _LT_TAGVAR(postdep_objects,$1)=
8022629baa8cSmrg  _LT_TAGVAR(postdeps,$1)=
8023629baa8cSmrg  ;;
8024629baa8cSmrg
8025629baa8cSmrglinux*)
8026629baa8cSmrg  case `$CC -V 2>&1 | sed 5q` in
8027629baa8cSmrg  *Sun\ C*)
8028629baa8cSmrg    # Sun C++ 5.9
8029629baa8cSmrg
8030629baa8cSmrg    # The more standards-conforming stlport4 library is
8031629baa8cSmrg    # incompatible with the Cstd library. Avoid specifying
8032629baa8cSmrg    # it if it's in CXXFLAGS. Ignore libCrun as
8033629baa8cSmrg    # -library=stlport4 depends on it.
8034629baa8cSmrg    case " $CXX $CXXFLAGS " in
8035629baa8cSmrg    *" -library=stlport4 "*)
8036629baa8cSmrg      solaris_use_stlport4=yes
8037629baa8cSmrg      ;;
8038629baa8cSmrg    esac
8039629baa8cSmrg
8040629baa8cSmrg    if test "$solaris_use_stlport4" != yes; then
8041629baa8cSmrg      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
8042629baa8cSmrg    fi
8043629baa8cSmrg    ;;
8044629baa8cSmrg  esac
8045629baa8cSmrg  ;;
8046629baa8cSmrg
8047629baa8cSmrgsolaris*)
8048629baa8cSmrg  case $cc_basename in
8049629baa8cSmrg  CC* | sunCC*)
8050629baa8cSmrg    # The more standards-conforming stlport4 library is
8051629baa8cSmrg    # incompatible with the Cstd library. Avoid specifying
8052629baa8cSmrg    # it if it's in CXXFLAGS. Ignore libCrun as
8053629baa8cSmrg    # -library=stlport4 depends on it.
8054629baa8cSmrg    case " $CXX $CXXFLAGS " in
8055629baa8cSmrg    *" -library=stlport4 "*)
8056629baa8cSmrg      solaris_use_stlport4=yes
8057629baa8cSmrg      ;;
8058629baa8cSmrg    esac
8059629baa8cSmrg
8060629baa8cSmrg    # Adding this requires a known-good setup of shared libraries for
8061629baa8cSmrg    # Sun compiler versions before 5.6, else PIC objects from an old
8062629baa8cSmrg    # archive will be linked into the output, leading to subtle bugs.
8063629baa8cSmrg    if test "$solaris_use_stlport4" != yes; then
8064629baa8cSmrg      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
8065629baa8cSmrg    fi
8066629baa8cSmrg    ;;
8067629baa8cSmrg  esac
8068629baa8cSmrg  ;;
8069629baa8cSmrgesac
8070629baa8cSmrg])
8071629baa8cSmrg
8072629baa8cSmrgcase " $_LT_TAGVAR(postdeps, $1) " in
8073629baa8cSmrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
8074629baa8cSmrgesac
8075629baa8cSmrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=
8076629baa8cSmrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
8077629baa8cSmrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
8078629baa8cSmrgfi
8079629baa8cSmrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1],
8080629baa8cSmrg    [The directories searched by this compiler when creating a shared library])
8081629baa8cSmrg_LT_TAGDECL([], [predep_objects], [1],
8082629baa8cSmrg    [Dependencies to place before and after the objects being linked to
8083629baa8cSmrg    create a shared library])
8084629baa8cSmrg_LT_TAGDECL([], [postdep_objects], [1])
8085629baa8cSmrg_LT_TAGDECL([], [predeps], [1])
8086629baa8cSmrg_LT_TAGDECL([], [postdeps], [1])
8087629baa8cSmrg_LT_TAGDECL([], [compiler_lib_search_path], [1],
8088629baa8cSmrg    [The library search path used internally by the compiler when linking
8089629baa8cSmrg    a shared library])
8090629baa8cSmrg])# _LT_SYS_HIDDEN_LIBDEPS
8091629baa8cSmrg
8092629baa8cSmrg
8093629baa8cSmrg# _LT_LANG_F77_CONFIG([TAG])
8094629baa8cSmrg# --------------------------
8095629baa8cSmrg# Ensure that the configuration variables for a Fortran 77 compiler are
8096629baa8cSmrg# suitably defined.  These variables are subsequently used by _LT_CONFIG
8097629baa8cSmrg# to write the compiler configuration to `libtool'.
8098629baa8cSmrgm4_defun([_LT_LANG_F77_CONFIG],
8099629baa8cSmrg[AC_LANG_PUSH(Fortran 77)
8100629baa8cSmrgif test -z "$F77" || test "X$F77" = "Xno"; then
8101629baa8cSmrg  _lt_disable_F77=yes
8102629baa8cSmrgfi
8103629baa8cSmrg
8104629baa8cSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
8105629baa8cSmrg_LT_TAGVAR(allow_undefined_flag, $1)=
8106629baa8cSmrg_LT_TAGVAR(always_export_symbols, $1)=no
8107629baa8cSmrg_LT_TAGVAR(archive_expsym_cmds, $1)=
8108629baa8cSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)=
8109629baa8cSmrg_LT_TAGVAR(hardcode_direct, $1)=no
8110629baa8cSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no
8111629baa8cSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
8112629baa8cSmrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
8113629baa8cSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)=
8114629baa8cSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no
8115629baa8cSmrg_LT_TAGVAR(hardcode_automatic, $1)=no
8116629baa8cSmrg_LT_TAGVAR(inherit_rpath, $1)=no
8117629baa8cSmrg_LT_TAGVAR(module_cmds, $1)=
8118629baa8cSmrg_LT_TAGVAR(module_expsym_cmds, $1)=
8119629baa8cSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown
8120629baa8cSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8121629baa8cSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag
8122629baa8cSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
8123629baa8cSmrg_LT_TAGVAR(no_undefined_flag, $1)=
8124629baa8cSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)=
8125629baa8cSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
8126629baa8cSmrg
8127629baa8cSmrg# Source file extension for f77 test sources.
8128629baa8cSmrgac_ext=f
8129629baa8cSmrg
8130629baa8cSmrg# Object file extension for compiled f77 test sources.
8131629baa8cSmrgobjext=o
8132629baa8cSmrg_LT_TAGVAR(objext, $1)=$objext
8133629baa8cSmrg
8134629baa8cSmrg# No sense in running all these tests if we already determined that
8135629baa8cSmrg# the F77 compiler isn't working.  Some variables (like enable_shared)
8136629baa8cSmrg# are currently assumed to apply to all compilers on this platform,
8137629baa8cSmrg# and will be corrupted by setting them based on a non-working compiler.
8138629baa8cSmrgif test "$_lt_disable_F77" != yes; then
8139629baa8cSmrg  # Code to be used in simple compile tests
8140629baa8cSmrg  lt_simple_compile_test_code="\
8141629baa8cSmrg      subroutine t
8142629baa8cSmrg      return
8143629baa8cSmrg      end
8144629baa8cSmrg"
8145629baa8cSmrg
8146629baa8cSmrg  # Code to be used in simple link tests
8147629baa8cSmrg  lt_simple_link_test_code="\
8148629baa8cSmrg      program t
8149629baa8cSmrg      end
8150629baa8cSmrg"
8151629baa8cSmrg
8152629baa8cSmrg  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8153629baa8cSmrg  _LT_TAG_COMPILER
8154629baa8cSmrg
8155629baa8cSmrg  # save warnings/boilerplate of simple test code
8156629baa8cSmrg  _LT_COMPILER_BOILERPLATE
8157629baa8cSmrg  _LT_LINKER_BOILERPLATE
8158629baa8cSmrg
8159629baa8cSmrg  # Allow CC to be a program name with arguments.
8160629baa8cSmrg  lt_save_CC="$CC"
8161629baa8cSmrg  lt_save_GCC=$GCC
8162629baa8cSmrg  lt_save_CFLAGS=$CFLAGS
8163629baa8cSmrg  CC=${F77-"f77"}
8164629baa8cSmrg  CFLAGS=$FFLAGS
8165629baa8cSmrg  compiler=$CC
8166629baa8cSmrg  _LT_TAGVAR(compiler, $1)=$CC
8167629baa8cSmrg  _LT_CC_BASENAME([$compiler])
8168629baa8cSmrg  GCC=$G77
8169629baa8cSmrg  if test -n "$compiler"; then
8170629baa8cSmrg    AC_MSG_CHECKING([if libtool supports shared libraries])
8171629baa8cSmrg    AC_MSG_RESULT([$can_build_shared])
8172629baa8cSmrg
8173629baa8cSmrg    AC_MSG_CHECKING([whether to build shared libraries])
8174629baa8cSmrg    test "$can_build_shared" = "no" && enable_shared=no
8175629baa8cSmrg
8176629baa8cSmrg    # On AIX, shared libraries and static libraries use the same namespace, and
8177629baa8cSmrg    # are all built from PIC.
8178629baa8cSmrg    case $host_os in
8179629baa8cSmrg      aix3*)
8180629baa8cSmrg        test "$enable_shared" = yes && enable_static=no
8181629baa8cSmrg        if test -n "$RANLIB"; then
8182629baa8cSmrg          archive_cmds="$archive_cmds~\$RANLIB \$lib"
8183629baa8cSmrg          postinstall_cmds='$RANLIB $lib'
8184629baa8cSmrg        fi
8185629baa8cSmrg        ;;
8186629baa8cSmrg      aix[[4-9]]*)
8187629baa8cSmrg	if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
8188629baa8cSmrg	  test "$enable_shared" = yes && enable_static=no
8189145b7b3cSmrg	fi
8190629baa8cSmrg        ;;
8191629baa8cSmrg    esac
8192629baa8cSmrg    AC_MSG_RESULT([$enable_shared])
8193629baa8cSmrg
8194629baa8cSmrg    AC_MSG_CHECKING([whether to build static libraries])
8195629baa8cSmrg    # Make sure either enable_shared or enable_static is yes.
8196629baa8cSmrg    test "$enable_shared" = yes || enable_static=yes
8197629baa8cSmrg    AC_MSG_RESULT([$enable_static])
8198629baa8cSmrg
8199629baa8cSmrg    _LT_TAGVAR(GCC, $1)="$G77"
8200629baa8cSmrg    _LT_TAGVAR(LD, $1)="$LD"
8201629baa8cSmrg
8202629baa8cSmrg    ## CAVEAT EMPTOR:
8203629baa8cSmrg    ## There is no encapsulation within the following macros, do not change
8204629baa8cSmrg    ## the running order or otherwise move them around unless you know exactly
8205629baa8cSmrg    ## what you are doing...
8206629baa8cSmrg    _LT_COMPILER_PIC($1)
8207629baa8cSmrg    _LT_COMPILER_C_O($1)
8208629baa8cSmrg    _LT_COMPILER_FILE_LOCKS($1)
8209629baa8cSmrg    _LT_LINKER_SHLIBS($1)
8210629baa8cSmrg    _LT_SYS_DYNAMIC_LINKER($1)
8211629baa8cSmrg    _LT_LINKER_HARDCODE_LIBPATH($1)
8212629baa8cSmrg
8213629baa8cSmrg    _LT_CONFIG($1)
8214629baa8cSmrg  fi # test -n "$compiler"
8215629baa8cSmrg
8216629baa8cSmrg  GCC=$lt_save_GCC
8217629baa8cSmrg  CC="$lt_save_CC"
8218629baa8cSmrg  CFLAGS="$lt_save_CFLAGS"
8219629baa8cSmrgfi # test "$_lt_disable_F77" != yes
8220629baa8cSmrg
8221629baa8cSmrgAC_LANG_POP
8222629baa8cSmrg])# _LT_LANG_F77_CONFIG
8223629baa8cSmrg
8224629baa8cSmrg
8225629baa8cSmrg# _LT_LANG_FC_CONFIG([TAG])
8226629baa8cSmrg# -------------------------
8227629baa8cSmrg# Ensure that the configuration variables for a Fortran compiler are
8228629baa8cSmrg# suitably defined.  These variables are subsequently used by _LT_CONFIG
8229629baa8cSmrg# to write the compiler configuration to `libtool'.
8230629baa8cSmrgm4_defun([_LT_LANG_FC_CONFIG],
8231629baa8cSmrg[AC_LANG_PUSH(Fortran)
8232629baa8cSmrg
8233629baa8cSmrgif test -z "$FC" || test "X$FC" = "Xno"; then
8234629baa8cSmrg  _lt_disable_FC=yes
8235629baa8cSmrgfi
8236629baa8cSmrg
8237629baa8cSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
8238629baa8cSmrg_LT_TAGVAR(allow_undefined_flag, $1)=
8239629baa8cSmrg_LT_TAGVAR(always_export_symbols, $1)=no
8240629baa8cSmrg_LT_TAGVAR(archive_expsym_cmds, $1)=
8241629baa8cSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)=
8242629baa8cSmrg_LT_TAGVAR(hardcode_direct, $1)=no
8243629baa8cSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no
8244629baa8cSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
8245629baa8cSmrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
8246629baa8cSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)=
8247629baa8cSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no
8248629baa8cSmrg_LT_TAGVAR(hardcode_automatic, $1)=no
8249629baa8cSmrg_LT_TAGVAR(inherit_rpath, $1)=no
8250629baa8cSmrg_LT_TAGVAR(module_cmds, $1)=
8251629baa8cSmrg_LT_TAGVAR(module_expsym_cmds, $1)=
8252629baa8cSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown
8253629baa8cSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8254629baa8cSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag
8255629baa8cSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
8256629baa8cSmrg_LT_TAGVAR(no_undefined_flag, $1)=
8257629baa8cSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)=
8258629baa8cSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
8259629baa8cSmrg
8260629baa8cSmrg# Source file extension for fc test sources.
8261629baa8cSmrgac_ext=${ac_fc_srcext-f}
8262629baa8cSmrg
8263629baa8cSmrg# Object file extension for compiled fc test sources.
8264629baa8cSmrgobjext=o
8265629baa8cSmrg_LT_TAGVAR(objext, $1)=$objext
8266629baa8cSmrg
8267629baa8cSmrg# No sense in running all these tests if we already determined that
8268629baa8cSmrg# the FC compiler isn't working.  Some variables (like enable_shared)
8269629baa8cSmrg# are currently assumed to apply to all compilers on this platform,
8270629baa8cSmrg# and will be corrupted by setting them based on a non-working compiler.
8271629baa8cSmrgif test "$_lt_disable_FC" != yes; then
8272629baa8cSmrg  # Code to be used in simple compile tests
8273629baa8cSmrg  lt_simple_compile_test_code="\
8274629baa8cSmrg      subroutine t
8275629baa8cSmrg      return
8276629baa8cSmrg      end
8277629baa8cSmrg"
8278629baa8cSmrg
8279629baa8cSmrg  # Code to be used in simple link tests
8280629baa8cSmrg  lt_simple_link_test_code="\
8281629baa8cSmrg      program t
8282629baa8cSmrg      end
8283629baa8cSmrg"
8284629baa8cSmrg
8285629baa8cSmrg  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8286629baa8cSmrg  _LT_TAG_COMPILER
8287629baa8cSmrg
8288629baa8cSmrg  # save warnings/boilerplate of simple test code
8289629baa8cSmrg  _LT_COMPILER_BOILERPLATE
8290629baa8cSmrg  _LT_LINKER_BOILERPLATE
8291629baa8cSmrg
8292629baa8cSmrg  # Allow CC to be a program name with arguments.
8293629baa8cSmrg  lt_save_CC="$CC"
8294629baa8cSmrg  lt_save_GCC=$GCC
8295629baa8cSmrg  lt_save_CFLAGS=$CFLAGS
8296629baa8cSmrg  CC=${FC-"f95"}
8297629baa8cSmrg  CFLAGS=$FCFLAGS
8298629baa8cSmrg  compiler=$CC
8299629baa8cSmrg  GCC=$ac_cv_fc_compiler_gnu
8300629baa8cSmrg
8301629baa8cSmrg  _LT_TAGVAR(compiler, $1)=$CC
8302629baa8cSmrg  _LT_CC_BASENAME([$compiler])
8303629baa8cSmrg
8304629baa8cSmrg  if test -n "$compiler"; then
8305629baa8cSmrg    AC_MSG_CHECKING([if libtool supports shared libraries])
8306629baa8cSmrg    AC_MSG_RESULT([$can_build_shared])
8307629baa8cSmrg
8308629baa8cSmrg    AC_MSG_CHECKING([whether to build shared libraries])
8309629baa8cSmrg    test "$can_build_shared" = "no" && enable_shared=no
8310629baa8cSmrg
8311629baa8cSmrg    # On AIX, shared libraries and static libraries use the same namespace, and
8312629baa8cSmrg    # are all built from PIC.
8313629baa8cSmrg    case $host_os in
8314629baa8cSmrg      aix3*)
8315629baa8cSmrg        test "$enable_shared" = yes && enable_static=no
8316629baa8cSmrg        if test -n "$RANLIB"; then
8317629baa8cSmrg          archive_cmds="$archive_cmds~\$RANLIB \$lib"
8318629baa8cSmrg          postinstall_cmds='$RANLIB $lib'
8319629baa8cSmrg        fi
8320629baa8cSmrg        ;;
8321629baa8cSmrg      aix[[4-9]]*)
8322629baa8cSmrg	if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
8323629baa8cSmrg	  test "$enable_shared" = yes && enable_static=no
8324145b7b3cSmrg	fi
8325629baa8cSmrg        ;;
8326629baa8cSmrg    esac
8327629baa8cSmrg    AC_MSG_RESULT([$enable_shared])
8328629baa8cSmrg
8329629baa8cSmrg    AC_MSG_CHECKING([whether to build static libraries])
8330629baa8cSmrg    # Make sure either enable_shared or enable_static is yes.
8331629baa8cSmrg    test "$enable_shared" = yes || enable_static=yes
8332629baa8cSmrg    AC_MSG_RESULT([$enable_static])
8333629baa8cSmrg
8334629baa8cSmrg    _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
8335629baa8cSmrg    _LT_TAGVAR(LD, $1)="$LD"
8336629baa8cSmrg
8337629baa8cSmrg    ## CAVEAT EMPTOR:
8338629baa8cSmrg    ## There is no encapsulation within the following macros, do not change
8339629baa8cSmrg    ## the running order or otherwise move them around unless you know exactly
8340629baa8cSmrg    ## what you are doing...
8341629baa8cSmrg    _LT_SYS_HIDDEN_LIBDEPS($1)
8342629baa8cSmrg    _LT_COMPILER_PIC($1)
8343629baa8cSmrg    _LT_COMPILER_C_O($1)
8344629baa8cSmrg    _LT_COMPILER_FILE_LOCKS($1)
8345629baa8cSmrg    _LT_LINKER_SHLIBS($1)
8346629baa8cSmrg    _LT_SYS_DYNAMIC_LINKER($1)
8347629baa8cSmrg    _LT_LINKER_HARDCODE_LIBPATH($1)
8348629baa8cSmrg
8349629baa8cSmrg    _LT_CONFIG($1)
8350629baa8cSmrg  fi # test -n "$compiler"
8351629baa8cSmrg
8352629baa8cSmrg  GCC=$lt_save_GCC
8353629baa8cSmrg  CC=$lt_save_CC
8354629baa8cSmrg  CFLAGS=$lt_save_CFLAGS
8355629baa8cSmrgfi # test "$_lt_disable_FC" != yes
8356629baa8cSmrg
8357629baa8cSmrgAC_LANG_POP
8358629baa8cSmrg])# _LT_LANG_FC_CONFIG
8359629baa8cSmrg
8360629baa8cSmrg
8361629baa8cSmrg# _LT_LANG_GCJ_CONFIG([TAG])
8362629baa8cSmrg# --------------------------
8363629baa8cSmrg# Ensure that the configuration variables for the GNU Java Compiler compiler
8364629baa8cSmrg# are suitably defined.  These variables are subsequently used by _LT_CONFIG
8365629baa8cSmrg# to write the compiler configuration to `libtool'.
8366629baa8cSmrgm4_defun([_LT_LANG_GCJ_CONFIG],
8367629baa8cSmrg[AC_REQUIRE([LT_PROG_GCJ])dnl
8368629baa8cSmrgAC_LANG_SAVE
8369629baa8cSmrg
8370629baa8cSmrg# Source file extension for Java test sources.
8371629baa8cSmrgac_ext=java
8372629baa8cSmrg
8373629baa8cSmrg# Object file extension for compiled Java test sources.
8374629baa8cSmrgobjext=o
8375629baa8cSmrg_LT_TAGVAR(objext, $1)=$objext
8376629baa8cSmrg
8377629baa8cSmrg# Code to be used in simple compile tests
8378629baa8cSmrglt_simple_compile_test_code="class foo {}"
8379629baa8cSmrg
8380629baa8cSmrg# Code to be used in simple link tests
8381629baa8cSmrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
8382629baa8cSmrg
8383629baa8cSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
8384629baa8cSmrg_LT_TAG_COMPILER
8385629baa8cSmrg
8386629baa8cSmrg# save warnings/boilerplate of simple test code
8387629baa8cSmrg_LT_COMPILER_BOILERPLATE
8388629baa8cSmrg_LT_LINKER_BOILERPLATE
8389629baa8cSmrg
8390629baa8cSmrg# Allow CC to be a program name with arguments.
8391629baa8cSmrglt_save_CC=$CC
8392629baa8cSmrglt_save_CFLAGS=$CFLAGS
8393629baa8cSmrglt_save_GCC=$GCC
8394629baa8cSmrgGCC=yes
8395629baa8cSmrgCC=${GCJ-"gcj"}
8396629baa8cSmrgCFLAGS=$GCJFLAGS
8397629baa8cSmrgcompiler=$CC
8398629baa8cSmrg_LT_TAGVAR(compiler, $1)=$CC
8399629baa8cSmrg_LT_TAGVAR(LD, $1)="$LD"
8400629baa8cSmrg_LT_CC_BASENAME([$compiler])
8401629baa8cSmrg
8402629baa8cSmrg# GCJ did not exist at the time GCC didn't implicitly link libc in.
8403629baa8cSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
8404629baa8cSmrg
8405629baa8cSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8406629baa8cSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag
8407629baa8cSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
8408629baa8cSmrg
8409629baa8cSmrgif test -n "$compiler"; then
8410629baa8cSmrg  _LT_COMPILER_NO_RTTI($1)
8411629baa8cSmrg  _LT_COMPILER_PIC($1)
8412629baa8cSmrg  _LT_COMPILER_C_O($1)
8413629baa8cSmrg  _LT_COMPILER_FILE_LOCKS($1)
8414629baa8cSmrg  _LT_LINKER_SHLIBS($1)
8415629baa8cSmrg  _LT_LINKER_HARDCODE_LIBPATH($1)
8416629baa8cSmrg
8417629baa8cSmrg  _LT_CONFIG($1)
8418629baa8cSmrgfi
8419629baa8cSmrg
8420629baa8cSmrgAC_LANG_RESTORE
8421629baa8cSmrg
8422629baa8cSmrgGCC=$lt_save_GCC
8423629baa8cSmrgCC=$lt_save_CC
8424629baa8cSmrgCFLAGS=$lt_save_CFLAGS
8425629baa8cSmrg])# _LT_LANG_GCJ_CONFIG
8426629baa8cSmrg
8427629baa8cSmrg
8428629baa8cSmrg# _LT_LANG_RC_CONFIG([TAG])
8429629baa8cSmrg# -------------------------
8430629baa8cSmrg# Ensure that the configuration variables for the Windows resource compiler
8431629baa8cSmrg# are suitably defined.  These variables are subsequently used by _LT_CONFIG
8432629baa8cSmrg# to write the compiler configuration to `libtool'.
8433629baa8cSmrgm4_defun([_LT_LANG_RC_CONFIG],
8434629baa8cSmrg[AC_REQUIRE([LT_PROG_RC])dnl
8435629baa8cSmrgAC_LANG_SAVE
8436629baa8cSmrg
8437629baa8cSmrg# Source file extension for RC test sources.
8438629baa8cSmrgac_ext=rc
8439629baa8cSmrg
8440629baa8cSmrg# Object file extension for compiled RC test sources.
8441629baa8cSmrgobjext=o
8442629baa8cSmrg_LT_TAGVAR(objext, $1)=$objext
8443629baa8cSmrg
8444629baa8cSmrg# Code to be used in simple compile tests
8445629baa8cSmrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
8446629baa8cSmrg
8447629baa8cSmrg# Code to be used in simple link tests
8448629baa8cSmrglt_simple_link_test_code="$lt_simple_compile_test_code"
8449629baa8cSmrg
8450629baa8cSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
8451629baa8cSmrg_LT_TAG_COMPILER
8452629baa8cSmrg
8453629baa8cSmrg# save warnings/boilerplate of simple test code
8454629baa8cSmrg_LT_COMPILER_BOILERPLATE
8455629baa8cSmrg_LT_LINKER_BOILERPLATE
8456629baa8cSmrg
8457629baa8cSmrg# Allow CC to be a program name with arguments.
8458629baa8cSmrglt_save_CC="$CC"
8459629baa8cSmrglt_save_CFLAGS=$CFLAGS
8460629baa8cSmrglt_save_GCC=$GCC
8461629baa8cSmrgGCC=
8462629baa8cSmrgCC=${RC-"windres"}
8463629baa8cSmrgCFLAGS=
8464629baa8cSmrgcompiler=$CC
8465629baa8cSmrg_LT_TAGVAR(compiler, $1)=$CC
8466629baa8cSmrg_LT_CC_BASENAME([$compiler])
8467629baa8cSmrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
8468629baa8cSmrg
8469629baa8cSmrgif test -n "$compiler"; then
8470629baa8cSmrg  :
8471629baa8cSmrg  _LT_CONFIG($1)
8472629baa8cSmrgfi
8473629baa8cSmrg
8474629baa8cSmrgGCC=$lt_save_GCC
8475629baa8cSmrgAC_LANG_RESTORE
8476629baa8cSmrgCC=$lt_save_CC
8477629baa8cSmrgCFLAGS=$lt_save_CFLAGS
8478629baa8cSmrg])# _LT_LANG_RC_CONFIG
8479629baa8cSmrg
8480629baa8cSmrg
8481629baa8cSmrg# LT_PROG_GCJ
8482629baa8cSmrg# -----------
8483629baa8cSmrgAC_DEFUN([LT_PROG_GCJ],
8484629baa8cSmrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
8485629baa8cSmrg  [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
8486629baa8cSmrg    [AC_CHECK_TOOL(GCJ, gcj,)
8487629baa8cSmrg      test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
8488629baa8cSmrg      AC_SUBST(GCJFLAGS)])])[]dnl
8489629baa8cSmrg])
8490629baa8cSmrg
8491629baa8cSmrg# Old name:
8492629baa8cSmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
8493629baa8cSmrgdnl aclocal-1.4 backwards compatibility:
8494629baa8cSmrgdnl AC_DEFUN([LT_AC_PROG_GCJ], [])
8495629baa8cSmrg
8496629baa8cSmrg
8497629baa8cSmrg# LT_PROG_RC
8498629baa8cSmrg# ----------
8499629baa8cSmrgAC_DEFUN([LT_PROG_RC],
8500629baa8cSmrg[AC_CHECK_TOOL(RC, windres,)
8501629baa8cSmrg])
8502629baa8cSmrg
8503629baa8cSmrg# Old name:
8504629baa8cSmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
8505629baa8cSmrgdnl aclocal-1.4 backwards compatibility:
8506629baa8cSmrgdnl AC_DEFUN([LT_AC_PROG_RC], [])
8507629baa8cSmrg
8508629baa8cSmrg
8509629baa8cSmrg# _LT_DECL_EGREP
8510629baa8cSmrg# --------------
8511629baa8cSmrg# If we don't have a new enough Autoconf to choose the best grep
8512629baa8cSmrg# available, choose the one first in the user's PATH.
8513629baa8cSmrgm4_defun([_LT_DECL_EGREP],
8514629baa8cSmrg[AC_REQUIRE([AC_PROG_EGREP])dnl
8515629baa8cSmrgAC_REQUIRE([AC_PROG_FGREP])dnl
8516629baa8cSmrgtest -z "$GREP" && GREP=grep
8517629baa8cSmrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines])
8518629baa8cSmrg_LT_DECL([], [EGREP], [1], [An ERE matcher])
8519629baa8cSmrg_LT_DECL([], [FGREP], [1], [A literal string matcher])
8520629baa8cSmrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
8521629baa8cSmrgAC_SUBST([GREP])
8522629baa8cSmrg])
8523629baa8cSmrg
8524629baa8cSmrg
8525629baa8cSmrg# _LT_DECL_OBJDUMP
8526629baa8cSmrg# --------------
8527629baa8cSmrg# If we don't have a new enough Autoconf to choose the best objdump
8528629baa8cSmrg# available, choose the one first in the user's PATH.
8529629baa8cSmrgm4_defun([_LT_DECL_OBJDUMP],
8530629baa8cSmrg[AC_CHECK_TOOL(OBJDUMP, objdump, false)
8531629baa8cSmrgtest -z "$OBJDUMP" && OBJDUMP=objdump
8532629baa8cSmrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
8533629baa8cSmrgAC_SUBST([OBJDUMP])
8534629baa8cSmrg])
8535629baa8cSmrg
8536629baa8cSmrg# _LT_DECL_DLLTOOL
8537629baa8cSmrg# ----------------
8538629baa8cSmrg# Ensure DLLTOOL variable is set.
8539629baa8cSmrgm4_defun([_LT_DECL_DLLTOOL],
8540629baa8cSmrg[AC_CHECK_TOOL(DLLTOOL, dlltool, false)
8541629baa8cSmrgtest -z "$DLLTOOL" && DLLTOOL=dlltool
8542629baa8cSmrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program])
8543629baa8cSmrgAC_SUBST([DLLTOOL])
8544629baa8cSmrg])
8545629baa8cSmrg
8546629baa8cSmrg# _LT_DECL_SED
8547629baa8cSmrg# ------------
8548629baa8cSmrg# Check for a fully-functional sed program, that truncates
8549629baa8cSmrg# as few characters as possible.  Prefer GNU sed if found.
8550629baa8cSmrgm4_defun([_LT_DECL_SED],
8551629baa8cSmrg[AC_PROG_SED
8552629baa8cSmrgtest -z "$SED" && SED=sed
8553629baa8cSmrgXsed="$SED -e 1s/^X//"
8554629baa8cSmrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output])
8555629baa8cSmrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
8556629baa8cSmrg    [Sed that helps us avoid accidentally triggering echo(1) options like -n])
8557629baa8cSmrg])# _LT_DECL_SED
8558629baa8cSmrg
8559629baa8cSmrgm4_ifndef([AC_PROG_SED], [
8560629baa8cSmrg# NOTE: This macro has been submitted for inclusion into   #
8561629baa8cSmrg#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
8562629baa8cSmrg#  a released version of Autoconf we should remove this    #
8563629baa8cSmrg#  macro and use it instead.                               #
8564629baa8cSmrg
8565629baa8cSmrgm4_defun([AC_PROG_SED],
8566629baa8cSmrg[AC_MSG_CHECKING([for a sed that does not truncate output])
8567629baa8cSmrgAC_CACHE_VAL(lt_cv_path_SED,
8568629baa8cSmrg[# Loop through the user's path and test for sed and gsed.
8569629baa8cSmrg# Then use that list of sed's as ones to test for truncation.
8570629baa8cSmrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8571629baa8cSmrgfor as_dir in $PATH
8572629baa8cSmrgdo
8573629baa8cSmrg  IFS=$as_save_IFS
8574629baa8cSmrg  test -z "$as_dir" && as_dir=.
8575629baa8cSmrg  for lt_ac_prog in sed gsed; do
8576629baa8cSmrg    for ac_exec_ext in '' $ac_executable_extensions; do
8577629baa8cSmrg      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
8578629baa8cSmrg        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
8579629baa8cSmrg      fi
8580629baa8cSmrg    done
8581629baa8cSmrg  done
8582629baa8cSmrgdone
8583629baa8cSmrgIFS=$as_save_IFS
8584629baa8cSmrglt_ac_max=0
8585629baa8cSmrglt_ac_count=0
8586629baa8cSmrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris
8587629baa8cSmrg# along with /bin/sed that truncates output.
8588629baa8cSmrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
8589629baa8cSmrg  test ! -f $lt_ac_sed && continue
8590629baa8cSmrg  cat /dev/null > conftest.in
8591629baa8cSmrg  lt_ac_count=0
8592629baa8cSmrg  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
8593629baa8cSmrg  # Check for GNU sed and select it if it is found.
8594629baa8cSmrg  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
8595629baa8cSmrg    lt_cv_path_SED=$lt_ac_sed
8596629baa8cSmrg    break
8597629baa8cSmrg  fi
8598629baa8cSmrg  while true; do
8599629baa8cSmrg    cat conftest.in conftest.in >conftest.tmp
8600629baa8cSmrg    mv conftest.tmp conftest.in
8601629baa8cSmrg    cp conftest.in conftest.nl
8602629baa8cSmrg    echo >>conftest.nl
8603629baa8cSmrg    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
8604629baa8cSmrg    cmp -s conftest.out conftest.nl || break
8605629baa8cSmrg    # 10000 chars as input seems more than enough
8606629baa8cSmrg    test $lt_ac_count -gt 10 && break
8607629baa8cSmrg    lt_ac_count=`expr $lt_ac_count + 1`
8608629baa8cSmrg    if test $lt_ac_count -gt $lt_ac_max; then
8609629baa8cSmrg      lt_ac_max=$lt_ac_count
8610629baa8cSmrg      lt_cv_path_SED=$lt_ac_sed
8611629baa8cSmrg    fi
8612629baa8cSmrg  done
8613629baa8cSmrgdone
8614629baa8cSmrg])
8615629baa8cSmrgSED=$lt_cv_path_SED
8616629baa8cSmrgAC_SUBST([SED])
8617629baa8cSmrgAC_MSG_RESULT([$SED])
8618629baa8cSmrg])#AC_PROG_SED
8619629baa8cSmrg])#m4_ifndef
8620629baa8cSmrg
8621629baa8cSmrg# Old name:
8622629baa8cSmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
8623629baa8cSmrgdnl aclocal-1.4 backwards compatibility:
8624629baa8cSmrgdnl AC_DEFUN([LT_AC_PROG_SED], [])
8625629baa8cSmrg
8626629baa8cSmrg
8627629baa8cSmrg# _LT_CHECK_SHELL_FEATURES
8628629baa8cSmrg# ------------------------
8629629baa8cSmrg# Find out whether the shell is Bourne or XSI compatible,
8630629baa8cSmrg# or has some other useful features.
8631629baa8cSmrgm4_defun([_LT_CHECK_SHELL_FEATURES],
8632629baa8cSmrg[AC_MSG_CHECKING([whether the shell understands some XSI constructs])
8633629baa8cSmrg# Try some XSI features
8634629baa8cSmrgxsi_shell=no
8635629baa8cSmrg( _lt_dummy="a/b/c"
8636629baa8cSmrg  test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
8637629baa8cSmrg      = c,a/b,b/c, \
8638629baa8cSmrg    && eval 'test $(( 1 + 1 )) -eq 2 \
8639629baa8cSmrg    && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
8640629baa8cSmrg  && xsi_shell=yes
8641629baa8cSmrgAC_MSG_RESULT([$xsi_shell])
8642629baa8cSmrg_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
8643629baa8cSmrg
8644629baa8cSmrgAC_MSG_CHECKING([whether the shell understands "+="])
8645629baa8cSmrglt_shell_append=no
8646629baa8cSmrg( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
8647629baa8cSmrg    >/dev/null 2>&1 \
8648629baa8cSmrg  && lt_shell_append=yes
8649629baa8cSmrgAC_MSG_RESULT([$lt_shell_append])
8650629baa8cSmrg_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
8651629baa8cSmrg
8652629baa8cSmrgif ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
8653629baa8cSmrg  lt_unset=unset
8654629baa8cSmrgelse
8655629baa8cSmrg  lt_unset=false
8656629baa8cSmrgfi
8657629baa8cSmrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
8658629baa8cSmrg
8659629baa8cSmrg# test EBCDIC or ASCII
8660629baa8cSmrgcase `echo X|tr X '\101'` in
8661629baa8cSmrg A) # ASCII based system
8662629baa8cSmrg    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
8663629baa8cSmrg  lt_SP2NL='tr \040 \012'
8664629baa8cSmrg  lt_NL2SP='tr \015\012 \040\040'
8665629baa8cSmrg  ;;
8666629baa8cSmrg *) # EBCDIC based system
8667629baa8cSmrg  lt_SP2NL='tr \100 \n'
8668629baa8cSmrg  lt_NL2SP='tr \r\n \100\100'
8669629baa8cSmrg  ;;
8670629baa8cSmrgesac
8671629baa8cSmrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
8672629baa8cSmrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
8673629baa8cSmrg])# _LT_CHECK_SHELL_FEATURES
8674629baa8cSmrg
8675629baa8cSmrg
8676629baa8cSmrg# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY)
8677629baa8cSmrg# ------------------------------------------------------
8678629baa8cSmrg# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and
8679629baa8cSmrg# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY.
8680629baa8cSmrgm4_defun([_LT_PROG_FUNCTION_REPLACE],
8681629baa8cSmrg[dnl {
8682629baa8cSmrgsed -e '/^$1 ()$/,/^} # $1 /c\
8683629baa8cSmrg$1 ()\
8684629baa8cSmrg{\
8685629baa8cSmrgm4_bpatsubsts([$2], [$], [\\], [^\([	 ]\)], [\\\1])
8686629baa8cSmrg} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \
8687629baa8cSmrg  && mv -f "$cfgfile.tmp" "$cfgfile" \
8688629baa8cSmrg    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
8689629baa8cSmrgtest 0 -eq $? || _lt_function_replace_fail=:
8690629baa8cSmrg])
8691629baa8cSmrg
8692629baa8cSmrg
8693629baa8cSmrg# _LT_PROG_REPLACE_SHELLFNS
8694629baa8cSmrg# -------------------------
8695629baa8cSmrg# Replace existing portable implementations of several shell functions with
8696629baa8cSmrg# equivalent extended shell implementations where those features are available..
8697629baa8cSmrgm4_defun([_LT_PROG_REPLACE_SHELLFNS],
8698629baa8cSmrg[if test x"$xsi_shell" = xyes; then
8699629baa8cSmrg  _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl
8700629baa8cSmrg    case ${1} in
8701629baa8cSmrg      */*) func_dirname_result="${1%/*}${2}" ;;
8702629baa8cSmrg      *  ) func_dirname_result="${3}" ;;
8703629baa8cSmrg    esac])
8704629baa8cSmrg
8705629baa8cSmrg  _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl
8706629baa8cSmrg    func_basename_result="${1##*/}"])
8707629baa8cSmrg
8708629baa8cSmrg  _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl
8709629baa8cSmrg    case ${1} in
8710629baa8cSmrg      */*) func_dirname_result="${1%/*}${2}" ;;
8711629baa8cSmrg      *  ) func_dirname_result="${3}" ;;
8712629baa8cSmrg    esac
8713629baa8cSmrg    func_basename_result="${1##*/}"])
8714629baa8cSmrg
8715629baa8cSmrg  _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl
8716629baa8cSmrg    # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
8717629baa8cSmrg    # positional parameters, so assign one to ordinary parameter first.
8718629baa8cSmrg    func_stripname_result=${3}
8719629baa8cSmrg    func_stripname_result=${func_stripname_result#"${1}"}
8720629baa8cSmrg    func_stripname_result=${func_stripname_result%"${2}"}])
8721629baa8cSmrg
8722629baa8cSmrg  _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl
8723629baa8cSmrg    func_split_long_opt_name=${1%%=*}
8724629baa8cSmrg    func_split_long_opt_arg=${1#*=}])
8725629baa8cSmrg
8726629baa8cSmrg  _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl
8727629baa8cSmrg    func_split_short_opt_arg=${1#??}
8728629baa8cSmrg    func_split_short_opt_name=${1%"$func_split_short_opt_arg"}])
8729629baa8cSmrg
8730629baa8cSmrg  _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl
8731629baa8cSmrg    case ${1} in
8732629baa8cSmrg      *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
8733629baa8cSmrg      *)    func_lo2o_result=${1} ;;
8734629baa8cSmrg    esac])
8735629baa8cSmrg
8736629baa8cSmrg  _LT_PROG_FUNCTION_REPLACE([func_xform], [    func_xform_result=${1%.*}.lo])
8737629baa8cSmrg
8738629baa8cSmrg  _LT_PROG_FUNCTION_REPLACE([func_arith], [    func_arith_result=$(( $[*] ))])
8739629baa8cSmrg
8740629baa8cSmrg  _LT_PROG_FUNCTION_REPLACE([func_len], [    func_len_result=${#1}])
8741629baa8cSmrgfi
8742629baa8cSmrg
8743629baa8cSmrgif test x"$lt_shell_append" = xyes; then
8744629baa8cSmrg  _LT_PROG_FUNCTION_REPLACE([func_append], [    eval "${1}+=\\${2}"])
8745629baa8cSmrg
8746629baa8cSmrg  _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl
8747629baa8cSmrg    func_quote_for_eval "${2}"
8748629baa8cSmrgdnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \
8749629baa8cSmrg    eval "${1}+=\\\\ \\$func_quote_for_eval_result"])
8750629baa8cSmrg
8751629baa8cSmrg  # Save a `func_append' function call where possible by direct use of '+='
8752629baa8cSmrg  sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
8753629baa8cSmrg    && mv -f "$cfgfile.tmp" "$cfgfile" \
8754629baa8cSmrg      || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
8755629baa8cSmrg  test 0 -eq $? || _lt_function_replace_fail=:
8756629baa8cSmrgelse
8757629baa8cSmrg  # Save a `func_append' function call even when '+=' is not available
8758629baa8cSmrg  sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
8759629baa8cSmrg    && mv -f "$cfgfile.tmp" "$cfgfile" \
8760629baa8cSmrg      || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
8761629baa8cSmrg  test 0 -eq $? || _lt_function_replace_fail=:
8762629baa8cSmrgfi
8763629baa8cSmrg
8764629baa8cSmrgif test x"$_lt_function_replace_fail" = x":"; then
8765629baa8cSmrg  AC_MSG_WARN([Unable to substitute extended shell functions in $ofile])
8766629baa8cSmrgfi
8767629baa8cSmrg])
8768629baa8cSmrg
8769629baa8cSmrg# _LT_PATH_CONVERSION_FUNCTIONS
8770629baa8cSmrg# -----------------------------
8771629baa8cSmrg# Determine which file name conversion functions should be used by
8772629baa8cSmrg# func_to_host_file (and, implicitly, by func_to_host_path).  These are needed
8773629baa8cSmrg# for certain cross-compile configurations and native mingw.
8774629baa8cSmrgm4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
8775629baa8cSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
8776629baa8cSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl
8777629baa8cSmrgAC_MSG_CHECKING([how to convert $build file names to $host format])
8778629baa8cSmrgAC_CACHE_VAL(lt_cv_to_host_file_cmd,
8779629baa8cSmrg[case $host in
8780629baa8cSmrg  *-*-mingw* )
8781629baa8cSmrg    case $build in
8782629baa8cSmrg      *-*-mingw* ) # actually msys
8783629baa8cSmrg        lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
8784629baa8cSmrg        ;;
8785629baa8cSmrg      *-*-cygwin* )
8786629baa8cSmrg        lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
8787629baa8cSmrg        ;;
8788629baa8cSmrg      * ) # otherwise, assume *nix
8789629baa8cSmrg        lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
8790629baa8cSmrg        ;;
8791629baa8cSmrg    esac
8792629baa8cSmrg    ;;
8793629baa8cSmrg  *-*-cygwin* )
8794629baa8cSmrg    case $build in
8795629baa8cSmrg      *-*-mingw* ) # actually msys
8796629baa8cSmrg        lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
8797629baa8cSmrg        ;;
8798629baa8cSmrg      *-*-cygwin* )
8799629baa8cSmrg        lt_cv_to_host_file_cmd=func_convert_file_noop
8800629baa8cSmrg        ;;
8801629baa8cSmrg      * ) # otherwise, assume *nix
8802629baa8cSmrg        lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
8803629baa8cSmrg        ;;
8804629baa8cSmrg    esac
8805629baa8cSmrg    ;;
8806629baa8cSmrg  * ) # unhandled hosts (and "normal" native builds)
8807629baa8cSmrg    lt_cv_to_host_file_cmd=func_convert_file_noop
8808629baa8cSmrg    ;;
8809629baa8cSmrgesac
8810629baa8cSmrg])
8811629baa8cSmrgto_host_file_cmd=$lt_cv_to_host_file_cmd
8812629baa8cSmrgAC_MSG_RESULT([$lt_cv_to_host_file_cmd])
8813629baa8cSmrg_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
8814629baa8cSmrg         [0], [convert $build file names to $host format])dnl
8815629baa8cSmrg
8816629baa8cSmrgAC_MSG_CHECKING([how to convert $build file names to toolchain format])
8817629baa8cSmrgAC_CACHE_VAL(lt_cv_to_tool_file_cmd,
8818629baa8cSmrg[#assume ordinary cross tools, or native build.
8819629baa8cSmrglt_cv_to_tool_file_cmd=func_convert_file_noop
8820629baa8cSmrgcase $host in
8821629baa8cSmrg  *-*-mingw* )
8822629baa8cSmrg    case $build in
8823629baa8cSmrg      *-*-mingw* ) # actually msys
8824629baa8cSmrg        lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
8825629baa8cSmrg        ;;
8826629baa8cSmrg    esac
8827629baa8cSmrg    ;;
8828629baa8cSmrgesac
8829629baa8cSmrg])
8830629baa8cSmrgto_tool_file_cmd=$lt_cv_to_tool_file_cmd
8831629baa8cSmrgAC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
8832629baa8cSmrg_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
8833629baa8cSmrg         [0], [convert $build files to toolchain format])dnl
8834629baa8cSmrg])# _LT_PATH_CONVERSION_FUNCTIONS
8835629baa8cSmrg
8836629baa8cSmrg# Helper functions for option handling.                    -*- Autoconf -*-
8837629baa8cSmrg#
8838629baa8cSmrg#   Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation,
8839629baa8cSmrg#   Inc.
8840629baa8cSmrg#   Written by Gary V. Vaughan, 2004
8841629baa8cSmrg#
8842629baa8cSmrg# This file is free software; the Free Software Foundation gives
8843629baa8cSmrg# unlimited permission to copy and/or distribute it, with or without
8844629baa8cSmrg# modifications, as long as this notice is preserved.
8845629baa8cSmrg
8846629baa8cSmrg# serial 7 ltoptions.m4
8847629baa8cSmrg
8848629baa8cSmrg# This is to help aclocal find these macros, as it can't see m4_define.
8849629baa8cSmrgAC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
8850629baa8cSmrg
8851629baa8cSmrg
8852629baa8cSmrg# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
8853629baa8cSmrg# ------------------------------------------
8854629baa8cSmrgm4_define([_LT_MANGLE_OPTION],
8855629baa8cSmrg[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
8856629baa8cSmrg
8857629baa8cSmrg
8858629baa8cSmrg# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
8859629baa8cSmrg# ---------------------------------------
8860629baa8cSmrg# Set option OPTION-NAME for macro MACRO-NAME, and if there is a
8861629baa8cSmrg# matching handler defined, dispatch to it.  Other OPTION-NAMEs are
8862629baa8cSmrg# saved as a flag.
8863629baa8cSmrgm4_define([_LT_SET_OPTION],
8864629baa8cSmrg[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
8865629baa8cSmrgm4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
8866629baa8cSmrg        _LT_MANGLE_DEFUN([$1], [$2]),
8867629baa8cSmrg    [m4_warning([Unknown $1 option `$2'])])[]dnl
8868629baa8cSmrg])
8869629baa8cSmrg
8870629baa8cSmrg
8871629baa8cSmrg# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
8872629baa8cSmrg# ------------------------------------------------------------
8873629baa8cSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
8874629baa8cSmrgm4_define([_LT_IF_OPTION],
8875629baa8cSmrg[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
8876629baa8cSmrg
8877629baa8cSmrg
8878629baa8cSmrg# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
8879629baa8cSmrg# -------------------------------------------------------
8880629baa8cSmrg# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
8881629baa8cSmrg# are set.
8882629baa8cSmrgm4_define([_LT_UNLESS_OPTIONS],
8883629baa8cSmrg[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
8884629baa8cSmrg	    [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
8885629baa8cSmrg		      [m4_define([$0_found])])])[]dnl
8886629baa8cSmrgm4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
8887629baa8cSmrg])[]dnl
8888629baa8cSmrg])
8889629baa8cSmrg
8890629baa8cSmrg
8891629baa8cSmrg# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
8892629baa8cSmrg# ----------------------------------------
8893629baa8cSmrg# OPTION-LIST is a space-separated list of Libtool options associated
8894629baa8cSmrg# with MACRO-NAME.  If any OPTION has a matching handler declared with
8895629baa8cSmrg# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
8896629baa8cSmrg# the unknown option and exit.
8897629baa8cSmrgm4_defun([_LT_SET_OPTIONS],
8898629baa8cSmrg[# Set options
8899629baa8cSmrgm4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
8900629baa8cSmrg    [_LT_SET_OPTION([$1], _LT_Option)])
8901629baa8cSmrg
8902629baa8cSmrgm4_if([$1],[LT_INIT],[
8903629baa8cSmrg  dnl
8904629baa8cSmrg  dnl Simply set some default values (i.e off) if boolean options were not
8905629baa8cSmrg  dnl specified:
8906629baa8cSmrg  _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
8907629baa8cSmrg  ])
8908629baa8cSmrg  _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
8909629baa8cSmrg  ])
8910629baa8cSmrg  dnl
8911629baa8cSmrg  dnl If no reference was made to various pairs of opposing options, then
8912629baa8cSmrg  dnl we run the default mode handler for the pair.  For example, if neither
8913629baa8cSmrg  dnl `shared' nor `disable-shared' was passed, we enable building of shared
8914629baa8cSmrg  dnl archives by default:
8915629baa8cSmrg  _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
8916629baa8cSmrg  _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
8917629baa8cSmrg  _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
8918629baa8cSmrg  _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
8919629baa8cSmrg  		   [_LT_ENABLE_FAST_INSTALL])
8920629baa8cSmrg  ])
8921629baa8cSmrg])# _LT_SET_OPTIONS
8922629baa8cSmrg
8923629baa8cSmrg
8924629baa8cSmrg
8925629baa8cSmrg# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
8926629baa8cSmrg# -----------------------------------------
8927629baa8cSmrgm4_define([_LT_MANGLE_DEFUN],
8928629baa8cSmrg[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
8929629baa8cSmrg
8930629baa8cSmrg
8931629baa8cSmrg# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
8932629baa8cSmrg# -----------------------------------------------
8933629baa8cSmrgm4_define([LT_OPTION_DEFINE],
8934629baa8cSmrg[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
8935629baa8cSmrg])# LT_OPTION_DEFINE
8936629baa8cSmrg
8937629baa8cSmrg
8938629baa8cSmrg# dlopen
8939629baa8cSmrg# ------
8940629baa8cSmrgLT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
8941629baa8cSmrg])
8942629baa8cSmrg
8943629baa8cSmrgAU_DEFUN([AC_LIBTOOL_DLOPEN],
8944629baa8cSmrg[_LT_SET_OPTION([LT_INIT], [dlopen])
8945629baa8cSmrgAC_DIAGNOSE([obsolete],
8946629baa8cSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you
8947629baa8cSmrgput the `dlopen' option into LT_INIT's first parameter.])
8948629baa8cSmrg])
8949629baa8cSmrg
8950629baa8cSmrgdnl aclocal-1.4 backwards compatibility:
8951629baa8cSmrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
8952629baa8cSmrg
8953629baa8cSmrg
8954629baa8cSmrg# win32-dll
8955629baa8cSmrg# ---------
8956629baa8cSmrg# Declare package support for building win32 dll's.
8957629baa8cSmrgLT_OPTION_DEFINE([LT_INIT], [win32-dll],
8958629baa8cSmrg[enable_win32_dll=yes
8959629baa8cSmrg
8960629baa8cSmrgcase $host in
8961629baa8cSmrg*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
8962629baa8cSmrg  AC_CHECK_TOOL(AS, as, false)
8963629baa8cSmrg  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
8964629baa8cSmrg  AC_CHECK_TOOL(OBJDUMP, objdump, false)
8965629baa8cSmrg  ;;
8966629baa8cSmrgesac
8967629baa8cSmrg
8968629baa8cSmrgtest -z "$AS" && AS=as
8969629baa8cSmrg_LT_DECL([], [AS],      [1], [Assembler program])dnl
8970629baa8cSmrg
8971629baa8cSmrgtest -z "$DLLTOOL" && DLLTOOL=dlltool
8972629baa8cSmrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl
8973629baa8cSmrg
8974629baa8cSmrgtest -z "$OBJDUMP" && OBJDUMP=objdump
8975629baa8cSmrg_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl
8976629baa8cSmrg])# win32-dll
8977629baa8cSmrg
8978629baa8cSmrgAU_DEFUN([AC_LIBTOOL_WIN32_DLL],
8979629baa8cSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
8980629baa8cSmrg_LT_SET_OPTION([LT_INIT], [win32-dll])
8981629baa8cSmrgAC_DIAGNOSE([obsolete],
8982629baa8cSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you
8983629baa8cSmrgput the `win32-dll' option into LT_INIT's first parameter.])
8984629baa8cSmrg])
8985629baa8cSmrg
8986629baa8cSmrgdnl aclocal-1.4 backwards compatibility:
8987629baa8cSmrgdnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
8988629baa8cSmrg
8989629baa8cSmrg
8990629baa8cSmrg# _LT_ENABLE_SHARED([DEFAULT])
8991629baa8cSmrg# ----------------------------
8992629baa8cSmrg# implement the --enable-shared flag, and supports the `shared' and
8993629baa8cSmrg# `disable-shared' LT_INIT options.
8994629baa8cSmrg# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
8995629baa8cSmrgm4_define([_LT_ENABLE_SHARED],
8996629baa8cSmrg[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
8997629baa8cSmrgAC_ARG_ENABLE([shared],
8998629baa8cSmrg    [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
8999629baa8cSmrg	[build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
9000629baa8cSmrg    [p=${PACKAGE-default}
9001629baa8cSmrg    case $enableval in
9002629baa8cSmrg    yes) enable_shared=yes ;;
9003629baa8cSmrg    no) enable_shared=no ;;
9004629baa8cSmrg    *)
9005629baa8cSmrg      enable_shared=no
9006629baa8cSmrg      # Look at the argument we got.  We use all the common list separators.
9007629baa8cSmrg      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
9008629baa8cSmrg      for pkg in $enableval; do
9009629baa8cSmrg	IFS="$lt_save_ifs"
9010629baa8cSmrg	if test "X$pkg" = "X$p"; then
9011629baa8cSmrg	  enable_shared=yes
90125ffd6003Smrg	fi
9013629baa8cSmrg      done
9014629baa8cSmrg      IFS="$lt_save_ifs"
9015629baa8cSmrg      ;;
9016629baa8cSmrg    esac],
9017629baa8cSmrg    [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
9018629baa8cSmrg
9019629baa8cSmrg    _LT_DECL([build_libtool_libs], [enable_shared], [0],
9020629baa8cSmrg	[Whether or not to build shared libraries])
9021629baa8cSmrg])# _LT_ENABLE_SHARED
9022629baa8cSmrg
9023629baa8cSmrgLT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
9024629baa8cSmrgLT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
9025629baa8cSmrg
9026629baa8cSmrg# Old names:
9027629baa8cSmrgAC_DEFUN([AC_ENABLE_SHARED],
9028629baa8cSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
9029145b7b3cSmrg])
9030145b7b3cSmrg
9031629baa8cSmrgAC_DEFUN([AC_DISABLE_SHARED],
9032629baa8cSmrg[_LT_SET_OPTION([LT_INIT], [disable-shared])
9033629baa8cSmrg])
9034145b7b3cSmrg
9035629baa8cSmrgAU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
9036629baa8cSmrgAU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
9037145b7b3cSmrg
9038629baa8cSmrgdnl aclocal-1.4 backwards compatibility:
9039629baa8cSmrgdnl AC_DEFUN([AM_ENABLE_SHARED], [])
9040629baa8cSmrgdnl AC_DEFUN([AM_DISABLE_SHARED], [])
9041145b7b3cSmrg
9042145b7b3cSmrg
9043145b7b3cSmrg
9044629baa8cSmrg# _LT_ENABLE_STATIC([DEFAULT])
9045629baa8cSmrg# ----------------------------
9046629baa8cSmrg# implement the --enable-static flag, and support the `static' and
9047629baa8cSmrg# `disable-static' LT_INIT options.
9048629baa8cSmrg# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
9049629baa8cSmrgm4_define([_LT_ENABLE_STATIC],
9050629baa8cSmrg[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
9051629baa8cSmrgAC_ARG_ENABLE([static],
9052629baa8cSmrg    [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
9053629baa8cSmrg	[build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
9054629baa8cSmrg    [p=${PACKAGE-default}
9055629baa8cSmrg    case $enableval in
9056629baa8cSmrg    yes) enable_static=yes ;;
9057629baa8cSmrg    no) enable_static=no ;;
9058629baa8cSmrg    *)
9059629baa8cSmrg     enable_static=no
9060629baa8cSmrg      # Look at the argument we got.  We use all the common list separators.
9061629baa8cSmrg      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
9062629baa8cSmrg      for pkg in $enableval; do
9063629baa8cSmrg	IFS="$lt_save_ifs"
9064629baa8cSmrg	if test "X$pkg" = "X$p"; then
9065629baa8cSmrg	  enable_static=yes
9066629baa8cSmrg	fi
9067629baa8cSmrg      done
9068629baa8cSmrg      IFS="$lt_save_ifs"
9069629baa8cSmrg      ;;
9070629baa8cSmrg    esac],
9071629baa8cSmrg    [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
9072145b7b3cSmrg
9073629baa8cSmrg    _LT_DECL([build_old_libs], [enable_static], [0],
9074629baa8cSmrg	[Whether or not to build static libraries])
9075629baa8cSmrg])# _LT_ENABLE_STATIC
9076145b7b3cSmrg
9077629baa8cSmrgLT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
9078629baa8cSmrgLT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
9079145b7b3cSmrg
9080629baa8cSmrg# Old names:
9081629baa8cSmrgAC_DEFUN([AC_ENABLE_STATIC],
9082629baa8cSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
9083629baa8cSmrg])
9084145b7b3cSmrg
9085629baa8cSmrgAC_DEFUN([AC_DISABLE_STATIC],
9086629baa8cSmrg[_LT_SET_OPTION([LT_INIT], [disable-static])
9087629baa8cSmrg])
9088629baa8cSmrg
9089629baa8cSmrgAU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
9090629baa8cSmrgAU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
9091629baa8cSmrg
9092629baa8cSmrgdnl aclocal-1.4 backwards compatibility:
9093629baa8cSmrgdnl AC_DEFUN([AM_ENABLE_STATIC], [])
9094629baa8cSmrgdnl AC_DEFUN([AM_DISABLE_STATIC], [])
9095629baa8cSmrg
9096629baa8cSmrg
9097629baa8cSmrg
9098629baa8cSmrg# _LT_ENABLE_FAST_INSTALL([DEFAULT])
9099629baa8cSmrg# ----------------------------------
9100629baa8cSmrg# implement the --enable-fast-install flag, and support the `fast-install'
9101629baa8cSmrg# and `disable-fast-install' LT_INIT options.
9102629baa8cSmrg# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
9103629baa8cSmrgm4_define([_LT_ENABLE_FAST_INSTALL],
9104629baa8cSmrg[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
9105629baa8cSmrgAC_ARG_ENABLE([fast-install],
9106629baa8cSmrg    [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
9107629baa8cSmrg    [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
9108629baa8cSmrg    [p=${PACKAGE-default}
9109629baa8cSmrg    case $enableval in
9110629baa8cSmrg    yes) enable_fast_install=yes ;;
9111629baa8cSmrg    no) enable_fast_install=no ;;
9112629baa8cSmrg    *)
9113629baa8cSmrg      enable_fast_install=no
9114629baa8cSmrg      # Look at the argument we got.  We use all the common list separators.
9115629baa8cSmrg      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
9116629baa8cSmrg      for pkg in $enableval; do
9117629baa8cSmrg	IFS="$lt_save_ifs"
9118629baa8cSmrg	if test "X$pkg" = "X$p"; then
9119629baa8cSmrg	  enable_fast_install=yes
91205ffd6003Smrg	fi
9121629baa8cSmrg      done
9122629baa8cSmrg      IFS="$lt_save_ifs"
9123629baa8cSmrg      ;;
9124629baa8cSmrg    esac],
9125629baa8cSmrg    [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
9126629baa8cSmrg
9127629baa8cSmrg_LT_DECL([fast_install], [enable_fast_install], [0],
9128629baa8cSmrg	 [Whether or not to optimize for fast installation])dnl
9129629baa8cSmrg])# _LT_ENABLE_FAST_INSTALL
9130629baa8cSmrg
9131629baa8cSmrgLT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
9132629baa8cSmrgLT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
9133629baa8cSmrg
9134629baa8cSmrg# Old names:
9135629baa8cSmrgAU_DEFUN([AC_ENABLE_FAST_INSTALL],
9136629baa8cSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
9137629baa8cSmrgAC_DIAGNOSE([obsolete],
9138629baa8cSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put
9139629baa8cSmrgthe `fast-install' option into LT_INIT's first parameter.])
9140629baa8cSmrg])
9141145b7b3cSmrg
9142629baa8cSmrgAU_DEFUN([AC_DISABLE_FAST_INSTALL],
9143629baa8cSmrg[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
9144629baa8cSmrgAC_DIAGNOSE([obsolete],
9145629baa8cSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put
9146629baa8cSmrgthe `disable-fast-install' option into LT_INIT's first parameter.])
9147629baa8cSmrg])
9148145b7b3cSmrg
9149629baa8cSmrgdnl aclocal-1.4 backwards compatibility:
9150629baa8cSmrgdnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
9151629baa8cSmrgdnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
9152145b7b3cSmrg
9153629baa8cSmrg
9154629baa8cSmrg# _LT_WITH_PIC([MODE])
9155629baa8cSmrg# --------------------
9156629baa8cSmrg# implement the --with-pic flag, and support the `pic-only' and `no-pic'
9157629baa8cSmrg# LT_INIT options.
9158629baa8cSmrg# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
9159629baa8cSmrgm4_define([_LT_WITH_PIC],
9160629baa8cSmrg[AC_ARG_WITH([pic],
9161629baa8cSmrg    [AS_HELP_STRING([--with-pic],
9162629baa8cSmrg	[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
9163629baa8cSmrg    [pic_mode="$withval"],
9164629baa8cSmrg    [pic_mode=default])
9165629baa8cSmrg
9166629baa8cSmrgtest -z "$pic_mode" && pic_mode=m4_default([$1], [default])
9167629baa8cSmrg
9168629baa8cSmrg_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
9169629baa8cSmrg])# _LT_WITH_PIC
9170629baa8cSmrg
9171629baa8cSmrgLT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
9172629baa8cSmrgLT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
9173629baa8cSmrg
9174629baa8cSmrg# Old name:
9175629baa8cSmrgAU_DEFUN([AC_LIBTOOL_PICMODE],
9176629baa8cSmrg[_LT_SET_OPTION([LT_INIT], [pic-only])
9177629baa8cSmrgAC_DIAGNOSE([obsolete],
9178629baa8cSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you
9179629baa8cSmrgput the `pic-only' option into LT_INIT's first parameter.])
91805ffd6003Smrg])
9181145b7b3cSmrg
9182629baa8cSmrgdnl aclocal-1.4 backwards compatibility:
9183629baa8cSmrgdnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
9184145b7b3cSmrg
9185145b7b3cSmrg
9186629baa8cSmrgm4_define([_LTDL_MODE], [])
9187629baa8cSmrgLT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
9188629baa8cSmrg		 [m4_define([_LTDL_MODE], [nonrecursive])])
9189629baa8cSmrgLT_OPTION_DEFINE([LTDL_INIT], [recursive],
9190629baa8cSmrg		 [m4_define([_LTDL_MODE], [recursive])])
9191629baa8cSmrgLT_OPTION_DEFINE([LTDL_INIT], [subproject],
9192629baa8cSmrg		 [m4_define([_LTDL_MODE], [subproject])])
9193145b7b3cSmrg
9194629baa8cSmrgm4_define([_LTDL_TYPE], [])
9195629baa8cSmrgLT_OPTION_DEFINE([LTDL_INIT], [installable],
9196629baa8cSmrg		 [m4_define([_LTDL_TYPE], [installable])])
9197629baa8cSmrgLT_OPTION_DEFINE([LTDL_INIT], [convenience],
9198629baa8cSmrg		 [m4_define([_LTDL_TYPE], [convenience])])
9199145b7b3cSmrg
9200629baa8cSmrg# ltsugar.m4 -- libtool m4 base layer.                         -*-Autoconf-*-
92015ffd6003Smrg#
9202629baa8cSmrg# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
9203629baa8cSmrg# Written by Gary V. Vaughan, 2004
92045ffd6003Smrg#
9205629baa8cSmrg# This file is free software; the Free Software Foundation gives
9206629baa8cSmrg# unlimited permission to copy and/or distribute it, with or without
9207629baa8cSmrg# modifications, as long as this notice is preserved.
9208629baa8cSmrg
9209629baa8cSmrg# serial 6 ltsugar.m4
9210629baa8cSmrg
9211629baa8cSmrg# This is to help aclocal find these macros, as it can't see m4_define.
9212629baa8cSmrgAC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
9213629baa8cSmrg
9214629baa8cSmrg
9215629baa8cSmrg# lt_join(SEP, ARG1, [ARG2...])
9216629baa8cSmrg# -----------------------------
9217629baa8cSmrg# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
9218629baa8cSmrg# associated separator.
9219629baa8cSmrg# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
9220629baa8cSmrg# versions in m4sugar had bugs.
9221629baa8cSmrgm4_define([lt_join],
9222629baa8cSmrg[m4_if([$#], [1], [],
9223629baa8cSmrg       [$#], [2], [[$2]],
9224629baa8cSmrg       [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
9225629baa8cSmrgm4_define([_lt_join],
9226629baa8cSmrg[m4_if([$#$2], [2], [],
9227629baa8cSmrg       [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
9228629baa8cSmrg
9229629baa8cSmrg
9230629baa8cSmrg# lt_car(LIST)
9231629baa8cSmrg# lt_cdr(LIST)
9232629baa8cSmrg# ------------
9233629baa8cSmrg# Manipulate m4 lists.
9234629baa8cSmrg# These macros are necessary as long as will still need to support
9235629baa8cSmrg# Autoconf-2.59 which quotes differently.
9236629baa8cSmrgm4_define([lt_car], [[$1]])
9237629baa8cSmrgm4_define([lt_cdr],
9238629baa8cSmrg[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
9239629baa8cSmrg       [$#], 1, [],
9240629baa8cSmrg       [m4_dquote(m4_shift($@))])])
9241629baa8cSmrgm4_define([lt_unquote], $1)
9242629baa8cSmrg
9243629baa8cSmrg
9244629baa8cSmrg# lt_append(MACRO-NAME, STRING, [SEPARATOR])
9245629baa8cSmrg# ------------------------------------------
9246629baa8cSmrg# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
9247629baa8cSmrg# Note that neither SEPARATOR nor STRING are expanded; they are appended
9248629baa8cSmrg# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
9249629baa8cSmrg# No SEPARATOR is output if MACRO-NAME was previously undefined (different
9250629baa8cSmrg# than defined and empty).
92515ffd6003Smrg#
9252629baa8cSmrg# This macro is needed until we can rely on Autoconf 2.62, since earlier
9253629baa8cSmrg# versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
9254629baa8cSmrgm4_define([lt_append],
9255629baa8cSmrg[m4_define([$1],
9256629baa8cSmrg	   m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
9257629baa8cSmrg
9258629baa8cSmrg
9259629baa8cSmrg
9260629baa8cSmrg# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
9261629baa8cSmrg# ----------------------------------------------------------
9262629baa8cSmrg# Produce a SEP delimited list of all paired combinations of elements of
9263629baa8cSmrg# PREFIX-LIST with SUFFIX1 through SUFFIXn.  Each element of the list
9264629baa8cSmrg# has the form PREFIXmINFIXSUFFIXn.
9265629baa8cSmrg# Needed until we can rely on m4_combine added in Autoconf 2.62.
9266629baa8cSmrgm4_define([lt_combine],
9267629baa8cSmrg[m4_if(m4_eval([$# > 3]), [1],
9268629baa8cSmrg       [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
9269629baa8cSmrg[[m4_foreach([_Lt_prefix], [$2],
9270629baa8cSmrg	     [m4_foreach([_Lt_suffix],
9271629baa8cSmrg		]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
9272629baa8cSmrg	[_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
9273629baa8cSmrg
9274629baa8cSmrg
9275629baa8cSmrg# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
9276629baa8cSmrg# -----------------------------------------------------------------------
9277629baa8cSmrg# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
9278629baa8cSmrg# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
9279629baa8cSmrgm4_define([lt_if_append_uniq],
9280629baa8cSmrg[m4_ifdef([$1],
9281629baa8cSmrg	  [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
9282629baa8cSmrg		 [lt_append([$1], [$2], [$3])$4],
9283629baa8cSmrg		 [$5])],
9284629baa8cSmrg	  [lt_append([$1], [$2], [$3])$4])])
9285629baa8cSmrg
9286629baa8cSmrg
9287629baa8cSmrg# lt_dict_add(DICT, KEY, VALUE)
9288629baa8cSmrg# -----------------------------
9289629baa8cSmrgm4_define([lt_dict_add],
9290629baa8cSmrg[m4_define([$1($2)], [$3])])
9291629baa8cSmrg
9292629baa8cSmrg
9293629baa8cSmrg# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
9294629baa8cSmrg# --------------------------------------------
9295629baa8cSmrgm4_define([lt_dict_add_subkey],
9296629baa8cSmrg[m4_define([$1($2:$3)], [$4])])
9297629baa8cSmrg
9298629baa8cSmrg
9299629baa8cSmrg# lt_dict_fetch(DICT, KEY, [SUBKEY])
9300629baa8cSmrg# ----------------------------------
9301629baa8cSmrgm4_define([lt_dict_fetch],
9302629baa8cSmrg[m4_ifval([$3],
9303629baa8cSmrg	m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
9304629baa8cSmrg    m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
9305629baa8cSmrg
9306629baa8cSmrg
9307629baa8cSmrg# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
9308629baa8cSmrg# -----------------------------------------------------------------
9309629baa8cSmrgm4_define([lt_if_dict_fetch],
9310629baa8cSmrg[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
9311629baa8cSmrg	[$5],
9312629baa8cSmrg    [$6])])
9313145b7b3cSmrg
9314145b7b3cSmrg
9315629baa8cSmrg# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
9316629baa8cSmrg# --------------------------------------------------------------
9317629baa8cSmrgm4_define([lt_dict_filter],
9318629baa8cSmrg[m4_if([$5], [], [],
9319629baa8cSmrg  [lt_join(m4_quote(m4_default([$4], [[, ]])),
9320629baa8cSmrg           lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
9321629baa8cSmrg		      [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
9322629baa8cSmrg])
9323145b7b3cSmrg
9324629baa8cSmrg# ltversion.m4 -- version numbers			-*- Autoconf -*-
93255ffd6003Smrg#
9326629baa8cSmrg#   Copyright (C) 2004 Free Software Foundation, Inc.
9327629baa8cSmrg#   Written by Scott James Remnant, 2004
9328629baa8cSmrg#
9329629baa8cSmrg# This file is free software; the Free Software Foundation gives
9330629baa8cSmrg# unlimited permission to copy and/or distribute it, with or without
9331629baa8cSmrg# modifications, as long as this notice is preserved.
9332145b7b3cSmrg
9333629baa8cSmrg# @configure_input@
9334145b7b3cSmrg
9335629baa8cSmrg# serial 3293 ltversion.m4
9336629baa8cSmrg# This file is part of GNU Libtool
9337145b7b3cSmrg
9338629baa8cSmrgm4_define([LT_PACKAGE_VERSION], [2.4])
9339629baa8cSmrgm4_define([LT_PACKAGE_REVISION], [1.3293])
9340145b7b3cSmrg
9341629baa8cSmrgAC_DEFUN([LTVERSION_VERSION],
9342629baa8cSmrg[macro_version='2.4'
9343629baa8cSmrgmacro_revision='1.3293'
9344629baa8cSmrg_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
9345629baa8cSmrg_LT_DECL(, macro_revision, 0)
9346629baa8cSmrg])
9347145b7b3cSmrg
9348629baa8cSmrg# lt~obsolete.m4 -- aclocal satisfying obsolete definitions.    -*-Autoconf-*-
9349629baa8cSmrg#
9350629baa8cSmrg#   Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
9351629baa8cSmrg#   Written by Scott James Remnant, 2004.
9352629baa8cSmrg#
9353629baa8cSmrg# This file is free software; the Free Software Foundation gives
9354629baa8cSmrg# unlimited permission to copy and/or distribute it, with or without
9355629baa8cSmrg# modifications, as long as this notice is preserved.
9356578741aaSmrg
9357629baa8cSmrg# serial 5 lt~obsolete.m4
9358145b7b3cSmrg
9359629baa8cSmrg# These exist entirely to fool aclocal when bootstrapping libtool.
93605ffd6003Smrg#
9361629baa8cSmrg# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
9362629baa8cSmrg# which have later been changed to m4_define as they aren't part of the
9363629baa8cSmrg# exported API, or moved to Autoconf or Automake where they belong.
9364629baa8cSmrg#
9365629baa8cSmrg# The trouble is, aclocal is a bit thick.  It'll see the old AC_DEFUN
9366629baa8cSmrg# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
9367629baa8cSmrg# using a macro with the same name in our local m4/libtool.m4 it'll
9368629baa8cSmrg# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
9369629baa8cSmrg# and doesn't know about Autoconf macros at all.)
9370629baa8cSmrg#
9371629baa8cSmrg# So we provide this file, which has a silly filename so it's always
9372629baa8cSmrg# included after everything else.  This provides aclocal with the
9373629baa8cSmrg# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
9374629baa8cSmrg# because those macros already exist, or will be overwritten later.
9375629baa8cSmrg# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 
9376629baa8cSmrg#
9377629baa8cSmrg# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
9378629baa8cSmrg# Yes, that means every name once taken will need to remain here until
9379629baa8cSmrg# we give up compatibility with versions before 1.7, at which point
9380629baa8cSmrg# we need to keep only those names which we still refer to.
9381629baa8cSmrg
9382629baa8cSmrg# This is to help aclocal find these macros, as it can't see m4_define.
9383629baa8cSmrgAC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
9384629baa8cSmrg
9385629baa8cSmrgm4_ifndef([AC_LIBTOOL_LINKER_OPTION],	[AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
9386629baa8cSmrgm4_ifndef([AC_PROG_EGREP],		[AC_DEFUN([AC_PROG_EGREP])])
9387629baa8cSmrgm4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH],	[AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
9388629baa8cSmrgm4_ifndef([_LT_AC_SHELL_INIT],		[AC_DEFUN([_LT_AC_SHELL_INIT])])
9389629baa8cSmrgm4_ifndef([_LT_AC_SYS_LIBPATH_AIX],	[AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
9390629baa8cSmrgm4_ifndef([_LT_PROG_LTMAIN],		[AC_DEFUN([_LT_PROG_LTMAIN])])
9391629baa8cSmrgm4_ifndef([_LT_AC_TAGVAR],		[AC_DEFUN([_LT_AC_TAGVAR])])
9392629baa8cSmrgm4_ifndef([AC_LTDL_ENABLE_INSTALL],	[AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
9393629baa8cSmrgm4_ifndef([AC_LTDL_PREOPEN],		[AC_DEFUN([AC_LTDL_PREOPEN])])
9394629baa8cSmrgm4_ifndef([_LT_AC_SYS_COMPILER],	[AC_DEFUN([_LT_AC_SYS_COMPILER])])
9395629baa8cSmrgm4_ifndef([_LT_AC_LOCK],		[AC_DEFUN([_LT_AC_LOCK])])
9396629baa8cSmrgm4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE],	[AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
9397629baa8cSmrgm4_ifndef([_LT_AC_TRY_DLOPEN_SELF],	[AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
9398629baa8cSmrgm4_ifndef([AC_LIBTOOL_PROG_CC_C_O],	[AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
9399629baa8cSmrgm4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
9400629baa8cSmrgm4_ifndef([AC_LIBTOOL_OBJDIR],		[AC_DEFUN([AC_LIBTOOL_OBJDIR])])
9401629baa8cSmrgm4_ifndef([AC_LTDL_OBJDIR],		[AC_DEFUN([AC_LTDL_OBJDIR])])
9402629baa8cSmrgm4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
9403629baa8cSmrgm4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP],	[AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
9404629baa8cSmrgm4_ifndef([AC_PATH_MAGIC],		[AC_DEFUN([AC_PATH_MAGIC])])
9405629baa8cSmrgm4_ifndef([AC_PROG_LD_GNU],		[AC_DEFUN([AC_PROG_LD_GNU])])
9406629baa8cSmrgm4_ifndef([AC_PROG_LD_RELOAD_FLAG],	[AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
9407629baa8cSmrgm4_ifndef([AC_DEPLIBS_CHECK_METHOD],	[AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
9408629baa8cSmrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
9409629baa8cSmrgm4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
9410629baa8cSmrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
9411629baa8cSmrgm4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS],	[AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
9412629baa8cSmrgm4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP],	[AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
9413629baa8cSmrgm4_ifndef([LT_AC_PROG_EGREP],		[AC_DEFUN([LT_AC_PROG_EGREP])])
9414629baa8cSmrgm4_ifndef([LT_AC_PROG_SED],		[AC_DEFUN([LT_AC_PROG_SED])])
9415629baa8cSmrgm4_ifndef([_LT_CC_BASENAME],		[AC_DEFUN([_LT_CC_BASENAME])])
9416629baa8cSmrgm4_ifndef([_LT_COMPILER_BOILERPLATE],	[AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
9417629baa8cSmrgm4_ifndef([_LT_LINKER_BOILERPLATE],	[AC_DEFUN([_LT_LINKER_BOILERPLATE])])
9418629baa8cSmrgm4_ifndef([_AC_PROG_LIBTOOL],		[AC_DEFUN([_AC_PROG_LIBTOOL])])
9419629baa8cSmrgm4_ifndef([AC_LIBTOOL_SETUP],		[AC_DEFUN([AC_LIBTOOL_SETUP])])
9420629baa8cSmrgm4_ifndef([_LT_AC_CHECK_DLFCN],		[AC_DEFUN([_LT_AC_CHECK_DLFCN])])
9421629baa8cSmrgm4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER],	[AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
9422629baa8cSmrgm4_ifndef([_LT_AC_TAGCONFIG],		[AC_DEFUN([_LT_AC_TAGCONFIG])])
9423629baa8cSmrgm4_ifndef([AC_DISABLE_FAST_INSTALL],	[AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
9424629baa8cSmrgm4_ifndef([_LT_AC_LANG_CXX],		[AC_DEFUN([_LT_AC_LANG_CXX])])
9425629baa8cSmrgm4_ifndef([_LT_AC_LANG_F77],		[AC_DEFUN([_LT_AC_LANG_F77])])
9426629baa8cSmrgm4_ifndef([_LT_AC_LANG_GCJ],		[AC_DEFUN([_LT_AC_LANG_GCJ])])
9427629baa8cSmrgm4_ifndef([AC_LIBTOOL_LANG_C_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
9428629baa8cSmrgm4_ifndef([_LT_AC_LANG_C_CONFIG],	[AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
9429629baa8cSmrgm4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
9430629baa8cSmrgm4_ifndef([_LT_AC_LANG_CXX_CONFIG],	[AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
9431629baa8cSmrgm4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
9432629baa8cSmrgm4_ifndef([_LT_AC_LANG_F77_CONFIG],	[AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
9433629baa8cSmrgm4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
9434629baa8cSmrgm4_ifndef([_LT_AC_LANG_GCJ_CONFIG],	[AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
9435629baa8cSmrgm4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
9436629baa8cSmrgm4_ifndef([_LT_AC_LANG_RC_CONFIG],	[AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
9437629baa8cSmrgm4_ifndef([AC_LIBTOOL_CONFIG],		[AC_DEFUN([AC_LIBTOOL_CONFIG])])
9438629baa8cSmrgm4_ifndef([_LT_AC_FILE_LTDLL_C],	[AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
9439629baa8cSmrgm4_ifndef([_LT_REQUIRED_DARWIN_CHECKS],	[AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
9440629baa8cSmrgm4_ifndef([_LT_AC_PROG_CXXCPP],		[AC_DEFUN([_LT_AC_PROG_CXXCPP])])
9441629baa8cSmrgm4_ifndef([_LT_PREPARE_SED_QUOTE_VARS],	[AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
9442629baa8cSmrgm4_ifndef([_LT_PROG_ECHO_BACKSLASH],	[AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
9443629baa8cSmrgm4_ifndef([_LT_PROG_F77],		[AC_DEFUN([_LT_PROG_F77])])
9444629baa8cSmrgm4_ifndef([_LT_PROG_FC],		[AC_DEFUN([_LT_PROG_FC])])
9445629baa8cSmrgm4_ifndef([_LT_PROG_CXX],		[AC_DEFUN([_LT_PROG_CXX])])
9446145b7b3cSmrg
9447629baa8cSmrg# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
9448629baa8cSmrg# serial 1 (pkg-config-0.24)
9449629baa8cSmrg# 
9450629baa8cSmrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
9451629baa8cSmrg#
9452629baa8cSmrg# This program is free software; you can redistribute it and/or modify
9453629baa8cSmrg# it under the terms of the GNU General Public License as published by
9454629baa8cSmrg# the Free Software Foundation; either version 2 of the License, or
9455629baa8cSmrg# (at your option) any later version.
9456629baa8cSmrg#
9457629baa8cSmrg# This program is distributed in the hope that it will be useful, but
9458629baa8cSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of
9459629baa8cSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
9460629baa8cSmrg# General Public License for more details.
9461629baa8cSmrg#
9462629baa8cSmrg# You should have received a copy of the GNU General Public License
9463629baa8cSmrg# along with this program; if not, write to the Free Software
9464629baa8cSmrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
9465629baa8cSmrg#
9466629baa8cSmrg# As a special exception to the GNU General Public License, if you
9467629baa8cSmrg# distribute this file as part of a program that contains a
9468629baa8cSmrg# configuration script generated by Autoconf, you may include it under
9469629baa8cSmrg# the same distribution terms that you use for the rest of that program.
9470145b7b3cSmrg
9471629baa8cSmrg# PKG_PROG_PKG_CONFIG([MIN-VERSION])
9472629baa8cSmrg# ----------------------------------
9473629baa8cSmrgAC_DEFUN([PKG_PROG_PKG_CONFIG],
9474629baa8cSmrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
9475629baa8cSmrgm4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
9476629baa8cSmrgm4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
9477629baa8cSmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
9478629baa8cSmrgAC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
9479629baa8cSmrgAC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
9480145b7b3cSmrg
9481629baa8cSmrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9482629baa8cSmrg	AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
9483629baa8cSmrgfi
9484629baa8cSmrgif test -n "$PKG_CONFIG"; then
9485629baa8cSmrg	_pkg_min_version=m4_default([$1], [0.9.0])
9486629baa8cSmrg	AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
9487629baa8cSmrg	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
9488629baa8cSmrg		AC_MSG_RESULT([yes])
9489629baa8cSmrg	else
9490629baa8cSmrg		AC_MSG_RESULT([no])
9491629baa8cSmrg		PKG_CONFIG=""
9492629baa8cSmrg	fi
9493629baa8cSmrgfi[]dnl
9494629baa8cSmrg])# PKG_PROG_PKG_CONFIG
9495145b7b3cSmrg
9496629baa8cSmrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
9497629baa8cSmrg#
9498629baa8cSmrg# Check to see whether a particular set of modules exists.  Similar
9499629baa8cSmrg# to PKG_CHECK_MODULES(), but does not set variables or print errors.
9500629baa8cSmrg#
9501629baa8cSmrg# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
9502629baa8cSmrg# only at the first occurence in configure.ac, so if the first place
9503629baa8cSmrg# it's called might be skipped (such as if it is within an "if", you
9504629baa8cSmrg# have to call PKG_CHECK_EXISTS manually
9505629baa8cSmrg# --------------------------------------------------------------
9506629baa8cSmrgAC_DEFUN([PKG_CHECK_EXISTS],
9507629baa8cSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
9508629baa8cSmrgif test -n "$PKG_CONFIG" && \
9509629baa8cSmrg    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
9510629baa8cSmrg  m4_default([$2], [:])
9511629baa8cSmrgm4_ifvaln([$3], [else
9512629baa8cSmrg  $3])dnl
9513629baa8cSmrgfi])
9514145b7b3cSmrg
9515629baa8cSmrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
9516629baa8cSmrg# ---------------------------------------------
9517629baa8cSmrgm4_define([_PKG_CONFIG],
9518629baa8cSmrg[if test -n "$$1"; then
9519629baa8cSmrg    pkg_cv_[]$1="$$1"
9520629baa8cSmrg elif test -n "$PKG_CONFIG"; then
9521629baa8cSmrg    PKG_CHECK_EXISTS([$3],
9522629baa8cSmrg                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
9523629baa8cSmrg		      test "x$?" != "x0" && pkg_failed=yes ],
9524629baa8cSmrg		     [pkg_failed=yes])
9525629baa8cSmrg else
9526629baa8cSmrg    pkg_failed=untried
9527629baa8cSmrgfi[]dnl
9528629baa8cSmrg])# _PKG_CONFIG
9529629baa8cSmrg
9530629baa8cSmrg# _PKG_SHORT_ERRORS_SUPPORTED
9531629baa8cSmrg# -----------------------------
9532629baa8cSmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
9533629baa8cSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
9534629baa8cSmrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
9535629baa8cSmrg        _pkg_short_errors_supported=yes
9536629baa8cSmrgelse
9537629baa8cSmrg        _pkg_short_errors_supported=no
9538629baa8cSmrgfi[]dnl
9539629baa8cSmrg])# _PKG_SHORT_ERRORS_SUPPORTED
9540629baa8cSmrg
9541629baa8cSmrg
9542629baa8cSmrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
9543629baa8cSmrg# [ACTION-IF-NOT-FOUND])
9544629baa8cSmrg#
9545629baa8cSmrg#
9546629baa8cSmrg# Note that if there is a possibility the first call to
9547629baa8cSmrg# PKG_CHECK_MODULES might not happen, you should be sure to include an
9548629baa8cSmrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
9549629baa8cSmrg#
9550629baa8cSmrg#
9551629baa8cSmrg# --------------------------------------------------------------
9552629baa8cSmrgAC_DEFUN([PKG_CHECK_MODULES],
9553629baa8cSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
9554629baa8cSmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
9555629baa8cSmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
9556145b7b3cSmrg
9557629baa8cSmrgpkg_failed=no
9558629baa8cSmrgAC_MSG_CHECKING([for $1])
9559629baa8cSmrg
9560629baa8cSmrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
9561629baa8cSmrg_PKG_CONFIG([$1][_LIBS], [libs], [$2])
9562629baa8cSmrg
9563629baa8cSmrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
9564629baa8cSmrgand $1[]_LIBS to avoid the need to call pkg-config.
9565629baa8cSmrgSee the pkg-config man page for more details.])
9566629baa8cSmrg
9567629baa8cSmrgif test $pkg_failed = yes; then
9568629baa8cSmrg   	AC_MSG_RESULT([no])
9569629baa8cSmrg        _PKG_SHORT_ERRORS_SUPPORTED
9570629baa8cSmrg        if test $_pkg_short_errors_supported = yes; then
9571629baa8cSmrg	        $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
9572629baa8cSmrg        else 
9573629baa8cSmrg	        $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
9574629baa8cSmrg        fi
9575629baa8cSmrg	# Put the nasty error message in config.log where it belongs
9576629baa8cSmrg	echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
9577629baa8cSmrg
9578629baa8cSmrg	m4_default([$4], [AC_MSG_ERROR(
9579629baa8cSmrg[Package requirements ($2) were not met:
9580629baa8cSmrg
9581629baa8cSmrg$$1_PKG_ERRORS
9582629baa8cSmrg
9583629baa8cSmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you
9584629baa8cSmrginstalled software in a non-standard prefix.
9585629baa8cSmrg
9586629baa8cSmrg_PKG_TEXT])[]dnl
9587629baa8cSmrg        ])
9588629baa8cSmrgelif test $pkg_failed = untried; then
9589629baa8cSmrg     	AC_MSG_RESULT([no])
9590629baa8cSmrg	m4_default([$4], [AC_MSG_FAILURE(
9591629baa8cSmrg[The pkg-config script could not be found or is too old.  Make sure it
9592629baa8cSmrgis in your PATH or set the PKG_CONFIG environment variable to the full
9593629baa8cSmrgpath to pkg-config.
9594629baa8cSmrg
9595629baa8cSmrg_PKG_TEXT
9596629baa8cSmrg
9597629baa8cSmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
9598629baa8cSmrg        ])
95995ffd6003Smrgelse
9600629baa8cSmrg	$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
9601629baa8cSmrg	$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
9602629baa8cSmrg        AC_MSG_RESULT([yes])
9603629baa8cSmrg	$3
9604629baa8cSmrgfi[]dnl
9605629baa8cSmrg])# PKG_CHECK_MODULES
9606145b7b3cSmrg
9607629baa8cSmrgdnl xorg-macros.m4.  Generated from xorg-macros.m4.in xorgversion.m4 by configure.
9608629baa8cSmrgdnl
9609629baa8cSmrgdnl Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
9610629baa8cSmrgdnl 
9611629baa8cSmrgdnl Permission is hereby granted, free of charge, to any person obtaining a
9612629baa8cSmrgdnl copy of this software and associated documentation files (the "Software"),
9613629baa8cSmrgdnl to deal in the Software without restriction, including without limitation
9614629baa8cSmrgdnl the rights to use, copy, modify, merge, publish, distribute, sublicense,
9615629baa8cSmrgdnl and/or sell copies of the Software, and to permit persons to whom the
9616629baa8cSmrgdnl Software is furnished to do so, subject to the following conditions:
9617629baa8cSmrgdnl
9618629baa8cSmrgdnl The above copyright notice and this permission notice (including the next
9619629baa8cSmrgdnl paragraph) shall be included in all copies or substantial portions of the
9620629baa8cSmrgdnl Software.
9621629baa8cSmrgdnl
9622629baa8cSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
9623629baa8cSmrgdnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
9624629baa8cSmrgdnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
9625629baa8cSmrgdnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
9626629baa8cSmrgdnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
9627629baa8cSmrgdnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
9628629baa8cSmrgdnl DEALINGS IN THE SOFTWARE.
9629145b7b3cSmrg
9630629baa8cSmrg# XORG_MACROS_VERSION(required-version)
9631629baa8cSmrg# -------------------------------------
9632629baa8cSmrg# Minimum version: 1.1.0
9633629baa8cSmrg#
9634629baa8cSmrg# If you're using a macro added in Version 1.1 or newer, include this in
9635629baa8cSmrg# your configure.ac with the minimum required version, such as:
9636629baa8cSmrg# XORG_MACROS_VERSION(1.1)
9637629baa8cSmrg#
9638629baa8cSmrg# To ensure that this macro is defined, also add:
9639629baa8cSmrg# m4_ifndef([XORG_MACROS_VERSION],
9640629baa8cSmrg#     [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])])
9641629baa8cSmrg#
9642629baa8cSmrg#
9643629baa8cSmrg# See the "minimum version" comment for each macro you use to see what 
9644629baa8cSmrg# version you require.
9645629baa8cSmrgm4_defun([XORG_MACROS_VERSION],[
9646629baa8cSmrgm4_define([vers_have], [1.15.0])
9647629baa8cSmrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.])))
9648629baa8cSmrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.])))
9649629baa8cSmrgm4_if(m4_cmp(maj_have, maj_needed), 0,,
9650629baa8cSmrg    [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])])
9651629baa8cSmrgm4_if(m4_version_compare(vers_have, [$1]), -1,
9652629baa8cSmrg    [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])])
9653629baa8cSmrgm4_undefine([vers_have])
9654629baa8cSmrgm4_undefine([maj_have])
9655629baa8cSmrgm4_undefine([maj_needed])
9656629baa8cSmrg]) # XORG_MACROS_VERSION
9657145b7b3cSmrg
9658629baa8cSmrg# XORG_PROG_RAWCPP()
9659629baa8cSmrg# ------------------
9660629baa8cSmrg# Minimum version: 1.0.0
9661629baa8cSmrg#
9662629baa8cSmrg# Find cpp program and necessary flags for use in pre-processing text files
9663629baa8cSmrg# such as man pages and config files
9664629baa8cSmrgAC_DEFUN([XORG_PROG_RAWCPP],[
9665629baa8cSmrgAC_REQUIRE([AC_PROG_CPP])
9666629baa8cSmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 
9667629baa8cSmrg   [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib])
9668145b7b3cSmrg
9669629baa8cSmrg# Check for flag to avoid builtin definitions - assumes unix is predefined,
9670629baa8cSmrg# which is not the best choice for supporting other OS'es, but covers most
9671629baa8cSmrg# of the ones we need for now.
9672629baa8cSmrgAC_MSG_CHECKING([if $RAWCPP requires -undef])
9673629baa8cSmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp redefine unix ?]])])
9674629baa8cSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
9675629baa8cSmrg	AC_MSG_RESULT([no])
9676629baa8cSmrgelse
9677629baa8cSmrg	if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
9678629baa8cSmrg		RAWCPPFLAGS=-undef
9679629baa8cSmrg		AC_MSG_RESULT([yes])
9680629baa8cSmrg	# under Cygwin unix is still defined even with -undef
9681629baa8cSmrg	elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
9682629baa8cSmrg		RAWCPPFLAGS="-undef -ansi"
9683629baa8cSmrg		AC_MSG_RESULT([yes, with -ansi])
9684629baa8cSmrg	else
9685629baa8cSmrg		AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef.  I don't know what to do.])
9686629baa8cSmrg	fi
96875ffd6003Smrgfi
9688629baa8cSmrgrm -f conftest.$ac_ext
9689145b7b3cSmrg
9690629baa8cSmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional])
9691629baa8cSmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve   "whitespace"?]])])
9692629baa8cSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
9693629baa8cSmrg	AC_MSG_RESULT([no])
9694629baa8cSmrgelse
9695629baa8cSmrg	if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
9696629baa8cSmrg		RAWCPPFLAGS="${RAWCPPFLAGS} -traditional"
9697629baa8cSmrg		AC_MSG_RESULT([yes])
9698629baa8cSmrg	else
9699629baa8cSmrg		AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional.  I don't know what to do.])
9700629baa8cSmrg	fi
9701629baa8cSmrgfi
9702629baa8cSmrgrm -f conftest.$ac_ext
9703629baa8cSmrgAC_SUBST(RAWCPPFLAGS)
9704629baa8cSmrg]) # XORG_PROG_RAWCPP
9705145b7b3cSmrg
9706629baa8cSmrg# XORG_MANPAGE_SECTIONS()
9707629baa8cSmrg# -----------------------
9708629baa8cSmrg# Minimum version: 1.0.0
97095ffd6003Smrg#
9710629baa8cSmrg# Determine which sections man pages go in for the different man page types
9711629baa8cSmrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files.
9712629baa8cSmrg# Not sure if there's any better way than just hardcoding by OS name.
9713629baa8cSmrg# Override default settings by setting environment variables
9714629baa8cSmrg# Added MAN_SUBSTS in version 1.8
9715629baa8cSmrg# Added AC_PROG_SED in version 1.8
9716145b7b3cSmrg
9717629baa8cSmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[
9718629baa8cSmrgAC_REQUIRE([AC_CANONICAL_HOST])
9719629baa8cSmrgAC_REQUIRE([AC_PROG_SED])
9720145b7b3cSmrg
9721629baa8cSmrgif test x$APP_MAN_SUFFIX = x    ; then
9722629baa8cSmrg    APP_MAN_SUFFIX=1
9723629baa8cSmrgfi
9724629baa8cSmrgif test x$APP_MAN_DIR = x    ; then
9725629baa8cSmrg    APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)'
9726629baa8cSmrgfi
9727629baa8cSmrg
9728629baa8cSmrgif test x$LIB_MAN_SUFFIX = x    ; then
9729629baa8cSmrg    LIB_MAN_SUFFIX=3
9730629baa8cSmrgfi
9731629baa8cSmrgif test x$LIB_MAN_DIR = x    ; then
9732629baa8cSmrg    LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)'
9733629baa8cSmrgfi
9734629baa8cSmrg
9735629baa8cSmrgif test x$FILE_MAN_SUFFIX = x    ; then
9736629baa8cSmrg    case $host_os in
9737629baa8cSmrg	solaris*)	FILE_MAN_SUFFIX=4  ;;
9738629baa8cSmrg	*)		FILE_MAN_SUFFIX=5  ;;
9739629baa8cSmrg    esac
9740629baa8cSmrgfi
9741629baa8cSmrgif test x$FILE_MAN_DIR = x    ; then
9742629baa8cSmrg    FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)'
9743629baa8cSmrgfi
9744145b7b3cSmrg
9745629baa8cSmrgif test x$MISC_MAN_SUFFIX = x    ; then
9746629baa8cSmrg    case $host_os in
9747629baa8cSmrg	solaris*)	MISC_MAN_SUFFIX=5  ;;
9748629baa8cSmrg	*)		MISC_MAN_SUFFIX=7  ;;
9749629baa8cSmrg    esac
9750629baa8cSmrgfi
9751629baa8cSmrgif test x$MISC_MAN_DIR = x    ; then
9752629baa8cSmrg    MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)'
9753629baa8cSmrgfi
9754145b7b3cSmrg
9755629baa8cSmrgif test x$DRIVER_MAN_SUFFIX = x    ; then
9756629baa8cSmrg    case $host_os in
9757629baa8cSmrg	solaris*)	DRIVER_MAN_SUFFIX=7  ;;
9758629baa8cSmrg	*)		DRIVER_MAN_SUFFIX=4  ;;
9759629baa8cSmrg    esac
9760629baa8cSmrgfi
9761629baa8cSmrgif test x$DRIVER_MAN_DIR = x    ; then
9762629baa8cSmrg    DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)'
9763629baa8cSmrgfi
9764145b7b3cSmrg
9765629baa8cSmrgif test x$ADMIN_MAN_SUFFIX = x    ; then
9766629baa8cSmrg    case $host_os in
9767629baa8cSmrg	solaris*)	ADMIN_MAN_SUFFIX=1m ;;
9768629baa8cSmrg	*)		ADMIN_MAN_SUFFIX=8  ;;
9769629baa8cSmrg    esac
9770629baa8cSmrgfi
9771629baa8cSmrgif test x$ADMIN_MAN_DIR = x    ; then
9772629baa8cSmrg    ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)'
9773629baa8cSmrgfi
9774145b7b3cSmrg
9775145b7b3cSmrg
9776629baa8cSmrgAC_SUBST([APP_MAN_SUFFIX])
9777629baa8cSmrgAC_SUBST([LIB_MAN_SUFFIX])
9778629baa8cSmrgAC_SUBST([FILE_MAN_SUFFIX])
9779629baa8cSmrgAC_SUBST([MISC_MAN_SUFFIX])
9780629baa8cSmrgAC_SUBST([DRIVER_MAN_SUFFIX])
9781629baa8cSmrgAC_SUBST([ADMIN_MAN_SUFFIX])
9782629baa8cSmrgAC_SUBST([APP_MAN_DIR])
9783629baa8cSmrgAC_SUBST([LIB_MAN_DIR])
9784629baa8cSmrgAC_SUBST([FILE_MAN_DIR])
9785629baa8cSmrgAC_SUBST([MISC_MAN_DIR])
9786629baa8cSmrgAC_SUBST([DRIVER_MAN_DIR])
9787629baa8cSmrgAC_SUBST([ADMIN_MAN_DIR])
9788629baa8cSmrg
9789629baa8cSmrgXORG_MAN_PAGE="X Version 11"
9790629baa8cSmrgAC_SUBST([XORG_MAN_PAGE])
9791629baa8cSmrgMAN_SUBSTS="\
9792629baa8cSmrg	-e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \
9793629baa8cSmrg	-e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \
9794629baa8cSmrg	-e 's|__xservername__|Xorg|g' \
9795629baa8cSmrg	-e 's|__xconfigfile__|xorg.conf|g' \
9796629baa8cSmrg	-e 's|__projectroot__|\$(prefix)|g' \
9797629baa8cSmrg	-e 's|__apploaddir__|\$(appdefaultdir)|g' \
9798629baa8cSmrg	-e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \
9799629baa8cSmrg	-e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \
9800629baa8cSmrg	-e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \
9801629baa8cSmrg	-e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \
9802629baa8cSmrg	-e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \
9803629baa8cSmrg	-e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'"
9804629baa8cSmrgAC_SUBST([MAN_SUBSTS])
9805145b7b3cSmrg
9806629baa8cSmrg]) # XORG_MANPAGE_SECTIONS
9807145b7b3cSmrg
9808629baa8cSmrg# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION])
9809629baa8cSmrg# ------------------------
9810629baa8cSmrg# Minimum version: 1.7.0
98115ffd6003Smrg#
9812629baa8cSmrg# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent
9813629baa8cSmrg# provided by xorg-sgml-doctools, if installed.
9814629baa8cSmrgAC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[
9815629baa8cSmrgAC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])])
9816629baa8cSmrgXORG_SGML_PATH=
9817629baa8cSmrgPKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])],
9818629baa8cSmrg    [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`],
9819629baa8cSmrg    [m4_ifval([$1],[:],
9820629baa8cSmrg        [if test x"$cross_compiling" != x"yes" ; then
9821629baa8cSmrg            AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent],
9822629baa8cSmrg                          [XORG_SGML_PATH=$prefix/share/sgml])
9823629baa8cSmrg         fi])
9824629baa8cSmrg    ])
9825629baa8cSmrg
9826629baa8cSmrg# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing
9827629baa8cSmrg# the path and the name of the doc stylesheet
9828629baa8cSmrgif test "x$XORG_SGML_PATH" != "x" ; then
9829629baa8cSmrg   AC_MSG_RESULT([$XORG_SGML_PATH])
9830629baa8cSmrg   STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11
9831629baa8cSmrg   XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl
9832629baa8cSmrgelse
9833629baa8cSmrg   AC_MSG_RESULT([no])
9834629baa8cSmrgfi
9835145b7b3cSmrg
9836629baa8cSmrgAC_SUBST(XORG_SGML_PATH)
9837629baa8cSmrgAC_SUBST(STYLESHEET_SRCDIR)
9838629baa8cSmrgAC_SUBST(XSL_STYLESHEET)
9839629baa8cSmrgAM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"])
9840629baa8cSmrg]) # XORG_CHECK_SGML_DOCTOOLS
9841145b7b3cSmrg
9842629baa8cSmrg# XORG_CHECK_LINUXDOC
9843629baa8cSmrg# -------------------
9844629baa8cSmrg# Minimum version: 1.0.0
9845629baa8cSmrg#
9846629baa8cSmrg# Defines the variable MAKE_TEXT if the necessary tools and
9847629baa8cSmrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt.
9848629baa8cSmrg# Whether or not the necessary tools and files are found can be checked
9849629baa8cSmrg# with the AM_CONDITIONAL "BUILD_LINUXDOC"
9850629baa8cSmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[
9851629baa8cSmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS])
9852629baa8cSmrgAC_REQUIRE([XORG_WITH_PS2PDF])
9853145b7b3cSmrg
9854629baa8cSmrgAC_PATH_PROG(LINUXDOC, linuxdoc)
9855629baa8cSmrg
9856629baa8cSmrgAC_MSG_CHECKING([whether to build documentation])
9857629baa8cSmrg
9858629baa8cSmrgif test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then
9859629baa8cSmrg   BUILDDOC=yes
9860629baa8cSmrgelse
9861629baa8cSmrg   BUILDDOC=no
98625ffd6003Smrgfi
9863145b7b3cSmrg
9864629baa8cSmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes])
9865629baa8cSmrg
9866629baa8cSmrgAC_MSG_RESULT([$BUILDDOC])
9867629baa8cSmrg
9868629baa8cSmrgAC_MSG_CHECKING([whether to build pdf documentation])
9869629baa8cSmrg
9870629baa8cSmrgif test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then
9871629baa8cSmrg   BUILDPDFDOC=yes
9872629baa8cSmrgelse
9873629baa8cSmrg   BUILDPDFDOC=no
98745ffd6003Smrgfi
9875145b7b3cSmrg
9876629baa8cSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
9877145b7b3cSmrg
9878629baa8cSmrgAC_MSG_RESULT([$BUILDPDFDOC])
9879145b7b3cSmrg
9880629baa8cSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f"
9881629baa8cSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps"
9882629baa8cSmrgMAKE_PDF="$PS2PDF"
9883629baa8cSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC  -B html --split=0"
9884145b7b3cSmrg
9885629baa8cSmrgAC_SUBST(MAKE_TEXT)
9886629baa8cSmrgAC_SUBST(MAKE_PS)
9887629baa8cSmrgAC_SUBST(MAKE_PDF)
9888629baa8cSmrgAC_SUBST(MAKE_HTML)
9889629baa8cSmrg]) # XORG_CHECK_LINUXDOC
9890145b7b3cSmrg
9891629baa8cSmrg# XORG_CHECK_DOCBOOK
9892629baa8cSmrg# -------------------
9893629baa8cSmrg# Minimum version: 1.0.0
9894629baa8cSmrg#
9895629baa8cSmrg# Checks for the ability to build output formats from SGML DocBook source.
9896629baa8cSmrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC"
9897629baa8cSmrg# indicates whether the necessary tools and files are found and, if set,
9898629baa8cSmrg# $(MAKE_XXX) blah.sgml will produce blah.xxx.
9899629baa8cSmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[
9900629baa8cSmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS])
9901145b7b3cSmrg
9902629baa8cSmrgBUILDTXTDOC=no
9903629baa8cSmrgBUILDPDFDOC=no
9904629baa8cSmrgBUILDPSDOC=no
9905629baa8cSmrgBUILDHTMLDOC=no
9906145b7b3cSmrg
9907629baa8cSmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps)
9908629baa8cSmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf)
9909629baa8cSmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html)
9910629baa8cSmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt)
9911629baa8cSmrg
9912629baa8cSmrgAC_MSG_CHECKING([whether to build text documentation])
9913629baa8cSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x &&
9914629baa8cSmrg   test x$BUILD_TXTDOC != xno; then
9915629baa8cSmrg	BUILDTXTDOC=yes
9916629baa8cSmrgfi
9917629baa8cSmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes])
9918629baa8cSmrgAC_MSG_RESULT([$BUILDTXTDOC])
9919629baa8cSmrg
9920629baa8cSmrgAC_MSG_CHECKING([whether to build PDF documentation])
9921629baa8cSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x &&
9922629baa8cSmrg   test x$BUILD_PDFDOC != xno; then
9923629baa8cSmrg	BUILDPDFDOC=yes
9924629baa8cSmrgfi
9925629baa8cSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
9926629baa8cSmrgAC_MSG_RESULT([$BUILDPDFDOC])
9927629baa8cSmrg
9928629baa8cSmrgAC_MSG_CHECKING([whether to build PostScript documentation])
9929629baa8cSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x &&
9930629baa8cSmrg   test x$BUILD_PSDOC != xno; then
9931629baa8cSmrg	BUILDPSDOC=yes
9932629baa8cSmrgfi
9933629baa8cSmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes])
9934629baa8cSmrgAC_MSG_RESULT([$BUILDPSDOC])
9935629baa8cSmrg
9936629baa8cSmrgAC_MSG_CHECKING([whether to build HTML documentation])
9937629baa8cSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x &&
9938629baa8cSmrg   test x$BUILD_HTMLDOC != xno; then
9939629baa8cSmrg	BUILDHTMLDOC=yes
9940629baa8cSmrgfi
9941629baa8cSmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes])
9942629baa8cSmrgAC_MSG_RESULT([$BUILDHTMLDOC])
9943145b7b3cSmrg
9944629baa8cSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT"
9945629baa8cSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS"
9946629baa8cSmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF"
9947629baa8cSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML"
9948629baa8cSmrg
9949629baa8cSmrgAC_SUBST(MAKE_TEXT)
9950629baa8cSmrgAC_SUBST(MAKE_PS)
9951629baa8cSmrgAC_SUBST(MAKE_PDF)
9952629baa8cSmrgAC_SUBST(MAKE_HTML)
9953629baa8cSmrg]) # XORG_CHECK_DOCBOOK
9954629baa8cSmrg
9955629baa8cSmrg# XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT])
9956629baa8cSmrg# ----------------
9957629baa8cSmrg# Minimum version: 1.5.0
9958629baa8cSmrg# Minimum version for optional DEFAULT argument: 1.11.0
99595ffd6003Smrg#
9960629baa8cSmrg# Documentation tools are not always available on all platforms and sometimes
9961629baa8cSmrg# not at the appropriate level. This macro enables a module to test for the
9962629baa8cSmrg# presence of the tool and obtain it's path in separate variables. Coupled with
9963629baa8cSmrg# the --with-xmlto option, it allows maximum flexibilty in making decisions
9964629baa8cSmrg# as whether or not to use the xmlto package. When DEFAULT is not specified,
9965629baa8cSmrg# --with-xmlto assumes 'auto'.
9966629baa8cSmrg#
9967629baa8cSmrg# Interface to module:
9968629baa8cSmrg# HAVE_XMLTO: 	used in makefiles to conditionally generate documentation
9969629baa8cSmrg# XMLTO:	returns the path of the xmlto program found
9970629baa8cSmrg#		returns the path set by the user in the environment
9971629baa8cSmrg# --with-xmlto:	'yes' user instructs the module to use xmlto
9972629baa8cSmrg#		'no' user instructs the module not to use xmlto
9973629baa8cSmrg#
9974629baa8cSmrg# Added in version 1.10.0
9975629baa8cSmrg# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation
9976629baa8cSmrg#                  xmlto for text output requires either lynx, links, or w3m browsers
9977629baa8cSmrg#
9978629baa8cSmrg# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path.
9979629baa8cSmrg#
9980629baa8cSmrgAC_DEFUN([XORG_WITH_XMLTO],[
9981629baa8cSmrgAC_ARG_VAR([XMLTO], [Path to xmlto command])
9982629baa8cSmrgm4_define([_defopt], m4_default([$2], [auto]))
9983629baa8cSmrgAC_ARG_WITH(xmlto,
9984629baa8cSmrg	AS_HELP_STRING([--with-xmlto],
9985629baa8cSmrg	   [Use xmlto to regenerate documentation (default: ]_defopt[)]),
9986629baa8cSmrg	   [use_xmlto=$withval], [use_xmlto=]_defopt)
9987629baa8cSmrgm4_undefine([_defopt])
9988145b7b3cSmrg
9989629baa8cSmrgif test "x$use_xmlto" = x"auto"; then
9990629baa8cSmrg   AC_PATH_PROG([XMLTO], [xmlto])
9991629baa8cSmrg   if test "x$XMLTO" = "x"; then
9992629baa8cSmrg        AC_MSG_WARN([xmlto not found - documentation targets will be skipped])
9993629baa8cSmrg	have_xmlto=no
9994629baa8cSmrg   else
9995629baa8cSmrg        have_xmlto=yes
9996629baa8cSmrg   fi
9997629baa8cSmrgelif test "x$use_xmlto" = x"yes" ; then
9998629baa8cSmrg   AC_PATH_PROG([XMLTO], [xmlto])
9999629baa8cSmrg   if test "x$XMLTO" = "x"; then
10000629baa8cSmrg        AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH])
10001629baa8cSmrg   fi
10002629baa8cSmrg   have_xmlto=yes
10003629baa8cSmrgelif test "x$use_xmlto" = x"no" ; then
10004629baa8cSmrg   if test "x$XMLTO" != "x"; then
10005629baa8cSmrg      AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified])
10006629baa8cSmrg   fi
10007629baa8cSmrg   have_xmlto=no
10008629baa8cSmrgelse
10009629baa8cSmrg   AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no'])
100105ffd6003Smrgfi
10011145b7b3cSmrg
10012629baa8cSmrg# Test for a minimum version of xmlto, if provided.
10013629baa8cSmrgm4_ifval([$1],
10014629baa8cSmrg[if test "$have_xmlto" = yes; then
10015629baa8cSmrg    # scrape the xmlto version
10016629baa8cSmrg    AC_MSG_CHECKING([the xmlto version])
10017629baa8cSmrg    xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3`
10018629baa8cSmrg    AC_MSG_RESULT([$xmlto_version])
10019629baa8cSmrg    AS_VERSION_COMPARE([$xmlto_version], [$1],
10020629baa8cSmrg        [if test "x$use_xmlto" = xauto; then
10021629baa8cSmrg            AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed])
10022629baa8cSmrg            have_xmlto=no
10023629baa8cSmrg        else
10024629baa8cSmrg            AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed])
10025629baa8cSmrg        fi])
10026629baa8cSmrgfi])
10027145b7b3cSmrg
10028629baa8cSmrg# Test for the ability of xmlto to generate a text target
10029629baa8cSmrghave_xmlto_text=no
10030629baa8cSmrgcat > conftest.xml << "EOF"
10031629baa8cSmrgEOF
10032629baa8cSmrgAS_IF([test "$have_xmlto" = yes],
10033629baa8cSmrg      [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1],
10034629baa8cSmrg             [have_xmlto_text=yes],
10035629baa8cSmrg             [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])])
10036629baa8cSmrgrm -f conftest.xml
10037629baa8cSmrgAM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes])
10038629baa8cSmrgAM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes])
10039629baa8cSmrg]) # XORG_WITH_XMLTO
10040145b7b3cSmrg
10041629baa8cSmrg# XORG_WITH_XSLTPROC([MIN-VERSION], [DEFAULT])
10042629baa8cSmrg# --------------------------------------------
10043629baa8cSmrg# Minimum version: 1.12.0
10044629baa8cSmrg# Minimum version for optional DEFAULT argument: 1.12.0
10045629baa8cSmrg#
10046629baa8cSmrg# XSLT (Extensible Stylesheet Language Transformations) is a declarative,
10047629baa8cSmrg# XML-based language used for the transformation of XML documents.
10048629baa8cSmrg# The xsltproc command line tool is for applying XSLT stylesheets to XML documents.
10049629baa8cSmrg# It is used under the cover by xmlto to generate html files from DocBook/XML.
10050629baa8cSmrg# The XSLT processor is often used as a standalone tool for transformations.
10051629baa8cSmrg# It should not be assumed that this tool is used only to work with documnetation.
10052629baa8cSmrg# When DEFAULT is not specified, --with-xsltproc assumes 'auto'.
10053629baa8cSmrg#
10054629baa8cSmrg# Interface to module:
10055629baa8cSmrg# HAVE_XSLTPROC: used in makefiles to conditionally generate documentation
10056629baa8cSmrg# XSLTPROC:	 returns the path of the xsltproc program found
10057629baa8cSmrg#		 returns the path set by the user in the environment
10058629baa8cSmrg# --with-xsltproc: 'yes' user instructs the module to use xsltproc
10059629baa8cSmrg#		  'no' user instructs the module not to use xsltproc
10060629baa8cSmrg# have_xsltproc: returns yes if xsltproc found in PATH or no
10061629baa8cSmrg#
10062629baa8cSmrg# If the user sets the value of XSLTPROC, AC_PATH_PROG skips testing the path.
10063629baa8cSmrg#
10064629baa8cSmrgAC_DEFUN([XORG_WITH_XSLTPROC],[
10065629baa8cSmrgAC_ARG_VAR([XSLTPROC], [Path to xsltproc command])
10066629baa8cSmrg# Preserves the interface, should it be implemented later
10067629baa8cSmrgm4_ifval([$1], [m4_warn([syntax], [Checking for xsltproc MIN-VERSION is not implemented])])
10068629baa8cSmrgm4_define([_defopt], m4_default([$2], [auto]))
10069629baa8cSmrgAC_ARG_WITH(xsltproc,
10070629baa8cSmrg	AS_HELP_STRING([--with-xsltproc],
10071629baa8cSmrg	   [Use xsltproc for the transformation of XML documents (default: ]_defopt[)]),
10072629baa8cSmrg	   [use_xsltproc=$withval], [use_xsltproc=]_defopt)
10073629baa8cSmrgm4_undefine([_defopt])
10074629baa8cSmrg
10075629baa8cSmrgif test "x$use_xsltproc" = x"auto"; then
10076629baa8cSmrg   AC_PATH_PROG([XSLTPROC], [xsltproc])
10077629baa8cSmrg   if test "x$XSLTPROC" = "x"; then
10078629baa8cSmrg        AC_MSG_WARN([xsltproc not found - cannot transform XML documents])
10079629baa8cSmrg	have_xsltproc=no
10080629baa8cSmrg   else
10081629baa8cSmrg        have_xsltproc=yes
10082629baa8cSmrg   fi
10083629baa8cSmrgelif test "x$use_xsltproc" = x"yes" ; then
10084629baa8cSmrg   AC_PATH_PROG([XSLTPROC], [xsltproc])
10085629baa8cSmrg   if test "x$XSLTPROC" = "x"; then
10086629baa8cSmrg        AC_MSG_ERROR([--with-xsltproc=yes specified but xsltproc not found in PATH])
10087629baa8cSmrg   fi
10088629baa8cSmrg   have_xsltproc=yes
10089629baa8cSmrgelif test "x$use_xsltproc" = x"no" ; then
10090629baa8cSmrg   if test "x$XSLTPROC" != "x"; then
10091629baa8cSmrg      AC_MSG_WARN([ignoring XSLTPROC environment variable since --with-xsltproc=no was specified])
10092629baa8cSmrg   fi
10093629baa8cSmrg   have_xsltproc=no
100945ffd6003Smrgelse
10095629baa8cSmrg   AC_MSG_ERROR([--with-xsltproc expects 'yes' or 'no'])
100965ffd6003Smrgfi
10097145b7b3cSmrg
10098629baa8cSmrgAM_CONDITIONAL([HAVE_XSLTPROC], [test "$have_xsltproc" = yes])
10099629baa8cSmrg]) # XORG_WITH_XSLTPROC
10100145b7b3cSmrg
10101629baa8cSmrg# XORG_WITH_PERL([MIN-VERSION], [DEFAULT])
10102629baa8cSmrg# ----------------------------------------
10103629baa8cSmrg# Minimum version: 1.15.0
101045ffd6003Smrg#
10105629baa8cSmrg# PERL (Practical Extraction and Report Language) is a language optimized for
10106629baa8cSmrg# scanning arbitrary text files, extracting information from those text files,
10107629baa8cSmrg# and printing reports based on that information.
10108629baa8cSmrg#
10109629baa8cSmrg# When DEFAULT is not specified, --with-perl assumes 'auto'.
10110629baa8cSmrg#
10111629baa8cSmrg# Interface to module:
10112629baa8cSmrg# HAVE_PERL: used in makefiles to conditionally scan text files
10113629baa8cSmrg# PERL:	     returns the path of the perl program found
10114629baa8cSmrg#	     returns the path set by the user in the environment
10115629baa8cSmrg# --with-perl: 'yes' user instructs the module to use perl
10116629baa8cSmrg#	       'no' user instructs the module not to use perl
10117629baa8cSmrg# have_perl: returns yes if perl found in PATH or no
10118629baa8cSmrg#
10119629baa8cSmrg# If the user sets the value of PERL, AC_PATH_PROG skips testing the path.
10120629baa8cSmrg#
10121629baa8cSmrgAC_DEFUN([XORG_WITH_PERL],[
10122629baa8cSmrgAC_ARG_VAR([PERL], [Path to perl command])
10123629baa8cSmrg# Preserves the interface, should it be implemented later
10124629baa8cSmrgm4_ifval([$1], [m4_warn([syntax], [Checking for perl MIN-VERSION is not implemented])])
10125629baa8cSmrgm4_define([_defopt], m4_default([$2], [auto]))
10126629baa8cSmrgAC_ARG_WITH(perl,
10127629baa8cSmrg	AS_HELP_STRING([--with-perl],
10128629baa8cSmrg	   [Use perl for extracting information from files (default: ]_defopt[)]),
10129629baa8cSmrg	   [use_perl=$withval], [use_perl=]_defopt)
10130629baa8cSmrgm4_undefine([_defopt])
10131629baa8cSmrg
10132629baa8cSmrgif test "x$use_perl" = x"auto"; then
10133629baa8cSmrg   AC_PATH_PROG([PERL], [perl])
10134629baa8cSmrg   if test "x$PERL" = "x"; then
10135629baa8cSmrg        AC_MSG_WARN([perl not found - cannot extract information and report])
10136629baa8cSmrg	have_perl=no
10137629baa8cSmrg   else
10138629baa8cSmrg        have_perl=yes
10139629baa8cSmrg   fi
10140629baa8cSmrgelif test "x$use_perl" = x"yes" ; then
10141629baa8cSmrg   AC_PATH_PROG([PERL], [perl])
10142629baa8cSmrg   if test "x$PERL" = "x"; then
10143629baa8cSmrg        AC_MSG_ERROR([--with-perl=yes specified but perl not found in PATH])
10144629baa8cSmrg   fi
10145629baa8cSmrg   have_perl=yes
10146629baa8cSmrgelif test "x$use_perl" = x"no" ; then
10147629baa8cSmrg   if test "x$PERL" != "x"; then
10148629baa8cSmrg      AC_MSG_WARN([ignoring PERL environment variable since --with-perl=no was specified])
10149629baa8cSmrg   fi
10150629baa8cSmrg   have_perl=no
10151629baa8cSmrgelse
10152629baa8cSmrg   AC_MSG_ERROR([--with-perl expects 'yes' or 'no'])
10153629baa8cSmrgfi
10154145b7b3cSmrg
10155629baa8cSmrgAM_CONDITIONAL([HAVE_PERL], [test "$have_perl" = yes])
10156629baa8cSmrg]) # XORG_WITH_PERL
10157145b7b3cSmrg
10158629baa8cSmrg# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT])
10159629baa8cSmrg# ----------------
10160629baa8cSmrg# Minimum version: 1.5.0
10161629baa8cSmrg# Minimum version for optional DEFAULT argument: 1.11.0
10162629baa8cSmrg#
10163629baa8cSmrg# Documentation tools are not always available on all platforms and sometimes
10164629baa8cSmrg# not at the appropriate level. This macro enables a module to test for the
10165629baa8cSmrg# presence of the tool and obtain it's path in separate variables. Coupled with
10166629baa8cSmrg# the --with-asciidoc option, it allows maximum flexibilty in making decisions
10167629baa8cSmrg# as whether or not to use the asciidoc package. When DEFAULT is not specified,
10168629baa8cSmrg# --with-asciidoc assumes 'auto'.
10169629baa8cSmrg#
10170629baa8cSmrg# Interface to module:
10171629baa8cSmrg# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation
10172629baa8cSmrg# ASCIIDOC:	 returns the path of the asciidoc program found
10173629baa8cSmrg#		 returns the path set by the user in the environment
10174629baa8cSmrg# --with-asciidoc: 'yes' user instructs the module to use asciidoc
10175629baa8cSmrg#		  'no' user instructs the module not to use asciidoc
10176629baa8cSmrg#
10177629baa8cSmrg# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path.
10178629baa8cSmrg#
10179629baa8cSmrgAC_DEFUN([XORG_WITH_ASCIIDOC],[
10180629baa8cSmrgAC_ARG_VAR([ASCIIDOC], [Path to asciidoc command])
10181629baa8cSmrgm4_define([_defopt], m4_default([$2], [auto]))
10182629baa8cSmrgAC_ARG_WITH(asciidoc,
10183629baa8cSmrg	AS_HELP_STRING([--with-asciidoc],
10184629baa8cSmrg	   [Use asciidoc to regenerate documentation (default: ]_defopt[)]),
10185629baa8cSmrg	   [use_asciidoc=$withval], [use_asciidoc=]_defopt)
10186629baa8cSmrgm4_undefine([_defopt])
10187145b7b3cSmrg
10188629baa8cSmrgif test "x$use_asciidoc" = x"auto"; then
10189629baa8cSmrg   AC_PATH_PROG([ASCIIDOC], [asciidoc])
10190629baa8cSmrg   if test "x$ASCIIDOC" = "x"; then
10191629baa8cSmrg        AC_MSG_WARN([asciidoc not found - documentation targets will be skipped])
10192629baa8cSmrg	have_asciidoc=no
10193629baa8cSmrg   else
10194629baa8cSmrg        have_asciidoc=yes
10195629baa8cSmrg   fi
10196629baa8cSmrgelif test "x$use_asciidoc" = x"yes" ; then
10197629baa8cSmrg   AC_PATH_PROG([ASCIIDOC], [asciidoc])
10198629baa8cSmrg   if test "x$ASCIIDOC" = "x"; then
10199629baa8cSmrg        AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH])
10200629baa8cSmrg   fi
10201629baa8cSmrg   have_asciidoc=yes
10202629baa8cSmrgelif test "x$use_asciidoc" = x"no" ; then
10203629baa8cSmrg   if test "x$ASCIIDOC" != "x"; then
10204629baa8cSmrg      AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified])
10205629baa8cSmrg   fi
10206629baa8cSmrg   have_asciidoc=no
10207629baa8cSmrgelse
10208629baa8cSmrg   AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no'])
10209629baa8cSmrgfi
10210629baa8cSmrgm4_ifval([$1],
10211629baa8cSmrg[if test "$have_asciidoc" = yes; then
10212629baa8cSmrg    # scrape the asciidoc version
10213629baa8cSmrg    AC_MSG_CHECKING([the asciidoc version])
10214629baa8cSmrg    asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2`
10215629baa8cSmrg    AC_MSG_RESULT([$asciidoc_version])
10216629baa8cSmrg    AS_VERSION_COMPARE([$asciidoc_version], [$1],
10217629baa8cSmrg        [if test "x$use_asciidoc" = xauto; then
10218629baa8cSmrg            AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed])
10219629baa8cSmrg            have_asciidoc=no
10220629baa8cSmrg        else
10221629baa8cSmrg            AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed])
10222629baa8cSmrg        fi])
10223629baa8cSmrgfi])
10224629baa8cSmrgAM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes])
10225629baa8cSmrg]) # XORG_WITH_ASCIIDOC
10226145b7b3cSmrg
10227629baa8cSmrg# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT])
10228629baa8cSmrg# --------------------------------
10229629baa8cSmrg# Minimum version: 1.5.0
10230629baa8cSmrg# Minimum version for optional DEFAULT argument: 1.11.0
10231629baa8cSmrg#
10232629baa8cSmrg# Documentation tools are not always available on all platforms and sometimes
10233629baa8cSmrg# not at the appropriate level. This macro enables a module to test for the
10234629baa8cSmrg# presence of the tool and obtain it's path in separate variables. Coupled with
10235629baa8cSmrg# the --with-doxygen option, it allows maximum flexibilty in making decisions
10236629baa8cSmrg# as whether or not to use the doxygen package. When DEFAULT is not specified,
10237629baa8cSmrg# --with-doxygen assumes 'auto'.
10238629baa8cSmrg#
10239629baa8cSmrg# Interface to module:
10240629baa8cSmrg# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation
10241629baa8cSmrg# DOXYGEN:	 returns the path of the doxygen program found
10242629baa8cSmrg#		 returns the path set by the user in the environment
10243629baa8cSmrg# --with-doxygen: 'yes' user instructs the module to use doxygen
10244629baa8cSmrg#		  'no' user instructs the module not to use doxygen
10245629baa8cSmrg#
10246629baa8cSmrg# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path.
10247629baa8cSmrg#
10248629baa8cSmrgAC_DEFUN([XORG_WITH_DOXYGEN],[
10249629baa8cSmrgAC_ARG_VAR([DOXYGEN], [Path to doxygen command])
10250629baa8cSmrgm4_define([_defopt], m4_default([$2], [auto]))
10251629baa8cSmrgAC_ARG_WITH(doxygen,
10252629baa8cSmrg	AS_HELP_STRING([--with-doxygen],
10253629baa8cSmrg	   [Use doxygen to regenerate documentation (default: ]_defopt[)]),
10254629baa8cSmrg	   [use_doxygen=$withval], [use_doxygen=]_defopt)
10255629baa8cSmrgm4_undefine([_defopt])
10256145b7b3cSmrg
10257629baa8cSmrgif test "x$use_doxygen" = x"auto"; then
10258629baa8cSmrg   AC_PATH_PROG([DOXYGEN], [doxygen])
10259629baa8cSmrg   if test "x$DOXYGEN" = "x"; then
10260629baa8cSmrg        AC_MSG_WARN([doxygen not found - documentation targets will be skipped])
10261629baa8cSmrg	have_doxygen=no
10262629baa8cSmrg   else
10263629baa8cSmrg        have_doxygen=yes
10264629baa8cSmrg   fi
10265629baa8cSmrgelif test "x$use_doxygen" = x"yes" ; then
10266629baa8cSmrg   AC_PATH_PROG([DOXYGEN], [doxygen])
10267629baa8cSmrg   if test "x$DOXYGEN" = "x"; then
10268629baa8cSmrg        AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH])
10269629baa8cSmrg   fi
10270629baa8cSmrg   have_doxygen=yes
10271629baa8cSmrgelif test "x$use_doxygen" = x"no" ; then
10272629baa8cSmrg   if test "x$DOXYGEN" != "x"; then
10273629baa8cSmrg      AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified])
10274629baa8cSmrg   fi
10275629baa8cSmrg   have_doxygen=no
10276629baa8cSmrgelse
10277629baa8cSmrg   AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no'])
10278629baa8cSmrgfi
10279629baa8cSmrgm4_ifval([$1],
10280629baa8cSmrg[if test "$have_doxygen" = yes; then
10281629baa8cSmrg    # scrape the doxygen version
10282629baa8cSmrg    AC_MSG_CHECKING([the doxygen version])
10283629baa8cSmrg    doxygen_version=`$DOXYGEN --version 2>/dev/null`
10284629baa8cSmrg    AC_MSG_RESULT([$doxygen_version])
10285629baa8cSmrg    AS_VERSION_COMPARE([$doxygen_version], [$1],
10286629baa8cSmrg        [if test "x$use_doxygen" = xauto; then
10287629baa8cSmrg            AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed])
10288629baa8cSmrg            have_doxygen=no
10289629baa8cSmrg        else
10290629baa8cSmrg            AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed])
10291629baa8cSmrg        fi])
10292629baa8cSmrgfi])
10293629baa8cSmrgAM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes])
10294629baa8cSmrg]) # XORG_WITH_DOXYGEN
10295629baa8cSmrg
10296629baa8cSmrg# XORG_WITH_GROFF([DEFAULT])
10297629baa8cSmrg# ----------------
10298629baa8cSmrg# Minimum version: 1.6.0
10299629baa8cSmrg# Minimum version for optional DEFAULT argument: 1.11.0
103005ffd6003Smrg#
10301629baa8cSmrg# Documentation tools are not always available on all platforms and sometimes
10302629baa8cSmrg# not at the appropriate level. This macro enables a module to test for the
10303629baa8cSmrg# presence of the tool and obtain it's path in separate variables. Coupled with
10304629baa8cSmrg# the --with-groff option, it allows maximum flexibilty in making decisions
10305629baa8cSmrg# as whether or not to use the groff package. When DEFAULT is not specified,
10306629baa8cSmrg# --with-groff assumes 'auto'.
10307629baa8cSmrg#
10308629baa8cSmrg# Interface to module:
10309629baa8cSmrg# HAVE_GROFF:	 used in makefiles to conditionally generate documentation
10310629baa8cSmrg# HAVE_GROFF_MM: the memorandum macros (-mm) package
10311629baa8cSmrg# HAVE_GROFF_MS: the -ms macros package
10312629baa8cSmrg# GROFF:	 returns the path of the groff program found
10313629baa8cSmrg#		 returns the path set by the user in the environment
10314629baa8cSmrg# --with-groff:	 'yes' user instructs the module to use groff
10315629baa8cSmrg#		 'no' user instructs the module not to use groff
10316629baa8cSmrg#
10317629baa8cSmrg# Added in version 1.9.0:
10318629baa8cSmrg# HAVE_GROFF_HTML: groff has dependencies to output HTML format:
10319629baa8cSmrg#		   pnmcut pnmcrop pnmtopng pnmtops from the netpbm package.
10320629baa8cSmrg#		   psselect from the psutils package.
10321629baa8cSmrg#		   the ghostcript package. Refer to the grohtml man pages
10322629baa8cSmrg#
10323629baa8cSmrg# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path.
10324629baa8cSmrg#
10325629baa8cSmrg# OS and distros often splits groff in a basic and full package, the former
10326629baa8cSmrg# having the groff program and the later having devices, fonts and macros
10327629baa8cSmrg# Checking for the groff executable is not enough.
10328629baa8cSmrg#
10329629baa8cSmrg# If macros are missing, we cannot assume that groff is useless, so we don't
10330629baa8cSmrg# unset HAVE_GROFF or GROFF env variables.
10331629baa8cSmrg# HAVE_GROFF_?? can never be true while HAVE_GROFF is false.
10332629baa8cSmrg#
10333629baa8cSmrgAC_DEFUN([XORG_WITH_GROFF],[
10334629baa8cSmrgAC_ARG_VAR([GROFF], [Path to groff command])
10335629baa8cSmrgm4_define([_defopt], m4_default([$1], [auto]))
10336629baa8cSmrgAC_ARG_WITH(groff,
10337629baa8cSmrg	AS_HELP_STRING([--with-groff],
10338629baa8cSmrg	   [Use groff to regenerate documentation (default: ]_defopt[)]),
10339629baa8cSmrg	   [use_groff=$withval], [use_groff=]_defopt)
10340629baa8cSmrgm4_undefine([_defopt])
10341629baa8cSmrg
10342629baa8cSmrgif test "x$use_groff" = x"auto"; then
10343629baa8cSmrg   AC_PATH_PROG([GROFF], [groff])
10344629baa8cSmrg   if test "x$GROFF" = "x"; then
10345629baa8cSmrg        AC_MSG_WARN([groff not found - documentation targets will be skipped])
10346629baa8cSmrg	have_groff=no
10347629baa8cSmrg   else
10348629baa8cSmrg        have_groff=yes
10349629baa8cSmrg   fi
10350629baa8cSmrgelif test "x$use_groff" = x"yes" ; then
10351629baa8cSmrg   AC_PATH_PROG([GROFF], [groff])
10352629baa8cSmrg   if test "x$GROFF" = "x"; then
10353629baa8cSmrg        AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH])
10354629baa8cSmrg   fi
10355629baa8cSmrg   have_groff=yes
10356629baa8cSmrgelif test "x$use_groff" = x"no" ; then
10357629baa8cSmrg   if test "x$GROFF" != "x"; then
10358629baa8cSmrg      AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified])
10359629baa8cSmrg   fi
10360629baa8cSmrg   have_groff=no
10361629baa8cSmrgelse
10362629baa8cSmrg   AC_MSG_ERROR([--with-groff expects 'yes' or 'no'])
10363629baa8cSmrgfi
10364145b7b3cSmrg
10365629baa8cSmrg# We have groff, test for the presence of the macro packages
10366629baa8cSmrgif test "x$have_groff" = x"yes"; then
10367629baa8cSmrg    AC_MSG_CHECKING([for ${GROFF} -ms macros])
10368629baa8cSmrg    if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then
10369629baa8cSmrg        groff_ms_works=yes
10370629baa8cSmrg    else
10371629baa8cSmrg        groff_ms_works=no
10372629baa8cSmrg    fi
10373629baa8cSmrg    AC_MSG_RESULT([$groff_ms_works])
10374629baa8cSmrg    AC_MSG_CHECKING([for ${GROFF} -mm macros])
10375629baa8cSmrg    if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then
10376629baa8cSmrg        groff_mm_works=yes
10377629baa8cSmrg    else
10378629baa8cSmrg        groff_mm_works=no
10379629baa8cSmrg    fi
10380629baa8cSmrg    AC_MSG_RESULT([$groff_mm_works])
10381629baa8cSmrgfi
10382145b7b3cSmrg
10383629baa8cSmrg# We have groff, test for HTML dependencies, one command per package
10384629baa8cSmrgif test "x$have_groff" = x"yes"; then
10385629baa8cSmrg   AC_PATH_PROGS(GS_PATH, [gs gswin32c])
10386629baa8cSmrg   AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng])
10387629baa8cSmrg   AC_PATH_PROG(PSSELECT_PATH, [psselect])
10388629baa8cSmrg   if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then
10389629baa8cSmrg      have_groff_html=yes
10390629baa8cSmrg   else
10391629baa8cSmrg      have_groff_html=no
10392629baa8cSmrg      AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages])
10393629baa8cSmrg   fi
103945ffd6003Smrgfi
10395145b7b3cSmrg
10396629baa8cSmrg# Set Automake conditionals for Makefiles
10397629baa8cSmrgAM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes])
10398629baa8cSmrgAM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes])
10399629baa8cSmrgAM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes])
10400629baa8cSmrgAM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes])
10401629baa8cSmrg]) # XORG_WITH_GROFF
10402629baa8cSmrg
10403629baa8cSmrg# XORG_WITH_FOP([MIN-VERSION], [DEFAULT])
10404629baa8cSmrg# ---------------------------------------
10405629baa8cSmrg# Minimum version: 1.6.0
10406629baa8cSmrg# Minimum version for optional DEFAULT argument: 1.11.0
10407629baa8cSmrg# Minimum version for optional MIN-VERSION argument: 1.15.0
104085ffd6003Smrg#
10409629baa8cSmrg# Documentation tools are not always available on all platforms and sometimes
10410629baa8cSmrg# not at the appropriate level. This macro enables a module to test for the
10411629baa8cSmrg# presence of the tool and obtain it's path in separate variables. Coupled with
10412629baa8cSmrg# the --with-fop option, it allows maximum flexibilty in making decisions
10413629baa8cSmrg# as whether or not to use the fop package. When DEFAULT is not specified,
10414629baa8cSmrg# --with-fop assumes 'auto'.
10415629baa8cSmrg#
10416629baa8cSmrg# Interface to module:
10417629baa8cSmrg# HAVE_FOP: 	used in makefiles to conditionally generate documentation
10418629baa8cSmrg# FOP:	 	returns the path of the fop program found
10419629baa8cSmrg#		returns the path set by the user in the environment
10420629baa8cSmrg# --with-fop: 	'yes' user instructs the module to use fop
10421629baa8cSmrg#		'no' user instructs the module not to use fop
10422629baa8cSmrg#
10423629baa8cSmrg# If the user sets the value of FOP, AC_PATH_PROG skips testing the path.
10424629baa8cSmrg#
10425629baa8cSmrgAC_DEFUN([XORG_WITH_FOP],[
10426629baa8cSmrgAC_ARG_VAR([FOP], [Path to fop command])
10427629baa8cSmrgm4_define([_defopt], m4_default([$2], [auto]))
10428629baa8cSmrgAC_ARG_WITH(fop,
10429629baa8cSmrg	AS_HELP_STRING([--with-fop],
10430629baa8cSmrg	   [Use fop to regenerate documentation (default: ]_defopt[)]),
10431629baa8cSmrg	   [use_fop=$withval], [use_fop=]_defopt)
10432629baa8cSmrgm4_undefine([_defopt])
10433629baa8cSmrg
10434629baa8cSmrgif test "x$use_fop" = x"auto"; then
10435629baa8cSmrg   AC_PATH_PROG([FOP], [fop])
10436629baa8cSmrg   if test "x$FOP" = "x"; then
10437629baa8cSmrg        AC_MSG_WARN([fop not found - documentation targets will be skipped])
10438629baa8cSmrg	have_fop=no
10439629baa8cSmrg   else
10440629baa8cSmrg        have_fop=yes
10441629baa8cSmrg   fi
10442629baa8cSmrgelif test "x$use_fop" = x"yes" ; then
10443629baa8cSmrg   AC_PATH_PROG([FOP], [fop])
10444629baa8cSmrg   if test "x$FOP" = "x"; then
10445629baa8cSmrg        AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH])
10446629baa8cSmrg   fi
10447629baa8cSmrg   have_fop=yes
10448629baa8cSmrgelif test "x$use_fop" = x"no" ; then
10449629baa8cSmrg   if test "x$FOP" != "x"; then
10450629baa8cSmrg      AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified])
10451629baa8cSmrg   fi
10452629baa8cSmrg   have_fop=no
10453629baa8cSmrgelse
10454629baa8cSmrg   AC_MSG_ERROR([--with-fop expects 'yes' or 'no'])
10455629baa8cSmrgfi
10456145b7b3cSmrg
10457629baa8cSmrg# Test for a minimum version of fop, if provided.
10458629baa8cSmrgm4_ifval([$1],
10459629baa8cSmrg[if test "$have_fop" = yes; then
10460629baa8cSmrg    # scrape the fop version
10461629baa8cSmrg    AC_MSG_CHECKING([for fop minimum version])
10462629baa8cSmrg    fop_version=`$FOP -version 2>/dev/null | cut -d' ' -f3`
10463629baa8cSmrg    AC_MSG_RESULT([$fop_version])
10464629baa8cSmrg    AS_VERSION_COMPARE([$fop_version], [$1],
10465629baa8cSmrg        [if test "x$use_fop" = xauto; then
10466629baa8cSmrg            AC_MSG_WARN([fop version $fop_version found, but $1 needed])
10467629baa8cSmrg            have_fop=no
10468629baa8cSmrg        else
10469629baa8cSmrg            AC_MSG_ERROR([fop version $fop_version found, but $1 needed])
10470629baa8cSmrg        fi])
10471629baa8cSmrgfi])
10472629baa8cSmrgAM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes])
10473629baa8cSmrg]) # XORG_WITH_FOP
10474145b7b3cSmrg
10475629baa8cSmrg# XORG_WITH_PS2PDF([DEFAULT])
10476629baa8cSmrg# ----------------
10477629baa8cSmrg# Minimum version: 1.6.0
10478629baa8cSmrg# Minimum version for optional DEFAULT argument: 1.11.0
10479629baa8cSmrg#
10480629baa8cSmrg# Documentation tools are not always available on all platforms and sometimes
10481629baa8cSmrg# not at the appropriate level. This macro enables a module to test for the
10482629baa8cSmrg# presence of the tool and obtain it's path in separate variables. Coupled with
10483629baa8cSmrg# the --with-ps2pdf option, it allows maximum flexibilty in making decisions
10484629baa8cSmrg# as whether or not to use the ps2pdf package. When DEFAULT is not specified,
10485629baa8cSmrg# --with-ps2pdf assumes 'auto'.
10486629baa8cSmrg#
10487629baa8cSmrg# Interface to module:
10488629baa8cSmrg# HAVE_PS2PDF: 	used in makefiles to conditionally generate documentation
10489629baa8cSmrg# PS2PDF:	returns the path of the ps2pdf program found
10490629baa8cSmrg#		returns the path set by the user in the environment
10491629baa8cSmrg# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf
10492629baa8cSmrg#		 'no' user instructs the module not to use ps2pdf
10493629baa8cSmrg#
10494629baa8cSmrg# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path.
10495629baa8cSmrg#
10496629baa8cSmrgAC_DEFUN([XORG_WITH_PS2PDF],[
10497629baa8cSmrgAC_ARG_VAR([PS2PDF], [Path to ps2pdf command])
10498629baa8cSmrgm4_define([_defopt], m4_default([$1], [auto]))
10499629baa8cSmrgAC_ARG_WITH(ps2pdf,
10500629baa8cSmrg	AS_HELP_STRING([--with-ps2pdf],
10501629baa8cSmrg	   [Use ps2pdf to regenerate documentation (default: ]_defopt[)]),
10502629baa8cSmrg	   [use_ps2pdf=$withval], [use_ps2pdf=]_defopt)
10503629baa8cSmrgm4_undefine([_defopt])
10504629baa8cSmrg
10505629baa8cSmrgif test "x$use_ps2pdf" = x"auto"; then
10506629baa8cSmrg   AC_PATH_PROG([PS2PDF], [ps2pdf])
10507629baa8cSmrg   if test "x$PS2PDF" = "x"; then
10508629baa8cSmrg        AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped])
10509629baa8cSmrg	have_ps2pdf=no
10510629baa8cSmrg   else
10511629baa8cSmrg        have_ps2pdf=yes
10512629baa8cSmrg   fi
10513629baa8cSmrgelif test "x$use_ps2pdf" = x"yes" ; then
10514629baa8cSmrg   AC_PATH_PROG([PS2PDF], [ps2pdf])
10515629baa8cSmrg   if test "x$PS2PDF" = "x"; then
10516629baa8cSmrg        AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH])
10517629baa8cSmrg   fi
10518629baa8cSmrg   have_ps2pdf=yes
10519629baa8cSmrgelif test "x$use_ps2pdf" = x"no" ; then
10520629baa8cSmrg   if test "x$PS2PDF" != "x"; then
10521629baa8cSmrg      AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified])
10522629baa8cSmrg   fi
10523629baa8cSmrg   have_ps2pdf=no
10524629baa8cSmrgelse
10525629baa8cSmrg   AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no'])
10526629baa8cSmrgfi
10527629baa8cSmrgAM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes])
10528629baa8cSmrg]) # XORG_WITH_PS2PDF
10529145b7b3cSmrg
10530629baa8cSmrg# XORG_ENABLE_DOCS (enable_docs=yes)
10531629baa8cSmrg# ----------------
10532629baa8cSmrg# Minimum version: 1.6.0
105335ffd6003Smrg#
10534629baa8cSmrg# Documentation tools are not always available on all platforms and sometimes
10535629baa8cSmrg# not at the appropriate level. This macro enables a builder to skip all
10536629baa8cSmrg# documentation targets except traditional man pages.
10537629baa8cSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides
10538629baa8cSmrg# maximum flexibilty in controlling documentation building.
10539629baa8cSmrg# Refer to:
10540629baa8cSmrg# XORG_WITH_XMLTO         --with-xmlto
10541629baa8cSmrg# XORG_WITH_ASCIIDOC      --with-asciidoc
10542629baa8cSmrg# XORG_WITH_DOXYGEN       --with-doxygen
10543629baa8cSmrg# XORG_WITH_FOP           --with-fop
10544629baa8cSmrg# XORG_WITH_GROFF         --with-groff
10545629baa8cSmrg# XORG_WITH_PS2PDF        --with-ps2pdf
10546629baa8cSmrg#
10547629baa8cSmrg# Interface to module:
10548629baa8cSmrg# ENABLE_DOCS: 	  used in makefiles to conditionally generate documentation
10549629baa8cSmrg# --enable-docs: 'yes' user instructs the module to generate docs
10550629baa8cSmrg#		 'no' user instructs the module not to generate docs
10551629baa8cSmrg# parm1:	specify the default value, yes or no.
10552629baa8cSmrg#
10553629baa8cSmrgAC_DEFUN([XORG_ENABLE_DOCS],[
10554629baa8cSmrgm4_define([docs_default], m4_default([$1], [yes]))
10555629baa8cSmrgAC_ARG_ENABLE(docs,
10556629baa8cSmrg	AS_HELP_STRING([--enable-docs],
10557629baa8cSmrg	   [Enable building the documentation (default: ]docs_default[)]),
10558629baa8cSmrg	   [build_docs=$enableval], [build_docs=]docs_default)
10559629baa8cSmrgm4_undefine([docs_default])
10560629baa8cSmrgAM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes])
10561629baa8cSmrgAC_MSG_CHECKING([whether to build documentation])
10562629baa8cSmrgAC_MSG_RESULT([$build_docs])
10563629baa8cSmrg]) # XORG_ENABLE_DOCS
10564629baa8cSmrg
10565629baa8cSmrg# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes)
10566629baa8cSmrg# ----------------
10567629baa8cSmrg# Minimum version: 1.6.0
10568629baa8cSmrg#
10569629baa8cSmrg# This macro enables a builder to skip all developer documentation.
10570629baa8cSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides
10571629baa8cSmrg# maximum flexibilty in controlling documentation building.
10572629baa8cSmrg# Refer to:
10573629baa8cSmrg# XORG_WITH_XMLTO         --with-xmlto
10574629baa8cSmrg# XORG_WITH_ASCIIDOC      --with-asciidoc
10575629baa8cSmrg# XORG_WITH_DOXYGEN       --with-doxygen
10576629baa8cSmrg# XORG_WITH_FOP           --with-fop
10577629baa8cSmrg# XORG_WITH_GROFF         --with-groff
10578629baa8cSmrg# XORG_WITH_PS2PDF        --with-ps2pdf
10579629baa8cSmrg#
10580629baa8cSmrg# Interface to module:
10581629baa8cSmrg# ENABLE_DEVEL_DOCS:	used in makefiles to conditionally generate developer docs
10582629baa8cSmrg# --enable-devel-docs:	'yes' user instructs the module to generate developer docs
10583629baa8cSmrg#			'no' user instructs the module not to generate developer docs
10584629baa8cSmrg# parm1:		specify the default value, yes or no.
10585629baa8cSmrg#
10586629baa8cSmrgAC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[
10587629baa8cSmrgm4_define([devel_default], m4_default([$1], [yes]))
10588629baa8cSmrgAC_ARG_ENABLE(devel-docs,
10589629baa8cSmrg	AS_HELP_STRING([--enable-devel-docs],
10590629baa8cSmrg	   [Enable building the developer documentation (default: ]devel_default[)]),
10591629baa8cSmrg	   [build_devel_docs=$enableval], [build_devel_docs=]devel_default)
10592629baa8cSmrgm4_undefine([devel_default])
10593629baa8cSmrgAM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes])
10594629baa8cSmrgAC_MSG_CHECKING([whether to build developer documentation])
10595629baa8cSmrgAC_MSG_RESULT([$build_devel_docs])
10596629baa8cSmrg]) # XORG_ENABLE_DEVEL_DOCS
10597629baa8cSmrg
10598629baa8cSmrg# XORG_ENABLE_SPECS (enable_specs=yes)
10599629baa8cSmrg# ----------------
10600629baa8cSmrg# Minimum version: 1.6.0
10601629baa8cSmrg#
10602629baa8cSmrg# This macro enables a builder to skip all functional specification targets.
10603629baa8cSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides
10604629baa8cSmrg# maximum flexibilty in controlling documentation building.
10605629baa8cSmrg# Refer to:
10606629baa8cSmrg# XORG_WITH_XMLTO         --with-xmlto
10607629baa8cSmrg# XORG_WITH_ASCIIDOC      --with-asciidoc
10608629baa8cSmrg# XORG_WITH_DOXYGEN       --with-doxygen
10609629baa8cSmrg# XORG_WITH_FOP           --with-fop
10610629baa8cSmrg# XORG_WITH_GROFF         --with-groff
10611629baa8cSmrg# XORG_WITH_PS2PDF        --with-ps2pdf
10612629baa8cSmrg#
10613629baa8cSmrg# Interface to module:
10614629baa8cSmrg# ENABLE_SPECS:		used in makefiles to conditionally generate specs
10615629baa8cSmrg# --enable-specs:	'yes' user instructs the module to generate specs
10616629baa8cSmrg#			'no' user instructs the module not to generate specs
10617629baa8cSmrg# parm1:		specify the default value, yes or no.
10618629baa8cSmrg#
10619629baa8cSmrgAC_DEFUN([XORG_ENABLE_SPECS],[
10620629baa8cSmrgm4_define([spec_default], m4_default([$1], [yes]))
10621629baa8cSmrgAC_ARG_ENABLE(specs,
10622629baa8cSmrg	AS_HELP_STRING([--enable-specs],
10623629baa8cSmrg	   [Enable building the specs (default: ]spec_default[)]),
10624629baa8cSmrg	   [build_specs=$enableval], [build_specs=]spec_default)
10625629baa8cSmrgm4_undefine([spec_default])
10626629baa8cSmrgAM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes])
10627629baa8cSmrgAC_MSG_CHECKING([whether to build functional specifications])
10628629baa8cSmrgAC_MSG_RESULT([$build_specs])
10629629baa8cSmrg]) # XORG_ENABLE_SPECS
10630629baa8cSmrg
10631629baa8cSmrg# XORG_ENABLE_UNIT_TESTS (enable_unit_tests=auto)
10632629baa8cSmrg# ----------------------------------------------
10633629baa8cSmrg# Minimum version: 1.13.0
10634629baa8cSmrg#
10635629baa8cSmrg# This macro enables a builder to enable/disable unit testing
10636629baa8cSmrg# It makes no assumption about the test cases implementation
10637629baa8cSmrg# Test cases may or may not use Automake "Support for test suites"
10638629baa8cSmrg# They may or may not use the software utility library GLib
10639629baa8cSmrg#
10640629baa8cSmrg# When used in conjunction with XORG_WITH_GLIB, use both AM_CONDITIONAL
10641629baa8cSmrg# ENABLE_UNIT_TESTS and HAVE_GLIB. Not all unit tests may use glib.
10642629baa8cSmrg# The variable enable_unit_tests is used by other macros in this file.
10643629baa8cSmrg#
10644629baa8cSmrg# Interface to module:
10645629baa8cSmrg# ENABLE_UNIT_TESTS:	used in makefiles to conditionally build tests
10646629baa8cSmrg# enable_unit_tests:    used in configure.ac for additional configuration
10647629baa8cSmrg# --enable-unit-tests:	'yes' user instructs the module to build tests
10648629baa8cSmrg#			'no' user instructs the module not to build tests
10649629baa8cSmrg# parm1:		specify the default value, yes or no.
10650629baa8cSmrg#
10651629baa8cSmrgAC_DEFUN([XORG_ENABLE_UNIT_TESTS],[
10652629baa8cSmrgAC_BEFORE([$0], [XORG_WITH_GLIB])
10653629baa8cSmrgAC_BEFORE([$0], [XORG_LD_WRAP])
10654629baa8cSmrgm4_define([_defopt], m4_default([$1], [auto]))
10655629baa8cSmrgAC_ARG_ENABLE(unit-tests, AS_HELP_STRING([--enable-unit-tests],
10656629baa8cSmrg	[Enable building unit test cases (default: ]_defopt[)]),
10657629baa8cSmrg	[enable_unit_tests=$enableval], [enable_unit_tests=]_defopt)
10658629baa8cSmrgm4_undefine([_defopt])
10659629baa8cSmrgAM_CONDITIONAL(ENABLE_UNIT_TESTS, [test "x$enable_unit_tests" != xno])
10660629baa8cSmrgAC_MSG_CHECKING([whether to build unit test cases])
10661629baa8cSmrgAC_MSG_RESULT([$enable_unit_tests])
10662629baa8cSmrg]) # XORG_ENABLE_UNIT_TESTS
10663629baa8cSmrg
10664629baa8cSmrg# XORG_WITH_GLIB([MIN-VERSION], [DEFAULT])
10665629baa8cSmrg# ----------------------------------------
10666629baa8cSmrg# Minimum version: 1.13.0
10667629baa8cSmrg#
10668629baa8cSmrg# GLib is a library which provides advanced data structures and functions.
10669629baa8cSmrg# This macro enables a module to test for the presence of Glib.
10670629baa8cSmrg#
10671629baa8cSmrg# When used with ENABLE_UNIT_TESTS, it is assumed GLib is used for unit testing.
10672629baa8cSmrg# Otherwise the value of $enable_unit_tests is blank.
10673629baa8cSmrg#
10674629baa8cSmrg# Interface to module:
10675629baa8cSmrg# HAVE_GLIB: used in makefiles to conditionally build targets
10676629baa8cSmrg# with_glib: used in configure.ac to know if GLib has been found
10677629baa8cSmrg# --with-glib:	'yes' user instructs the module to use glib
10678629baa8cSmrg#		'no' user instructs the module not to use glib
10679629baa8cSmrg#
10680629baa8cSmrgAC_DEFUN([XORG_WITH_GLIB],[
10681629baa8cSmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG])
10682629baa8cSmrgm4_define([_defopt], m4_default([$2], [auto]))
10683629baa8cSmrgAC_ARG_WITH(glib, AS_HELP_STRING([--with-glib],
10684629baa8cSmrg	[Use GLib library for unit testing (default: ]_defopt[)]),
10685629baa8cSmrg	[with_glib=$withval], [with_glib=]_defopt)
10686629baa8cSmrgm4_undefine([_defopt])
10687629baa8cSmrg
10688629baa8cSmrghave_glib=no
10689629baa8cSmrg# Do not probe GLib if user explicitly disabled unit testing
10690629baa8cSmrgif test "x$enable_unit_tests" != x"no"; then
10691629baa8cSmrg  # Do not probe GLib if user explicitly disabled it
10692629baa8cSmrg  if test "x$with_glib" != x"no"; then
10693629baa8cSmrg    m4_ifval(
10694629baa8cSmrg      [$1],
10695629baa8cSmrg      [PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $1], [have_glib=yes], [have_glib=no])],
10696629baa8cSmrg      [PKG_CHECK_MODULES([GLIB], [glib-2.0], [have_glib=yes], [have_glib=no])]
10697629baa8cSmrg    )
10698629baa8cSmrg  fi
10699629baa8cSmrgfi
10700145b7b3cSmrg
10701629baa8cSmrg# Not having GLib when unit testing has been explicitly requested is an error
10702629baa8cSmrgif test "x$enable_unit_tests" = x"yes"; then
10703629baa8cSmrg  if test "x$have_glib" = x"no"; then
10704629baa8cSmrg    AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found])
10705629baa8cSmrg  fi
10706629baa8cSmrgfi
10707145b7b3cSmrg
10708629baa8cSmrg# Having unit testing disabled when GLib has been explicitly requested is an error
10709629baa8cSmrgif test "x$enable_unit_tests" = x"no"; then
10710629baa8cSmrg  if test "x$with_glib" = x"yes"; then
10711629baa8cSmrg    AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found])
10712629baa8cSmrg  fi
10713629baa8cSmrgfi
10714145b7b3cSmrg
10715629baa8cSmrg# Not having GLib when it has been explicitly requested is an error
10716629baa8cSmrgif test "x$with_glib" = x"yes"; then
10717629baa8cSmrg  if test "x$have_glib" = x"no"; then
10718629baa8cSmrg    AC_MSG_ERROR([--with-glib=yes specified but glib-2.0 not found])
10719629baa8cSmrg  fi
10720629baa8cSmrgfi
10721145b7b3cSmrg
10722629baa8cSmrgAM_CONDITIONAL([HAVE_GLIB], [test "$have_glib" = yes])
10723629baa8cSmrg]) # XORG_WITH_GLIB
10724629baa8cSmrg
10725629baa8cSmrg# XORG_LD_WRAP
10726629baa8cSmrg# ------------
10727629baa8cSmrg# Minimum version: 1.13.0
10728629baa8cSmrg#
10729629baa8cSmrg# Check if linker supports -wrap, passed via compiler flags
10730629baa8cSmrg#
10731629baa8cSmrg# When used with ENABLE_UNIT_TESTS, it is assumed -wrap is used for unit testing.
10732629baa8cSmrg# Otherwise the value of $enable_unit_tests is blank.
10733629baa8cSmrg#
10734629baa8cSmrgAC_DEFUN([XORG_LD_WRAP],[
10735629baa8cSmrgXORG_CHECK_LINKER_FLAGS([-Wl,-wrap,exit],[have_ld_wrap=yes],[have_ld_wrap=no])
10736629baa8cSmrg# Not having ld wrap when unit testing has been explicitly requested is an error
10737629baa8cSmrgif test "x$enable_unit_tests" = x"yes"; then
10738629baa8cSmrg  if test "x$have_ld_wrap" = x"no"; then
10739629baa8cSmrg    AC_MSG_ERROR([--enable-unit-tests=yes specified but ld -wrap support is not available])
10740629baa8cSmrg  fi
107415ffd6003Smrgfi
10742629baa8cSmrgAM_CONDITIONAL([HAVE_LD_WRAP], [test "$have_ld_wrap" = yes])
10743629baa8cSmrg#
10744629baa8cSmrg]) # XORG_LD_WRAP
10745629baa8cSmrg
10746629baa8cSmrg# XORG_CHECK_LINKER_FLAGS
10747629baa8cSmrg# -----------------------
10748629baa8cSmrg# SYNOPSIS
10749629baa8cSmrg#
10750629baa8cSmrg#   XORG_CHECK_LINKER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE])
10751629baa8cSmrg#
10752629baa8cSmrg# DESCRIPTION
10753629baa8cSmrg#
10754629baa8cSmrg#   Check whether the given linker FLAGS work with the current language's
10755629baa8cSmrg#   linker, or whether they give an error.
10756629baa8cSmrg#
10757629baa8cSmrg#   ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on
10758629baa8cSmrg#   success/failure.
10759629baa8cSmrg#
10760629baa8cSmrg#   NOTE: Based on AX_CHECK_COMPILER_FLAGS.
10761629baa8cSmrg#
10762629baa8cSmrg# LICENSE
10763629baa8cSmrg#
10764629baa8cSmrg#   Copyright (c) 2009 Mike Frysinger <vapier@gentoo.org>
10765629baa8cSmrg#   Copyright (c) 2009 Steven G. Johnson <stevenj@alum.mit.edu>
10766629baa8cSmrg#   Copyright (c) 2009 Matteo Frigo
10767629baa8cSmrg#
10768629baa8cSmrg#   This program is free software: you can redistribute it and/or modify it
10769629baa8cSmrg#   under the terms of the GNU General Public License as published by the
10770629baa8cSmrg#   Free Software Foundation, either version 3 of the License, or (at your
10771629baa8cSmrg#   option) any later version.
10772629baa8cSmrg#
10773629baa8cSmrg#   This program is distributed in the hope that it will be useful, but
10774629baa8cSmrg#   WITHOUT ANY WARRANTY; without even the implied warranty of
10775629baa8cSmrg#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
10776629baa8cSmrg#   Public License for more details.
10777629baa8cSmrg#
10778629baa8cSmrg#   You should have received a copy of the GNU General Public License along
10779629baa8cSmrg#   with this program. If not, see <http://www.gnu.org/licenses/>.
10780629baa8cSmrg#
10781629baa8cSmrg#   As a special exception, the respective Autoconf Macro's copyright owner
10782629baa8cSmrg#   gives unlimited permission to copy, distribute and modify the configure
10783629baa8cSmrg#   scripts that are the output of Autoconf when processing the Macro. You
10784629baa8cSmrg#   need not follow the terms of the GNU General Public License when using
10785629baa8cSmrg#   or distributing such scripts, even though portions of the text of the
10786629baa8cSmrg#   Macro appear in them. The GNU General Public License (GPL) does govern
10787629baa8cSmrg#   all other use of the material that constitutes the Autoconf Macro.
10788629baa8cSmrg#
10789629baa8cSmrg#   This special exception to the GPL applies to versions of the Autoconf
10790629baa8cSmrg#   Macro released by the Autoconf Archive. When you make and distribute a
10791629baa8cSmrg#   modified version of the Autoconf Macro, you may extend this special
10792629baa8cSmrg#   exception to the GPL to apply to your modified version as well.#
10793629baa8cSmrgAC_DEFUN([XORG_CHECK_LINKER_FLAGS],
10794629baa8cSmrg[AC_MSG_CHECKING([whether the linker accepts $1])
10795629baa8cSmrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname:
10796629baa8cSmrgAS_LITERAL_IF([$1],
10797629baa8cSmrg  [AC_CACHE_VAL(AS_TR_SH(xorg_cv_linker_flags_[$1]), [
10798629baa8cSmrg      ax_save_FLAGS=$LDFLAGS
10799629baa8cSmrg      LDFLAGS="$1"
10800629baa8cSmrg      AC_LINK_IFELSE([AC_LANG_PROGRAM()],
10801629baa8cSmrg        AS_TR_SH(xorg_cv_linker_flags_[$1])=yes,
10802629baa8cSmrg        AS_TR_SH(xorg_cv_linker_flags_[$1])=no)
10803629baa8cSmrg      LDFLAGS=$ax_save_FLAGS])],
10804629baa8cSmrg  [ax_save_FLAGS=$LDFLAGS
10805629baa8cSmrg   LDFLAGS="$1"
10806629baa8cSmrg   AC_LINK_IFELSE([AC_LANG_PROGRAM()],
10807629baa8cSmrg     eval AS_TR_SH(xorg_cv_linker_flags_[$1])=yes,
10808629baa8cSmrg     eval AS_TR_SH(xorg_cv_linker_flags_[$1])=no)
10809629baa8cSmrg   LDFLAGS=$ax_save_FLAGS])
10810629baa8cSmrgeval xorg_check_linker_flags=$AS_TR_SH(xorg_cv_linker_flags_[$1])
10811629baa8cSmrgAC_MSG_RESULT($xorg_check_linker_flags)
10812629baa8cSmrgif test "x$xorg_check_linker_flags" = xyes; then
10813629baa8cSmrg	m4_default([$2], :)
108145ffd6003Smrgelse
10815629baa8cSmrg	m4_default([$3], :)
108165ffd6003Smrgfi
10817629baa8cSmrg]) # XORG_CHECK_LINKER_FLAGS
10818145b7b3cSmrg
10819629baa8cSmrg# XORG_CHECK_MALLOC_ZERO
10820629baa8cSmrg# ----------------------
10821629baa8cSmrg# Minimum version: 1.0.0
10822145b7b3cSmrg#
10823629baa8cSmrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if
10824629baa8cSmrg# malloc(0) returns NULL.  Packages should add one of these cflags to
10825629baa8cSmrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them.
10826629baa8cSmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[
10827629baa8cSmrgAC_ARG_ENABLE(malloc0returnsnull,
10828629baa8cSmrg	AS_HELP_STRING([--enable-malloc0returnsnull],
10829629baa8cSmrg		       [malloc(0) returns NULL (default: auto)]),
10830629baa8cSmrg	[MALLOC_ZERO_RETURNS_NULL=$enableval],
10831629baa8cSmrg	[MALLOC_ZERO_RETURNS_NULL=auto])
108325ffd6003Smrg
10833629baa8cSmrgAC_MSG_CHECKING([whether malloc(0) returns NULL])
10834629baa8cSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then
10835629baa8cSmrg	AC_RUN_IFELSE([AC_LANG_PROGRAM([
10836629baa8cSmrg#include <stdlib.h>
10837629baa8cSmrg],[
10838629baa8cSmrg    char *m0, *r0, *c0, *p;
10839629baa8cSmrg    m0 = malloc(0);
10840629baa8cSmrg    p = malloc(10);
10841629baa8cSmrg    r0 = realloc(p,0);
10842629baa8cSmrg    c0 = calloc(0,10);
10843629baa8cSmrg    exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1);
10844629baa8cSmrg])],
10845629baa8cSmrg		[MALLOC_ZERO_RETURNS_NULL=yes],
10846629baa8cSmrg		[MALLOC_ZERO_RETURNS_NULL=no],
10847629baa8cSmrg		[MALLOC_ZERO_RETURNS_NULL=yes])
10848629baa8cSmrgfi
10849629baa8cSmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL])
10850145b7b3cSmrg
10851629baa8cSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then
10852629baa8cSmrg	MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL"
10853629baa8cSmrg	XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS
10854629baa8cSmrg	XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC"
10855629baa8cSmrgelse
10856629baa8cSmrg	MALLOC_ZERO_CFLAGS=""
10857629baa8cSmrg	XMALLOC_ZERO_CFLAGS=""
10858629baa8cSmrg	XTMALLOC_ZERO_CFLAGS=""
10859629baa8cSmrgfi
10860145b7b3cSmrg
10861629baa8cSmrgAC_SUBST([MALLOC_ZERO_CFLAGS])
10862629baa8cSmrgAC_SUBST([XMALLOC_ZERO_CFLAGS])
10863629baa8cSmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS])
10864629baa8cSmrg]) # XORG_CHECK_MALLOC_ZERO
10865629baa8cSmrg
10866629baa8cSmrg# XORG_WITH_LINT()
10867629baa8cSmrg# ----------------
10868629baa8cSmrg# Minimum version: 1.1.0
10869145b7b3cSmrg#
10870629baa8cSmrg# This macro enables the use of a tool that flags some suspicious and
10871629baa8cSmrg# non-portable constructs (likely to be bugs) in C language source code.
10872629baa8cSmrg# It will attempt to locate the tool and use appropriate options.
10873629baa8cSmrg# There are various lint type tools on different platforms.
10874629baa8cSmrg#
10875629baa8cSmrg# Interface to module:
10876629baa8cSmrg# LINT:		returns the path to the tool found on the platform
10877629baa8cSmrg#		or the value set to LINT on the configure cmd line
10878629baa8cSmrg#		also an Automake conditional
10879629baa8cSmrg# LINT_FLAGS:	an Automake variable with appropriate flags
10880629baa8cSmrg#
10881629baa8cSmrg# --with-lint:	'yes' user instructs the module to use lint
10882629baa8cSmrg#		'no' user instructs the module not to use lint (default)
10883629baa8cSmrg#
10884629baa8cSmrg# If the user sets the value of LINT, AC_PATH_PROG skips testing the path.
10885629baa8cSmrg# If the user sets the value of LINT_FLAGS, they are used verbatim.
10886629baa8cSmrg#
10887629baa8cSmrgAC_DEFUN([XORG_WITH_LINT],[
10888145b7b3cSmrg
10889629baa8cSmrgAC_ARG_VAR([LINT], [Path to a lint-style command])
10890629baa8cSmrgAC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command])
10891629baa8cSmrgAC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint],
10892629baa8cSmrg		[Use a lint-style source code checker (default: disabled)])],
10893629baa8cSmrg		[use_lint=$withval], [use_lint=no])
10894145b7b3cSmrg
10895629baa8cSmrg# Obtain platform specific info like program name and options
10896629baa8cSmrg# The lint program on FreeBSD and NetBSD is different from the one on Solaris
10897629baa8cSmrgcase $host_os in
10898629baa8cSmrg  *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*)
10899629baa8cSmrg	lint_name=splint
10900629baa8cSmrg	lint_options="-badflag"
10901629baa8cSmrg	;;
10902629baa8cSmrg  *freebsd* | *netbsd*)
10903629baa8cSmrg	lint_name=lint
10904629baa8cSmrg	lint_options="-u -b"
10905629baa8cSmrg	;;
10906629baa8cSmrg  *solaris*)
10907629baa8cSmrg	lint_name=lint
10908629baa8cSmrg	lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2"
10909629baa8cSmrg	;;
10910629baa8cSmrgesac
10911578741aaSmrg
10912629baa8cSmrg# Test for the presence of the program (either guessed by the code or spelled out by the user)
10913629baa8cSmrgif test "x$use_lint" = x"yes" ; then
10914629baa8cSmrg   AC_PATH_PROG([LINT], [$lint_name])
10915629baa8cSmrg   if test "x$LINT" = "x"; then
10916629baa8cSmrg        AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH])
10917629baa8cSmrg   fi
10918629baa8cSmrgelif test "x$use_lint" = x"no" ; then
10919629baa8cSmrg   if test "x$LINT" != "x"; then
10920629baa8cSmrg      AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified])
10921629baa8cSmrg   fi
10922629baa8cSmrgelse
10923629baa8cSmrg   AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.])
10924629baa8cSmrgfi
10925578741aaSmrg
10926629baa8cSmrg# User supplied flags override default flags
10927629baa8cSmrgif test "x$LINT_FLAGS" != "x"; then
10928629baa8cSmrg   lint_options=$LINT_FLAGS
10929629baa8cSmrgfi
10930578741aaSmrg
10931629baa8cSmrgAC_SUBST([LINT_FLAGS],[$lint_options])
10932629baa8cSmrgAM_CONDITIONAL(LINT, [test "x$LINT" != x])
10933145b7b3cSmrg
10934629baa8cSmrg]) # XORG_WITH_LINT
109355ffd6003Smrg
10936629baa8cSmrg# XORG_LINT_LIBRARY(LIBNAME)
10937629baa8cSmrg# --------------------------
10938629baa8cSmrg# Minimum version: 1.1.0
10939145b7b3cSmrg#
10940629baa8cSmrg# Sets up flags for building lint libraries for checking programs that call
10941629baa8cSmrg# functions in the library.
10942629baa8cSmrg#
10943629baa8cSmrg# Interface to module:
10944629baa8cSmrg# LINTLIB		- Automake variable with the name of lint library file to make
10945629baa8cSmrg# MAKE_LINT_LIB		- Automake conditional
10946629baa8cSmrg#
10947629baa8cSmrg# --enable-lint-library:  - 'yes' user instructs the module to created a lint library
10948629baa8cSmrg#			  - 'no' user instructs the module not to create a lint library (default)
109495ffd6003Smrg
10950629baa8cSmrgAC_DEFUN([XORG_LINT_LIBRARY],[
10951629baa8cSmrgAC_REQUIRE([XORG_WITH_LINT])
10952629baa8cSmrgAC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library],
10953629baa8cSmrg	[Create lint library (default: disabled)])],
10954629baa8cSmrg	[make_lint_lib=$enableval], [make_lint_lib=no])
109555ffd6003Smrg
10956629baa8cSmrgif test "x$make_lint_lib" = x"yes" ; then
10957629baa8cSmrg   LINTLIB=llib-l$1.ln
10958629baa8cSmrg   if test "x$LINT" = "x"; then
10959629baa8cSmrg        AC_MSG_ERROR([Cannot make lint library without --with-lint])
109605ffd6003Smrg   fi
10961629baa8cSmrgelif test "x$make_lint_lib" != x"no" ; then
10962629baa8cSmrg   AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.])
10963629baa8cSmrgfi
109645ffd6003Smrg
10965629baa8cSmrgAC_SUBST(LINTLIB)
10966629baa8cSmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno])
109675ffd6003Smrg
10968629baa8cSmrg]) # XORG_LINT_LIBRARY
10969629baa8cSmrg
10970629baa8cSmrg# XORG_COMPILER_BRAND
10971629baa8cSmrg# -------------------
10972629baa8cSmrg# Minimum version: 1.14.0
10973629baa8cSmrg#
10974629baa8cSmrg# Checks for various brands of compilers and sets flags as appropriate:
10975629baa8cSmrg#   GNU gcc - relies on AC_PROG_CC (via AC_PROG_CC_C99) to set GCC to "yes"
10976629baa8cSmrg#   clang compiler - sets CLANGCC to "yes"
10977629baa8cSmrg#   Intel compiler - sets INTELCC to "yes"
10978629baa8cSmrg#   Sun/Oracle Solaris Studio cc - sets SUNCC to "yes"
10979629baa8cSmrg#
10980629baa8cSmrgAC_DEFUN([XORG_COMPILER_BRAND], [
10981629baa8cSmrgAC_REQUIRE([AC_PROG_CC_C99])
10982629baa8cSmrgAC_CHECK_DECL([__clang__], [CLANGCC="yes"], [CLANGCC="no"])
10983629baa8cSmrgAC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"])
10984629baa8cSmrgAC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
10985629baa8cSmrg]) # XORG_COMPILER_BRAND
10986629baa8cSmrg
10987629baa8cSmrg# XORG_CWARNFLAGS
10988629baa8cSmrg# ---------------
10989629baa8cSmrg# Minimum version: 1.2.0
10990629baa8cSmrg#
10991629baa8cSmrg# Defines CWARNFLAGS to enable C compiler warnings.
10992629baa8cSmrg#
10993629baa8cSmrgAC_DEFUN([XORG_CWARNFLAGS], [
10994629baa8cSmrgAC_REQUIRE([AC_PROG_CC_C99])
10995629baa8cSmrgAC_REQUIRE([XORG_COMPILER_BRAND])
10996629baa8cSmrgif  test "x$GCC" = xyes ; then
10997629baa8cSmrg    CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \
10998629baa8cSmrg-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \
10999629baa8cSmrg-Wbad-function-cast -Wformat=2"
11000629baa8cSmrg    case `$CC -dumpversion` in
11001629baa8cSmrg    3.4.* | 4.*)
11002629baa8cSmrg	CWARNFLAGS="$CWARNFLAGS -Wold-style-definition -Wdeclaration-after-statement"
11003629baa8cSmrg	;;
11004629baa8cSmrg    esac
110055ffd6003Smrgelse
11006629baa8cSmrg    if test "x$SUNCC" = "xyes"; then
11007629baa8cSmrg	CWARNFLAGS="-v"
11008629baa8cSmrg    fi
11009145b7b3cSmrgfi
11010629baa8cSmrgAC_SUBST(CWARNFLAGS)
11011629baa8cSmrg]) # XORG_CWARNFLAGS
11012145b7b3cSmrg
11013629baa8cSmrg# XORG_STRICT_OPTION
11014629baa8cSmrg# -----------------------
11015629baa8cSmrg# Minimum version: 1.3.0
11016145b7b3cSmrg#
11017629baa8cSmrg# Add configure option to enable strict compilation flags, such as treating
11018629baa8cSmrg# warnings as fatal errors.
11019629baa8cSmrg# If --enable-strict-compilation is passed to configure, adds strict flags to
11020629baa8cSmrg# $CWARNFLAGS.
11021629baa8cSmrg#
11022629baa8cSmrg# Starting in 1.14.0 also exports $STRICT_CFLAGS for use in other tests or
11023629baa8cSmrg# when strict compilation is unconditionally desired.
11024629baa8cSmrgAC_DEFUN([XORG_STRICT_OPTION], [
11025629baa8cSmrg# If the module's configure.ac calls AC_PROG_CC later on, CC gets set to C89
11026629baa8cSmrgAC_REQUIRE([AC_PROG_CC_C99])
11027629baa8cSmrgAC_REQUIRE([XORG_COMPILER_BRAND])
11028629baa8cSmrgAC_REQUIRE([XORG_CWARNFLAGS])
11029145b7b3cSmrg
11030629baa8cSmrgAC_ARG_ENABLE(strict-compilation,
11031629baa8cSmrg			  AS_HELP_STRING([--enable-strict-compilation],
11032629baa8cSmrg			  [Enable all warnings from compiler and make them errors (default: disabled)]),
11033629baa8cSmrg			  [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no])
11034629baa8cSmrgif test "x$GCC" = xyes ; then
11035629baa8cSmrg    STRICT_CFLAGS="-pedantic -Werror"
11036629baa8cSmrg    # Add -Werror=attributes if supported (gcc 4.2 & later)
11037629baa8cSmrg    AC_MSG_CHECKING([if $CC supports -Werror=attributes])
11038629baa8cSmrg    save_CFLAGS="$CFLAGS"
11039629baa8cSmrg    CFLAGS="$CFLAGS $STRICT_CFLAGS -Werror=attributes"
11040629baa8cSmrg    AC_COMPILE_IFELSE([AC_LANG_SOURCE([return 0;])],
11041629baa8cSmrg		      [STRICT_CFLAGS="$STRICT_CFLAGS -Werror=attributes"
11042629baa8cSmrg		       AC_MSG_RESULT([yes])],
11043629baa8cSmrg		      [AC_MSG_RESULT([no])])
11044629baa8cSmrg    CFLAGS="$save_CFLAGS"
11045629baa8cSmrgelif test "x$SUNCC" = "xyes"; then
11046629baa8cSmrg    STRICT_CFLAGS="-errwarn"
11047629baa8cSmrgelif test "x$INTELCC" = "xyes"; then
11048629baa8cSmrg    STRICT_CFLAGS="-Werror"
11049629baa8cSmrgfi
11050629baa8cSmrgif test "x$STRICT_COMPILE" = "xyes"; then
11051629baa8cSmrg    CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"
11052629baa8cSmrgfi
11053629baa8cSmrgAC_SUBST([STRICT_CFLAGS])
11054629baa8cSmrgAC_SUBST([CWARNFLAGS])
11055629baa8cSmrg]) # XORG_STRICT_OPTION
11056145b7b3cSmrg
11057629baa8cSmrg# XORG_DEFAULT_OPTIONS
11058629baa8cSmrg# --------------------
11059629baa8cSmrg# Minimum version: 1.3.0
11060629baa8cSmrg#
11061629baa8cSmrg# Defines default options for X.Org modules.
11062629baa8cSmrg#
11063629baa8cSmrgAC_DEFUN([XORG_DEFAULT_OPTIONS], [
11064629baa8cSmrgAC_REQUIRE([AC_PROG_INSTALL])
11065629baa8cSmrgXORG_CWARNFLAGS
11066629baa8cSmrgXORG_STRICT_OPTION
11067629baa8cSmrgXORG_RELEASE_VERSION
11068629baa8cSmrgXORG_CHANGELOG
11069629baa8cSmrgXORG_INSTALL
11070629baa8cSmrgXORG_MANPAGE_SECTIONS
11071629baa8cSmrgm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])],
11072629baa8cSmrg    [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])])
11073629baa8cSmrg]) # XORG_DEFAULT_OPTIONS
11074145b7b3cSmrg
11075629baa8cSmrg# XORG_INSTALL()
11076629baa8cSmrg# ----------------
11077629baa8cSmrg# Minimum version: 1.4.0
110785ffd6003Smrg#
11079629baa8cSmrg# Defines the variable INSTALL_CMD as the command to copy
11080629baa8cSmrg# INSTALL from $prefix/share/util-macros.
11081629baa8cSmrg#
11082629baa8cSmrgAC_DEFUN([XORG_INSTALL], [
11083629baa8cSmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG])
11084629baa8cSmrgmacros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros`
11085629baa8cSmrgINSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \
11086629baa8cSmrgmv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \
11087629baa8cSmrg|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \
11088629baa8cSmrgecho 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)"
11089629baa8cSmrgAC_SUBST([INSTALL_CMD])
11090629baa8cSmrg]) # XORG_INSTALL
11091629baa8cSmrgdnl Copyright 2005 Red Hat, Inc
11092629baa8cSmrgdnl
11093629baa8cSmrgdnl Permission to use, copy, modify, distribute, and sell this software and its
11094629baa8cSmrgdnl documentation for any purpose is hereby granted without fee, provided that
11095629baa8cSmrgdnl the above copyright notice appear in all copies and that both that
11096629baa8cSmrgdnl copyright notice and this permission notice appear in supporting
11097629baa8cSmrgdnl documentation.
11098629baa8cSmrgdnl
11099629baa8cSmrgdnl The above copyright notice and this permission notice shall be included
11100629baa8cSmrgdnl in all copies or substantial portions of the Software.
11101629baa8cSmrgdnl
11102629baa8cSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
11103629baa8cSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
11104629baa8cSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
11105629baa8cSmrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
11106629baa8cSmrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
11107629baa8cSmrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
11108629baa8cSmrgdnl OTHER DEALINGS IN THE SOFTWARE.
11109629baa8cSmrgdnl
11110629baa8cSmrgdnl Except as contained in this notice, the name of the copyright holders shall
11111629baa8cSmrgdnl not be used in advertising or otherwise to promote the sale, use or
11112629baa8cSmrgdnl other dealings in this Software without prior written authorization
11113629baa8cSmrgdnl from the copyright holders.
11114629baa8cSmrgdnl
11115578741aaSmrg
11116629baa8cSmrg# XORG_RELEASE_VERSION
11117629baa8cSmrg# --------------------
11118629baa8cSmrg# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use.
11119629baa8cSmrg 
11120629baa8cSmrgAC_DEFUN([XORG_RELEASE_VERSION],[
11121629baa8cSmrg	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR],
11122629baa8cSmrg		[`echo $PACKAGE_VERSION | cut -d . -f 1`],
11123629baa8cSmrg		[Major version of this package])
11124629baa8cSmrg	PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1`
11125629baa8cSmrg	if test "x$PVM" = "x"; then
11126629baa8cSmrg		PVM="0"
11127629baa8cSmrg	fi
11128629baa8cSmrg	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR],
11129629baa8cSmrg		[$PVM],
11130629baa8cSmrg		[Minor version of this package])
11131629baa8cSmrg	PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1`
11132629baa8cSmrg	if test "x$PVP" = "x"; then
11133629baa8cSmrg		PVP="0"
11134629baa8cSmrg	fi
11135629baa8cSmrg	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL],
11136629baa8cSmrg		[$PVP],
11137629baa8cSmrg		[Patch version of this package])
11138629baa8cSmrg])
11139578741aaSmrg
11140629baa8cSmrg# XORG_CHANGELOG()
11141629baa8cSmrg# ----------------
11142629baa8cSmrg# Minimum version: 1.2.0
11143145b7b3cSmrg#
11144629baa8cSmrg# Defines the variable CHANGELOG_CMD as the command to generate
11145629baa8cSmrg# ChangeLog from git.
11146629baa8cSmrg#
11147629baa8cSmrg#
11148629baa8cSmrgAC_DEFUN([XORG_CHANGELOG], [
11149629baa8cSmrgCHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \
11150629baa8cSmrgmv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \
11151629baa8cSmrg|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \
11152629baa8cSmrgecho 'git directory not found: installing possibly empty changelog.' >&2)"
11153629baa8cSmrgAC_SUBST([CHANGELOG_CMD])
11154629baa8cSmrg]) # XORG_CHANGELOG
11155145b7b3cSmrg
11156629baa8cSmrgdnl
11157629baa8cSmrgdnl Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
11158629baa8cSmrgdnl
11159629baa8cSmrgdnl Permission is hereby granted, free of charge, to any person obtaining a
11160629baa8cSmrgdnl copy of this software and associated documentation files (the "Software"),
11161629baa8cSmrgdnl to deal in the Software without restriction, including without limitation
11162629baa8cSmrgdnl the rights to use, copy, modify, merge, publish, distribute, sublicense,
11163629baa8cSmrgdnl and/or sell copies of the Software, and to permit persons to whom the
11164629baa8cSmrgdnl Software is furnished to do so, subject to the following conditions:
11165629baa8cSmrgdnl
11166629baa8cSmrgdnl The above copyright notice and this permission notice (including the next
11167629baa8cSmrgdnl paragraph) shall be included in all copies or substantial portions of the
11168629baa8cSmrgdnl Software.
11169629baa8cSmrgdnl
11170629baa8cSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
11171629baa8cSmrgdnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
11172629baa8cSmrgdnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
11173629baa8cSmrgdnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
11174629baa8cSmrgdnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
11175629baa8cSmrgdnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
11176629baa8cSmrgdnl DEALINGS IN THE SOFTWARE.
11177629baa8cSmrgdnl
11178145b7b3cSmrg
11179629baa8cSmrg# XTRANS_TCP_FLAGS()
11180629baa8cSmrg# ------------------
11181629baa8cSmrg# Find needed libraries for TCP sockets, and check for IPv6 support
11182629baa8cSmrgAC_DEFUN([XTRANS_TCP_FLAGS],[
11183629baa8cSmrg # SVR4 hides these in libraries other than libc
11184629baa8cSmrg AC_SEARCH_LIBS(socket, [socket])
11185629baa8cSmrg AC_SEARCH_LIBS(gethostbyname, [nsl])
11186629baa8cSmrg if test "$ac_cv_search_socket$ac_cv_search_gethostbyname" = "nono"; then
11187629baa8cSmrg   AC_HAVE_LIBRARY([ws2_32])
11188629baa8cSmrg fi
11189145b7b3cSmrg
11190629baa8cSmrg # Needs to come after above checks for libsocket & libnsl for SVR4 systems
11191629baa8cSmrg AC_ARG_ENABLE(ipv6, 
11192629baa8cSmrg	AC_HELP_STRING([--enable-ipv6],[Enable IPv6 support]),
11193629baa8cSmrg	[IPV6CONN=$enableval], 
11194629baa8cSmrg	[AC_CHECK_FUNC(getaddrinfo,[IPV6CONN=yes],[IPV6CONN=no])])
11195629baa8cSmrg AC_MSG_CHECKING([if IPv6 support should be built])
11196629baa8cSmrg if test "$IPV6CONN" = "yes"; then
11197629baa8cSmrg	AC_DEFINE(IPv6,1,[Support IPv6 for TCP connections])
11198629baa8cSmrg fi
11199629baa8cSmrg AC_MSG_RESULT($IPV6CONN)
11200578741aaSmrg
11201629baa8cSmrg # 4.3BSD-Reno added a new member to struct sockaddr_in
11202629baa8cSmrg AC_CHECK_MEMBER([struct sockaddr_in.sin_len], 
11203629baa8cSmrg	AC_DEFINE([BSD44SOCKETS],1,
11204629baa8cSmrg 	    [Define to 1 if `struct sockaddr_in' has a `sin_len' member]), [], [
11205629baa8cSmrg#include <sys/types.h>
11206629baa8cSmrg#include <sys/socket.h>
11207629baa8cSmrg#include <netinet/in.h>
11208629baa8cSmrg ])
11209145b7b3cSmrg
11210629baa8cSmrg # POSIX.1g changed the type of pointer passed to getsockname/getpeername/etc.
11211629baa8cSmrg AC_CHECK_TYPES([socklen_t], [], [], [
11212629baa8cSmrgAC_INCLUDES_DEFAULT
11213629baa8cSmrg#include <sys/socket.h>])
11214629baa8cSmrg 
11215629baa8cSmrg]) # XTRANS_TCP_FLAGS
11216578741aaSmrg
11217629baa8cSmrg# XTRANS_CONNECTION_FLAGS()
11218629baa8cSmrg# -------------------------
11219629baa8cSmrg# Standard checks for which Xtrans transports to use by the Xorg packages
11220629baa8cSmrg# that use Xtrans functions
11221629baa8cSmrgAC_DEFUN([XTRANS_CONNECTION_FLAGS],[
11222629baa8cSmrg AC_REQUIRE([AC_CANONICAL_HOST])
11223629baa8cSmrg AC_REQUIRE([AC_TYPE_SIGNAL])
11224629baa8cSmrg [case $host_os in
11225629baa8cSmrg	mingw*)	unixdef="no"   ;;
11226629baa8cSmrg	*)	unixdef="yes"  ;;
11227629baa8cSmrg esac]
11228629baa8cSmrg AC_ARG_ENABLE(unix-transport,
11229629baa8cSmrg	AC_HELP_STRING([--enable-unix-transport],[Enable UNIX domain socket transport]),
11230629baa8cSmrg	[UNIXCONN=$enableval], [UNIXCONN=$unixdef])
11231629baa8cSmrg AC_MSG_CHECKING([if Xtrans should support UNIX socket connections])
11232629baa8cSmrg if test "$UNIXCONN" = "yes"; then
11233629baa8cSmrg	AC_DEFINE(UNIXCONN,1,[Support UNIX socket connections])
11234629baa8cSmrg fi
11235629baa8cSmrg AC_MSG_RESULT($UNIXCONN)
11236629baa8cSmrg AC_ARG_ENABLE(tcp-transport, 
11237629baa8cSmrg	AC_HELP_STRING([--enable-tcp-transport],[Enable TCP socket transport]),
11238629baa8cSmrg	[TCPCONN=$enableval], [TCPCONN=yes])
11239629baa8cSmrg AC_MSG_CHECKING([if Xtrans should support TCP socket connections])
11240629baa8cSmrg AC_MSG_RESULT($TCPCONN)
11241629baa8cSmrg if test "$TCPCONN" = "yes"; then
11242629baa8cSmrg	AC_DEFINE(TCPCONN,1,[Support TCP socket connections])
11243629baa8cSmrg	XTRANS_TCP_FLAGS
11244629baa8cSmrg fi
11245629baa8cSmrg [case $host_os in
11246629baa8cSmrg	solaris*|sco*|sysv4*)	localdef="yes" ;;
11247629baa8cSmrg	*)			localdef="no"  ;;
11248629baa8cSmrg esac]
11249629baa8cSmrg AC_ARG_ENABLE(local-transport,
11250629baa8cSmrg	AC_HELP_STRING([--enable-local-transport],[Enable os-specific local transport]),
11251629baa8cSmrg	[LOCALCONN=$enableval], [LOCALCONN=$localdef])
11252629baa8cSmrg AC_MSG_CHECKING([if Xtrans should support os-specific local connections])
11253629baa8cSmrg AC_MSG_RESULT($LOCALCONN)
11254629baa8cSmrg if test "$LOCALCONN" = "yes"; then
11255629baa8cSmrg	AC_DEFINE(LOCALCONN,1,[Support os-specific local connections])
11256629baa8cSmrg fi
11257629baa8cSmrg 
11258629baa8cSmrg]) # XTRANS_CONNECTION_FLAGS
11259578741aaSmrg
11260145b7b3cSmrg
11261629baa8cSmrg# XTRANS_SECURE_RPC_FLAGS()
11262629baa8cSmrg# -------------------------
11263629baa8cSmrg# Check for Secure RPC functions - must come after XTRANS_TCP_FLAGS
11264629baa8cSmrg# so that any necessary networking libraries are already found
11265629baa8cSmrgAC_DEFUN([XTRANS_SECURE_RPC_FLAGS],
11266629baa8cSmrg[AC_REQUIRE([XTRANS_TCP_FLAGS])
11267629baa8cSmrg AC_ARG_ENABLE(secure-rpc, 
11268629baa8cSmrg	AC_HELP_STRING([--enable-secure-rpc],[Enable Secure RPC]),
11269629baa8cSmrg        [SECURE_RPC=$enableval], [SECURE_RPC="try"])
11270145b7b3cSmrg
11271629baa8cSmrg if test "x$SECURE_RPC" = "xyes" -o "x$SECURE_RPC" = "xtry" ; then
11272629baa8cSmrg	FOUND_SECURE_RPC="no"
11273629baa8cSmrg	AC_CHECK_FUNCS([authdes_seccreate authdes_create],
11274629baa8cSmrg			[FOUND_SECURE_RPC="yes"])
11275629baa8cSmrg	if test "x$FOUND_SECURE_RPC" = "xno" ; then
11276629baa8cSmrg		if test "x$SECURE_RPC" = "xyes" ; then
11277629baa8cSmrg	AC_MSG_ERROR([Secure RPC requested, but required functions not found])
11278629baa8cSmrg		fi	
11279629baa8cSmrg		SECURE_RPC="no"
11280629baa8cSmrg	else
11281629baa8cSmrg		dnl FreeBSD keeps getsecretkey in librpcsvc
11282629baa8cSmrg		AC_SEARCH_LIBS(getsecretkey, [rpcsvc])
11283629baa8cSmrg		SECURE_RPC="yes"
11284629baa8cSmrg	fi
11285629baa8cSmrg fi
11286629baa8cSmrg AC_MSG_CHECKING([if Secure RPC authentication ("SUN-DES-1") should be supported])
11287629baa8cSmrg if test "x$SECURE_RPC" = "xyes" ; then
11288629baa8cSmrg	AC_DEFINE(SECURE_RPC, 1, [Support Secure RPC ("SUN-DES-1") authentication for X11 clients])
11289629baa8cSmrg fi
11290629baa8cSmrg AC_MSG_RESULT($SECURE_RPC)
11291629baa8cSmrg]) # XTRANS_SECURE_RPC_FLAGS
11292145b7b3cSmrg
11293145b7b3cSmrg
11294