aclocal.m4 revision e8a5466a
1b9b4fd27Smrg# generated automatically by aclocal 1.11.1 -*- Autoconf -*-
2caade7ccSmrg
3caade7ccSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4485f0483Smrg# 2005, 2006, 2007, 2008, 2009  Free Software Foundation, Inc.
5caade7ccSmrg# This file is free software; the Free Software Foundation
6caade7ccSmrg# gives unlimited permission to copy and/or distribute it,
7caade7ccSmrg# with or without modifications, as long as this notice is preserved.
8caade7ccSmrg
9caade7ccSmrg# This program is distributed in the hope that it will be useful,
10caade7ccSmrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11caade7ccSmrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12caade7ccSmrg# PARTICULAR PURPOSE.
13caade7ccSmrg
14485f0483Smrgm4_ifndef([AC_AUTOCONF_VERSION],
15485f0483Smrg  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
16e8a5466aSmrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],,
17e8a5466aSmrg[m4_warning([this file was generated for autoconf 2.68.
18485f0483SmrgYou have another version of autoconf.  It may work, but is not guaranteed to.
19485f0483SmrgIf you have problems, you may need to regenerate the build system entirely.
20485f0483SmrgTo do so, use the procedure documented by the package, typically `autoreconf'.])])
21caade7ccSmrg
22485f0483Smrg# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
23caade7ccSmrg#
24caade7ccSmrg# This file is free software; the Free Software Foundation
25caade7ccSmrg# gives unlimited permission to copy and/or distribute it,
26caade7ccSmrg# with or without modifications, as long as this notice is preserved.
27caade7ccSmrg
28caade7ccSmrg# AM_AUTOMAKE_VERSION(VERSION)
29caade7ccSmrg# ----------------------------
30caade7ccSmrg# Automake X.Y traces this macro to ensure aclocal.m4 has been
31caade7ccSmrg# generated from the m4 files accompanying Automake X.Y.
32caade7ccSmrg# (This private macro should not be called outside this file.)
33caade7ccSmrgAC_DEFUN([AM_AUTOMAKE_VERSION],
34485f0483Smrg[am__api_version='1.11'
35caade7ccSmrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
36caade7ccSmrgdnl require some minimum version.  Point them to the right macro.
37b9b4fd27Smrgm4_if([$1], [1.11.1], [],
38caade7ccSmrg      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
39caade7ccSmrg])
40caade7ccSmrg
41caade7ccSmrg# _AM_AUTOCONF_VERSION(VERSION)
42caade7ccSmrg# -----------------------------
43caade7ccSmrg# aclocal traces this macro to find the Autoconf version.
44caade7ccSmrg# This is a private macro too.  Using m4_define simplifies
45caade7ccSmrg# the logic in aclocal, which can simply ignore this definition.
46caade7ccSmrgm4_define([_AM_AUTOCONF_VERSION], [])
47caade7ccSmrg
48caade7ccSmrg# AM_SET_CURRENT_AUTOMAKE_VERSION
49caade7ccSmrg# -------------------------------
50caade7ccSmrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
51485f0483Smrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
52caade7ccSmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
53b9b4fd27Smrg[AM_AUTOMAKE_VERSION([1.11.1])dnl
54485f0483Smrgm4_ifndef([AC_AUTOCONF_VERSION],
55485f0483Smrg  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
56485f0483Smrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
57caade7ccSmrg
58caade7ccSmrg# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
59caade7ccSmrg
60caade7ccSmrg# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
61caade7ccSmrg#
62caade7ccSmrg# This file is free software; the Free Software Foundation
63caade7ccSmrg# gives unlimited permission to copy and/or distribute it,
64caade7ccSmrg# with or without modifications, as long as this notice is preserved.
65caade7ccSmrg
66caade7ccSmrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
67caade7ccSmrg# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
68caade7ccSmrg# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
69caade7ccSmrg#
70caade7ccSmrg# Of course, Automake must honor this variable whenever it calls a
71caade7ccSmrg# tool from the auxiliary directory.  The problem is that $srcdir (and
72caade7ccSmrg# therefore $ac_aux_dir as well) can be either absolute or relative,
73caade7ccSmrg# depending on how configure is run.  This is pretty annoying, since
74caade7ccSmrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top
75caade7ccSmrg# source directory, any form will work fine, but in subdirectories a
76caade7ccSmrg# relative path needs to be adjusted first.
77caade7ccSmrg#
78caade7ccSmrg# $ac_aux_dir/missing
79caade7ccSmrg#    fails when called from a subdirectory if $ac_aux_dir is relative
80caade7ccSmrg# $top_srcdir/$ac_aux_dir/missing
81caade7ccSmrg#    fails if $ac_aux_dir is absolute,
82caade7ccSmrg#    fails when called from a subdirectory in a VPATH build with
83caade7ccSmrg#          a relative $ac_aux_dir
84caade7ccSmrg#
85caade7ccSmrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
86caade7ccSmrg# are both prefixed by $srcdir.  In an in-source build this is usually
87caade7ccSmrg# harmless because $srcdir is `.', but things will broke when you
88caade7ccSmrg# start a VPATH build or use an absolute $srcdir.
89caade7ccSmrg#
90caade7ccSmrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
91caade7ccSmrg# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
92caade7ccSmrg#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
93caade7ccSmrg# and then we would define $MISSING as
94caade7ccSmrg#   MISSING="\${SHELL} $am_aux_dir/missing"
95caade7ccSmrg# This will work as long as MISSING is not called from configure, because
96caade7ccSmrg# unfortunately $(top_srcdir) has no meaning in configure.
97caade7ccSmrg# However there are other variables, like CC, which are often used in
98caade7ccSmrg# configure, and could therefore not use this "fixed" $ac_aux_dir.
99caade7ccSmrg#
100caade7ccSmrg# Another solution, used here, is to always expand $ac_aux_dir to an
101caade7ccSmrg# absolute PATH.  The drawback is that using absolute paths prevent a
102caade7ccSmrg# configured tree to be moved without reconfiguration.
103caade7ccSmrg
104caade7ccSmrgAC_DEFUN([AM_AUX_DIR_EXPAND],
105caade7ccSmrg[dnl Rely on autoconf to set up CDPATH properly.
106caade7ccSmrgAC_PREREQ([2.50])dnl
107caade7ccSmrg# expand $ac_aux_dir to an absolute path
108caade7ccSmrgam_aux_dir=`cd $ac_aux_dir && pwd`
109caade7ccSmrg])
110caade7ccSmrg
111caade7ccSmrg# AM_CONDITIONAL                                            -*- Autoconf -*-
112caade7ccSmrg
113485f0483Smrg# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
114caade7ccSmrg# Free Software Foundation, Inc.
115caade7ccSmrg#
116caade7ccSmrg# This file is free software; the Free Software Foundation
117caade7ccSmrg# gives unlimited permission to copy and/or distribute it,
118caade7ccSmrg# with or without modifications, as long as this notice is preserved.
119caade7ccSmrg
120485f0483Smrg# serial 9
121caade7ccSmrg
122caade7ccSmrg# AM_CONDITIONAL(NAME, SHELL-CONDITION)
123caade7ccSmrg# -------------------------------------
124caade7ccSmrg# Define a conditional.
125caade7ccSmrgAC_DEFUN([AM_CONDITIONAL],
126caade7ccSmrg[AC_PREREQ(2.52)dnl
127caade7ccSmrg ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
128caade7ccSmrg	[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
129caade7ccSmrgAC_SUBST([$1_TRUE])dnl
130caade7ccSmrgAC_SUBST([$1_FALSE])dnl
131caade7ccSmrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl
132caade7ccSmrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl
133485f0483Smrgm4_define([_AM_COND_VALUE_$1], [$2])dnl
134caade7ccSmrgif $2; then
135caade7ccSmrg  $1_TRUE=
136caade7ccSmrg  $1_FALSE='#'
137caade7ccSmrgelse
138caade7ccSmrg  $1_TRUE='#'
139caade7ccSmrg  $1_FALSE=
140caade7ccSmrgfi
141caade7ccSmrgAC_CONFIG_COMMANDS_PRE(
142caade7ccSmrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
143caade7ccSmrg  AC_MSG_ERROR([[conditional "$1" was never defined.
144caade7ccSmrgUsually this means the macro was only invoked conditionally.]])
145caade7ccSmrgfi])])
146caade7ccSmrg
147485f0483Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
148caade7ccSmrg# Free Software Foundation, Inc.
149caade7ccSmrg#
150caade7ccSmrg# This file is free software; the Free Software Foundation
151caade7ccSmrg# gives unlimited permission to copy and/or distribute it,
152caade7ccSmrg# with or without modifications, as long as this notice is preserved.
153caade7ccSmrg
154485f0483Smrg# serial 10
155caade7ccSmrg
156caade7ccSmrg# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
157caade7ccSmrg# written in clear, in which case automake, when reading aclocal.m4,
158caade7ccSmrg# will think it sees a *use*, and therefore will trigger all it's
159caade7ccSmrg# C support machinery.  Also note that it means that autoscan, seeing
160caade7ccSmrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
161caade7ccSmrg
162caade7ccSmrg
163caade7ccSmrg# _AM_DEPENDENCIES(NAME)
164caade7ccSmrg# ----------------------
165caade7ccSmrg# See how the compiler implements dependency checking.
166caade7ccSmrg# NAME is "CC", "CXX", "GCJ", or "OBJC".
167caade7ccSmrg# We try a few techniques and use that to set a single cache variable.
168caade7ccSmrg#
169caade7ccSmrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
170caade7ccSmrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
171caade7ccSmrg# dependency, and given that the user is not expected to run this macro,
172caade7ccSmrg# just rely on AC_PROG_CC.
173caade7ccSmrgAC_DEFUN([_AM_DEPENDENCIES],
174caade7ccSmrg[AC_REQUIRE([AM_SET_DEPDIR])dnl
175caade7ccSmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
176caade7ccSmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl
177caade7ccSmrgAC_REQUIRE([AM_DEP_TRACK])dnl
178caade7ccSmrg
179caade7ccSmrgifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
180caade7ccSmrg       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
181caade7ccSmrg       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
182caade7ccSmrg       [$1], UPC,  [depcc="$UPC"  am_compiler_list=],
183caade7ccSmrg       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
184caade7ccSmrg                   [depcc="$$1"   am_compiler_list=])
185caade7ccSmrg
186caade7ccSmrgAC_CACHE_CHECK([dependency style of $depcc],
187caade7ccSmrg               [am_cv_$1_dependencies_compiler_type],
188caade7ccSmrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
189caade7ccSmrg  # We make a subdir and do the tests there.  Otherwise we can end up
190caade7ccSmrg  # making bogus files that we don't know about and never remove.  For
191caade7ccSmrg  # instance it was reported that on HP-UX the gcc test will end up
192caade7ccSmrg  # making a dummy file named `D' -- because `-MD' means `put the output
193caade7ccSmrg  # in D'.
194caade7ccSmrg  mkdir conftest.dir
195caade7ccSmrg  # Copy depcomp to subdir because otherwise we won't find it if we're
196caade7ccSmrg  # using a relative directory.
197caade7ccSmrg  cp "$am_depcomp" conftest.dir
198caade7ccSmrg  cd conftest.dir
199caade7ccSmrg  # We will build objects and dependencies in a subdirectory because
200caade7ccSmrg  # it helps to detect inapplicable dependency modes.  For instance
201caade7ccSmrg  # both Tru64's cc and ICC support -MD to output dependencies as a
202caade7ccSmrg  # side effect of compilation, but ICC will put the dependencies in
203caade7ccSmrg  # the current directory while Tru64 will put them in the object
204caade7ccSmrg  # directory.
205caade7ccSmrg  mkdir sub
206caade7ccSmrg
207caade7ccSmrg  am_cv_$1_dependencies_compiler_type=none
208caade7ccSmrg  if test "$am_compiler_list" = ""; then
209caade7ccSmrg     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
210caade7ccSmrg  fi
211485f0483Smrg  am__universal=false
212485f0483Smrg  m4_case([$1], [CC],
213485f0483Smrg    [case " $depcc " in #(
214485f0483Smrg     *\ -arch\ *\ -arch\ *) am__universal=true ;;
215485f0483Smrg     esac],
216485f0483Smrg    [CXX],
217485f0483Smrg    [case " $depcc " in #(
218485f0483Smrg     *\ -arch\ *\ -arch\ *) am__universal=true ;;
219485f0483Smrg     esac])
220485f0483Smrg
221caade7ccSmrg  for depmode in $am_compiler_list; do
222caade7ccSmrg    # Setup a source with many dependencies, because some compilers
223caade7ccSmrg    # like to wrap large dependency lists on column 80 (with \), and
224caade7ccSmrg    # we should not choose a depcomp mode which is confused by this.
225caade7ccSmrg    #
226caade7ccSmrg    # We need to recreate these files for each test, as the compiler may
227caade7ccSmrg    # overwrite some of them when testing with obscure command lines.
228caade7ccSmrg    # This happens at least with the AIX C compiler.
229caade7ccSmrg    : > sub/conftest.c
230caade7ccSmrg    for i in 1 2 3 4 5 6; do
231caade7ccSmrg      echo '#include "conftst'$i'.h"' >> sub/conftest.c
232caade7ccSmrg      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
233caade7ccSmrg      # Solaris 8's {/usr,}/bin/sh.
234caade7ccSmrg      touch sub/conftst$i.h
235caade7ccSmrg    done
236caade7ccSmrg    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
237caade7ccSmrg
238485f0483Smrg    # We check with `-c' and `-o' for the sake of the "dashmstdout"
239485f0483Smrg    # mode.  It turns out that the SunPro C++ compiler does not properly
240485f0483Smrg    # handle `-M -o', and we need to detect this.  Also, some Intel
241485f0483Smrg    # versions had trouble with output in subdirs
242485f0483Smrg    am__obj=sub/conftest.${OBJEXT-o}
243485f0483Smrg    am__minus_obj="-o $am__obj"
244caade7ccSmrg    case $depmode in
245485f0483Smrg    gcc)
246485f0483Smrg      # This depmode causes a compiler race in universal mode.
247485f0483Smrg      test "$am__universal" = false || continue
248485f0483Smrg      ;;
249caade7ccSmrg    nosideeffect)
250caade7ccSmrg      # after this tag, mechanisms are not by side-effect, so they'll
251caade7ccSmrg      # only be used when explicitly requested
252caade7ccSmrg      if test "x$enable_dependency_tracking" = xyes; then
253caade7ccSmrg	continue
254caade7ccSmrg      else
255caade7ccSmrg	break
256caade7ccSmrg      fi
257caade7ccSmrg      ;;
258485f0483Smrg    msvisualcpp | msvcmsys)
259485f0483Smrg      # This compiler won't grok `-c -o', but also, the minuso test has
260485f0483Smrg      # not run yet.  These depmodes are late enough in the game, and
261485f0483Smrg      # so weak that their functioning should not be impacted.
262485f0483Smrg      am__obj=conftest.${OBJEXT-o}
263485f0483Smrg      am__minus_obj=
264485f0483Smrg      ;;
265caade7ccSmrg    none) break ;;
266caade7ccSmrg    esac
267caade7ccSmrg    if depmode=$depmode \
268485f0483Smrg       source=sub/conftest.c object=$am__obj \
269caade7ccSmrg       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
270485f0483Smrg       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
271caade7ccSmrg         >/dev/null 2>conftest.err &&
272caade7ccSmrg       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
273caade7ccSmrg       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
274485f0483Smrg       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
275caade7ccSmrg       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
276caade7ccSmrg      # icc doesn't choke on unknown options, it will just issue warnings
277caade7ccSmrg      # or remarks (even with -Werror).  So we grep stderr for any message
278caade7ccSmrg      # that says an option was ignored or not supported.
279caade7ccSmrg      # When given -MP, icc 7.0 and 7.1 complain thusly:
280caade7ccSmrg      #   icc: Command line warning: ignoring option '-M'; no argument required
281caade7ccSmrg      # The diagnosis changed in icc 8.0:
282caade7ccSmrg      #   icc: Command line remark: option '-MP' not supported
283caade7ccSmrg      if (grep 'ignoring option' conftest.err ||
284caade7ccSmrg          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
285caade7ccSmrg        am_cv_$1_dependencies_compiler_type=$depmode
286caade7ccSmrg        break
287caade7ccSmrg      fi
288caade7ccSmrg    fi
289caade7ccSmrg  done
290caade7ccSmrg
291caade7ccSmrg  cd ..
292caade7ccSmrg  rm -rf conftest.dir
293caade7ccSmrgelse
294caade7ccSmrg  am_cv_$1_dependencies_compiler_type=none
295caade7ccSmrgfi
296caade7ccSmrg])
297caade7ccSmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
298caade7ccSmrgAM_CONDITIONAL([am__fastdep$1], [
299caade7ccSmrg  test "x$enable_dependency_tracking" != xno \
300caade7ccSmrg  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
301caade7ccSmrg])
302caade7ccSmrg
303caade7ccSmrg
304caade7ccSmrg# AM_SET_DEPDIR
305caade7ccSmrg# -------------
306caade7ccSmrg# Choose a directory name for dependency files.
307caade7ccSmrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES
308caade7ccSmrgAC_DEFUN([AM_SET_DEPDIR],
309caade7ccSmrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
310caade7ccSmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
311caade7ccSmrg])
312caade7ccSmrg
313caade7ccSmrg
314caade7ccSmrg# AM_DEP_TRACK
315caade7ccSmrg# ------------
316caade7ccSmrgAC_DEFUN([AM_DEP_TRACK],
317caade7ccSmrg[AC_ARG_ENABLE(dependency-tracking,
318caade7ccSmrg[  --disable-dependency-tracking  speeds up one-time build
319caade7ccSmrg  --enable-dependency-tracking   do not reject slow dependency extractors])
320caade7ccSmrgif test "x$enable_dependency_tracking" != xno; then
321caade7ccSmrg  am_depcomp="$ac_aux_dir/depcomp"
322caade7ccSmrg  AMDEPBACKSLASH='\'
323caade7ccSmrgfi
324caade7ccSmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
325caade7ccSmrgAC_SUBST([AMDEPBACKSLASH])dnl
326caade7ccSmrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
327caade7ccSmrg])
328caade7ccSmrg
329caade7ccSmrg# Generate code to set up dependency tracking.              -*- Autoconf -*-
330caade7ccSmrg
331485f0483Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
332caade7ccSmrg# Free Software Foundation, Inc.
333caade7ccSmrg#
334caade7ccSmrg# This file is free software; the Free Software Foundation
335caade7ccSmrg# gives unlimited permission to copy and/or distribute it,
336caade7ccSmrg# with or without modifications, as long as this notice is preserved.
337caade7ccSmrg
338485f0483Smrg#serial 5
339caade7ccSmrg
340caade7ccSmrg# _AM_OUTPUT_DEPENDENCY_COMMANDS
341caade7ccSmrg# ------------------------------
342caade7ccSmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
343485f0483Smrg[{
344485f0483Smrg  # Autoconf 2.62 quotes --file arguments for eval, but not when files
345485f0483Smrg  # are listed without --file.  Let's play safe and only enable the eval
346485f0483Smrg  # if we detect the quoting.
347485f0483Smrg  case $CONFIG_FILES in
348485f0483Smrg  *\'*) eval set x "$CONFIG_FILES" ;;
349485f0483Smrg  *)   set x $CONFIG_FILES ;;
350485f0483Smrg  esac
351485f0483Smrg  shift
352485f0483Smrg  for mf
353485f0483Smrg  do
354485f0483Smrg    # Strip MF so we end up with the name of the file.
355485f0483Smrg    mf=`echo "$mf" | sed -e 's/:.*$//'`
356485f0483Smrg    # Check whether this is an Automake generated Makefile or not.
357485f0483Smrg    # We used to match only the files named `Makefile.in', but
358485f0483Smrg    # some people rename them; so instead we look at the file content.
359485f0483Smrg    # Grep'ing the first line is not enough: some people post-process
360485f0483Smrg    # each Makefile.in and add a new line on top of each file to say so.
361485f0483Smrg    # Grep'ing the whole file is not good either: AIX grep has a line
362485f0483Smrg    # limit of 2048, but all sed's we know have understand at least 4000.
363485f0483Smrg    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
364485f0483Smrg      dirpart=`AS_DIRNAME("$mf")`
365485f0483Smrg    else
366485f0483Smrg      continue
367485f0483Smrg    fi
368485f0483Smrg    # Extract the definition of DEPDIR, am__include, and am__quote
369485f0483Smrg    # from the Makefile without running `make'.
370485f0483Smrg    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
371485f0483Smrg    test -z "$DEPDIR" && continue
372485f0483Smrg    am__include=`sed -n 's/^am__include = //p' < "$mf"`
373485f0483Smrg    test -z "am__include" && continue
374485f0483Smrg    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
375485f0483Smrg    # When using ansi2knr, U may be empty or an underscore; expand it
376485f0483Smrg    U=`sed -n 's/^U = //p' < "$mf"`
377485f0483Smrg    # Find all dependency output files, they are included files with
378485f0483Smrg    # $(DEPDIR) in their names.  We invoke sed twice because it is the
379485f0483Smrg    # simplest approach to changing $(DEPDIR) to its actual value in the
380485f0483Smrg    # expansion.
381485f0483Smrg    for file in `sed -n "
382485f0483Smrg      s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
383485f0483Smrg	 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
384485f0483Smrg      # Make sure the directory exists.
385485f0483Smrg      test -f "$dirpart/$file" && continue
386485f0483Smrg      fdir=`AS_DIRNAME(["$file"])`
387485f0483Smrg      AS_MKDIR_P([$dirpart/$fdir])
388485f0483Smrg      # echo "creating $dirpart/$file"
389485f0483Smrg      echo '# dummy' > "$dirpart/$file"
390485f0483Smrg    done
391caade7ccSmrg  done
392485f0483Smrg}
393caade7ccSmrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS
394caade7ccSmrg
395caade7ccSmrg
396caade7ccSmrg# AM_OUTPUT_DEPENDENCY_COMMANDS
397caade7ccSmrg# -----------------------------
398caade7ccSmrg# This macro should only be invoked once -- use via AC_REQUIRE.
399caade7ccSmrg#
400caade7ccSmrg# This code is only required when automatic dependency tracking
401caade7ccSmrg# is enabled.  FIXME.  This creates each `.P' file that we will
402caade7ccSmrg# need in order to bootstrap the dependency handling code.
403caade7ccSmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
404caade7ccSmrg[AC_CONFIG_COMMANDS([depfiles],
405caade7ccSmrg     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
406caade7ccSmrg     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
407caade7ccSmrg])
408caade7ccSmrg
409caade7ccSmrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
410caade7ccSmrg# Free Software Foundation, Inc.
411caade7ccSmrg#
412caade7ccSmrg# This file is free software; the Free Software Foundation
413caade7ccSmrg# gives unlimited permission to copy and/or distribute it,
414caade7ccSmrg# with or without modifications, as long as this notice is preserved.
415caade7ccSmrg
416caade7ccSmrg# serial 8
417caade7ccSmrg
418caade7ccSmrg# AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
419caade7ccSmrgAU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
420caade7ccSmrg
421caade7ccSmrg# Do all the work for Automake.                             -*- Autoconf -*-
422caade7ccSmrg
423caade7ccSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
424485f0483Smrg# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
425caade7ccSmrg#
426caade7ccSmrg# This file is free software; the Free Software Foundation
427caade7ccSmrg# gives unlimited permission to copy and/or distribute it,
428caade7ccSmrg# with or without modifications, as long as this notice is preserved.
429caade7ccSmrg
430485f0483Smrg# serial 16
431caade7ccSmrg
432caade7ccSmrg# This macro actually does too much.  Some checks are only needed if
433caade7ccSmrg# your package does certain things.  But this isn't really a big deal.
434caade7ccSmrg
435caade7ccSmrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
436caade7ccSmrg# AM_INIT_AUTOMAKE([OPTIONS])
437caade7ccSmrg# -----------------------------------------------
438caade7ccSmrg# The call with PACKAGE and VERSION arguments is the old style
439caade7ccSmrg# call (pre autoconf-2.50), which is being phased out.  PACKAGE
440caade7ccSmrg# and VERSION should now be passed to AC_INIT and removed from
441caade7ccSmrg# the call to AM_INIT_AUTOMAKE.
442caade7ccSmrg# We support both call styles for the transition.  After
443caade7ccSmrg# the next Automake release, Autoconf can make the AC_INIT
444caade7ccSmrg# arguments mandatory, and then we can depend on a new Autoconf
445caade7ccSmrg# release and drop the old call support.
446caade7ccSmrgAC_DEFUN([AM_INIT_AUTOMAKE],
447485f0483Smrg[AC_PREREQ([2.62])dnl
448caade7ccSmrgdnl Autoconf wants to disallow AM_ names.  We explicitly allow
449caade7ccSmrgdnl the ones we care about.
450caade7ccSmrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
451caade7ccSmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
452caade7ccSmrgAC_REQUIRE([AC_PROG_INSTALL])dnl
453caade7ccSmrgif test "`cd $srcdir && pwd`" != "`pwd`"; then
454caade7ccSmrg  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
455caade7ccSmrg  # is not polluted with repeated "-I."
456caade7ccSmrg  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
457caade7ccSmrg  # test to see if srcdir already configured
458caade7ccSmrg  if test -f $srcdir/config.status; then
459caade7ccSmrg    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
460caade7ccSmrg  fi
461caade7ccSmrgfi
462caade7ccSmrg
463caade7ccSmrg# test whether we have cygpath
464caade7ccSmrgif test -z "$CYGPATH_W"; then
465caade7ccSmrg  if (cygpath --version) >/dev/null 2>/dev/null; then
466caade7ccSmrg    CYGPATH_W='cygpath -w'
467caade7ccSmrg  else
468caade7ccSmrg    CYGPATH_W=echo
469caade7ccSmrg  fi
470caade7ccSmrgfi
471caade7ccSmrgAC_SUBST([CYGPATH_W])
472caade7ccSmrg
473caade7ccSmrg# Define the identity of the package.
474caade7ccSmrgdnl Distinguish between old-style and new-style calls.
475caade7ccSmrgm4_ifval([$2],
476caade7ccSmrg[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
477caade7ccSmrg AC_SUBST([PACKAGE], [$1])dnl
478caade7ccSmrg AC_SUBST([VERSION], [$2])],
479caade7ccSmrg[_AM_SET_OPTIONS([$1])dnl
480caade7ccSmrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
481caade7ccSmrgm4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
482caade7ccSmrg  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
483caade7ccSmrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
484caade7ccSmrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
485caade7ccSmrg
486caade7ccSmrg_AM_IF_OPTION([no-define],,
487caade7ccSmrg[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
488caade7ccSmrg AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
489caade7ccSmrg
490caade7ccSmrg# Some tools Automake needs.
491caade7ccSmrgAC_REQUIRE([AM_SANITY_CHECK])dnl
492caade7ccSmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl
493caade7ccSmrgAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
494caade7ccSmrgAM_MISSING_PROG(AUTOCONF, autoconf)
495caade7ccSmrgAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
496caade7ccSmrgAM_MISSING_PROG(AUTOHEADER, autoheader)
497caade7ccSmrgAM_MISSING_PROG(MAKEINFO, makeinfo)
498485f0483SmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl
499485f0483SmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
500caade7ccSmrgAC_REQUIRE([AM_PROG_MKDIR_P])dnl
501caade7ccSmrg# We need awk for the "check" target.  The system "awk" is bad on
502caade7ccSmrg# some platforms.
503caade7ccSmrgAC_REQUIRE([AC_PROG_AWK])dnl
504caade7ccSmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl
505caade7ccSmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl
506caade7ccSmrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
507485f0483Smrg	      [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
508485f0483Smrg			     [_AM_PROG_TAR([v7])])])
509caade7ccSmrg_AM_IF_OPTION([no-dependencies],,
510caade7ccSmrg[AC_PROVIDE_IFELSE([AC_PROG_CC],
511485f0483Smrg		  [_AM_DEPENDENCIES(CC)],
512485f0483Smrg		  [define([AC_PROG_CC],
513485f0483Smrg			  defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
514caade7ccSmrgAC_PROVIDE_IFELSE([AC_PROG_CXX],
515485f0483Smrg		  [_AM_DEPENDENCIES(CXX)],
516485f0483Smrg		  [define([AC_PROG_CXX],
517485f0483Smrg			  defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
518caade7ccSmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC],
519485f0483Smrg		  [_AM_DEPENDENCIES(OBJC)],
520485f0483Smrg		  [define([AC_PROG_OBJC],
521485f0483Smrg			  defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
522caade7ccSmrg])
523485f0483Smrg_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
524485f0483Smrgdnl The `parallel-tests' driver may need to know about EXEEXT, so add the
525485f0483Smrgdnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This macro
526485f0483Smrgdnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
527485f0483SmrgAC_CONFIG_COMMANDS_PRE(dnl
528485f0483Smrg[m4_provide_if([_AM_COMPILER_EXEEXT],
529485f0483Smrg  [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
530caade7ccSmrg])
531caade7ccSmrg
532485f0483Smrgdnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
533485f0483Smrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
534485f0483Smrgdnl mangled by Autoconf and run in a shell conditional statement.
535485f0483Smrgm4_define([_AC_COMPILER_EXEEXT],
536485f0483Smrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
537485f0483Smrg
538caade7ccSmrg
539caade7ccSmrg# When config.status generates a header, we must update the stamp-h file.
540caade7ccSmrg# This file resides in the same directory as the config header
541caade7ccSmrg# that is generated.  The stamp files are numbered to have different names.
542caade7ccSmrg
543caade7ccSmrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
544caade7ccSmrg# loop where config.status creates the headers, so we can generate
545caade7ccSmrg# our stamp files there.
546caade7ccSmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
547caade7ccSmrg[# Compute $1's index in $config_headers.
548485f0483Smrg_am_arg=$1
549caade7ccSmrg_am_stamp_count=1
550caade7ccSmrgfor _am_header in $config_headers :; do
551caade7ccSmrg  case $_am_header in
552485f0483Smrg    $_am_arg | $_am_arg:* )
553caade7ccSmrg      break ;;
554caade7ccSmrg    * )
555caade7ccSmrg      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
556caade7ccSmrg  esac
557caade7ccSmrgdone
558485f0483Smrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
559caade7ccSmrg
560485f0483Smrg# Copyright (C) 2001, 2003, 2005, 2008  Free Software Foundation, Inc.
561caade7ccSmrg#
562caade7ccSmrg# This file is free software; the Free Software Foundation
563caade7ccSmrg# gives unlimited permission to copy and/or distribute it,
564caade7ccSmrg# with or without modifications, as long as this notice is preserved.
565caade7ccSmrg
566caade7ccSmrg# AM_PROG_INSTALL_SH
567caade7ccSmrg# ------------------
568caade7ccSmrg# Define $install_sh.
569caade7ccSmrgAC_DEFUN([AM_PROG_INSTALL_SH],
570caade7ccSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
571485f0483Smrgif test x"${install_sh}" != xset; then
572485f0483Smrg  case $am_aux_dir in
573485f0483Smrg  *\ * | *\	*)
574485f0483Smrg    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
575485f0483Smrg  *)
576485f0483Smrg    install_sh="\${SHELL} $am_aux_dir/install-sh"
577485f0483Smrg  esac
578485f0483Smrgfi
579caade7ccSmrgAC_SUBST(install_sh)])
580caade7ccSmrg
581caade7ccSmrg# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
582caade7ccSmrg#
583caade7ccSmrg# This file is free software; the Free Software Foundation
584caade7ccSmrg# gives unlimited permission to copy and/or distribute it,
585caade7ccSmrg# with or without modifications, as long as this notice is preserved.
586caade7ccSmrg
587caade7ccSmrg# serial 2
588caade7ccSmrg
589caade7ccSmrg# Check whether the underlying file-system supports filenames
590caade7ccSmrg# with a leading dot.  For instance MS-DOS doesn't.
591caade7ccSmrgAC_DEFUN([AM_SET_LEADING_DOT],
592caade7ccSmrg[rm -rf .tst 2>/dev/null
593caade7ccSmrgmkdir .tst 2>/dev/null
594caade7ccSmrgif test -d .tst; then
595caade7ccSmrg  am__leading_dot=.
596caade7ccSmrgelse
597caade7ccSmrg  am__leading_dot=_
598caade7ccSmrgfi
599caade7ccSmrgrmdir .tst 2>/dev/null
600caade7ccSmrgAC_SUBST([am__leading_dot])])
601caade7ccSmrg
602caade7ccSmrg# Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
603caade7ccSmrg# From Jim Meyering
604caade7ccSmrg
605485f0483Smrg# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008
606caade7ccSmrg# Free Software Foundation, Inc.
607caade7ccSmrg#
608caade7ccSmrg# This file is free software; the Free Software Foundation
609caade7ccSmrg# gives unlimited permission to copy and/or distribute it,
610caade7ccSmrg# with or without modifications, as long as this notice is preserved.
611caade7ccSmrg
612485f0483Smrg# serial 5
613caade7ccSmrg
614485f0483Smrg# AM_MAINTAINER_MODE([DEFAULT-MODE])
615485f0483Smrg# ----------------------------------
616485f0483Smrg# Control maintainer-specific portions of Makefiles.
617485f0483Smrg# Default is to disable them, unless `enable' is passed literally.
618485f0483Smrg# For symmetry, `disable' may be passed as well.  Anyway, the user
619485f0483Smrg# can override the default with the --enable/--disable switch.
620caade7ccSmrgAC_DEFUN([AM_MAINTAINER_MODE],
621485f0483Smrg[m4_case(m4_default([$1], [disable]),
622485f0483Smrg       [enable], [m4_define([am_maintainer_other], [disable])],
623485f0483Smrg       [disable], [m4_define([am_maintainer_other], [enable])],
624485f0483Smrg       [m4_define([am_maintainer_other], [enable])
625485f0483Smrg        m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
626485f0483SmrgAC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles])
627485f0483Smrg  dnl maintainer-mode's default is 'disable' unless 'enable' is passed
628485f0483Smrg  AC_ARG_ENABLE([maintainer-mode],
629485f0483Smrg[  --][am_maintainer_other][-maintainer-mode  am_maintainer_other make rules and dependencies not useful
630caade7ccSmrg			  (and sometimes confusing) to the casual installer],
631485f0483Smrg      [USE_MAINTAINER_MODE=$enableval],
632485f0483Smrg      [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
633caade7ccSmrg  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
634485f0483Smrg  AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
635caade7ccSmrg  MAINT=$MAINTAINER_MODE_TRUE
636485f0483Smrg  AC_SUBST([MAINT])dnl
637caade7ccSmrg]
638caade7ccSmrg)
639caade7ccSmrg
640caade7ccSmrgAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
641caade7ccSmrg
642caade7ccSmrg# Check to see how 'make' treats includes.	            -*- Autoconf -*-
643caade7ccSmrg
644485f0483Smrg# Copyright (C) 2001, 2002, 2003, 2005, 2009  Free Software Foundation, Inc.
645caade7ccSmrg#
646caade7ccSmrg# This file is free software; the Free Software Foundation
647caade7ccSmrg# gives unlimited permission to copy and/or distribute it,
648caade7ccSmrg# with or without modifications, as long as this notice is preserved.
649caade7ccSmrg
650485f0483Smrg# serial 4
651caade7ccSmrg
652caade7ccSmrg# AM_MAKE_INCLUDE()
653caade7ccSmrg# -----------------
654caade7ccSmrg# Check to see how make treats includes.
655caade7ccSmrgAC_DEFUN([AM_MAKE_INCLUDE],
656caade7ccSmrg[am_make=${MAKE-make}
657caade7ccSmrgcat > confinc << 'END'
658caade7ccSmrgam__doit:
659485f0483Smrg	@echo this is the am__doit target
660caade7ccSmrg.PHONY: am__doit
661caade7ccSmrgEND
662caade7ccSmrg# If we don't find an include directive, just comment out the code.
663caade7ccSmrgAC_MSG_CHECKING([for style of include used by $am_make])
664caade7ccSmrgam__include="#"
665caade7ccSmrgam__quote=
666caade7ccSmrg_am_result=none
667caade7ccSmrg# First try GNU make style include.
668caade7ccSmrgecho "include confinc" > confmf
669485f0483Smrg# Ignore all kinds of additional output from `make'.
670485f0483Smrgcase `$am_make -s -f confmf 2> /dev/null` in #(
671485f0483Smrg*the\ am__doit\ target*)
672485f0483Smrg  am__include=include
673485f0483Smrg  am__quote=
674485f0483Smrg  _am_result=GNU
675485f0483Smrg  ;;
676485f0483Smrgesac
677caade7ccSmrg# Now try BSD make style include.
678caade7ccSmrgif test "$am__include" = "#"; then
679caade7ccSmrg   echo '.include "confinc"' > confmf
680485f0483Smrg   case `$am_make -s -f confmf 2> /dev/null` in #(
681485f0483Smrg   *the\ am__doit\ target*)
682485f0483Smrg     am__include=.include
683485f0483Smrg     am__quote="\""
684485f0483Smrg     _am_result=BSD
685485f0483Smrg     ;;
686485f0483Smrg   esac
687caade7ccSmrgfi
688caade7ccSmrgAC_SUBST([am__include])
689caade7ccSmrgAC_SUBST([am__quote])
690caade7ccSmrgAC_MSG_RESULT([$_am_result])
691caade7ccSmrgrm -f confinc confmf
692caade7ccSmrg])
693caade7ccSmrg
694caade7ccSmrg# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
695caade7ccSmrg
696485f0483Smrg# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
697caade7ccSmrg# Free Software Foundation, Inc.
698caade7ccSmrg#
699caade7ccSmrg# This file is free software; the Free Software Foundation
700caade7ccSmrg# gives unlimited permission to copy and/or distribute it,
701caade7ccSmrg# with or without modifications, as long as this notice is preserved.
702caade7ccSmrg
703485f0483Smrg# serial 6
704caade7ccSmrg
705caade7ccSmrg# AM_MISSING_PROG(NAME, PROGRAM)
706caade7ccSmrg# ------------------------------
707caade7ccSmrgAC_DEFUN([AM_MISSING_PROG],
708caade7ccSmrg[AC_REQUIRE([AM_MISSING_HAS_RUN])
709caade7ccSmrg$1=${$1-"${am_missing_run}$2"}
710caade7ccSmrgAC_SUBST($1)])
711caade7ccSmrg
712caade7ccSmrg
713caade7ccSmrg# AM_MISSING_HAS_RUN
714caade7ccSmrg# ------------------
715caade7ccSmrg# Define MISSING if not defined so far and test if it supports --run.
716caade7ccSmrg# If it does, set am_missing_run to use it, otherwise, to nothing.
717caade7ccSmrgAC_DEFUN([AM_MISSING_HAS_RUN],
718caade7ccSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
719caade7ccSmrgAC_REQUIRE_AUX_FILE([missing])dnl
720485f0483Smrgif test x"${MISSING+set}" != xset; then
721485f0483Smrg  case $am_aux_dir in
722485f0483Smrg  *\ * | *\	*)
723485f0483Smrg    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
724485f0483Smrg  *)
725485f0483Smrg    MISSING="\${SHELL} $am_aux_dir/missing" ;;
726485f0483Smrg  esac
727485f0483Smrgfi
728caade7ccSmrg# Use eval to expand $SHELL
729caade7ccSmrgif eval "$MISSING --run true"; then
730caade7ccSmrg  am_missing_run="$MISSING --run "
731caade7ccSmrgelse
732caade7ccSmrg  am_missing_run=
733caade7ccSmrg  AC_MSG_WARN([`missing' script is too old or missing])
734caade7ccSmrgfi
735caade7ccSmrg])
736caade7ccSmrg
737caade7ccSmrg# Copyright (C) 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
738caade7ccSmrg#
739caade7ccSmrg# This file is free software; the Free Software Foundation
740caade7ccSmrg# gives unlimited permission to copy and/or distribute it,
741caade7ccSmrg# with or without modifications, as long as this notice is preserved.
742caade7ccSmrg
743caade7ccSmrg# AM_PROG_MKDIR_P
744caade7ccSmrg# ---------------
745caade7ccSmrg# Check for `mkdir -p'.
746caade7ccSmrgAC_DEFUN([AM_PROG_MKDIR_P],
747caade7ccSmrg[AC_PREREQ([2.60])dnl
748caade7ccSmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl
749caade7ccSmrgdnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
750caade7ccSmrgdnl while keeping a definition of mkdir_p for backward compatibility.
751caade7ccSmrgdnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
752caade7ccSmrgdnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
753caade7ccSmrgdnl Makefile.ins that do not define MKDIR_P, so we do our own
754caade7ccSmrgdnl adjustment using top_builddir (which is defined more often than
755caade7ccSmrgdnl MKDIR_P).
756caade7ccSmrgAC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
757caade7ccSmrgcase $mkdir_p in
758caade7ccSmrg  [[\\/$]]* | ?:[[\\/]]*) ;;
759caade7ccSmrg  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
760caade7ccSmrgesac
761caade7ccSmrg])
762caade7ccSmrg
763caade7ccSmrg# Helper functions for option handling.                     -*- Autoconf -*-
764caade7ccSmrg
765485f0483Smrg# Copyright (C) 2001, 2002, 2003, 2005, 2008  Free Software Foundation, Inc.
766caade7ccSmrg#
767caade7ccSmrg# This file is free software; the Free Software Foundation
768caade7ccSmrg# gives unlimited permission to copy and/or distribute it,
769caade7ccSmrg# with or without modifications, as long as this notice is preserved.
770caade7ccSmrg
771485f0483Smrg# serial 4
772caade7ccSmrg
773caade7ccSmrg# _AM_MANGLE_OPTION(NAME)
774caade7ccSmrg# -----------------------
775caade7ccSmrgAC_DEFUN([_AM_MANGLE_OPTION],
776caade7ccSmrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
777caade7ccSmrg
778caade7ccSmrg# _AM_SET_OPTION(NAME)
779caade7ccSmrg# ------------------------------
780caade7ccSmrg# Set option NAME.  Presently that only means defining a flag for this option.
781caade7ccSmrgAC_DEFUN([_AM_SET_OPTION],
782caade7ccSmrg[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
783caade7ccSmrg
784caade7ccSmrg# _AM_SET_OPTIONS(OPTIONS)
785caade7ccSmrg# ----------------------------------
786caade7ccSmrg# OPTIONS is a space-separated list of Automake options.
787caade7ccSmrgAC_DEFUN([_AM_SET_OPTIONS],
788485f0483Smrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
789caade7ccSmrg
790caade7ccSmrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
791caade7ccSmrg# -------------------------------------------
792caade7ccSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
793caade7ccSmrgAC_DEFUN([_AM_IF_OPTION],
794caade7ccSmrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
795caade7ccSmrg
796caade7ccSmrg# Check to make sure that the build environment is sane.    -*- Autoconf -*-
797caade7ccSmrg
798485f0483Smrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
799caade7ccSmrg# Free Software Foundation, Inc.
800caade7ccSmrg#
801caade7ccSmrg# This file is free software; the Free Software Foundation
802caade7ccSmrg# gives unlimited permission to copy and/or distribute it,
803caade7ccSmrg# with or without modifications, as long as this notice is preserved.
804caade7ccSmrg
805485f0483Smrg# serial 5
806caade7ccSmrg
807caade7ccSmrg# AM_SANITY_CHECK
808caade7ccSmrg# ---------------
809caade7ccSmrgAC_DEFUN([AM_SANITY_CHECK],
810caade7ccSmrg[AC_MSG_CHECKING([whether build environment is sane])
811caade7ccSmrg# Just in case
812caade7ccSmrgsleep 1
813caade7ccSmrgecho timestamp > conftest.file
814485f0483Smrg# Reject unsafe characters in $srcdir or the absolute working directory
815485f0483Smrg# name.  Accept space and tab only in the latter.
816485f0483Smrgam_lf='
817485f0483Smrg'
818485f0483Smrgcase `pwd` in
819485f0483Smrg  *[[\\\"\#\$\&\'\`$am_lf]]*)
820485f0483Smrg    AC_MSG_ERROR([unsafe absolute working directory name]);;
821485f0483Smrgesac
822485f0483Smrgcase $srcdir in
823485f0483Smrg  *[[\\\"\#\$\&\'\`$am_lf\ \	]]*)
824485f0483Smrg    AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
825485f0483Smrgesac
826485f0483Smrg
827caade7ccSmrg# Do `set' in a subshell so we don't clobber the current shell's
828caade7ccSmrg# arguments.  Must try -L first in case configure is actually a
829caade7ccSmrg# symlink; some systems play weird games with the mod time of symlinks
830caade7ccSmrg# (eg FreeBSD returns the mod time of the symlink's containing
831caade7ccSmrg# directory).
832caade7ccSmrgif (
833485f0483Smrg   set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
834caade7ccSmrg   if test "$[*]" = "X"; then
835caade7ccSmrg      # -L didn't work.
836485f0483Smrg      set X `ls -t "$srcdir/configure" conftest.file`
837caade7ccSmrg   fi
838caade7ccSmrg   rm -f conftest.file
839caade7ccSmrg   if test "$[*]" != "X $srcdir/configure conftest.file" \
840caade7ccSmrg      && test "$[*]" != "X conftest.file $srcdir/configure"; then
841caade7ccSmrg
842caade7ccSmrg      # If neither matched, then we have a broken ls.  This can happen
843caade7ccSmrg      # if, for instance, CONFIG_SHELL is bash and it inherits a
844caade7ccSmrg      # broken ls alias from the environment.  This has actually
845caade7ccSmrg      # happened.  Such a system could not be considered "sane".
846caade7ccSmrg      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
847caade7ccSmrgalias in your environment])
848caade7ccSmrg   fi
849caade7ccSmrg
850caade7ccSmrg   test "$[2]" = conftest.file
851caade7ccSmrg   )
852caade7ccSmrgthen
853caade7ccSmrg   # Ok.
854caade7ccSmrg   :
855caade7ccSmrgelse
856caade7ccSmrg   AC_MSG_ERROR([newly created file is older than distributed files!
857caade7ccSmrgCheck your system clock])
858caade7ccSmrgfi
859caade7ccSmrgAC_MSG_RESULT(yes)])
860caade7ccSmrg
861485f0483Smrg# Copyright (C) 2009  Free Software Foundation, Inc.
862485f0483Smrg#
863485f0483Smrg# This file is free software; the Free Software Foundation
864485f0483Smrg# gives unlimited permission to copy and/or distribute it,
865485f0483Smrg# with or without modifications, as long as this notice is preserved.
866485f0483Smrg
867485f0483Smrg# serial 1
868485f0483Smrg
869485f0483Smrg# AM_SILENT_RULES([DEFAULT])
870485f0483Smrg# --------------------------
871485f0483Smrg# Enable less verbose build rules; with the default set to DEFAULT
872485f0483Smrg# (`yes' being less verbose, `no' or empty being verbose).
873485f0483SmrgAC_DEFUN([AM_SILENT_RULES],
874485f0483Smrg[AC_ARG_ENABLE([silent-rules],
875485f0483Smrg[  --enable-silent-rules          less verbose build output (undo: `make V=1')
876485f0483Smrg  --disable-silent-rules         verbose build output (undo: `make V=0')])
877485f0483Smrgcase $enable_silent_rules in
878485f0483Smrgyes) AM_DEFAULT_VERBOSITY=0;;
879485f0483Smrgno)  AM_DEFAULT_VERBOSITY=1;;
880485f0483Smrg*)   AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
881485f0483Smrgesac
882485f0483SmrgAC_SUBST([AM_DEFAULT_VERBOSITY])dnl
883485f0483SmrgAM_BACKSLASH='\'
884485f0483SmrgAC_SUBST([AM_BACKSLASH])dnl
885485f0483Smrg_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
886485f0483Smrg])
887485f0483Smrg
888caade7ccSmrg# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
889caade7ccSmrg#
890caade7ccSmrg# This file is free software; the Free Software Foundation
891caade7ccSmrg# gives unlimited permission to copy and/or distribute it,
892caade7ccSmrg# with or without modifications, as long as this notice is preserved.
893caade7ccSmrg
894caade7ccSmrg# AM_PROG_INSTALL_STRIP
895caade7ccSmrg# ---------------------
896caade7ccSmrg# One issue with vendor `install' (even GNU) is that you can't
897caade7ccSmrg# specify the program used to strip binaries.  This is especially
898caade7ccSmrg# annoying in cross-compiling environments, where the build's strip
899caade7ccSmrg# is unlikely to handle the host's binaries.
900caade7ccSmrg# Fortunately install-sh will honor a STRIPPROG variable, so we
901caade7ccSmrg# always use install-sh in `make install-strip', and initialize
902caade7ccSmrg# STRIPPROG with the value of the STRIP variable (set by the user).
903caade7ccSmrgAC_DEFUN([AM_PROG_INSTALL_STRIP],
904caade7ccSmrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
905caade7ccSmrg# Installed binaries are usually stripped using `strip' when the user
906caade7ccSmrg# run `make install-strip'.  However `strip' might not be the right
907caade7ccSmrg# tool to use in cross-compilation environments, therefore Automake
908caade7ccSmrg# will honor the `STRIP' environment variable to overrule this program.
909caade7ccSmrgdnl Don't test for $cross_compiling = yes, because it might be `maybe'.
910caade7ccSmrgif test "$cross_compiling" != no; then
911caade7ccSmrg  AC_CHECK_TOOL([STRIP], [strip], :)
912caade7ccSmrgfi
913caade7ccSmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
914caade7ccSmrgAC_SUBST([INSTALL_STRIP_PROGRAM])])
915caade7ccSmrg
916485f0483Smrg# Copyright (C) 2006, 2008  Free Software Foundation, Inc.
917caade7ccSmrg#
918caade7ccSmrg# This file is free software; the Free Software Foundation
919caade7ccSmrg# gives unlimited permission to copy and/or distribute it,
920caade7ccSmrg# with or without modifications, as long as this notice is preserved.
921caade7ccSmrg
922485f0483Smrg# serial 2
923485f0483Smrg
924caade7ccSmrg# _AM_SUBST_NOTMAKE(VARIABLE)
925caade7ccSmrg# ---------------------------
926485f0483Smrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
927caade7ccSmrg# This macro is traced by Automake.
928caade7ccSmrgAC_DEFUN([_AM_SUBST_NOTMAKE])
929caade7ccSmrg
930485f0483Smrg# AM_SUBST_NOTMAKE(VARIABLE)
931485f0483Smrg# ---------------------------
932485f0483Smrg# Public sister of _AM_SUBST_NOTMAKE.
933485f0483SmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
934485f0483Smrg
935caade7ccSmrg# Check how to create a tarball.                            -*- Autoconf -*-
936caade7ccSmrg
937caade7ccSmrg# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
938caade7ccSmrg#
939caade7ccSmrg# This file is free software; the Free Software Foundation
940caade7ccSmrg# gives unlimited permission to copy and/or distribute it,
941caade7ccSmrg# with or without modifications, as long as this notice is preserved.
942caade7ccSmrg
943caade7ccSmrg# serial 2
944caade7ccSmrg
945caade7ccSmrg# _AM_PROG_TAR(FORMAT)
946caade7ccSmrg# --------------------
947caade7ccSmrg# Check how to create a tarball in format FORMAT.
948caade7ccSmrg# FORMAT should be one of `v7', `ustar', or `pax'.
949caade7ccSmrg#
950caade7ccSmrg# Substitute a variable $(am__tar) that is a command
951caade7ccSmrg# writing to stdout a FORMAT-tarball containing the directory
952caade7ccSmrg# $tardir.
953caade7ccSmrg#     tardir=directory && $(am__tar) > result.tar
954caade7ccSmrg#
955caade7ccSmrg# Substitute a variable $(am__untar) that extract such
956caade7ccSmrg# a tarball read from stdin.
957caade7ccSmrg#     $(am__untar) < result.tar
958caade7ccSmrgAC_DEFUN([_AM_PROG_TAR],
959caade7ccSmrg[# Always define AMTAR for backward compatibility.
960caade7ccSmrgAM_MISSING_PROG([AMTAR], [tar])
961caade7ccSmrgm4_if([$1], [v7],
962caade7ccSmrg     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
963caade7ccSmrg     [m4_case([$1], [ustar],, [pax],,
964caade7ccSmrg              [m4_fatal([Unknown tar format])])
965caade7ccSmrgAC_MSG_CHECKING([how to create a $1 tar archive])
966caade7ccSmrg# Loop over all known methods to create a tar archive until one works.
967caade7ccSmrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
968caade7ccSmrg_am_tools=${am_cv_prog_tar_$1-$_am_tools}
969caade7ccSmrg# Do not fold the above two line into one, because Tru64 sh and
970caade7ccSmrg# Solaris sh will not grok spaces in the rhs of `-'.
971caade7ccSmrgfor _am_tool in $_am_tools
972caade7ccSmrgdo
973caade7ccSmrg  case $_am_tool in
974caade7ccSmrg  gnutar)
975caade7ccSmrg    for _am_tar in tar gnutar gtar;
976caade7ccSmrg    do
977caade7ccSmrg      AM_RUN_LOG([$_am_tar --version]) && break
978caade7ccSmrg    done
979caade7ccSmrg    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
980caade7ccSmrg    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
981caade7ccSmrg    am__untar="$_am_tar -xf -"
982caade7ccSmrg    ;;
983caade7ccSmrg  plaintar)
984caade7ccSmrg    # Must skip GNU tar: if it does not support --format= it doesn't create
985caade7ccSmrg    # ustar tarball either.
986caade7ccSmrg    (tar --version) >/dev/null 2>&1 && continue
987caade7ccSmrg    am__tar='tar chf - "$$tardir"'
988caade7ccSmrg    am__tar_='tar chf - "$tardir"'
989caade7ccSmrg    am__untar='tar xf -'
990caade7ccSmrg    ;;
991caade7ccSmrg  pax)
992caade7ccSmrg    am__tar='pax -L -x $1 -w "$$tardir"'
993caade7ccSmrg    am__tar_='pax -L -x $1 -w "$tardir"'
994caade7ccSmrg    am__untar='pax -r'
995caade7ccSmrg    ;;
996caade7ccSmrg  cpio)
997caade7ccSmrg    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
998caade7ccSmrg    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
999caade7ccSmrg    am__untar='cpio -i -H $1 -d'
1000caade7ccSmrg    ;;
1001caade7ccSmrg  none)
1002caade7ccSmrg    am__tar=false
1003caade7ccSmrg    am__tar_=false
1004caade7ccSmrg    am__untar=false
1005caade7ccSmrg    ;;
1006caade7ccSmrg  esac
1007caade7ccSmrg
1008caade7ccSmrg  # If the value was cached, stop now.  We just wanted to have am__tar
1009caade7ccSmrg  # and am__untar set.
1010caade7ccSmrg  test -n "${am_cv_prog_tar_$1}" && break
1011caade7ccSmrg
1012caade7ccSmrg  # tar/untar a dummy directory, and stop if the command works
1013caade7ccSmrg  rm -rf conftest.dir
1014caade7ccSmrg  mkdir conftest.dir
1015caade7ccSmrg  echo GrepMe > conftest.dir/file
1016caade7ccSmrg  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
1017caade7ccSmrg  rm -rf conftest.dir
1018caade7ccSmrg  if test -s conftest.tar; then
1019caade7ccSmrg    AM_RUN_LOG([$am__untar <conftest.tar])
1020caade7ccSmrg    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
1021caade7ccSmrg  fi
1022caade7ccSmrgdone
1023caade7ccSmrgrm -rf conftest.dir
1024caade7ccSmrg
1025caade7ccSmrgAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
1026caade7ccSmrgAC_MSG_RESULT([$am_cv_prog_tar_$1])])
1027caade7ccSmrgAC_SUBST([am__tar])
1028caade7ccSmrgAC_SUBST([am__untar])
1029caade7ccSmrg]) # _AM_PROG_TAR
1030caade7ccSmrg
1031485f0483Smrgdnl xorg-macros.m4.  Generated from xorg-macros.m4.in xorgversion.m4 by configure.
1032caade7ccSmrgdnl
1033e8a5466aSmrgdnl Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
1034caade7ccSmrgdnl 
1035caade7ccSmrgdnl Permission is hereby granted, free of charge, to any person obtaining a
1036b9b4fd27Smrgdnl copy of this software and associated documentation files (the "Software"),
1037b9b4fd27Smrgdnl to deal in the Software without restriction, including without limitation
1038b9b4fd27Smrgdnl the rights to use, copy, modify, merge, publish, distribute, sublicense,
1039b9b4fd27Smrgdnl and/or sell copies of the Software, and to permit persons to whom the
1040b9b4fd27Smrgdnl Software is furnished to do so, subject to the following conditions:
1041caade7ccSmrgdnl
1042b9b4fd27Smrgdnl The above copyright notice and this permission notice (including the next
1043b9b4fd27Smrgdnl paragraph) shall be included in all copies or substantial portions of the
1044b9b4fd27Smrgdnl Software.
1045caade7ccSmrgdnl
1046b9b4fd27Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1047b9b4fd27Smrgdnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1048b9b4fd27Smrgdnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
1049b9b4fd27Smrgdnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1050b9b4fd27Smrgdnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
1051b9b4fd27Smrgdnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
1052b9b4fd27Smrgdnl DEALINGS IN THE SOFTWARE.
1053caade7ccSmrg
1054caade7ccSmrg# XORG_MACROS_VERSION(required-version)
1055caade7ccSmrg# -------------------------------------
1056caade7ccSmrg# Minimum version: 1.1.0
1057caade7ccSmrg#
1058caade7ccSmrg# If you're using a macro added in Version 1.1 or newer, include this in
1059caade7ccSmrg# your configure.ac with the minimum required version, such as:
1060caade7ccSmrg# XORG_MACROS_VERSION(1.1)
1061caade7ccSmrg#
1062485f0483Smrg# To ensure that this macro is defined, also add:
1063485f0483Smrg# m4_ifndef([XORG_MACROS_VERSION],
1064485f0483Smrg#     [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])])
1065caade7ccSmrg#
1066caade7ccSmrg#
1067caade7ccSmrg# See the "minimum version" comment for each macro you use to see what 
1068caade7ccSmrg# version you require.
1069485f0483Smrgm4_defun([XORG_MACROS_VERSION],[
1070e8a5466aSmrgm4_define([vers_have], [1.10.1])
1071485f0483Smrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.])))
1072485f0483Smrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.])))
1073485f0483Smrgm4_if(m4_cmp(maj_have, maj_needed), 0,,
1074485f0483Smrg    [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])])
1075485f0483Smrgm4_if(m4_version_compare(vers_have, [$1]), -1,
1076485f0483Smrg    [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])])
1077485f0483Smrgm4_undefine([vers_have])
1078485f0483Smrgm4_undefine([maj_have])
1079485f0483Smrgm4_undefine([maj_needed])
1080caade7ccSmrg]) # XORG_MACROS_VERSION
1081caade7ccSmrg
1082caade7ccSmrg# XORG_PROG_RAWCPP()
1083caade7ccSmrg# ------------------
1084caade7ccSmrg# Minimum version: 1.0.0
1085caade7ccSmrg#
1086caade7ccSmrg# Find cpp program and necessary flags for use in pre-processing text files
1087caade7ccSmrg# such as man pages and config files
1088caade7ccSmrgAC_DEFUN([XORG_PROG_RAWCPP],[
1089caade7ccSmrgAC_REQUIRE([AC_PROG_CPP])
1090caade7ccSmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 
1091caade7ccSmrg   [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib])
1092caade7ccSmrg
1093caade7ccSmrg# Check for flag to avoid builtin definitions - assumes unix is predefined,
1094caade7ccSmrg# which is not the best choice for supporting other OS'es, but covers most
1095caade7ccSmrg# of the ones we need for now.
1096caade7ccSmrgAC_MSG_CHECKING([if $RAWCPP requires -undef])
1097caade7ccSmrgAC_LANG_CONFTEST([Does cpp redefine unix ?])
1098caade7ccSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
1099caade7ccSmrg	AC_MSG_RESULT([no])
1100caade7ccSmrgelse
1101caade7ccSmrg	if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
1102caade7ccSmrg		RAWCPPFLAGS=-undef
1103caade7ccSmrg		AC_MSG_RESULT([yes])
1104485f0483Smrg	# under Cygwin unix is still defined even with -undef
1105485f0483Smrg	elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
1106485f0483Smrg		RAWCPPFLAGS="-undef -ansi"
1107485f0483Smrg		AC_MSG_RESULT([yes, with -ansi])
1108caade7ccSmrg	else
1109caade7ccSmrg		AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef.  I don't know what to do.])
1110caade7ccSmrg	fi
1111caade7ccSmrgfi
1112caade7ccSmrgrm -f conftest.$ac_ext
1113caade7ccSmrg
1114caade7ccSmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional])
1115caade7ccSmrgAC_LANG_CONFTEST([Does cpp preserve   "whitespace"?])
1116caade7ccSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
1117caade7ccSmrg	AC_MSG_RESULT([no])
1118caade7ccSmrgelse
1119caade7ccSmrg	if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
1120caade7ccSmrg		RAWCPPFLAGS="${RAWCPPFLAGS} -traditional"
1121caade7ccSmrg		AC_MSG_RESULT([yes])
1122caade7ccSmrg	else
1123caade7ccSmrg		AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional.  I don't know what to do.])
1124caade7ccSmrg	fi
1125caade7ccSmrgfi
1126caade7ccSmrgrm -f conftest.$ac_ext
1127caade7ccSmrgAC_SUBST(RAWCPPFLAGS)
1128caade7ccSmrg]) # XORG_PROG_RAWCPP
1129caade7ccSmrg
1130caade7ccSmrg# XORG_MANPAGE_SECTIONS()
1131caade7ccSmrg# -----------------------
1132caade7ccSmrg# Minimum version: 1.0.0
1133caade7ccSmrg#
1134caade7ccSmrg# Determine which sections man pages go in for the different man page types
1135caade7ccSmrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files.
1136caade7ccSmrg# Not sure if there's any better way than just hardcoding by OS name.
1137caade7ccSmrg# Override default settings by setting environment variables
1138b9b4fd27Smrg# Added MAN_SUBSTS in version 1.8
1139e8a5466aSmrg# Added AC_PROG_SED in version 1.8
1140caade7ccSmrg
1141caade7ccSmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[
1142caade7ccSmrgAC_REQUIRE([AC_CANONICAL_HOST])
1143e8a5466aSmrgAC_REQUIRE([AC_PROG_SED])
1144caade7ccSmrg
1145caade7ccSmrgif test x$APP_MAN_SUFFIX = x    ; then
1146caade7ccSmrg    APP_MAN_SUFFIX=1
1147caade7ccSmrgfi
1148caade7ccSmrgif test x$APP_MAN_DIR = x    ; then
1149caade7ccSmrg    APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)'
1150caade7ccSmrgfi
1151caade7ccSmrg
1152caade7ccSmrgif test x$LIB_MAN_SUFFIX = x    ; then
1153caade7ccSmrg    LIB_MAN_SUFFIX=3
1154caade7ccSmrgfi
1155caade7ccSmrgif test x$LIB_MAN_DIR = x    ; then
1156caade7ccSmrg    LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)'
1157caade7ccSmrgfi
1158caade7ccSmrg
1159caade7ccSmrgif test x$FILE_MAN_SUFFIX = x    ; then
1160caade7ccSmrg    case $host_os in
1161caade7ccSmrg	solaris*)	FILE_MAN_SUFFIX=4  ;;
1162caade7ccSmrg	*)		FILE_MAN_SUFFIX=5  ;;
1163caade7ccSmrg    esac
1164caade7ccSmrgfi
1165caade7ccSmrgif test x$FILE_MAN_DIR = x    ; then
1166caade7ccSmrg    FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)'
1167caade7ccSmrgfi
1168caade7ccSmrg
1169caade7ccSmrgif test x$MISC_MAN_SUFFIX = x    ; then
1170caade7ccSmrg    case $host_os in
1171caade7ccSmrg	solaris*)	MISC_MAN_SUFFIX=5  ;;
1172caade7ccSmrg	*)		MISC_MAN_SUFFIX=7  ;;
1173caade7ccSmrg    esac
1174caade7ccSmrgfi
1175caade7ccSmrgif test x$MISC_MAN_DIR = x    ; then
1176caade7ccSmrg    MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)'
1177caade7ccSmrgfi
1178caade7ccSmrg
1179caade7ccSmrgif test x$DRIVER_MAN_SUFFIX = x    ; then
1180caade7ccSmrg    case $host_os in
1181caade7ccSmrg	solaris*)	DRIVER_MAN_SUFFIX=7  ;;
1182caade7ccSmrg	*)		DRIVER_MAN_SUFFIX=4  ;;
1183caade7ccSmrg    esac
1184caade7ccSmrgfi
1185caade7ccSmrgif test x$DRIVER_MAN_DIR = x    ; then
1186caade7ccSmrg    DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)'
1187caade7ccSmrgfi
1188caade7ccSmrg
1189caade7ccSmrgif test x$ADMIN_MAN_SUFFIX = x    ; then
1190caade7ccSmrg    case $host_os in
1191caade7ccSmrg	solaris*)	ADMIN_MAN_SUFFIX=1m ;;
1192caade7ccSmrg	*)		ADMIN_MAN_SUFFIX=8  ;;
1193caade7ccSmrg    esac
1194caade7ccSmrgfi
1195caade7ccSmrgif test x$ADMIN_MAN_DIR = x    ; then
1196caade7ccSmrg    ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)'
1197caade7ccSmrgfi
1198caade7ccSmrg
1199caade7ccSmrg
1200caade7ccSmrgAC_SUBST([APP_MAN_SUFFIX])
1201caade7ccSmrgAC_SUBST([LIB_MAN_SUFFIX])
1202caade7ccSmrgAC_SUBST([FILE_MAN_SUFFIX])
1203caade7ccSmrgAC_SUBST([MISC_MAN_SUFFIX])
1204caade7ccSmrgAC_SUBST([DRIVER_MAN_SUFFIX])
1205caade7ccSmrgAC_SUBST([ADMIN_MAN_SUFFIX])
1206caade7ccSmrgAC_SUBST([APP_MAN_DIR])
1207caade7ccSmrgAC_SUBST([LIB_MAN_DIR])
1208caade7ccSmrgAC_SUBST([FILE_MAN_DIR])
1209caade7ccSmrgAC_SUBST([MISC_MAN_DIR])
1210caade7ccSmrgAC_SUBST([DRIVER_MAN_DIR])
1211caade7ccSmrgAC_SUBST([ADMIN_MAN_DIR])
1212b9b4fd27Smrg
1213b9b4fd27SmrgXORG_MAN_PAGE="X Version 11"
1214b9b4fd27SmrgAC_SUBST([XORG_MAN_PAGE])
1215b9b4fd27SmrgMAN_SUBSTS="\
1216b9b4fd27Smrg	-e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \
1217b9b4fd27Smrg	-e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \
1218b9b4fd27Smrg	-e 's|__xservername__|Xorg|g' \
1219b9b4fd27Smrg	-e 's|__xconfigfile__|xorg.conf|g' \
1220b9b4fd27Smrg	-e 's|__projectroot__|\$(prefix)|g' \
1221e8a5466aSmrg	-e 's|__apploaddir__|\$(appdefaultdir)|g' \
1222b9b4fd27Smrg	-e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \
1223b9b4fd27Smrg	-e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \
1224b9b4fd27Smrg	-e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \
1225b9b4fd27Smrg	-e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \
1226b9b4fd27Smrg	-e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \
1227b9b4fd27Smrg	-e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'"
1228b9b4fd27SmrgAC_SUBST([MAN_SUBSTS])
1229b9b4fd27Smrg
1230caade7ccSmrg]) # XORG_MANPAGE_SECTIONS
1231caade7ccSmrg
1232b9b4fd27Smrg# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION])
1233b9b4fd27Smrg# ------------------------
1234b9b4fd27Smrg# Minimum version: 1.7.0
1235b9b4fd27Smrg#
1236b9b4fd27Smrg# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent
1237b9b4fd27Smrg# provided by xorg-sgml-doctools, if installed.
1238b9b4fd27SmrgAC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[
1239b9b4fd27SmrgAC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])])
1240b9b4fd27SmrgXORG_SGML_PATH=
1241b9b4fd27SmrgPKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])],
1242b9b4fd27Smrg    [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`],
1243b9b4fd27Smrg    [m4_ifval([$1],[:],
1244b9b4fd27Smrg        [if test x"$cross_compiling" != x"yes" ; then
1245b9b4fd27Smrg            AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent],
1246b9b4fd27Smrg                          [XORG_SGML_PATH=$prefix/share/sgml])
1247b9b4fd27Smrg         fi])
1248b9b4fd27Smrg    ])
1249b9b4fd27Smrg
1250e8a5466aSmrg# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing
1251e8a5466aSmrg# the path and the name of the doc stylesheet
1252b9b4fd27Smrgif test "x$XORG_SGML_PATH" != "x" ; then
1253b9b4fd27Smrg   AC_MSG_RESULT([$XORG_SGML_PATH])
1254e8a5466aSmrg   STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11
1255e8a5466aSmrg   XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl
1256b9b4fd27Smrgelse
1257b9b4fd27Smrg   AC_MSG_RESULT([no])
1258b9b4fd27Smrgfi
1259b9b4fd27Smrg
1260b9b4fd27SmrgAC_SUBST(XORG_SGML_PATH)
1261e8a5466aSmrgAC_SUBST(STYLESHEET_SRCDIR)
1262e8a5466aSmrgAC_SUBST(XSL_STYLESHEET)
1263e8a5466aSmrgAM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"])
1264b9b4fd27Smrg]) # XORG_CHECK_SGML_DOCTOOLS
1265b9b4fd27Smrg
1266caade7ccSmrg# XORG_CHECK_LINUXDOC
1267caade7ccSmrg# -------------------
1268caade7ccSmrg# Minimum version: 1.0.0
1269caade7ccSmrg#
1270caade7ccSmrg# Defines the variable MAKE_TEXT if the necessary tools and
1271caade7ccSmrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt.
1272caade7ccSmrg# Whether or not the necessary tools and files are found can be checked
1273caade7ccSmrg# with the AM_CONDITIONAL "BUILD_LINUXDOC"
1274caade7ccSmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[
1275b9b4fd27SmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS])
1276b9b4fd27SmrgAC_REQUIRE([XORG_WITH_PS2PDF])
1277caade7ccSmrg
1278caade7ccSmrgAC_PATH_PROG(LINUXDOC, linuxdoc)
1279caade7ccSmrg
1280b9b4fd27SmrgAC_MSG_CHECKING([whether to build documentation])
1281caade7ccSmrg
1282b9b4fd27Smrgif test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then
1283caade7ccSmrg   BUILDDOC=yes
1284caade7ccSmrgelse
1285caade7ccSmrg   BUILDDOC=no
1286caade7ccSmrgfi
1287caade7ccSmrg
1288caade7ccSmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes])
1289caade7ccSmrg
1290caade7ccSmrgAC_MSG_RESULT([$BUILDDOC])
1291caade7ccSmrg
1292b9b4fd27SmrgAC_MSG_CHECKING([whether to build pdf documentation])
1293caade7ccSmrg
1294b9b4fd27Smrgif test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then
1295caade7ccSmrg   BUILDPDFDOC=yes
1296caade7ccSmrgelse
1297caade7ccSmrg   BUILDPDFDOC=no
1298caade7ccSmrgfi
1299caade7ccSmrg
1300caade7ccSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
1301caade7ccSmrg
1302caade7ccSmrgAC_MSG_RESULT([$BUILDPDFDOC])
1303caade7ccSmrg
1304b9b4fd27SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f"
1305caade7ccSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps"
1306caade7ccSmrgMAKE_PDF="$PS2PDF"
1307caade7ccSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC  -B html --split=0"
1308caade7ccSmrg
1309caade7ccSmrgAC_SUBST(MAKE_TEXT)
1310caade7ccSmrgAC_SUBST(MAKE_PS)
1311caade7ccSmrgAC_SUBST(MAKE_PDF)
1312caade7ccSmrgAC_SUBST(MAKE_HTML)
1313caade7ccSmrg]) # XORG_CHECK_LINUXDOC
1314caade7ccSmrg
1315caade7ccSmrg# XORG_CHECK_DOCBOOK
1316caade7ccSmrg# -------------------
1317caade7ccSmrg# Minimum version: 1.0.0
1318caade7ccSmrg#
1319caade7ccSmrg# Checks for the ability to build output formats from SGML DocBook source.
1320caade7ccSmrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC"
1321caade7ccSmrg# indicates whether the necessary tools and files are found and, if set,
1322caade7ccSmrg# $(MAKE_XXX) blah.sgml will produce blah.xxx.
1323caade7ccSmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[
1324b9b4fd27SmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS])
1325b9b4fd27Smrg
1326caade7ccSmrgBUILDTXTDOC=no
1327caade7ccSmrgBUILDPDFDOC=no
1328caade7ccSmrgBUILDPSDOC=no
1329caade7ccSmrgBUILDHTMLDOC=no
1330caade7ccSmrg
1331caade7ccSmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps)
1332caade7ccSmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf)
1333caade7ccSmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html)
1334caade7ccSmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt)
1335caade7ccSmrg
1336b9b4fd27SmrgAC_MSG_CHECKING([whether to build text documentation])
1337b9b4fd27Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x &&
1338caade7ccSmrg   test x$BUILD_TXTDOC != xno; then
1339caade7ccSmrg	BUILDTXTDOC=yes
1340caade7ccSmrgfi
1341caade7ccSmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes])
1342caade7ccSmrgAC_MSG_RESULT([$BUILDTXTDOC])
1343caade7ccSmrg
1344b9b4fd27SmrgAC_MSG_CHECKING([whether to build PDF documentation])
1345b9b4fd27Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x &&
1346caade7ccSmrg   test x$BUILD_PDFDOC != xno; then
1347caade7ccSmrg	BUILDPDFDOC=yes
1348caade7ccSmrgfi
1349caade7ccSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
1350caade7ccSmrgAC_MSG_RESULT([$BUILDPDFDOC])
1351caade7ccSmrg
1352b9b4fd27SmrgAC_MSG_CHECKING([whether to build PostScript documentation])
1353b9b4fd27Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x &&
1354caade7ccSmrg   test x$BUILD_PSDOC != xno; then
1355caade7ccSmrg	BUILDPSDOC=yes
1356caade7ccSmrgfi
1357caade7ccSmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes])
1358caade7ccSmrgAC_MSG_RESULT([$BUILDPSDOC])
1359caade7ccSmrg
1360b9b4fd27SmrgAC_MSG_CHECKING([whether to build HTML documentation])
1361b9b4fd27Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x &&
1362caade7ccSmrg   test x$BUILD_HTMLDOC != xno; then
1363caade7ccSmrg	BUILDHTMLDOC=yes
1364caade7ccSmrgfi
1365caade7ccSmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes])
1366caade7ccSmrgAC_MSG_RESULT([$BUILDHTMLDOC])
1367caade7ccSmrg
1368caade7ccSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT"
1369caade7ccSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS"
1370caade7ccSmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF"
1371caade7ccSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML"
1372caade7ccSmrg
1373caade7ccSmrgAC_SUBST(MAKE_TEXT)
1374caade7ccSmrgAC_SUBST(MAKE_PS)
1375caade7ccSmrgAC_SUBST(MAKE_PDF)
1376caade7ccSmrgAC_SUBST(MAKE_HTML)
1377caade7ccSmrg]) # XORG_CHECK_DOCBOOK
1378caade7ccSmrg
1379b9b4fd27Smrg# XORG_WITH_XMLTO([MIN-VERSION])
1380b9b4fd27Smrg# ----------------
1381b9b4fd27Smrg# Minimum version: 1.5.0
1382b9b4fd27Smrg#
1383b9b4fd27Smrg# Documentation tools are not always available on all platforms and sometimes
1384b9b4fd27Smrg# not at the appropriate level. This macro enables a module to test for the
1385b9b4fd27Smrg# presence of the tool and obtain it's path in separate variables. Coupled with
1386b9b4fd27Smrg# the --with-xmlto option, it allows maximum flexibilty in making decisions
1387b9b4fd27Smrg# as whether or not to use the xmlto package.
1388b9b4fd27Smrg#
1389b9b4fd27Smrg# Interface to module:
1390b9b4fd27Smrg# HAVE_XMLTO: 	used in makefiles to conditionally generate documentation
1391b9b4fd27Smrg# XMLTO:	returns the path of the xmlto program found
1392b9b4fd27Smrg#		returns the path set by the user in the environment
1393b9b4fd27Smrg# --with-xmlto:	'yes' user instructs the module to use xmlto
1394b9b4fd27Smrg#		'no' user instructs the module not to use xmlto
1395b9b4fd27Smrg#
1396e8a5466aSmrg# Added in version 1.10.0
1397e8a5466aSmrg# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation
1398e8a5466aSmrg#                  xmlto for text output requires either lynx, links, or w3m browsers
1399e8a5466aSmrg#
1400b9b4fd27Smrg# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path.
1401b9b4fd27Smrg#
1402b9b4fd27SmrgAC_DEFUN([XORG_WITH_XMLTO],[
1403b9b4fd27SmrgAC_ARG_VAR([XMLTO], [Path to xmlto command])
1404b9b4fd27SmrgAC_ARG_WITH(xmlto,
1405b9b4fd27Smrg	AS_HELP_STRING([--with-xmlto],
1406b9b4fd27Smrg	   [Use xmlto to regenerate documentation (default: yes, if installed)]),
1407b9b4fd27Smrg	   [use_xmlto=$withval], [use_xmlto=auto])
1408b9b4fd27Smrg
1409b9b4fd27Smrgif test "x$use_xmlto" = x"auto"; then
1410b9b4fd27Smrg   AC_PATH_PROG([XMLTO], [xmlto])
1411b9b4fd27Smrg   if test "x$XMLTO" = "x"; then
1412b9b4fd27Smrg        AC_MSG_WARN([xmlto not found - documentation targets will be skipped])
1413b9b4fd27Smrg	have_xmlto=no
1414b9b4fd27Smrg   else
1415b9b4fd27Smrg        have_xmlto=yes
1416b9b4fd27Smrg   fi
1417b9b4fd27Smrgelif test "x$use_xmlto" = x"yes" ; then
1418b9b4fd27Smrg   AC_PATH_PROG([XMLTO], [xmlto])
1419b9b4fd27Smrg   if test "x$XMLTO" = "x"; then
1420b9b4fd27Smrg        AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH])
1421b9b4fd27Smrg   fi
1422b9b4fd27Smrg   have_xmlto=yes
1423b9b4fd27Smrgelif test "x$use_xmlto" = x"no" ; then
1424b9b4fd27Smrg   if test "x$XMLTO" != "x"; then
1425b9b4fd27Smrg      AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified])
1426b9b4fd27Smrg   fi
1427b9b4fd27Smrg   have_xmlto=no
1428b9b4fd27Smrgelse
1429b9b4fd27Smrg   AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no'])
1430b9b4fd27Smrgfi
1431e8a5466aSmrg
1432e8a5466aSmrg# Test for a minimum version of xmlto, if provided.
1433b9b4fd27Smrgm4_ifval([$1],
1434b9b4fd27Smrg[if test "$have_xmlto" = yes; then
1435b9b4fd27Smrg    # scrape the xmlto version
1436b9b4fd27Smrg    AC_MSG_CHECKING([the xmlto version])
1437b9b4fd27Smrg    xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3`
1438b9b4fd27Smrg    AC_MSG_RESULT([$xmlto_version])
1439b9b4fd27Smrg    AS_VERSION_COMPARE([$xmlto_version], [$1],
1440b9b4fd27Smrg        [if test "x$use_xmlto" = xauto; then
1441b9b4fd27Smrg            AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed])
1442b9b4fd27Smrg            have_xmlto=no
1443b9b4fd27Smrg        else
1444b9b4fd27Smrg            AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed])
1445b9b4fd27Smrg        fi])
1446b9b4fd27Smrgfi])
1447e8a5466aSmrg
1448e8a5466aSmrg# Test for the ability of xmlto to generate a text target
1449e8a5466aSmrghave_xmlto_text=no
1450e8a5466aSmrgcat > conftest.xml << "EOF"
1451e8a5466aSmrgEOF
1452e8a5466aSmrgAS_IF([test "$have_xmlto" = yes],
1453e8a5466aSmrg      [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1],
1454e8a5466aSmrg             [have_xmlto_text=yes],
1455e8a5466aSmrg             [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])])
1456e8a5466aSmrgrm -f conftest.xml
1457e8a5466aSmrgAM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes])
1458b9b4fd27SmrgAM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes])
1459b9b4fd27Smrg]) # XORG_WITH_XMLTO
1460b9b4fd27Smrg
1461b9b4fd27Smrg# XORG_WITH_ASCIIDOC([MIN-VERSION])
1462b9b4fd27Smrg# ----------------
1463b9b4fd27Smrg# Minimum version: 1.5.0
1464b9b4fd27Smrg#
1465b9b4fd27Smrg# Documentation tools are not always available on all platforms and sometimes
1466b9b4fd27Smrg# not at the appropriate level. This macro enables a module to test for the
1467b9b4fd27Smrg# presence of the tool and obtain it's path in separate variables. Coupled with
1468b9b4fd27Smrg# the --with-asciidoc option, it allows maximum flexibilty in making decisions
1469b9b4fd27Smrg# as whether or not to use the asciidoc package.
1470b9b4fd27Smrg#
1471b9b4fd27Smrg# Interface to module:
1472b9b4fd27Smrg# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation
1473b9b4fd27Smrg# ASCIIDOC:	 returns the path of the asciidoc program found
1474b9b4fd27Smrg#		 returns the path set by the user in the environment
1475b9b4fd27Smrg# --with-asciidoc: 'yes' user instructs the module to use asciidoc
1476b9b4fd27Smrg#		  'no' user instructs the module not to use asciidoc
1477b9b4fd27Smrg#
1478b9b4fd27Smrg# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path.
1479b9b4fd27Smrg#
1480b9b4fd27SmrgAC_DEFUN([XORG_WITH_ASCIIDOC],[
1481b9b4fd27SmrgAC_ARG_VAR([ASCIIDOC], [Path to asciidoc command])
1482b9b4fd27SmrgAC_ARG_WITH(asciidoc,
1483b9b4fd27Smrg	AS_HELP_STRING([--with-asciidoc],
1484b9b4fd27Smrg	   [Use asciidoc to regenerate documentation (default: yes, if installed)]),
1485b9b4fd27Smrg	   [use_asciidoc=$withval], [use_asciidoc=auto])
1486b9b4fd27Smrg
1487b9b4fd27Smrgif test "x$use_asciidoc" = x"auto"; then
1488b9b4fd27Smrg   AC_PATH_PROG([ASCIIDOC], [asciidoc])
1489b9b4fd27Smrg   if test "x$ASCIIDOC" = "x"; then
1490b9b4fd27Smrg        AC_MSG_WARN([asciidoc not found - documentation targets will be skipped])
1491b9b4fd27Smrg	have_asciidoc=no
1492b9b4fd27Smrg   else
1493b9b4fd27Smrg        have_asciidoc=yes
1494b9b4fd27Smrg   fi
1495b9b4fd27Smrgelif test "x$use_asciidoc" = x"yes" ; then
1496b9b4fd27Smrg   AC_PATH_PROG([ASCIIDOC], [asciidoc])
1497b9b4fd27Smrg   if test "x$ASCIIDOC" = "x"; then
1498b9b4fd27Smrg        AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH])
1499b9b4fd27Smrg   fi
1500b9b4fd27Smrg   have_asciidoc=yes
1501b9b4fd27Smrgelif test "x$use_asciidoc" = x"no" ; then
1502b9b4fd27Smrg   if test "x$ASCIIDOC" != "x"; then
1503b9b4fd27Smrg      AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified])
1504b9b4fd27Smrg   fi
1505b9b4fd27Smrg   have_asciidoc=no
1506b9b4fd27Smrgelse
1507b9b4fd27Smrg   AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no'])
1508b9b4fd27Smrgfi
1509b9b4fd27Smrgm4_ifval([$1],
1510b9b4fd27Smrg[if test "$have_asciidoc" = yes; then
1511b9b4fd27Smrg    # scrape the asciidoc version
1512b9b4fd27Smrg    AC_MSG_CHECKING([the asciidoc version])
1513b9b4fd27Smrg    asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2`
1514b9b4fd27Smrg    AC_MSG_RESULT([$asciidoc_version])
1515b9b4fd27Smrg    AS_VERSION_COMPARE([$asciidoc_version], [$1],
1516b9b4fd27Smrg        [if test "x$use_asciidoc" = xauto; then
1517b9b4fd27Smrg            AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed])
1518b9b4fd27Smrg            have_asciidoc=no
1519b9b4fd27Smrg        else
1520b9b4fd27Smrg            AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed])
1521b9b4fd27Smrg        fi])
1522b9b4fd27Smrgfi])
1523b9b4fd27SmrgAM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes])
1524b9b4fd27Smrg]) # XORG_WITH_ASCIIDOC
1525b9b4fd27Smrg
1526b9b4fd27Smrg# XORG_WITH_DOXYGEN([MIN-VERSION])
1527b9b4fd27Smrg# --------------------------------
1528b9b4fd27Smrg# Minimum version: 1.5.0
1529b9b4fd27Smrg#
1530b9b4fd27Smrg# Documentation tools are not always available on all platforms and sometimes
1531b9b4fd27Smrg# not at the appropriate level. This macro enables a module to test for the
1532b9b4fd27Smrg# presence of the tool and obtain it's path in separate variables. Coupled with
1533b9b4fd27Smrg# the --with-doxygen option, it allows maximum flexibilty in making decisions
1534b9b4fd27Smrg# as whether or not to use the doxygen package.
1535b9b4fd27Smrg#
1536b9b4fd27Smrg# Interface to module:
1537b9b4fd27Smrg# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation
1538b9b4fd27Smrg# DOXYGEN:	 returns the path of the doxygen program found
1539b9b4fd27Smrg#		 returns the path set by the user in the environment
1540b9b4fd27Smrg# --with-doxygen: 'yes' user instructs the module to use doxygen
1541b9b4fd27Smrg#		  'no' user instructs the module not to use doxygen
1542b9b4fd27Smrg#
1543b9b4fd27Smrg# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path.
1544b9b4fd27Smrg#
1545b9b4fd27SmrgAC_DEFUN([XORG_WITH_DOXYGEN],[
1546b9b4fd27SmrgAC_ARG_VAR([DOXYGEN], [Path to doxygen command])
1547b9b4fd27SmrgAC_ARG_WITH(doxygen,
1548b9b4fd27Smrg	AS_HELP_STRING([--with-doxygen],
1549b9b4fd27Smrg	   [Use doxygen to regenerate documentation (default: yes, if installed)]),
1550b9b4fd27Smrg	   [use_doxygen=$withval], [use_doxygen=auto])
1551b9b4fd27Smrg
1552b9b4fd27Smrgif test "x$use_doxygen" = x"auto"; then
1553b9b4fd27Smrg   AC_PATH_PROG([DOXYGEN], [doxygen])
1554b9b4fd27Smrg   if test "x$DOXYGEN" = "x"; then
1555b9b4fd27Smrg        AC_MSG_WARN([doxygen not found - documentation targets will be skipped])
1556b9b4fd27Smrg	have_doxygen=no
1557b9b4fd27Smrg   else
1558b9b4fd27Smrg        have_doxygen=yes
1559b9b4fd27Smrg   fi
1560b9b4fd27Smrgelif test "x$use_doxygen" = x"yes" ; then
1561b9b4fd27Smrg   AC_PATH_PROG([DOXYGEN], [doxygen])
1562b9b4fd27Smrg   if test "x$DOXYGEN" = "x"; then
1563b9b4fd27Smrg        AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH])
1564b9b4fd27Smrg   fi
1565b9b4fd27Smrg   have_doxygen=yes
1566b9b4fd27Smrgelif test "x$use_doxygen" = x"no" ; then
1567b9b4fd27Smrg   if test "x$DOXYGEN" != "x"; then
1568b9b4fd27Smrg      AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified])
1569b9b4fd27Smrg   fi
1570b9b4fd27Smrg   have_doxygen=no
1571b9b4fd27Smrgelse
1572b9b4fd27Smrg   AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no'])
1573b9b4fd27Smrgfi
1574b9b4fd27Smrgm4_ifval([$1],
1575b9b4fd27Smrg[if test "$have_doxygen" = yes; then
1576b9b4fd27Smrg    # scrape the doxygen version
1577b9b4fd27Smrg    AC_MSG_CHECKING([the doxygen version])
1578b9b4fd27Smrg    doxygen_version=`$DOXYGEN --version 2>/dev/null`
1579b9b4fd27Smrg    AC_MSG_RESULT([$doxygen_version])
1580b9b4fd27Smrg    AS_VERSION_COMPARE([$doxygen_version], [$1],
1581b9b4fd27Smrg        [if test "x$use_doxygen" = xauto; then
1582b9b4fd27Smrg            AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed])
1583b9b4fd27Smrg            have_doxygen=no
1584b9b4fd27Smrg        else
1585b9b4fd27Smrg            AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed])
1586b9b4fd27Smrg        fi])
1587b9b4fd27Smrgfi])
1588b9b4fd27SmrgAM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes])
1589b9b4fd27Smrg]) # XORG_WITH_DOXYGEN
1590b9b4fd27Smrg
1591b9b4fd27Smrg# XORG_WITH_GROFF
1592b9b4fd27Smrg# ----------------
1593b9b4fd27Smrg# Minimum version: 1.6.0
1594b9b4fd27Smrg#
1595b9b4fd27Smrg# Documentation tools are not always available on all platforms and sometimes
1596b9b4fd27Smrg# not at the appropriate level. This macro enables a module to test for the
1597b9b4fd27Smrg# presence of the tool and obtain it's path in separate variables. Coupled with
1598b9b4fd27Smrg# the --with-groff option, it allows maximum flexibilty in making decisions
1599b9b4fd27Smrg# as whether or not to use the groff package.
1600b9b4fd27Smrg#
1601b9b4fd27Smrg# Interface to module:
1602b9b4fd27Smrg# HAVE_GROFF:	 used in makefiles to conditionally generate documentation
1603b9b4fd27Smrg# HAVE_GROFF_MM: the memorandum macros (-mm) package
1604b9b4fd27Smrg# HAVE_GROFF_MS: the -ms macros package
1605b9b4fd27Smrg# GROFF:	 returns the path of the groff program found
1606b9b4fd27Smrg#		 returns the path set by the user in the environment
1607b9b4fd27Smrg# --with-groff:	 'yes' user instructs the module to use groff
1608b9b4fd27Smrg#		 'no' user instructs the module not to use groff
1609b9b4fd27Smrg#
1610e8a5466aSmrg# Added in version 1.9.0:
1611e8a5466aSmrg# HAVE_GROFF_HTML: groff has dependencies to output HTML format:
1612e8a5466aSmrg#		   pnmcut pnmcrop pnmtopng pnmtops from the netpbm package.
1613e8a5466aSmrg#		   psselect from the psutils package.
1614e8a5466aSmrg#		   the ghostcript package. Refer to the grohtml man pages
1615e8a5466aSmrg#
1616b9b4fd27Smrg# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path.
1617b9b4fd27Smrg#
1618b9b4fd27Smrg# OS and distros often splits groff in a basic and full package, the former
1619b9b4fd27Smrg# having the groff program and the later having devices, fonts and macros
1620b9b4fd27Smrg# Checking for the groff executable is not enough.
1621b9b4fd27Smrg#
1622b9b4fd27Smrg# If macros are missing, we cannot assume that groff is useless, so we don't
1623b9b4fd27Smrg# unset HAVE_GROFF or GROFF env variables.
1624b9b4fd27Smrg# HAVE_GROFF_?? can never be true while HAVE_GROFF is false.
1625b9b4fd27Smrg#
1626b9b4fd27SmrgAC_DEFUN([XORG_WITH_GROFF],[
1627b9b4fd27SmrgAC_ARG_VAR([GROFF], [Path to groff command])
1628b9b4fd27SmrgAC_ARG_WITH(groff,
1629b9b4fd27Smrg	AS_HELP_STRING([--with-groff],
1630b9b4fd27Smrg	   [Use groff to regenerate documentation (default: yes, if installed)]),
1631b9b4fd27Smrg	   [use_groff=$withval], [use_groff=auto])
1632b9b4fd27Smrg
1633b9b4fd27Smrgif test "x$use_groff" = x"auto"; then
1634b9b4fd27Smrg   AC_PATH_PROG([GROFF], [groff])
1635b9b4fd27Smrg   if test "x$GROFF" = "x"; then
1636b9b4fd27Smrg        AC_MSG_WARN([groff not found - documentation targets will be skipped])
1637b9b4fd27Smrg	have_groff=no
1638b9b4fd27Smrg   else
1639b9b4fd27Smrg        have_groff=yes
1640b9b4fd27Smrg   fi
1641b9b4fd27Smrgelif test "x$use_groff" = x"yes" ; then
1642b9b4fd27Smrg   AC_PATH_PROG([GROFF], [groff])
1643b9b4fd27Smrg   if test "x$GROFF" = "x"; then
1644b9b4fd27Smrg        AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH])
1645b9b4fd27Smrg   fi
1646b9b4fd27Smrg   have_groff=yes
1647b9b4fd27Smrgelif test "x$use_groff" = x"no" ; then
1648b9b4fd27Smrg   if test "x$GROFF" != "x"; then
1649b9b4fd27Smrg      AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified])
1650b9b4fd27Smrg   fi
1651b9b4fd27Smrg   have_groff=no
1652b9b4fd27Smrgelse
1653b9b4fd27Smrg   AC_MSG_ERROR([--with-groff expects 'yes' or 'no'])
1654b9b4fd27Smrgfi
1655e8a5466aSmrg
1656b9b4fd27Smrg# We have groff, test for the presence of the macro packages
1657b9b4fd27Smrgif test "x$have_groff" = x"yes"; then
1658b9b4fd27Smrg    AC_MSG_CHECKING([for ${GROFF} -ms macros])
1659b9b4fd27Smrg    if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then
1660b9b4fd27Smrg        groff_ms_works=yes
1661b9b4fd27Smrg    else
1662b9b4fd27Smrg        groff_ms_works=no
1663b9b4fd27Smrg    fi
1664b9b4fd27Smrg    AC_MSG_RESULT([$groff_ms_works])
1665b9b4fd27Smrg    AC_MSG_CHECKING([for ${GROFF} -mm macros])
1666b9b4fd27Smrg    if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then
1667b9b4fd27Smrg        groff_mm_works=yes
1668b9b4fd27Smrg    else
1669b9b4fd27Smrg        groff_mm_works=no
1670b9b4fd27Smrg    fi
1671b9b4fd27Smrg    AC_MSG_RESULT([$groff_mm_works])
1672b9b4fd27Smrgfi
1673e8a5466aSmrg
1674e8a5466aSmrg# We have groff, test for HTML dependencies, one command per package
1675e8a5466aSmrgif test "x$have_groff" = x"yes"; then
1676e8a5466aSmrg   AC_PATH_PROGS(GS_PATH, [gs gswin32c])
1677e8a5466aSmrg   AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng])
1678e8a5466aSmrg   AC_PATH_PROG(PSSELECT_PATH, [psselect])
1679e8a5466aSmrg   if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then
1680e8a5466aSmrg      have_groff_html=yes
1681e8a5466aSmrg   else
1682e8a5466aSmrg      have_groff_html=no
1683e8a5466aSmrg      AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages])
1684e8a5466aSmrg   fi
1685e8a5466aSmrgfi
1686e8a5466aSmrg
1687e8a5466aSmrg# Set Automake conditionals for Makefiles
1688b9b4fd27SmrgAM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes])
1689b9b4fd27SmrgAM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes])
1690b9b4fd27SmrgAM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes])
1691e8a5466aSmrgAM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes])
1692b9b4fd27Smrg]) # XORG_WITH_GROFF
1693b9b4fd27Smrg
1694b9b4fd27Smrg# XORG_WITH_FOP
1695b9b4fd27Smrg# ----------------
1696b9b4fd27Smrg# Minimum version: 1.6.0
1697b9b4fd27Smrg#
1698b9b4fd27Smrg# Documentation tools are not always available on all platforms and sometimes
1699b9b4fd27Smrg# not at the appropriate level. This macro enables a module to test for the
1700b9b4fd27Smrg# presence of the tool and obtain it's path in separate variables. Coupled with
1701b9b4fd27Smrg# the --with-fop option, it allows maximum flexibilty in making decisions
1702b9b4fd27Smrg# as whether or not to use the fop package.
1703b9b4fd27Smrg#
1704b9b4fd27Smrg# Interface to module:
1705b9b4fd27Smrg# HAVE_FOP: 	used in makefiles to conditionally generate documentation
1706b9b4fd27Smrg# FOP:	 	returns the path of the fop program found
1707b9b4fd27Smrg#		returns the path set by the user in the environment
1708b9b4fd27Smrg# --with-fop: 	'yes' user instructs the module to use fop
1709b9b4fd27Smrg#		'no' user instructs the module not to use fop
1710b9b4fd27Smrg#
1711b9b4fd27Smrg# If the user sets the value of FOP, AC_PATH_PROG skips testing the path.
1712b9b4fd27Smrg#
1713b9b4fd27SmrgAC_DEFUN([XORG_WITH_FOP],[
1714b9b4fd27SmrgAC_ARG_VAR([FOP], [Path to fop command])
1715b9b4fd27SmrgAC_ARG_WITH(fop,
1716b9b4fd27Smrg	AS_HELP_STRING([--with-fop],
1717b9b4fd27Smrg	   [Use fop to regenerate documentation (default: yes, if installed)]),
1718b9b4fd27Smrg	   [use_fop=$withval], [use_fop=auto])
1719b9b4fd27Smrg
1720b9b4fd27Smrgif test "x$use_fop" = x"auto"; then
1721b9b4fd27Smrg   AC_PATH_PROG([FOP], [fop])
1722b9b4fd27Smrg   if test "x$FOP" = "x"; then
1723b9b4fd27Smrg        AC_MSG_WARN([fop not found - documentation targets will be skipped])
1724b9b4fd27Smrg	have_fop=no
1725b9b4fd27Smrg   else
1726b9b4fd27Smrg        have_fop=yes
1727b9b4fd27Smrg   fi
1728b9b4fd27Smrgelif test "x$use_fop" = x"yes" ; then
1729b9b4fd27Smrg   AC_PATH_PROG([FOP], [fop])
1730b9b4fd27Smrg   if test "x$FOP" = "x"; then
1731b9b4fd27Smrg        AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH])
1732b9b4fd27Smrg   fi
1733b9b4fd27Smrg   have_fop=yes
1734b9b4fd27Smrgelif test "x$use_fop" = x"no" ; then
1735b9b4fd27Smrg   if test "x$FOP" != "x"; then
1736b9b4fd27Smrg      AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified])
1737b9b4fd27Smrg   fi
1738b9b4fd27Smrg   have_fop=no
1739b9b4fd27Smrgelse
1740b9b4fd27Smrg   AC_MSG_ERROR([--with-fop expects 'yes' or 'no'])
1741b9b4fd27Smrgfi
1742b9b4fd27SmrgAM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes])
1743b9b4fd27Smrg]) # XORG_WITH_FOP
1744b9b4fd27Smrg
1745b9b4fd27Smrg# XORG_WITH_PS2PDF
1746b9b4fd27Smrg# ----------------
1747b9b4fd27Smrg# Minimum version: 1.6.0
1748b9b4fd27Smrg#
1749b9b4fd27Smrg# Documentation tools are not always available on all platforms and sometimes
1750b9b4fd27Smrg# not at the appropriate level. This macro enables a module to test for the
1751b9b4fd27Smrg# presence of the tool and obtain it's path in separate variables. Coupled with
1752b9b4fd27Smrg# the --with-ps2pdf option, it allows maximum flexibilty in making decisions
1753b9b4fd27Smrg# as whether or not to use the ps2pdf package.
1754b9b4fd27Smrg#
1755b9b4fd27Smrg# Interface to module:
1756b9b4fd27Smrg# HAVE_PS2PDF: 	used in makefiles to conditionally generate documentation
1757b9b4fd27Smrg# PS2PDF:	returns the path of the ps2pdf program found
1758b9b4fd27Smrg#		returns the path set by the user in the environment
1759b9b4fd27Smrg# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf
1760b9b4fd27Smrg#		 'no' user instructs the module not to use ps2pdf
1761b9b4fd27Smrg#
1762b9b4fd27Smrg# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path.
1763b9b4fd27Smrg#
1764b9b4fd27SmrgAC_DEFUN([XORG_WITH_PS2PDF],[
1765b9b4fd27SmrgAC_ARG_VAR([PS2PDF], [Path to ps2pdf command])
1766b9b4fd27SmrgAC_ARG_WITH(ps2pdf,
1767b9b4fd27Smrg	AS_HELP_STRING([--with-ps2pdf],
1768b9b4fd27Smrg	   [Use ps2pdf to regenerate documentation (default: yes, if installed)]),
1769b9b4fd27Smrg	   [use_ps2pdf=$withval], [use_ps2pdf=auto])
1770b9b4fd27Smrg
1771b9b4fd27Smrgif test "x$use_ps2pdf" = x"auto"; then
1772b9b4fd27Smrg   AC_PATH_PROG([PS2PDF], [ps2pdf])
1773b9b4fd27Smrg   if test "x$PS2PDF" = "x"; then
1774b9b4fd27Smrg        AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped])
1775b9b4fd27Smrg	have_ps2pdf=no
1776b9b4fd27Smrg   else
1777b9b4fd27Smrg        have_ps2pdf=yes
1778b9b4fd27Smrg   fi
1779b9b4fd27Smrgelif test "x$use_ps2pdf" = x"yes" ; then
1780b9b4fd27Smrg   AC_PATH_PROG([PS2PDF], [ps2pdf])
1781b9b4fd27Smrg   if test "x$PS2PDF" = "x"; then
1782b9b4fd27Smrg        AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH])
1783b9b4fd27Smrg   fi
1784b9b4fd27Smrg   have_ps2pdf=yes
1785b9b4fd27Smrgelif test "x$use_ps2pdf" = x"no" ; then
1786b9b4fd27Smrg   if test "x$PS2PDF" != "x"; then
1787b9b4fd27Smrg      AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified])
1788b9b4fd27Smrg   fi
1789b9b4fd27Smrg   have_ps2pdf=no
1790b9b4fd27Smrgelse
1791b9b4fd27Smrg   AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no'])
1792b9b4fd27Smrgfi
1793b9b4fd27SmrgAM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes])
1794b9b4fd27Smrg]) # XORG_WITH_PS2PDF
1795b9b4fd27Smrg
1796b9b4fd27Smrg# XORG_ENABLE_DOCS (enable_docs=yes)
1797b9b4fd27Smrg# ----------------
1798b9b4fd27Smrg# Minimum version: 1.6.0
1799b9b4fd27Smrg#
1800b9b4fd27Smrg# Documentation tools are not always available on all platforms and sometimes
1801b9b4fd27Smrg# not at the appropriate level. This macro enables a builder to skip all
1802b9b4fd27Smrg# documentation targets except traditional man pages.
1803b9b4fd27Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides
1804b9b4fd27Smrg# maximum flexibilty in controlling documentation building.
1805b9b4fd27Smrg# Refer to:
1806b9b4fd27Smrg# XORG_WITH_XMLTO         --with-xmlto
1807b9b4fd27Smrg# XORG_WITH_ASCIIDOC      --with-asciidoc
1808b9b4fd27Smrg# XORG_WITH_DOXYGEN       --with-doxygen
1809b9b4fd27Smrg# XORG_WITH_FOP           --with-fop
1810b9b4fd27Smrg# XORG_WITH_GROFF         --with-groff
1811b9b4fd27Smrg# XORG_WITH_PS2PDF        --with-ps2pdf
1812b9b4fd27Smrg#
1813b9b4fd27Smrg# Interface to module:
1814b9b4fd27Smrg# ENABLE_DOCS: 	  used in makefiles to conditionally generate documentation
1815b9b4fd27Smrg# --enable-docs: 'yes' user instructs the module to generate docs
1816b9b4fd27Smrg#		 'no' user instructs the module not to generate docs
1817b9b4fd27Smrg# parm1:	specify the default value, yes or no.
1818b9b4fd27Smrg#
1819b9b4fd27SmrgAC_DEFUN([XORG_ENABLE_DOCS],[
1820b9b4fd27Smrgdefault=$1
1821b9b4fd27Smrgif test "x$default" = x ; then
1822b9b4fd27Smrg  default="yes"
1823b9b4fd27Smrgfi
1824b9b4fd27SmrgAC_ARG_ENABLE(docs,
1825b9b4fd27Smrg	AS_HELP_STRING([--enable-docs],
1826b9b4fd27Smrg	   [Enable building the documentation (default: yes)]),
1827b9b4fd27Smrg	   [build_docs=$enableval], [build_docs=$default])
1828b9b4fd27SmrgAM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes])
1829b9b4fd27SmrgAC_MSG_CHECKING([whether to build documentation])
1830b9b4fd27SmrgAC_MSG_RESULT([$build_docs])
1831b9b4fd27Smrg]) # XORG_ENABLE_DOCS
1832b9b4fd27Smrg
1833b9b4fd27Smrg# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes)
1834b9b4fd27Smrg# ----------------
1835b9b4fd27Smrg# Minimum version: 1.6.0
1836b9b4fd27Smrg#
1837b9b4fd27Smrg# This macro enables a builder to skip all developer documentation.
1838b9b4fd27Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides
1839b9b4fd27Smrg# maximum flexibilty in controlling documentation building.
1840b9b4fd27Smrg# Refer to:
1841b9b4fd27Smrg# XORG_WITH_XMLTO         --with-xmlto
1842b9b4fd27Smrg# XORG_WITH_ASCIIDOC      --with-asciidoc
1843b9b4fd27Smrg# XORG_WITH_DOXYGEN       --with-doxygen
1844b9b4fd27Smrg# XORG_WITH_FOP           --with-fop
1845b9b4fd27Smrg# XORG_WITH_GROFF         --with-groff
1846b9b4fd27Smrg# XORG_WITH_PS2PDF        --with-ps2pdf
1847b9b4fd27Smrg#
1848b9b4fd27Smrg# Interface to module:
1849b9b4fd27Smrg# ENABLE_DEVEL_DOCS:	used in makefiles to conditionally generate developer docs
1850b9b4fd27Smrg# --enable-devel-docs:	'yes' user instructs the module to generate developer docs
1851b9b4fd27Smrg#			'no' user instructs the module not to generate developer docs
1852b9b4fd27Smrg# parm1:		specify the default value, yes or no.
1853b9b4fd27Smrg#
1854b9b4fd27SmrgAC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[
1855b9b4fd27Smrgdevel_default=$1
1856b9b4fd27Smrgif test "x$devel_default" = x ; then
1857b9b4fd27Smrg  devel_default="yes"
1858b9b4fd27Smrgfi
1859b9b4fd27SmrgAC_ARG_ENABLE(devel-docs,
1860b9b4fd27Smrg	AS_HELP_STRING([--enable-devel-docs],
1861b9b4fd27Smrg	   [Enable building the developer documentation (default: yes)]),
1862b9b4fd27Smrg	   [build_devel_docs=$enableval], [build_devel_docs=$devel_default])
1863b9b4fd27SmrgAM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes])
1864b9b4fd27SmrgAC_MSG_CHECKING([whether to build developer documentation])
1865b9b4fd27SmrgAC_MSG_RESULT([$build_devel_docs])
1866b9b4fd27Smrg]) # XORG_ENABLE_DEVEL_DOCS
1867b9b4fd27Smrg
1868b9b4fd27Smrg# XORG_ENABLE_SPECS (enable_specs=yes)
1869b9b4fd27Smrg# ----------------
1870b9b4fd27Smrg# Minimum version: 1.6.0
1871b9b4fd27Smrg#
1872b9b4fd27Smrg# This macro enables a builder to skip all functional specification targets.
1873b9b4fd27Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides
1874b9b4fd27Smrg# maximum flexibilty in controlling documentation building.
1875b9b4fd27Smrg# Refer to:
1876b9b4fd27Smrg# XORG_WITH_XMLTO         --with-xmlto
1877b9b4fd27Smrg# XORG_WITH_ASCIIDOC      --with-asciidoc
1878b9b4fd27Smrg# XORG_WITH_DOXYGEN       --with-doxygen
1879b9b4fd27Smrg# XORG_WITH_FOP           --with-fop
1880b9b4fd27Smrg# XORG_WITH_GROFF         --with-groff
1881b9b4fd27Smrg# XORG_WITH_PS2PDF        --with-ps2pdf
1882b9b4fd27Smrg#
1883b9b4fd27Smrg# Interface to module:
1884b9b4fd27Smrg# ENABLE_SPECS:		used in makefiles to conditionally generate specs
1885b9b4fd27Smrg# --enable-specs:	'yes' user instructs the module to generate specs
1886b9b4fd27Smrg#			'no' user instructs the module not to generate specs
1887b9b4fd27Smrg# parm1:		specify the default value, yes or no.
1888b9b4fd27Smrg#
1889b9b4fd27SmrgAC_DEFUN([XORG_ENABLE_SPECS],[
1890b9b4fd27Smrgspec_default=$1
1891b9b4fd27Smrgif test "x$spec_default" = x ; then
1892b9b4fd27Smrg  spec_default="yes"
1893b9b4fd27Smrgfi
1894b9b4fd27SmrgAC_ARG_ENABLE(specs,
1895b9b4fd27Smrg	AS_HELP_STRING([--enable-specs],
1896b9b4fd27Smrg	   [Enable building the specs (default: yes)]),
1897b9b4fd27Smrg	   [build_specs=$enableval], [build_specs=$spec_default])
1898b9b4fd27SmrgAM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes])
1899b9b4fd27SmrgAC_MSG_CHECKING([whether to build functional specifications])
1900b9b4fd27SmrgAC_MSG_RESULT([$build_specs])
1901b9b4fd27Smrg]) # XORG_ENABLE_SPECS
1902b9b4fd27Smrg
1903caade7ccSmrg# XORG_CHECK_MALLOC_ZERO
1904caade7ccSmrg# ----------------------
1905caade7ccSmrg# Minimum version: 1.0.0
1906caade7ccSmrg#
1907caade7ccSmrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if
1908caade7ccSmrg# malloc(0) returns NULL.  Packages should add one of these cflags to
1909caade7ccSmrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them.
1910caade7ccSmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[
1911caade7ccSmrgAC_ARG_ENABLE(malloc0returnsnull,
1912485f0483Smrg	AS_HELP_STRING([--enable-malloc0returnsnull],
1913caade7ccSmrg		       [malloc(0) returns NULL (default: auto)]),
1914caade7ccSmrg	[MALLOC_ZERO_RETURNS_NULL=$enableval],
1915caade7ccSmrg	[MALLOC_ZERO_RETURNS_NULL=auto])
1916caade7ccSmrg
1917caade7ccSmrgAC_MSG_CHECKING([whether malloc(0) returns NULL])
1918caade7ccSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then
1919caade7ccSmrg	AC_RUN_IFELSE([
1920caade7ccSmrgchar *malloc();
1921caade7ccSmrgchar *realloc();
1922caade7ccSmrgchar *calloc();
1923caade7ccSmrgmain() {
1924caade7ccSmrg    char *m0, *r0, *c0, *p;
1925caade7ccSmrg    m0 = malloc(0);
1926caade7ccSmrg    p = malloc(10);
1927caade7ccSmrg    r0 = realloc(p,0);
1928caade7ccSmrg    c0 = calloc(0);
1929caade7ccSmrg    exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1);
1930caade7ccSmrg}],
1931caade7ccSmrg		[MALLOC_ZERO_RETURNS_NULL=yes],
1932b9b4fd27Smrg		[MALLOC_ZERO_RETURNS_NULL=no],
1933b9b4fd27Smrg		[MALLOC_ZERO_RETURNS_NULL=yes])
1934caade7ccSmrgfi
1935caade7ccSmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL])
1936caade7ccSmrg
1937caade7ccSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then
1938caade7ccSmrg	MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL"
1939caade7ccSmrg	XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS
1940caade7ccSmrg	XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC"
1941caade7ccSmrgelse
1942caade7ccSmrg	MALLOC_ZERO_CFLAGS=""
1943caade7ccSmrg	XMALLOC_ZERO_CFLAGS=""
1944caade7ccSmrg	XTMALLOC_ZERO_CFLAGS=""
1945caade7ccSmrgfi
1946caade7ccSmrg
1947caade7ccSmrgAC_SUBST([MALLOC_ZERO_CFLAGS])
1948caade7ccSmrgAC_SUBST([XMALLOC_ZERO_CFLAGS])
1949caade7ccSmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS])
1950caade7ccSmrg]) # XORG_CHECK_MALLOC_ZERO
1951caade7ccSmrg
1952caade7ccSmrg# XORG_WITH_LINT()
1953caade7ccSmrg# ----------------
1954caade7ccSmrg# Minimum version: 1.1.0
1955caade7ccSmrg#
1956e8a5466aSmrg# This macro enables the use of a tool that flags some suspicious and
1957e8a5466aSmrg# non-portable constructs (likely to be bugs) in C language source code.
1958e8a5466aSmrg# It will attempt to locate the tool and use appropriate options.
1959e8a5466aSmrg# There are various lint type tools on different platforms.
1960e8a5466aSmrg#
1961e8a5466aSmrg# Interface to module:
1962e8a5466aSmrg# LINT:		returns the path to the tool found on the platform
1963e8a5466aSmrg#		or the value set to LINT on the configure cmd line
1964e8a5466aSmrg#		also an Automake conditional
1965e8a5466aSmrg# LINT_FLAGS:	an Automake variable with appropriate flags
1966e8a5466aSmrg#
1967e8a5466aSmrg# --with-lint:	'yes' user instructs the module to use lint
1968e8a5466aSmrg#		'no' user instructs the module not to use lint (default)
1969e8a5466aSmrg#
1970e8a5466aSmrg# If the user sets the value of LINT, AC_PATH_PROG skips testing the path.
1971e8a5466aSmrg# If the user sets the value of LINT_FLAGS, they are used verbatim.
1972caade7ccSmrg#
1973caade7ccSmrgAC_DEFUN([XORG_WITH_LINT],[
1974caade7ccSmrg
1975e8a5466aSmrgAC_ARG_VAR([LINT], [Path to a lint-style command])
1976e8a5466aSmrgAC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command])
1977485f0483SmrgAC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint],
1978caade7ccSmrg		[Use a lint-style source code checker (default: disabled)])],
1979caade7ccSmrg		[use_lint=$withval], [use_lint=no])
1980e8a5466aSmrg
1981e8a5466aSmrg# Obtain platform specific info like program name and options
1982e8a5466aSmrg# The lint program on FreeBSD and NetBSD is different from the one on Solaris
1983e8a5466aSmrgcase $host_os in
1984e8a5466aSmrg  *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*)
1985e8a5466aSmrg	lint_name=splint
1986e8a5466aSmrg	lint_options="-badflag"
1987e8a5466aSmrg	;;
1988e8a5466aSmrg  *freebsd* | *netbsd*)
1989e8a5466aSmrg	lint_name=lint
1990e8a5466aSmrg	lint_options="-u -b"
1991e8a5466aSmrg	;;
1992e8a5466aSmrg  *solaris*)
1993e8a5466aSmrg	lint_name=lint
1994e8a5466aSmrg	lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2"
1995e8a5466aSmrg	;;
1996e8a5466aSmrgesac
1997e8a5466aSmrg
1998e8a5466aSmrg# Test for the presence of the program (either guessed by the code or spelled out by the user)
1999e8a5466aSmrgif test "x$use_lint" = x"yes" ; then
2000e8a5466aSmrg   AC_PATH_PROG([LINT], [$lint_name])
2001e8a5466aSmrg   if test "x$LINT" = "x"; then
2002e8a5466aSmrg        AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH])
2003e8a5466aSmrg   fi
2004e8a5466aSmrgelif test "x$use_lint" = x"no" ; then
2005e8a5466aSmrg   if test "x$LINT" != "x"; then
2006e8a5466aSmrg      AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified])
2007e8a5466aSmrg   fi
2008caade7ccSmrgelse
2009e8a5466aSmrg   AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.])
2010caade7ccSmrgfi
2011e8a5466aSmrg
2012e8a5466aSmrg# User supplied flags override default flags
2013e8a5466aSmrgif test "x$LINT_FLAGS" != "x"; then
2014e8a5466aSmrg   lint_options=$LINT_FLAGS
2015caade7ccSmrgfi
2016caade7ccSmrg
2017e8a5466aSmrgAC_SUBST([LINT_FLAGS],[$lint_options])
2018e8a5466aSmrgAM_CONDITIONAL(LINT, [test "x$LINT" != x])
2019caade7ccSmrg
2020caade7ccSmrg]) # XORG_WITH_LINT
2021caade7ccSmrg
2022caade7ccSmrg# XORG_LINT_LIBRARY(LIBNAME)
2023caade7ccSmrg# --------------------------
2024caade7ccSmrg# Minimum version: 1.1.0
2025caade7ccSmrg#
2026caade7ccSmrg# Sets up flags for building lint libraries for checking programs that call
2027caade7ccSmrg# functions in the library.
2028caade7ccSmrg#
2029e8a5466aSmrg# Interface to module:
2030e8a5466aSmrg# LINTLIB		- Automake variable with the name of lint library file to make
2031e8a5466aSmrg# MAKE_LINT_LIB		- Automake conditional
2032e8a5466aSmrg#
2033e8a5466aSmrg# --enable-lint-library:  - 'yes' user instructs the module to created a lint library
2034e8a5466aSmrg#			  - 'no' user instructs the module not to create a lint library (default)
2035caade7ccSmrg
2036caade7ccSmrgAC_DEFUN([XORG_LINT_LIBRARY],[
2037caade7ccSmrgAC_REQUIRE([XORG_WITH_LINT])
2038485f0483SmrgAC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library],
2039caade7ccSmrg	[Create lint library (default: disabled)])],
2040caade7ccSmrg	[make_lint_lib=$enableval], [make_lint_lib=no])
2041e8a5466aSmrg
2042e8a5466aSmrgif test "x$make_lint_lib" = x"yes" ; then
2043e8a5466aSmrg   LINTLIB=llib-l$1.ln
2044e8a5466aSmrg   if test "x$LINT" = "x"; then
2045e8a5466aSmrg        AC_MSG_ERROR([Cannot make lint library without --with-lint])
2046e8a5466aSmrg   fi
2047e8a5466aSmrgelif test "x$make_lint_lib" != x"no" ; then
2048e8a5466aSmrg   AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.])
2049caade7ccSmrgfi
2050e8a5466aSmrg
2051caade7ccSmrgAC_SUBST(LINTLIB)
2052caade7ccSmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno])
2053caade7ccSmrg
2054caade7ccSmrg]) # XORG_LINT_LIBRARY
2055caade7ccSmrg
2056485f0483Smrg# XORG_CWARNFLAGS
2057485f0483Smrg# ---------------
2058485f0483Smrg# Minimum version: 1.2.0
2059485f0483Smrg#
2060485f0483Smrg# Defines CWARNFLAGS to enable C compiler warnings.
2061485f0483Smrg#
2062485f0483SmrgAC_DEFUN([XORG_CWARNFLAGS], [
2063e8a5466aSmrgAC_REQUIRE([AC_PROG_CC_C99])
2064485f0483Smrgif  test "x$GCC" = xyes ; then
2065485f0483Smrg    CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \
2066485f0483Smrg-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \
2067b9b4fd27Smrg-Wbad-function-cast -Wformat=2"
2068485f0483Smrg    case `$CC -dumpversion` in
2069485f0483Smrg    3.4.* | 4.*)
2070485f0483Smrg	CWARNFLAGS="$CWARNFLAGS -Wold-style-definition -Wdeclaration-after-statement"
2071485f0483Smrg	;;
2072485f0483Smrg    esac
2073485f0483Smrgelse
2074485f0483Smrg    AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
2075485f0483Smrg    if test "x$SUNCC" = "xyes"; then
2076485f0483Smrg	CWARNFLAGS="-v"
2077485f0483Smrg    fi
2078485f0483Smrgfi
2079485f0483SmrgAC_SUBST(CWARNFLAGS)
2080485f0483Smrg]) # XORG_CWARNFLAGS
2081485f0483Smrg
2082485f0483Smrg# XORG_STRICT_OPTION
2083485f0483Smrg# -----------------------
2084485f0483Smrg# Minimum version: 1.3.0
2085485f0483Smrg#
2086485f0483Smrg# Add configure option to enable strict compilation
2087485f0483SmrgAC_DEFUN([XORG_STRICT_OPTION], [
2088e8a5466aSmrg# If the module's configure.ac calls AC_PROG_CC later on, CC gets set to C89
2089485f0483SmrgAC_REQUIRE([AC_PROG_CC_C99])
2090485f0483SmrgAC_REQUIRE([XORG_CWARNFLAGS])
2091485f0483Smrg
2092485f0483SmrgAC_ARG_ENABLE(strict-compilation,
2093485f0483Smrg			  AS_HELP_STRING([--enable-strict-compilation],
2094485f0483Smrg			  [Enable all warnings from compiler and make them errors (default: disabled)]),
2095485f0483Smrg			  [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no])
2096485f0483Smrgif test "x$STRICT_COMPILE" = "xyes"; then
2097485f0483Smrg	AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
2098485f0483Smrg	AC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"])
2099485f0483Smrg	if test "x$GCC" = xyes ; then
2100485f0483Smrg		STRICT_CFLAGS="-pedantic -Werror"
2101485f0483Smrg	elif test "x$SUNCC" = "xyes"; then
2102485f0483Smrg		STRICT_CFLAGS="-errwarn"
2103485f0483Smrg    elif test "x$INTELCC" = "xyes"; then
2104485f0483Smrg		STRICT_CFLAGS="-Werror"
2105485f0483Smrg	fi
2106485f0483Smrgfi
2107485f0483SmrgCWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"
2108485f0483SmrgAC_SUBST([CWARNFLAGS])
2109485f0483Smrg]) # XORG_STRICT_OPTION
2110485f0483Smrg
2111485f0483Smrg# XORG_DEFAULT_OPTIONS
2112485f0483Smrg# --------------------
2113485f0483Smrg# Minimum version: 1.3.0
2114485f0483Smrg#
2115485f0483Smrg# Defines default options for X.Org modules.
2116485f0483Smrg#
2117485f0483SmrgAC_DEFUN([XORG_DEFAULT_OPTIONS], [
2118e8a5466aSmrgAC_REQUIRE([AC_PROG_INSTALL])
2119485f0483SmrgXORG_CWARNFLAGS
2120485f0483SmrgXORG_STRICT_OPTION
2121485f0483SmrgXORG_RELEASE_VERSION
2122485f0483SmrgXORG_CHANGELOG
2123b9b4fd27SmrgXORG_INSTALL
2124485f0483SmrgXORG_MANPAGE_SECTIONS
2125b9b4fd27Smrgm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])],
2126b9b4fd27Smrg    [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])])
2127485f0483Smrg]) # XORG_DEFAULT_OPTIONS
2128b9b4fd27Smrg
2129b9b4fd27Smrg# XORG_INSTALL()
2130b9b4fd27Smrg# ----------------
2131b9b4fd27Smrg# Minimum version: 1.4.0
2132b9b4fd27Smrg#
2133b9b4fd27Smrg# Defines the variable INSTALL_CMD as the command to copy
2134b9b4fd27Smrg# INSTALL from $prefix/share/util-macros.
2135b9b4fd27Smrg#
2136b9b4fd27SmrgAC_DEFUN([XORG_INSTALL], [
2137b9b4fd27SmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG])
2138b9b4fd27Smrgmacros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros`
2139b9b4fd27SmrgINSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \
2140b9b4fd27Smrgmv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \
2141b9b4fd27Smrg|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \
2142b9b4fd27Smrgecho 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)"
2143b9b4fd27SmrgAC_SUBST([INSTALL_CMD])
2144b9b4fd27Smrg]) # XORG_INSTALL
2145caade7ccSmrgdnl Copyright 2005 Red Hat, Inc
2146caade7ccSmrgdnl
2147caade7ccSmrgdnl Permission to use, copy, modify, distribute, and sell this software and its
2148caade7ccSmrgdnl documentation for any purpose is hereby granted without fee, provided that
2149caade7ccSmrgdnl the above copyright notice appear in all copies and that both that
2150caade7ccSmrgdnl copyright notice and this permission notice appear in supporting
2151caade7ccSmrgdnl documentation.
2152caade7ccSmrgdnl
2153caade7ccSmrgdnl The above copyright notice and this permission notice shall be included
2154caade7ccSmrgdnl in all copies or substantial portions of the Software.
2155caade7ccSmrgdnl
2156caade7ccSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
2157caade7ccSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
2158caade7ccSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
2159caade7ccSmrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
2160caade7ccSmrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
2161caade7ccSmrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
2162caade7ccSmrgdnl OTHER DEALINGS IN THE SOFTWARE.
2163caade7ccSmrgdnl
2164caade7ccSmrgdnl Except as contained in this notice, the name of the copyright holders shall
2165caade7ccSmrgdnl not be used in advertising or otherwise to promote the sale, use or
2166caade7ccSmrgdnl other dealings in this Software without prior written authorization
2167caade7ccSmrgdnl from the copyright holders.
2168caade7ccSmrgdnl
2169caade7ccSmrg
2170caade7ccSmrg# XORG_RELEASE_VERSION
2171caade7ccSmrg# --------------------
2172e8a5466aSmrg# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use.
2173caade7ccSmrg 
2174caade7ccSmrgAC_DEFUN([XORG_RELEASE_VERSION],[
2175caade7ccSmrg	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR],
2176caade7ccSmrg		[`echo $PACKAGE_VERSION | cut -d . -f 1`],
2177caade7ccSmrg		[Major version of this package])
2178caade7ccSmrg	PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1`
2179caade7ccSmrg	if test "x$PVM" = "x"; then
2180caade7ccSmrg		PVM="0"
2181caade7ccSmrg	fi
2182caade7ccSmrg	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR],
2183caade7ccSmrg		[$PVM],
2184caade7ccSmrg		[Minor version of this package])
2185caade7ccSmrg	PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1`
2186caade7ccSmrg	if test "x$PVP" = "x"; then
2187caade7ccSmrg		PVP="0"
2188caade7ccSmrg	fi
2189caade7ccSmrg	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL],
2190caade7ccSmrg		[$PVP],
2191caade7ccSmrg		[Patch version of this package])
2192caade7ccSmrg])
2193caade7ccSmrg
2194485f0483Smrg# XORG_CHANGELOG()
2195485f0483Smrg# ----------------
2196485f0483Smrg# Minimum version: 1.2.0
2197485f0483Smrg#
2198485f0483Smrg# Defines the variable CHANGELOG_CMD as the command to generate
2199485f0483Smrg# ChangeLog from git.
2200485f0483Smrg#
2201485f0483Smrg#
2202485f0483SmrgAC_DEFUN([XORG_CHANGELOG], [
2203b9b4fd27SmrgCHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \
2204b9b4fd27Smrgmv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \
2205b9b4fd27Smrg|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \
2206485f0483Smrgecho 'git directory not found: installing possibly empty changelog.' >&2)"
2207485f0483SmrgAC_SUBST([CHANGELOG_CMD])
2208485f0483Smrg]) # XORG_CHANGELOG
2209485f0483Smrg
2210b9b4fd27Smrg# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
2211b9b4fd27Smrg# 
2212b9b4fd27Smrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
2213b9b4fd27Smrg#
2214b9b4fd27Smrg# This program is free software; you can redistribute it and/or modify
2215b9b4fd27Smrg# it under the terms of the GNU General Public License as published by
2216b9b4fd27Smrg# the Free Software Foundation; either version 2 of the License, or
2217b9b4fd27Smrg# (at your option) any later version.
2218b9b4fd27Smrg#
2219b9b4fd27Smrg# This program is distributed in the hope that it will be useful, but
2220b9b4fd27Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of
2221b9b4fd27Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
2222b9b4fd27Smrg# General Public License for more details.
2223b9b4fd27Smrg#
2224b9b4fd27Smrg# You should have received a copy of the GNU General Public License
2225b9b4fd27Smrg# along with this program; if not, write to the Free Software
2226b9b4fd27Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
2227b9b4fd27Smrg#
2228b9b4fd27Smrg# As a special exception to the GNU General Public License, if you
2229b9b4fd27Smrg# distribute this file as part of a program that contains a
2230b9b4fd27Smrg# configuration script generated by Autoconf, you may include it under
2231b9b4fd27Smrg# the same distribution terms that you use for the rest of that program.
2232caade7ccSmrg
2233b9b4fd27Smrg# PKG_PROG_PKG_CONFIG([MIN-VERSION])
2234b9b4fd27Smrg# ----------------------------------
2235b9b4fd27SmrgAC_DEFUN([PKG_PROG_PKG_CONFIG],
2236b9b4fd27Smrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
2237b9b4fd27Smrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$])
2238b9b4fd27SmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
2239b9b4fd27Smrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
2240b9b4fd27Smrg	AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
2241b9b4fd27Smrgfi
2242b9b4fd27Smrgif test -n "$PKG_CONFIG"; then
2243b9b4fd27Smrg	_pkg_min_version=m4_default([$1], [0.9.0])
2244b9b4fd27Smrg	AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
2245b9b4fd27Smrg	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
2246b9b4fd27Smrg		AC_MSG_RESULT([yes])
2247b9b4fd27Smrg	else
2248b9b4fd27Smrg		AC_MSG_RESULT([no])
2249b9b4fd27Smrg		PKG_CONFIG=""
2250b9b4fd27Smrg	fi
2251b9b4fd27Smrg		
2252b9b4fd27Smrgfi[]dnl
2253b9b4fd27Smrg])# PKG_PROG_PKG_CONFIG
2254caade7ccSmrg
2255b9b4fd27Smrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
2256b9b4fd27Smrg#
2257b9b4fd27Smrg# Check to see whether a particular set of modules exists.  Similar
2258b9b4fd27Smrg# to PKG_CHECK_MODULES(), but does not set variables or print errors.
2259b9b4fd27Smrg#
2260b9b4fd27Smrg#
2261b9b4fd27Smrg# Similar to PKG_CHECK_MODULES, make sure that the first instance of
2262b9b4fd27Smrg# this or PKG_CHECK_MODULES is called, or make sure to call
2263b9b4fd27Smrg# PKG_CHECK_EXISTS manually
2264b9b4fd27Smrg# --------------------------------------------------------------
2265b9b4fd27SmrgAC_DEFUN([PKG_CHECK_EXISTS],
2266b9b4fd27Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
2267b9b4fd27Smrgif test -n "$PKG_CONFIG" && \
2268b9b4fd27Smrg    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
2269b9b4fd27Smrg  m4_ifval([$2], [$2], [:])
2270b9b4fd27Smrgm4_ifvaln([$3], [else
2271b9b4fd27Smrg  $3])dnl
2272b9b4fd27Smrgfi])
2273caade7ccSmrg
2274caade7ccSmrg
2275b9b4fd27Smrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
2276b9b4fd27Smrg# ---------------------------------------------
2277b9b4fd27Smrgm4_define([_PKG_CONFIG],
2278b9b4fd27Smrg[if test -n "$$1"; then
2279b9b4fd27Smrg    pkg_cv_[]$1="$$1"
2280b9b4fd27Smrg elif test -n "$PKG_CONFIG"; then
2281b9b4fd27Smrg    PKG_CHECK_EXISTS([$3],
2282b9b4fd27Smrg                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
2283b9b4fd27Smrg		     [pkg_failed=yes])
2284b9b4fd27Smrg else
2285b9b4fd27Smrg    pkg_failed=untried
2286b9b4fd27Smrgfi[]dnl
2287b9b4fd27Smrg])# _PKG_CONFIG
2288caade7ccSmrg
2289b9b4fd27Smrg# _PKG_SHORT_ERRORS_SUPPORTED
2290b9b4fd27Smrg# -----------------------------
2291b9b4fd27SmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
2292b9b4fd27Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
2293b9b4fd27Smrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
2294b9b4fd27Smrg        _pkg_short_errors_supported=yes
2295b9b4fd27Smrgelse
2296b9b4fd27Smrg        _pkg_short_errors_supported=no
2297b9b4fd27Smrgfi[]dnl
2298b9b4fd27Smrg])# _PKG_SHORT_ERRORS_SUPPORTED
2299caade7ccSmrg
2300caade7ccSmrg
2301b9b4fd27Smrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
2302b9b4fd27Smrg# [ACTION-IF-NOT-FOUND])
2303b9b4fd27Smrg#
2304b9b4fd27Smrg#
2305b9b4fd27Smrg# Note that if there is a possibility the first call to
2306b9b4fd27Smrg# PKG_CHECK_MODULES might not happen, you should be sure to include an
2307b9b4fd27Smrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
2308b9b4fd27Smrg#
2309b9b4fd27Smrg#
2310b9b4fd27Smrg# --------------------------------------------------------------
2311b9b4fd27SmrgAC_DEFUN([PKG_CHECK_MODULES],
2312b9b4fd27Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
2313b9b4fd27SmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
2314b9b4fd27SmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
2315caade7ccSmrg
2316b9b4fd27Smrgpkg_failed=no
2317b9b4fd27SmrgAC_MSG_CHECKING([for $1])
2318caade7ccSmrg
2319b9b4fd27Smrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
2320b9b4fd27Smrg_PKG_CONFIG([$1][_LIBS], [libs], [$2])
2321caade7ccSmrg
2322b9b4fd27Smrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
2323b9b4fd27Smrgand $1[]_LIBS to avoid the need to call pkg-config.
2324b9b4fd27SmrgSee the pkg-config man page for more details.])
2325caade7ccSmrg
2326b9b4fd27Smrgif test $pkg_failed = yes; then
2327b9b4fd27Smrg        _PKG_SHORT_ERRORS_SUPPORTED
2328b9b4fd27Smrg        if test $_pkg_short_errors_supported = yes; then
2329b9b4fd27Smrg	        $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
2330b9b4fd27Smrg        else 
2331b9b4fd27Smrg	        $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
2332b9b4fd27Smrg        fi
2333b9b4fd27Smrg	# Put the nasty error message in config.log where it belongs
2334b9b4fd27Smrg	echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
2335caade7ccSmrg
2336b9b4fd27Smrg	ifelse([$4], , [AC_MSG_ERROR(dnl
2337b9b4fd27Smrg[Package requirements ($2) were not met:
2338caade7ccSmrg
2339b9b4fd27Smrg$$1_PKG_ERRORS
2340b9b4fd27Smrg
2341b9b4fd27SmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you
2342b9b4fd27Smrginstalled software in a non-standard prefix.
2343b9b4fd27Smrg
2344b9b4fd27Smrg_PKG_TEXT
2345b9b4fd27Smrg])],
2346b9b4fd27Smrg		[AC_MSG_RESULT([no])
2347b9b4fd27Smrg                $4])
2348b9b4fd27Smrgelif test $pkg_failed = untried; then
2349b9b4fd27Smrg	ifelse([$4], , [AC_MSG_FAILURE(dnl
2350b9b4fd27Smrg[The pkg-config script could not be found or is too old.  Make sure it
2351b9b4fd27Smrgis in your PATH or set the PKG_CONFIG environment variable to the full
2352b9b4fd27Smrgpath to pkg-config.
2353b9b4fd27Smrg
2354b9b4fd27Smrg_PKG_TEXT
2355b9b4fd27Smrg
2356b9b4fd27SmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
2357b9b4fd27Smrg		[$4])
2358b9b4fd27Smrgelse
2359b9b4fd27Smrg	$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
2360b9b4fd27Smrg	$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
2361b9b4fd27Smrg        AC_MSG_RESULT([yes])
2362b9b4fd27Smrg	ifelse([$3], , :, [$3])
2363b9b4fd27Smrgfi[]dnl
2364b9b4fd27Smrg])# PKG_CHECK_MODULES
2365b9b4fd27Smrg
2366b9b4fd27Smrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
2367b9b4fd27Smrg#
2368b9b4fd27Smrg#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
2369e8a5466aSmrg#                 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
2370e8a5466aSmrg#                 Inc.
2371b9b4fd27Smrg#   Written by Gordon Matzigkeit, 1996
2372b9b4fd27Smrg#
2373b9b4fd27Smrg# This file is free software; the Free Software Foundation gives
2374b9b4fd27Smrg# unlimited permission to copy and/or distribute it, with or without
2375b9b4fd27Smrg# modifications, as long as this notice is preserved.
2376b9b4fd27Smrg
2377b9b4fd27Smrgm4_define([_LT_COPYING], [dnl
2378b9b4fd27Smrg#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
2379e8a5466aSmrg#                 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
2380e8a5466aSmrg#                 Inc.
2381b9b4fd27Smrg#   Written by Gordon Matzigkeit, 1996
2382b9b4fd27Smrg#
2383b9b4fd27Smrg#   This file is part of GNU Libtool.
2384b9b4fd27Smrg#
2385b9b4fd27Smrg# GNU Libtool is free software; you can redistribute it and/or
2386b9b4fd27Smrg# modify it under the terms of the GNU General Public License as
2387b9b4fd27Smrg# published by the Free Software Foundation; either version 2 of
2388b9b4fd27Smrg# the License, or (at your option) any later version.
2389b9b4fd27Smrg#
2390b9b4fd27Smrg# As a special exception to the GNU General Public License,
2391b9b4fd27Smrg# if you distribute this file as part of a program or library that
2392b9b4fd27Smrg# is built using GNU Libtool, you may include this file under the
2393b9b4fd27Smrg# same distribution terms that you use for the rest of that program.
2394b9b4fd27Smrg#
2395b9b4fd27Smrg# GNU Libtool is distributed in the hope that it will be useful,
2396b9b4fd27Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of
2397b9b4fd27Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
2398b9b4fd27Smrg# GNU General Public License for more details.
2399b9b4fd27Smrg#
2400b9b4fd27Smrg# You should have received a copy of the GNU General Public License
2401b9b4fd27Smrg# along with GNU Libtool; see the file COPYING.  If not, a copy
2402b9b4fd27Smrg# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
2403b9b4fd27Smrg# obtained by writing to the Free Software Foundation, Inc.,
2404b9b4fd27Smrg# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
2405b9b4fd27Smrg])
2406b9b4fd27Smrg
2407e8a5466aSmrg# serial 57 LT_INIT
2408b9b4fd27Smrg
2409b9b4fd27Smrg
2410b9b4fd27Smrg# LT_PREREQ(VERSION)
2411b9b4fd27Smrg# ------------------
2412b9b4fd27Smrg# Complain and exit if this libtool version is less that VERSION.
2413b9b4fd27Smrgm4_defun([LT_PREREQ],
2414b9b4fd27Smrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
2415b9b4fd27Smrg       [m4_default([$3],
2416b9b4fd27Smrg		   [m4_fatal([Libtool version $1 or higher is required],
2417b9b4fd27Smrg		             63)])],
2418b9b4fd27Smrg       [$2])])
2419b9b4fd27Smrg
2420b9b4fd27Smrg
2421b9b4fd27Smrg# _LT_CHECK_BUILDDIR
2422b9b4fd27Smrg# ------------------
2423b9b4fd27Smrg# Complain if the absolute build directory name contains unusual characters
2424b9b4fd27Smrgm4_defun([_LT_CHECK_BUILDDIR],
2425b9b4fd27Smrg[case `pwd` in
2426b9b4fd27Smrg  *\ * | *\	*)
2427b9b4fd27Smrg    AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
2428b9b4fd27Smrgesac
2429b9b4fd27Smrg])
2430b9b4fd27Smrg
2431b9b4fd27Smrg
2432b9b4fd27Smrg# LT_INIT([OPTIONS])
2433b9b4fd27Smrg# ------------------
2434b9b4fd27SmrgAC_DEFUN([LT_INIT],
2435b9b4fd27Smrg[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
2436e8a5466aSmrgAC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
2437b9b4fd27SmrgAC_BEFORE([$0], [LT_LANG])dnl
2438b9b4fd27SmrgAC_BEFORE([$0], [LT_OUTPUT])dnl
2439b9b4fd27SmrgAC_BEFORE([$0], [LTDL_INIT])dnl
2440b9b4fd27Smrgm4_require([_LT_CHECK_BUILDDIR])dnl
2441b9b4fd27Smrg
2442b9b4fd27Smrgdnl Autoconf doesn't catch unexpanded LT_ macros by default:
2443b9b4fd27Smrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
2444b9b4fd27Smrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
2445b9b4fd27Smrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
2446b9b4fd27Smrgdnl unless we require an AC_DEFUNed macro:
2447b9b4fd27SmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl
2448b9b4fd27SmrgAC_REQUIRE([LTSUGAR_VERSION])dnl
2449b9b4fd27SmrgAC_REQUIRE([LTVERSION_VERSION])dnl
2450b9b4fd27SmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl
2451b9b4fd27Smrgm4_require([_LT_PROG_LTMAIN])dnl
2452b9b4fd27Smrg
2453e8a5466aSmrg_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
2454e8a5466aSmrg
2455b9b4fd27Smrgdnl Parse OPTIONS
2456b9b4fd27Smrg_LT_SET_OPTIONS([$0], [$1])
2457b9b4fd27Smrg
2458b9b4fd27Smrg# This can be used to rebuild libtool when needed
2459b9b4fd27SmrgLIBTOOL_DEPS="$ltmain"
2460b9b4fd27Smrg
2461b9b4fd27Smrg# Always use our own libtool.
2462b9b4fd27SmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool'
2463b9b4fd27SmrgAC_SUBST(LIBTOOL)dnl
2464b9b4fd27Smrg
2465b9b4fd27Smrg_LT_SETUP
2466b9b4fd27Smrg
2467b9b4fd27Smrg# Only expand once:
2468b9b4fd27Smrgm4_define([LT_INIT])
2469b9b4fd27Smrg])# LT_INIT
2470b9b4fd27Smrg
2471b9b4fd27Smrg# Old names:
2472b9b4fd27SmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
2473b9b4fd27SmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
2474b9b4fd27Smrgdnl aclocal-1.4 backwards compatibility:
2475b9b4fd27Smrgdnl AC_DEFUN([AC_PROG_LIBTOOL], [])
2476b9b4fd27Smrgdnl AC_DEFUN([AM_PROG_LIBTOOL], [])
2477b9b4fd27Smrg
2478b9b4fd27Smrg
2479b9b4fd27Smrg# _LT_CC_BASENAME(CC)
2480b9b4fd27Smrg# -------------------
2481b9b4fd27Smrg# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
2482b9b4fd27Smrgm4_defun([_LT_CC_BASENAME],
2483b9b4fd27Smrg[for cc_temp in $1""; do
2484b9b4fd27Smrg  case $cc_temp in
2485b9b4fd27Smrg    compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
2486b9b4fd27Smrg    distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
2487b9b4fd27Smrg    \-*) ;;
2488b9b4fd27Smrg    *) break;;
2489b9b4fd27Smrg  esac
2490b9b4fd27Smrgdone
2491e8a5466aSmrgcc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
2492b9b4fd27Smrg])
2493b9b4fd27Smrg
2494b9b4fd27Smrg
2495b9b4fd27Smrg# _LT_FILEUTILS_DEFAULTS
2496b9b4fd27Smrg# ----------------------
2497b9b4fd27Smrg# It is okay to use these file commands and assume they have been set
2498b9b4fd27Smrg# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
2499b9b4fd27Smrgm4_defun([_LT_FILEUTILS_DEFAULTS],
2500b9b4fd27Smrg[: ${CP="cp -f"}
2501b9b4fd27Smrg: ${MV="mv -f"}
2502b9b4fd27Smrg: ${RM="rm -f"}
2503b9b4fd27Smrg])# _LT_FILEUTILS_DEFAULTS
2504b9b4fd27Smrg
2505b9b4fd27Smrg
2506b9b4fd27Smrg# _LT_SETUP
2507b9b4fd27Smrg# ---------
2508b9b4fd27Smrgm4_defun([_LT_SETUP],
2509b9b4fd27Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
2510b9b4fd27SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl
2511e8a5466aSmrgAC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
2512e8a5466aSmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
2513e8a5466aSmrg
2514b9b4fd27Smrg_LT_DECL([], [host_alias], [0], [The host system])dnl
2515b9b4fd27Smrg_LT_DECL([], [host], [0])dnl
2516b9b4fd27Smrg_LT_DECL([], [host_os], [0])dnl
2517b9b4fd27Smrgdnl
2518b9b4fd27Smrg_LT_DECL([], [build_alias], [0], [The build system])dnl
2519b9b4fd27Smrg_LT_DECL([], [build], [0])dnl
2520b9b4fd27Smrg_LT_DECL([], [build_os], [0])dnl
2521b9b4fd27Smrgdnl
2522b9b4fd27SmrgAC_REQUIRE([AC_PROG_CC])dnl
2523b9b4fd27SmrgAC_REQUIRE([LT_PATH_LD])dnl
2524b9b4fd27SmrgAC_REQUIRE([LT_PATH_NM])dnl
2525b9b4fd27Smrgdnl
2526b9b4fd27SmrgAC_REQUIRE([AC_PROG_LN_S])dnl
2527b9b4fd27Smrgtest -z "$LN_S" && LN_S="ln -s"
2528b9b4fd27Smrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
2529b9b4fd27Smrgdnl
2530b9b4fd27SmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl
2531b9b4fd27Smrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
2532b9b4fd27Smrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
2533b9b4fd27Smrgdnl
2534b9b4fd27Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
2535b9b4fd27Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl
2536b9b4fd27Smrgm4_require([_LT_CMD_RELOAD])dnl
2537b9b4fd27Smrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl
2538b9b4fd27Smrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl
2539b9b4fd27Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
2540b9b4fd27Smrg
2541b9b4fd27Smrg_LT_CONFIG_LIBTOOL_INIT([
2542b9b4fd27Smrg# See if we are running on zsh, and set the options which allow our
2543b9b4fd27Smrg# commands through without removal of \ escapes INIT.
2544b9b4fd27Smrgif test -n "\${ZSH_VERSION+set}" ; then
2545b9b4fd27Smrg   setopt NO_GLOB_SUBST
2546b9b4fd27Smrgfi
2547b9b4fd27Smrg])
2548b9b4fd27Smrgif test -n "${ZSH_VERSION+set}" ; then
2549b9b4fd27Smrg   setopt NO_GLOB_SUBST
2550b9b4fd27Smrgfi
2551b9b4fd27Smrg
2552b9b4fd27Smrg_LT_CHECK_OBJDIR
2553b9b4fd27Smrg
2554b9b4fd27Smrgm4_require([_LT_TAG_COMPILER])dnl
2555b9b4fd27Smrg
2556b9b4fd27Smrgcase $host_os in
2557b9b4fd27Smrgaix3*)
2558b9b4fd27Smrg  # AIX sometimes has problems with the GCC collect2 program.  For some
2559b9b4fd27Smrg  # reason, if we set the COLLECT_NAMES environment variable, the problems
2560caade7ccSmrg  # vanish in a puff of smoke.
2561caade7ccSmrg  if test "X${COLLECT_NAMES+set}" != Xset; then
2562caade7ccSmrg    COLLECT_NAMES=
2563caade7ccSmrg    export COLLECT_NAMES
2564caade7ccSmrg  fi
2565caade7ccSmrg  ;;
2566caade7ccSmrgesac
2567caade7ccSmrg
2568caade7ccSmrg# Global variables:
2569b9b4fd27Smrgofile=libtool
2570caade7ccSmrgcan_build_shared=yes
2571caade7ccSmrg
2572caade7ccSmrg# All known linkers require a `.a' archive for static linking (except MSVC,
2573caade7ccSmrg# which needs '.lib').
2574caade7ccSmrglibext=a
2575caade7ccSmrg
2576b9b4fd27Smrgwith_gnu_ld="$lt_cv_prog_gnu_ld"
2577caade7ccSmrg
2578caade7ccSmrgold_CC="$CC"
2579caade7ccSmrgold_CFLAGS="$CFLAGS"
2580caade7ccSmrg
2581caade7ccSmrg# Set sane defaults for various variables
2582caade7ccSmrgtest -z "$CC" && CC=cc
2583caade7ccSmrgtest -z "$LTCC" && LTCC=$CC
2584caade7ccSmrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
2585caade7ccSmrgtest -z "$LD" && LD=ld
2586caade7ccSmrgtest -z "$ac_objext" && ac_objext=o
2587caade7ccSmrg
2588caade7ccSmrg_LT_CC_BASENAME([$compiler])
2589caade7ccSmrg
2590caade7ccSmrg# Only perform the check for file, if the check method requires it
2591b9b4fd27Smrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file
2592caade7ccSmrgcase $deplibs_check_method in
2593caade7ccSmrgfile_magic*)
2594caade7ccSmrg  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
2595b9b4fd27Smrg    _LT_PATH_MAGIC
2596caade7ccSmrg  fi
2597caade7ccSmrg  ;;
2598caade7ccSmrgesac
2599caade7ccSmrg
2600b9b4fd27Smrg# Use C for the default configuration in the libtool script
2601b9b4fd27SmrgLT_SUPPORTED_TAG([CC])
2602b9b4fd27Smrg_LT_LANG_C_CONFIG
2603b9b4fd27Smrg_LT_LANG_DEFAULT_CONFIG
2604b9b4fd27Smrg_LT_CONFIG_COMMANDS
2605b9b4fd27Smrg])# _LT_SETUP
2606485f0483Smrg
2607caade7ccSmrg
2608e8a5466aSmrg# _LT_PREPARE_SED_QUOTE_VARS
2609e8a5466aSmrg# --------------------------
2610e8a5466aSmrg# Define a few sed substitution that help us do robust quoting.
2611e8a5466aSmrgm4_defun([_LT_PREPARE_SED_QUOTE_VARS],
2612e8a5466aSmrg[# Backslashify metacharacters that are still active within
2613e8a5466aSmrg# double-quoted strings.
2614e8a5466aSmrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
2615e8a5466aSmrg
2616e8a5466aSmrg# Same as above, but do not quote variable references.
2617e8a5466aSmrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g'
2618e8a5466aSmrg
2619e8a5466aSmrg# Sed substitution to delay expansion of an escaped shell variable in a
2620e8a5466aSmrg# double_quote_subst'ed string.
2621e8a5466aSmrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
2622e8a5466aSmrg
2623e8a5466aSmrg# Sed substitution to delay expansion of an escaped single quote.
2624e8a5466aSmrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
2625e8a5466aSmrg
2626e8a5466aSmrg# Sed substitution to avoid accidental globbing in evaled expressions
2627e8a5466aSmrgno_glob_subst='s/\*/\\\*/g'
2628e8a5466aSmrg])
2629e8a5466aSmrg
2630b9b4fd27Smrg# _LT_PROG_LTMAIN
2631b9b4fd27Smrg# ---------------
2632b9b4fd27Smrg# Note that this code is called both from `configure', and `config.status'
2633b9b4fd27Smrg# now that we use AC_CONFIG_COMMANDS to generate libtool.  Notably,
2634b9b4fd27Smrg# `config.status' has no value for ac_aux_dir unless we are using Automake,
2635b9b4fd27Smrg# so we pass a copy along to make sure it has a sensible value anyway.
2636b9b4fd27Smrgm4_defun([_LT_PROG_LTMAIN],
2637b9b4fd27Smrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
2638b9b4fd27Smrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
2639b9b4fd27Smrgltmain="$ac_aux_dir/ltmain.sh"
2640b9b4fd27Smrg])# _LT_PROG_LTMAIN
2641caade7ccSmrg
2642caade7ccSmrg
2643caade7ccSmrg
2644b9b4fd27Smrg# So that we can recreate a full libtool script including additional
2645b9b4fd27Smrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
2646b9b4fd27Smrg# in macros and then make a single call at the end using the `libtool'
2647b9b4fd27Smrg# label.
2648caade7ccSmrg
2649caade7ccSmrg
2650b9b4fd27Smrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
2651b9b4fd27Smrg# ----------------------------------------
2652b9b4fd27Smrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
2653b9b4fd27Smrgm4_define([_LT_CONFIG_LIBTOOL_INIT],
2654b9b4fd27Smrg[m4_ifval([$1],
2655b9b4fd27Smrg          [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
2656b9b4fd27Smrg                     [$1
2657b9b4fd27Smrg])])])
2658caade7ccSmrg
2659b9b4fd27Smrg# Initialize.
2660b9b4fd27Smrgm4_define([_LT_OUTPUT_LIBTOOL_INIT])
2661caade7ccSmrg
2662caade7ccSmrg
2663b9b4fd27Smrg# _LT_CONFIG_LIBTOOL([COMMANDS])
2664b9b4fd27Smrg# ------------------------------
2665b9b4fd27Smrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
2666b9b4fd27Smrgm4_define([_LT_CONFIG_LIBTOOL],
2667b9b4fd27Smrg[m4_ifval([$1],
2668b9b4fd27Smrg          [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
2669b9b4fd27Smrg                     [$1
2670b9b4fd27Smrg])])])
2671b9b4fd27Smrg
2672b9b4fd27Smrg# Initialize.
2673b9b4fd27Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
2674b9b4fd27Smrg
2675b9b4fd27Smrg
2676b9b4fd27Smrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
2677b9b4fd27Smrg# -----------------------------------------------------
2678b9b4fd27Smrgm4_defun([_LT_CONFIG_SAVE_COMMANDS],
2679b9b4fd27Smrg[_LT_CONFIG_LIBTOOL([$1])
2680b9b4fd27Smrg_LT_CONFIG_LIBTOOL_INIT([$2])
2681b9b4fd27Smrg])
2682caade7ccSmrg
2683b9b4fd27Smrg
2684b9b4fd27Smrg# _LT_FORMAT_COMMENT([COMMENT])
2685b9b4fd27Smrg# -----------------------------
2686b9b4fd27Smrg# Add leading comment marks to the start of each line, and a trailing
2687b9b4fd27Smrg# full-stop to the whole comment if one is not present already.
2688b9b4fd27Smrgm4_define([_LT_FORMAT_COMMENT],
2689b9b4fd27Smrg[m4_ifval([$1], [
2690b9b4fd27Smrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
2691b9b4fd27Smrg              [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
2692b9b4fd27Smrg)])
2693b9b4fd27Smrg
2694b9b4fd27Smrg
2695b9b4fd27Smrg
2696b9b4fd27Smrg
2697b9b4fd27Smrg
2698b9b4fd27Smrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
2699b9b4fd27Smrg# -------------------------------------------------------------------
2700b9b4fd27Smrg# CONFIGNAME is the name given to the value in the libtool script.
2701b9b4fd27Smrg# VARNAME is the (base) name used in the configure script.
2702b9b4fd27Smrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
2703b9b4fd27Smrg# VARNAME.  Any other value will be used directly.
2704b9b4fd27Smrgm4_define([_LT_DECL],
2705b9b4fd27Smrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
2706b9b4fd27Smrg    [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
2707b9b4fd27Smrg	[m4_ifval([$1], [$1], [$2])])
2708b9b4fd27Smrg    lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
2709b9b4fd27Smrg    m4_ifval([$4],
2710b9b4fd27Smrg	[lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
2711b9b4fd27Smrg    lt_dict_add_subkey([lt_decl_dict], [$2],
2712b9b4fd27Smrg	[tagged?], [m4_ifval([$5], [yes], [no])])])
2713caade7ccSmrg])
2714caade7ccSmrg
2715caade7ccSmrg
2716b9b4fd27Smrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
2717b9b4fd27Smrg# --------------------------------------------------------
2718b9b4fd27Smrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
2719caade7ccSmrg
2720caade7ccSmrg
2721b9b4fd27Smrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
2722b9b4fd27Smrg# ------------------------------------------------
2723b9b4fd27Smrgm4_define([lt_decl_tag_varnames],
2724b9b4fd27Smrg[_lt_decl_filter([tagged?], [yes], $@)])
2725caade7ccSmrg
2726485f0483Smrg
2727b9b4fd27Smrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
2728b9b4fd27Smrg# ---------------------------------------------------------
2729b9b4fd27Smrgm4_define([_lt_decl_filter],
2730b9b4fd27Smrg[m4_case([$#],
2731b9b4fd27Smrg  [0], [m4_fatal([$0: too few arguments: $#])],
2732b9b4fd27Smrg  [1], [m4_fatal([$0: too few arguments: $#: $1])],
2733b9b4fd27Smrg  [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
2734b9b4fd27Smrg  [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
2735b9b4fd27Smrg  [lt_dict_filter([lt_decl_dict], $@)])[]dnl
2736485f0483Smrg])
2737caade7ccSmrg
2738caade7ccSmrg
2739b9b4fd27Smrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
2740b9b4fd27Smrg# --------------------------------------------------
2741b9b4fd27Smrgm4_define([lt_decl_quote_varnames],
2742b9b4fd27Smrg[_lt_decl_filter([value], [1], $@)])
2743caade7ccSmrg
2744caade7ccSmrg
2745b9b4fd27Smrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
2746b9b4fd27Smrg# ---------------------------------------------------
2747b9b4fd27Smrgm4_define([lt_decl_dquote_varnames],
2748b9b4fd27Smrg[_lt_decl_filter([value], [2], $@)])
2749caade7ccSmrg
2750caade7ccSmrg
2751b9b4fd27Smrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
2752b9b4fd27Smrg# ---------------------------------------------------
2753b9b4fd27Smrgm4_define([lt_decl_varnames_tagged],
2754b9b4fd27Smrg[m4_assert([$# <= 2])dnl
2755b9b4fd27Smrg_$0(m4_quote(m4_default([$1], [[, ]])),
2756b9b4fd27Smrg    m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
2757b9b4fd27Smrg    m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
2758b9b4fd27Smrgm4_define([_lt_decl_varnames_tagged],
2759b9b4fd27Smrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
2760caade7ccSmrg
2761caade7ccSmrg
2762b9b4fd27Smrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
2763b9b4fd27Smrg# ------------------------------------------------
2764b9b4fd27Smrgm4_define([lt_decl_all_varnames],
2765b9b4fd27Smrg[_$0(m4_quote(m4_default([$1], [[, ]])),
2766b9b4fd27Smrg     m4_if([$2], [],
2767b9b4fd27Smrg	   m4_quote(lt_decl_varnames),
2768b9b4fd27Smrg	m4_quote(m4_shift($@))))[]dnl
2769b9b4fd27Smrg])
2770b9b4fd27Smrgm4_define([_lt_decl_all_varnames],
2771b9b4fd27Smrg[lt_join($@, lt_decl_varnames_tagged([$1],
2772b9b4fd27Smrg			lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
2773b9b4fd27Smrg])
2774caade7ccSmrg
2775caade7ccSmrg
2776b9b4fd27Smrg# _LT_CONFIG_STATUS_DECLARE([VARNAME])
2777b9b4fd27Smrg# ------------------------------------
2778b9b4fd27Smrg# Quote a variable value, and forward it to `config.status' so that its
2779b9b4fd27Smrg# declaration there will have the same value as in `configure'.  VARNAME
2780b9b4fd27Smrg# must have a single quote delimited value for this to work.
2781b9b4fd27Smrgm4_define([_LT_CONFIG_STATUS_DECLARE],
2782e8a5466aSmrg[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
2783caade7ccSmrg
2784caade7ccSmrg
2785b9b4fd27Smrg# _LT_CONFIG_STATUS_DECLARATIONS
2786b9b4fd27Smrg# ------------------------------
2787b9b4fd27Smrg# We delimit libtool config variables with single quotes, so when
2788b9b4fd27Smrg# we write them to config.status, we have to be sure to quote all
2789b9b4fd27Smrg# embedded single quotes properly.  In configure, this macro expands
2790b9b4fd27Smrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
2791b9b4fd27Smrg#
2792e8a5466aSmrg#    <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
2793b9b4fd27Smrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
2794b9b4fd27Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
2795b9b4fd27Smrg    [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
2796caade7ccSmrg
2797caade7ccSmrg
2798b9b4fd27Smrg# _LT_LIBTOOL_TAGS
2799b9b4fd27Smrg# ----------------
2800b9b4fd27Smrg# Output comment and list of tags supported by the script
2801b9b4fd27Smrgm4_defun([_LT_LIBTOOL_TAGS],
2802b9b4fd27Smrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
2803b9b4fd27Smrgavailable_tags="_LT_TAGS"dnl
2804b9b4fd27Smrg])
2805caade7ccSmrg
2806caade7ccSmrg
2807b9b4fd27Smrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
2808b9b4fd27Smrg# -----------------------------------
2809b9b4fd27Smrg# Extract the dictionary values for VARNAME (optionally with TAG) and
2810b9b4fd27Smrg# expand to a commented shell variable setting:
2811b9b4fd27Smrg#
2812b9b4fd27Smrg#    # Some comment about what VAR is for.
2813b9b4fd27Smrg#    visible_name=$lt_internal_name
2814b9b4fd27Smrgm4_define([_LT_LIBTOOL_DECLARE],
2815b9b4fd27Smrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
2816b9b4fd27Smrg					   [description])))[]dnl
2817b9b4fd27Smrgm4_pushdef([_libtool_name],
2818b9b4fd27Smrg    m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
2819b9b4fd27Smrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
2820b9b4fd27Smrg    [0], [_libtool_name=[$]$1],
2821b9b4fd27Smrg    [1], [_libtool_name=$lt_[]$1],
2822b9b4fd27Smrg    [2], [_libtool_name=$lt_[]$1],
2823b9b4fd27Smrg    [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
2824b9b4fd27Smrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
2825b9b4fd27Smrg])
2826caade7ccSmrg
2827caade7ccSmrg
2828b9b4fd27Smrg# _LT_LIBTOOL_CONFIG_VARS
2829b9b4fd27Smrg# -----------------------
2830b9b4fd27Smrg# Produce commented declarations of non-tagged libtool config variables
2831b9b4fd27Smrg# suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
2832b9b4fd27Smrg# script.  Tagged libtool config variables (even for the LIBTOOL CONFIG
2833b9b4fd27Smrg# section) are produced by _LT_LIBTOOL_TAG_VARS.
2834b9b4fd27Smrgm4_defun([_LT_LIBTOOL_CONFIG_VARS],
2835b9b4fd27Smrg[m4_foreach([_lt_var],
2836b9b4fd27Smrg    m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
2837b9b4fd27Smrg    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
2838caade7ccSmrg
2839caade7ccSmrg
2840b9b4fd27Smrg# _LT_LIBTOOL_TAG_VARS(TAG)
2841b9b4fd27Smrg# -------------------------
2842b9b4fd27Smrgm4_define([_LT_LIBTOOL_TAG_VARS],
2843b9b4fd27Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
2844b9b4fd27Smrg    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
2845caade7ccSmrg
2846b9b4fd27Smrg
2847b9b4fd27Smrg# _LT_TAGVAR(VARNAME, [TAGNAME])
2848b9b4fd27Smrg# ------------------------------
2849b9b4fd27Smrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
2850b9b4fd27Smrg
2851b9b4fd27Smrg
2852b9b4fd27Smrg# _LT_CONFIG_COMMANDS
2853b9b4fd27Smrg# -------------------
2854b9b4fd27Smrg# Send accumulated output to $CONFIG_STATUS.  Thanks to the lists of
2855b9b4fd27Smrg# variables for single and double quote escaping we saved from calls
2856b9b4fd27Smrg# to _LT_DECL, we can put quote escaped variables declarations
2857b9b4fd27Smrg# into `config.status', and then the shell code to quote escape them in
2858b9b4fd27Smrg# for loops in `config.status'.  Finally, any additional code accumulated
2859b9b4fd27Smrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
2860b9b4fd27Smrgm4_defun([_LT_CONFIG_COMMANDS],
2861b9b4fd27Smrg[AC_PROVIDE_IFELSE([LT_OUTPUT],
2862b9b4fd27Smrg	dnl If the libtool generation code has been placed in $CONFIG_LT,
2863b9b4fd27Smrg	dnl instead of duplicating it all over again into config.status,
2864b9b4fd27Smrg	dnl then we will have config.status run $CONFIG_LT later, so it
2865b9b4fd27Smrg	dnl needs to know what name is stored there:
2866b9b4fd27Smrg        [AC_CONFIG_COMMANDS([libtool],
2867b9b4fd27Smrg            [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
2868b9b4fd27Smrg    dnl If the libtool generation code is destined for config.status,
2869b9b4fd27Smrg    dnl expand the accumulated commands and init code now:
2870b9b4fd27Smrg    [AC_CONFIG_COMMANDS([libtool],
2871b9b4fd27Smrg        [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
2872b9b4fd27Smrg])#_LT_CONFIG_COMMANDS
2873b9b4fd27Smrg
2874b9b4fd27Smrg
2875b9b4fd27Smrg# Initialize.
2876b9b4fd27Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
2877b9b4fd27Smrg[
2878b9b4fd27Smrg
2879b9b4fd27Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout
2880b9b4fd27Smrg# if CDPATH is set.
2881b9b4fd27Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
2882b9b4fd27Smrg
2883b9b4fd27Smrgsed_quote_subst='$sed_quote_subst'
2884b9b4fd27Smrgdouble_quote_subst='$double_quote_subst'
2885b9b4fd27Smrgdelay_variable_subst='$delay_variable_subst'
2886b9b4fd27Smrg_LT_CONFIG_STATUS_DECLARATIONS
2887b9b4fd27SmrgLTCC='$LTCC'
2888b9b4fd27SmrgLTCFLAGS='$LTCFLAGS'
2889b9b4fd27Smrgcompiler='$compiler_DEFAULT'
2890b9b4fd27Smrg
2891e8a5466aSmrg# A function that is used when there is no print builtin or printf.
2892e8a5466aSmrgfunc_fallback_echo ()
2893e8a5466aSmrg{
2894e8a5466aSmrg  eval 'cat <<_LTECHO_EOF
2895e8a5466aSmrg\$[]1
2896e8a5466aSmrg_LTECHO_EOF'
2897e8a5466aSmrg}
2898e8a5466aSmrg
2899b9b4fd27Smrg# Quote evaled strings.
2900b9b4fd27Smrgfor var in lt_decl_all_varnames([[ \
2901b9b4fd27Smrg]], lt_decl_quote_varnames); do
2902e8a5466aSmrg    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
2903b9b4fd27Smrg    *[[\\\\\\\`\\"\\\$]]*)
2904e8a5466aSmrg      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
2905caade7ccSmrg      ;;
2906b9b4fd27Smrg    *)
2907b9b4fd27Smrg      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
2908caade7ccSmrg      ;;
2909caade7ccSmrg    esac
2910b9b4fd27Smrgdone
2911caade7ccSmrg
2912b9b4fd27Smrg# Double-quote double-evaled strings.
2913b9b4fd27Smrgfor var in lt_decl_all_varnames([[ \
2914b9b4fd27Smrg]], lt_decl_dquote_varnames); do
2915e8a5466aSmrg    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
2916b9b4fd27Smrg    *[[\\\\\\\`\\"\\\$]]*)
2917e8a5466aSmrg      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
2918b9b4fd27Smrg      ;;
2919b9b4fd27Smrg    *)
2920b9b4fd27Smrg      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
2921caade7ccSmrg      ;;
2922caade7ccSmrg    esac
2923b9b4fd27Smrgdone
2924caade7ccSmrg
2925b9b4fd27Smrg_LT_OUTPUT_LIBTOOL_INIT
2926b9b4fd27Smrg])
2927caade7ccSmrg
2928e8a5466aSmrg# _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
2929e8a5466aSmrg# ------------------------------------
2930e8a5466aSmrg# Generate a child script FILE with all initialization necessary to
2931e8a5466aSmrg# reuse the environment learned by the parent script, and make the
2932e8a5466aSmrg# file executable.  If COMMENT is supplied, it is inserted after the
2933e8a5466aSmrg# `#!' sequence but before initialization text begins.  After this
2934e8a5466aSmrg# macro, additional text can be appended to FILE to form the body of
2935e8a5466aSmrg# the child script.  The macro ends with non-zero status if the
2936e8a5466aSmrg# file could not be fully written (such as if the disk is full).
2937e8a5466aSmrgm4_ifdef([AS_INIT_GENERATED],
2938e8a5466aSmrg[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
2939e8a5466aSmrg[m4_defun([_LT_GENERATED_FILE_INIT],
2940e8a5466aSmrg[m4_require([AS_PREPARE])]dnl
2941e8a5466aSmrg[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
2942e8a5466aSmrg[lt_write_fail=0
2943e8a5466aSmrgcat >$1 <<_ASEOF || lt_write_fail=1
2944e8a5466aSmrg#! $SHELL
2945e8a5466aSmrg# Generated by $as_me.
2946e8a5466aSmrg$2
2947e8a5466aSmrgSHELL=\${CONFIG_SHELL-$SHELL}
2948e8a5466aSmrgexport SHELL
2949e8a5466aSmrg_ASEOF
2950e8a5466aSmrgcat >>$1 <<\_ASEOF || lt_write_fail=1
2951e8a5466aSmrgAS_SHELL_SANITIZE
2952e8a5466aSmrg_AS_PREPARE
2953e8a5466aSmrgexec AS_MESSAGE_FD>&1
2954e8a5466aSmrg_ASEOF
2955e8a5466aSmrgtest $lt_write_fail = 0 && chmod +x $1[]dnl
2956e8a5466aSmrgm4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
2957caade7ccSmrg
2958b9b4fd27Smrg# LT_OUTPUT
2959b9b4fd27Smrg# ---------
2960b9b4fd27Smrg# This macro allows early generation of the libtool script (before
2961b9b4fd27Smrg# AC_OUTPUT is called), incase it is used in configure for compilation
2962b9b4fd27Smrg# tests.
2963b9b4fd27SmrgAC_DEFUN([LT_OUTPUT],
2964b9b4fd27Smrg[: ${CONFIG_LT=./config.lt}
2965b9b4fd27SmrgAC_MSG_NOTICE([creating $CONFIG_LT])
2966e8a5466aSmrg_LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
2967e8a5466aSmrg[# Run this file to recreate a libtool stub with the current configuration.])
2968b9b4fd27Smrg
2969b9b4fd27Smrgcat >>"$CONFIG_LT" <<\_LTEOF
2970e8a5466aSmrglt_cl_silent=false
2971b9b4fd27Smrgexec AS_MESSAGE_LOG_FD>>config.log
2972b9b4fd27Smrg{
2973b9b4fd27Smrg  echo
2974b9b4fd27Smrg  AS_BOX([Running $as_me.])
2975b9b4fd27Smrg} >&AS_MESSAGE_LOG_FD
2976caade7ccSmrg
2977b9b4fd27Smrglt_cl_help="\
2978b9b4fd27Smrg\`$as_me' creates a local libtool stub from the current configuration,
2979b9b4fd27Smrgfor use in further configure time tests before the real libtool is
2980b9b4fd27Smrggenerated.
2981caade7ccSmrg
2982b9b4fd27SmrgUsage: $[0] [[OPTIONS]]
2983caade7ccSmrg
2984b9b4fd27Smrg  -h, --help      print this help, then exit
2985b9b4fd27Smrg  -V, --version   print version number, then exit
2986b9b4fd27Smrg  -q, --quiet     do not print progress messages
2987b9b4fd27Smrg  -d, --debug     don't remove temporary files
2988caade7ccSmrg
2989b9b4fd27SmrgReport bugs to <bug-libtool@gnu.org>."
2990caade7ccSmrg
2991b9b4fd27Smrglt_cl_version="\
2992b9b4fd27Smrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
2993b9b4fd27Smrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
2994b9b4fd27Smrgconfigured by $[0], generated by m4_PACKAGE_STRING.
2995b9b4fd27Smrg
2996e8a5466aSmrgCopyright (C) 2010 Free Software Foundation, Inc.
2997b9b4fd27SmrgThis config.lt script is free software; the Free Software Foundation
2998b9b4fd27Smrggives unlimited permision to copy, distribute and modify it."
2999b9b4fd27Smrg
3000b9b4fd27Smrgwhile test $[#] != 0
3001b9b4fd27Smrgdo
3002b9b4fd27Smrg  case $[1] in
3003b9b4fd27Smrg    --version | --v* | -V )
3004b9b4fd27Smrg      echo "$lt_cl_version"; exit 0 ;;
3005b9b4fd27Smrg    --help | --h* | -h )
3006b9b4fd27Smrg      echo "$lt_cl_help"; exit 0 ;;
3007b9b4fd27Smrg    --debug | --d* | -d )
3008b9b4fd27Smrg      debug=: ;;
3009b9b4fd27Smrg    --quiet | --q* | --silent | --s* | -q )
3010b9b4fd27Smrg      lt_cl_silent=: ;;
3011b9b4fd27Smrg
3012b9b4fd27Smrg    -*) AC_MSG_ERROR([unrecognized option: $[1]
3013b9b4fd27SmrgTry \`$[0] --help' for more information.]) ;;
3014b9b4fd27Smrg
3015b9b4fd27Smrg    *) AC_MSG_ERROR([unrecognized argument: $[1]
3016b9b4fd27SmrgTry \`$[0] --help' for more information.]) ;;
3017b9b4fd27Smrg  esac
3018b9b4fd27Smrg  shift
3019b9b4fd27Smrgdone
3020b9b4fd27Smrg
3021b9b4fd27Smrgif $lt_cl_silent; then
3022b9b4fd27Smrg  exec AS_MESSAGE_FD>/dev/null
3023b9b4fd27Smrgfi
3024b9b4fd27Smrg_LTEOF
3025b9b4fd27Smrg
3026b9b4fd27Smrgcat >>"$CONFIG_LT" <<_LTEOF
3027b9b4fd27Smrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
3028b9b4fd27Smrg_LTEOF
3029b9b4fd27Smrg
3030b9b4fd27Smrgcat >>"$CONFIG_LT" <<\_LTEOF
3031b9b4fd27SmrgAC_MSG_NOTICE([creating $ofile])
3032b9b4fd27Smrg_LT_OUTPUT_LIBTOOL_COMMANDS
3033b9b4fd27SmrgAS_EXIT(0)
3034b9b4fd27Smrg_LTEOF
3035b9b4fd27Smrgchmod +x "$CONFIG_LT"
3036b9b4fd27Smrg
3037b9b4fd27Smrg# configure is writing to config.log, but config.lt does its own redirection,
3038b9b4fd27Smrg# appending to config.log, which fails on DOS, as config.log is still kept
3039b9b4fd27Smrg# open by configure.  Here we exec the FD to /dev/null, effectively closing
3040b9b4fd27Smrg# config.log, so it can be properly (re)opened and appended to by config.lt.
3041e8a5466aSmrglt_cl_success=:
3042e8a5466aSmrgtest "$silent" = yes &&
3043e8a5466aSmrg  lt_config_lt_args="$lt_config_lt_args --quiet"
3044e8a5466aSmrgexec AS_MESSAGE_LOG_FD>/dev/null
3045e8a5466aSmrg$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
3046e8a5466aSmrgexec AS_MESSAGE_LOG_FD>>config.log
3047e8a5466aSmrg$lt_cl_success || AS_EXIT(1)
3048b9b4fd27Smrg])# LT_OUTPUT
3049caade7ccSmrg
3050caade7ccSmrg
3051b9b4fd27Smrg# _LT_CONFIG(TAG)
3052b9b4fd27Smrg# ---------------
3053b9b4fd27Smrg# If TAG is the built-in tag, create an initial libtool script with a
3054b9b4fd27Smrg# default configuration from the untagged config vars.  Otherwise add code
3055b9b4fd27Smrg# to config.status for appending the configuration named by TAG from the
3056b9b4fd27Smrg# matching tagged config vars.
3057b9b4fd27Smrgm4_defun([_LT_CONFIG],
3058b9b4fd27Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3059b9b4fd27Smrg_LT_CONFIG_SAVE_COMMANDS([
3060b9b4fd27Smrg  m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
3061b9b4fd27Smrg  m4_if(_LT_TAG, [C], [
3062b9b4fd27Smrg    # See if we are running on zsh, and set the options which allow our
3063b9b4fd27Smrg    # commands through without removal of \ escapes.
3064b9b4fd27Smrg    if test -n "${ZSH_VERSION+set}" ; then
3065b9b4fd27Smrg      setopt NO_GLOB_SUBST
3066b9b4fd27Smrg    fi
3067caade7ccSmrg
3068b9b4fd27Smrg    cfgfile="${ofile}T"
3069b9b4fd27Smrg    trap "$RM \"$cfgfile\"; exit 1" 1 2 15
3070b9b4fd27Smrg    $RM "$cfgfile"
3071caade7ccSmrg
3072b9b4fd27Smrg    cat <<_LT_EOF >> "$cfgfile"
3073b9b4fd27Smrg#! $SHELL
3074caade7ccSmrg
3075b9b4fd27Smrg# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
3076b9b4fd27Smrg# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
3077b9b4fd27Smrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
3078b9b4fd27Smrg# NOTE: Changes made to this file will be lost: look at ltmain.sh.
3079b9b4fd27Smrg#
3080b9b4fd27Smrg_LT_COPYING
3081b9b4fd27Smrg_LT_LIBTOOL_TAGS
3082caade7ccSmrg
3083b9b4fd27Smrg# ### BEGIN LIBTOOL CONFIG
3084b9b4fd27Smrg_LT_LIBTOOL_CONFIG_VARS
3085b9b4fd27Smrg_LT_LIBTOOL_TAG_VARS
3086b9b4fd27Smrg# ### END LIBTOOL CONFIG
3087caade7ccSmrg
3088b9b4fd27Smrg_LT_EOF
3089caade7ccSmrg
3090b9b4fd27Smrg  case $host_os in
3091b9b4fd27Smrg  aix3*)
3092b9b4fd27Smrg    cat <<\_LT_EOF >> "$cfgfile"
3093b9b4fd27Smrg# AIX sometimes has problems with the GCC collect2 program.  For some
3094b9b4fd27Smrg# reason, if we set the COLLECT_NAMES environment variable, the problems
3095b9b4fd27Smrg# vanish in a puff of smoke.
3096b9b4fd27Smrgif test "X${COLLECT_NAMES+set}" != Xset; then
3097b9b4fd27Smrg  COLLECT_NAMES=
3098b9b4fd27Smrg  export COLLECT_NAMES
3099b9b4fd27Smrgfi
3100b9b4fd27Smrg_LT_EOF
3101caade7ccSmrg    ;;
3102caade7ccSmrg  esac
3103caade7ccSmrg
3104b9b4fd27Smrg  _LT_PROG_LTMAIN
3105caade7ccSmrg
3106b9b4fd27Smrg  # We use sed instead of cat because bash on DJGPP gets confused if
3107b9b4fd27Smrg  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
3108b9b4fd27Smrg  # text mode, it properly converts lines to CR/LF.  This bash problem
3109b9b4fd27Smrg  # is reportedly fixed, but why not run on old versions too?
3110b9b4fd27Smrg  sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
3111b9b4fd27Smrg    || (rm -f "$cfgfile"; exit 1)
3112caade7ccSmrg
3113b9b4fd27Smrg  _LT_PROG_XSI_SHELLFNS
3114caade7ccSmrg
3115b9b4fd27Smrg  sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
3116b9b4fd27Smrg    || (rm -f "$cfgfile"; exit 1)
3117caade7ccSmrg
3118b9b4fd27Smrg  mv -f "$cfgfile" "$ofile" ||
3119b9b4fd27Smrg    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
3120b9b4fd27Smrg  chmod +x "$ofile"
3121b9b4fd27Smrg],
3122b9b4fd27Smrg[cat <<_LT_EOF >> "$ofile"
3123caade7ccSmrg
3124b9b4fd27Smrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
3125b9b4fd27Smrgdnl in a comment (ie after a #).
3126b9b4fd27Smrg# ### BEGIN LIBTOOL TAG CONFIG: $1
3127b9b4fd27Smrg_LT_LIBTOOL_TAG_VARS(_LT_TAG)
3128b9b4fd27Smrg# ### END LIBTOOL TAG CONFIG: $1
3129b9b4fd27Smrg_LT_EOF
3130b9b4fd27Smrg])dnl /m4_if
3131b9b4fd27Smrg],
3132b9b4fd27Smrg[m4_if([$1], [], [
3133b9b4fd27Smrg    PACKAGE='$PACKAGE'
3134b9b4fd27Smrg    VERSION='$VERSION'
3135b9b4fd27Smrg    TIMESTAMP='$TIMESTAMP'
3136b9b4fd27Smrg    RM='$RM'
3137b9b4fd27Smrg    ofile='$ofile'], [])
3138b9b4fd27Smrg])dnl /_LT_CONFIG_SAVE_COMMANDS
3139b9b4fd27Smrg])# _LT_CONFIG
3140caade7ccSmrg
3141caade7ccSmrg
3142b9b4fd27Smrg# LT_SUPPORTED_TAG(TAG)
3143b9b4fd27Smrg# ---------------------
3144b9b4fd27Smrg# Trace this macro to discover what tags are supported by the libtool
3145b9b4fd27Smrg# --tag option, using:
3146b9b4fd27Smrg#    autoconf --trace 'LT_SUPPORTED_TAG:$1'
3147b9b4fd27SmrgAC_DEFUN([LT_SUPPORTED_TAG], [])
3148caade7ccSmrg
3149caade7ccSmrg
3150b9b4fd27Smrg# C support is built-in for now
3151b9b4fd27Smrgm4_define([_LT_LANG_C_enabled], [])
3152b9b4fd27Smrgm4_define([_LT_TAGS], [])
3153caade7ccSmrg
3154caade7ccSmrg
3155b9b4fd27Smrg# LT_LANG(LANG)
3156b9b4fd27Smrg# -------------
3157b9b4fd27Smrg# Enable libtool support for the given language if not already enabled.
3158b9b4fd27SmrgAC_DEFUN([LT_LANG],
3159b9b4fd27Smrg[AC_BEFORE([$0], [LT_OUTPUT])dnl
3160b9b4fd27Smrgm4_case([$1],
3161b9b4fd27Smrg  [C],			[_LT_LANG(C)],
3162b9b4fd27Smrg  [C++],		[_LT_LANG(CXX)],
3163b9b4fd27Smrg  [Java],		[_LT_LANG(GCJ)],
3164b9b4fd27Smrg  [Fortran 77],		[_LT_LANG(F77)],
3165b9b4fd27Smrg  [Fortran],		[_LT_LANG(FC)],
3166b9b4fd27Smrg  [Windows Resource],	[_LT_LANG(RC)],
3167b9b4fd27Smrg  [m4_ifdef([_LT_LANG_]$1[_CONFIG],
3168b9b4fd27Smrg    [_LT_LANG($1)],
3169b9b4fd27Smrg    [m4_fatal([$0: unsupported language: "$1"])])])dnl
3170b9b4fd27Smrg])# LT_LANG
3171b9b4fd27Smrg
3172b9b4fd27Smrg
3173b9b4fd27Smrg# _LT_LANG(LANGNAME)
3174b9b4fd27Smrg# ------------------
3175b9b4fd27Smrgm4_defun([_LT_LANG],
3176b9b4fd27Smrg[m4_ifdef([_LT_LANG_]$1[_enabled], [],
3177b9b4fd27Smrg  [LT_SUPPORTED_TAG([$1])dnl
3178b9b4fd27Smrg  m4_append([_LT_TAGS], [$1 ])dnl
3179b9b4fd27Smrg  m4_define([_LT_LANG_]$1[_enabled], [])dnl
3180b9b4fd27Smrg  _LT_LANG_$1_CONFIG($1)])dnl
3181b9b4fd27Smrg])# _LT_LANG
3182caade7ccSmrg
3183caade7ccSmrg
3184b9b4fd27Smrg# _LT_LANG_DEFAULT_CONFIG
3185b9b4fd27Smrg# -----------------------
3186b9b4fd27Smrgm4_defun([_LT_LANG_DEFAULT_CONFIG],
3187b9b4fd27Smrg[AC_PROVIDE_IFELSE([AC_PROG_CXX],
3188b9b4fd27Smrg  [LT_LANG(CXX)],
3189b9b4fd27Smrg  [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
3190b9b4fd27Smrg
3191b9b4fd27SmrgAC_PROVIDE_IFELSE([AC_PROG_F77],
3192b9b4fd27Smrg  [LT_LANG(F77)],
3193b9b4fd27Smrg  [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
3194b9b4fd27Smrg
3195b9b4fd27SmrgAC_PROVIDE_IFELSE([AC_PROG_FC],
3196b9b4fd27Smrg  [LT_LANG(FC)],
3197b9b4fd27Smrg  [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
3198b9b4fd27Smrg
3199b9b4fd27Smrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
3200b9b4fd27Smrgdnl pulling things in needlessly.
3201b9b4fd27SmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ],
3202b9b4fd27Smrg  [LT_LANG(GCJ)],
3203b9b4fd27Smrg  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
3204b9b4fd27Smrg    [LT_LANG(GCJ)],
3205b9b4fd27Smrg    [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
3206b9b4fd27Smrg      [LT_LANG(GCJ)],
3207b9b4fd27Smrg      [m4_ifdef([AC_PROG_GCJ],
3208b9b4fd27Smrg	[m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
3209b9b4fd27Smrg       m4_ifdef([A][M_PROG_GCJ],
3210b9b4fd27Smrg	[m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
3211b9b4fd27Smrg       m4_ifdef([LT_PROG_GCJ],
3212b9b4fd27Smrg	[m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
3213b9b4fd27Smrg
3214b9b4fd27SmrgAC_PROVIDE_IFELSE([LT_PROG_RC],
3215b9b4fd27Smrg  [LT_LANG(RC)],
3216b9b4fd27Smrg  [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
3217b9b4fd27Smrg])# _LT_LANG_DEFAULT_CONFIG
3218b9b4fd27Smrg
3219b9b4fd27Smrg# Obsolete macros:
3220b9b4fd27SmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
3221b9b4fd27SmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
3222b9b4fd27SmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
3223b9b4fd27SmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
3224e8a5466aSmrgAU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
3225b9b4fd27Smrgdnl aclocal-1.4 backwards compatibility:
3226b9b4fd27Smrgdnl AC_DEFUN([AC_LIBTOOL_CXX], [])
3227b9b4fd27Smrgdnl AC_DEFUN([AC_LIBTOOL_F77], [])
3228b9b4fd27Smrgdnl AC_DEFUN([AC_LIBTOOL_FC], [])
3229b9b4fd27Smrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
3230e8a5466aSmrgdnl AC_DEFUN([AC_LIBTOOL_RC], [])
3231b9b4fd27Smrg
3232b9b4fd27Smrg
3233b9b4fd27Smrg# _LT_TAG_COMPILER
3234b9b4fd27Smrg# ----------------
3235b9b4fd27Smrgm4_defun([_LT_TAG_COMPILER],
3236b9b4fd27Smrg[AC_REQUIRE([AC_PROG_CC])dnl
3237caade7ccSmrg
3238b9b4fd27Smrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
3239b9b4fd27Smrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
3240b9b4fd27Smrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
3241b9b4fd27Smrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
3242caade7ccSmrg
3243b9b4fd27Smrg# If no C compiler was specified, use CC.
3244b9b4fd27SmrgLTCC=${LTCC-"$CC"}
3245caade7ccSmrg
3246b9b4fd27Smrg# If no C compiler flags were specified, use CFLAGS.
3247b9b4fd27SmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"}
3248caade7ccSmrg
3249b9b4fd27Smrg# Allow CC to be a program name with arguments.
3250b9b4fd27Smrgcompiler=$CC
3251b9b4fd27Smrg])# _LT_TAG_COMPILER
3252caade7ccSmrg
3253caade7ccSmrg
3254b9b4fd27Smrg# _LT_COMPILER_BOILERPLATE
3255b9b4fd27Smrg# ------------------------
3256b9b4fd27Smrg# Check for compiler boilerplate output or warnings with
3257b9b4fd27Smrg# the simple compiler test code.
3258b9b4fd27Smrgm4_defun([_LT_COMPILER_BOILERPLATE],
3259b9b4fd27Smrg[m4_require([_LT_DECL_SED])dnl
3260b9b4fd27Smrgac_outfile=conftest.$ac_objext
3261b9b4fd27Smrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext
3262b9b4fd27Smrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
3263b9b4fd27Smrg_lt_compiler_boilerplate=`cat conftest.err`
3264b9b4fd27Smrg$RM conftest*
3265b9b4fd27Smrg])# _LT_COMPILER_BOILERPLATE
3266caade7ccSmrg
3267caade7ccSmrg
3268b9b4fd27Smrg# _LT_LINKER_BOILERPLATE
3269b9b4fd27Smrg# ----------------------
3270b9b4fd27Smrg# Check for linker boilerplate output or warnings with
3271b9b4fd27Smrg# the simple link test code.
3272b9b4fd27Smrgm4_defun([_LT_LINKER_BOILERPLATE],
3273b9b4fd27Smrg[m4_require([_LT_DECL_SED])dnl
3274b9b4fd27Smrgac_outfile=conftest.$ac_objext
3275b9b4fd27Smrgecho "$lt_simple_link_test_code" >conftest.$ac_ext
3276b9b4fd27Smrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
3277b9b4fd27Smrg_lt_linker_boilerplate=`cat conftest.err`
3278b9b4fd27Smrg$RM -r conftest*
3279b9b4fd27Smrg])# _LT_LINKER_BOILERPLATE
3280caade7ccSmrg
3281b9b4fd27Smrg# _LT_REQUIRED_DARWIN_CHECKS
3282b9b4fd27Smrg# -------------------------
3283b9b4fd27Smrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
3284b9b4fd27Smrg  case $host_os in
3285b9b4fd27Smrg    rhapsody* | darwin*)
3286b9b4fd27Smrg    AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
3287b9b4fd27Smrg    AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
3288b9b4fd27Smrg    AC_CHECK_TOOL([LIPO], [lipo], [:])
3289b9b4fd27Smrg    AC_CHECK_TOOL([OTOOL], [otool], [:])
3290b9b4fd27Smrg    AC_CHECK_TOOL([OTOOL64], [otool64], [:])
3291b9b4fd27Smrg    _LT_DECL([], [DSYMUTIL], [1],
3292b9b4fd27Smrg      [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
3293b9b4fd27Smrg    _LT_DECL([], [NMEDIT], [1],
3294b9b4fd27Smrg      [Tool to change global to local symbols on Mac OS X])
3295b9b4fd27Smrg    _LT_DECL([], [LIPO], [1],
3296b9b4fd27Smrg      [Tool to manipulate fat objects and archives on Mac OS X])
3297b9b4fd27Smrg    _LT_DECL([], [OTOOL], [1],
3298b9b4fd27Smrg      [ldd/readelf like tool for Mach-O binaries on Mac OS X])
3299b9b4fd27Smrg    _LT_DECL([], [OTOOL64], [1],
3300b9b4fd27Smrg      [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
3301caade7ccSmrg
3302b9b4fd27Smrg    AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
3303b9b4fd27Smrg      [lt_cv_apple_cc_single_mod=no
3304b9b4fd27Smrg      if test -z "${LT_MULTI_MODULE}"; then
3305b9b4fd27Smrg	# By default we will add the -single_module flag. You can override
3306b9b4fd27Smrg	# by either setting the environment variable LT_MULTI_MODULE
3307b9b4fd27Smrg	# non-empty at configure time, or by adding -multi_module to the
3308b9b4fd27Smrg	# link flags.
3309b9b4fd27Smrg	rm -rf libconftest.dylib*
3310b9b4fd27Smrg	echo "int foo(void){return 1;}" > conftest.c
3311b9b4fd27Smrg	echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
3312b9b4fd27Smrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
3313b9b4fd27Smrg	$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
3314b9b4fd27Smrg	  -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
3315b9b4fd27Smrg        _lt_result=$?
3316b9b4fd27Smrg	if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
3317b9b4fd27Smrg	  lt_cv_apple_cc_single_mod=yes
3318b9b4fd27Smrg	else
3319b9b4fd27Smrg	  cat conftest.err >&AS_MESSAGE_LOG_FD
3320b9b4fd27Smrg	fi
3321b9b4fd27Smrg	rm -rf libconftest.dylib*
3322b9b4fd27Smrg	rm -f conftest.*
3323b9b4fd27Smrg      fi])
3324b9b4fd27Smrg    AC_CACHE_CHECK([for -exported_symbols_list linker flag],
3325b9b4fd27Smrg      [lt_cv_ld_exported_symbols_list],
3326b9b4fd27Smrg      [lt_cv_ld_exported_symbols_list=no
3327b9b4fd27Smrg      save_LDFLAGS=$LDFLAGS
3328b9b4fd27Smrg      echo "_main" > conftest.sym
3329b9b4fd27Smrg      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
3330b9b4fd27Smrg      AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
3331b9b4fd27Smrg	[lt_cv_ld_exported_symbols_list=yes],
3332b9b4fd27Smrg	[lt_cv_ld_exported_symbols_list=no])
3333b9b4fd27Smrg	LDFLAGS="$save_LDFLAGS"
3334b9b4fd27Smrg    ])
3335e8a5466aSmrg    AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
3336e8a5466aSmrg      [lt_cv_ld_force_load=no
3337e8a5466aSmrg      cat > conftest.c << _LT_EOF
3338e8a5466aSmrgint forced_loaded() { return 2;}
3339e8a5466aSmrg_LT_EOF
3340e8a5466aSmrg      echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
3341e8a5466aSmrg      $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
3342e8a5466aSmrg      echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
3343e8a5466aSmrg      $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
3344e8a5466aSmrg      echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
3345e8a5466aSmrg      $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
3346e8a5466aSmrg      cat > conftest.c << _LT_EOF
3347e8a5466aSmrgint main() { return 0;}
3348e8a5466aSmrg_LT_EOF
3349e8a5466aSmrg      echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
3350e8a5466aSmrg      $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
3351e8a5466aSmrg      _lt_result=$?
3352e8a5466aSmrg      if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then
3353e8a5466aSmrg	lt_cv_ld_force_load=yes
3354e8a5466aSmrg      else
3355e8a5466aSmrg	cat conftest.err >&AS_MESSAGE_LOG_FD
3356e8a5466aSmrg      fi
3357e8a5466aSmrg        rm -f conftest.err libconftest.a conftest conftest.c
3358e8a5466aSmrg        rm -rf conftest.dSYM
3359e8a5466aSmrg    ])
3360b9b4fd27Smrg    case $host_os in
3361b9b4fd27Smrg    rhapsody* | darwin1.[[012]])
3362b9b4fd27Smrg      _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
3363b9b4fd27Smrg    darwin1.*)
3364b9b4fd27Smrg      _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
3365b9b4fd27Smrg    darwin*) # darwin 5.x on
3366b9b4fd27Smrg      # if running on 10.5 or later, the deployment target defaults
3367b9b4fd27Smrg      # to the OS version, if on x86, and 10.4, the deployment
3368b9b4fd27Smrg      # target defaults to 10.4. Don't you love it?
3369b9b4fd27Smrg      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
3370b9b4fd27Smrg	10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
3371b9b4fd27Smrg	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
3372b9b4fd27Smrg	10.[[012]]*)
3373b9b4fd27Smrg	  _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
3374b9b4fd27Smrg	10.*)
3375b9b4fd27Smrg	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
3376b9b4fd27Smrg      esac
3377caade7ccSmrg    ;;
3378caade7ccSmrg  esac
3379b9b4fd27Smrg    if test "$lt_cv_apple_cc_single_mod" = "yes"; then
3380b9b4fd27Smrg      _lt_dar_single_mod='$single_module'
3381b9b4fd27Smrg    fi
3382b9b4fd27Smrg    if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
3383b9b4fd27Smrg      _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
3384b9b4fd27Smrg    else
3385b9b4fd27Smrg      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
3386b9b4fd27Smrg    fi
3387e8a5466aSmrg    if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
3388b9b4fd27Smrg      _lt_dsymutil='~$DSYMUTIL $lib || :'
3389b9b4fd27Smrg    else
3390b9b4fd27Smrg      _lt_dsymutil=
3391b9b4fd27Smrg    fi
3392b9b4fd27Smrg    ;;
3393caade7ccSmrg  esac
3394b9b4fd27Smrg])
3395caade7ccSmrg
3396b9b4fd27Smrg
3397b9b4fd27Smrg# _LT_DARWIN_LINKER_FEATURES
3398b9b4fd27Smrg# --------------------------
3399b9b4fd27Smrg# Checks for linker and compiler features on darwin
3400b9b4fd27Smrgm4_defun([_LT_DARWIN_LINKER_FEATURES],
3401b9b4fd27Smrg[
3402b9b4fd27Smrg  m4_require([_LT_REQUIRED_DARWIN_CHECKS])
3403b9b4fd27Smrg  _LT_TAGVAR(archive_cmds_need_lc, $1)=no
3404b9b4fd27Smrg  _LT_TAGVAR(hardcode_direct, $1)=no
3405b9b4fd27Smrg  _LT_TAGVAR(hardcode_automatic, $1)=yes
3406b9b4fd27Smrg  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
3407e8a5466aSmrg  if test "$lt_cv_ld_force_load" = "yes"; then
3408e8a5466aSmrg    _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\"`'
3409e8a5466aSmrg  else
3410e8a5466aSmrg    _LT_TAGVAR(whole_archive_flag_spec, $1)=''
3411e8a5466aSmrg  fi
3412b9b4fd27Smrg  _LT_TAGVAR(link_all_deplibs, $1)=yes
3413b9b4fd27Smrg  _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
3414b9b4fd27Smrg  case $cc_basename in
3415b9b4fd27Smrg     ifort*) _lt_dar_can_shared=yes ;;
3416b9b4fd27Smrg     *) _lt_dar_can_shared=$GCC ;;
3417caade7ccSmrg  esac
3418b9b4fd27Smrg  if test "$_lt_dar_can_shared" = "yes"; then
3419e8a5466aSmrg    output_verbose_link_cmd=func_echo_all
3420b9b4fd27Smrg    _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}"
3421b9b4fd27Smrg    _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
3422b9b4fd27Smrg    _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}"
3423b9b4fd27Smrg    _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}"
3424b9b4fd27Smrg    m4_if([$1], [CXX],
3425b9b4fd27Smrg[   if test "$lt_cv_apple_cc_single_mod" != "yes"; then
3426b9b4fd27Smrg      _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}"
3427b9b4fd27Smrg      _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}"
3428b9b4fd27Smrg    fi
3429b9b4fd27Smrg],[])
3430b9b4fd27Smrg  else
3431b9b4fd27Smrg  _LT_TAGVAR(ld_shlibs, $1)=no
3432b9b4fd27Smrg  fi
3433b9b4fd27Smrg])
3434caade7ccSmrg
3435b9b4fd27Smrg# _LT_SYS_MODULE_PATH_AIX
3436b9b4fd27Smrg# -----------------------
3437b9b4fd27Smrg# Links a minimal program and checks the executable
3438b9b4fd27Smrg# for the system default hardcoded library path. In most cases,
3439b9b4fd27Smrg# this is /usr/lib:/lib, but when the MPI compilers are used
3440b9b4fd27Smrg# the location of the communication and MPI libs are included too.
3441b9b4fd27Smrg# If we don't find anything, use the default library path according
3442b9b4fd27Smrg# to the aix ld manual.
3443b9b4fd27Smrgm4_defun([_LT_SYS_MODULE_PATH_AIX],
3444b9b4fd27Smrg[m4_require([_LT_DECL_SED])dnl
3445b9b4fd27SmrgAC_LINK_IFELSE(AC_LANG_PROGRAM,[
3446b9b4fd27Smrglt_aix_libpath_sed='
3447b9b4fd27Smrg    /Import File Strings/,/^$/ {
3448b9b4fd27Smrg	/^0/ {
3449b9b4fd27Smrg	    s/^0  *\(.*\)$/\1/
3450b9b4fd27Smrg	    p
3451b9b4fd27Smrg	}
3452b9b4fd27Smrg    }'
3453b9b4fd27Smrgaix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
3454b9b4fd27Smrg# Check for a 64-bit object if we didn't find anything.
3455b9b4fd27Smrgif test -z "$aix_libpath"; then
3456b9b4fd27Smrg  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
3457b9b4fd27Smrgfi],[])
3458b9b4fd27Smrgif test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
3459b9b4fd27Smrg])# _LT_SYS_MODULE_PATH_AIX
3460caade7ccSmrg
3461caade7ccSmrg
3462b9b4fd27Smrg# _LT_SHELL_INIT(ARG)
3463b9b4fd27Smrg# -------------------
3464b9b4fd27Smrgm4_define([_LT_SHELL_INIT],
3465e8a5466aSmrg[m4_divert_text([M4SH-INIT], [$1
3466e8a5466aSmrg])])# _LT_SHELL_INIT
3467e8a5466aSmrg
3468caade7ccSmrg
3469caade7ccSmrg
3470b9b4fd27Smrg# _LT_PROG_ECHO_BACKSLASH
3471b9b4fd27Smrg# -----------------------
3472e8a5466aSmrg# Find how we can fake an echo command that does not interpret backslash.
3473e8a5466aSmrg# In particular, with Autoconf 2.60 or later we add some code to the start
3474e8a5466aSmrg# of the generated configure script which will find a shell with a builtin
3475e8a5466aSmrg# printf (which we can use as an echo command).
3476b9b4fd27Smrgm4_defun([_LT_PROG_ECHO_BACKSLASH],
3477e8a5466aSmrg[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
3478e8a5466aSmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
3479e8a5466aSmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
3480e8a5466aSmrg
3481e8a5466aSmrgAC_MSG_CHECKING([how to print strings])
3482e8a5466aSmrg# Test print first, because it will be a builtin if present.
3483e8a5466aSmrgif test "X`print -r -- -n 2>/dev/null`" = X-n && \
3484e8a5466aSmrg   test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
3485e8a5466aSmrg  ECHO='print -r --'
3486e8a5466aSmrgelif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
3487e8a5466aSmrg  ECHO='printf %s\n'
3488caade7ccSmrgelse
3489e8a5466aSmrg  # Use this function as a fallback that always works.
3490e8a5466aSmrg  func_fallback_echo ()
3491e8a5466aSmrg  {
3492e8a5466aSmrg    eval 'cat <<_LTECHO_EOF
3493e8a5466aSmrg$[]1
3494e8a5466aSmrg_LTECHO_EOF'
3495e8a5466aSmrg  }
3496e8a5466aSmrg  ECHO='func_fallback_echo'
3497caade7ccSmrgfi
3498caade7ccSmrg
3499e8a5466aSmrg# func_echo_all arg...
3500e8a5466aSmrg# Invoke $ECHO with all args, space-separated.
3501e8a5466aSmrgfunc_echo_all ()
3502e8a5466aSmrg{
3503e8a5466aSmrg    $ECHO "$*" 
3504e8a5466aSmrg}
3505b9b4fd27Smrg
3506e8a5466aSmrgcase "$ECHO" in
3507e8a5466aSmrg  printf*) AC_MSG_RESULT([printf]) ;;
3508e8a5466aSmrg  print*) AC_MSG_RESULT([print -r]) ;;
3509e8a5466aSmrg  *) AC_MSG_RESULT([cat]) ;;
3510e8a5466aSmrgesac
3511b9b4fd27Smrg
3512e8a5466aSmrgm4_ifdef([_AS_DETECT_SUGGESTED],
3513e8a5466aSmrg[_AS_DETECT_SUGGESTED([
3514e8a5466aSmrg  test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
3515e8a5466aSmrg    ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
3516e8a5466aSmrg    ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
3517e8a5466aSmrg    ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
3518e8a5466aSmrg    PATH=/empty FPATH=/empty; export PATH FPATH
3519e8a5466aSmrg    test "X`printf %s $ECHO`" = "X$ECHO" \
3520e8a5466aSmrg      || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
3521caade7ccSmrg
3522b9b4fd27Smrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
3523e8a5466aSmrg_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
3524b9b4fd27Smrg])# _LT_PROG_ECHO_BACKSLASH
3525caade7ccSmrg
3526caade7ccSmrg
3527b9b4fd27Smrg# _LT_ENABLE_LOCK
3528b9b4fd27Smrg# ---------------
3529b9b4fd27Smrgm4_defun([_LT_ENABLE_LOCK],
3530b9b4fd27Smrg[AC_ARG_ENABLE([libtool-lock],
3531b9b4fd27Smrg  [AS_HELP_STRING([--disable-libtool-lock],
3532b9b4fd27Smrg    [avoid locking (might break parallel builds)])])
3533b9b4fd27Smrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
3534caade7ccSmrg
3535b9b4fd27Smrg# Some flags need to be propagated to the compiler or linker for good
3536b9b4fd27Smrg# libtool support.
3537b9b4fd27Smrgcase $host in
3538b9b4fd27Smrgia64-*-hpux*)
3539b9b4fd27Smrg  # Find out which ABI we are using.
3540b9b4fd27Smrg  echo 'int i;' > conftest.$ac_ext
3541b9b4fd27Smrg  if AC_TRY_EVAL(ac_compile); then
3542b9b4fd27Smrg    case `/usr/bin/file conftest.$ac_objext` in
3543b9b4fd27Smrg      *ELF-32*)
3544b9b4fd27Smrg	HPUX_IA64_MODE="32"
3545b9b4fd27Smrg	;;
3546b9b4fd27Smrg      *ELF-64*)
3547b9b4fd27Smrg	HPUX_IA64_MODE="64"
3548b9b4fd27Smrg	;;
3549caade7ccSmrg    esac
3550b9b4fd27Smrg  fi
3551b9b4fd27Smrg  rm -rf conftest*
3552b9b4fd27Smrg  ;;
3553b9b4fd27Smrg*-*-irix6*)
3554b9b4fd27Smrg  # Find out which ABI we are using.
3555e8a5466aSmrg  echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
3556b9b4fd27Smrg  if AC_TRY_EVAL(ac_compile); then
3557b9b4fd27Smrg    if test "$lt_cv_prog_gnu_ld" = yes; then
3558b9b4fd27Smrg      case `/usr/bin/file conftest.$ac_objext` in
3559b9b4fd27Smrg	*32-bit*)
3560b9b4fd27Smrg	  LD="${LD-ld} -melf32bsmip"
3561b9b4fd27Smrg	  ;;
3562b9b4fd27Smrg	*N32*)
3563b9b4fd27Smrg	  LD="${LD-ld} -melf32bmipn32"
3564b9b4fd27Smrg	  ;;
3565b9b4fd27Smrg	*64-bit*)
3566b9b4fd27Smrg	  LD="${LD-ld} -melf64bmip"
3567b9b4fd27Smrg	;;
3568b9b4fd27Smrg      esac
3569caade7ccSmrg    else
3570b9b4fd27Smrg      case `/usr/bin/file conftest.$ac_objext` in
3571b9b4fd27Smrg	*32-bit*)
3572b9b4fd27Smrg	  LD="${LD-ld} -32"
3573b9b4fd27Smrg	  ;;
3574b9b4fd27Smrg	*N32*)
3575b9b4fd27Smrg	  LD="${LD-ld} -n32"
3576b9b4fd27Smrg	  ;;
3577b9b4fd27Smrg	*64-bit*)
3578b9b4fd27Smrg	  LD="${LD-ld} -64"
3579b9b4fd27Smrg	  ;;
3580b9b4fd27Smrg      esac
3581caade7ccSmrg    fi
3582caade7ccSmrg  fi
3583b9b4fd27Smrg  rm -rf conftest*
3584caade7ccSmrg  ;;
3585caade7ccSmrg
3586b9b4fd27Smrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
3587b9b4fd27Smrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*)
3588b9b4fd27Smrg  # Find out which ABI we are using.
3589b9b4fd27Smrg  echo 'int i;' > conftest.$ac_ext
3590b9b4fd27Smrg  if AC_TRY_EVAL(ac_compile); then
3591b9b4fd27Smrg    case `/usr/bin/file conftest.o` in
3592b9b4fd27Smrg      *32-bit*)
3593b9b4fd27Smrg	case $host in
3594b9b4fd27Smrg	  x86_64-*kfreebsd*-gnu)
3595b9b4fd27Smrg	    LD="${LD-ld} -m elf_i386_fbsd"
3596b9b4fd27Smrg	    ;;
3597b9b4fd27Smrg	  x86_64-*linux*)
3598b9b4fd27Smrg	    LD="${LD-ld} -m elf_i386"
3599b9b4fd27Smrg	    ;;
3600b9b4fd27Smrg	  ppc64-*linux*|powerpc64-*linux*)
3601b9b4fd27Smrg	    LD="${LD-ld} -m elf32ppclinux"
3602b9b4fd27Smrg	    ;;
3603b9b4fd27Smrg	  s390x-*linux*)
3604b9b4fd27Smrg	    LD="${LD-ld} -m elf_s390"
3605b9b4fd27Smrg	    ;;
3606b9b4fd27Smrg	  sparc64-*linux*)
3607b9b4fd27Smrg	    LD="${LD-ld} -m elf32_sparc"
3608b9b4fd27Smrg	    ;;
3609b9b4fd27Smrg	esac
3610b9b4fd27Smrg	;;
3611b9b4fd27Smrg      *64-bit*)
3612b9b4fd27Smrg	case $host in
3613b9b4fd27Smrg	  x86_64-*kfreebsd*-gnu)
3614b9b4fd27Smrg	    LD="${LD-ld} -m elf_x86_64_fbsd"
3615b9b4fd27Smrg	    ;;
3616b9b4fd27Smrg	  x86_64-*linux*)
3617b9b4fd27Smrg	    LD="${LD-ld} -m elf_x86_64"
3618b9b4fd27Smrg	    ;;
3619b9b4fd27Smrg	  ppc*-*linux*|powerpc*-*linux*)
3620b9b4fd27Smrg	    LD="${LD-ld} -m elf64ppc"
3621b9b4fd27Smrg	    ;;
3622b9b4fd27Smrg	  s390*-*linux*|s390*-*tpf*)
3623b9b4fd27Smrg	    LD="${LD-ld} -m elf64_s390"
3624b9b4fd27Smrg	    ;;
3625b9b4fd27Smrg	  sparc*-*linux*)
3626b9b4fd27Smrg	    LD="${LD-ld} -m elf64_sparc"
3627b9b4fd27Smrg	    ;;
3628b9b4fd27Smrg	esac
3629b9b4fd27Smrg	;;
3630b9b4fd27Smrg    esac
3631b9b4fd27Smrg  fi
3632b9b4fd27Smrg  rm -rf conftest*
3633caade7ccSmrg  ;;
3634caade7ccSmrg
3635b9b4fd27Smrg*-*-sco3.2v5*)
3636b9b4fd27Smrg  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
3637b9b4fd27Smrg  SAVE_CFLAGS="$CFLAGS"
3638b9b4fd27Smrg  CFLAGS="$CFLAGS -belf"
3639b9b4fd27Smrg  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
3640b9b4fd27Smrg    [AC_LANG_PUSH(C)
3641b9b4fd27Smrg     AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
3642b9b4fd27Smrg     AC_LANG_POP])
3643b9b4fd27Smrg  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
3644b9b4fd27Smrg    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
3645b9b4fd27Smrg    CFLAGS="$SAVE_CFLAGS"
3646b9b4fd27Smrg  fi
3647caade7ccSmrg  ;;
3648b9b4fd27Smrgsparc*-*solaris*)
3649b9b4fd27Smrg  # Find out which ABI we are using.
3650b9b4fd27Smrg  echo 'int i;' > conftest.$ac_ext
3651b9b4fd27Smrg  if AC_TRY_EVAL(ac_compile); then
3652b9b4fd27Smrg    case `/usr/bin/file conftest.o` in
3653b9b4fd27Smrg    *64-bit*)
3654b9b4fd27Smrg      case $lt_cv_prog_gnu_ld in
3655b9b4fd27Smrg      yes*) LD="${LD-ld} -m elf64_sparc" ;;
3656b9b4fd27Smrg      *)
3657b9b4fd27Smrg	if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
3658b9b4fd27Smrg	  LD="${LD-ld} -64"
3659b9b4fd27Smrg	fi
3660b9b4fd27Smrg	;;
3661b9b4fd27Smrg      esac
3662b9b4fd27Smrg      ;;
3663b9b4fd27Smrg    esac
3664b9b4fd27Smrg  fi
3665b9b4fd27Smrg  rm -rf conftest*
3666caade7ccSmrg  ;;
3667b9b4fd27Smrgesac
3668caade7ccSmrg
3669b9b4fd27Smrgneed_locks="$enable_libtool_lock"
3670b9b4fd27Smrg])# _LT_ENABLE_LOCK
3671caade7ccSmrg
3672caade7ccSmrg
3673b9b4fd27Smrg# _LT_CMD_OLD_ARCHIVE
3674b9b4fd27Smrg# -------------------
3675b9b4fd27Smrgm4_defun([_LT_CMD_OLD_ARCHIVE],
3676b9b4fd27Smrg[AC_CHECK_TOOL(AR, ar, false)
3677b9b4fd27Smrgtest -z "$AR" && AR=ar
3678b9b4fd27Smrgtest -z "$AR_FLAGS" && AR_FLAGS=cru
3679b9b4fd27Smrg_LT_DECL([], [AR], [1], [The archiver])
3680b9b4fd27Smrg_LT_DECL([], [AR_FLAGS], [1])
3681caade7ccSmrg
3682b9b4fd27SmrgAC_CHECK_TOOL(STRIP, strip, :)
3683b9b4fd27Smrgtest -z "$STRIP" && STRIP=:
3684b9b4fd27Smrg_LT_DECL([], [STRIP], [1], [A symbol stripping program])
3685caade7ccSmrg
3686b9b4fd27SmrgAC_CHECK_TOOL(RANLIB, ranlib, :)
3687b9b4fd27Smrgtest -z "$RANLIB" && RANLIB=:
3688b9b4fd27Smrg_LT_DECL([], [RANLIB], [1],
3689b9b4fd27Smrg    [Commands used to install an old-style archive])
3690caade7ccSmrg
3691b9b4fd27Smrg# Determine commands to create old-style static archives.
3692b9b4fd27Smrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
3693b9b4fd27Smrgold_postinstall_cmds='chmod 644 $oldlib'
3694b9b4fd27Smrgold_postuninstall_cmds=
3695caade7ccSmrg
3696b9b4fd27Smrgif test -n "$RANLIB"; then
3697caade7ccSmrg  case $host_os in
3698b9b4fd27Smrg  openbsd*)
3699b9b4fd27Smrg    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
3700caade7ccSmrg    ;;
3701b9b4fd27Smrg  *)
3702b9b4fd27Smrg    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
3703caade7ccSmrg    ;;
3704caade7ccSmrg  esac
3705b9b4fd27Smrg  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
3706b9b4fd27Smrgfi
3707e8a5466aSmrg
3708e8a5466aSmrgcase $host_os in
3709e8a5466aSmrg  darwin*)
3710e8a5466aSmrg    lock_old_archive_extraction=yes ;;
3711e8a5466aSmrg  *)
3712e8a5466aSmrg    lock_old_archive_extraction=no ;;
3713e8a5466aSmrgesac
3714b9b4fd27Smrg_LT_DECL([], [old_postinstall_cmds], [2])
3715b9b4fd27Smrg_LT_DECL([], [old_postuninstall_cmds], [2])
3716b9b4fd27Smrg_LT_TAGDECL([], [old_archive_cmds], [2],
3717b9b4fd27Smrg    [Commands used to build an old-style archive])
3718e8a5466aSmrg_LT_DECL([], [lock_old_archive_extraction], [0],
3719e8a5466aSmrg    [Whether to use a lock for old archive extraction])
3720b9b4fd27Smrg])# _LT_CMD_OLD_ARCHIVE
3721caade7ccSmrg
3722caade7ccSmrg
3723b9b4fd27Smrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
3724b9b4fd27Smrg#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
3725b9b4fd27Smrg# ----------------------------------------------------------------
3726b9b4fd27Smrg# Check whether the given compiler option works
3727b9b4fd27SmrgAC_DEFUN([_LT_COMPILER_OPTION],
3728b9b4fd27Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3729b9b4fd27Smrgm4_require([_LT_DECL_SED])dnl
3730b9b4fd27SmrgAC_CACHE_CHECK([$1], [$2],
3731b9b4fd27Smrg  [$2=no
3732b9b4fd27Smrg   m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
3733b9b4fd27Smrg   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
3734b9b4fd27Smrg   lt_compiler_flag="$3"
3735b9b4fd27Smrg   # Insert the option either (1) after the last *FLAGS variable, or
3736b9b4fd27Smrg   # (2) before a word containing "conftest.", or (3) at the end.
3737b9b4fd27Smrg   # Note that $ac_compile itself does not contain backslashes and begins
3738b9b4fd27Smrg   # with a dollar sign (not a hyphen), so the echo should work correctly.
3739b9b4fd27Smrg   # The option is referenced via a variable to avoid confusing sed.
3740b9b4fd27Smrg   lt_compile=`echo "$ac_compile" | $SED \
3741b9b4fd27Smrg   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
3742b9b4fd27Smrg   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
3743b9b4fd27Smrg   -e 's:$: $lt_compiler_flag:'`
3744e8a5466aSmrg   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
3745b9b4fd27Smrg   (eval "$lt_compile" 2>conftest.err)
3746b9b4fd27Smrg   ac_status=$?
3747b9b4fd27Smrg   cat conftest.err >&AS_MESSAGE_LOG_FD
3748e8a5466aSmrg   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
3749b9b4fd27Smrg   if (exit $ac_status) && test -s "$ac_outfile"; then
3750b9b4fd27Smrg     # The compiler can only warn and ignore the option if not recognized
3751b9b4fd27Smrg     # So say no if there are warnings other than the usual output.
3752e8a5466aSmrg     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
3753b9b4fd27Smrg     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
3754b9b4fd27Smrg     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
3755b9b4fd27Smrg       $2=yes
3756b9b4fd27Smrg     fi
3757b9b4fd27Smrg   fi
3758b9b4fd27Smrg   $RM conftest*
3759b9b4fd27Smrg])
3760caade7ccSmrg
3761b9b4fd27Smrgif test x"[$]$2" = xyes; then
3762b9b4fd27Smrg    m4_if([$5], , :, [$5])
3763b9b4fd27Smrgelse
3764b9b4fd27Smrg    m4_if([$6], , :, [$6])
3765b9b4fd27Smrgfi
3766b9b4fd27Smrg])# _LT_COMPILER_OPTION
3767caade7ccSmrg
3768b9b4fd27Smrg# Old name:
3769b9b4fd27SmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
3770b9b4fd27Smrgdnl aclocal-1.4 backwards compatibility:
3771b9b4fd27Smrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
3772caade7ccSmrg
3773caade7ccSmrg
3774b9b4fd27Smrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
3775b9b4fd27Smrg#                  [ACTION-SUCCESS], [ACTION-FAILURE])
3776b9b4fd27Smrg# ----------------------------------------------------
3777b9b4fd27Smrg# Check whether the given linker option works
3778b9b4fd27SmrgAC_DEFUN([_LT_LINKER_OPTION],
3779b9b4fd27Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3780b9b4fd27Smrgm4_require([_LT_DECL_SED])dnl
3781b9b4fd27SmrgAC_CACHE_CHECK([$1], [$2],
3782b9b4fd27Smrg  [$2=no
3783b9b4fd27Smrg   save_LDFLAGS="$LDFLAGS"
3784b9b4fd27Smrg   LDFLAGS="$LDFLAGS $3"
3785b9b4fd27Smrg   echo "$lt_simple_link_test_code" > conftest.$ac_ext
3786b9b4fd27Smrg   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
3787b9b4fd27Smrg     # The linker can only warn and ignore the option if not recognized
3788b9b4fd27Smrg     # So say no if there are warnings
3789b9b4fd27Smrg     if test -s conftest.err; then
3790b9b4fd27Smrg       # Append any errors to the config.log.
3791b9b4fd27Smrg       cat conftest.err 1>&AS_MESSAGE_LOG_FD
3792e8a5466aSmrg       $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
3793b9b4fd27Smrg       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
3794b9b4fd27Smrg       if diff conftest.exp conftest.er2 >/dev/null; then
3795b9b4fd27Smrg         $2=yes
3796b9b4fd27Smrg       fi
3797b9b4fd27Smrg     else
3798b9b4fd27Smrg       $2=yes
3799b9b4fd27Smrg     fi
3800b9b4fd27Smrg   fi
3801b9b4fd27Smrg   $RM -r conftest*
3802b9b4fd27Smrg   LDFLAGS="$save_LDFLAGS"
3803b9b4fd27Smrg])
3804caade7ccSmrg
3805b9b4fd27Smrgif test x"[$]$2" = xyes; then
3806b9b4fd27Smrg    m4_if([$4], , :, [$4])
3807b9b4fd27Smrgelse
3808b9b4fd27Smrg    m4_if([$5], , :, [$5])
3809b9b4fd27Smrgfi
3810b9b4fd27Smrg])# _LT_LINKER_OPTION
3811caade7ccSmrg
3812b9b4fd27Smrg# Old name:
3813b9b4fd27SmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
3814b9b4fd27Smrgdnl aclocal-1.4 backwards compatibility:
3815b9b4fd27Smrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
3816caade7ccSmrg
3817caade7ccSmrg
3818b9b4fd27Smrg# LT_CMD_MAX_LEN
3819b9b4fd27Smrg#---------------
3820b9b4fd27SmrgAC_DEFUN([LT_CMD_MAX_LEN],
3821b9b4fd27Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
3822b9b4fd27Smrg# find the maximum length of command line arguments
3823b9b4fd27SmrgAC_MSG_CHECKING([the maximum length of command line arguments])
3824b9b4fd27SmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
3825b9b4fd27Smrg  i=0
3826b9b4fd27Smrg  teststring="ABCD"
3827caade7ccSmrg
3828b9b4fd27Smrg  case $build_os in
3829b9b4fd27Smrg  msdosdjgpp*)
3830b9b4fd27Smrg    # On DJGPP, this test can blow up pretty badly due to problems in libc
3831b9b4fd27Smrg    # (any single argument exceeding 2000 bytes causes a buffer overrun
3832b9b4fd27Smrg    # during glob expansion).  Even if it were fixed, the result of this
3833b9b4fd27Smrg    # check would be larger than it should be.
3834b9b4fd27Smrg    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
3835b9b4fd27Smrg    ;;
3836caade7ccSmrg
3837b9b4fd27Smrg  gnu*)
3838b9b4fd27Smrg    # Under GNU Hurd, this test is not required because there is
3839b9b4fd27Smrg    # no limit to the length of command line arguments.
3840b9b4fd27Smrg    # Libtool will interpret -1 as no limit whatsoever
3841b9b4fd27Smrg    lt_cv_sys_max_cmd_len=-1;
3842b9b4fd27Smrg    ;;
3843caade7ccSmrg
3844b9b4fd27Smrg  cygwin* | mingw* | cegcc*)
3845b9b4fd27Smrg    # On Win9x/ME, this test blows up -- it succeeds, but takes
3846b9b4fd27Smrg    # about 5 minutes as the teststring grows exponentially.
3847b9b4fd27Smrg    # Worse, since 9x/ME are not pre-emptively multitasking,
3848b9b4fd27Smrg    # you end up with a "frozen" computer, even though with patience
3849b9b4fd27Smrg    # the test eventually succeeds (with a max line length of 256k).
3850b9b4fd27Smrg    # Instead, let's just punt: use the minimum linelength reported by
3851b9b4fd27Smrg    # all of the supported platforms: 8192 (on NT/2K/XP).
3852b9b4fd27Smrg    lt_cv_sys_max_cmd_len=8192;
3853b9b4fd27Smrg    ;;
3854caade7ccSmrg
3855e8a5466aSmrg  mint*)
3856e8a5466aSmrg    # On MiNT this can take a long time and run out of memory.
3857e8a5466aSmrg    lt_cv_sys_max_cmd_len=8192;
3858e8a5466aSmrg    ;;
3859e8a5466aSmrg
3860b9b4fd27Smrg  amigaos*)
3861b9b4fd27Smrg    # On AmigaOS with pdksh, this test takes hours, literally.
3862b9b4fd27Smrg    # So we just punt and use a minimum line length of 8192.
3863b9b4fd27Smrg    lt_cv_sys_max_cmd_len=8192;
3864b9b4fd27Smrg    ;;
3865485f0483Smrg
3866b9b4fd27Smrg  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
3867b9b4fd27Smrg    # This has been around since 386BSD, at least.  Likely further.
3868b9b4fd27Smrg    if test -x /sbin/sysctl; then
3869b9b4fd27Smrg      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
3870b9b4fd27Smrg    elif test -x /usr/sbin/sysctl; then
3871b9b4fd27Smrg      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
3872b9b4fd27Smrg    else
3873b9b4fd27Smrg      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
3874b9b4fd27Smrg    fi
3875b9b4fd27Smrg    # And add a safety zone
3876b9b4fd27Smrg    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
3877b9b4fd27Smrg    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
3878b9b4fd27Smrg    ;;
3879caade7ccSmrg
3880b9b4fd27Smrg  interix*)
3881b9b4fd27Smrg    # We know the value 262144 and hardcode it with a safety zone (like BSD)
3882b9b4fd27Smrg    lt_cv_sys_max_cmd_len=196608
3883b9b4fd27Smrg    ;;
3884caade7ccSmrg
3885b9b4fd27Smrg  osf*)
3886b9b4fd27Smrg    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
3887b9b4fd27Smrg    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
3888b9b4fd27Smrg    # nice to cause kernel panics so lets avoid the loop below.
3889b9b4fd27Smrg    # First set a reasonable default.
3890b9b4fd27Smrg    lt_cv_sys_max_cmd_len=16384
3891b9b4fd27Smrg    #
3892b9b4fd27Smrg    if test -x /sbin/sysconfig; then
3893b9b4fd27Smrg      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
3894b9b4fd27Smrg        *1*) lt_cv_sys_max_cmd_len=-1 ;;
3895b9b4fd27Smrg      esac
3896b9b4fd27Smrg    fi
3897b9b4fd27Smrg    ;;
3898b9b4fd27Smrg  sco3.2v5*)
3899b9b4fd27Smrg    lt_cv_sys_max_cmd_len=102400
3900b9b4fd27Smrg    ;;
3901b9b4fd27Smrg  sysv5* | sco5v6* | sysv4.2uw2*)
3902b9b4fd27Smrg    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
3903b9b4fd27Smrg    if test -n "$kargmax"; then
3904b9b4fd27Smrg      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[	 ]]//'`
3905b9b4fd27Smrg    else
3906b9b4fd27Smrg      lt_cv_sys_max_cmd_len=32768
3907b9b4fd27Smrg    fi
3908b9b4fd27Smrg    ;;
3909b9b4fd27Smrg  *)
3910b9b4fd27Smrg    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
3911b9b4fd27Smrg    if test -n "$lt_cv_sys_max_cmd_len"; then
3912b9b4fd27Smrg      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
3913b9b4fd27Smrg      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
3914b9b4fd27Smrg    else
3915b9b4fd27Smrg      # Make teststring a little bigger before we do anything with it.
3916b9b4fd27Smrg      # a 1K string should be a reasonable start.
3917b9b4fd27Smrg      for i in 1 2 3 4 5 6 7 8 ; do
3918b9b4fd27Smrg        teststring=$teststring$teststring
3919b9b4fd27Smrg      done
3920b9b4fd27Smrg      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
3921b9b4fd27Smrg      # If test is not a shell built-in, we'll probably end up computing a
3922b9b4fd27Smrg      # maximum length that is only half of the actual maximum length, but
3923b9b4fd27Smrg      # we can't tell.
3924e8a5466aSmrg      while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \
3925e8a5466aSmrg	         = "X$teststring$teststring"; } >/dev/null 2>&1 &&
3926b9b4fd27Smrg	      test $i != 17 # 1/2 MB should be enough
3927b9b4fd27Smrg      do
3928b9b4fd27Smrg        i=`expr $i + 1`
3929b9b4fd27Smrg        teststring=$teststring$teststring
3930b9b4fd27Smrg      done
3931b9b4fd27Smrg      # Only check the string length outside the loop.
3932b9b4fd27Smrg      lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
3933b9b4fd27Smrg      teststring=
3934b9b4fd27Smrg      # Add a significant safety factor because C++ compilers can tack on
3935b9b4fd27Smrg      # massive amounts of additional arguments before passing them to the
3936b9b4fd27Smrg      # linker.  It appears as though 1/2 is a usable value.
3937b9b4fd27Smrg      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
3938b9b4fd27Smrg    fi
3939b9b4fd27Smrg    ;;
3940caade7ccSmrg  esac
3941b9b4fd27Smrg])
3942b9b4fd27Smrgif test -n $lt_cv_sys_max_cmd_len ; then
3943b9b4fd27Smrg  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
3944b9b4fd27Smrgelse
3945b9b4fd27Smrg  AC_MSG_RESULT(none)
3946b9b4fd27Smrgfi
3947b9b4fd27Smrgmax_cmd_len=$lt_cv_sys_max_cmd_len
3948b9b4fd27Smrg_LT_DECL([], [max_cmd_len], [0],
3949b9b4fd27Smrg    [What is the maximum length of a command?])
3950b9b4fd27Smrg])# LT_CMD_MAX_LEN
3951caade7ccSmrg
3952b9b4fd27Smrg# Old name:
3953b9b4fd27SmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
3954b9b4fd27Smrgdnl aclocal-1.4 backwards compatibility:
3955b9b4fd27Smrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
3956caade7ccSmrg
3957caade7ccSmrg
3958b9b4fd27Smrg# _LT_HEADER_DLFCN
3959b9b4fd27Smrg# ----------------
3960b9b4fd27Smrgm4_defun([_LT_HEADER_DLFCN],
3961b9b4fd27Smrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
3962b9b4fd27Smrg])# _LT_HEADER_DLFCN
3963caade7ccSmrg
3964caade7ccSmrg
3965b9b4fd27Smrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
3966b9b4fd27Smrg#                      ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
3967b9b4fd27Smrg# ----------------------------------------------------------------
3968b9b4fd27Smrgm4_defun([_LT_TRY_DLOPEN_SELF],
3969b9b4fd27Smrg[m4_require([_LT_HEADER_DLFCN])dnl
3970b9b4fd27Smrgif test "$cross_compiling" = yes; then :
3971b9b4fd27Smrg  [$4]
3972b9b4fd27Smrgelse
3973b9b4fd27Smrg  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
3974b9b4fd27Smrg  lt_status=$lt_dlunknown
3975b9b4fd27Smrg  cat > conftest.$ac_ext <<_LT_EOF
3976e8a5466aSmrg[#line $LINENO "configure"
3977b9b4fd27Smrg#include "confdefs.h"
3978485f0483Smrg
3979b9b4fd27Smrg#if HAVE_DLFCN_H
3980b9b4fd27Smrg#include <dlfcn.h>
3981b9b4fd27Smrg#endif
3982caade7ccSmrg
3983b9b4fd27Smrg#include <stdio.h>
3984caade7ccSmrg
3985b9b4fd27Smrg#ifdef RTLD_GLOBAL
3986b9b4fd27Smrg#  define LT_DLGLOBAL		RTLD_GLOBAL
3987b9b4fd27Smrg#else
3988b9b4fd27Smrg#  ifdef DL_GLOBAL
3989b9b4fd27Smrg#    define LT_DLGLOBAL		DL_GLOBAL
3990b9b4fd27Smrg#  else
3991b9b4fd27Smrg#    define LT_DLGLOBAL		0
3992b9b4fd27Smrg#  endif
3993b9b4fd27Smrg#endif
3994caade7ccSmrg
3995b9b4fd27Smrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
3996b9b4fd27Smrg   find out it does not work in some platform. */
3997b9b4fd27Smrg#ifndef LT_DLLAZY_OR_NOW
3998b9b4fd27Smrg#  ifdef RTLD_LAZY
3999b9b4fd27Smrg#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
4000b9b4fd27Smrg#  else
4001b9b4fd27Smrg#    ifdef DL_LAZY
4002b9b4fd27Smrg#      define LT_DLLAZY_OR_NOW		DL_LAZY
4003b9b4fd27Smrg#    else
4004b9b4fd27Smrg#      ifdef RTLD_NOW
4005b9b4fd27Smrg#        define LT_DLLAZY_OR_NOW	RTLD_NOW
4006b9b4fd27Smrg#      else
4007b9b4fd27Smrg#        ifdef DL_NOW
4008b9b4fd27Smrg#          define LT_DLLAZY_OR_NOW	DL_NOW
4009b9b4fd27Smrg#        else
4010b9b4fd27Smrg#          define LT_DLLAZY_OR_NOW	0
4011b9b4fd27Smrg#        endif
4012b9b4fd27Smrg#      endif
4013b9b4fd27Smrg#    endif
4014b9b4fd27Smrg#  endif
4015b9b4fd27Smrg#endif
4016caade7ccSmrg
4017e8a5466aSmrg/* When -fvisbility=hidden is used, assume the code has been annotated
4018e8a5466aSmrg   correspondingly for the symbols needed.  */
4019e8a5466aSmrg#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
4020e8a5466aSmrgvoid fnord () __attribute__((visibility("default")));
4021e8a5466aSmrg#endif
4022e8a5466aSmrg
4023e8a5466aSmrgvoid fnord () { int i=42; }
4024b9b4fd27Smrgint main ()
4025b9b4fd27Smrg{
4026b9b4fd27Smrg  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
4027b9b4fd27Smrg  int status = $lt_dlunknown;
4028caade7ccSmrg
4029b9b4fd27Smrg  if (self)
4030b9b4fd27Smrg    {
4031b9b4fd27Smrg      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
4032e8a5466aSmrg      else
4033e8a5466aSmrg        {
4034e8a5466aSmrg	  if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
4035e8a5466aSmrg          else puts (dlerror ());
4036e8a5466aSmrg	}
4037b9b4fd27Smrg      /* dlclose (self); */
4038b9b4fd27Smrg    }
4039b9b4fd27Smrg  else
4040b9b4fd27Smrg    puts (dlerror ());
4041caade7ccSmrg
4042b9b4fd27Smrg  return status;
4043b9b4fd27Smrg}]
4044b9b4fd27Smrg_LT_EOF
4045b9b4fd27Smrg  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
4046b9b4fd27Smrg    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
4047b9b4fd27Smrg    lt_status=$?
4048b9b4fd27Smrg    case x$lt_status in
4049b9b4fd27Smrg      x$lt_dlno_uscore) $1 ;;
4050b9b4fd27Smrg      x$lt_dlneed_uscore) $2 ;;
4051b9b4fd27Smrg      x$lt_dlunknown|x*) $3 ;;
4052b9b4fd27Smrg    esac
4053b9b4fd27Smrg  else :
4054b9b4fd27Smrg    # compilation failed
4055b9b4fd27Smrg    $3
4056b9b4fd27Smrg  fi
4057b9b4fd27Smrgfi
4058b9b4fd27Smrgrm -fr conftest*
4059b9b4fd27Smrg])# _LT_TRY_DLOPEN_SELF
4060caade7ccSmrg
4061caade7ccSmrg
4062b9b4fd27Smrg# LT_SYS_DLOPEN_SELF
4063b9b4fd27Smrg# ------------------
4064b9b4fd27SmrgAC_DEFUN([LT_SYS_DLOPEN_SELF],
4065b9b4fd27Smrg[m4_require([_LT_HEADER_DLFCN])dnl
4066b9b4fd27Smrgif test "x$enable_dlopen" != xyes; then
4067b9b4fd27Smrg  enable_dlopen=unknown
4068b9b4fd27Smrg  enable_dlopen_self=unknown
4069b9b4fd27Smrg  enable_dlopen_self_static=unknown
4070b9b4fd27Smrgelse
4071b9b4fd27Smrg  lt_cv_dlopen=no
4072b9b4fd27Smrg  lt_cv_dlopen_libs=
4073caade7ccSmrg
4074b9b4fd27Smrg  case $host_os in
4075b9b4fd27Smrg  beos*)
4076b9b4fd27Smrg    lt_cv_dlopen="load_add_on"
4077b9b4fd27Smrg    lt_cv_dlopen_libs=
4078b9b4fd27Smrg    lt_cv_dlopen_self=yes
4079b9b4fd27Smrg    ;;
4080caade7ccSmrg
4081b9b4fd27Smrg  mingw* | pw32* | cegcc*)
4082b9b4fd27Smrg    lt_cv_dlopen="LoadLibrary"
4083b9b4fd27Smrg    lt_cv_dlopen_libs=
4084b9b4fd27Smrg    ;;
4085caade7ccSmrg
4086b9b4fd27Smrg  cygwin*)
4087b9b4fd27Smrg    lt_cv_dlopen="dlopen"
4088b9b4fd27Smrg    lt_cv_dlopen_libs=
4089b9b4fd27Smrg    ;;
4090caade7ccSmrg
4091b9b4fd27Smrg  darwin*)
4092b9b4fd27Smrg  # if libdl is installed we need to link against it
4093b9b4fd27Smrg    AC_CHECK_LIB([dl], [dlopen],
4094b9b4fd27Smrg		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
4095b9b4fd27Smrg    lt_cv_dlopen="dyld"
4096b9b4fd27Smrg    lt_cv_dlopen_libs=
4097b9b4fd27Smrg    lt_cv_dlopen_self=yes
4098b9b4fd27Smrg    ])
4099b9b4fd27Smrg    ;;
4100caade7ccSmrg
4101b9b4fd27Smrg  *)
4102b9b4fd27Smrg    AC_CHECK_FUNC([shl_load],
4103b9b4fd27Smrg	  [lt_cv_dlopen="shl_load"],
4104b9b4fd27Smrg      [AC_CHECK_LIB([dld], [shl_load],
4105b9b4fd27Smrg	    [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
4106b9b4fd27Smrg	[AC_CHECK_FUNC([dlopen],
4107b9b4fd27Smrg	      [lt_cv_dlopen="dlopen"],
4108b9b4fd27Smrg	  [AC_CHECK_LIB([dl], [dlopen],
4109b9b4fd27Smrg		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
4110b9b4fd27Smrg	    [AC_CHECK_LIB([svld], [dlopen],
4111b9b4fd27Smrg		  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
4112b9b4fd27Smrg	      [AC_CHECK_LIB([dld], [dld_link],
4113b9b4fd27Smrg		    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
4114b9b4fd27Smrg	      ])
4115b9b4fd27Smrg	    ])
4116b9b4fd27Smrg	  ])
4117b9b4fd27Smrg	])
4118b9b4fd27Smrg      ])
4119b9b4fd27Smrg    ;;
4120b9b4fd27Smrg  esac
4121caade7ccSmrg
4122b9b4fd27Smrg  if test "x$lt_cv_dlopen" != xno; then
4123b9b4fd27Smrg    enable_dlopen=yes
4124caade7ccSmrg  else
4125b9b4fd27Smrg    enable_dlopen=no
4126caade7ccSmrg  fi
4127caade7ccSmrg
4128b9b4fd27Smrg  case $lt_cv_dlopen in
4129b9b4fd27Smrg  dlopen)
4130b9b4fd27Smrg    save_CPPFLAGS="$CPPFLAGS"
4131b9b4fd27Smrg    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
4132caade7ccSmrg
4133b9b4fd27Smrg    save_LDFLAGS="$LDFLAGS"
4134b9b4fd27Smrg    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
4135caade7ccSmrg
4136b9b4fd27Smrg    save_LIBS="$LIBS"
4137b9b4fd27Smrg    LIBS="$lt_cv_dlopen_libs $LIBS"
4138caade7ccSmrg
4139b9b4fd27Smrg    AC_CACHE_CHECK([whether a program can dlopen itself],
4140b9b4fd27Smrg	  lt_cv_dlopen_self, [dnl
4141b9b4fd27Smrg	  _LT_TRY_DLOPEN_SELF(
4142b9b4fd27Smrg	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
4143b9b4fd27Smrg	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
4144b9b4fd27Smrg    ])
4145caade7ccSmrg
4146b9b4fd27Smrg    if test "x$lt_cv_dlopen_self" = xyes; then
4147b9b4fd27Smrg      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
4148b9b4fd27Smrg      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
4149b9b4fd27Smrg	  lt_cv_dlopen_self_static, [dnl
4150b9b4fd27Smrg	  _LT_TRY_DLOPEN_SELF(
4151b9b4fd27Smrg	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
4152b9b4fd27Smrg	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
4153b9b4fd27Smrg      ])
4154b9b4fd27Smrg    fi
4155caade7ccSmrg
4156b9b4fd27Smrg    CPPFLAGS="$save_CPPFLAGS"
4157b9b4fd27Smrg    LDFLAGS="$save_LDFLAGS"
4158b9b4fd27Smrg    LIBS="$save_LIBS"
4159b9b4fd27Smrg    ;;
4160b9b4fd27Smrg  esac
4161caade7ccSmrg
4162b9b4fd27Smrg  case $lt_cv_dlopen_self in
4163b9b4fd27Smrg  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
4164b9b4fd27Smrg  *) enable_dlopen_self=unknown ;;
4165b9b4fd27Smrg  esac
4166caade7ccSmrg
4167b9b4fd27Smrg  case $lt_cv_dlopen_self_static in
4168b9b4fd27Smrg  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
4169b9b4fd27Smrg  *) enable_dlopen_self_static=unknown ;;
4170b9b4fd27Smrg  esac
4171b9b4fd27Smrgfi
4172b9b4fd27Smrg_LT_DECL([dlopen_support], [enable_dlopen], [0],
4173b9b4fd27Smrg	 [Whether dlopen is supported])
4174b9b4fd27Smrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
4175b9b4fd27Smrg	 [Whether dlopen of programs is supported])
4176b9b4fd27Smrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
4177b9b4fd27Smrg	 [Whether dlopen of statically linked programs is supported])
4178b9b4fd27Smrg])# LT_SYS_DLOPEN_SELF
4179caade7ccSmrg
4180b9b4fd27Smrg# Old name:
4181b9b4fd27SmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
4182b9b4fd27Smrgdnl aclocal-1.4 backwards compatibility:
4183b9b4fd27Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
4184caade7ccSmrg
4185caade7ccSmrg
4186b9b4fd27Smrg# _LT_COMPILER_C_O([TAGNAME])
4187b9b4fd27Smrg# ---------------------------
4188b9b4fd27Smrg# Check to see if options -c and -o are simultaneously supported by compiler.
4189b9b4fd27Smrg# This macro does not hard code the compiler like AC_PROG_CC_C_O.
4190b9b4fd27Smrgm4_defun([_LT_COMPILER_C_O],
4191b9b4fd27Smrg[m4_require([_LT_DECL_SED])dnl
4192b9b4fd27Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
4193b9b4fd27Smrgm4_require([_LT_TAG_COMPILER])dnl
4194b9b4fd27SmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
4195b9b4fd27Smrg  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
4196b9b4fd27Smrg  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
4197b9b4fd27Smrg   $RM -r conftest 2>/dev/null
4198b9b4fd27Smrg   mkdir conftest
4199b9b4fd27Smrg   cd conftest
4200b9b4fd27Smrg   mkdir out
4201b9b4fd27Smrg   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
4202caade7ccSmrg
4203b9b4fd27Smrg   lt_compiler_flag="-o out/conftest2.$ac_objext"
4204b9b4fd27Smrg   # Insert the option either (1) after the last *FLAGS variable, or
4205b9b4fd27Smrg   # (2) before a word containing "conftest.", or (3) at the end.
4206b9b4fd27Smrg   # Note that $ac_compile itself does not contain backslashes and begins
4207b9b4fd27Smrg   # with a dollar sign (not a hyphen), so the echo should work correctly.
4208b9b4fd27Smrg   lt_compile=`echo "$ac_compile" | $SED \
4209b9b4fd27Smrg   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
4210b9b4fd27Smrg   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
4211b9b4fd27Smrg   -e 's:$: $lt_compiler_flag:'`
4212e8a5466aSmrg   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
4213b9b4fd27Smrg   (eval "$lt_compile" 2>out/conftest.err)
4214b9b4fd27Smrg   ac_status=$?
4215b9b4fd27Smrg   cat out/conftest.err >&AS_MESSAGE_LOG_FD
4216e8a5466aSmrg   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
4217b9b4fd27Smrg   if (exit $ac_status) && test -s out/conftest2.$ac_objext
4218b9b4fd27Smrg   then
4219b9b4fd27Smrg     # The compiler can only warn and ignore the option if not recognized
4220b9b4fd27Smrg     # So say no if there are warnings
4221e8a5466aSmrg     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
4222b9b4fd27Smrg     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
4223b9b4fd27Smrg     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
4224b9b4fd27Smrg       _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
4225b9b4fd27Smrg     fi
4226b9b4fd27Smrg   fi
4227b9b4fd27Smrg   chmod u+w . 2>&AS_MESSAGE_LOG_FD
4228b9b4fd27Smrg   $RM conftest*
4229b9b4fd27Smrg   # SGI C++ compiler will create directory out/ii_files/ for
4230b9b4fd27Smrg   # template instantiation
4231b9b4fd27Smrg   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
4232b9b4fd27Smrg   $RM out/* && rmdir out
4233b9b4fd27Smrg   cd ..
4234b9b4fd27Smrg   $RM -r conftest
4235b9b4fd27Smrg   $RM conftest*
4236b9b4fd27Smrg])
4237b9b4fd27Smrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
4238b9b4fd27Smrg	[Does compiler simultaneously support -c and -o options?])
4239b9b4fd27Smrg])# _LT_COMPILER_C_O
4240caade7ccSmrg
4241caade7ccSmrg
4242b9b4fd27Smrg# _LT_COMPILER_FILE_LOCKS([TAGNAME])
4243b9b4fd27Smrg# ----------------------------------
4244b9b4fd27Smrg# Check to see if we can do hard links to lock some files if needed
4245b9b4fd27Smrgm4_defun([_LT_COMPILER_FILE_LOCKS],
4246b9b4fd27Smrg[m4_require([_LT_ENABLE_LOCK])dnl
4247b9b4fd27Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
4248b9b4fd27Smrg_LT_COMPILER_C_O([$1])
4249caade7ccSmrg
4250b9b4fd27Smrghard_links="nottested"
4251b9b4fd27Smrgif test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
4252b9b4fd27Smrg  # do not overwrite the value of need_locks provided by the user
4253b9b4fd27Smrg  AC_MSG_CHECKING([if we can lock with hard links])
4254b9b4fd27Smrg  hard_links=yes
4255b9b4fd27Smrg  $RM conftest*
4256b9b4fd27Smrg  ln conftest.a conftest.b 2>/dev/null && hard_links=no
4257b9b4fd27Smrg  touch conftest.a
4258b9b4fd27Smrg  ln conftest.a conftest.b 2>&5 || hard_links=no
4259b9b4fd27Smrg  ln conftest.a conftest.b 2>/dev/null && hard_links=no
4260b9b4fd27Smrg  AC_MSG_RESULT([$hard_links])
4261b9b4fd27Smrg  if test "$hard_links" = no; then
4262b9b4fd27Smrg    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
4263b9b4fd27Smrg    need_locks=warn
4264b9b4fd27Smrg  fi
4265b9b4fd27Smrgelse
4266b9b4fd27Smrg  need_locks=no
4267b9b4fd27Smrgfi
4268b9b4fd27Smrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
4269b9b4fd27Smrg])# _LT_COMPILER_FILE_LOCKS
4270caade7ccSmrg
4271caade7ccSmrg
4272b9b4fd27Smrg# _LT_CHECK_OBJDIR
4273b9b4fd27Smrg# ----------------
4274b9b4fd27Smrgm4_defun([_LT_CHECK_OBJDIR],
4275b9b4fd27Smrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
4276b9b4fd27Smrg[rm -f .libs 2>/dev/null
4277b9b4fd27Smrgmkdir .libs 2>/dev/null
4278b9b4fd27Smrgif test -d .libs; then
4279b9b4fd27Smrg  lt_cv_objdir=.libs
4280caade7ccSmrgelse
4281b9b4fd27Smrg  # MS-DOS does not allow filenames that begin with a dot.
4282b9b4fd27Smrg  lt_cv_objdir=_libs
4283caade7ccSmrgfi
4284b9b4fd27Smrgrmdir .libs 2>/dev/null])
4285b9b4fd27Smrgobjdir=$lt_cv_objdir
4286b9b4fd27Smrg_LT_DECL([], [objdir], [0],
4287b9b4fd27Smrg         [The name of the directory that contains temporary libtool files])dnl
4288b9b4fd27Smrgm4_pattern_allow([LT_OBJDIR])dnl
4289b9b4fd27SmrgAC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
4290b9b4fd27Smrg  [Define to the sub-directory in which libtool stores uninstalled libraries.])
4291b9b4fd27Smrg])# _LT_CHECK_OBJDIR
4292caade7ccSmrg
4293caade7ccSmrg
4294b9b4fd27Smrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
4295b9b4fd27Smrg# --------------------------------------
4296b9b4fd27Smrg# Check hardcoding attributes.
4297b9b4fd27Smrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH],
4298b9b4fd27Smrg[AC_MSG_CHECKING([how to hardcode library paths into programs])
4299b9b4fd27Smrg_LT_TAGVAR(hardcode_action, $1)=
4300b9b4fd27Smrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
4301b9b4fd27Smrg   test -n "$_LT_TAGVAR(runpath_var, $1)" ||
4302b9b4fd27Smrg   test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
4303b9b4fd27Smrg
4304b9b4fd27Smrg  # We can hardcode non-existent directories.
4305b9b4fd27Smrg  if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
4306b9b4fd27Smrg     # If the only mechanism to avoid hardcoding is shlibpath_var, we
4307b9b4fd27Smrg     # have to relink, otherwise we might link with an installed library
4308b9b4fd27Smrg     # when we should be linking with a yet-to-be-installed one
4309b9b4fd27Smrg     ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
4310b9b4fd27Smrg     test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
4311b9b4fd27Smrg    # Linking always hardcodes the temporary library directory.
4312b9b4fd27Smrg    _LT_TAGVAR(hardcode_action, $1)=relink
4313caade7ccSmrg  else
4314b9b4fd27Smrg    # We can link without hardcoding, and we can hardcode nonexisting dirs.
4315b9b4fd27Smrg    _LT_TAGVAR(hardcode_action, $1)=immediate
4316caade7ccSmrg  fi
4317b9b4fd27Smrgelse
4318b9b4fd27Smrg  # We cannot hardcode anything, or else we can only hardcode existing
4319b9b4fd27Smrg  # directories.
4320b9b4fd27Smrg  _LT_TAGVAR(hardcode_action, $1)=unsupported
4321caade7ccSmrgfi
4322b9b4fd27SmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
4323caade7ccSmrg
4324b9b4fd27Smrgif test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
4325b9b4fd27Smrg   test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
4326b9b4fd27Smrg  # Fast installation is not supported
4327b9b4fd27Smrg  enable_fast_install=no
4328b9b4fd27Smrgelif test "$shlibpath_overrides_runpath" = yes ||
4329b9b4fd27Smrg     test "$enable_shared" = no; then
4330b9b4fd27Smrg  # Fast installation is not necessary
4331b9b4fd27Smrg  enable_fast_install=needless
4332b9b4fd27Smrgfi
4333b9b4fd27Smrg_LT_TAGDECL([], [hardcode_action], [0],
4334b9b4fd27Smrg    [How to hardcode a shared library path into an executable])
4335b9b4fd27Smrg])# _LT_LINKER_HARDCODE_LIBPATH
4336caade7ccSmrg
4337b9b4fd27Smrg
4338b9b4fd27Smrg# _LT_CMD_STRIPLIB
4339b9b4fd27Smrg# ----------------
4340b9b4fd27Smrgm4_defun([_LT_CMD_STRIPLIB],
4341b9b4fd27Smrg[m4_require([_LT_DECL_EGREP])
4342b9b4fd27Smrgstriplib=
4343b9b4fd27Smrgold_striplib=
4344b9b4fd27SmrgAC_MSG_CHECKING([whether stripping libraries is possible])
4345b9b4fd27Smrgif test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
4346b9b4fd27Smrg  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
4347b9b4fd27Smrg  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
4348b9b4fd27Smrg  AC_MSG_RESULT([yes])
4349b9b4fd27Smrgelse
4350b9b4fd27Smrg# FIXME - insert some real tests, host_os isn't really good enough
4351b9b4fd27Smrg  case $host_os in
4352b9b4fd27Smrg  darwin*)
4353b9b4fd27Smrg    if test -n "$STRIP" ; then
4354b9b4fd27Smrg      striplib="$STRIP -x"
4355b9b4fd27Smrg      old_striplib="$STRIP -S"
4356b9b4fd27Smrg      AC_MSG_RESULT([yes])
4357b9b4fd27Smrg    else
4358b9b4fd27Smrg      AC_MSG_RESULT([no])
4359b9b4fd27Smrg    fi
4360caade7ccSmrg    ;;
4361caade7ccSmrg  *)
4362b9b4fd27Smrg    AC_MSG_RESULT([no])
4363caade7ccSmrg    ;;
4364caade7ccSmrg  esac
4365caade7ccSmrgfi
4366b9b4fd27Smrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
4367b9b4fd27Smrg_LT_DECL([], [striplib], [1])
4368b9b4fd27Smrg])# _LT_CMD_STRIPLIB
4369caade7ccSmrg
4370caade7ccSmrg
4371b9b4fd27Smrg# _LT_SYS_DYNAMIC_LINKER([TAG])
4372b9b4fd27Smrg# -----------------------------
4373b9b4fd27Smrg# PORTME Fill in your ld.so characteristics
4374b9b4fd27Smrgm4_defun([_LT_SYS_DYNAMIC_LINKER],
4375b9b4fd27Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
4376b9b4fd27Smrgm4_require([_LT_DECL_EGREP])dnl
4377b9b4fd27Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
4378b9b4fd27Smrgm4_require([_LT_DECL_OBJDUMP])dnl
4379b9b4fd27Smrgm4_require([_LT_DECL_SED])dnl
4380e8a5466aSmrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl
4381b9b4fd27SmrgAC_MSG_CHECKING([dynamic linker characteristics])
4382b9b4fd27Smrgm4_if([$1],
4383b9b4fd27Smrg	[], [
4384b9b4fd27Smrgif test "$GCC" = yes; then
4385b9b4fd27Smrg  case $host_os in
4386b9b4fd27Smrg    darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
4387b9b4fd27Smrg    *) lt_awk_arg="/^libraries:/" ;;
4388b9b4fd27Smrg  esac
4389e8a5466aSmrg  case $host_os in
4390e8a5466aSmrg    mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;;
4391e8a5466aSmrg    *) lt_sed_strip_eq="s,=/,/,g" ;;
4392e8a5466aSmrg  esac
4393e8a5466aSmrg  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
4394e8a5466aSmrg  case $lt_search_path_spec in
4395e8a5466aSmrg  *\;*)
4396b9b4fd27Smrg    # if the path contains ";" then we assume it to be the separator
4397b9b4fd27Smrg    # otherwise default to the standard path separator (i.e. ":") - it is
4398b9b4fd27Smrg    # assumed that no part of a normal pathname contains ";" but that should
4399b9b4fd27Smrg    # okay in the real world where ";" in dirpaths is itself problematic.
4400e8a5466aSmrg    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
4401e8a5466aSmrg    ;;
4402e8a5466aSmrg  *)
4403e8a5466aSmrg    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
4404e8a5466aSmrg    ;;
4405e8a5466aSmrg  esac
4406b9b4fd27Smrg  # Ok, now we have the path, separated by spaces, we can step through it
4407b9b4fd27Smrg  # and add multilib dir if necessary.
4408b9b4fd27Smrg  lt_tmp_lt_search_path_spec=
4409b9b4fd27Smrg  lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
4410b9b4fd27Smrg  for lt_sys_path in $lt_search_path_spec; do
4411b9b4fd27Smrg    if test -d "$lt_sys_path/$lt_multi_os_dir"; then
4412b9b4fd27Smrg      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
4413caade7ccSmrg    else
4414b9b4fd27Smrg      test -d "$lt_sys_path" && \
4415b9b4fd27Smrg	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
4416caade7ccSmrg    fi
4417b9b4fd27Smrg  done
4418e8a5466aSmrg  lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
4419b9b4fd27SmrgBEGIN {RS=" "; FS="/|\n";} {
4420b9b4fd27Smrg  lt_foo="";
4421b9b4fd27Smrg  lt_count=0;
4422b9b4fd27Smrg  for (lt_i = NF; lt_i > 0; lt_i--) {
4423b9b4fd27Smrg    if ($lt_i != "" && $lt_i != ".") {
4424b9b4fd27Smrg      if ($lt_i == "..") {
4425b9b4fd27Smrg        lt_count++;
4426b9b4fd27Smrg      } else {
4427b9b4fd27Smrg        if (lt_count == 0) {
4428b9b4fd27Smrg          lt_foo="/" $lt_i lt_foo;
4429b9b4fd27Smrg        } else {
4430b9b4fd27Smrg          lt_count--;
4431b9b4fd27Smrg        }
4432b9b4fd27Smrg      }
4433b9b4fd27Smrg    }
4434b9b4fd27Smrg  }
4435b9b4fd27Smrg  if (lt_foo != "") { lt_freq[[lt_foo]]++; }
4436b9b4fd27Smrg  if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
4437b9b4fd27Smrg}'`
4438e8a5466aSmrg  # AWK program above erroneously prepends '/' to C:/dos/paths
4439e8a5466aSmrg  # for these hosts.
4440e8a5466aSmrg  case $host_os in
4441e8a5466aSmrg    mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
4442e8a5466aSmrg      $SED 's,/\([[A-Za-z]]:\),\1,g'` ;;
4443e8a5466aSmrg  esac
4444e8a5466aSmrg  sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
4445b9b4fd27Smrgelse
4446b9b4fd27Smrg  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
4447b9b4fd27Smrgfi])
4448b9b4fd27Smrglibrary_names_spec=
4449b9b4fd27Smrglibname_spec='lib$name'
4450b9b4fd27Smrgsoname_spec=
4451b9b4fd27Smrgshrext_cmds=".so"
4452b9b4fd27Smrgpostinstall_cmds=
4453b9b4fd27Smrgpostuninstall_cmds=
4454b9b4fd27Smrgfinish_cmds=
4455b9b4fd27Smrgfinish_eval=
4456b9b4fd27Smrgshlibpath_var=
4457b9b4fd27Smrgshlibpath_overrides_runpath=unknown
4458b9b4fd27Smrgversion_type=none
4459b9b4fd27Smrgdynamic_linker="$host_os ld.so"
4460b9b4fd27Smrgsys_lib_dlsearch_path_spec="/lib /usr/lib"
4461b9b4fd27Smrgneed_lib_prefix=unknown
4462b9b4fd27Smrghardcode_into_libs=no
4463caade7ccSmrg
4464b9b4fd27Smrg# when you set need_version to no, make sure it does not cause -set_version
4465b9b4fd27Smrg# flags to be left without arguments
4466b9b4fd27Smrgneed_version=unknown
4467caade7ccSmrg
4468caade7ccSmrgcase $host_os in
4469b9b4fd27Smrgaix3*)
4470b9b4fd27Smrg  version_type=linux
4471b9b4fd27Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
4472b9b4fd27Smrg  shlibpath_var=LIBPATH
4473caade7ccSmrg
4474b9b4fd27Smrg  # AIX 3 has no versioning support, so we append a major version to the name.
4475b9b4fd27Smrg  soname_spec='${libname}${release}${shared_ext}$major'
4476caade7ccSmrg  ;;
4477caade7ccSmrg
4478b9b4fd27Smrgaix[[4-9]]*)
4479b9b4fd27Smrg  version_type=linux
4480b9b4fd27Smrg  need_lib_prefix=no
4481b9b4fd27Smrg  need_version=no
4482b9b4fd27Smrg  hardcode_into_libs=yes
4483b9b4fd27Smrg  if test "$host_cpu" = ia64; then
4484b9b4fd27Smrg    # AIX 5 supports IA64
4485b9b4fd27Smrg    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
4486b9b4fd27Smrg    shlibpath_var=LD_LIBRARY_PATH
4487485f0483Smrg  else
4488b9b4fd27Smrg    # With GCC up to 2.95.x, collect2 would create an import file
4489b9b4fd27Smrg    # for dependence libraries.  The import file would start with
4490b9b4fd27Smrg    # the line `#! .'.  This would cause the generated library to
4491b9b4fd27Smrg    # depend on `.', always an invalid library.  This was fixed in
4492b9b4fd27Smrg    # development snapshots of GCC prior to 3.0.
4493b9b4fd27Smrg    case $host_os in
4494b9b4fd27Smrg      aix4 | aix4.[[01]] | aix4.[[01]].*)
4495b9b4fd27Smrg      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
4496b9b4fd27Smrg	   echo ' yes '
4497b9b4fd27Smrg	   echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
4498b9b4fd27Smrg	:
4499b9b4fd27Smrg      else
4500b9b4fd27Smrg	can_build_shared=no
4501b9b4fd27Smrg      fi
4502caade7ccSmrg      ;;
4503caade7ccSmrg    esac
4504b9b4fd27Smrg    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
4505b9b4fd27Smrg    # soname into executable. Probably we can add versioning support to
4506b9b4fd27Smrg    # collect2, so additional links can be useful in future.
4507b9b4fd27Smrg    if test "$aix_use_runtimelinking" = yes; then
4508b9b4fd27Smrg      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
4509b9b4fd27Smrg      # instead of lib<name>.a to let people know that these are not
4510b9b4fd27Smrg      # typical AIX shared libraries.
4511b9b4fd27Smrg      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4512b9b4fd27Smrg    else
4513b9b4fd27Smrg      # We preserve .a as extension for shared libraries through AIX4.2
4514b9b4fd27Smrg      # and later when we are not doing run time linking.
4515b9b4fd27Smrg      library_names_spec='${libname}${release}.a $libname.a'
4516b9b4fd27Smrg      soname_spec='${libname}${release}${shared_ext}$major'
4517b9b4fd27Smrg    fi
4518b9b4fd27Smrg    shlibpath_var=LIBPATH
4519caade7ccSmrg  fi
4520caade7ccSmrg  ;;
4521caade7ccSmrg
4522b9b4fd27Smrgamigaos*)
4523caade7ccSmrg  case $host_cpu in
4524b9b4fd27Smrg  powerpc)
4525b9b4fd27Smrg    # Since July 2007 AmigaOS4 officially supports .so libraries.
4526b9b4fd27Smrg    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
4527b9b4fd27Smrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4528caade7ccSmrg    ;;
4529b9b4fd27Smrg  m68k)
4530b9b4fd27Smrg    library_names_spec='$libname.ixlibrary $libname.a'
4531b9b4fd27Smrg    # Create ${libname}_ixlibrary.a entries in /sys/libs.
4532e8a5466aSmrg    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'
4533caade7ccSmrg    ;;
4534caade7ccSmrg  esac
4535caade7ccSmrg  ;;
4536caade7ccSmrg
4537b9b4fd27Smrgbeos*)
4538b9b4fd27Smrg  library_names_spec='${libname}${shared_ext}'
4539b9b4fd27Smrg  dynamic_linker="$host_os ld.so"
4540b9b4fd27Smrg  shlibpath_var=LIBRARY_PATH
4541caade7ccSmrg  ;;
4542caade7ccSmrg
4543b9b4fd27Smrgbsdi[[45]]*)
4544b9b4fd27Smrg  version_type=linux
4545b9b4fd27Smrg  need_version=no
4546b9b4fd27Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4547b9b4fd27Smrg  soname_spec='${libname}${release}${shared_ext}$major'
4548b9b4fd27Smrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
4549b9b4fd27Smrg  shlibpath_var=LD_LIBRARY_PATH
4550b9b4fd27Smrg  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
4551b9b4fd27Smrg  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
4552b9b4fd27Smrg  # the default ld.so.conf also contains /usr/contrib/lib and
4553b9b4fd27Smrg  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
4554b9b4fd27Smrg  # libtool to hard-code these into programs
4555caade7ccSmrg  ;;
4556caade7ccSmrg
4557b9b4fd27Smrgcygwin* | mingw* | pw32* | cegcc*)
4558b9b4fd27Smrg  version_type=windows
4559b9b4fd27Smrg  shrext_cmds=".dll"
4560b9b4fd27Smrg  need_version=no
4561b9b4fd27Smrg  need_lib_prefix=no
4562caade7ccSmrg
4563b9b4fd27Smrg  case $GCC,$host_os in
4564b9b4fd27Smrg  yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
4565b9b4fd27Smrg    library_names_spec='$libname.dll.a'
4566b9b4fd27Smrg    # DLL is installed to $(libdir)/../bin by postinstall_cmds
4567b9b4fd27Smrg    postinstall_cmds='base_file=`basename \${file}`~
4568b9b4fd27Smrg      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
4569b9b4fd27Smrg      dldir=$destdir/`dirname \$dlpath`~
4570b9b4fd27Smrg      test -d \$dldir || mkdir -p \$dldir~
4571b9b4fd27Smrg      $install_prog $dir/$dlname \$dldir/$dlname~
4572b9b4fd27Smrg      chmod a+x \$dldir/$dlname~
4573b9b4fd27Smrg      if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
4574b9b4fd27Smrg        eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
4575b9b4fd27Smrg      fi'
4576b9b4fd27Smrg    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
4577b9b4fd27Smrg      dlpath=$dir/\$dldll~
4578b9b4fd27Smrg       $RM \$dlpath'
4579b9b4fd27Smrg    shlibpath_overrides_runpath=yes
4580caade7ccSmrg
4581b9b4fd27Smrg    case $host_os in
4582b9b4fd27Smrg    cygwin*)
4583b9b4fd27Smrg      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
4584b9b4fd27Smrg      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
4585e8a5466aSmrgm4_if([$1], [],[
4586e8a5466aSmrg      sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
4587b9b4fd27Smrg      ;;
4588b9b4fd27Smrg    mingw* | cegcc*)
4589b9b4fd27Smrg      # MinGW DLLs use traditional 'lib' prefix
4590b9b4fd27Smrg      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
4591b9b4fd27Smrg      ;;
4592b9b4fd27Smrg    pw32*)
4593b9b4fd27Smrg      # pw32 DLLs use 'pw' prefix rather than 'lib'
4594b9b4fd27Smrg      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
4595b9b4fd27Smrg      ;;
4596b9b4fd27Smrg    esac
4597b9b4fd27Smrg    ;;
4598b9b4fd27Smrg
4599b9b4fd27Smrg  *)
4600b9b4fd27Smrg    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
4601b9b4fd27Smrg    ;;
4602b9b4fd27Smrg  esac
4603b9b4fd27Smrg  dynamic_linker='Win32 ld.exe'
4604b9b4fd27Smrg  # FIXME: first we should search . and the directory the executable is in
4605b9b4fd27Smrg  shlibpath_var=PATH
4606caade7ccSmrg  ;;
4607caade7ccSmrg
4608b9b4fd27Smrgdarwin* | rhapsody*)
4609b9b4fd27Smrg  dynamic_linker="$host_os dyld"
4610b9b4fd27Smrg  version_type=darwin
4611b9b4fd27Smrg  need_lib_prefix=no
4612b9b4fd27Smrg  need_version=no
4613b9b4fd27Smrg  library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
4614b9b4fd27Smrg  soname_spec='${libname}${release}${major}$shared_ext'
4615b9b4fd27Smrg  shlibpath_overrides_runpath=yes
4616b9b4fd27Smrg  shlibpath_var=DYLD_LIBRARY_PATH
4617b9b4fd27Smrg  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
4618b9b4fd27Smrgm4_if([$1], [],[
4619b9b4fd27Smrg  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
4620b9b4fd27Smrg  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
4621caade7ccSmrg  ;;
4622caade7ccSmrg
4623b9b4fd27Smrgdgux*)
4624b9b4fd27Smrg  version_type=linux
4625b9b4fd27Smrg  need_lib_prefix=no
4626b9b4fd27Smrg  need_version=no
4627b9b4fd27Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
4628b9b4fd27Smrg  soname_spec='${libname}${release}${shared_ext}$major'
4629b9b4fd27Smrg  shlibpath_var=LD_LIBRARY_PATH
4630485f0483Smrg  ;;
4631485f0483Smrg
4632b9b4fd27Smrgfreebsd1*)
4633b9b4fd27Smrg  dynamic_linker=no
4634caade7ccSmrg  ;;
4635caade7ccSmrg
4636b9b4fd27Smrgfreebsd* | dragonfly*)
4637b9b4fd27Smrg  # DragonFly does not have aout.  When/if they implement a new
4638b9b4fd27Smrg  # versioning mechanism, adjust this.
4639b9b4fd27Smrg  if test -x /usr/bin/objformat; then
4640b9b4fd27Smrg    objformat=`/usr/bin/objformat`
4641b9b4fd27Smrg  else
4642b9b4fd27Smrg    case $host_os in
4643b9b4fd27Smrg    freebsd[[123]]*) objformat=aout ;;
4644b9b4fd27Smrg    *) objformat=elf ;;
4645b9b4fd27Smrg    esac
4646b9b4fd27Smrg  fi
4647b9b4fd27Smrg  version_type=freebsd-$objformat
4648b9b4fd27Smrg  case $version_type in
4649b9b4fd27Smrg    freebsd-elf*)
4650b9b4fd27Smrg      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
4651b9b4fd27Smrg      need_version=no
4652b9b4fd27Smrg      need_lib_prefix=no
4653b9b4fd27Smrg      ;;
4654b9b4fd27Smrg    freebsd-*)
4655b9b4fd27Smrg      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
4656b9b4fd27Smrg      need_version=yes
4657b9b4fd27Smrg      ;;
4658b9b4fd27Smrg  esac
4659b9b4fd27Smrg  shlibpath_var=LD_LIBRARY_PATH
4660b9b4fd27Smrg  case $host_os in
4661b9b4fd27Smrg  freebsd2*)
4662b9b4fd27Smrg    shlibpath_overrides_runpath=yes
4663caade7ccSmrg    ;;
4664b9b4fd27Smrg  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
4665b9b4fd27Smrg    shlibpath_overrides_runpath=yes
4666b9b4fd27Smrg    hardcode_into_libs=yes
4667caade7ccSmrg    ;;
4668b9b4fd27Smrg  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
4669b9b4fd27Smrg  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
4670b9b4fd27Smrg    shlibpath_overrides_runpath=no
4671b9b4fd27Smrg    hardcode_into_libs=yes
4672caade7ccSmrg    ;;
4673b9b4fd27Smrg  *) # from 4.6 on, and DragonFly
4674b9b4fd27Smrg    shlibpath_overrides_runpath=yes
4675b9b4fd27Smrg    hardcode_into_libs=yes
4676caade7ccSmrg    ;;
4677caade7ccSmrg  esac
4678caade7ccSmrg  ;;
4679caade7ccSmrg
4680b9b4fd27Smrggnu*)
4681b9b4fd27Smrg  version_type=linux
4682b9b4fd27Smrg  need_lib_prefix=no
4683b9b4fd27Smrg  need_version=no
4684b9b4fd27Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
4685b9b4fd27Smrg  soname_spec='${libname}${release}${shared_ext}$major'
4686b9b4fd27Smrg  shlibpath_var=LD_LIBRARY_PATH
4687b9b4fd27Smrg  hardcode_into_libs=yes
4688caade7ccSmrg  ;;
4689caade7ccSmrg
4690e8a5466aSmrghaiku*)
4691e8a5466aSmrg  version_type=linux
4692e8a5466aSmrg  need_lib_prefix=no
4693e8a5466aSmrg  need_version=no
4694e8a5466aSmrg  dynamic_linker="$host_os runtime_loader"
4695e8a5466aSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
4696e8a5466aSmrg  soname_spec='${libname}${release}${shared_ext}$major'
4697e8a5466aSmrg  shlibpath_var=LIBRARY_PATH
4698e8a5466aSmrg  shlibpath_overrides_runpath=yes
4699e8a5466aSmrg  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
4700e8a5466aSmrg  hardcode_into_libs=yes
4701e8a5466aSmrg  ;;
4702e8a5466aSmrg
4703b9b4fd27Smrghpux9* | hpux10* | hpux11*)
4704b9b4fd27Smrg  # Give a soname corresponding to the major version so that dld.sl refuses to
4705b9b4fd27Smrg  # link against other versions.
4706b9b4fd27Smrg  version_type=sunos
4707b9b4fd27Smrg  need_lib_prefix=no
4708b9b4fd27Smrg  need_version=no
4709b9b4fd27Smrg  case $host_cpu in
4710b9b4fd27Smrg  ia64*)
4711b9b4fd27Smrg    shrext_cmds='.so'
4712b9b4fd27Smrg    hardcode_into_libs=yes
4713b9b4fd27Smrg    dynamic_linker="$host_os dld.so"
4714b9b4fd27Smrg    shlibpath_var=LD_LIBRARY_PATH
4715b9b4fd27Smrg    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
4716b9b4fd27Smrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4717b9b4fd27Smrg    soname_spec='${libname}${release}${shared_ext}$major'
4718b9b4fd27Smrg    if test "X$HPUX_IA64_MODE" = X32; then
4719b9b4fd27Smrg      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
4720b9b4fd27Smrg    else
4721b9b4fd27Smrg      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
4722b9b4fd27Smrg    fi
4723b9b4fd27Smrg    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
4724b9b4fd27Smrg    ;;
4725b9b4fd27Smrg  hppa*64*)
4726b9b4fd27Smrg    shrext_cmds='.sl'
4727b9b4fd27Smrg    hardcode_into_libs=yes
4728b9b4fd27Smrg    dynamic_linker="$host_os dld.sl"
4729b9b4fd27Smrg    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
4730b9b4fd27Smrg    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
4731b9b4fd27Smrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4732b9b4fd27Smrg    soname_spec='${libname}${release}${shared_ext}$major'
4733b9b4fd27Smrg    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
4734b9b4fd27Smrg    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
4735b9b4fd27Smrg    ;;
4736b9b4fd27Smrg  *)
4737b9b4fd27Smrg    shrext_cmds='.sl'
4738b9b4fd27Smrg    dynamic_linker="$host_os dld.sl"
4739b9b4fd27Smrg    shlibpath_var=SHLIB_PATH
4740b9b4fd27Smrg    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
4741b9b4fd27Smrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4742b9b4fd27Smrg    soname_spec='${libname}${release}${shared_ext}$major'
4743b9b4fd27Smrg    ;;
4744b9b4fd27Smrg  esac
4745e8a5466aSmrg  # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
4746b9b4fd27Smrg  postinstall_cmds='chmod 555 $lib'
4747e8a5466aSmrg  # or fails outright, so override atomically:
4748e8a5466aSmrg  install_override_mode=555
4749caade7ccSmrg  ;;
4750caade7ccSmrg
4751b9b4fd27Smrginterix[[3-9]]*)
4752b9b4fd27Smrg  version_type=linux
4753b9b4fd27Smrg  need_lib_prefix=no
4754b9b4fd27Smrg  need_version=no
4755b9b4fd27Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
4756b9b4fd27Smrg  soname_spec='${libname}${release}${shared_ext}$major'
4757b9b4fd27Smrg  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
4758b9b4fd27Smrg  shlibpath_var=LD_LIBRARY_PATH
4759b9b4fd27Smrg  shlibpath_overrides_runpath=no
4760b9b4fd27Smrg  hardcode_into_libs=yes
4761b9b4fd27Smrg  ;;
4762caade7ccSmrg
4763b9b4fd27Smrgirix5* | irix6* | nonstopux*)
4764b9b4fd27Smrg  case $host_os in
4765b9b4fd27Smrg    nonstopux*) version_type=nonstopux ;;
4766b9b4fd27Smrg    *)
4767b9b4fd27Smrg	if test "$lt_cv_prog_gnu_ld" = yes; then
4768b9b4fd27Smrg		version_type=linux
4769b9b4fd27Smrg	else
4770b9b4fd27Smrg		version_type=irix
4771b9b4fd27Smrg	fi ;;
4772caade7ccSmrg  esac
4773b9b4fd27Smrg  need_lib_prefix=no
4774b9b4fd27Smrg  need_version=no
4775b9b4fd27Smrg  soname_spec='${libname}${release}${shared_ext}$major'
4776b9b4fd27Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
4777b9b4fd27Smrg  case $host_os in
4778b9b4fd27Smrg  irix5* | nonstopux*)
4779b9b4fd27Smrg    libsuff= shlibsuff=
4780b9b4fd27Smrg    ;;
4781b9b4fd27Smrg  *)
4782b9b4fd27Smrg    case $LD in # libtool.m4 will add one of these switches to LD
4783b9b4fd27Smrg    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
4784b9b4fd27Smrg      libsuff= shlibsuff= libmagic=32-bit;;
4785b9b4fd27Smrg    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
4786b9b4fd27Smrg      libsuff=32 shlibsuff=N32 libmagic=N32;;
4787b9b4fd27Smrg    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
4788b9b4fd27Smrg      libsuff=64 shlibsuff=64 libmagic=64-bit;;
4789b9b4fd27Smrg    *) libsuff= shlibsuff= libmagic=never-match;;
4790b9b4fd27Smrg    esac
4791b9b4fd27Smrg    ;;
4792b9b4fd27Smrg  esac
4793b9b4fd27Smrg  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
4794b9b4fd27Smrg  shlibpath_overrides_runpath=no
4795b9b4fd27Smrg  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
4796b9b4fd27Smrg  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
4797b9b4fd27Smrg  hardcode_into_libs=yes
4798b9b4fd27Smrg  ;;
4799caade7ccSmrg
4800b9b4fd27Smrg# No shared lib support for Linux oldld, aout, or coff.
4801b9b4fd27Smrglinux*oldld* | linux*aout* | linux*coff*)
4802b9b4fd27Smrg  dynamic_linker=no
4803b9b4fd27Smrg  ;;
4804caade7ccSmrg
4805b9b4fd27Smrg# This must be Linux ELF.
4806e8a5466aSmrglinux* | k*bsd*-gnu | kopensolaris*-gnu)
4807b9b4fd27Smrg  version_type=linux
4808b9b4fd27Smrg  need_lib_prefix=no
4809b9b4fd27Smrg  need_version=no
4810b9b4fd27Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4811b9b4fd27Smrg  soname_spec='${libname}${release}${shared_ext}$major'
4812b9b4fd27Smrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
4813b9b4fd27Smrg  shlibpath_var=LD_LIBRARY_PATH
4814b9b4fd27Smrg  shlibpath_overrides_runpath=no
4815e8a5466aSmrg
4816b9b4fd27Smrg  # Some binutils ld are patched to set DT_RUNPATH
4817e8a5466aSmrg  AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
4818e8a5466aSmrg    [lt_cv_shlibpath_overrides_runpath=no
4819e8a5466aSmrg    save_LDFLAGS=$LDFLAGS
4820e8a5466aSmrg    save_libdir=$libdir
4821e8a5466aSmrg    eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
4822e8a5466aSmrg	 LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
4823e8a5466aSmrg    AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
4824e8a5466aSmrg      [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
4825e8a5466aSmrg	 [lt_cv_shlibpath_overrides_runpath=yes])])
4826e8a5466aSmrg    LDFLAGS=$save_LDFLAGS
4827e8a5466aSmrg    libdir=$save_libdir
4828e8a5466aSmrg    ])
4829e8a5466aSmrg  shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
4830caade7ccSmrg
4831b9b4fd27Smrg  # This implies no fast_install, which is unacceptable.
4832b9b4fd27Smrg  # Some rework will be needed to allow for fast_install
4833b9b4fd27Smrg  # before this can be enabled.
4834b9b4fd27Smrg  hardcode_into_libs=yes
4835caade7ccSmrg
4836b9b4fd27Smrg  # Append ld.so.conf contents to the search path
4837b9b4fd27Smrg  if test -f /etc/ld.so.conf; then
4838e8a5466aSmrg    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' ' '`
4839b9b4fd27Smrg    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
4840b9b4fd27Smrg  fi
4841caade7ccSmrg
4842b9b4fd27Smrg  # We used to test for /lib/ld.so.1 and disable shared libraries on
4843b9b4fd27Smrg  # powerpc, because MkLinux only supported shared libraries with the
4844b9b4fd27Smrg  # GNU dynamic linker.  Since this was broken with cross compilers,
4845b9b4fd27Smrg  # most powerpc-linux boxes support dynamic linking these days and
4846b9b4fd27Smrg  # people can always --disable-shared, the test was removed, and we
4847b9b4fd27Smrg  # assume the GNU/Linux dynamic linker is in use.
4848b9b4fd27Smrg  dynamic_linker='GNU/Linux ld.so'
4849b9b4fd27Smrg  ;;
4850caade7ccSmrg
4851b9b4fd27Smrgnetbsd*)
4852b9b4fd27Smrg  version_type=sunos
4853b9b4fd27Smrg  need_lib_prefix=no
4854b9b4fd27Smrg  need_version=no
4855b9b4fd27Smrg  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
4856b9b4fd27Smrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
4857b9b4fd27Smrg    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
4858b9b4fd27Smrg    dynamic_linker='NetBSD (a.out) ld.so'
4859b9b4fd27Smrg  else
4860b9b4fd27Smrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
4861b9b4fd27Smrg    soname_spec='${libname}${release}${shared_ext}$major'
4862b9b4fd27Smrg    dynamic_linker='NetBSD ld.elf_so'
4863b9b4fd27Smrg  fi
4864b9b4fd27Smrg  shlibpath_var=LD_LIBRARY_PATH
4865b9b4fd27Smrg  shlibpath_overrides_runpath=yes
4866b9b4fd27Smrg  hardcode_into_libs=yes
4867b9b4fd27Smrg  ;;
4868caade7ccSmrg
4869b9b4fd27Smrgnewsos6)
4870b9b4fd27Smrg  version_type=linux
4871b9b4fd27Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4872b9b4fd27Smrg  shlibpath_var=LD_LIBRARY_PATH
4873b9b4fd27Smrg  shlibpath_overrides_runpath=yes
4874b9b4fd27Smrg  ;;
4875caade7ccSmrg
4876b9b4fd27Smrg*nto* | *qnx*)
4877b9b4fd27Smrg  version_type=qnx
4878b9b4fd27Smrg  need_lib_prefix=no
4879b9b4fd27Smrg  need_version=no
4880b9b4fd27Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4881b9b4fd27Smrg  soname_spec='${libname}${release}${shared_ext}$major'
4882b9b4fd27Smrg  shlibpath_var=LD_LIBRARY_PATH
4883b9b4fd27Smrg  shlibpath_overrides_runpath=no
4884b9b4fd27Smrg  hardcode_into_libs=yes
4885b9b4fd27Smrg  dynamic_linker='ldqnx.so'
4886b9b4fd27Smrg  ;;
4887caade7ccSmrg
4888b9b4fd27Smrgopenbsd*)
4889b9b4fd27Smrg  version_type=sunos
4890b9b4fd27Smrg  sys_lib_dlsearch_path_spec="/usr/lib"
4891b9b4fd27Smrg  need_lib_prefix=no
4892b9b4fd27Smrg  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
4893b9b4fd27Smrg  case $host_os in
4894b9b4fd27Smrg    openbsd3.3 | openbsd3.3.*)	need_version=yes ;;
4895b9b4fd27Smrg    *)				need_version=no  ;;
4896b9b4fd27Smrg  esac
4897b9b4fd27Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
4898b9b4fd27Smrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
4899b9b4fd27Smrg  shlibpath_var=LD_LIBRARY_PATH
4900b9b4fd27Smrg  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
4901b9b4fd27Smrg    case $host_os in
4902b9b4fd27Smrg      openbsd2.[[89]] | openbsd2.[[89]].*)
4903b9b4fd27Smrg	shlibpath_overrides_runpath=no
4904b9b4fd27Smrg	;;
4905b9b4fd27Smrg      *)
4906b9b4fd27Smrg	shlibpath_overrides_runpath=yes
4907b9b4fd27Smrg	;;
4908b9b4fd27Smrg      esac
4909b9b4fd27Smrg  else
4910b9b4fd27Smrg    shlibpath_overrides_runpath=yes
4911b9b4fd27Smrg  fi
4912b9b4fd27Smrg  ;;
4913caade7ccSmrg
4914b9b4fd27Smrgos2*)
4915b9b4fd27Smrg  libname_spec='$name'
4916b9b4fd27Smrg  shrext_cmds=".dll"
4917b9b4fd27Smrg  need_lib_prefix=no
4918b9b4fd27Smrg  library_names_spec='$libname${shared_ext} $libname.a'
4919b9b4fd27Smrg  dynamic_linker='OS/2 ld.exe'
4920b9b4fd27Smrg  shlibpath_var=LIBPATH
4921b9b4fd27Smrg  ;;
4922caade7ccSmrg
4923b9b4fd27Smrgosf3* | osf4* | osf5*)
4924b9b4fd27Smrg  version_type=osf
4925b9b4fd27Smrg  need_lib_prefix=no
4926b9b4fd27Smrg  need_version=no
4927b9b4fd27Smrg  soname_spec='${libname}${release}${shared_ext}$major'
4928b9b4fd27Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4929b9b4fd27Smrg  shlibpath_var=LD_LIBRARY_PATH
4930b9b4fd27Smrg  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
4931b9b4fd27Smrg  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
4932b9b4fd27Smrg  ;;
4933caade7ccSmrg
4934b9b4fd27Smrgrdos*)
4935b9b4fd27Smrg  dynamic_linker=no
4936b9b4fd27Smrg  ;;
4937caade7ccSmrg
4938b9b4fd27Smrgsolaris*)
4939b9b4fd27Smrg  version_type=linux
4940b9b4fd27Smrg  need_lib_prefix=no
4941b9b4fd27Smrg  need_version=no
4942b9b4fd27Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4943b9b4fd27Smrg  soname_spec='${libname}${release}${shared_ext}$major'
4944b9b4fd27Smrg  shlibpath_var=LD_LIBRARY_PATH
4945b9b4fd27Smrg  shlibpath_overrides_runpath=yes
4946b9b4fd27Smrg  hardcode_into_libs=yes
4947b9b4fd27Smrg  # ldd complains unless libraries are executable
4948b9b4fd27Smrg  postinstall_cmds='chmod +x $lib'
4949b9b4fd27Smrg  ;;
4950caade7ccSmrg
4951b9b4fd27Smrgsunos4*)
4952b9b4fd27Smrg  version_type=sunos
4953b9b4fd27Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
4954b9b4fd27Smrg  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
4955b9b4fd27Smrg  shlibpath_var=LD_LIBRARY_PATH
4956b9b4fd27Smrg  shlibpath_overrides_runpath=yes
4957b9b4fd27Smrg  if test "$with_gnu_ld" = yes; then
4958b9b4fd27Smrg    need_lib_prefix=no
4959b9b4fd27Smrg  fi
4960b9b4fd27Smrg  need_version=yes
4961b9b4fd27Smrg  ;;
4962caade7ccSmrg
4963b9b4fd27Smrgsysv4 | sysv4.3*)
4964b9b4fd27Smrg  version_type=linux
4965b9b4fd27Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4966b9b4fd27Smrg  soname_spec='${libname}${release}${shared_ext}$major'
4967b9b4fd27Smrg  shlibpath_var=LD_LIBRARY_PATH
4968b9b4fd27Smrg  case $host_vendor in
4969b9b4fd27Smrg    sni)
4970b9b4fd27Smrg      shlibpath_overrides_runpath=no
4971b9b4fd27Smrg      need_lib_prefix=no
4972b9b4fd27Smrg      runpath_var=LD_RUN_PATH
4973b9b4fd27Smrg      ;;
4974b9b4fd27Smrg    siemens)
4975b9b4fd27Smrg      need_lib_prefix=no
4976b9b4fd27Smrg      ;;
4977b9b4fd27Smrg    motorola)
4978b9b4fd27Smrg      need_lib_prefix=no
4979b9b4fd27Smrg      need_version=no
4980b9b4fd27Smrg      shlibpath_overrides_runpath=no
4981b9b4fd27Smrg      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
4982b9b4fd27Smrg      ;;
4983b9b4fd27Smrg  esac
4984b9b4fd27Smrg  ;;
4985caade7ccSmrg
4986b9b4fd27Smrgsysv4*MP*)
4987b9b4fd27Smrg  if test -d /usr/nec ;then
4988b9b4fd27Smrg    version_type=linux
4989b9b4fd27Smrg    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
4990b9b4fd27Smrg    soname_spec='$libname${shared_ext}.$major'
4991b9b4fd27Smrg    shlibpath_var=LD_LIBRARY_PATH
4992caade7ccSmrg  fi
4993caade7ccSmrg  ;;
4994caade7ccSmrg
4995b9b4fd27Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
4996b9b4fd27Smrg  version_type=freebsd-elf
4997b9b4fd27Smrg  need_lib_prefix=no
4998b9b4fd27Smrg  need_version=no
4999b9b4fd27Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
5000b9b4fd27Smrg  soname_spec='${libname}${release}${shared_ext}$major'
5001b9b4fd27Smrg  shlibpath_var=LD_LIBRARY_PATH
5002b9b4fd27Smrg  shlibpath_overrides_runpath=yes
5003b9b4fd27Smrg  hardcode_into_libs=yes
5004b9b4fd27Smrg  if test "$with_gnu_ld" = yes; then
5005b9b4fd27Smrg    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
5006b9b4fd27Smrg  else
5007b9b4fd27Smrg    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
5008b9b4fd27Smrg    case $host_os in
5009b9b4fd27Smrg      sco3.2v5*)
5010b9b4fd27Smrg        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
5011b9b4fd27Smrg	;;
5012b9b4fd27Smrg    esac
5013caade7ccSmrg  fi
5014b9b4fd27Smrg  sys_lib_dlsearch_path_spec='/usr/lib'
5015b9b4fd27Smrg  ;;
5016caade7ccSmrg
5017b9b4fd27Smrgtpf*)
5018b9b4fd27Smrg  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
5019b9b4fd27Smrg  version_type=linux
5020b9b4fd27Smrg  need_lib_prefix=no
5021b9b4fd27Smrg  need_version=no
5022b9b4fd27Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
5023b9b4fd27Smrg  shlibpath_var=LD_LIBRARY_PATH
5024b9b4fd27Smrg  shlibpath_overrides_runpath=no
5025b9b4fd27Smrg  hardcode_into_libs=yes
5026b9b4fd27Smrg  ;;
5027caade7ccSmrg
5028b9b4fd27Smrguts4*)
5029b9b4fd27Smrg  version_type=linux
5030b9b4fd27Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
5031b9b4fd27Smrg  soname_spec='${libname}${release}${shared_ext}$major'
5032b9b4fd27Smrg  shlibpath_var=LD_LIBRARY_PATH
5033b9b4fd27Smrg  ;;
5034b9b4fd27Smrg
5035b9b4fd27Smrg*)
5036b9b4fd27Smrg  dynamic_linker=no
5037b9b4fd27Smrg  ;;
5038b9b4fd27Smrgesac
5039b9b4fd27SmrgAC_MSG_RESULT([$dynamic_linker])
5040b9b4fd27Smrgtest "$dynamic_linker" = no && can_build_shared=no
5041b9b4fd27Smrg
5042b9b4fd27Smrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var"
5043b9b4fd27Smrgif test "$GCC" = yes; then
5044b9b4fd27Smrg  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
5045b9b4fd27Smrgfi
5046caade7ccSmrg
5047b9b4fd27Smrgif test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
5048b9b4fd27Smrg  sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
5049b9b4fd27Smrgfi
5050b9b4fd27Smrgif test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
5051b9b4fd27Smrg  sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
5052b9b4fd27Smrgfi
5053caade7ccSmrg
5054b9b4fd27Smrg_LT_DECL([], [variables_saved_for_relink], [1],
5055b9b4fd27Smrg    [Variables whose values should be saved in libtool wrapper scripts and
5056b9b4fd27Smrg    restored at link time])
5057b9b4fd27Smrg_LT_DECL([], [need_lib_prefix], [0],
5058b9b4fd27Smrg    [Do we need the "lib" prefix for modules?])
5059b9b4fd27Smrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
5060b9b4fd27Smrg_LT_DECL([], [version_type], [0], [Library versioning type])
5061b9b4fd27Smrg_LT_DECL([], [runpath_var], [0],  [Shared library runtime path variable])
5062b9b4fd27Smrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
5063b9b4fd27Smrg_LT_DECL([], [shlibpath_overrides_runpath], [0],
5064b9b4fd27Smrg    [Is shlibpath searched before the hard-coded library search path?])
5065b9b4fd27Smrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix])
5066b9b4fd27Smrg_LT_DECL([], [library_names_spec], [1],
5067b9b4fd27Smrg    [[List of archive names.  First name is the real one, the rest are links.
5068b9b4fd27Smrg    The last name is the one that the linker finds with -lNAME]])
5069b9b4fd27Smrg_LT_DECL([], [soname_spec], [1],
5070b9b4fd27Smrg    [[The coded name of the library, if different from the real name]])
5071e8a5466aSmrg_LT_DECL([], [install_override_mode], [1],
5072e8a5466aSmrg    [Permission mode override for installation of shared libraries])
5073b9b4fd27Smrg_LT_DECL([], [postinstall_cmds], [2],
5074b9b4fd27Smrg    [Command to use after installation of a shared archive])
5075b9b4fd27Smrg_LT_DECL([], [postuninstall_cmds], [2],
5076b9b4fd27Smrg    [Command to use after uninstallation of a shared archive])
5077b9b4fd27Smrg_LT_DECL([], [finish_cmds], [2],
5078b9b4fd27Smrg    [Commands used to finish a libtool library installation in a directory])
5079b9b4fd27Smrg_LT_DECL([], [finish_eval], [1],
5080b9b4fd27Smrg    [[As "finish_cmds", except a single script fragment to be evaled but
5081b9b4fd27Smrg    not shown]])
5082b9b4fd27Smrg_LT_DECL([], [hardcode_into_libs], [0],
5083b9b4fd27Smrg    [Whether we should hardcode library paths into libraries])
5084b9b4fd27Smrg_LT_DECL([], [sys_lib_search_path_spec], [2],
5085b9b4fd27Smrg    [Compile-time system search path for libraries])
5086b9b4fd27Smrg_LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
5087b9b4fd27Smrg    [Run-time system search path for libraries])
5088b9b4fd27Smrg])# _LT_SYS_DYNAMIC_LINKER
5089b9b4fd27Smrg
5090b9b4fd27Smrg
5091b9b4fd27Smrg# _LT_PATH_TOOL_PREFIX(TOOL)
5092caade7ccSmrg# --------------------------
5093b9b4fd27Smrg# find a file program which can recognize shared library
5094b9b4fd27SmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX],
5095b9b4fd27Smrg[m4_require([_LT_DECL_EGREP])dnl
5096b9b4fd27SmrgAC_MSG_CHECKING([for $1])
5097b9b4fd27SmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
5098b9b4fd27Smrg[case $MAGIC_CMD in
5099b9b4fd27Smrg[[\\/*] |  ?:[\\/]*])
5100b9b4fd27Smrg  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
5101b9b4fd27Smrg  ;;
5102b9b4fd27Smrg*)
5103b9b4fd27Smrg  lt_save_MAGIC_CMD="$MAGIC_CMD"
5104b9b4fd27Smrg  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
5105b9b4fd27Smrgdnl $ac_dummy forces splitting on constant user-supplied paths.
5106b9b4fd27Smrgdnl POSIX.2 word splitting is done only on the output of word expansions,
5107b9b4fd27Smrgdnl not every word.  This closes a longstanding sh security hole.
5108b9b4fd27Smrg  ac_dummy="m4_if([$2], , $PATH, [$2])"
5109b9b4fd27Smrg  for ac_dir in $ac_dummy; do
5110b9b4fd27Smrg    IFS="$lt_save_ifs"
5111b9b4fd27Smrg    test -z "$ac_dir" && ac_dir=.
5112b9b4fd27Smrg    if test -f $ac_dir/$1; then
5113b9b4fd27Smrg      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
5114b9b4fd27Smrg      if test -n "$file_magic_test_file"; then
5115b9b4fd27Smrg	case $deplibs_check_method in
5116b9b4fd27Smrg	"file_magic "*)
5117b9b4fd27Smrg	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
5118b9b4fd27Smrg	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
5119b9b4fd27Smrg	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
5120b9b4fd27Smrg	    $EGREP "$file_magic_regex" > /dev/null; then
5121b9b4fd27Smrg	    :
5122b9b4fd27Smrg	  else
5123b9b4fd27Smrg	    cat <<_LT_EOF 1>&2
5124caade7ccSmrg
5125b9b4fd27Smrg*** Warning: the command libtool uses to detect shared libraries,
5126b9b4fd27Smrg*** $file_magic_cmd, produces output that libtool cannot recognize.
5127b9b4fd27Smrg*** The result is that libtool may fail to recognize shared libraries
5128b9b4fd27Smrg*** as such.  This will affect the creation of libtool libraries that
5129b9b4fd27Smrg*** depend on shared libraries, but programs linked with such libtool
5130b9b4fd27Smrg*** libraries will work regardless of this problem.  Nevertheless, you
5131b9b4fd27Smrg*** may want to report the problem to your system manager and/or to
5132b9b4fd27Smrg*** bug-libtool@gnu.org
5133caade7ccSmrg
5134b9b4fd27Smrg_LT_EOF
5135b9b4fd27Smrg	  fi ;;
5136b9b4fd27Smrg	esac
5137b9b4fd27Smrg      fi
5138b9b4fd27Smrg      break
5139b9b4fd27Smrg    fi
5140b9b4fd27Smrg  done
5141b9b4fd27Smrg  IFS="$lt_save_ifs"
5142b9b4fd27Smrg  MAGIC_CMD="$lt_save_MAGIC_CMD"
5143b9b4fd27Smrg  ;;
5144b9b4fd27Smrgesac])
5145b9b4fd27SmrgMAGIC_CMD="$lt_cv_path_MAGIC_CMD"
5146b9b4fd27Smrgif test -n "$MAGIC_CMD"; then
5147b9b4fd27Smrg  AC_MSG_RESULT($MAGIC_CMD)
5148b9b4fd27Smrgelse
5149b9b4fd27Smrg  AC_MSG_RESULT(no)
5150b9b4fd27Smrgfi
5151b9b4fd27Smrg_LT_DECL([], [MAGIC_CMD], [0],
5152b9b4fd27Smrg	 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
5153b9b4fd27Smrg])# _LT_PATH_TOOL_PREFIX
5154caade7ccSmrg
5155b9b4fd27Smrg# Old name:
5156b9b4fd27SmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
5157b9b4fd27Smrgdnl aclocal-1.4 backwards compatibility:
5158b9b4fd27Smrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
5159caade7ccSmrg
5160caade7ccSmrg
5161b9b4fd27Smrg# _LT_PATH_MAGIC
5162b9b4fd27Smrg# --------------
5163b9b4fd27Smrg# find a file program which can recognize a shared library
5164b9b4fd27Smrgm4_defun([_LT_PATH_MAGIC],
5165b9b4fd27Smrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
5166b9b4fd27Smrgif test -z "$lt_cv_path_MAGIC_CMD"; then
5167b9b4fd27Smrg  if test -n "$ac_tool_prefix"; then
5168b9b4fd27Smrg    _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
5169b9b4fd27Smrg  else
5170b9b4fd27Smrg    MAGIC_CMD=:
5171b9b4fd27Smrg  fi
5172b9b4fd27Smrgfi
5173b9b4fd27Smrg])# _LT_PATH_MAGIC
5174caade7ccSmrg
5175caade7ccSmrg
5176b9b4fd27Smrg# LT_PATH_LD
5177b9b4fd27Smrg# ----------
5178b9b4fd27Smrg# find the pathname to the GNU or non-GNU linker
5179b9b4fd27SmrgAC_DEFUN([LT_PATH_LD],
5180b9b4fd27Smrg[AC_REQUIRE([AC_PROG_CC])dnl
5181b9b4fd27SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl
5182b9b4fd27SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl
5183b9b4fd27Smrgm4_require([_LT_DECL_SED])dnl
5184b9b4fd27Smrgm4_require([_LT_DECL_EGREP])dnl
5185e8a5466aSmrgm4_require([_LT_PROG_ECHO_BACKSLASH])dnl
5186caade7ccSmrg
5187b9b4fd27SmrgAC_ARG_WITH([gnu-ld],
5188b9b4fd27Smrg    [AS_HELP_STRING([--with-gnu-ld],
5189b9b4fd27Smrg	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
5190b9b4fd27Smrg    [test "$withval" = no || with_gnu_ld=yes],
5191b9b4fd27Smrg    [with_gnu_ld=no])dnl
5192b9b4fd27Smrg
5193b9b4fd27Smrgac_prog=ld
5194b9b4fd27Smrgif test "$GCC" = yes; then
5195b9b4fd27Smrg  # Check if gcc -print-prog-name=ld gives a path.
5196b9b4fd27Smrg  AC_MSG_CHECKING([for ld used by $CC])
5197b9b4fd27Smrg  case $host in
5198b9b4fd27Smrg  *-*-mingw*)
5199b9b4fd27Smrg    # gcc leaves a trailing carriage return which upsets mingw
5200b9b4fd27Smrg    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
5201b9b4fd27Smrg  *)
5202b9b4fd27Smrg    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
5203b9b4fd27Smrg  esac
5204b9b4fd27Smrg  case $ac_prog in
5205b9b4fd27Smrg    # Accept absolute paths.
5206b9b4fd27Smrg    [[\\/]]* | ?:[[\\/]]*)
5207b9b4fd27Smrg      re_direlt='/[[^/]][[^/]]*/\.\./'
5208b9b4fd27Smrg      # Canonicalize the pathname of ld
5209b9b4fd27Smrg      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
5210b9b4fd27Smrg      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
5211b9b4fd27Smrg	ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
5212b9b4fd27Smrg      done
5213b9b4fd27Smrg      test -z "$LD" && LD="$ac_prog"
5214b9b4fd27Smrg      ;;
5215b9b4fd27Smrg  "")
5216b9b4fd27Smrg    # If it fails, then pretend we aren't using GCC.
5217b9b4fd27Smrg    ac_prog=ld
5218b9b4fd27Smrg    ;;
5219b9b4fd27Smrg  *)
5220b9b4fd27Smrg    # If it is relative, then search for the first ld in PATH.
5221b9b4fd27Smrg    with_gnu_ld=unknown
5222b9b4fd27Smrg    ;;
5223b9b4fd27Smrg  esac
5224b9b4fd27Smrgelif test "$with_gnu_ld" = yes; then
5225b9b4fd27Smrg  AC_MSG_CHECKING([for GNU ld])
5226caade7ccSmrgelse
5227b9b4fd27Smrg  AC_MSG_CHECKING([for non-GNU ld])
5228caade7ccSmrgfi
5229b9b4fd27SmrgAC_CACHE_VAL(lt_cv_path_LD,
5230b9b4fd27Smrg[if test -z "$LD"; then
5231b9b4fd27Smrg  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
5232b9b4fd27Smrg  for ac_dir in $PATH; do
5233b9b4fd27Smrg    IFS="$lt_save_ifs"
5234b9b4fd27Smrg    test -z "$ac_dir" && ac_dir=.
5235b9b4fd27Smrg    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
5236b9b4fd27Smrg      lt_cv_path_LD="$ac_dir/$ac_prog"
5237b9b4fd27Smrg      # Check to see if the program is GNU ld.  I'd rather use --version,
5238b9b4fd27Smrg      # but apparently some variants of GNU ld only accept -v.
5239b9b4fd27Smrg      # Break only if it was the GNU/non-GNU ld that we prefer.
5240b9b4fd27Smrg      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
5241b9b4fd27Smrg      *GNU* | *'with BFD'*)
5242b9b4fd27Smrg	test "$with_gnu_ld" != no && break
5243b9b4fd27Smrg	;;
5244b9b4fd27Smrg      *)
5245b9b4fd27Smrg	test "$with_gnu_ld" != yes && break
5246b9b4fd27Smrg	;;
5247b9b4fd27Smrg      esac
5248b9b4fd27Smrg    fi
5249b9b4fd27Smrg  done
5250b9b4fd27Smrg  IFS="$lt_save_ifs"
5251caade7ccSmrgelse
5252b9b4fd27Smrg  lt_cv_path_LD="$LD" # Let the user override the test with a path.
5253b9b4fd27Smrgfi])
5254b9b4fd27SmrgLD="$lt_cv_path_LD"
5255b9b4fd27Smrgif test -n "$LD"; then
5256b9b4fd27Smrg  AC_MSG_RESULT($LD)
5257caade7ccSmrgelse
5258b9b4fd27Smrg  AC_MSG_RESULT(no)
5259caade7ccSmrgfi
5260b9b4fd27Smrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
5261b9b4fd27Smrg_LT_PATH_LD_GNU
5262b9b4fd27SmrgAC_SUBST([LD])
5263caade7ccSmrg
5264b9b4fd27Smrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
5265b9b4fd27Smrg])# LT_PATH_LD
5266caade7ccSmrg
5267b9b4fd27Smrg# Old names:
5268b9b4fd27SmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
5269b9b4fd27SmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
5270b9b4fd27Smrgdnl aclocal-1.4 backwards compatibility:
5271b9b4fd27Smrgdnl AC_DEFUN([AM_PROG_LD], [])
5272b9b4fd27Smrgdnl AC_DEFUN([AC_PROG_LD], [])
5273caade7ccSmrg
5274caade7ccSmrg
5275b9b4fd27Smrg# _LT_PATH_LD_GNU
5276b9b4fd27Smrg#- --------------
5277b9b4fd27Smrgm4_defun([_LT_PATH_LD_GNU],
5278b9b4fd27Smrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
5279b9b4fd27Smrg[# I'd rather use --version here, but apparently some GNU lds only accept -v.
5280b9b4fd27Smrgcase `$LD -v 2>&1 </dev/null` in
5281b9b4fd27Smrg*GNU* | *'with BFD'*)
5282b9b4fd27Smrg  lt_cv_prog_gnu_ld=yes
5283b9b4fd27Smrg  ;;
5284b9b4fd27Smrg*)
5285b9b4fd27Smrg  lt_cv_prog_gnu_ld=no
5286b9b4fd27Smrg  ;;
5287b9b4fd27Smrgesac])
5288b9b4fd27Smrgwith_gnu_ld=$lt_cv_prog_gnu_ld
5289b9b4fd27Smrg])# _LT_PATH_LD_GNU
5290caade7ccSmrg
5291caade7ccSmrg
5292b9b4fd27Smrg# _LT_CMD_RELOAD
5293b9b4fd27Smrg# --------------
5294b9b4fd27Smrg# find reload flag for linker
5295b9b4fd27Smrg#   -- PORTME Some linkers may need a different reload flag.
5296b9b4fd27Smrgm4_defun([_LT_CMD_RELOAD],
5297b9b4fd27Smrg[AC_CACHE_CHECK([for $LD option to reload object files],
5298b9b4fd27Smrg  lt_cv_ld_reload_flag,
5299b9b4fd27Smrg  [lt_cv_ld_reload_flag='-r'])
5300b9b4fd27Smrgreload_flag=$lt_cv_ld_reload_flag
5301b9b4fd27Smrgcase $reload_flag in
5302b9b4fd27Smrg"" | " "*) ;;
5303b9b4fd27Smrg*) reload_flag=" $reload_flag" ;;
5304b9b4fd27Smrgesac
5305b9b4fd27Smrgreload_cmds='$LD$reload_flag -o $output$reload_objs'
5306b9b4fd27Smrgcase $host_os in
5307b9b4fd27Smrg  darwin*)
5308b9b4fd27Smrg    if test "$GCC" = yes; then
5309b9b4fd27Smrg      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
5310caade7ccSmrg    else
5311b9b4fd27Smrg      reload_cmds='$LD$reload_flag -o $output$reload_objs'
5312caade7ccSmrg    fi
5313b9b4fd27Smrg    ;;
5314b9b4fd27Smrgesac
5315e8a5466aSmrg_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
5316e8a5466aSmrg_LT_TAGDECL([], [reload_cmds], [2])dnl
5317b9b4fd27Smrg])# _LT_CMD_RELOAD
5318caade7ccSmrg
5319caade7ccSmrg
5320b9b4fd27Smrg# _LT_CHECK_MAGIC_METHOD
5321b9b4fd27Smrg# ----------------------
5322b9b4fd27Smrg# how to check for library dependencies
5323b9b4fd27Smrg#  -- PORTME fill in with the dynamic library characteristics
5324b9b4fd27Smrgm4_defun([_LT_CHECK_MAGIC_METHOD],
5325b9b4fd27Smrg[m4_require([_LT_DECL_EGREP])
5326b9b4fd27Smrgm4_require([_LT_DECL_OBJDUMP])
5327b9b4fd27SmrgAC_CACHE_CHECK([how to recognize dependent libraries],
5328b9b4fd27Smrglt_cv_deplibs_check_method,
5329b9b4fd27Smrg[lt_cv_file_magic_cmd='$MAGIC_CMD'
5330b9b4fd27Smrglt_cv_file_magic_test_file=
5331b9b4fd27Smrglt_cv_deplibs_check_method='unknown'
5332b9b4fd27Smrg# Need to set the preceding variable on all platforms that support
5333b9b4fd27Smrg# interlibrary dependencies.
5334b9b4fd27Smrg# 'none' -- dependencies not supported.
5335b9b4fd27Smrg# `unknown' -- same as none, but documents that we really don't know.
5336b9b4fd27Smrg# 'pass_all' -- all dependencies passed with no checks.
5337b9b4fd27Smrg# 'test_compile' -- check by making test program.
5338b9b4fd27Smrg# 'file_magic [[regex]]' -- check by looking for files in library path
5339b9b4fd27Smrg# which responds to the $file_magic_cmd with a given extended regex.
5340b9b4fd27Smrg# If you have `file' or equivalent on your system and you're not sure
5341b9b4fd27Smrg# whether `pass_all' will *always* work, you probably want this one.
5342caade7ccSmrg
5343caade7ccSmrgcase $host_os in
5344b9b4fd27Smrgaix[[4-9]]*)
5345b9b4fd27Smrg  lt_cv_deplibs_check_method=pass_all
5346b9b4fd27Smrg  ;;
5347caade7ccSmrg
5348b9b4fd27Smrgbeos*)
5349b9b4fd27Smrg  lt_cv_deplibs_check_method=pass_all
5350b9b4fd27Smrg  ;;
5351caade7ccSmrg
5352b9b4fd27Smrgbsdi[[45]]*)
5353b9b4fd27Smrg  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
5354b9b4fd27Smrg  lt_cv_file_magic_cmd='/usr/bin/file -L'
5355b9b4fd27Smrg  lt_cv_file_magic_test_file=/shlib/libc.so
5356b9b4fd27Smrg  ;;
5357caade7ccSmrg
5358b9b4fd27Smrgcygwin*)
5359b9b4fd27Smrg  # func_win32_libid is a shell function defined in ltmain.sh
5360b9b4fd27Smrg  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
5361b9b4fd27Smrg  lt_cv_file_magic_cmd='func_win32_libid'
5362b9b4fd27Smrg  ;;
5363caade7ccSmrg
5364b9b4fd27Smrgmingw* | pw32*)
5365b9b4fd27Smrg  # Base MSYS/MinGW do not provide the 'file' command needed by
5366b9b4fd27Smrg  # func_win32_libid shell function, so use a weaker test based on 'objdump',
5367b9b4fd27Smrg  # unless we find 'file', for example because we are cross-compiling.
5368e8a5466aSmrg  # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
5369e8a5466aSmrg  if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
5370b9b4fd27Smrg    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
5371b9b4fd27Smrg    lt_cv_file_magic_cmd='func_win32_libid'
5372b9b4fd27Smrg  else
5373e8a5466aSmrg    # Keep this pattern in sync with the one in func_win32_libid.
5374e8a5466aSmrg    lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
5375b9b4fd27Smrg    lt_cv_file_magic_cmd='$OBJDUMP -f'
5376b9b4fd27Smrg  fi
5377b9b4fd27Smrg  ;;
5378caade7ccSmrg
5379e8a5466aSmrgcegcc*)
5380b9b4fd27Smrg  # use the weaker test based on 'objdump'. See mingw*.
5381b9b4fd27Smrg  lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
5382b9b4fd27Smrg  lt_cv_file_magic_cmd='$OBJDUMP -f'
5383caade7ccSmrg  ;;
5384caade7ccSmrg
5385b9b4fd27Smrgdarwin* | rhapsody*)
5386b9b4fd27Smrg  lt_cv_deplibs_check_method=pass_all
5387b9b4fd27Smrg  ;;
5388caade7ccSmrg
5389b9b4fd27Smrgfreebsd* | dragonfly*)
5390b9b4fd27Smrg  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
5391caade7ccSmrg    case $host_cpu in
5392b9b4fd27Smrg    i*86 )
5393b9b4fd27Smrg      # Not sure whether the presence of OpenBSD here was a mistake.
5394b9b4fd27Smrg      # Let's accept both of them until this is cleared up.
5395b9b4fd27Smrg      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
5396b9b4fd27Smrg      lt_cv_file_magic_cmd=/usr/bin/file
5397b9b4fd27Smrg      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
5398caade7ccSmrg      ;;
5399caade7ccSmrg    esac
5400b9b4fd27Smrg  else
5401b9b4fd27Smrg    lt_cv_deplibs_check_method=pass_all
5402b9b4fd27Smrg  fi
5403b9b4fd27Smrg  ;;
5404caade7ccSmrg
5405b9b4fd27Smrggnu*)
5406b9b4fd27Smrg  lt_cv_deplibs_check_method=pass_all
5407b9b4fd27Smrg  ;;
5408caade7ccSmrg
5409e8a5466aSmrghaiku*)
5410e8a5466aSmrg  lt_cv_deplibs_check_method=pass_all
5411e8a5466aSmrg  ;;
5412e8a5466aSmrg
5413b9b4fd27Smrghpux10.20* | hpux11*)
5414b9b4fd27Smrg  lt_cv_file_magic_cmd=/usr/bin/file
5415b9b4fd27Smrg  case $host_cpu in
5416b9b4fd27Smrg  ia64*)
5417b9b4fd27Smrg    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
5418b9b4fd27Smrg    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
5419caade7ccSmrg    ;;
5420b9b4fd27Smrg  hppa*64*)
5421e8a5466aSmrg    [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]']
5422b9b4fd27Smrg    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
5423caade7ccSmrg    ;;
5424b9b4fd27Smrg  *)
5425e8a5466aSmrg    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
5426b9b4fd27Smrg    lt_cv_file_magic_test_file=/usr/lib/libc.sl
5427caade7ccSmrg    ;;
5428b9b4fd27Smrg  esac
5429b9b4fd27Smrg  ;;
5430caade7ccSmrg
5431b9b4fd27Smrginterix[[3-9]]*)
5432b9b4fd27Smrg  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
5433b9b4fd27Smrg  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
5434b9b4fd27Smrg  ;;
5435caade7ccSmrg
5436b9b4fd27Smrgirix5* | irix6* | nonstopux*)
5437b9b4fd27Smrg  case $LD in
5438b9b4fd27Smrg  *-32|*"-32 ") libmagic=32-bit;;
5439b9b4fd27Smrg  *-n32|*"-n32 ") libmagic=N32;;
5440b9b4fd27Smrg  *-64|*"-64 ") libmagic=64-bit;;
5441b9b4fd27Smrg  *) libmagic=never-match;;
5442b9b4fd27Smrg  esac
5443b9b4fd27Smrg  lt_cv_deplibs_check_method=pass_all
5444b9b4fd27Smrg  ;;
5445caade7ccSmrg
5446b9b4fd27Smrg# This must be Linux ELF.
5447e8a5466aSmrglinux* | k*bsd*-gnu | kopensolaris*-gnu)
5448b9b4fd27Smrg  lt_cv_deplibs_check_method=pass_all
5449b9b4fd27Smrg  ;;
5450caade7ccSmrg
5451b9b4fd27Smrgnetbsd*)
5452b9b4fd27Smrg  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
5453b9b4fd27Smrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
5454b9b4fd27Smrg  else
5455b9b4fd27Smrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
5456b9b4fd27Smrg  fi
5457b9b4fd27Smrg  ;;
5458caade7ccSmrg
5459b9b4fd27Smrgnewos6*)
5460b9b4fd27Smrg  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
5461b9b4fd27Smrg  lt_cv_file_magic_cmd=/usr/bin/file
5462b9b4fd27Smrg  lt_cv_file_magic_test_file=/usr/lib/libnls.so
5463b9b4fd27Smrg  ;;
5464caade7ccSmrg
5465b9b4fd27Smrg*nto* | *qnx*)
5466b9b4fd27Smrg  lt_cv_deplibs_check_method=pass_all
5467b9b4fd27Smrg  ;;
5468caade7ccSmrg
5469b9b4fd27Smrgopenbsd*)
5470b9b4fd27Smrg  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5471b9b4fd27Smrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
5472b9b4fd27Smrg  else
5473b9b4fd27Smrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
5474b9b4fd27Smrg  fi
5475b9b4fd27Smrg  ;;
5476caade7ccSmrg
5477b9b4fd27Smrgosf3* | osf4* | osf5*)
5478b9b4fd27Smrg  lt_cv_deplibs_check_method=pass_all
5479b9b4fd27Smrg  ;;
5480caade7ccSmrg
5481b9b4fd27Smrgrdos*)
5482b9b4fd27Smrg  lt_cv_deplibs_check_method=pass_all
5483b9b4fd27Smrg  ;;
5484caade7ccSmrg
5485b9b4fd27Smrgsolaris*)
5486b9b4fd27Smrg  lt_cv_deplibs_check_method=pass_all
5487b9b4fd27Smrg  ;;
5488caade7ccSmrg
5489b9b4fd27Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
5490b9b4fd27Smrg  lt_cv_deplibs_check_method=pass_all
5491b9b4fd27Smrg  ;;
5492caade7ccSmrg
5493b9b4fd27Smrgsysv4 | sysv4.3*)
5494b9b4fd27Smrg  case $host_vendor in
5495b9b4fd27Smrg  motorola)
5496b9b4fd27Smrg    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]]'
5497b9b4fd27Smrg    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
5498caade7ccSmrg    ;;
5499b9b4fd27Smrg  ncr)
5500b9b4fd27Smrg    lt_cv_deplibs_check_method=pass_all
5501caade7ccSmrg    ;;
5502b9b4fd27Smrg  sequent)
5503b9b4fd27Smrg    lt_cv_file_magic_cmd='/bin/file'
5504b9b4fd27Smrg    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
5505caade7ccSmrg    ;;
5506b9b4fd27Smrg  sni)
5507b9b4fd27Smrg    lt_cv_file_magic_cmd='/bin/file'
5508b9b4fd27Smrg    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
5509b9b4fd27Smrg    lt_cv_file_magic_test_file=/lib/libc.so
5510caade7ccSmrg    ;;
5511b9b4fd27Smrg  siemens)
5512b9b4fd27Smrg    lt_cv_deplibs_check_method=pass_all
5513caade7ccSmrg    ;;
5514b9b4fd27Smrg  pc)
5515b9b4fd27Smrg    lt_cv_deplibs_check_method=pass_all
5516caade7ccSmrg    ;;
5517b9b4fd27Smrg  esac
5518b9b4fd27Smrg  ;;
5519b9b4fd27Smrg
5520b9b4fd27Smrgtpf*)
5521b9b4fd27Smrg  lt_cv_deplibs_check_method=pass_all
5522b9b4fd27Smrg  ;;
5523caade7ccSmrgesac
5524b9b4fd27Smrg])
5525b9b4fd27Smrgfile_magic_cmd=$lt_cv_file_magic_cmd
5526b9b4fd27Smrgdeplibs_check_method=$lt_cv_deplibs_check_method
5527b9b4fd27Smrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown
5528caade7ccSmrg
5529b9b4fd27Smrg_LT_DECL([], [deplibs_check_method], [1],
5530b9b4fd27Smrg    [Method to check whether dependent libraries are shared objects])
5531b9b4fd27Smrg_LT_DECL([], [file_magic_cmd], [1],
5532b9b4fd27Smrg    [Command to use when deplibs_check_method == "file_magic"])
5533b9b4fd27Smrg])# _LT_CHECK_MAGIC_METHOD
5534caade7ccSmrg
5535caade7ccSmrg
5536b9b4fd27Smrg# LT_PATH_NM
5537b9b4fd27Smrg# ----------
5538b9b4fd27Smrg# find the pathname to a BSD- or MS-compatible name lister
5539b9b4fd27SmrgAC_DEFUN([LT_PATH_NM],
5540b9b4fd27Smrg[AC_REQUIRE([AC_PROG_CC])dnl
5541b9b4fd27SmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
5542b9b4fd27Smrg[if test -n "$NM"; then
5543b9b4fd27Smrg  # Let the user override the test.
5544b9b4fd27Smrg  lt_cv_path_NM="$NM"
5545b9b4fd27Smrgelse
5546b9b4fd27Smrg  lt_nm_to_check="${ac_tool_prefix}nm"
5547b9b4fd27Smrg  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
5548b9b4fd27Smrg    lt_nm_to_check="$lt_nm_to_check nm"
5549b9b4fd27Smrg  fi
5550b9b4fd27Smrg  for lt_tmp_nm in $lt_nm_to_check; do
5551b9b4fd27Smrg    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
5552b9b4fd27Smrg    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
5553b9b4fd27Smrg      IFS="$lt_save_ifs"
5554b9b4fd27Smrg      test -z "$ac_dir" && ac_dir=.
5555b9b4fd27Smrg      tmp_nm="$ac_dir/$lt_tmp_nm"
5556b9b4fd27Smrg      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
5557b9b4fd27Smrg	# Check to see if the nm accepts a BSD-compat flag.
5558b9b4fd27Smrg	# Adding the `sed 1q' prevents false positives on HP-UX, which says:
5559b9b4fd27Smrg	#   nm: unknown option "B" ignored
5560b9b4fd27Smrg	# Tru64's nm complains that /dev/null is an invalid object file
5561b9b4fd27Smrg	case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
5562b9b4fd27Smrg	*/dev/null* | *'Invalid file or object type'*)
5563b9b4fd27Smrg	  lt_cv_path_NM="$tmp_nm -B"
5564b9b4fd27Smrg	  break
5565b9b4fd27Smrg	  ;;
5566b9b4fd27Smrg	*)
5567b9b4fd27Smrg	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
5568b9b4fd27Smrg	  */dev/null*)
5569b9b4fd27Smrg	    lt_cv_path_NM="$tmp_nm -p"
5570b9b4fd27Smrg	    break
5571b9b4fd27Smrg	    ;;
5572b9b4fd27Smrg	  *)
5573b9b4fd27Smrg	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
5574b9b4fd27Smrg	    continue # so that we can try to find one that supports BSD flags
5575b9b4fd27Smrg	    ;;
5576b9b4fd27Smrg	  esac
5577b9b4fd27Smrg	  ;;
5578b9b4fd27Smrg	esac
5579b9b4fd27Smrg      fi
5580b9b4fd27Smrg    done
5581b9b4fd27Smrg    IFS="$lt_save_ifs"
5582b9b4fd27Smrg  done
5583b9b4fd27Smrg  : ${lt_cv_path_NM=no}
5584b9b4fd27Smrgfi])
5585b9b4fd27Smrgif test "$lt_cv_path_NM" != "no"; then
5586b9b4fd27Smrg  NM="$lt_cv_path_NM"
5587b9b4fd27Smrgelse
5588b9b4fd27Smrg  # Didn't find any BSD compatible name lister, look for dumpbin.
5589e8a5466aSmrg  if test -n "$DUMPBIN"; then :
5590e8a5466aSmrg    # Let the user override the test.
5591e8a5466aSmrg  else
5592e8a5466aSmrg    AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
5593e8a5466aSmrg    case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
5594e8a5466aSmrg    *COFF*)
5595e8a5466aSmrg      DUMPBIN="$DUMPBIN -symbols"
5596e8a5466aSmrg      ;;
5597e8a5466aSmrg    *)
5598e8a5466aSmrg      DUMPBIN=:
5599e8a5466aSmrg      ;;
5600e8a5466aSmrg    esac
5601e8a5466aSmrg  fi
5602b9b4fd27Smrg  AC_SUBST([DUMPBIN])
5603b9b4fd27Smrg  if test "$DUMPBIN" != ":"; then
5604b9b4fd27Smrg    NM="$DUMPBIN"
5605b9b4fd27Smrg  fi
5606b9b4fd27Smrgfi
5607b9b4fd27Smrgtest -z "$NM" && NM=nm
5608b9b4fd27SmrgAC_SUBST([NM])
5609b9b4fd27Smrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
5610b9b4fd27Smrg
5611b9b4fd27SmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
5612b9b4fd27Smrg  [lt_cv_nm_interface="BSD nm"
5613b9b4fd27Smrg  echo "int some_variable = 0;" > conftest.$ac_ext
5614e8a5466aSmrg  (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
5615b9b4fd27Smrg  (eval "$ac_compile" 2>conftest.err)
5616b9b4fd27Smrg  cat conftest.err >&AS_MESSAGE_LOG_FD
5617e8a5466aSmrg  (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
5618b9b4fd27Smrg  (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
5619b9b4fd27Smrg  cat conftest.err >&AS_MESSAGE_LOG_FD
5620e8a5466aSmrg  (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
5621b9b4fd27Smrg  cat conftest.out >&AS_MESSAGE_LOG_FD
5622b9b4fd27Smrg  if $GREP 'External.*some_variable' conftest.out > /dev/null; then
5623b9b4fd27Smrg    lt_cv_nm_interface="MS dumpbin"
5624b9b4fd27Smrg  fi
5625b9b4fd27Smrg  rm -f conftest*])
5626b9b4fd27Smrg])# LT_PATH_NM
5627caade7ccSmrg
5628b9b4fd27Smrg# Old names:
5629b9b4fd27SmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
5630b9b4fd27SmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
5631b9b4fd27Smrgdnl aclocal-1.4 backwards compatibility:
5632b9b4fd27Smrgdnl AC_DEFUN([AM_PROG_NM], [])
5633b9b4fd27Smrgdnl AC_DEFUN([AC_PROG_NM], [])
5634caade7ccSmrg
5635caade7ccSmrg
5636b9b4fd27Smrg# LT_LIB_M
5637b9b4fd27Smrg# --------
5638b9b4fd27Smrg# check for math library
5639b9b4fd27SmrgAC_DEFUN([LT_LIB_M],
5640b9b4fd27Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
5641b9b4fd27SmrgLIBM=
5642b9b4fd27Smrgcase $host in
5643e8a5466aSmrg*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
5644b9b4fd27Smrg  # These system don't have libm, or don't need it
5645b9b4fd27Smrg  ;;
5646b9b4fd27Smrg*-ncr-sysv4.3*)
5647b9b4fd27Smrg  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
5648b9b4fd27Smrg  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
5649b9b4fd27Smrg  ;;
5650b9b4fd27Smrg*)
5651b9b4fd27Smrg  AC_CHECK_LIB(m, cos, LIBM="-lm")
5652b9b4fd27Smrg  ;;
5653b9b4fd27Smrgesac
5654b9b4fd27SmrgAC_SUBST([LIBM])
5655b9b4fd27Smrg])# LT_LIB_M
5656caade7ccSmrg
5657b9b4fd27Smrg# Old name:
5658b9b4fd27SmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
5659b9b4fd27Smrgdnl aclocal-1.4 backwards compatibility:
5660b9b4fd27Smrgdnl AC_DEFUN([AC_CHECK_LIBM], [])
5661caade7ccSmrg
5662caade7ccSmrg
5663b9b4fd27Smrg# _LT_COMPILER_NO_RTTI([TAGNAME])
5664b9b4fd27Smrg# -------------------------------
5665b9b4fd27Smrgm4_defun([_LT_COMPILER_NO_RTTI],
5666b9b4fd27Smrg[m4_require([_LT_TAG_COMPILER])dnl
5667caade7ccSmrg
5668b9b4fd27Smrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
5669caade7ccSmrg
5670b9b4fd27Smrgif test "$GCC" = yes; then
5671e8a5466aSmrg  case $cc_basename in
5672e8a5466aSmrg  nvcc*)
5673e8a5466aSmrg    _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
5674e8a5466aSmrg  *)
5675e8a5466aSmrg    _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
5676e8a5466aSmrg  esac
5677caade7ccSmrg
5678b9b4fd27Smrg  _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
5679b9b4fd27Smrg    lt_cv_prog_compiler_rtti_exceptions,
5680b9b4fd27Smrg    [-fno-rtti -fno-exceptions], [],
5681b9b4fd27Smrg    [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
5682b9b4fd27Smrgfi
5683b9b4fd27Smrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
5684b9b4fd27Smrg	[Compiler flag to turn off builtin functions])
5685b9b4fd27Smrg])# _LT_COMPILER_NO_RTTI
5686caade7ccSmrg
5687caade7ccSmrg
5688b9b4fd27Smrg# _LT_CMD_GLOBAL_SYMBOLS
5689b9b4fd27Smrg# ----------------------
5690b9b4fd27Smrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS],
5691b9b4fd27Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
5692b9b4fd27SmrgAC_REQUIRE([AC_PROG_CC])dnl
5693e8a5466aSmrgAC_REQUIRE([AC_PROG_AWK])dnl
5694b9b4fd27SmrgAC_REQUIRE([LT_PATH_NM])dnl
5695b9b4fd27SmrgAC_REQUIRE([LT_PATH_LD])dnl
5696b9b4fd27Smrgm4_require([_LT_DECL_SED])dnl
5697b9b4fd27Smrgm4_require([_LT_DECL_EGREP])dnl
5698b9b4fd27Smrgm4_require([_LT_TAG_COMPILER])dnl
5699caade7ccSmrg
5700b9b4fd27Smrg# Check for command to grab the raw symbol name followed by C symbol from nm.
5701b9b4fd27SmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object])
5702b9b4fd27SmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
5703b9b4fd27Smrg[
5704b9b4fd27Smrg# These are sane defaults that work on at least a few old systems.
5705b9b4fd27Smrg# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
5706caade7ccSmrg
5707b9b4fd27Smrg# Character class describing NM global symbol codes.
5708b9b4fd27Smrgsymcode='[[BCDEGRST]]'
5709485f0483Smrg
5710b9b4fd27Smrg# Regexp to match symbols that can be accessed directly from C.
5711b9b4fd27Smrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
5712caade7ccSmrg
5713b9b4fd27Smrg# Define system-specific variables.
5714b9b4fd27Smrgcase $host_os in
5715b9b4fd27Smrgaix*)
5716b9b4fd27Smrg  symcode='[[BCDT]]'
5717485f0483Smrg  ;;
5718b9b4fd27Smrgcygwin* | mingw* | pw32* | cegcc*)
5719b9b4fd27Smrg  symcode='[[ABCDGISTW]]'
5720caade7ccSmrg  ;;
5721b9b4fd27Smrghpux*)
5722b9b4fd27Smrg  if test "$host_cpu" = ia64; then
5723b9b4fd27Smrg    symcode='[[ABCDEGRST]]'
5724caade7ccSmrg  fi
5725caade7ccSmrg  ;;
5726b9b4fd27Smrgirix* | nonstopux*)
5727b9b4fd27Smrg  symcode='[[BCDEGRST]]'
5728b9b4fd27Smrg  ;;
5729b9b4fd27Smrgosf*)
5730b9b4fd27Smrg  symcode='[[BCDEGQRST]]'
5731b9b4fd27Smrg  ;;
5732b9b4fd27Smrgsolaris*)
5733b9b4fd27Smrg  symcode='[[BDRT]]'
5734b9b4fd27Smrg  ;;
5735b9b4fd27Smrgsco3.2v5*)
5736b9b4fd27Smrg  symcode='[[DT]]'
5737b9b4fd27Smrg  ;;
5738b9b4fd27Smrgsysv4.2uw2*)
5739b9b4fd27Smrg  symcode='[[DT]]'
5740b9b4fd27Smrg  ;;
5741b9b4fd27Smrgsysv5* | sco5v6* | unixware* | OpenUNIX*)
5742b9b4fd27Smrg  symcode='[[ABDT]]'
5743b9b4fd27Smrg  ;;
5744b9b4fd27Smrgsysv4)
5745b9b4fd27Smrg  symcode='[[DFNSTU]]'
5746caade7ccSmrg  ;;
5747caade7ccSmrgesac
5748caade7ccSmrg
5749b9b4fd27Smrg# If we're using GNU nm, then use its standard symbol codes.
5750b9b4fd27Smrgcase `$NM -V 2>&1` in
5751b9b4fd27Smrg*GNU* | *'with BFD'*)
5752b9b4fd27Smrg  symcode='[[ABCDGIRSTW]]' ;;
5753b9b4fd27Smrgesac
5754caade7ccSmrg
5755b9b4fd27Smrg# Transform an extracted symbol line into a proper C declaration.
5756b9b4fd27Smrg# Some systems (esp. on ia64) link data and code symbols differently,
5757b9b4fd27Smrg# so use this general approach.
5758b9b4fd27Smrglt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
5759caade7ccSmrg
5760b9b4fd27Smrg# Transform an extracted symbol line into symbol name and symbol address
5761b9b4fd27Smrglt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p'"
5762b9b4fd27Smrglt_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'"
5763caade7ccSmrg
5764b9b4fd27Smrg# Handle CRLF in mingw tool chain
5765b9b4fd27Smrgopt_cr=
5766b9b4fd27Smrgcase $build_os in
5767b9b4fd27Smrgmingw*)
5768b9b4fd27Smrg  opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
5769b9b4fd27Smrg  ;;
5770b9b4fd27Smrgesac
5771caade7ccSmrg
5772b9b4fd27Smrg# Try without a prefix underscore, then with it.
5773b9b4fd27Smrgfor ac_symprfx in "" "_"; do
5774caade7ccSmrg
5775b9b4fd27Smrg  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
5776b9b4fd27Smrg  symxfrm="\\1 $ac_symprfx\\2 \\2"
5777caade7ccSmrg
5778b9b4fd27Smrg  # Write the raw and C identifiers.
5779b9b4fd27Smrg  if test "$lt_cv_nm_interface" = "MS dumpbin"; then
5780b9b4fd27Smrg    # Fake it for dumpbin and say T for any non-static function
5781b9b4fd27Smrg    # and D for any global variable.
5782b9b4fd27Smrg    # Also find C++ and __fastcall symbols from MSVC++,
5783b9b4fd27Smrg    # which start with @ or ?.
5784b9b4fd27Smrg    lt_cv_sys_global_symbol_pipe="$AWK ['"\
5785b9b4fd27Smrg"     {last_section=section; section=\$ 3};"\
5786b9b4fd27Smrg"     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
5787b9b4fd27Smrg"     \$ 0!~/External *\|/{next};"\
5788b9b4fd27Smrg"     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
5789b9b4fd27Smrg"     {if(hide[section]) next};"\
5790b9b4fd27Smrg"     {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
5791b9b4fd27Smrg"     {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
5792b9b4fd27Smrg"     s[1]~/^[@?]/{print s[1], s[1]; next};"\
5793b9b4fd27Smrg"     s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
5794b9b4fd27Smrg"     ' prfx=^$ac_symprfx]"
5795b9b4fd27Smrg  else
5796b9b4fd27Smrg    lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[	 ]]\($symcode$symcode*\)[[	 ]][[	 ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
5797b9b4fd27Smrg  fi
5798caade7ccSmrg
5799b9b4fd27Smrg  # Check to see that the pipe works correctly.
5800b9b4fd27Smrg  pipe_works=no
5801caade7ccSmrg
5802b9b4fd27Smrg  rm -f conftest*
5803b9b4fd27Smrg  cat > conftest.$ac_ext <<_LT_EOF
5804b9b4fd27Smrg#ifdef __cplusplus
5805b9b4fd27Smrgextern "C" {
5806b9b4fd27Smrg#endif
5807b9b4fd27Smrgchar nm_test_var;
5808b9b4fd27Smrgvoid nm_test_func(void);
5809b9b4fd27Smrgvoid nm_test_func(void){}
5810b9b4fd27Smrg#ifdef __cplusplus
5811b9b4fd27Smrg}
5812b9b4fd27Smrg#endif
5813b9b4fd27Smrgint main(){nm_test_var='a';nm_test_func();return(0);}
5814b9b4fd27Smrg_LT_EOF
5815caade7ccSmrg
5816b9b4fd27Smrg  if AC_TRY_EVAL(ac_compile); then
5817b9b4fd27Smrg    # Now try to grab the symbols.
5818b9b4fd27Smrg    nlist=conftest.nm
5819e8a5466aSmrg    if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
5820b9b4fd27Smrg      # Try sorting and uniquifying the output.
5821b9b4fd27Smrg      if sort "$nlist" | uniq > "$nlist"T; then
5822b9b4fd27Smrg	mv -f "$nlist"T "$nlist"
5823b9b4fd27Smrg      else
5824b9b4fd27Smrg	rm -f "$nlist"T
5825b9b4fd27Smrg      fi
5826caade7ccSmrg
5827b9b4fd27Smrg      # Make sure that we snagged all the symbols we need.
5828b9b4fd27Smrg      if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
5829b9b4fd27Smrg	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
5830b9b4fd27Smrg	  cat <<_LT_EOF > conftest.$ac_ext
5831b9b4fd27Smrg#ifdef __cplusplus
5832b9b4fd27Smrgextern "C" {
5833b9b4fd27Smrg#endif
5834caade7ccSmrg
5835b9b4fd27Smrg_LT_EOF
5836b9b4fd27Smrg	  # Now generate the symbol file.
5837b9b4fd27Smrg	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
5838caade7ccSmrg
5839b9b4fd27Smrg	  cat <<_LT_EOF >> conftest.$ac_ext
5840caade7ccSmrg
5841b9b4fd27Smrg/* The mapping between symbol names and symbols.  */
5842b9b4fd27Smrgconst struct {
5843b9b4fd27Smrg  const char *name;
5844b9b4fd27Smrg  void       *address;
5845b9b4fd27Smrg}
5846b9b4fd27Smrglt__PROGRAM__LTX_preloaded_symbols[[]] =
5847b9b4fd27Smrg{
5848b9b4fd27Smrg  { "@PROGRAM@", (void *) 0 },
5849b9b4fd27Smrg_LT_EOF
5850b9b4fd27Smrg	  $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
5851b9b4fd27Smrg	  cat <<\_LT_EOF >> conftest.$ac_ext
5852b9b4fd27Smrg  {0, (void *) 0}
5853b9b4fd27Smrg};
5854caade7ccSmrg
5855b9b4fd27Smrg/* This works around a problem in FreeBSD linker */
5856b9b4fd27Smrg#ifdef FREEBSD_WORKAROUND
5857b9b4fd27Smrgstatic const void *lt_preloaded_setup() {
5858b9b4fd27Smrg  return lt__PROGRAM__LTX_preloaded_symbols;
5859b9b4fd27Smrg}
5860b9b4fd27Smrg#endif
5861caade7ccSmrg
5862b9b4fd27Smrg#ifdef __cplusplus
5863b9b4fd27Smrg}
5864b9b4fd27Smrg#endif
5865b9b4fd27Smrg_LT_EOF
5866b9b4fd27Smrg	  # Now try linking the two files.
5867b9b4fd27Smrg	  mv conftest.$ac_objext conftstm.$ac_objext
5868b9b4fd27Smrg	  lt_save_LIBS="$LIBS"
5869b9b4fd27Smrg	  lt_save_CFLAGS="$CFLAGS"
5870b9b4fd27Smrg	  LIBS="conftstm.$ac_objext"
5871b9b4fd27Smrg	  CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
5872b9b4fd27Smrg	  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
5873b9b4fd27Smrg	    pipe_works=yes
5874b9b4fd27Smrg	  fi
5875b9b4fd27Smrg	  LIBS="$lt_save_LIBS"
5876b9b4fd27Smrg	  CFLAGS="$lt_save_CFLAGS"
5877b9b4fd27Smrg	else
5878b9b4fd27Smrg	  echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
5879b9b4fd27Smrg	fi
5880b9b4fd27Smrg      else
5881b9b4fd27Smrg	echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
5882b9b4fd27Smrg      fi
5883b9b4fd27Smrg    else
5884b9b4fd27Smrg      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
5885b9b4fd27Smrg    fi
5886b9b4fd27Smrg  else
5887b9b4fd27Smrg    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
5888b9b4fd27Smrg    cat conftest.$ac_ext >&5
5889b9b4fd27Smrg  fi
5890b9b4fd27Smrg  rm -rf conftest* conftst*
5891caade7ccSmrg
5892b9b4fd27Smrg  # Do not use the global_symbol_pipe unless it works.
5893b9b4fd27Smrg  if test "$pipe_works" = yes; then
5894b9b4fd27Smrg    break
5895b9b4fd27Smrg  else
5896b9b4fd27Smrg    lt_cv_sys_global_symbol_pipe=
5897b9b4fd27Smrg  fi
5898b9b4fd27Smrgdone
5899b9b4fd27Smrg])
5900b9b4fd27Smrgif test -z "$lt_cv_sys_global_symbol_pipe"; then
5901b9b4fd27Smrg  lt_cv_sys_global_symbol_to_cdecl=
5902b9b4fd27Smrgfi
5903b9b4fd27Smrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
5904b9b4fd27Smrg  AC_MSG_RESULT(failed)
5905b9b4fd27Smrgelse
5906b9b4fd27Smrg  AC_MSG_RESULT(ok)
5907b9b4fd27Smrgfi
5908caade7ccSmrg
5909b9b4fd27Smrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
5910b9b4fd27Smrg    [Take the output of nm and produce a listing of raw symbols and C names])
5911b9b4fd27Smrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
5912b9b4fd27Smrg    [Transform the output of nm in a proper C declaration])
5913b9b4fd27Smrg_LT_DECL([global_symbol_to_c_name_address],
5914b9b4fd27Smrg    [lt_cv_sys_global_symbol_to_c_name_address], [1],
5915b9b4fd27Smrg    [Transform the output of nm in a C name address pair])
5916b9b4fd27Smrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix],
5917b9b4fd27Smrg    [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
5918b9b4fd27Smrg    [Transform the output of nm in a C name address pair when lib prefix is needed])
5919b9b4fd27Smrg]) # _LT_CMD_GLOBAL_SYMBOLS
5920caade7ccSmrg
5921caade7ccSmrg
5922b9b4fd27Smrg# _LT_COMPILER_PIC([TAGNAME])
5923b9b4fd27Smrg# ---------------------------
5924b9b4fd27Smrgm4_defun([_LT_COMPILER_PIC],
5925b9b4fd27Smrg[m4_require([_LT_TAG_COMPILER])dnl
5926b9b4fd27Smrg_LT_TAGVAR(lt_prog_compiler_wl, $1)=
5927b9b4fd27Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=
5928b9b4fd27Smrg_LT_TAGVAR(lt_prog_compiler_static, $1)=
5929caade7ccSmrg
5930b9b4fd27SmrgAC_MSG_CHECKING([for $compiler option to produce PIC])
5931b9b4fd27Smrgm4_if([$1], [CXX], [
5932b9b4fd27Smrg  # C++ specific cases for pic, static, wl, etc.
5933b9b4fd27Smrg  if test "$GXX" = yes; then
5934b9b4fd27Smrg    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5935b9b4fd27Smrg    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5936caade7ccSmrg
5937b9b4fd27Smrg    case $host_os in
5938b9b4fd27Smrg    aix*)
5939b9b4fd27Smrg      # All AIX code is PIC.
5940b9b4fd27Smrg      if test "$host_cpu" = ia64; then
5941b9b4fd27Smrg	# AIX 5 now supports IA64 processor
5942b9b4fd27Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5943b9b4fd27Smrg      fi
5944b9b4fd27Smrg      ;;
5945caade7ccSmrg
5946b9b4fd27Smrg    amigaos*)
5947b9b4fd27Smrg      case $host_cpu in
5948b9b4fd27Smrg      powerpc)
5949b9b4fd27Smrg            # see comment about AmigaOS4 .so support
5950b9b4fd27Smrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5951b9b4fd27Smrg        ;;
5952b9b4fd27Smrg      m68k)
5953b9b4fd27Smrg            # FIXME: we need at least 68020 code to build shared libraries, but
5954b9b4fd27Smrg            # adding the `-m68020' flag to GCC prevents building anything better,
5955b9b4fd27Smrg            # like `-m68040'.
5956b9b4fd27Smrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
5957b9b4fd27Smrg        ;;
5958b9b4fd27Smrg      esac
5959b9b4fd27Smrg      ;;
5960caade7ccSmrg
5961b9b4fd27Smrg    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5962b9b4fd27Smrg      # PIC is the default for these OSes.
5963b9b4fd27Smrg      ;;
5964b9b4fd27Smrg    mingw* | cygwin* | os2* | pw32* | cegcc*)
5965b9b4fd27Smrg      # This hack is so that the source file can tell whether it is being
5966b9b4fd27Smrg      # built for inclusion in a dll (and should export symbols for example).
5967b9b4fd27Smrg      # Although the cygwin gcc ignores -fPIC, still need this for old-style
5968b9b4fd27Smrg      # (--disable-auto-import) libraries
5969b9b4fd27Smrg      m4_if([$1], [GCJ], [],
5970b9b4fd27Smrg	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
5971b9b4fd27Smrg      ;;
5972b9b4fd27Smrg    darwin* | rhapsody*)
5973b9b4fd27Smrg      # PIC is the default on this platform
5974b9b4fd27Smrg      # Common symbols not allowed in MH_DYLIB files
5975b9b4fd27Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5976b9b4fd27Smrg      ;;
5977b9b4fd27Smrg    *djgpp*)
5978b9b4fd27Smrg      # DJGPP does not support shared libraries at all
5979b9b4fd27Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)=
5980b9b4fd27Smrg      ;;
5981e8a5466aSmrg    haiku*)
5982e8a5466aSmrg      # PIC is the default for Haiku.
5983e8a5466aSmrg      # The "-static" flag exists, but is broken.
5984e8a5466aSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)=
5985e8a5466aSmrg      ;;
5986b9b4fd27Smrg    interix[[3-9]]*)
5987b9b4fd27Smrg      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
5988b9b4fd27Smrg      # Instead, we relocate shared libraries at runtime.
5989b9b4fd27Smrg      ;;
5990b9b4fd27Smrg    sysv4*MP*)
5991b9b4fd27Smrg      if test -d /usr/nec; then
5992b9b4fd27Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
5993b9b4fd27Smrg      fi
5994b9b4fd27Smrg      ;;
5995b9b4fd27Smrg    hpux*)
5996b9b4fd27Smrg      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
5997b9b4fd27Smrg      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
5998b9b4fd27Smrg      # sets the default TLS model and affects inlining.
5999b9b4fd27Smrg      case $host_cpu in
6000b9b4fd27Smrg      hppa*64*)
6001b9b4fd27Smrg	;;
6002b9b4fd27Smrg      *)
6003b9b4fd27Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6004b9b4fd27Smrg	;;
6005b9b4fd27Smrg      esac
6006b9b4fd27Smrg      ;;
6007b9b4fd27Smrg    *qnx* | *nto*)
6008b9b4fd27Smrg      # QNX uses GNU C++, but need to define -shared option too, otherwise
6009b9b4fd27Smrg      # it will coredump.
6010b9b4fd27Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
6011caade7ccSmrg      ;;
6012caade7ccSmrg    *)
6013b9b4fd27Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6014caade7ccSmrg      ;;
6015caade7ccSmrg    esac
6016b9b4fd27Smrg  else
6017b9b4fd27Smrg    case $host_os in
6018b9b4fd27Smrg      aix[[4-9]]*)
6019b9b4fd27Smrg	# All AIX code is PIC.
6020b9b4fd27Smrg	if test "$host_cpu" = ia64; then
6021b9b4fd27Smrg	  # AIX 5 now supports IA64 processor
6022b9b4fd27Smrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6023b9b4fd27Smrg	else
6024b9b4fd27Smrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
6025b9b4fd27Smrg	fi
6026b9b4fd27Smrg	;;
6027b9b4fd27Smrg      chorus*)
6028b9b4fd27Smrg	case $cc_basename in
6029b9b4fd27Smrg	cxch68*)
6030b9b4fd27Smrg	  # Green Hills C++ Compiler
6031b9b4fd27Smrg	  # _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"
6032b9b4fd27Smrg	  ;;
6033b9b4fd27Smrg	esac
6034b9b4fd27Smrg	;;
6035b9b4fd27Smrg      dgux*)
6036b9b4fd27Smrg	case $cc_basename in
6037b9b4fd27Smrg	  ec++*)
6038b9b4fd27Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6039b9b4fd27Smrg	    ;;
6040b9b4fd27Smrg	  ghcx*)
6041b9b4fd27Smrg	    # Green Hills C++ Compiler
6042b9b4fd27Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6043b9b4fd27Smrg	    ;;
6044b9b4fd27Smrg	  *)
6045b9b4fd27Smrg	    ;;
6046b9b4fd27Smrg	esac
6047b9b4fd27Smrg	;;
6048b9b4fd27Smrg      freebsd* | dragonfly*)
6049b9b4fd27Smrg	# FreeBSD uses GNU C++
6050b9b4fd27Smrg	;;
6051b9b4fd27Smrg      hpux9* | hpux10* | hpux11*)
6052b9b4fd27Smrg	case $cc_basename in
6053b9b4fd27Smrg	  CC*)
6054b9b4fd27Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6055b9b4fd27Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
6056b9b4fd27Smrg	    if test "$host_cpu" != ia64; then
6057b9b4fd27Smrg	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
6058b9b4fd27Smrg	    fi
6059b9b4fd27Smrg	    ;;
6060b9b4fd27Smrg	  aCC*)
6061b9b4fd27Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6062b9b4fd27Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
6063b9b4fd27Smrg	    case $host_cpu in
6064b9b4fd27Smrg	    hppa*64*|ia64*)
6065b9b4fd27Smrg	      # +Z the default
6066b9b4fd27Smrg	      ;;
6067b9b4fd27Smrg	    *)
6068b9b4fd27Smrg	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
6069b9b4fd27Smrg	      ;;
6070b9b4fd27Smrg	    esac
6071b9b4fd27Smrg	    ;;
6072b9b4fd27Smrg	  *)
6073b9b4fd27Smrg	    ;;
6074b9b4fd27Smrg	esac
6075b9b4fd27Smrg	;;
6076b9b4fd27Smrg      interix*)
6077b9b4fd27Smrg	# This is c89, which is MS Visual C++ (no shared libs)
6078b9b4fd27Smrg	# Anyone wants to do a port?
6079b9b4fd27Smrg	;;
6080b9b4fd27Smrg      irix5* | irix6* | nonstopux*)
6081b9b4fd27Smrg	case $cc_basename in
6082b9b4fd27Smrg	  CC*)
6083b9b4fd27Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6084b9b4fd27Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6085b9b4fd27Smrg	    # CC pic flag -KPIC is the default.
6086b9b4fd27Smrg	    ;;
6087b9b4fd27Smrg	  *)
6088b9b4fd27Smrg	    ;;
6089b9b4fd27Smrg	esac
6090b9b4fd27Smrg	;;
6091e8a5466aSmrg      linux* | k*bsd*-gnu | kopensolaris*-gnu)
6092b9b4fd27Smrg	case $cc_basename in
6093b9b4fd27Smrg	  KCC*)
6094b9b4fd27Smrg	    # KAI C++ Compiler
6095b9b4fd27Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
6096b9b4fd27Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6097b9b4fd27Smrg	    ;;
6098b9b4fd27Smrg	  ecpc* )
6099b9b4fd27Smrg	    # old Intel C++ for x86_64 which still supported -KPIC.
6100b9b4fd27Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6101b9b4fd27Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6102b9b4fd27Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
6103b9b4fd27Smrg	    ;;
6104b9b4fd27Smrg	  icpc* )
6105b9b4fd27Smrg	    # Intel C++, used to be incompatible with GCC.
6106b9b4fd27Smrg	    # ICC 10 doesn't accept -KPIC any more.
6107b9b4fd27Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6108b9b4fd27Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6109b9b4fd27Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
6110b9b4fd27Smrg	    ;;
6111b9b4fd27Smrg	  pgCC* | pgcpp*)
6112b9b4fd27Smrg	    # Portland Group C++ compiler
6113b9b4fd27Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6114b9b4fd27Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
6115b9b4fd27Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6116b9b4fd27Smrg	    ;;
6117b9b4fd27Smrg	  cxx*)
6118b9b4fd27Smrg	    # Compaq C++
6119b9b4fd27Smrg	    # Make sure the PIC flag is empty.  It appears that all Alpha
6120b9b4fd27Smrg	    # Linux and Compaq Tru64 Unix objects are PIC.
6121b9b4fd27Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
6122b9b4fd27Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6123b9b4fd27Smrg	    ;;
6124e8a5466aSmrg	  xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
6125e8a5466aSmrg	    # IBM XL 8.0, 9.0 on PPC and BlueGene
6126b9b4fd27Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6127b9b4fd27Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
6128b9b4fd27Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
6129b9b4fd27Smrg	    ;;
6130b9b4fd27Smrg	  *)
6131b9b4fd27Smrg	    case `$CC -V 2>&1 | sed 5q` in
6132b9b4fd27Smrg	    *Sun\ C*)
6133b9b4fd27Smrg	      # Sun C++ 5.9
6134b9b4fd27Smrg	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6135b9b4fd27Smrg	      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6136b9b4fd27Smrg	      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
6137b9b4fd27Smrg	      ;;
6138b9b4fd27Smrg	    esac
6139b9b4fd27Smrg	    ;;
6140b9b4fd27Smrg	esac
6141b9b4fd27Smrg	;;
6142b9b4fd27Smrg      lynxos*)
6143b9b4fd27Smrg	;;
6144b9b4fd27Smrg      m88k*)
6145b9b4fd27Smrg	;;
6146b9b4fd27Smrg      mvs*)
6147b9b4fd27Smrg	case $cc_basename in
6148b9b4fd27Smrg	  cxx*)
6149b9b4fd27Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
6150b9b4fd27Smrg	    ;;
6151b9b4fd27Smrg	  *)
6152b9b4fd27Smrg	    ;;
6153b9b4fd27Smrg	esac
6154b9b4fd27Smrg	;;
6155b9b4fd27Smrg      netbsd*)
6156b9b4fd27Smrg	;;
6157b9b4fd27Smrg      *qnx* | *nto*)
6158b9b4fd27Smrg        # QNX uses GNU C++, but need to define -shared option too, otherwise
6159b9b4fd27Smrg        # it will coredump.
6160b9b4fd27Smrg        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
6161b9b4fd27Smrg        ;;
6162b9b4fd27Smrg      osf3* | osf4* | osf5*)
6163b9b4fd27Smrg	case $cc_basename in
6164b9b4fd27Smrg	  KCC*)
6165b9b4fd27Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
6166b9b4fd27Smrg	    ;;
6167b9b4fd27Smrg	  RCC*)
6168b9b4fd27Smrg	    # Rational C++ 2.4.1
6169b9b4fd27Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6170b9b4fd27Smrg	    ;;
6171b9b4fd27Smrg	  cxx*)
6172b9b4fd27Smrg	    # Digital/Compaq C++
6173b9b4fd27Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6174b9b4fd27Smrg	    # Make sure the PIC flag is empty.  It appears that all Alpha
6175b9b4fd27Smrg	    # Linux and Compaq Tru64 Unix objects are PIC.
6176b9b4fd27Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
6177b9b4fd27Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6178b9b4fd27Smrg	    ;;
6179b9b4fd27Smrg	  *)
6180b9b4fd27Smrg	    ;;
6181b9b4fd27Smrg	esac
6182b9b4fd27Smrg	;;
6183b9b4fd27Smrg      psos*)
6184b9b4fd27Smrg	;;
6185b9b4fd27Smrg      solaris*)
6186b9b4fd27Smrg	case $cc_basename in
6187e8a5466aSmrg	  CC* | sunCC*)
6188b9b4fd27Smrg	    # Sun C++ 4.2, 5.x and Centerline C++
6189b9b4fd27Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6190b9b4fd27Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6191b9b4fd27Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
6192b9b4fd27Smrg	    ;;
6193b9b4fd27Smrg	  gcx*)
6194b9b4fd27Smrg	    # Green Hills C++ Compiler
6195b9b4fd27Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
6196b9b4fd27Smrg	    ;;
6197b9b4fd27Smrg	  *)
6198b9b4fd27Smrg	    ;;
6199b9b4fd27Smrg	esac
6200b9b4fd27Smrg	;;
6201b9b4fd27Smrg      sunos4*)
6202b9b4fd27Smrg	case $cc_basename in
6203b9b4fd27Smrg	  CC*)
6204b9b4fd27Smrg	    # Sun C++ 4.x
6205b9b4fd27Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6206b9b4fd27Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6207b9b4fd27Smrg	    ;;
6208b9b4fd27Smrg	  lcc*)
6209b9b4fd27Smrg	    # Lucid
6210b9b4fd27Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6211b9b4fd27Smrg	    ;;
6212b9b4fd27Smrg	  *)
6213b9b4fd27Smrg	    ;;
6214b9b4fd27Smrg	esac
6215b9b4fd27Smrg	;;
6216b9b4fd27Smrg      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
6217b9b4fd27Smrg	case $cc_basename in
6218b9b4fd27Smrg	  CC*)
6219b9b4fd27Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6220b9b4fd27Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6221b9b4fd27Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6222b9b4fd27Smrg	    ;;
6223b9b4fd27Smrg	esac
6224b9b4fd27Smrg	;;
6225b9b4fd27Smrg      tandem*)
6226b9b4fd27Smrg	case $cc_basename in
6227b9b4fd27Smrg	  NCC*)
6228b9b4fd27Smrg	    # NonStop-UX NCC 3.20
6229b9b4fd27Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6230b9b4fd27Smrg	    ;;
6231b9b4fd27Smrg	  *)
6232b9b4fd27Smrg	    ;;
6233b9b4fd27Smrg	esac
6234b9b4fd27Smrg	;;
6235b9b4fd27Smrg      vxworks*)
6236b9b4fd27Smrg	;;
6237b9b4fd27Smrg      *)
6238b9b4fd27Smrg	_LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
6239b9b4fd27Smrg	;;
6240b9b4fd27Smrg    esac
6241b9b4fd27Smrg  fi
6242b9b4fd27Smrg],
6243b9b4fd27Smrg[
6244b9b4fd27Smrg  if test "$GCC" = yes; then
6245b9b4fd27Smrg    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6246b9b4fd27Smrg    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
6247caade7ccSmrg
6248b9b4fd27Smrg    case $host_os in
6249b9b4fd27Smrg      aix*)
6250b9b4fd27Smrg      # All AIX code is PIC.
6251b9b4fd27Smrg      if test "$host_cpu" = ia64; then
6252b9b4fd27Smrg	# AIX 5 now supports IA64 processor
6253b9b4fd27Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6254b9b4fd27Smrg      fi
6255b9b4fd27Smrg      ;;
6256caade7ccSmrg
6257b9b4fd27Smrg    amigaos*)
6258b9b4fd27Smrg      case $host_cpu in
6259b9b4fd27Smrg      powerpc)
6260b9b4fd27Smrg            # see comment about AmigaOS4 .so support
6261b9b4fd27Smrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6262b9b4fd27Smrg        ;;
6263b9b4fd27Smrg      m68k)
6264b9b4fd27Smrg            # FIXME: we need at least 68020 code to build shared libraries, but
6265b9b4fd27Smrg            # adding the `-m68020' flag to GCC prevents building anything better,
6266b9b4fd27Smrg            # like `-m68040'.
6267b9b4fd27Smrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
6268b9b4fd27Smrg        ;;
6269b9b4fd27Smrg      esac
6270b9b4fd27Smrg      ;;
6271caade7ccSmrg
6272b9b4fd27Smrg    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
6273b9b4fd27Smrg      # PIC is the default for these OSes.
6274b9b4fd27Smrg      ;;
6275caade7ccSmrg
6276b9b4fd27Smrg    mingw* | cygwin* | pw32* | os2* | cegcc*)
6277b9b4fd27Smrg      # This hack is so that the source file can tell whether it is being
6278b9b4fd27Smrg      # built for inclusion in a dll (and should export symbols for example).
6279b9b4fd27Smrg      # Although the cygwin gcc ignores -fPIC, still need this for old-style
6280b9b4fd27Smrg      # (--disable-auto-import) libraries
6281b9b4fd27Smrg      m4_if([$1], [GCJ], [],
6282b9b4fd27Smrg	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
6283b9b4fd27Smrg      ;;
6284caade7ccSmrg
6285b9b4fd27Smrg    darwin* | rhapsody*)
6286b9b4fd27Smrg      # PIC is the default on this platform
6287b9b4fd27Smrg      # Common symbols not allowed in MH_DYLIB files
6288b9b4fd27Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
6289b9b4fd27Smrg      ;;
6290caade7ccSmrg
6291e8a5466aSmrg    haiku*)
6292e8a5466aSmrg      # PIC is the default for Haiku.
6293e8a5466aSmrg      # The "-static" flag exists, but is broken.
6294e8a5466aSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)=
6295e8a5466aSmrg      ;;
6296e8a5466aSmrg
6297b9b4fd27Smrg    hpux*)
6298b9b4fd27Smrg      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
6299b9b4fd27Smrg      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
6300b9b4fd27Smrg      # sets the default TLS model and affects inlining.
6301b9b4fd27Smrg      case $host_cpu in
6302b9b4fd27Smrg      hppa*64*)
6303b9b4fd27Smrg	# +Z the default
6304b9b4fd27Smrg	;;
6305b9b4fd27Smrg      *)
6306b9b4fd27Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6307b9b4fd27Smrg	;;
6308b9b4fd27Smrg      esac
6309b9b4fd27Smrg      ;;
6310caade7ccSmrg
6311b9b4fd27Smrg    interix[[3-9]]*)
6312b9b4fd27Smrg      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
6313b9b4fd27Smrg      # Instead, we relocate shared libraries at runtime.
6314b9b4fd27Smrg      ;;
6315caade7ccSmrg
6316b9b4fd27Smrg    msdosdjgpp*)
6317b9b4fd27Smrg      # Just because we use GCC doesn't mean we suddenly get shared libraries
6318b9b4fd27Smrg      # on systems that don't support them.
6319b9b4fd27Smrg      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
6320b9b4fd27Smrg      enable_shared=no
6321b9b4fd27Smrg      ;;
6322caade7ccSmrg
6323b9b4fd27Smrg    *nto* | *qnx*)
6324b9b4fd27Smrg      # QNX uses GNU C++, but need to define -shared option too, otherwise
6325b9b4fd27Smrg      # it will coredump.
6326b9b4fd27Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
6327b9b4fd27Smrg      ;;
6328caade7ccSmrg
6329b9b4fd27Smrg    sysv4*MP*)
6330b9b4fd27Smrg      if test -d /usr/nec; then
6331b9b4fd27Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
6332b9b4fd27Smrg      fi
6333b9b4fd27Smrg      ;;
6334caade7ccSmrg
6335b9b4fd27Smrg    *)
6336b9b4fd27Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6337b9b4fd27Smrg      ;;
6338b9b4fd27Smrg    esac
6339e8a5466aSmrg
6340e8a5466aSmrg    case $cc_basename in
6341e8a5466aSmrg    nvcc*) # Cuda Compiler Driver 2.2
6342e8a5466aSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
6343e8a5466aSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Xcompiler -fPIC'
6344e8a5466aSmrg      ;;
6345e8a5466aSmrg    esac
6346b9b4fd27Smrg  else
6347b9b4fd27Smrg    # PORTME Check for flag to pass linker flags through the system compiler.
6348b9b4fd27Smrg    case $host_os in
6349b9b4fd27Smrg    aix*)
6350b9b4fd27Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6351b9b4fd27Smrg      if test "$host_cpu" = ia64; then
6352b9b4fd27Smrg	# AIX 5 now supports IA64 processor
6353b9b4fd27Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6354b9b4fd27Smrg      else
6355b9b4fd27Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
6356b9b4fd27Smrg      fi
6357b9b4fd27Smrg      ;;
6358caade7ccSmrg
6359b9b4fd27Smrg    mingw* | cygwin* | pw32* | os2* | cegcc*)
6360b9b4fd27Smrg      # This hack is so that the source file can tell whether it is being
6361b9b4fd27Smrg      # built for inclusion in a dll (and should export symbols for example).
6362b9b4fd27Smrg      m4_if([$1], [GCJ], [],
6363b9b4fd27Smrg	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
6364b9b4fd27Smrg      ;;
6365caade7ccSmrg
6366b9b4fd27Smrg    hpux9* | hpux10* | hpux11*)
6367b9b4fd27Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6368b9b4fd27Smrg      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
6369b9b4fd27Smrg      # not for PA HP-UX.
6370b9b4fd27Smrg      case $host_cpu in
6371b9b4fd27Smrg      hppa*64*|ia64*)
6372b9b4fd27Smrg	# +Z the default
6373b9b4fd27Smrg	;;
6374b9b4fd27Smrg      *)
6375b9b4fd27Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
6376b9b4fd27Smrg	;;
6377b9b4fd27Smrg      esac
6378b9b4fd27Smrg      # Is there a better lt_prog_compiler_static that works with the bundled CC?
6379b9b4fd27Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
6380b9b4fd27Smrg      ;;
6381caade7ccSmrg
6382b9b4fd27Smrg    irix5* | irix6* | nonstopux*)
6383b9b4fd27Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6384b9b4fd27Smrg      # PIC (with -KPIC) is the default.
6385b9b4fd27Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6386b9b4fd27Smrg      ;;
6387caade7ccSmrg
6388e8a5466aSmrg    linux* | k*bsd*-gnu | kopensolaris*-gnu)
6389b9b4fd27Smrg      case $cc_basename in
6390b9b4fd27Smrg      # old Intel for x86_64 which still supported -KPIC.
6391b9b4fd27Smrg      ecc*)
6392b9b4fd27Smrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6393b9b4fd27Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6394b9b4fd27Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
6395b9b4fd27Smrg        ;;
6396b9b4fd27Smrg      # icc used to be incompatible with GCC.
6397b9b4fd27Smrg      # ICC 10 doesn't accept -KPIC any more.
6398b9b4fd27Smrg      icc* | ifort*)
6399b9b4fd27Smrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6400b9b4fd27Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6401b9b4fd27Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
6402b9b4fd27Smrg        ;;
6403b9b4fd27Smrg      # Lahey Fortran 8.1.
6404b9b4fd27Smrg      lf95*)
6405b9b4fd27Smrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6406b9b4fd27Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
6407b9b4fd27Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
6408b9b4fd27Smrg	;;
6409e8a5466aSmrg      pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
6410b9b4fd27Smrg        # Portland Group compilers (*not* the Pentium gcc compiler,
6411b9b4fd27Smrg	# which looks to be a dead project)
6412b9b4fd27Smrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6413b9b4fd27Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
6414b9b4fd27Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6415b9b4fd27Smrg        ;;
6416b9b4fd27Smrg      ccc*)
6417b9b4fd27Smrg        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6418b9b4fd27Smrg        # All Alpha code is PIC.
6419b9b4fd27Smrg        _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6420b9b4fd27Smrg        ;;
6421e8a5466aSmrg      xl* | bgxl* | bgf* | mpixl*)
6422e8a5466aSmrg	# IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
6423b9b4fd27Smrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6424b9b4fd27Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
6425b9b4fd27Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
6426b9b4fd27Smrg	;;
6427b9b4fd27Smrg      *)
6428b9b4fd27Smrg	case `$CC -V 2>&1 | sed 5q` in
6429e8a5466aSmrg	*Sun\ F* | *Sun*Fortran*)
6430e8a5466aSmrg	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
6431b9b4fd27Smrg	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6432b9b4fd27Smrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6433e8a5466aSmrg	  _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
6434b9b4fd27Smrg	  ;;
6435e8a5466aSmrg	*Sun\ C*)
6436e8a5466aSmrg	  # Sun C 5.9
6437b9b4fd27Smrg	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6438b9b4fd27Smrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6439e8a5466aSmrg	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6440b9b4fd27Smrg	  ;;
6441b9b4fd27Smrg	esac
6442b9b4fd27Smrg	;;
6443b9b4fd27Smrg      esac
6444b9b4fd27Smrg      ;;
6445caade7ccSmrg
6446b9b4fd27Smrg    newsos6)
6447b9b4fd27Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6448b9b4fd27Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6449b9b4fd27Smrg      ;;
6450caade7ccSmrg
6451b9b4fd27Smrg    *nto* | *qnx*)
6452b9b4fd27Smrg      # QNX uses GNU C++, but need to define -shared option too, otherwise
6453b9b4fd27Smrg      # it will coredump.
6454b9b4fd27Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
6455b9b4fd27Smrg      ;;
6456caade7ccSmrg
6457b9b4fd27Smrg    osf3* | osf4* | osf5*)
6458b9b4fd27Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6459b9b4fd27Smrg      # All OSF/1 code is PIC.
6460b9b4fd27Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6461b9b4fd27Smrg      ;;
6462caade7ccSmrg
6463b9b4fd27Smrg    rdos*)
6464b9b4fd27Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6465b9b4fd27Smrg      ;;
6466caade7ccSmrg
6467b9b4fd27Smrg    solaris*)
6468b9b4fd27Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6469b9b4fd27Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6470b9b4fd27Smrg      case $cc_basename in
6471e8a5466aSmrg      f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
6472b9b4fd27Smrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
6473b9b4fd27Smrg      *)
6474b9b4fd27Smrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
6475b9b4fd27Smrg      esac
6476b9b4fd27Smrg      ;;
6477caade7ccSmrg
6478b9b4fd27Smrg    sunos4*)
6479b9b4fd27Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
6480b9b4fd27Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
6481b9b4fd27Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6482b9b4fd27Smrg      ;;
6483caade7ccSmrg
6484b9b4fd27Smrg    sysv4 | sysv4.2uw2* | sysv4.3*)
6485b9b4fd27Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6486b9b4fd27Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6487b9b4fd27Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6488b9b4fd27Smrg      ;;
6489caade7ccSmrg
6490b9b4fd27Smrg    sysv4*MP*)
6491b9b4fd27Smrg      if test -d /usr/nec ;then
6492b9b4fd27Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
6493b9b4fd27Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6494b9b4fd27Smrg      fi
6495b9b4fd27Smrg      ;;
6496caade7ccSmrg
6497b9b4fd27Smrg    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
6498b9b4fd27Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6499b9b4fd27Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6500b9b4fd27Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6501b9b4fd27Smrg      ;;
6502caade7ccSmrg
6503b9b4fd27Smrg    unicos*)
6504b9b4fd27Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6505b9b4fd27Smrg      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
6506b9b4fd27Smrg      ;;
6507caade7ccSmrg
6508b9b4fd27Smrg    uts4*)
6509b9b4fd27Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6510b9b4fd27Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6511b9b4fd27Smrg      ;;
6512caade7ccSmrg
6513b9b4fd27Smrg    *)
6514b9b4fd27Smrg      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
6515b9b4fd27Smrg      ;;
6516b9b4fd27Smrg    esac
6517b9b4fd27Smrg  fi
6518b9b4fd27Smrg])
6519b9b4fd27Smrgcase $host_os in
6520b9b4fd27Smrg  # For platforms which do not support PIC, -DPIC is meaningless:
6521b9b4fd27Smrg  *djgpp*)
6522b9b4fd27Smrg    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
6523b9b4fd27Smrg    ;;
6524b9b4fd27Smrg  *)
6525b9b4fd27Smrg    _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
6526b9b4fd27Smrg    ;;
6527b9b4fd27Smrgesac
6528b9b4fd27SmrgAC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
6529b9b4fd27Smrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
6530b9b4fd27Smrg	[How to pass a linker flag through the compiler])
6531caade7ccSmrg
6532b9b4fd27Smrg#
6533b9b4fd27Smrg# Check to make sure the PIC flag actually works.
6534b9b4fd27Smrg#
6535b9b4fd27Smrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
6536b9b4fd27Smrg  _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
6537b9b4fd27Smrg    [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
6538b9b4fd27Smrg    [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
6539b9b4fd27Smrg    [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
6540b9b4fd27Smrg     "" | " "*) ;;
6541b9b4fd27Smrg     *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
6542b9b4fd27Smrg     esac],
6543b9b4fd27Smrg    [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
6544b9b4fd27Smrg     _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
6545b9b4fd27Smrgfi
6546b9b4fd27Smrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
6547b9b4fd27Smrg	[Additional compiler flags for building library objects])
6548caade7ccSmrg
6549b9b4fd27Smrg#
6550b9b4fd27Smrg# Check to make sure the static flag actually works.
6551b9b4fd27Smrg#
6552b9b4fd27Smrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
6553b9b4fd27Smrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
6554b9b4fd27Smrg  _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
6555b9b4fd27Smrg  $lt_tmp_static_flag,
6556b9b4fd27Smrg  [],
6557b9b4fd27Smrg  [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
6558b9b4fd27Smrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
6559b9b4fd27Smrg	[Compiler flag to prevent dynamic linking])
6560b9b4fd27Smrg])# _LT_COMPILER_PIC
6561caade7ccSmrg
6562caade7ccSmrg
6563b9b4fd27Smrg# _LT_LINKER_SHLIBS([TAGNAME])
6564b9b4fd27Smrg# ----------------------------
6565b9b4fd27Smrg# See if the linker supports building shared libraries.
6566b9b4fd27Smrgm4_defun([_LT_LINKER_SHLIBS],
6567b9b4fd27Smrg[AC_REQUIRE([LT_PATH_LD])dnl
6568b9b4fd27SmrgAC_REQUIRE([LT_PATH_NM])dnl
6569b9b4fd27Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
6570b9b4fd27Smrgm4_require([_LT_DECL_EGREP])dnl
6571b9b4fd27Smrgm4_require([_LT_DECL_SED])dnl
6572b9b4fd27Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
6573b9b4fd27Smrgm4_require([_LT_TAG_COMPILER])dnl
6574b9b4fd27SmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
6575b9b4fd27Smrgm4_if([$1], [CXX], [
6576b9b4fd27Smrg  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
6577b9b4fd27Smrg  case $host_os in
6578b9b4fd27Smrg  aix[[4-9]]*)
6579b9b4fd27Smrg    # If we're using GNU nm, then we don't want the "-C" option.
6580b9b4fd27Smrg    # -C means demangle to AIX nm, but means don't demangle with GNU nm
6581e8a5466aSmrg    # Also, AIX nm treats weak defined symbols like other global defined
6582e8a5466aSmrg    # symbols, whereas GNU nm marks them as "W".
6583b9b4fd27Smrg    if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
6584e8a5466aSmrg      _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'
6585b9b4fd27Smrg    else
6586b9b4fd27Smrg      _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'
6587b9b4fd27Smrg    fi
6588b9b4fd27Smrg    ;;
6589b9b4fd27Smrg  pw32*)
6590b9b4fd27Smrg    _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
6591b9b4fd27Smrg  ;;
6592b9b4fd27Smrg  cygwin* | mingw* | cegcc*)
6593b9b4fd27Smrg    _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
6594b9b4fd27Smrg  ;;
6595b9b4fd27Smrg  *)
6596b9b4fd27Smrg    _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
6597b9b4fd27Smrg  ;;
6598b9b4fd27Smrg  esac
6599b9b4fd27Smrg  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
6600b9b4fd27Smrg], [
6601b9b4fd27Smrg  runpath_var=
6602b9b4fd27Smrg  _LT_TAGVAR(allow_undefined_flag, $1)=
6603b9b4fd27Smrg  _LT_TAGVAR(always_export_symbols, $1)=no
6604b9b4fd27Smrg  _LT_TAGVAR(archive_cmds, $1)=
6605b9b4fd27Smrg  _LT_TAGVAR(archive_expsym_cmds, $1)=
6606b9b4fd27Smrg  _LT_TAGVAR(compiler_needs_object, $1)=no
6607b9b4fd27Smrg  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
6608b9b4fd27Smrg  _LT_TAGVAR(export_dynamic_flag_spec, $1)=
6609b9b4fd27Smrg  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
6610b9b4fd27Smrg  _LT_TAGVAR(hardcode_automatic, $1)=no
6611b9b4fd27Smrg  _LT_TAGVAR(hardcode_direct, $1)=no
6612b9b4fd27Smrg  _LT_TAGVAR(hardcode_direct_absolute, $1)=no
6613b9b4fd27Smrg  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6614b9b4fd27Smrg  _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
6615b9b4fd27Smrg  _LT_TAGVAR(hardcode_libdir_separator, $1)=
6616b9b4fd27Smrg  _LT_TAGVAR(hardcode_minus_L, $1)=no
6617b9b4fd27Smrg  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
6618b9b4fd27Smrg  _LT_TAGVAR(inherit_rpath, $1)=no
6619b9b4fd27Smrg  _LT_TAGVAR(link_all_deplibs, $1)=unknown
6620b9b4fd27Smrg  _LT_TAGVAR(module_cmds, $1)=
6621b9b4fd27Smrg  _LT_TAGVAR(module_expsym_cmds, $1)=
6622b9b4fd27Smrg  _LT_TAGVAR(old_archive_from_new_cmds, $1)=
6623b9b4fd27Smrg  _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
6624b9b4fd27Smrg  _LT_TAGVAR(thread_safe_flag_spec, $1)=
6625b9b4fd27Smrg  _LT_TAGVAR(whole_archive_flag_spec, $1)=
6626b9b4fd27Smrg  # include_expsyms should be a list of space-separated symbols to be *always*
6627b9b4fd27Smrg  # included in the symbol list
6628b9b4fd27Smrg  _LT_TAGVAR(include_expsyms, $1)=
6629b9b4fd27Smrg  # exclude_expsyms can be an extended regexp of symbols to exclude
6630b9b4fd27Smrg  # it will be wrapped by ` (' and `)$', so one must not match beginning or
6631b9b4fd27Smrg  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
6632b9b4fd27Smrg  # as well as any symbol that contains `d'.
6633b9b4fd27Smrg  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
6634b9b4fd27Smrg  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
6635b9b4fd27Smrg  # platforms (ab)use it in PIC code, but their linkers get confused if
6636b9b4fd27Smrg  # the symbol is explicitly referenced.  Since portable code cannot
6637b9b4fd27Smrg  # rely on this symbol name, it's probably fine to never include it in
6638b9b4fd27Smrg  # preloaded symbol tables.
6639b9b4fd27Smrg  # Exclude shared library initialization/finalization symbols.
6640b9b4fd27Smrgdnl Note also adjust exclude_expsyms for C++ above.
6641b9b4fd27Smrg  extract_expsyms_cmds=
6642caade7ccSmrg
6643b9b4fd27Smrg  case $host_os in
6644b9b4fd27Smrg  cygwin* | mingw* | pw32* | cegcc*)
6645b9b4fd27Smrg    # FIXME: the MSVC++ port hasn't been tested in a loooong time
6646b9b4fd27Smrg    # When not using gcc, we currently assume that we are using
6647b9b4fd27Smrg    # Microsoft Visual C++.
6648b9b4fd27Smrg    if test "$GCC" != yes; then
6649b9b4fd27Smrg      with_gnu_ld=no
6650b9b4fd27Smrg    fi
6651b9b4fd27Smrg    ;;
6652b9b4fd27Smrg  interix*)
6653b9b4fd27Smrg    # we just hope/assume this is gcc and not c89 (= MSVC++)
6654b9b4fd27Smrg    with_gnu_ld=yes
6655b9b4fd27Smrg    ;;
6656b9b4fd27Smrg  openbsd*)
6657b9b4fd27Smrg    with_gnu_ld=no
6658b9b4fd27Smrg    ;;
6659b9b4fd27Smrg  esac
6660caade7ccSmrg
6661b9b4fd27Smrg  _LT_TAGVAR(ld_shlibs, $1)=yes
6662e8a5466aSmrg
6663e8a5466aSmrg  # On some targets, GNU ld is compatible enough with the native linker
6664e8a5466aSmrg  # that we're better off using the native interface for both.
6665e8a5466aSmrg  lt_use_gnu_ld_interface=no
6666b9b4fd27Smrg  if test "$with_gnu_ld" = yes; then
6667e8a5466aSmrg    case $host_os in
6668e8a5466aSmrg      aix*)
6669e8a5466aSmrg	# The AIX port of GNU ld has always aspired to compatibility
6670e8a5466aSmrg	# with the native linker.  However, as the warning in the GNU ld
6671e8a5466aSmrg	# block says, versions before 2.19.5* couldn't really create working
6672e8a5466aSmrg	# shared libraries, regardless of the interface used.
6673e8a5466aSmrg	case `$LD -v 2>&1` in
6674e8a5466aSmrg	  *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
6675e8a5466aSmrg	  *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
6676e8a5466aSmrg	  *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
6677e8a5466aSmrg	  *)
6678e8a5466aSmrg	    lt_use_gnu_ld_interface=yes
6679e8a5466aSmrg	    ;;
6680e8a5466aSmrg	esac
6681e8a5466aSmrg	;;
6682e8a5466aSmrg      *)
6683e8a5466aSmrg	lt_use_gnu_ld_interface=yes
6684e8a5466aSmrg	;;
6685e8a5466aSmrg    esac
6686e8a5466aSmrg  fi
6687e8a5466aSmrg
6688e8a5466aSmrg  if test "$lt_use_gnu_ld_interface" = yes; then
6689b9b4fd27Smrg    # If archive_cmds runs LD, not CC, wlarc should be empty
6690b9b4fd27Smrg    wlarc='${wl}'
6691caade7ccSmrg
6692b9b4fd27Smrg    # Set some defaults for GNU ld with shared library support. These
6693b9b4fd27Smrg    # are reset later if shared libraries are not supported. Putting them
6694b9b4fd27Smrg    # here allows them to be overridden if necessary.
6695b9b4fd27Smrg    runpath_var=LD_RUN_PATH
6696b9b4fd27Smrg    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6697b9b4fd27Smrg    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6698b9b4fd27Smrg    # ancient GNU ld didn't support --whole-archive et. al.
6699b9b4fd27Smrg    if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
6700b9b4fd27Smrg      _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
6701b9b4fd27Smrg    else
6702b9b4fd27Smrg      _LT_TAGVAR(whole_archive_flag_spec, $1)=
6703b9b4fd27Smrg    fi
6704b9b4fd27Smrg    supports_anon_versioning=no
6705b9b4fd27Smrg    case `$LD -v 2>&1` in
6706e8a5466aSmrg      *GNU\ gold*) supports_anon_versioning=yes ;;
6707b9b4fd27Smrg      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
6708b9b4fd27Smrg      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
6709b9b4fd27Smrg      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
6710b9b4fd27Smrg      *\ 2.11.*) ;; # other 2.11 versions
6711b9b4fd27Smrg      *) supports_anon_versioning=yes ;;
6712b9b4fd27Smrg    esac
6713caade7ccSmrg
6714b9b4fd27Smrg    # See if GNU ld supports shared libraries.
6715b9b4fd27Smrg    case $host_os in
6716b9b4fd27Smrg    aix[[3-9]]*)
6717b9b4fd27Smrg      # On AIX/PPC, the GNU linker is very broken
6718b9b4fd27Smrg      if test "$host_cpu" != ia64; then
6719b9b4fd27Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
6720b9b4fd27Smrg	cat <<_LT_EOF 1>&2
6721caade7ccSmrg
6722e8a5466aSmrg*** Warning: the GNU linker, at least up to release 2.19, is reported
6723b9b4fd27Smrg*** to be unable to reliably create shared libraries on AIX.
6724b9b4fd27Smrg*** Therefore, libtool is disabling shared libraries support.  If you
6725e8a5466aSmrg*** really care for shared libraries, you may want to install binutils
6726e8a5466aSmrg*** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
6727e8a5466aSmrg*** You will then need to restart the configuration process.
6728caade7ccSmrg
6729b9b4fd27Smrg_LT_EOF
6730b9b4fd27Smrg      fi
6731b9b4fd27Smrg      ;;
6732caade7ccSmrg
6733b9b4fd27Smrg    amigaos*)
6734b9b4fd27Smrg      case $host_cpu in
6735b9b4fd27Smrg      powerpc)
6736b9b4fd27Smrg            # see comment about AmigaOS4 .so support
6737b9b4fd27Smrg            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6738b9b4fd27Smrg            _LT_TAGVAR(archive_expsym_cmds, $1)=''
6739b9b4fd27Smrg        ;;
6740b9b4fd27Smrg      m68k)
6741b9b4fd27Smrg            _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)'
6742b9b4fd27Smrg            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6743b9b4fd27Smrg            _LT_TAGVAR(hardcode_minus_L, $1)=yes
6744b9b4fd27Smrg        ;;
6745b9b4fd27Smrg      esac
6746b9b4fd27Smrg      ;;
6747caade7ccSmrg
6748b9b4fd27Smrg    beos*)
6749b9b4fd27Smrg      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6750b9b4fd27Smrg	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6751b9b4fd27Smrg	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
6752b9b4fd27Smrg	# support --undefined.  This deserves some investigation.  FIXME
6753b9b4fd27Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6754b9b4fd27Smrg      else
6755b9b4fd27Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
6756b9b4fd27Smrg      fi
6757b9b4fd27Smrg      ;;
6758caade7ccSmrg
6759b9b4fd27Smrg    cygwin* | mingw* | pw32* | cegcc*)
6760b9b4fd27Smrg      # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
6761b9b4fd27Smrg      # as there is no search path for DLLs.
6762b9b4fd27Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6763e8a5466aSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
6764b9b4fd27Smrg      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6765b9b4fd27Smrg      _LT_TAGVAR(always_export_symbols, $1)=no
6766b9b4fd27Smrg      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6767b9b4fd27Smrg      _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'
6768b9b4fd27Smrg
6769b9b4fd27Smrg      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
6770b9b4fd27Smrg        _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'
6771b9b4fd27Smrg	# If the export-symbols file already is a .def file (1st line
6772b9b4fd27Smrg	# is EXPORTS), use it as is; otherwise, prepend...
6773b9b4fd27Smrg	_LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6774b9b4fd27Smrg	  cp $export_symbols $output_objdir/$soname.def;
6775b9b4fd27Smrg	else
6776b9b4fd27Smrg	  echo EXPORTS > $output_objdir/$soname.def;
6777b9b4fd27Smrg	  cat $export_symbols >> $output_objdir/$soname.def;
6778b9b4fd27Smrg	fi~
6779b9b4fd27Smrg	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
6780b9b4fd27Smrg      else
6781b9b4fd27Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
6782b9b4fd27Smrg      fi
6783b9b4fd27Smrg      ;;
6784caade7ccSmrg
6785e8a5466aSmrg    haiku*)
6786e8a5466aSmrg      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6787e8a5466aSmrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
6788e8a5466aSmrg      ;;
6789e8a5466aSmrg
6790b9b4fd27Smrg    interix[[3-9]]*)
6791b9b4fd27Smrg      _LT_TAGVAR(hardcode_direct, $1)=no
6792b9b4fd27Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6793b9b4fd27Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6794b9b4fd27Smrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6795b9b4fd27Smrg      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
6796b9b4fd27Smrg      # Instead, shared libraries are loaded at an image base (0x10000000 by
6797b9b4fd27Smrg      # default) and relocated if they conflict, which is a slow very memory
6798b9b4fd27Smrg      # consuming and fragmenting process.  To avoid this, we pick a random,
6799b9b4fd27Smrg      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
6800b9b4fd27Smrg      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
6801b9b4fd27Smrg      _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'
6802b9b4fd27Smrg      _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'
6803b9b4fd27Smrg      ;;
6804caade7ccSmrg
6805e8a5466aSmrg    gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
6806b9b4fd27Smrg      tmp_diet=no
6807b9b4fd27Smrg      if test "$host_os" = linux-dietlibc; then
6808b9b4fd27Smrg	case $cc_basename in
6809b9b4fd27Smrg	  diet\ *) tmp_diet=yes;;	# linux-dietlibc with static linking (!diet-dyn)
6810b9b4fd27Smrg	esac
6811b9b4fd27Smrg      fi
6812b9b4fd27Smrg      if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
6813b9b4fd27Smrg	 && test "$tmp_diet" = no
6814b9b4fd27Smrg      then
6815b9b4fd27Smrg	tmp_addflag=
6816b9b4fd27Smrg	tmp_sharedflag='-shared'
6817b9b4fd27Smrg	case $cc_basename,$host_cpu in
6818b9b4fd27Smrg        pgcc*)				# Portland Group C compiler
6819e8a5466aSmrg	  _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'
6820b9b4fd27Smrg	  tmp_addflag=' $pic_flag'
6821b9b4fd27Smrg	  ;;
6822e8a5466aSmrg	pgf77* | pgf90* | pgf95* | pgfortran*)
6823e8a5466aSmrg					# Portland Group f77 and f90 compilers
6824e8a5466aSmrg	  _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'
6825b9b4fd27Smrg	  tmp_addflag=' $pic_flag -Mnomain' ;;
6826b9b4fd27Smrg	ecc*,ia64* | icc*,ia64*)	# Intel C compiler on ia64
6827b9b4fd27Smrg	  tmp_addflag=' -i_dynamic' ;;
6828b9b4fd27Smrg	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
6829b9b4fd27Smrg	  tmp_addflag=' -i_dynamic -nofor_main' ;;
6830b9b4fd27Smrg	ifc* | ifort*)			# Intel Fortran compiler
6831b9b4fd27Smrg	  tmp_addflag=' -nofor_main' ;;
6832b9b4fd27Smrg	lf95*)				# Lahey Fortran 8.1
6833b9b4fd27Smrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)=
6834b9b4fd27Smrg	  tmp_sharedflag='--shared' ;;
6835e8a5466aSmrg	xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
6836b9b4fd27Smrg	  tmp_sharedflag='-qmkshrobj'
6837b9b4fd27Smrg	  tmp_addflag= ;;
6838e8a5466aSmrg	nvcc*)	# Cuda Compiler Driver 2.2
6839e8a5466aSmrg	  _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'
6840e8a5466aSmrg	  _LT_TAGVAR(compiler_needs_object, $1)=yes
6841e8a5466aSmrg	  ;;
6842b9b4fd27Smrg	esac
6843b9b4fd27Smrg	case `$CC -V 2>&1 | sed 5q` in
6844b9b4fd27Smrg	*Sun\ C*)			# Sun C 5.9
6845e8a5466aSmrg	  _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'
6846b9b4fd27Smrg	  _LT_TAGVAR(compiler_needs_object, $1)=yes
6847b9b4fd27Smrg	  tmp_sharedflag='-G' ;;
6848b9b4fd27Smrg	*Sun\ F*)			# Sun Fortran 8.3
6849b9b4fd27Smrg	  tmp_sharedflag='-G' ;;
6850b9b4fd27Smrg	esac
6851b9b4fd27Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6852caade7ccSmrg
6853b9b4fd27Smrg        if test "x$supports_anon_versioning" = xyes; then
6854b9b4fd27Smrg          _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
6855b9b4fd27Smrg	    cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
6856b9b4fd27Smrg	    echo "local: *; };" >> $output_objdir/$libname.ver~
6857b9b4fd27Smrg	    $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
6858b9b4fd27Smrg        fi
6859caade7ccSmrg
6860b9b4fd27Smrg	case $cc_basename in
6861e8a5466aSmrg	xlf* | bgf* | bgxlf* | mpixlf*)
6862b9b4fd27Smrg	  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
6863b9b4fd27Smrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
6864b9b4fd27Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6865b9b4fd27Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
6866e8a5466aSmrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
6867b9b4fd27Smrg	  if test "x$supports_anon_versioning" = xyes; then
6868b9b4fd27Smrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
6869b9b4fd27Smrg	      cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
6870b9b4fd27Smrg	      echo "local: *; };" >> $output_objdir/$libname.ver~
6871e8a5466aSmrg	      $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
6872b9b4fd27Smrg	  fi
6873b9b4fd27Smrg	  ;;
6874b9b4fd27Smrg	esac
6875b9b4fd27Smrg      else
6876b9b4fd27Smrg        _LT_TAGVAR(ld_shlibs, $1)=no
6877b9b4fd27Smrg      fi
6878b9b4fd27Smrg      ;;
6879caade7ccSmrg
6880b9b4fd27Smrg    netbsd*)
6881b9b4fd27Smrg      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
6882b9b4fd27Smrg	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
6883b9b4fd27Smrg	wlarc=
6884b9b4fd27Smrg      else
6885b9b4fd27Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6886b9b4fd27Smrg	_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'
6887b9b4fd27Smrg      fi
6888b9b4fd27Smrg      ;;
6889caade7ccSmrg
6890b9b4fd27Smrg    solaris*)
6891b9b4fd27Smrg      if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
6892b9b4fd27Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
6893b9b4fd27Smrg	cat <<_LT_EOF 1>&2
6894caade7ccSmrg
6895b9b4fd27Smrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably
6896b9b4fd27Smrg*** create shared libraries on Solaris systems.  Therefore, libtool
6897b9b4fd27Smrg*** is disabling shared libraries support.  We urge you to upgrade GNU
6898b9b4fd27Smrg*** binutils to release 2.9.1 or newer.  Another option is to modify
6899b9b4fd27Smrg*** your PATH or compiler configuration so that the native linker is
6900b9b4fd27Smrg*** used, and then restart.
6901caade7ccSmrg
6902b9b4fd27Smrg_LT_EOF
6903b9b4fd27Smrg      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6904b9b4fd27Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6905b9b4fd27Smrg	_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'
6906b9b4fd27Smrg      else
6907b9b4fd27Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
6908b9b4fd27Smrg      fi
6909b9b4fd27Smrg      ;;
6910caade7ccSmrg
6911b9b4fd27Smrg    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
6912b9b4fd27Smrg      case `$LD -v 2>&1` in
6913b9b4fd27Smrg        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
6914b9b4fd27Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
6915b9b4fd27Smrg	cat <<_LT_EOF 1>&2
6916caade7ccSmrg
6917b9b4fd27Smrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
6918b9b4fd27Smrg*** reliably create shared libraries on SCO systems.  Therefore, libtool
6919b9b4fd27Smrg*** is disabling shared libraries support.  We urge you to upgrade GNU
6920b9b4fd27Smrg*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
6921b9b4fd27Smrg*** your PATH or compiler configuration so that the native linker is
6922b9b4fd27Smrg*** used, and then restart.
6923caade7ccSmrg
6924b9b4fd27Smrg_LT_EOF
6925b9b4fd27Smrg	;;
6926b9b4fd27Smrg	*)
6927b9b4fd27Smrg	  # For security reasons, it is highly recommended that you always
6928b9b4fd27Smrg	  # use absolute paths for naming shared libraries, and exclude the
6929b9b4fd27Smrg	  # DT_RUNPATH tag from executables and libraries.  But doing so
6930b9b4fd27Smrg	  # requires that you compile everything twice, which is a pain.
6931b9b4fd27Smrg	  if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6932b9b4fd27Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6933b9b4fd27Smrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6934b9b4fd27Smrg	    _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'
6935b9b4fd27Smrg	  else
6936b9b4fd27Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
6937b9b4fd27Smrg	  fi
6938b9b4fd27Smrg	;;
6939b9b4fd27Smrg      esac
6940b9b4fd27Smrg      ;;
6941caade7ccSmrg
6942b9b4fd27Smrg    sunos4*)
6943b9b4fd27Smrg      _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6944b9b4fd27Smrg      wlarc=
6945b9b4fd27Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
6946b9b4fd27Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6947b9b4fd27Smrg      ;;
6948caade7ccSmrg
6949b9b4fd27Smrg    *)
6950b9b4fd27Smrg      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6951b9b4fd27Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6952b9b4fd27Smrg	_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'
6953b9b4fd27Smrg      else
6954b9b4fd27Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
6955b9b4fd27Smrg      fi
6956b9b4fd27Smrg      ;;
6957b9b4fd27Smrg    esac
6958caade7ccSmrg
6959b9b4fd27Smrg    if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
6960b9b4fd27Smrg      runpath_var=
6961b9b4fd27Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6962b9b4fd27Smrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)=
6963b9b4fd27Smrg      _LT_TAGVAR(whole_archive_flag_spec, $1)=
6964b9b4fd27Smrg    fi
6965b9b4fd27Smrg  else
6966b9b4fd27Smrg    # PORTME fill in a description of your system's linker (not GNU ld)
6967b9b4fd27Smrg    case $host_os in
6968b9b4fd27Smrg    aix3*)
6969b9b4fd27Smrg      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6970b9b4fd27Smrg      _LT_TAGVAR(always_export_symbols, $1)=yes
6971b9b4fd27Smrg      _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'
6972b9b4fd27Smrg      # Note: this linker hardcodes the directories in LIBPATH if there
6973b9b4fd27Smrg      # are no directories specified by -L.
6974b9b4fd27Smrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
6975b9b4fd27Smrg      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
6976b9b4fd27Smrg	# Neither direct hardcoding nor static linking is supported with a
6977b9b4fd27Smrg	# broken collect2.
6978b9b4fd27Smrg	_LT_TAGVAR(hardcode_direct, $1)=unsupported
6979b9b4fd27Smrg      fi
6980b9b4fd27Smrg      ;;
6981caade7ccSmrg
6982b9b4fd27Smrg    aix[[4-9]]*)
6983b9b4fd27Smrg      if test "$host_cpu" = ia64; then
6984b9b4fd27Smrg	# On IA64, the linker does run time linking by default, so we don't
6985b9b4fd27Smrg	# have to do anything special.
6986b9b4fd27Smrg	aix_use_runtimelinking=no
6987b9b4fd27Smrg	exp_sym_flag='-Bexport'
6988b9b4fd27Smrg	no_entry_flag=""
6989b9b4fd27Smrg      else
6990b9b4fd27Smrg	# If we're using GNU nm, then we don't want the "-C" option.
6991b9b4fd27Smrg	# -C means demangle to AIX nm, but means don't demangle with GNU nm
6992e8a5466aSmrg	# Also, AIX nm treats weak defined symbols like other global
6993e8a5466aSmrg	# defined symbols, whereas GNU nm marks them as "W".
6994b9b4fd27Smrg	if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
6995e8a5466aSmrg	  _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'
6996b9b4fd27Smrg	else
6997b9b4fd27Smrg	  _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'
6998b9b4fd27Smrg	fi
6999b9b4fd27Smrg	aix_use_runtimelinking=no
7000caade7ccSmrg
7001b9b4fd27Smrg	# Test if we are trying to use run time linking or normal
7002b9b4fd27Smrg	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
7003b9b4fd27Smrg	# need to do runtime linking.
7004b9b4fd27Smrg	case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
7005b9b4fd27Smrg	  for ld_flag in $LDFLAGS; do
7006b9b4fd27Smrg	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
7007b9b4fd27Smrg	    aix_use_runtimelinking=yes
7008b9b4fd27Smrg	    break
7009b9b4fd27Smrg	  fi
7010b9b4fd27Smrg	  done
7011b9b4fd27Smrg	  ;;
7012b9b4fd27Smrg	esac
7013caade7ccSmrg
7014b9b4fd27Smrg	exp_sym_flag='-bexport'
7015b9b4fd27Smrg	no_entry_flag='-bnoentry'
7016b9b4fd27Smrg      fi
7017caade7ccSmrg
7018b9b4fd27Smrg      # When large executables or shared objects are built, AIX ld can
7019b9b4fd27Smrg      # have problems creating the table of contents.  If linking a library
7020b9b4fd27Smrg      # or program results in "error TOC overflow" add -mminimal-toc to
7021b9b4fd27Smrg      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
7022b9b4fd27Smrg      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
7023caade7ccSmrg
7024b9b4fd27Smrg      _LT_TAGVAR(archive_cmds, $1)=''
7025b9b4fd27Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
7026b9b4fd27Smrg      _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7027b9b4fd27Smrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
7028b9b4fd27Smrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
7029b9b4fd27Smrg      _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
7030485f0483Smrg
7031b9b4fd27Smrg      if test "$GCC" = yes; then
7032b9b4fd27Smrg	case $host_os in aix4.[[012]]|aix4.[[012]].*)
7033b9b4fd27Smrg	# We only want to do this on AIX 4.2 and lower, the check
7034b9b4fd27Smrg	# below for broken collect2 doesn't work under 4.3+
7035b9b4fd27Smrg	  collect2name=`${CC} -print-prog-name=collect2`
7036b9b4fd27Smrg	  if test -f "$collect2name" &&
7037b9b4fd27Smrg	   strings "$collect2name" | $GREP resolve_lib_name >/dev/null
7038b9b4fd27Smrg	  then
7039b9b4fd27Smrg	  # We have reworked collect2
7040b9b4fd27Smrg	  :
7041b9b4fd27Smrg	  else
7042b9b4fd27Smrg	  # We have old collect2
7043b9b4fd27Smrg	  _LT_TAGVAR(hardcode_direct, $1)=unsupported
7044b9b4fd27Smrg	  # It fails to find uninstalled libraries when the uninstalled
7045b9b4fd27Smrg	  # path is not listed in the libpath.  Setting hardcode_minus_L
7046b9b4fd27Smrg	  # to unsupported forces relinking
7047b9b4fd27Smrg	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
7048b9b4fd27Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7049b9b4fd27Smrg	  _LT_TAGVAR(hardcode_libdir_separator, $1)=
7050b9b4fd27Smrg	  fi
7051b9b4fd27Smrg	  ;;
7052b9b4fd27Smrg	esac
7053b9b4fd27Smrg	shared_flag='-shared'
7054b9b4fd27Smrg	if test "$aix_use_runtimelinking" = yes; then
7055b9b4fd27Smrg	  shared_flag="$shared_flag "'${wl}-G'
7056b9b4fd27Smrg	fi
7057b9b4fd27Smrg      else
7058b9b4fd27Smrg	# not using gcc
7059b9b4fd27Smrg	if test "$host_cpu" = ia64; then
7060b9b4fd27Smrg	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
7061b9b4fd27Smrg	# chokes on -Wl,-G. The following line is correct:
7062b9b4fd27Smrg	  shared_flag='-G'
7063b9b4fd27Smrg	else
7064b9b4fd27Smrg	  if test "$aix_use_runtimelinking" = yes; then
7065b9b4fd27Smrg	    shared_flag='${wl}-G'
7066b9b4fd27Smrg	  else
7067b9b4fd27Smrg	    shared_flag='${wl}-bM:SRE'
7068b9b4fd27Smrg	  fi
7069b9b4fd27Smrg	fi
7070b9b4fd27Smrg      fi
7071caade7ccSmrg
7072b9b4fd27Smrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
7073b9b4fd27Smrg      # It seems that -bexpall does not export symbols beginning with
7074b9b4fd27Smrg      # underscore (_), so it is better to generate a list of symbols to export.
7075b9b4fd27Smrg      _LT_TAGVAR(always_export_symbols, $1)=yes
7076b9b4fd27Smrg      if test "$aix_use_runtimelinking" = yes; then
7077b9b4fd27Smrg	# Warning - without using the other runtime loading flags (-brtl),
7078b9b4fd27Smrg	# -berok will link without error, but may produce a broken library.
7079b9b4fd27Smrg	_LT_TAGVAR(allow_undefined_flag, $1)='-berok'
7080b9b4fd27Smrg        # Determine the default libpath from the value encoded in an
7081b9b4fd27Smrg        # empty executable.
7082b9b4fd27Smrg        _LT_SYS_MODULE_PATH_AIX
7083b9b4fd27Smrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
7084e8a5466aSmrg        _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"
7085b9b4fd27Smrg      else
7086b9b4fd27Smrg	if test "$host_cpu" = ia64; then
7087b9b4fd27Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
7088b9b4fd27Smrg	  _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
7089b9b4fd27Smrg	  _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"
7090b9b4fd27Smrg	else
7091b9b4fd27Smrg	 # Determine the default libpath from the value encoded in an
7092b9b4fd27Smrg	 # empty executable.
7093b9b4fd27Smrg	 _LT_SYS_MODULE_PATH_AIX
7094b9b4fd27Smrg	 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
7095b9b4fd27Smrg	  # Warning - without using the other run time loading flags,
7096b9b4fd27Smrg	  # -berok will link without error, but may produce a broken library.
7097b9b4fd27Smrg	  _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
7098b9b4fd27Smrg	  _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
7099e8a5466aSmrg	  if test "$with_gnu_ld" = yes; then
7100e8a5466aSmrg	    # We only use this code for GNU lds that support --whole-archive.
7101e8a5466aSmrg	    _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
7102e8a5466aSmrg	  else
7103e8a5466aSmrg	    # Exported symbols can be pulled into shared objects from archives
7104e8a5466aSmrg	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
7105e8a5466aSmrg	  fi
7106b9b4fd27Smrg	  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
7107b9b4fd27Smrg	  # This is similar to how AIX traditionally builds its shared libraries.
7108b9b4fd27Smrg	  _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'
7109b9b4fd27Smrg	fi
7110b9b4fd27Smrg      fi
7111b9b4fd27Smrg      ;;
7112caade7ccSmrg
7113b9b4fd27Smrg    amigaos*)
7114b9b4fd27Smrg      case $host_cpu in
7115b9b4fd27Smrg      powerpc)
7116b9b4fd27Smrg            # see comment about AmigaOS4 .so support
7117b9b4fd27Smrg            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7118b9b4fd27Smrg            _LT_TAGVAR(archive_expsym_cmds, $1)=''
7119b9b4fd27Smrg        ;;
7120b9b4fd27Smrg      m68k)
7121b9b4fd27Smrg            _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)'
7122b9b4fd27Smrg            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7123b9b4fd27Smrg            _LT_TAGVAR(hardcode_minus_L, $1)=yes
7124b9b4fd27Smrg        ;;
7125b9b4fd27Smrg      esac
7126b9b4fd27Smrg      ;;
7127caade7ccSmrg
7128b9b4fd27Smrg    bsdi[[45]]*)
7129b9b4fd27Smrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
7130b9b4fd27Smrg      ;;
7131caade7ccSmrg
7132b9b4fd27Smrg    cygwin* | mingw* | pw32* | cegcc*)
7133b9b4fd27Smrg      # When not using gcc, we currently assume that we are using
7134b9b4fd27Smrg      # Microsoft Visual C++.
7135b9b4fd27Smrg      # hardcode_libdir_flag_spec is actually meaningless, as there is
7136b9b4fd27Smrg      # no search path for DLLs.
7137b9b4fd27Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
7138b9b4fd27Smrg      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7139b9b4fd27Smrg      # Tell ltmain to make .lib files, not .a files.
7140b9b4fd27Smrg      libext=lib
7141b9b4fd27Smrg      # Tell ltmain to make .dll files, not .so files.
7142b9b4fd27Smrg      shrext_cmds=".dll"
7143b9b4fd27Smrg      # FIXME: Setting linknames here is a bad hack.
7144e8a5466aSmrg      _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
7145b9b4fd27Smrg      # The linker will automatically build a .lib file if we build a DLL.
7146b9b4fd27Smrg      _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
7147b9b4fd27Smrg      # FIXME: Should let the user specify the lib program.
7148b9b4fd27Smrg      _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
7149b9b4fd27Smrg      _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
7150b9b4fd27Smrg      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
7151b9b4fd27Smrg      ;;
7152caade7ccSmrg
7153b9b4fd27Smrg    darwin* | rhapsody*)
7154b9b4fd27Smrg      _LT_DARWIN_LINKER_FEATURES($1)
7155b9b4fd27Smrg      ;;
7156caade7ccSmrg
7157b9b4fd27Smrg    dgux*)
7158b9b4fd27Smrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7159b9b4fd27Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7160b9b4fd27Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7161b9b4fd27Smrg      ;;
7162caade7ccSmrg
7163b9b4fd27Smrg    freebsd1*)
7164b9b4fd27Smrg      _LT_TAGVAR(ld_shlibs, $1)=no
7165b9b4fd27Smrg      ;;
7166caade7ccSmrg
7167b9b4fd27Smrg    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
7168b9b4fd27Smrg    # support.  Future versions do this automatically, but an explicit c++rt0.o
7169b9b4fd27Smrg    # does not break anything, and helps significantly (at the cost of a little
7170b9b4fd27Smrg    # extra space).
7171b9b4fd27Smrg    freebsd2.2*)
7172b9b4fd27Smrg      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
7173b9b4fd27Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7174b9b4fd27Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
7175b9b4fd27Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7176b9b4fd27Smrg      ;;
7177caade7ccSmrg
7178b9b4fd27Smrg    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
7179b9b4fd27Smrg    freebsd2*)
7180b9b4fd27Smrg      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
7181b9b4fd27Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
7182b9b4fd27Smrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
7183b9b4fd27Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7184b9b4fd27Smrg      ;;
7185caade7ccSmrg
7186b9b4fd27Smrg    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
7187b9b4fd27Smrg    freebsd* | dragonfly*)
7188b9b4fd27Smrg      _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
7189b9b4fd27Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7190b9b4fd27Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
7191b9b4fd27Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7192b9b4fd27Smrg      ;;
7193caade7ccSmrg
7194b9b4fd27Smrg    hpux9*)
7195b9b4fd27Smrg      if test "$GCC" = yes; then
7196b9b4fd27Smrg	_LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
7197b9b4fd27Smrg      else
7198b9b4fd27Smrg	_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'
7199b9b4fd27Smrg      fi
7200b9b4fd27Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
7201b9b4fd27Smrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7202b9b4fd27Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
7203caade7ccSmrg
7204b9b4fd27Smrg      # hardcode_minus_L: Not really in the search PATH,
7205b9b4fd27Smrg      # but as the default location of the library.
7206b9b4fd27Smrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
7207b9b4fd27Smrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7208b9b4fd27Smrg      ;;
7209caade7ccSmrg
7210b9b4fd27Smrg    hpux10*)
7211e8a5466aSmrg      if test "$GCC" = yes && test "$with_gnu_ld" = no; then
7212b9b4fd27Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
7213b9b4fd27Smrg      else
7214b9b4fd27Smrg	_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
7215b9b4fd27Smrg      fi
7216b9b4fd27Smrg      if test "$with_gnu_ld" = no; then
7217b9b4fd27Smrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
7218b9b4fd27Smrg	_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
7219b9b4fd27Smrg	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
7220b9b4fd27Smrg	_LT_TAGVAR(hardcode_direct, $1)=yes
7221b9b4fd27Smrg	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7222b9b4fd27Smrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7223b9b4fd27Smrg	# hardcode_minus_L: Not really in the search PATH,
7224b9b4fd27Smrg	# but as the default location of the library.
7225b9b4fd27Smrg	_LT_TAGVAR(hardcode_minus_L, $1)=yes
7226b9b4fd27Smrg      fi
7227b9b4fd27Smrg      ;;
7228caade7ccSmrg
7229b9b4fd27Smrg    hpux11*)
7230e8a5466aSmrg      if test "$GCC" = yes && test "$with_gnu_ld" = no; then
7231b9b4fd27Smrg	case $host_cpu in
7232b9b4fd27Smrg	hppa*64*)
7233b9b4fd27Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
7234b9b4fd27Smrg	  ;;
7235b9b4fd27Smrg	ia64*)
7236b9b4fd27Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
7237b9b4fd27Smrg	  ;;
7238b9b4fd27Smrg	*)
7239b9b4fd27Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
7240b9b4fd27Smrg	  ;;
7241b9b4fd27Smrg	esac
7242b9b4fd27Smrg      else
7243b9b4fd27Smrg	case $host_cpu in
7244b9b4fd27Smrg	hppa*64*)
7245b9b4fd27Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
7246b9b4fd27Smrg	  ;;
7247b9b4fd27Smrg	ia64*)
7248b9b4fd27Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
7249b9b4fd27Smrg	  ;;
7250b9b4fd27Smrg	*)
7251e8a5466aSmrg	m4_if($1, [], [
7252e8a5466aSmrg	  # Older versions of the 11.00 compiler do not understand -b yet
7253e8a5466aSmrg	  # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
7254e8a5466aSmrg	  _LT_LINKER_OPTION([if $CC understands -b],
7255e8a5466aSmrg	    _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
7256e8a5466aSmrg	    [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
7257e8a5466aSmrg	    [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
7258e8a5466aSmrg	  [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
7259b9b4fd27Smrg	  ;;
7260b9b4fd27Smrg	esac
7261b9b4fd27Smrg      fi
7262b9b4fd27Smrg      if test "$with_gnu_ld" = no; then
7263b9b4fd27Smrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
7264b9b4fd27Smrg	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
7265caade7ccSmrg
7266b9b4fd27Smrg	case $host_cpu in
7267b9b4fd27Smrg	hppa*64*|ia64*)
7268b9b4fd27Smrg	  _LT_TAGVAR(hardcode_direct, $1)=no
7269b9b4fd27Smrg	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7270b9b4fd27Smrg	  ;;
7271b9b4fd27Smrg	*)
7272b9b4fd27Smrg	  _LT_TAGVAR(hardcode_direct, $1)=yes
7273b9b4fd27Smrg	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7274b9b4fd27Smrg	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7275caade7ccSmrg
7276b9b4fd27Smrg	  # hardcode_minus_L: Not really in the search PATH,
7277b9b4fd27Smrg	  # but as the default location of the library.
7278b9b4fd27Smrg	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
7279b9b4fd27Smrg	  ;;
7280b9b4fd27Smrg	esac
7281b9b4fd27Smrg      fi
7282b9b4fd27Smrg      ;;
7283caade7ccSmrg
7284b9b4fd27Smrg    irix5* | irix6* | nonstopux*)
7285b9b4fd27Smrg      if test "$GCC" = yes; then
7286e8a5466aSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $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'
7287b9b4fd27Smrg	# Try to use the -exported_symbol ld option, if it does not
7288b9b4fd27Smrg	# work, assume that -exports_file does not work either and
7289b9b4fd27Smrg	# implicitly export all symbols.
7290b9b4fd27Smrg        save_LDFLAGS="$LDFLAGS"
7291b9b4fd27Smrg        LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
7292b9b4fd27Smrg        AC_LINK_IFELSE(int foo(void) {},
7293e8a5466aSmrg          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $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'
7294b9b4fd27Smrg        )
7295b9b4fd27Smrg        LDFLAGS="$save_LDFLAGS"
7296b9b4fd27Smrg      else
7297e8a5466aSmrg	_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'
7298e8a5466aSmrg	_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'
7299b9b4fd27Smrg      fi
7300b9b4fd27Smrg      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
7301b9b4fd27Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7302b9b4fd27Smrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7303b9b4fd27Smrg      _LT_TAGVAR(inherit_rpath, $1)=yes
7304b9b4fd27Smrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
7305b9b4fd27Smrg      ;;
7306caade7ccSmrg
7307b9b4fd27Smrg    netbsd*)
7308b9b4fd27Smrg      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
7309b9b4fd27Smrg	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
7310b9b4fd27Smrg      else
7311b9b4fd27Smrg	_LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
7312b9b4fd27Smrg      fi
7313b9b4fd27Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7314b9b4fd27Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
7315b9b4fd27Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7316b9b4fd27Smrg      ;;
7317caade7ccSmrg
7318b9b4fd27Smrg    newsos6)
7319b9b4fd27Smrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7320b9b4fd27Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
7321b9b4fd27Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7322b9b4fd27Smrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7323b9b4fd27Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7324b9b4fd27Smrg      ;;
7325caade7ccSmrg
7326b9b4fd27Smrg    *nto* | *qnx*)
7327b9b4fd27Smrg      ;;
7328caade7ccSmrg
7329b9b4fd27Smrg    openbsd*)
7330b9b4fd27Smrg      if test -f /usr/libexec/ld.so; then
7331b9b4fd27Smrg	_LT_TAGVAR(hardcode_direct, $1)=yes
7332b9b4fd27Smrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7333b9b4fd27Smrg	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7334b9b4fd27Smrg	if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
7335b9b4fd27Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
7336b9b4fd27Smrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
7337b9b4fd27Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7338b9b4fd27Smrg	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7339b9b4fd27Smrg	else
7340b9b4fd27Smrg	  case $host_os in
7341b9b4fd27Smrg	   openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
7342b9b4fd27Smrg	     _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
7343b9b4fd27Smrg	     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7344b9b4fd27Smrg	     ;;
7345b9b4fd27Smrg	   *)
7346b9b4fd27Smrg	     _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
7347b9b4fd27Smrg	     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7348b9b4fd27Smrg	     ;;
7349b9b4fd27Smrg	  esac
7350b9b4fd27Smrg	fi
7351b9b4fd27Smrg      else
7352b9b4fd27Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
7353b9b4fd27Smrg      fi
7354b9b4fd27Smrg      ;;
7355caade7ccSmrg
7356b9b4fd27Smrg    os2*)
7357b9b4fd27Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7358b9b4fd27Smrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
7359b9b4fd27Smrg      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7360e8a5466aSmrg      _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'
7361b9b4fd27Smrg      _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
7362b9b4fd27Smrg      ;;
7363caade7ccSmrg
7364b9b4fd27Smrg    osf3*)
7365b9b4fd27Smrg      if test "$GCC" = yes; then
7366b9b4fd27Smrg	_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
7367e8a5466aSmrg	_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'
7368b9b4fd27Smrg      else
7369b9b4fd27Smrg	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
7370e8a5466aSmrg	_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'
7371b9b4fd27Smrg      fi
7372b9b4fd27Smrg      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
7373b9b4fd27Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7374b9b4fd27Smrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7375b9b4fd27Smrg      ;;
7376caade7ccSmrg
7377b9b4fd27Smrg    osf4* | osf5*)	# as osf3* with the addition of -msym flag
7378b9b4fd27Smrg      if test "$GCC" = yes; then
7379b9b4fd27Smrg	_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
7380e8a5466aSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_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'
7381b9b4fd27Smrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7382b9b4fd27Smrg      else
7383b9b4fd27Smrg	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
7384e8a5466aSmrg	_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'
7385b9b4fd27Smrg	_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~
7386e8a5466aSmrg	$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'
7387caade7ccSmrg
7388b9b4fd27Smrg	# Both c and cxx compiler support -rpath directly
7389b9b4fd27Smrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
7390b9b4fd27Smrg      fi
7391b9b4fd27Smrg      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
7392b9b4fd27Smrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7393b9b4fd27Smrg      ;;
7394caade7ccSmrg
7395b9b4fd27Smrg    solaris*)
7396b9b4fd27Smrg      _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
7397b9b4fd27Smrg      if test "$GCC" = yes; then
7398b9b4fd27Smrg	wlarc='${wl}'
7399b9b4fd27Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
7400b9b4fd27Smrg	_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7401b9b4fd27Smrg	  $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
7402b9b4fd27Smrg      else
7403b9b4fd27Smrg	case `$CC -V 2>&1` in
7404b9b4fd27Smrg	*"Compilers 5.0"*)
7405b9b4fd27Smrg	  wlarc=''
7406b9b4fd27Smrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
7407b9b4fd27Smrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7408b9b4fd27Smrg	  $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
7409b9b4fd27Smrg	  ;;
7410b9b4fd27Smrg	*)
7411b9b4fd27Smrg	  wlarc='${wl}'
7412b9b4fd27Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
7413b9b4fd27Smrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7414b9b4fd27Smrg	  $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
7415b9b4fd27Smrg	  ;;
7416b9b4fd27Smrg	esac
7417b9b4fd27Smrg      fi
7418b9b4fd27Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7419b9b4fd27Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7420b9b4fd27Smrg      case $host_os in
7421b9b4fd27Smrg      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
7422b9b4fd27Smrg      *)
7423b9b4fd27Smrg	# The compiler driver will combine and reorder linker options,
7424b9b4fd27Smrg	# but understands `-z linker_flag'.  GCC discards it without `$wl',
7425b9b4fd27Smrg	# but is careful enough not to reorder.
7426b9b4fd27Smrg	# Supported since Solaris 2.6 (maybe 2.5.1?)
7427b9b4fd27Smrg	if test "$GCC" = yes; then
7428b9b4fd27Smrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
7429b9b4fd27Smrg	else
7430b9b4fd27Smrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
7431b9b4fd27Smrg	fi
7432b9b4fd27Smrg	;;
7433b9b4fd27Smrg      esac
7434b9b4fd27Smrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
7435b9b4fd27Smrg      ;;
7436caade7ccSmrg
7437b9b4fd27Smrg    sunos4*)
7438b9b4fd27Smrg      if test "x$host_vendor" = xsequent; then
7439b9b4fd27Smrg	# Use $CC to link under sequent, because it throws in some extra .o
7440b9b4fd27Smrg	# files that make .init and .fini sections work.
7441b9b4fd27Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
7442b9b4fd27Smrg      else
7443b9b4fd27Smrg	_LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
7444b9b4fd27Smrg      fi
7445b9b4fd27Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7446b9b4fd27Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
7447b9b4fd27Smrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
7448b9b4fd27Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7449b9b4fd27Smrg      ;;
7450caade7ccSmrg
7451b9b4fd27Smrg    sysv4)
7452b9b4fd27Smrg      case $host_vendor in
7453b9b4fd27Smrg	sni)
7454b9b4fd27Smrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7455b9b4fd27Smrg	  _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
7456b9b4fd27Smrg	;;
7457b9b4fd27Smrg	siemens)
7458b9b4fd27Smrg	  ## LD is ld it makes a PLAMLIB
7459b9b4fd27Smrg	  ## CC just makes a GrossModule.
7460b9b4fd27Smrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
7461b9b4fd27Smrg	  _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
7462b9b4fd27Smrg	  _LT_TAGVAR(hardcode_direct, $1)=no
7463b9b4fd27Smrg        ;;
7464b9b4fd27Smrg	motorola)
7465b9b4fd27Smrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7466b9b4fd27Smrg	  _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
7467b9b4fd27Smrg	;;
7468b9b4fd27Smrg      esac
7469b9b4fd27Smrg      runpath_var='LD_RUN_PATH'
7470b9b4fd27Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7471b9b4fd27Smrg      ;;
7472caade7ccSmrg
7473b9b4fd27Smrg    sysv4.3*)
7474b9b4fd27Smrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7475b9b4fd27Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7476b9b4fd27Smrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
7477b9b4fd27Smrg      ;;
7478caade7ccSmrg
7479b9b4fd27Smrg    sysv4*MP*)
7480b9b4fd27Smrg      if test -d /usr/nec; then
7481b9b4fd27Smrg	_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7482b9b4fd27Smrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7483b9b4fd27Smrg	runpath_var=LD_RUN_PATH
7484b9b4fd27Smrg	hardcode_runpath_var=yes
7485b9b4fd27Smrg	_LT_TAGVAR(ld_shlibs, $1)=yes
7486b9b4fd27Smrg      fi
7487b9b4fd27Smrg      ;;
7488caade7ccSmrg
7489b9b4fd27Smrg    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
7490b9b4fd27Smrg      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
7491b9b4fd27Smrg      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7492b9b4fd27Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7493b9b4fd27Smrg      runpath_var='LD_RUN_PATH'
7494caade7ccSmrg
7495b9b4fd27Smrg      if test "$GCC" = yes; then
7496b9b4fd27Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7497b9b4fd27Smrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7498b9b4fd27Smrg      else
7499b9b4fd27Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7500b9b4fd27Smrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7501b9b4fd27Smrg      fi
7502b9b4fd27Smrg      ;;
7503caade7ccSmrg
7504b9b4fd27Smrg    sysv5* | sco3.2v5* | sco5v6*)
7505b9b4fd27Smrg      # Note: We can NOT use -z defs as we might desire, because we do not
7506b9b4fd27Smrg      # link with -lc, and that would cause any symbols used from libc to
7507b9b4fd27Smrg      # always be unresolved, which means just about no library would
7508b9b4fd27Smrg      # ever link correctly.  If we're not using GNU ld we use -z text
7509b9b4fd27Smrg      # though, which does catch some bad symbols but isn't as heavy-handed
7510b9b4fd27Smrg      # as -z defs.
7511b9b4fd27Smrg      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
7512b9b4fd27Smrg      _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
7513b9b4fd27Smrg      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7514b9b4fd27Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7515b9b4fd27Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
7516b9b4fd27Smrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
7517b9b4fd27Smrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
7518b9b4fd27Smrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
7519b9b4fd27Smrg      runpath_var='LD_RUN_PATH'
7520caade7ccSmrg
7521b9b4fd27Smrg      if test "$GCC" = yes; then
7522b9b4fd27Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7523b9b4fd27Smrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7524b9b4fd27Smrg      else
7525b9b4fd27Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7526b9b4fd27Smrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7527b9b4fd27Smrg      fi
7528b9b4fd27Smrg      ;;
7529caade7ccSmrg
7530b9b4fd27Smrg    uts4*)
7531b9b4fd27Smrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7532b9b4fd27Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7533b9b4fd27Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7534b9b4fd27Smrg      ;;
7535caade7ccSmrg
7536b9b4fd27Smrg    *)
7537b9b4fd27Smrg      _LT_TAGVAR(ld_shlibs, $1)=no
7538b9b4fd27Smrg      ;;
7539b9b4fd27Smrg    esac
7540caade7ccSmrg
7541b9b4fd27Smrg    if test x$host_vendor = xsni; then
7542b9b4fd27Smrg      case $host in
7543b9b4fd27Smrg      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
7544b9b4fd27Smrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
7545b9b4fd27Smrg	;;
7546b9b4fd27Smrg      esac
7547b9b4fd27Smrg    fi
7548caade7ccSmrg  fi
7549b9b4fd27Smrg])
7550b9b4fd27SmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
7551b9b4fd27Smrgtest "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
7552caade7ccSmrg
7553b9b4fd27Smrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
7554caade7ccSmrg
7555b9b4fd27Smrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
7556b9b4fd27Smrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
7557b9b4fd27Smrg_LT_DECL([], [extract_expsyms_cmds], [2],
7558b9b4fd27Smrg    [The commands to extract the exported symbol list from a shared archive])
7559caade7ccSmrg
7560b9b4fd27Smrg#
7561b9b4fd27Smrg# Do we need to explicitly link libc?
7562b9b4fd27Smrg#
7563b9b4fd27Smrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
7564b9b4fd27Smrgx|xyes)
7565b9b4fd27Smrg  # Assume -lc should be added
7566b9b4fd27Smrg  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
7567caade7ccSmrg
7568b9b4fd27Smrg  if test "$enable_shared" = yes && test "$GCC" = yes; then
7569b9b4fd27Smrg    case $_LT_TAGVAR(archive_cmds, $1) in
7570b9b4fd27Smrg    *'~'*)
7571b9b4fd27Smrg      # FIXME: we may have to deal with multi-command sequences.
7572b9b4fd27Smrg      ;;
7573b9b4fd27Smrg    '$CC '*)
7574b9b4fd27Smrg      # Test whether the compiler implicitly links with -lc since on some
7575b9b4fd27Smrg      # systems, -lgcc has to come before -lc. If gcc already passes -lc
7576b9b4fd27Smrg      # to ld, don't add -lc before -lgcc.
7577e8a5466aSmrg      AC_CACHE_CHECK([whether -lc should be explicitly linked in],
7578e8a5466aSmrg	[lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
7579e8a5466aSmrg	[$RM conftest*
7580e8a5466aSmrg	echo "$lt_simple_compile_test_code" > conftest.$ac_ext
7581e8a5466aSmrg
7582e8a5466aSmrg	if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
7583e8a5466aSmrg	  soname=conftest
7584e8a5466aSmrg	  lib=conftest
7585e8a5466aSmrg	  libobjs=conftest.$ac_objext
7586e8a5466aSmrg	  deplibs=
7587e8a5466aSmrg	  wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
7588e8a5466aSmrg	  pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
7589e8a5466aSmrg	  compiler_flags=-v
7590e8a5466aSmrg	  linker_flags=-v
7591e8a5466aSmrg	  verstring=
7592e8a5466aSmrg	  output_objdir=.
7593e8a5466aSmrg	  libname=conftest
7594e8a5466aSmrg	  lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
7595e8a5466aSmrg	  _LT_TAGVAR(allow_undefined_flag, $1)=
7596e8a5466aSmrg	  if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
7597e8a5466aSmrg	  then
7598e8a5466aSmrg	    lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
7599e8a5466aSmrg	  else
7600e8a5466aSmrg	    lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
7601e8a5466aSmrg	  fi
7602e8a5466aSmrg	  _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
7603e8a5466aSmrg	else
7604e8a5466aSmrg	  cat conftest.err 1>&5
7605e8a5466aSmrg	fi
7606e8a5466aSmrg	$RM conftest*
7607e8a5466aSmrg	])
7608e8a5466aSmrg      _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
7609b9b4fd27Smrg      ;;
7610b9b4fd27Smrg    esac
7611caade7ccSmrg  fi
7612caade7ccSmrg  ;;
7613caade7ccSmrgesac
7614caade7ccSmrg
7615b9b4fd27Smrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
7616b9b4fd27Smrg    [Whether or not to add -lc for building shared libraries])
7617b9b4fd27Smrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
7618b9b4fd27Smrg    [enable_shared_with_static_runtimes], [0],
7619b9b4fd27Smrg    [Whether or not to disallow shared libs when runtime libs are static])
7620b9b4fd27Smrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1],
7621b9b4fd27Smrg    [Compiler flag to allow reflexive dlopens])
7622b9b4fd27Smrg_LT_TAGDECL([], [whole_archive_flag_spec], [1],
7623b9b4fd27Smrg    [Compiler flag to generate shared objects directly from archives])
7624b9b4fd27Smrg_LT_TAGDECL([], [compiler_needs_object], [1],
7625b9b4fd27Smrg    [Whether the compiler copes with passing no objects directly])
7626b9b4fd27Smrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2],
7627b9b4fd27Smrg    [Create an old-style archive from a shared archive])
7628b9b4fd27Smrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
7629b9b4fd27Smrg    [Create a temporary old-style archive to link instead of a shared archive])
7630b9b4fd27Smrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
7631b9b4fd27Smrg_LT_TAGDECL([], [archive_expsym_cmds], [2])
7632b9b4fd27Smrg_LT_TAGDECL([], [module_cmds], [2],
7633b9b4fd27Smrg    [Commands used to build a loadable module if different from building
7634b9b4fd27Smrg    a shared archive.])
7635b9b4fd27Smrg_LT_TAGDECL([], [module_expsym_cmds], [2])
7636b9b4fd27Smrg_LT_TAGDECL([], [with_gnu_ld], [1],
7637b9b4fd27Smrg    [Whether we are building with GNU ld or not])
7638b9b4fd27Smrg_LT_TAGDECL([], [allow_undefined_flag], [1],
7639b9b4fd27Smrg    [Flag that allows shared libraries with undefined symbols to be built])
7640b9b4fd27Smrg_LT_TAGDECL([], [no_undefined_flag], [1],
7641b9b4fd27Smrg    [Flag that enforces no undefined symbols])
7642b9b4fd27Smrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
7643b9b4fd27Smrg    [Flag to hardcode $libdir into a binary during linking.
7644b9b4fd27Smrg    This must work even if $libdir does not exist])
7645b9b4fd27Smrg_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1],
7646b9b4fd27Smrg    [[If ld is used when linking, flag to hardcode $libdir into a binary
7647b9b4fd27Smrg    during linking.  This must work even if $libdir does not exist]])
7648b9b4fd27Smrg_LT_TAGDECL([], [hardcode_libdir_separator], [1],
7649b9b4fd27Smrg    [Whether we need a single "-rpath" flag with a separated argument])
7650b9b4fd27Smrg_LT_TAGDECL([], [hardcode_direct], [0],
7651b9b4fd27Smrg    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
7652b9b4fd27Smrg    DIR into the resulting binary])
7653b9b4fd27Smrg_LT_TAGDECL([], [hardcode_direct_absolute], [0],
7654b9b4fd27Smrg    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
7655b9b4fd27Smrg    DIR into the resulting binary and the resulting library dependency is
7656b9b4fd27Smrg    "absolute", i.e impossible to change by setting ${shlibpath_var} if the
7657b9b4fd27Smrg    library is relocated])
7658b9b4fd27Smrg_LT_TAGDECL([], [hardcode_minus_L], [0],
7659b9b4fd27Smrg    [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
7660b9b4fd27Smrg    into the resulting binary])
7661b9b4fd27Smrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0],
7662b9b4fd27Smrg    [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
7663b9b4fd27Smrg    into the resulting binary])
7664b9b4fd27Smrg_LT_TAGDECL([], [hardcode_automatic], [0],
7665b9b4fd27Smrg    [Set to "yes" if building a shared library automatically hardcodes DIR
7666b9b4fd27Smrg    into the library and all subsequent libraries and executables linked
7667b9b4fd27Smrg    against it])
7668b9b4fd27Smrg_LT_TAGDECL([], [inherit_rpath], [0],
7669b9b4fd27Smrg    [Set to yes if linker adds runtime paths of dependent libraries
7670b9b4fd27Smrg    to runtime path list])
7671b9b4fd27Smrg_LT_TAGDECL([], [link_all_deplibs], [0],
7672b9b4fd27Smrg    [Whether libtool must link a program against all its dependency libraries])
7673b9b4fd27Smrg_LT_TAGDECL([], [fix_srcfile_path], [1],
7674b9b4fd27Smrg    [Fix the shell variable $srcfile for the compiler])
7675b9b4fd27Smrg_LT_TAGDECL([], [always_export_symbols], [0],
7676b9b4fd27Smrg    [Set to "yes" if exported symbols are required])
7677b9b4fd27Smrg_LT_TAGDECL([], [export_symbols_cmds], [2],
7678b9b4fd27Smrg    [The commands to list exported symbols])
7679b9b4fd27Smrg_LT_TAGDECL([], [exclude_expsyms], [1],
7680b9b4fd27Smrg    [Symbols that should not be listed in the preloaded symbols])
7681b9b4fd27Smrg_LT_TAGDECL([], [include_expsyms], [1],
7682b9b4fd27Smrg    [Symbols that must always be exported])
7683b9b4fd27Smrg_LT_TAGDECL([], [prelink_cmds], [2],
7684b9b4fd27Smrg    [Commands necessary for linking programs (against libraries) with templates])
7685b9b4fd27Smrg_LT_TAGDECL([], [file_list_spec], [1],
7686b9b4fd27Smrg    [Specify filename containing input files])
7687b9b4fd27Smrgdnl FIXME: Not yet implemented
7688b9b4fd27Smrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
7689b9b4fd27Smrgdnl    [Compiler flag to generate thread safe objects])
7690b9b4fd27Smrg])# _LT_LINKER_SHLIBS
7691b9b4fd27Smrg
7692b9b4fd27Smrg
7693b9b4fd27Smrg# _LT_LANG_C_CONFIG([TAG])
7694b9b4fd27Smrg# ------------------------
7695b9b4fd27Smrg# Ensure that the configuration variables for a C compiler are suitably
7696b9b4fd27Smrg# defined.  These variables are subsequently used by _LT_CONFIG to write
7697b9b4fd27Smrg# the compiler configuration to `libtool'.
7698b9b4fd27Smrgm4_defun([_LT_LANG_C_CONFIG],
7699b9b4fd27Smrg[m4_require([_LT_DECL_EGREP])dnl
7700b9b4fd27Smrglt_save_CC="$CC"
7701b9b4fd27SmrgAC_LANG_PUSH(C)
7702b9b4fd27Smrg
7703b9b4fd27Smrg# Source file extension for C test sources.
7704b9b4fd27Smrgac_ext=c
7705b9b4fd27Smrg
7706b9b4fd27Smrg# Object file extension for compiled C test sources.
7707b9b4fd27Smrgobjext=o
7708b9b4fd27Smrg_LT_TAGVAR(objext, $1)=$objext
7709caade7ccSmrg
7710b9b4fd27Smrg# Code to be used in simple compile tests
7711b9b4fd27Smrglt_simple_compile_test_code="int some_variable = 0;"
7712caade7ccSmrg
7713b9b4fd27Smrg# Code to be used in simple link tests
7714b9b4fd27Smrglt_simple_link_test_code='int main(){return(0);}'
7715caade7ccSmrg
7716b9b4fd27Smrg_LT_TAG_COMPILER
7717b9b4fd27Smrg# Save the default compiler, since it gets overwritten when the other
7718b9b4fd27Smrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
7719b9b4fd27Smrgcompiler_DEFAULT=$CC
7720caade7ccSmrg
7721b9b4fd27Smrg# save warnings/boilerplate of simple test code
7722b9b4fd27Smrg_LT_COMPILER_BOILERPLATE
7723b9b4fd27Smrg_LT_LINKER_BOILERPLATE
7724caade7ccSmrg
7725b9b4fd27Smrgif test -n "$compiler"; then
7726b9b4fd27Smrg  _LT_COMPILER_NO_RTTI($1)
7727b9b4fd27Smrg  _LT_COMPILER_PIC($1)
7728b9b4fd27Smrg  _LT_COMPILER_C_O($1)
7729b9b4fd27Smrg  _LT_COMPILER_FILE_LOCKS($1)
7730b9b4fd27Smrg  _LT_LINKER_SHLIBS($1)
7731b9b4fd27Smrg  _LT_SYS_DYNAMIC_LINKER($1)
7732b9b4fd27Smrg  _LT_LINKER_HARDCODE_LIBPATH($1)
7733b9b4fd27Smrg  LT_SYS_DLOPEN_SELF
7734b9b4fd27Smrg  _LT_CMD_STRIPLIB
7735b9b4fd27Smrg
7736b9b4fd27Smrg  # Report which library types will actually be built
7737b9b4fd27Smrg  AC_MSG_CHECKING([if libtool supports shared libraries])
7738b9b4fd27Smrg  AC_MSG_RESULT([$can_build_shared])
7739b9b4fd27Smrg
7740b9b4fd27Smrg  AC_MSG_CHECKING([whether to build shared libraries])
7741b9b4fd27Smrg  test "$can_build_shared" = "no" && enable_shared=no
7742b9b4fd27Smrg
7743b9b4fd27Smrg  # On AIX, shared libraries and static libraries use the same namespace, and
7744b9b4fd27Smrg  # are all built from PIC.
7745b9b4fd27Smrg  case $host_os in
7746b9b4fd27Smrg  aix3*)
7747b9b4fd27Smrg    test "$enable_shared" = yes && enable_static=no
7748b9b4fd27Smrg    if test -n "$RANLIB"; then
7749b9b4fd27Smrg      archive_cmds="$archive_cmds~\$RANLIB \$lib"
7750b9b4fd27Smrg      postinstall_cmds='$RANLIB $lib'
7751b9b4fd27Smrg    fi
7752b9b4fd27Smrg    ;;
7753caade7ccSmrg
7754b9b4fd27Smrg  aix[[4-9]]*)
7755b9b4fd27Smrg    if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
7756b9b4fd27Smrg      test "$enable_shared" = yes && enable_static=no
7757b9b4fd27Smrg    fi
7758b9b4fd27Smrg    ;;
7759b9b4fd27Smrg  esac
7760b9b4fd27Smrg  AC_MSG_RESULT([$enable_shared])
7761caade7ccSmrg
7762b9b4fd27Smrg  AC_MSG_CHECKING([whether to build static libraries])
7763b9b4fd27Smrg  # Make sure either enable_shared or enable_static is yes.
7764b9b4fd27Smrg  test "$enable_shared" = yes || enable_static=yes
7765b9b4fd27Smrg  AC_MSG_RESULT([$enable_static])
7766caade7ccSmrg
7767b9b4fd27Smrg  _LT_CONFIG($1)
7768b9b4fd27Smrgfi
7769b9b4fd27SmrgAC_LANG_POP
7770b9b4fd27SmrgCC="$lt_save_CC"
7771b9b4fd27Smrg])# _LT_LANG_C_CONFIG
7772caade7ccSmrg
7773caade7ccSmrg
7774b9b4fd27Smrg# _LT_LANG_CXX_CONFIG([TAG])
7775b9b4fd27Smrg# --------------------------
7776b9b4fd27Smrg# Ensure that the configuration variables for a C++ compiler are suitably
7777b9b4fd27Smrg# defined.  These variables are subsequently used by _LT_CONFIG to write
7778b9b4fd27Smrg# the compiler configuration to `libtool'.
7779b9b4fd27Smrgm4_defun([_LT_LANG_CXX_CONFIG],
7780e8a5466aSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
7781b9b4fd27Smrgm4_require([_LT_DECL_EGREP])dnl
7782e8a5466aSmrgif test -n "$CXX" && ( test "X$CXX" != "Xno" &&
7783e8a5466aSmrg    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
7784e8a5466aSmrg    (test "X$CXX" != "Xg++"))) ; then
7785e8a5466aSmrg  AC_PROG_CXXCPP
7786e8a5466aSmrgelse
7787e8a5466aSmrg  _lt_caught_CXX_error=yes
7788e8a5466aSmrgfi
7789b9b4fd27Smrg
7790b9b4fd27SmrgAC_LANG_PUSH(C++)
7791b9b4fd27Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
7792b9b4fd27Smrg_LT_TAGVAR(allow_undefined_flag, $1)=
7793b9b4fd27Smrg_LT_TAGVAR(always_export_symbols, $1)=no
7794b9b4fd27Smrg_LT_TAGVAR(archive_expsym_cmds, $1)=
7795b9b4fd27Smrg_LT_TAGVAR(compiler_needs_object, $1)=no
7796b9b4fd27Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)=
7797b9b4fd27Smrg_LT_TAGVAR(hardcode_direct, $1)=no
7798b9b4fd27Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no
7799b9b4fd27Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
7800b9b4fd27Smrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
7801b9b4fd27Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)=
7802b9b4fd27Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no
7803b9b4fd27Smrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
7804b9b4fd27Smrg_LT_TAGVAR(hardcode_automatic, $1)=no
7805b9b4fd27Smrg_LT_TAGVAR(inherit_rpath, $1)=no
7806b9b4fd27Smrg_LT_TAGVAR(module_cmds, $1)=
7807b9b4fd27Smrg_LT_TAGVAR(module_expsym_cmds, $1)=
7808b9b4fd27Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown
7809b9b4fd27Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7810e8a5466aSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag
7811e8a5466aSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
7812b9b4fd27Smrg_LT_TAGVAR(no_undefined_flag, $1)=
7813b9b4fd27Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)=
7814b9b4fd27Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
7815b9b4fd27Smrg
7816b9b4fd27Smrg# Source file extension for C++ test sources.
7817b9b4fd27Smrgac_ext=cpp
7818b9b4fd27Smrg
7819b9b4fd27Smrg# Object file extension for compiled C++ test sources.
7820b9b4fd27Smrgobjext=o
7821b9b4fd27Smrg_LT_TAGVAR(objext, $1)=$objext
7822b9b4fd27Smrg
7823b9b4fd27Smrg# No sense in running all these tests if we already determined that
7824b9b4fd27Smrg# the CXX compiler isn't working.  Some variables (like enable_shared)
7825b9b4fd27Smrg# are currently assumed to apply to all compilers on this platform,
7826b9b4fd27Smrg# and will be corrupted by setting them based on a non-working compiler.
7827b9b4fd27Smrgif test "$_lt_caught_CXX_error" != yes; then
7828b9b4fd27Smrg  # Code to be used in simple compile tests
7829b9b4fd27Smrg  lt_simple_compile_test_code="int some_variable = 0;"
7830b9b4fd27Smrg
7831b9b4fd27Smrg  # Code to be used in simple link tests
7832b9b4fd27Smrg  lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
7833b9b4fd27Smrg
7834b9b4fd27Smrg  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7835b9b4fd27Smrg  _LT_TAG_COMPILER
7836b9b4fd27Smrg
7837b9b4fd27Smrg  # save warnings/boilerplate of simple test code
7838b9b4fd27Smrg  _LT_COMPILER_BOILERPLATE
7839b9b4fd27Smrg  _LT_LINKER_BOILERPLATE
7840b9b4fd27Smrg
7841b9b4fd27Smrg  # Allow CC to be a program name with arguments.
7842b9b4fd27Smrg  lt_save_CC=$CC
7843b9b4fd27Smrg  lt_save_LD=$LD
7844b9b4fd27Smrg  lt_save_GCC=$GCC
7845b9b4fd27Smrg  GCC=$GXX
7846b9b4fd27Smrg  lt_save_with_gnu_ld=$with_gnu_ld
7847b9b4fd27Smrg  lt_save_path_LD=$lt_cv_path_LD
7848b9b4fd27Smrg  if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
7849b9b4fd27Smrg    lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
7850caade7ccSmrg  else
7851b9b4fd27Smrg    $as_unset lt_cv_prog_gnu_ld
7852caade7ccSmrg  fi
7853b9b4fd27Smrg  if test -n "${lt_cv_path_LDCXX+set}"; then
7854b9b4fd27Smrg    lt_cv_path_LD=$lt_cv_path_LDCXX
7855caade7ccSmrg  else
7856b9b4fd27Smrg    $as_unset lt_cv_path_LD
7857caade7ccSmrg  fi
7858b9b4fd27Smrg  test -z "${LDCXX+set}" || LD=$LDCXX
7859b9b4fd27Smrg  CC=${CXX-"c++"}
7860b9b4fd27Smrg  compiler=$CC
7861b9b4fd27Smrg  _LT_TAGVAR(compiler, $1)=$CC
7862b9b4fd27Smrg  _LT_CC_BASENAME([$compiler])
7863b9b4fd27Smrg
7864b9b4fd27Smrg  if test -n "$compiler"; then
7865b9b4fd27Smrg    # We don't want -fno-exception when compiling C++ code, so set the
7866b9b4fd27Smrg    # no_builtin_flag separately
7867b9b4fd27Smrg    if test "$GXX" = yes; then
7868b9b4fd27Smrg      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
7869b9b4fd27Smrg    else
7870b9b4fd27Smrg      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
7871b9b4fd27Smrg    fi
7872caade7ccSmrg
7873b9b4fd27Smrg    if test "$GXX" = yes; then
7874b9b4fd27Smrg      # Set up default GNU C++ configuration
7875caade7ccSmrg
7876b9b4fd27Smrg      LT_PATH_LD
7877caade7ccSmrg
7878b9b4fd27Smrg      # Check if GNU C++ uses GNU ld as the underlying linker, since the
7879b9b4fd27Smrg      # archiving commands below assume that GNU ld is being used.
7880b9b4fd27Smrg      if test "$with_gnu_ld" = yes; then
7881b9b4fd27Smrg        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
7882b9b4fd27Smrg        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
7883caade7ccSmrg
7884b9b4fd27Smrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7885b9b4fd27Smrg        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7886b9b4fd27Smrg
7887b9b4fd27Smrg        # If archive_cmds runs LD, not CC, wlarc should be empty
7888b9b4fd27Smrg        # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
7889b9b4fd27Smrg        #     investigate it a little bit more. (MM)
7890b9b4fd27Smrg        wlarc='${wl}'
7891b9b4fd27Smrg
7892b9b4fd27Smrg        # ancient GNU ld didn't support --whole-archive et. al.
7893b9b4fd27Smrg        if eval "`$CC -print-prog-name=ld` --help 2>&1" |
7894b9b4fd27Smrg	  $GREP 'no-whole-archive' > /dev/null; then
7895b9b4fd27Smrg          _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
7896b9b4fd27Smrg        else
7897b9b4fd27Smrg          _LT_TAGVAR(whole_archive_flag_spec, $1)=
7898b9b4fd27Smrg        fi
7899b9b4fd27Smrg      else
7900b9b4fd27Smrg        with_gnu_ld=no
7901b9b4fd27Smrg        wlarc=
7902b9b4fd27Smrg
7903b9b4fd27Smrg        # A generic and very simple default shared library creation
7904b9b4fd27Smrg        # command for GNU C++ for the case where it uses the native
7905b9b4fd27Smrg        # linker, instead of GNU ld.  If possible, this setting should
7906b9b4fd27Smrg        # overridden to take advantage of the native linker features on
7907b9b4fd27Smrg        # the platform it is being used on.
7908b9b4fd27Smrg        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
7909caade7ccSmrg      fi
7910b9b4fd27Smrg
7911b9b4fd27Smrg      # Commands to make compiler produce verbose output that lists
7912b9b4fd27Smrg      # what "hidden" libraries, object files and flags are used when
7913b9b4fd27Smrg      # linking a shared library.
7914e8a5466aSmrg      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
7915b9b4fd27Smrg
7916b9b4fd27Smrg    else
7917b9b4fd27Smrg      GXX=no
7918b9b4fd27Smrg      with_gnu_ld=no
7919b9b4fd27Smrg      wlarc=
7920b9b4fd27Smrg    fi
7921b9b4fd27Smrg
7922b9b4fd27Smrg    # PORTME: fill in a description of your system's C++ link characteristics
7923b9b4fd27Smrg    AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
7924b9b4fd27Smrg    _LT_TAGVAR(ld_shlibs, $1)=yes
7925caade7ccSmrg    case $host_os in
7926b9b4fd27Smrg      aix3*)
7927b9b4fd27Smrg        # FIXME: insert proper C++ library support
7928b9b4fd27Smrg        _LT_TAGVAR(ld_shlibs, $1)=no
7929b9b4fd27Smrg        ;;
7930485f0483Smrg      aix[[4-9]]*)
7931b9b4fd27Smrg        if test "$host_cpu" = ia64; then
7932b9b4fd27Smrg          # On IA64, the linker does run time linking by default, so we don't
7933b9b4fd27Smrg          # have to do anything special.
7934b9b4fd27Smrg          aix_use_runtimelinking=no
7935b9b4fd27Smrg          exp_sym_flag='-Bexport'
7936b9b4fd27Smrg          no_entry_flag=""
7937b9b4fd27Smrg        else
7938b9b4fd27Smrg          aix_use_runtimelinking=no
7939b9b4fd27Smrg
7940b9b4fd27Smrg          # Test if we are trying to use run time linking or normal
7941b9b4fd27Smrg          # AIX style linking. If -brtl is somewhere in LDFLAGS, we
7942b9b4fd27Smrg          # need to do runtime linking.
7943b9b4fd27Smrg          case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
7944b9b4fd27Smrg	    for ld_flag in $LDFLAGS; do
7945b9b4fd27Smrg	      case $ld_flag in
7946b9b4fd27Smrg	      *-brtl*)
7947b9b4fd27Smrg	        aix_use_runtimelinking=yes
7948b9b4fd27Smrg	        break
7949b9b4fd27Smrg	        ;;
7950b9b4fd27Smrg	      esac
7951b9b4fd27Smrg	    done
7952b9b4fd27Smrg	    ;;
7953b9b4fd27Smrg          esac
7954b9b4fd27Smrg
7955b9b4fd27Smrg          exp_sym_flag='-bexport'
7956b9b4fd27Smrg          no_entry_flag='-bnoentry'
7957b9b4fd27Smrg        fi
7958b9b4fd27Smrg
7959b9b4fd27Smrg        # When large executables or shared objects are built, AIX ld can
7960b9b4fd27Smrg        # have problems creating the table of contents.  If linking a library
7961b9b4fd27Smrg        # or program results in "error TOC overflow" add -mminimal-toc to
7962b9b4fd27Smrg        # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
7963b9b4fd27Smrg        # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
7964b9b4fd27Smrg
7965b9b4fd27Smrg        _LT_TAGVAR(archive_cmds, $1)=''
7966b9b4fd27Smrg        _LT_TAGVAR(hardcode_direct, $1)=yes
7967b9b4fd27Smrg        _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7968b9b4fd27Smrg        _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
7969b9b4fd27Smrg        _LT_TAGVAR(link_all_deplibs, $1)=yes
7970b9b4fd27Smrg        _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
7971b9b4fd27Smrg
7972b9b4fd27Smrg        if test "$GXX" = yes; then
7973b9b4fd27Smrg          case $host_os in aix4.[[012]]|aix4.[[012]].*)
7974b9b4fd27Smrg          # We only want to do this on AIX 4.2 and lower, the check
7975b9b4fd27Smrg          # below for broken collect2 doesn't work under 4.3+
7976b9b4fd27Smrg	  collect2name=`${CC} -print-prog-name=collect2`
7977b9b4fd27Smrg	  if test -f "$collect2name" &&
7978b9b4fd27Smrg	     strings "$collect2name" | $GREP resolve_lib_name >/dev/null
7979b9b4fd27Smrg	  then
7980b9b4fd27Smrg	    # We have reworked collect2
7981b9b4fd27Smrg	    :
7982b9b4fd27Smrg	  else
7983b9b4fd27Smrg	    # We have old collect2
7984b9b4fd27Smrg	    _LT_TAGVAR(hardcode_direct, $1)=unsupported
7985b9b4fd27Smrg	    # It fails to find uninstalled libraries when the uninstalled
7986b9b4fd27Smrg	    # path is not listed in the libpath.  Setting hardcode_minus_L
7987b9b4fd27Smrg	    # to unsupported forces relinking
7988b9b4fd27Smrg	    _LT_TAGVAR(hardcode_minus_L, $1)=yes
7989b9b4fd27Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7990b9b4fd27Smrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=
7991b9b4fd27Smrg	  fi
7992b9b4fd27Smrg          esac
7993b9b4fd27Smrg          shared_flag='-shared'
7994b9b4fd27Smrg	  if test "$aix_use_runtimelinking" = yes; then
7995b9b4fd27Smrg	    shared_flag="$shared_flag "'${wl}-G'
7996b9b4fd27Smrg	  fi
7997b9b4fd27Smrg        else
7998b9b4fd27Smrg          # not using gcc
7999b9b4fd27Smrg          if test "$host_cpu" = ia64; then
8000b9b4fd27Smrg	  # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
8001b9b4fd27Smrg	  # chokes on -Wl,-G. The following line is correct:
8002b9b4fd27Smrg	  shared_flag='-G'
8003b9b4fd27Smrg          else
8004b9b4fd27Smrg	    if test "$aix_use_runtimelinking" = yes; then
8005b9b4fd27Smrg	      shared_flag='${wl}-G'
8006b9b4fd27Smrg	    else
8007b9b4fd27Smrg	      shared_flag='${wl}-bM:SRE'
8008b9b4fd27Smrg	    fi
8009b9b4fd27Smrg          fi
8010b9b4fd27Smrg        fi
8011b9b4fd27Smrg
8012b9b4fd27Smrg        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
8013b9b4fd27Smrg        # It seems that -bexpall does not export symbols beginning with
8014b9b4fd27Smrg        # underscore (_), so it is better to generate a list of symbols to
8015b9b4fd27Smrg	# export.
8016b9b4fd27Smrg        _LT_TAGVAR(always_export_symbols, $1)=yes
8017b9b4fd27Smrg        if test "$aix_use_runtimelinking" = yes; then
8018b9b4fd27Smrg          # Warning - without using the other runtime loading flags (-brtl),
8019b9b4fd27Smrg          # -berok will link without error, but may produce a broken library.
8020b9b4fd27Smrg          _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
8021b9b4fd27Smrg          # Determine the default libpath from the value encoded in an empty
8022b9b4fd27Smrg          # executable.
8023b9b4fd27Smrg          _LT_SYS_MODULE_PATH_AIX
8024b9b4fd27Smrg          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
8025b9b4fd27Smrg
8026e8a5466aSmrg          _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"
8027b9b4fd27Smrg        else
8028b9b4fd27Smrg          if test "$host_cpu" = ia64; then
8029b9b4fd27Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
8030b9b4fd27Smrg	    _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
8031b9b4fd27Smrg	    _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"
8032b9b4fd27Smrg          else
8033b9b4fd27Smrg	    # Determine the default libpath from the value encoded in an
8034b9b4fd27Smrg	    # empty executable.
8035b9b4fd27Smrg	    _LT_SYS_MODULE_PATH_AIX
8036b9b4fd27Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
8037b9b4fd27Smrg	    # Warning - without using the other run time loading flags,
8038b9b4fd27Smrg	    # -berok will link without error, but may produce a broken library.
8039b9b4fd27Smrg	    _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
8040b9b4fd27Smrg	    _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
8041e8a5466aSmrg	    if test "$with_gnu_ld" = yes; then
8042e8a5466aSmrg	      # We only use this code for GNU lds that support --whole-archive.
8043e8a5466aSmrg	      _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
8044e8a5466aSmrg	    else
8045e8a5466aSmrg	      # Exported symbols can be pulled into shared objects from archives
8046e8a5466aSmrg	      _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
8047e8a5466aSmrg	    fi
8048b9b4fd27Smrg	    _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
8049b9b4fd27Smrg	    # This is similar to how AIX traditionally builds its shared
8050b9b4fd27Smrg	    # libraries.
8051b9b4fd27Smrg	    _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'
8052b9b4fd27Smrg          fi
8053b9b4fd27Smrg        fi
8054b9b4fd27Smrg        ;;
8055b9b4fd27Smrg
8056b9b4fd27Smrg      beos*)
8057b9b4fd27Smrg	if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
8058b9b4fd27Smrg	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
8059b9b4fd27Smrg	  # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
8060b9b4fd27Smrg	  # support --undefined.  This deserves some investigation.  FIXME
8061b9b4fd27Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8062caade7ccSmrg	else
8063b9b4fd27Smrg	  _LT_TAGVAR(ld_shlibs, $1)=no
8064caade7ccSmrg	fi
8065caade7ccSmrg	;;
8066b9b4fd27Smrg
8067caade7ccSmrg      chorus*)
8068b9b4fd27Smrg        case $cc_basename in
8069b9b4fd27Smrg          *)
8070b9b4fd27Smrg	  # FIXME: insert proper C++ library support
8071b9b4fd27Smrg	  _LT_TAGVAR(ld_shlibs, $1)=no
8072caade7ccSmrg	  ;;
8073b9b4fd27Smrg        esac
8074b9b4fd27Smrg        ;;
8075b9b4fd27Smrg
8076b9b4fd27Smrg      cygwin* | mingw* | pw32* | cegcc*)
8077b9b4fd27Smrg        # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
8078b9b4fd27Smrg        # as there is no search path for DLLs.
8079b9b4fd27Smrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
8080e8a5466aSmrg        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
8081b9b4fd27Smrg        _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
8082b9b4fd27Smrg        _LT_TAGVAR(always_export_symbols, $1)=no
8083b9b4fd27Smrg        _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
8084b9b4fd27Smrg
8085b9b4fd27Smrg        if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
8086b9b4fd27Smrg          _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'
8087b9b4fd27Smrg          # If the export-symbols file already is a .def file (1st line
8088b9b4fd27Smrg          # is EXPORTS), use it as is; otherwise, prepend...
8089b9b4fd27Smrg          _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
8090b9b4fd27Smrg	    cp $export_symbols $output_objdir/$soname.def;
8091b9b4fd27Smrg          else
8092b9b4fd27Smrg	    echo EXPORTS > $output_objdir/$soname.def;
8093b9b4fd27Smrg	    cat $export_symbols >> $output_objdir/$soname.def;
8094b9b4fd27Smrg          fi~
8095b9b4fd27Smrg          $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'
8096b9b4fd27Smrg        else
8097b9b4fd27Smrg          _LT_TAGVAR(ld_shlibs, $1)=no
8098b9b4fd27Smrg        fi
8099b9b4fd27Smrg        ;;
8100b9b4fd27Smrg      darwin* | rhapsody*)
8101b9b4fd27Smrg        _LT_DARWIN_LINKER_FEATURES($1)
8102caade7ccSmrg	;;
8103b9b4fd27Smrg
8104caade7ccSmrg      dgux*)
8105b9b4fd27Smrg        case $cc_basename in
8106b9b4fd27Smrg          ec++*)
8107b9b4fd27Smrg	    # FIXME: insert proper C++ library support
8108b9b4fd27Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
8109caade7ccSmrg	    ;;
8110b9b4fd27Smrg          ghcx*)
8111caade7ccSmrg	    # Green Hills C++ Compiler
8112b9b4fd27Smrg	    # FIXME: insert proper C++ library support
8113b9b4fd27Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
8114caade7ccSmrg	    ;;
8115b9b4fd27Smrg          *)
8116b9b4fd27Smrg	    # FIXME: insert proper C++ library support
8117b9b4fd27Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
8118caade7ccSmrg	    ;;
8119b9b4fd27Smrg        esac
8120b9b4fd27Smrg        ;;
8121b9b4fd27Smrg
8122b9b4fd27Smrg      freebsd[[12]]*)
8123b9b4fd27Smrg        # C++ shared libraries reported to be fairly broken before
8124b9b4fd27Smrg	# switch to ELF
8125b9b4fd27Smrg        _LT_TAGVAR(ld_shlibs, $1)=no
8126b9b4fd27Smrg        ;;
8127b9b4fd27Smrg
8128b9b4fd27Smrg      freebsd-elf*)
8129b9b4fd27Smrg        _LT_TAGVAR(archive_cmds_need_lc, $1)=no
8130b9b4fd27Smrg        ;;
8131b9b4fd27Smrg
8132b9b4fd27Smrg      freebsd* | dragonfly*)
8133b9b4fd27Smrg        # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
8134b9b4fd27Smrg        # conventions
8135b9b4fd27Smrg        _LT_TAGVAR(ld_shlibs, $1)=yes
8136b9b4fd27Smrg        ;;
8137b9b4fd27Smrg
8138b9b4fd27Smrg      gnu*)
8139b9b4fd27Smrg        ;;
8140b9b4fd27Smrg
8141e8a5466aSmrg      haiku*)
8142e8a5466aSmrg        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8143e8a5466aSmrg        _LT_TAGVAR(link_all_deplibs, $1)=yes
8144e8a5466aSmrg        ;;
8145e8a5466aSmrg
8146b9b4fd27Smrg      hpux9*)
8147b9b4fd27Smrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
8148b9b4fd27Smrg        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
8149b9b4fd27Smrg        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
8150b9b4fd27Smrg        _LT_TAGVAR(hardcode_direct, $1)=yes
8151b9b4fd27Smrg        _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
8152b9b4fd27Smrg				             # but as the default
8153b9b4fd27Smrg				             # location of the library.
8154b9b4fd27Smrg
8155b9b4fd27Smrg        case $cc_basename in
8156b9b4fd27Smrg          CC*)
8157b9b4fd27Smrg            # FIXME: insert proper C++ library support
8158b9b4fd27Smrg            _LT_TAGVAR(ld_shlibs, $1)=no
8159b9b4fd27Smrg            ;;
8160b9b4fd27Smrg          aCC*)
8161b9b4fd27Smrg            _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'
8162b9b4fd27Smrg            # Commands to make compiler produce verbose output that lists
8163b9b4fd27Smrg            # what "hidden" libraries, object files and flags are used when
8164b9b4fd27Smrg            # linking a shared library.
8165b9b4fd27Smrg            #
8166b9b4fd27Smrg            # There doesn't appear to be a way to prevent this compiler from
8167b9b4fd27Smrg            # explicitly linking system object files so we need to strip them
8168b9b4fd27Smrg            # from the output so that they don't get included in the library
8169b9b4fd27Smrg            # dependencies.
8170e8a5466aSmrg            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"'
8171b9b4fd27Smrg            ;;
8172b9b4fd27Smrg          *)
8173b9b4fd27Smrg            if test "$GXX" = yes; then
8174b9b4fd27Smrg              _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
8175b9b4fd27Smrg            else
8176b9b4fd27Smrg              # FIXME: insert proper C++ library support
8177b9b4fd27Smrg              _LT_TAGVAR(ld_shlibs, $1)=no
8178b9b4fd27Smrg            fi
8179b9b4fd27Smrg            ;;
8180b9b4fd27Smrg        esac
8181b9b4fd27Smrg        ;;
8182b9b4fd27Smrg
8183b9b4fd27Smrg      hpux10*|hpux11*)
8184b9b4fd27Smrg        if test $with_gnu_ld = no; then
8185b9b4fd27Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
8186b9b4fd27Smrg	  _LT_TAGVAR(hardcode_libdir_separator, $1)=:
8187b9b4fd27Smrg
8188b9b4fd27Smrg          case $host_cpu in
8189b9b4fd27Smrg            hppa*64*|ia64*)
8190b9b4fd27Smrg              ;;
8191b9b4fd27Smrg            *)
8192b9b4fd27Smrg	      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
8193b9b4fd27Smrg              ;;
8194b9b4fd27Smrg          esac
8195b9b4fd27Smrg        fi
8196b9b4fd27Smrg        case $host_cpu in
8197b9b4fd27Smrg          hppa*64*|ia64*)
8198b9b4fd27Smrg            _LT_TAGVAR(hardcode_direct, $1)=no
8199b9b4fd27Smrg            _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8200b9b4fd27Smrg            ;;
8201b9b4fd27Smrg          *)
8202b9b4fd27Smrg            _LT_TAGVAR(hardcode_direct, $1)=yes
8203b9b4fd27Smrg            _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
8204b9b4fd27Smrg            _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
8205b9b4fd27Smrg					         # but as the default
8206b9b4fd27Smrg					         # location of the library.
8207b9b4fd27Smrg            ;;
8208b9b4fd27Smrg        esac
8209b9b4fd27Smrg
8210b9b4fd27Smrg        case $cc_basename in
8211b9b4fd27Smrg          CC*)
8212b9b4fd27Smrg	    # FIXME: insert proper C++ library support
8213b9b4fd27Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
8214caade7ccSmrg	    ;;
8215b9b4fd27Smrg          aCC*)
8216caade7ccSmrg	    case $host_cpu in
8217b9b4fd27Smrg	      hppa*64*)
8218b9b4fd27Smrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
8219b9b4fd27Smrg	        ;;
8220b9b4fd27Smrg	      ia64*)
8221b9b4fd27Smrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
8222b9b4fd27Smrg	        ;;
8223b9b4fd27Smrg	      *)
8224b9b4fd27Smrg	        _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'
8225b9b4fd27Smrg	        ;;
8226caade7ccSmrg	    esac
8227b9b4fd27Smrg	    # Commands to make compiler produce verbose output that lists
8228b9b4fd27Smrg	    # what "hidden" libraries, object files and flags are used when
8229b9b4fd27Smrg	    # linking a shared library.
8230b9b4fd27Smrg	    #
8231b9b4fd27Smrg	    # There doesn't appear to be a way to prevent this compiler from
8232b9b4fd27Smrg	    # explicitly linking system object files so we need to strip them
8233b9b4fd27Smrg	    # from the output so that they don't get included in the library
8234b9b4fd27Smrg	    # dependencies.
8235e8a5466aSmrg	    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"'
8236caade7ccSmrg	    ;;
8237b9b4fd27Smrg          *)
8238b9b4fd27Smrg	    if test "$GXX" = yes; then
8239b9b4fd27Smrg	      if test $with_gnu_ld = no; then
8240b9b4fd27Smrg	        case $host_cpu in
8241b9b4fd27Smrg	          hppa*64*)
8242b9b4fd27Smrg	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
8243b9b4fd27Smrg	            ;;
8244b9b4fd27Smrg	          ia64*)
8245b9b4fd27Smrg	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
8246b9b4fd27Smrg	            ;;
8247b9b4fd27Smrg	          *)
8248b9b4fd27Smrg	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
8249b9b4fd27Smrg	            ;;
8250b9b4fd27Smrg	        esac
8251b9b4fd27Smrg	      fi
8252b9b4fd27Smrg	    else
8253b9b4fd27Smrg	      # FIXME: insert proper C++ library support
8254b9b4fd27Smrg	      _LT_TAGVAR(ld_shlibs, $1)=no
8255b9b4fd27Smrg	    fi
8256caade7ccSmrg	    ;;
8257b9b4fd27Smrg        esac
8258b9b4fd27Smrg        ;;
8259b9b4fd27Smrg
8260b9b4fd27Smrg      interix[[3-9]]*)
8261b9b4fd27Smrg	_LT_TAGVAR(hardcode_direct, $1)=no
8262b9b4fd27Smrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8263b9b4fd27Smrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
8264b9b4fd27Smrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
8265b9b4fd27Smrg	# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
8266b9b4fd27Smrg	# Instead, shared libraries are loaded at an image base (0x10000000 by
8267b9b4fd27Smrg	# default) and relocated if they conflict, which is a slow very memory
8268b9b4fd27Smrg	# consuming and fragmenting process.  To avoid this, we pick a random,
8269b9b4fd27Smrg	# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
8270b9b4fd27Smrg	# time.  Moving up from 0x10000000 also allows more sbrk(2) space.
8271b9b4fd27Smrg	_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'
8272b9b4fd27Smrg	_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'
8273caade7ccSmrg	;;
8274b9b4fd27Smrg      irix5* | irix6*)
8275b9b4fd27Smrg        case $cc_basename in
8276b9b4fd27Smrg          CC*)
8277b9b4fd27Smrg	    # SGI C++
8278e8a5466aSmrg	    _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'
8279b9b4fd27Smrg
8280b9b4fd27Smrg	    # Archives containing C++ object files must be created using
8281b9b4fd27Smrg	    # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
8282b9b4fd27Smrg	    # necessary to make sure instantiated templates are included
8283b9b4fd27Smrg	    # in the archive.
8284b9b4fd27Smrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
8285caade7ccSmrg	    ;;
8286b9b4fd27Smrg          *)
8287b9b4fd27Smrg	    if test "$GXX" = yes; then
8288b9b4fd27Smrg	      if test "$with_gnu_ld" = no; then
8289e8a5466aSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -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'
8290b9b4fd27Smrg	      else
8291e8a5466aSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -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'
8292b9b4fd27Smrg	      fi
8293b9b4fd27Smrg	    fi
8294b9b4fd27Smrg	    _LT_TAGVAR(link_all_deplibs, $1)=yes
8295caade7ccSmrg	    ;;
8296b9b4fd27Smrg        esac
8297b9b4fd27Smrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
8298b9b4fd27Smrg        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
8299b9b4fd27Smrg        _LT_TAGVAR(inherit_rpath, $1)=yes
8300b9b4fd27Smrg        ;;
8301b9b4fd27Smrg
8302e8a5466aSmrg      linux* | k*bsd*-gnu | kopensolaris*-gnu)
8303b9b4fd27Smrg        case $cc_basename in
8304b9b4fd27Smrg          KCC*)
8305b9b4fd27Smrg	    # Kuck and Associates, Inc. (KAI) C++ Compiler
8306b9b4fd27Smrg
8307b9b4fd27Smrg	    # KCC will only create a shared library if the output file
8308b9b4fd27Smrg	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
8309b9b4fd27Smrg	    # to its proper name (with version) after linking.
8310b9b4fd27Smrg	    _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'
8311b9b4fd27Smrg	    _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'
8312b9b4fd27Smrg	    # Commands to make compiler produce verbose output that lists
8313b9b4fd27Smrg	    # what "hidden" libraries, object files and flags are used when
8314b9b4fd27Smrg	    # linking a shared library.
8315b9b4fd27Smrg	    #
8316b9b4fd27Smrg	    # There doesn't appear to be a way to prevent this compiler from
8317b9b4fd27Smrg	    # explicitly linking system object files so we need to strip them
8318b9b4fd27Smrg	    # from the output so that they don't get included in the library
8319b9b4fd27Smrg	    # dependencies.
8320e8a5466aSmrg	    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"'
8321b9b4fd27Smrg
8322b9b4fd27Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
8323b9b4fd27Smrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
8324b9b4fd27Smrg
8325b9b4fd27Smrg	    # Archives containing C++ object files must be created using
8326b9b4fd27Smrg	    # "CC -Bstatic", where "CC" is the KAI C++ compiler.
8327b9b4fd27Smrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
8328caade7ccSmrg	    ;;
8329b9b4fd27Smrg	  icpc* | ecpc* )
8330caade7ccSmrg	    # Intel C++
8331b9b4fd27Smrg	    with_gnu_ld=yes
8332b9b4fd27Smrg	    # version 8.0 and above of icpc choke on multiply defined symbols
8333b9b4fd27Smrg	    # if we add $predep_objects and $postdep_objects, however 7.1 and
8334b9b4fd27Smrg	    # earlier do not add the objects themselves.
8335b9b4fd27Smrg	    case `$CC -V 2>&1` in
8336b9b4fd27Smrg	      *"Version 7."*)
8337b9b4fd27Smrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
8338b9b4fd27Smrg		_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'
8339b9b4fd27Smrg		;;
8340b9b4fd27Smrg	      *)  # Version 8.0 or newer
8341b9b4fd27Smrg	        tmp_idyn=
8342b9b4fd27Smrg	        case $host_cpu in
8343b9b4fd27Smrg		  ia64*) tmp_idyn=' -i_dynamic';;
8344b9b4fd27Smrg		esac
8345b9b4fd27Smrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8346b9b4fd27Smrg		_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'
8347b9b4fd27Smrg		;;
8348b9b4fd27Smrg	    esac
8349b9b4fd27Smrg	    _LT_TAGVAR(archive_cmds_need_lc, $1)=no
8350b9b4fd27Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
8351b9b4fd27Smrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
8352b9b4fd27Smrg	    _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
8353caade7ccSmrg	    ;;
8354b9b4fd27Smrg          pgCC* | pgcpp*)
8355b9b4fd27Smrg            # Portland Group C++ compiler
8356b9b4fd27Smrg	    case `$CC -V` in
8357e8a5466aSmrg	    *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
8358b9b4fd27Smrg	      _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
8359b9b4fd27Smrg		rm -rf $tpldir~
8360b9b4fd27Smrg		$CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
8361e8a5466aSmrg		compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
8362b9b4fd27Smrg	      _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
8363b9b4fd27Smrg		rm -rf $tpldir~
8364b9b4fd27Smrg		$CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
8365e8a5466aSmrg		$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
8366b9b4fd27Smrg		$RANLIB $oldlib'
8367b9b4fd27Smrg	      _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
8368b9b4fd27Smrg		rm -rf $tpldir~
8369b9b4fd27Smrg		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
8370e8a5466aSmrg		$CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
8371b9b4fd27Smrg	      _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
8372b9b4fd27Smrg		rm -rf $tpldir~
8373b9b4fd27Smrg		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
8374e8a5466aSmrg		$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'
8375b9b4fd27Smrg	      ;;
8376e8a5466aSmrg	    *) # Version 6 and above use weak symbols
8377b9b4fd27Smrg	      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
8378b9b4fd27Smrg	      _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'
8379b9b4fd27Smrg	      ;;
8380b9b4fd27Smrg	    esac
8381b9b4fd27Smrg
8382b9b4fd27Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
8383b9b4fd27Smrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
8384e8a5466aSmrg	    _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'
8385b9b4fd27Smrg            ;;
8386caade7ccSmrg	  cxx*)
8387caade7ccSmrg	    # Compaq C++
8388b9b4fd27Smrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
8389b9b4fd27Smrg	    _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'
8390b9b4fd27Smrg
8391b9b4fd27Smrg	    runpath_var=LD_RUN_PATH
8392b9b4fd27Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
8393b9b4fd27Smrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
8394b9b4fd27Smrg
8395b9b4fd27Smrg	    # Commands to make compiler produce verbose output that lists
8396b9b4fd27Smrg	    # what "hidden" libraries, object files and flags are used when
8397b9b4fd27Smrg	    # linking a shared library.
8398b9b4fd27Smrg	    #
8399b9b4fd27Smrg	    # There doesn't appear to be a way to prevent this compiler from
8400b9b4fd27Smrg	    # explicitly linking system object files so we need to strip them
8401b9b4fd27Smrg	    # from the output so that they don't get included in the library
8402b9b4fd27Smrg	    # dependencies.
8403e8a5466aSmrg	    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'
8404b9b4fd27Smrg	    ;;
8405e8a5466aSmrg	  xl* | mpixl* | bgxl*)
8406b9b4fd27Smrg	    # IBM XL 8.0 on PPC, with GNU ld
8407b9b4fd27Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
8408b9b4fd27Smrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
8409b9b4fd27Smrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8410b9b4fd27Smrg	    if test "x$supports_anon_versioning" = xyes; then
8411b9b4fd27Smrg	      _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
8412b9b4fd27Smrg		cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
8413b9b4fd27Smrg		echo "local: *; };" >> $output_objdir/$libname.ver~
8414b9b4fd27Smrg		$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
8415b9b4fd27Smrg	    fi
8416caade7ccSmrg	    ;;
8417caade7ccSmrg	  *)
8418485f0483Smrg	    case `$CC -V 2>&1 | sed 5q` in
8419485f0483Smrg	    *Sun\ C*)
8420485f0483Smrg	      # Sun C++ 5.9
8421b9b4fd27Smrg	      _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
8422b9b4fd27Smrg	      _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
8423b9b4fd27Smrg	      _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'
8424b9b4fd27Smrg	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
8425e8a5466aSmrg	      _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'
8426b9b4fd27Smrg	      _LT_TAGVAR(compiler_needs_object, $1)=yes
8427b9b4fd27Smrg
8428b9b4fd27Smrg	      # Not sure whether something based on
8429b9b4fd27Smrg	      # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
8430b9b4fd27Smrg	      # would be better.
8431e8a5466aSmrg	      output_verbose_link_cmd='func_echo_all'
8432b9b4fd27Smrg
8433b9b4fd27Smrg	      # Archives containing C++ object files must be created using
8434b9b4fd27Smrg	      # "CC -xar", where "CC" is the Sun C++ compiler.  This is
8435b9b4fd27Smrg	      # necessary to make sure instantiated templates are included
8436b9b4fd27Smrg	      # in the archive.
8437b9b4fd27Smrg	      _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
8438485f0483Smrg	      ;;
8439485f0483Smrg	    esac
8440caade7ccSmrg	    ;;
8441caade7ccSmrg	esac
8442caade7ccSmrg	;;
8443b9b4fd27Smrg
8444caade7ccSmrg      lynxos*)
8445b9b4fd27Smrg        # FIXME: insert proper C++ library support
8446b9b4fd27Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
8447caade7ccSmrg	;;
8448b9b4fd27Smrg
8449caade7ccSmrg      m88k*)
8450b9b4fd27Smrg        # FIXME: insert proper C++ library support
8451b9b4fd27Smrg        _LT_TAGVAR(ld_shlibs, $1)=no
8452caade7ccSmrg	;;
8453b9b4fd27Smrg
8454caade7ccSmrg      mvs*)
8455b9b4fd27Smrg        case $cc_basename in
8456b9b4fd27Smrg          cxx*)
8457b9b4fd27Smrg	    # FIXME: insert proper C++ library support
8458b9b4fd27Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
8459caade7ccSmrg	    ;;
8460caade7ccSmrg	  *)
8461b9b4fd27Smrg	    # FIXME: insert proper C++ library support
8462b9b4fd27Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
8463caade7ccSmrg	    ;;
8464caade7ccSmrg	esac
8465caade7ccSmrg	;;
8466b9b4fd27Smrg
8467caade7ccSmrg      netbsd*)
8468b9b4fd27Smrg        if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
8469b9b4fd27Smrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
8470b9b4fd27Smrg	  wlarc=
8471b9b4fd27Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
8472b9b4fd27Smrg	  _LT_TAGVAR(hardcode_direct, $1)=yes
8473b9b4fd27Smrg	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8474b9b4fd27Smrg	fi
8475b9b4fd27Smrg	# Workaround some broken pre-1.5 toolchains
8476b9b4fd27Smrg	output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
8477b9b4fd27Smrg	;;
8478b9b4fd27Smrg
8479b9b4fd27Smrg      *nto* | *qnx*)
8480b9b4fd27Smrg        _LT_TAGVAR(ld_shlibs, $1)=yes
8481b9b4fd27Smrg	;;
8482b9b4fd27Smrg
8483b9b4fd27Smrg      openbsd2*)
8484b9b4fd27Smrg        # C++ shared libraries are fairly broken
8485b9b4fd27Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
8486b9b4fd27Smrg	;;
8487b9b4fd27Smrg
8488b9b4fd27Smrg      openbsd*)
8489b9b4fd27Smrg	if test -f /usr/libexec/ld.so; then
8490b9b4fd27Smrg	  _LT_TAGVAR(hardcode_direct, $1)=yes
8491b9b4fd27Smrg	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8492b9b4fd27Smrg	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
8493b9b4fd27Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
8494b9b4fd27Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
8495b9b4fd27Smrg	  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
8496b9b4fd27Smrg	    _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'
8497b9b4fd27Smrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
8498b9b4fd27Smrg	    _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
8499b9b4fd27Smrg	  fi
8500e8a5466aSmrg	  output_verbose_link_cmd=func_echo_all
8501b9b4fd27Smrg	else
8502b9b4fd27Smrg	  _LT_TAGVAR(ld_shlibs, $1)=no
8503b9b4fd27Smrg	fi
8504caade7ccSmrg	;;
8505b9b4fd27Smrg
8506caade7ccSmrg      osf3* | osf4* | osf5*)
8507b9b4fd27Smrg        case $cc_basename in
8508b9b4fd27Smrg          KCC*)
8509b9b4fd27Smrg	    # Kuck and Associates, Inc. (KAI) C++ Compiler
8510b9b4fd27Smrg
8511b9b4fd27Smrg	    # KCC will only create a shared library if the output file
8512b9b4fd27Smrg	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
8513b9b4fd27Smrg	    # to its proper name (with version) after linking.
8514b9b4fd27Smrg	    _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'
8515b9b4fd27Smrg
8516b9b4fd27Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
8517b9b4fd27Smrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
8518b9b4fd27Smrg
8519b9b4fd27Smrg	    # Archives containing C++ object files must be created using
8520b9b4fd27Smrg	    # the KAI C++ compiler.
8521b9b4fd27Smrg	    case $host in
8522b9b4fd27Smrg	      osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
8523b9b4fd27Smrg	      *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
8524b9b4fd27Smrg	    esac
8525caade7ccSmrg	    ;;
8526b9b4fd27Smrg          RCC*)
8527caade7ccSmrg	    # Rational C++ 2.4.1
8528b9b4fd27Smrg	    # FIXME: insert proper C++ library support
8529b9b4fd27Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
8530caade7ccSmrg	    ;;
8531b9b4fd27Smrg          cxx*)
8532b9b4fd27Smrg	    case $host in
8533b9b4fd27Smrg	      osf3*)
8534b9b4fd27Smrg	        _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
8535e8a5466aSmrg	        _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'
8536b9b4fd27Smrg	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
8537b9b4fd27Smrg		;;
8538b9b4fd27Smrg	      *)
8539b9b4fd27Smrg	        _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
8540e8a5466aSmrg	        _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'
8541b9b4fd27Smrg	        _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
8542b9b4fd27Smrg	          echo "-hidden">> $lib.exp~
8543e8a5466aSmrg	          $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~
8544b9b4fd27Smrg	          $RM $lib.exp'
8545b9b4fd27Smrg	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
8546b9b4fd27Smrg		;;
8547b9b4fd27Smrg	    esac
8548b9b4fd27Smrg
8549b9b4fd27Smrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
8550b9b4fd27Smrg
8551b9b4fd27Smrg	    # Commands to make compiler produce verbose output that lists
8552b9b4fd27Smrg	    # what "hidden" libraries, object files and flags are used when
8553b9b4fd27Smrg	    # linking a shared library.
8554b9b4fd27Smrg	    #
8555b9b4fd27Smrg	    # There doesn't appear to be a way to prevent this compiler from
8556b9b4fd27Smrg	    # explicitly linking system object files so we need to strip them
8557b9b4fd27Smrg	    # from the output so that they don't get included in the library
8558b9b4fd27Smrg	    # dependencies.
8559e8a5466aSmrg	    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"'
8560caade7ccSmrg	    ;;
8561caade7ccSmrg	  *)
8562b9b4fd27Smrg	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
8563b9b4fd27Smrg	      _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
8564b9b4fd27Smrg	      case $host in
8565b9b4fd27Smrg	        osf3*)
8566e8a5466aSmrg	          _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'
8567b9b4fd27Smrg		  ;;
8568b9b4fd27Smrg	        *)
8569e8a5466aSmrg	          _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
8570b9b4fd27Smrg		  ;;
8571b9b4fd27Smrg	      esac
8572b9b4fd27Smrg
8573b9b4fd27Smrg	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
8574b9b4fd27Smrg	      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
8575b9b4fd27Smrg
8576b9b4fd27Smrg	      # Commands to make compiler produce verbose output that lists
8577b9b4fd27Smrg	      # what "hidden" libraries, object files and flags are used when
8578b9b4fd27Smrg	      # linking a shared library.
8579e8a5466aSmrg	      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
8580b9b4fd27Smrg
8581b9b4fd27Smrg	    else
8582b9b4fd27Smrg	      # FIXME: insert proper C++ library support
8583b9b4fd27Smrg	      _LT_TAGVAR(ld_shlibs, $1)=no
8584b9b4fd27Smrg	    fi
8585caade7ccSmrg	    ;;
8586b9b4fd27Smrg        esac
8587b9b4fd27Smrg        ;;
8588b9b4fd27Smrg
8589caade7ccSmrg      psos*)
8590b9b4fd27Smrg        # FIXME: insert proper C++ library support
8591b9b4fd27Smrg        _LT_TAGVAR(ld_shlibs, $1)=no
8592b9b4fd27Smrg        ;;
8593b9b4fd27Smrg
8594b9b4fd27Smrg      sunos4*)
8595b9b4fd27Smrg        case $cc_basename in
8596b9b4fd27Smrg          CC*)
8597b9b4fd27Smrg	    # Sun C++ 4.x
8598b9b4fd27Smrg	    # FIXME: insert proper C++ library support
8599b9b4fd27Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
8600b9b4fd27Smrg	    ;;
8601b9b4fd27Smrg          lcc*)
8602b9b4fd27Smrg	    # Lucid
8603b9b4fd27Smrg	    # FIXME: insert proper C++ library support
8604b9b4fd27Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
8605b9b4fd27Smrg	    ;;
8606b9b4fd27Smrg          *)
8607b9b4fd27Smrg	    # FIXME: insert proper C++ library support
8608b9b4fd27Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
8609b9b4fd27Smrg	    ;;
8610b9b4fd27Smrg        esac
8611b9b4fd27Smrg        ;;
8612b9b4fd27Smrg
8613caade7ccSmrg      solaris*)
8614b9b4fd27Smrg        case $cc_basename in
8615e8a5466aSmrg          CC* | sunCC*)
8616caade7ccSmrg	    # Sun C++ 4.2, 5.x and Centerline C++
8617b9b4fd27Smrg            _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
8618b9b4fd27Smrg	    _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
8619b9b4fd27Smrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
8620b9b4fd27Smrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
8621b9b4fd27Smrg	      $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'
8622b9b4fd27Smrg
8623b9b4fd27Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
8624b9b4fd27Smrg	    _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8625b9b4fd27Smrg	    case $host_os in
8626b9b4fd27Smrg	      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
8627b9b4fd27Smrg	      *)
8628b9b4fd27Smrg		# The compiler driver will combine and reorder linker options,
8629b9b4fd27Smrg		# but understands `-z linker_flag'.
8630b9b4fd27Smrg	        # Supported since Solaris 2.6 (maybe 2.5.1?)
8631b9b4fd27Smrg		_LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
8632b9b4fd27Smrg	        ;;
8633b9b4fd27Smrg	    esac
8634b9b4fd27Smrg	    _LT_TAGVAR(link_all_deplibs, $1)=yes
8635b9b4fd27Smrg
8636e8a5466aSmrg	    output_verbose_link_cmd='func_echo_all'
8637b9b4fd27Smrg
8638b9b4fd27Smrg	    # Archives containing C++ object files must be created using
8639b9b4fd27Smrg	    # "CC -xar", where "CC" is the Sun C++ compiler.  This is
8640b9b4fd27Smrg	    # necessary to make sure instantiated templates are included
8641b9b4fd27Smrg	    # in the archive.
8642b9b4fd27Smrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
8643caade7ccSmrg	    ;;
8644b9b4fd27Smrg          gcx*)
8645caade7ccSmrg	    # Green Hills C++ Compiler
8646b9b4fd27Smrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
8647b9b4fd27Smrg
8648b9b4fd27Smrg	    # The C++ compiler must be used to create the archive.
8649b9b4fd27Smrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
8650caade7ccSmrg	    ;;
8651b9b4fd27Smrg          *)
8652b9b4fd27Smrg	    # GNU C++ compiler with Solaris linker
8653b9b4fd27Smrg	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
8654b9b4fd27Smrg	      _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
8655b9b4fd27Smrg	      if $CC --version | $GREP -v '^2\.7' > /dev/null; then
8656b9b4fd27Smrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
8657b9b4fd27Smrg	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
8658b9b4fd27Smrg		  $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
8659b9b4fd27Smrg
8660b9b4fd27Smrg	        # Commands to make compiler produce verbose output that lists
8661b9b4fd27Smrg	        # what "hidden" libraries, object files and flags are used when
8662b9b4fd27Smrg	        # linking a shared library.
8663e8a5466aSmrg	        output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
8664b9b4fd27Smrg	      else
8665b9b4fd27Smrg	        # g++ 2.7 appears to require `-G' NOT `-shared' on this
8666b9b4fd27Smrg	        # platform.
8667b9b4fd27Smrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
8668b9b4fd27Smrg	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
8669b9b4fd27Smrg		  $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
8670b9b4fd27Smrg
8671b9b4fd27Smrg	        # Commands to make compiler produce verbose output that lists
8672b9b4fd27Smrg	        # what "hidden" libraries, object files and flags are used when
8673b9b4fd27Smrg	        # linking a shared library.
8674e8a5466aSmrg	        output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
8675b9b4fd27Smrg	      fi
8676b9b4fd27Smrg
8677b9b4fd27Smrg	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
8678b9b4fd27Smrg	      case $host_os in
8679b9b4fd27Smrg		solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
8680b9b4fd27Smrg		*)
8681b9b4fd27Smrg		  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
8682b9b4fd27Smrg		  ;;
8683b9b4fd27Smrg	      esac
8684b9b4fd27Smrg	    fi
8685caade7ccSmrg	    ;;
8686b9b4fd27Smrg        esac
8687b9b4fd27Smrg        ;;
8688b9b4fd27Smrg
8689b9b4fd27Smrg    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
8690b9b4fd27Smrg      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
8691b9b4fd27Smrg      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
8692b9b4fd27Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8693b9b4fd27Smrg      runpath_var='LD_RUN_PATH'
8694b9b4fd27Smrg
8695b9b4fd27Smrg      case $cc_basename in
8696b9b4fd27Smrg        CC*)
8697b9b4fd27Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8698b9b4fd27Smrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8699b9b4fd27Smrg	  ;;
8700b9b4fd27Smrg	*)
8701b9b4fd27Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8702b9b4fd27Smrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8703b9b4fd27Smrg	  ;;
8704b9b4fd27Smrg      esac
8705b9b4fd27Smrg      ;;
8706b9b4fd27Smrg
8707b9b4fd27Smrg      sysv5* | sco3.2v5* | sco5v6*)
8708b9b4fd27Smrg	# Note: We can NOT use -z defs as we might desire, because we do not
8709b9b4fd27Smrg	# link with -lc, and that would cause any symbols used from libc to
8710b9b4fd27Smrg	# always be unresolved, which means just about no library would
8711b9b4fd27Smrg	# ever link correctly.  If we're not using GNU ld we use -z text
8712b9b4fd27Smrg	# though, which does catch some bad symbols but isn't as heavy-handed
8713b9b4fd27Smrg	# as -z defs.
8714b9b4fd27Smrg	_LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
8715b9b4fd27Smrg	_LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
8716b9b4fd27Smrg	_LT_TAGVAR(archive_cmds_need_lc, $1)=no
8717b9b4fd27Smrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8718b9b4fd27Smrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
8719b9b4fd27Smrg	_LT_TAGVAR(hardcode_libdir_separator, $1)=':'
8720b9b4fd27Smrg	_LT_TAGVAR(link_all_deplibs, $1)=yes
8721b9b4fd27Smrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
8722b9b4fd27Smrg	runpath_var='LD_RUN_PATH'
8723b9b4fd27Smrg
8724caade7ccSmrg	case $cc_basename in
8725b9b4fd27Smrg          CC*)
8726b9b4fd27Smrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8727b9b4fd27Smrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8728e8a5466aSmrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
8729e8a5466aSmrg	      '"$_LT_TAGVAR(old_archive_cmds, $1)"
8730e8a5466aSmrg	    _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
8731e8a5466aSmrg	      '"$_LT_TAGVAR(reload_cmds, $1)"
8732caade7ccSmrg	    ;;
8733caade7ccSmrg	  *)
8734b9b4fd27Smrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8735b9b4fd27Smrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8736caade7ccSmrg	    ;;
8737caade7ccSmrg	esac
8738b9b4fd27Smrg      ;;
8739b9b4fd27Smrg
8740caade7ccSmrg      tandem*)
8741b9b4fd27Smrg        case $cc_basename in
8742b9b4fd27Smrg          NCC*)
8743caade7ccSmrg	    # NonStop-UX NCC 3.20
8744b9b4fd27Smrg	    # FIXME: insert proper C++ library support
8745b9b4fd27Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
8746caade7ccSmrg	    ;;
8747b9b4fd27Smrg          *)
8748b9b4fd27Smrg	    # FIXME: insert proper C++ library support
8749b9b4fd27Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
8750caade7ccSmrg	    ;;
8751b9b4fd27Smrg        esac
8752b9b4fd27Smrg        ;;
8753b9b4fd27Smrg
8754caade7ccSmrg      vxworks*)
8755b9b4fd27Smrg        # FIXME: insert proper C++ library support
8756b9b4fd27Smrg        _LT_TAGVAR(ld_shlibs, $1)=no
8757b9b4fd27Smrg        ;;
8758b9b4fd27Smrg
8759caade7ccSmrg      *)
8760b9b4fd27Smrg        # FIXME: insert proper C++ library support
8761b9b4fd27Smrg        _LT_TAGVAR(ld_shlibs, $1)=no
8762b9b4fd27Smrg        ;;
8763caade7ccSmrg    esac
8764caade7ccSmrg
8765b9b4fd27Smrg    AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
8766b9b4fd27Smrg    test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
8767b9b4fd27Smrg
8768b9b4fd27Smrg    _LT_TAGVAR(GCC, $1)="$GXX"
8769b9b4fd27Smrg    _LT_TAGVAR(LD, $1)="$LD"
8770b9b4fd27Smrg
8771b9b4fd27Smrg    ## CAVEAT EMPTOR:
8772b9b4fd27Smrg    ## There is no encapsulation within the following macros, do not change
8773b9b4fd27Smrg    ## the running order or otherwise move them around unless you know exactly
8774b9b4fd27Smrg    ## what you are doing...
8775b9b4fd27Smrg    _LT_SYS_HIDDEN_LIBDEPS($1)
8776b9b4fd27Smrg    _LT_COMPILER_PIC($1)
8777b9b4fd27Smrg    _LT_COMPILER_C_O($1)
8778b9b4fd27Smrg    _LT_COMPILER_FILE_LOCKS($1)
8779b9b4fd27Smrg    _LT_LINKER_SHLIBS($1)
8780b9b4fd27Smrg    _LT_SYS_DYNAMIC_LINKER($1)
8781b9b4fd27Smrg    _LT_LINKER_HARDCODE_LIBPATH($1)
8782b9b4fd27Smrg
8783b9b4fd27Smrg    _LT_CONFIG($1)
8784b9b4fd27Smrg  fi # test -n "$compiler"
8785b9b4fd27Smrg
8786b9b4fd27Smrg  CC=$lt_save_CC
8787b9b4fd27Smrg  LDCXX=$LD
8788b9b4fd27Smrg  LD=$lt_save_LD
8789b9b4fd27Smrg  GCC=$lt_save_GCC
8790b9b4fd27Smrg  with_gnu_ld=$lt_save_with_gnu_ld
8791b9b4fd27Smrg  lt_cv_path_LDCXX=$lt_cv_path_LD
8792b9b4fd27Smrg  lt_cv_path_LD=$lt_save_path_LD
8793b9b4fd27Smrg  lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
8794b9b4fd27Smrg  lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
8795b9b4fd27Smrgfi # test "$_lt_caught_CXX_error" != yes
8796b9b4fd27Smrg
8797b9b4fd27SmrgAC_LANG_POP
8798b9b4fd27Smrg])# _LT_LANG_CXX_CONFIG
8799b9b4fd27Smrg
8800b9b4fd27Smrg
8801b9b4fd27Smrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
8802b9b4fd27Smrg# ---------------------------------
8803b9b4fd27Smrg# Figure out "hidden" library dependencies from verbose
8804b9b4fd27Smrg# compiler output when linking a shared library.
8805b9b4fd27Smrg# Parse the compiler output and extract the necessary
8806b9b4fd27Smrg# objects, libraries and library flags.
8807b9b4fd27Smrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS],
8808b9b4fd27Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
8809b9b4fd27Smrg# Dependencies to place before and after the object being linked:
8810b9b4fd27Smrg_LT_TAGVAR(predep_objects, $1)=
8811b9b4fd27Smrg_LT_TAGVAR(postdep_objects, $1)=
8812b9b4fd27Smrg_LT_TAGVAR(predeps, $1)=
8813b9b4fd27Smrg_LT_TAGVAR(postdeps, $1)=
8814b9b4fd27Smrg_LT_TAGVAR(compiler_lib_search_path, $1)=
8815b9b4fd27Smrg
8816b9b4fd27Smrgdnl we can't use the lt_simple_compile_test_code here,
8817b9b4fd27Smrgdnl because it contains code intended for an executable,
8818b9b4fd27Smrgdnl not a library.  It's possible we should let each
8819b9b4fd27Smrgdnl tag define a new lt_????_link_test_code variable,
8820b9b4fd27Smrgdnl but it's only used here...
8821b9b4fd27Smrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
8822b9b4fd27Smrgint a;
8823b9b4fd27Smrgvoid foo (void) { a = 0; }
8824b9b4fd27Smrg_LT_EOF
8825b9b4fd27Smrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
8826b9b4fd27Smrgclass Foo
8827b9b4fd27Smrg{
8828b9b4fd27Smrgpublic:
8829b9b4fd27Smrg  Foo (void) { a = 0; }
8830b9b4fd27Smrgprivate:
8831b9b4fd27Smrg  int a;
8832b9b4fd27Smrg};
8833b9b4fd27Smrg_LT_EOF
8834b9b4fd27Smrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
8835b9b4fd27Smrg      subroutine foo
8836b9b4fd27Smrg      implicit none
8837b9b4fd27Smrg      integer*4 a
8838b9b4fd27Smrg      a=0
8839b9b4fd27Smrg      return
8840b9b4fd27Smrg      end
8841b9b4fd27Smrg_LT_EOF
8842b9b4fd27Smrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
8843b9b4fd27Smrg      subroutine foo
8844b9b4fd27Smrg      implicit none
8845b9b4fd27Smrg      integer a
8846b9b4fd27Smrg      a=0
8847b9b4fd27Smrg      return
8848b9b4fd27Smrg      end
8849b9b4fd27Smrg_LT_EOF
8850b9b4fd27Smrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
8851b9b4fd27Smrgpublic class foo {
8852b9b4fd27Smrg  private int a;
8853b9b4fd27Smrg  public void bar (void) {
8854b9b4fd27Smrg    a = 0;
8855b9b4fd27Smrg  }
8856b9b4fd27Smrg};
8857b9b4fd27Smrg_LT_EOF
8858b9b4fd27Smrg])
8859b9b4fd27Smrgdnl Parse the compiler output and extract the necessary
8860b9b4fd27Smrgdnl objects, libraries and library flags.
8861b9b4fd27Smrgif AC_TRY_EVAL(ac_compile); then
8862b9b4fd27Smrg  # Parse the compiler output and extract the necessary
8863b9b4fd27Smrg  # objects, libraries and library flags.
8864b9b4fd27Smrg
8865b9b4fd27Smrg  # Sentinel used to keep track of whether or not we are before
8866b9b4fd27Smrg  # the conftest object file.
8867b9b4fd27Smrg  pre_test_object_deps_done=no
8868b9b4fd27Smrg
8869b9b4fd27Smrg  for p in `eval "$output_verbose_link_cmd"`; do
8870b9b4fd27Smrg    case $p in
8871b9b4fd27Smrg
8872b9b4fd27Smrg    -L* | -R* | -l*)
8873b9b4fd27Smrg       # Some compilers place space between "-{L,R}" and the path.
8874b9b4fd27Smrg       # Remove the space.
8875b9b4fd27Smrg       if test $p = "-L" ||
8876b9b4fd27Smrg          test $p = "-R"; then
8877b9b4fd27Smrg	 prev=$p
8878b9b4fd27Smrg	 continue
8879b9b4fd27Smrg       else
8880b9b4fd27Smrg	 prev=
8881b9b4fd27Smrg       fi
8882b9b4fd27Smrg
8883b9b4fd27Smrg       if test "$pre_test_object_deps_done" = no; then
8884b9b4fd27Smrg	 case $p in
8885b9b4fd27Smrg	 -L* | -R*)
8886b9b4fd27Smrg	   # Internal compiler library paths should come after those
8887b9b4fd27Smrg	   # provided the user.  The postdeps already come after the
8888b9b4fd27Smrg	   # user supplied libs so there is no need to process them.
8889b9b4fd27Smrg	   if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
8890b9b4fd27Smrg	     _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
8891b9b4fd27Smrg	   else
8892b9b4fd27Smrg	     _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
8893b9b4fd27Smrg	   fi
8894b9b4fd27Smrg	   ;;
8895b9b4fd27Smrg	 # The "-l" case would never come before the object being
8896b9b4fd27Smrg	 # linked, so don't bother handling this case.
8897b9b4fd27Smrg	 esac
8898b9b4fd27Smrg       else
8899b9b4fd27Smrg	 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
8900b9b4fd27Smrg	   _LT_TAGVAR(postdeps, $1)="${prev}${p}"
8901b9b4fd27Smrg	 else
8902b9b4fd27Smrg	   _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
8903b9b4fd27Smrg	 fi
8904b9b4fd27Smrg       fi
8905b9b4fd27Smrg       ;;
8906b9b4fd27Smrg
8907b9b4fd27Smrg    *.$objext)
8908b9b4fd27Smrg       # This assumes that the test object file only shows up
8909b9b4fd27Smrg       # once in the compiler output.
8910b9b4fd27Smrg       if test "$p" = "conftest.$objext"; then
8911b9b4fd27Smrg	 pre_test_object_deps_done=yes
8912b9b4fd27Smrg	 continue
8913b9b4fd27Smrg       fi
8914b9b4fd27Smrg
8915b9b4fd27Smrg       if test "$pre_test_object_deps_done" = no; then
8916b9b4fd27Smrg	 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
8917b9b4fd27Smrg	   _LT_TAGVAR(predep_objects, $1)="$p"
8918b9b4fd27Smrg	 else
8919b9b4fd27Smrg	   _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
8920b9b4fd27Smrg	 fi
8921b9b4fd27Smrg       else
8922b9b4fd27Smrg	 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
8923b9b4fd27Smrg	   _LT_TAGVAR(postdep_objects, $1)="$p"
8924b9b4fd27Smrg	 else
8925b9b4fd27Smrg	   _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
8926b9b4fd27Smrg	 fi
8927b9b4fd27Smrg       fi
8928b9b4fd27Smrg       ;;
8929caade7ccSmrg
8930b9b4fd27Smrg    *) ;; # Ignore the rest.
8931caade7ccSmrg
8932b9b4fd27Smrg    esac
8933b9b4fd27Smrg  done
8934caade7ccSmrg
8935b9b4fd27Smrg  # Clean up.
8936b9b4fd27Smrg  rm -f a.out a.exe
8937b9b4fd27Smrgelse
8938b9b4fd27Smrg  echo "libtool.m4: error: problem compiling $1 test program"
8939b9b4fd27Smrgfi
8940caade7ccSmrg
8941b9b4fd27Smrg$RM -f confest.$objext
8942caade7ccSmrg
8943b9b4fd27Smrg# PORTME: override above test on systems where it is broken
8944b9b4fd27Smrgm4_if([$1], [CXX],
8945b9b4fd27Smrg[case $host_os in
8946b9b4fd27Smrginterix[[3-9]]*)
8947b9b4fd27Smrg  # Interix 3.5 installs completely hosed .la files for C++, so rather than
8948b9b4fd27Smrg  # hack all around it, let's just trust "g++" to DTRT.
8949b9b4fd27Smrg  _LT_TAGVAR(predep_objects,$1)=
8950b9b4fd27Smrg  _LT_TAGVAR(postdep_objects,$1)=
8951b9b4fd27Smrg  _LT_TAGVAR(postdeps,$1)=
8952b9b4fd27Smrg  ;;
8953caade7ccSmrg
8954b9b4fd27Smrglinux*)
8955b9b4fd27Smrg  case `$CC -V 2>&1 | sed 5q` in
8956b9b4fd27Smrg  *Sun\ C*)
8957b9b4fd27Smrg    # Sun C++ 5.9
8958caade7ccSmrg
8959b9b4fd27Smrg    # The more standards-conforming stlport4 library is
8960b9b4fd27Smrg    # incompatible with the Cstd library. Avoid specifying
8961b9b4fd27Smrg    # it if it's in CXXFLAGS. Ignore libCrun as
8962b9b4fd27Smrg    # -library=stlport4 depends on it.
8963b9b4fd27Smrg    case " $CXX $CXXFLAGS " in
8964b9b4fd27Smrg    *" -library=stlport4 "*)
8965b9b4fd27Smrg      solaris_use_stlport4=yes
8966caade7ccSmrg      ;;
8967b9b4fd27Smrg    esac
8968caade7ccSmrg
8969b9b4fd27Smrg    if test "$solaris_use_stlport4" != yes; then
8970b9b4fd27Smrg      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
8971b9b4fd27Smrg    fi
8972b9b4fd27Smrg    ;;
8973b9b4fd27Smrg  esac
8974b9b4fd27Smrg  ;;
8975caade7ccSmrg
8976b9b4fd27Smrgsolaris*)
8977b9b4fd27Smrg  case $cc_basename in
8978e8a5466aSmrg  CC* | sunCC*)
8979b9b4fd27Smrg    # The more standards-conforming stlport4 library is
8980b9b4fd27Smrg    # incompatible with the Cstd library. Avoid specifying
8981b9b4fd27Smrg    # it if it's in CXXFLAGS. Ignore libCrun as
8982b9b4fd27Smrg    # -library=stlport4 depends on it.
8983b9b4fd27Smrg    case " $CXX $CXXFLAGS " in
8984b9b4fd27Smrg    *" -library=stlport4 "*)
8985b9b4fd27Smrg      solaris_use_stlport4=yes
8986caade7ccSmrg      ;;
8987caade7ccSmrg    esac
8988caade7ccSmrg
8989b9b4fd27Smrg    # Adding this requires a known-good setup of shared libraries for
8990b9b4fd27Smrg    # Sun compiler versions before 5.6, else PIC objects from an old
8991b9b4fd27Smrg    # archive will be linked into the output, leading to subtle bugs.
8992b9b4fd27Smrg    if test "$solaris_use_stlport4" != yes; then
8993b9b4fd27Smrg      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
8994b9b4fd27Smrg    fi
8995b9b4fd27Smrg    ;;
8996b9b4fd27Smrg  esac
8997b9b4fd27Smrg  ;;
8998b9b4fd27Smrgesac
8999b9b4fd27Smrg])
9000caade7ccSmrg
9001b9b4fd27Smrgcase " $_LT_TAGVAR(postdeps, $1) " in
9002b9b4fd27Smrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
9003b9b4fd27Smrgesac
9004b9b4fd27Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=
9005b9b4fd27Smrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
9006b9b4fd27Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
9007b9b4fd27Smrgfi
9008b9b4fd27Smrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1],
9009b9b4fd27Smrg    [The directories searched by this compiler when creating a shared library])
9010b9b4fd27Smrg_LT_TAGDECL([], [predep_objects], [1],
9011b9b4fd27Smrg    [Dependencies to place before and after the objects being linked to
9012b9b4fd27Smrg    create a shared library])
9013b9b4fd27Smrg_LT_TAGDECL([], [postdep_objects], [1])
9014b9b4fd27Smrg_LT_TAGDECL([], [predeps], [1])
9015b9b4fd27Smrg_LT_TAGDECL([], [postdeps], [1])
9016b9b4fd27Smrg_LT_TAGDECL([], [compiler_lib_search_path], [1],
9017b9b4fd27Smrg    [The library search path used internally by the compiler when linking
9018b9b4fd27Smrg    a shared library])
9019b9b4fd27Smrg])# _LT_SYS_HIDDEN_LIBDEPS
9020b9b4fd27Smrg
9021b9b4fd27Smrg
9022b9b4fd27Smrg# _LT_LANG_F77_CONFIG([TAG])
9023b9b4fd27Smrg# --------------------------
9024b9b4fd27Smrg# Ensure that the configuration variables for a Fortran 77 compiler are
9025b9b4fd27Smrg# suitably defined.  These variables are subsequently used by _LT_CONFIG
9026b9b4fd27Smrg# to write the compiler configuration to `libtool'.
9027b9b4fd27Smrgm4_defun([_LT_LANG_F77_CONFIG],
9028e8a5466aSmrg[AC_LANG_PUSH(Fortran 77)
9029e8a5466aSmrgif test -z "$F77" || test "X$F77" = "Xno"; then
9030e8a5466aSmrg  _lt_disable_F77=yes
9031e8a5466aSmrgfi
9032b9b4fd27Smrg
9033b9b4fd27Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
9034b9b4fd27Smrg_LT_TAGVAR(allow_undefined_flag, $1)=
9035b9b4fd27Smrg_LT_TAGVAR(always_export_symbols, $1)=no
9036b9b4fd27Smrg_LT_TAGVAR(archive_expsym_cmds, $1)=
9037b9b4fd27Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)=
9038b9b4fd27Smrg_LT_TAGVAR(hardcode_direct, $1)=no
9039b9b4fd27Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no
9040b9b4fd27Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
9041b9b4fd27Smrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
9042b9b4fd27Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)=
9043b9b4fd27Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no
9044b9b4fd27Smrg_LT_TAGVAR(hardcode_automatic, $1)=no
9045b9b4fd27Smrg_LT_TAGVAR(inherit_rpath, $1)=no
9046b9b4fd27Smrg_LT_TAGVAR(module_cmds, $1)=
9047b9b4fd27Smrg_LT_TAGVAR(module_expsym_cmds, $1)=
9048b9b4fd27Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown
9049b9b4fd27Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
9050e8a5466aSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag
9051e8a5466aSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
9052b9b4fd27Smrg_LT_TAGVAR(no_undefined_flag, $1)=
9053b9b4fd27Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)=
9054b9b4fd27Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
9055b9b4fd27Smrg
9056b9b4fd27Smrg# Source file extension for f77 test sources.
9057b9b4fd27Smrgac_ext=f
9058b9b4fd27Smrg
9059b9b4fd27Smrg# Object file extension for compiled f77 test sources.
9060b9b4fd27Smrgobjext=o
9061b9b4fd27Smrg_LT_TAGVAR(objext, $1)=$objext
9062b9b4fd27Smrg
9063b9b4fd27Smrg# No sense in running all these tests if we already determined that
9064b9b4fd27Smrg# the F77 compiler isn't working.  Some variables (like enable_shared)
9065b9b4fd27Smrg# are currently assumed to apply to all compilers on this platform,
9066b9b4fd27Smrg# and will be corrupted by setting them based on a non-working compiler.
9067b9b4fd27Smrgif test "$_lt_disable_F77" != yes; then
9068b9b4fd27Smrg  # Code to be used in simple compile tests
9069b9b4fd27Smrg  lt_simple_compile_test_code="\
9070b9b4fd27Smrg      subroutine t
9071b9b4fd27Smrg      return
9072b9b4fd27Smrg      end
9073b9b4fd27Smrg"
9074b9b4fd27Smrg
9075b9b4fd27Smrg  # Code to be used in simple link tests
9076b9b4fd27Smrg  lt_simple_link_test_code="\
9077b9b4fd27Smrg      program t
9078b9b4fd27Smrg      end
9079b9b4fd27Smrg"
9080b9b4fd27Smrg
9081b9b4fd27Smrg  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
9082b9b4fd27Smrg  _LT_TAG_COMPILER
9083b9b4fd27Smrg
9084b9b4fd27Smrg  # save warnings/boilerplate of simple test code
9085b9b4fd27Smrg  _LT_COMPILER_BOILERPLATE
9086b9b4fd27Smrg  _LT_LINKER_BOILERPLATE
9087b9b4fd27Smrg
9088b9b4fd27Smrg  # Allow CC to be a program name with arguments.
9089b9b4fd27Smrg  lt_save_CC="$CC"
9090b9b4fd27Smrg  lt_save_GCC=$GCC
9091b9b4fd27Smrg  CC=${F77-"f77"}
9092b9b4fd27Smrg  compiler=$CC
9093b9b4fd27Smrg  _LT_TAGVAR(compiler, $1)=$CC
9094b9b4fd27Smrg  _LT_CC_BASENAME([$compiler])
9095b9b4fd27Smrg  GCC=$G77
9096b9b4fd27Smrg  if test -n "$compiler"; then
9097b9b4fd27Smrg    AC_MSG_CHECKING([if libtool supports shared libraries])
9098b9b4fd27Smrg    AC_MSG_RESULT([$can_build_shared])
9099b9b4fd27Smrg
9100b9b4fd27Smrg    AC_MSG_CHECKING([whether to build shared libraries])
9101b9b4fd27Smrg    test "$can_build_shared" = "no" && enable_shared=no
9102b9b4fd27Smrg
9103b9b4fd27Smrg    # On AIX, shared libraries and static libraries use the same namespace, and
9104b9b4fd27Smrg    # are all built from PIC.
9105b9b4fd27Smrg    case $host_os in
9106b9b4fd27Smrg      aix3*)
9107b9b4fd27Smrg        test "$enable_shared" = yes && enable_static=no
9108b9b4fd27Smrg        if test -n "$RANLIB"; then
9109b9b4fd27Smrg          archive_cmds="$archive_cmds~\$RANLIB \$lib"
9110b9b4fd27Smrg          postinstall_cmds='$RANLIB $lib'
9111b9b4fd27Smrg        fi
9112caade7ccSmrg        ;;
9113b9b4fd27Smrg      aix[[4-9]]*)
9114b9b4fd27Smrg	if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
9115b9b4fd27Smrg	  test "$enable_shared" = yes && enable_static=no
9116b9b4fd27Smrg	fi
9117caade7ccSmrg        ;;
9118b9b4fd27Smrg    esac
9119b9b4fd27Smrg    AC_MSG_RESULT([$enable_shared])
9120b9b4fd27Smrg
9121b9b4fd27Smrg    AC_MSG_CHECKING([whether to build static libraries])
9122b9b4fd27Smrg    # Make sure either enable_shared or enable_static is yes.
9123b9b4fd27Smrg    test "$enable_shared" = yes || enable_static=yes
9124b9b4fd27Smrg    AC_MSG_RESULT([$enable_static])
9125b9b4fd27Smrg
9126b9b4fd27Smrg    _LT_TAGVAR(GCC, $1)="$G77"
9127b9b4fd27Smrg    _LT_TAGVAR(LD, $1)="$LD"
9128b9b4fd27Smrg
9129b9b4fd27Smrg    ## CAVEAT EMPTOR:
9130b9b4fd27Smrg    ## There is no encapsulation within the following macros, do not change
9131b9b4fd27Smrg    ## the running order or otherwise move them around unless you know exactly
9132b9b4fd27Smrg    ## what you are doing...
9133b9b4fd27Smrg    _LT_COMPILER_PIC($1)
9134b9b4fd27Smrg    _LT_COMPILER_C_O($1)
9135b9b4fd27Smrg    _LT_COMPILER_FILE_LOCKS($1)
9136b9b4fd27Smrg    _LT_LINKER_SHLIBS($1)
9137b9b4fd27Smrg    _LT_SYS_DYNAMIC_LINKER($1)
9138b9b4fd27Smrg    _LT_LINKER_HARDCODE_LIBPATH($1)
9139b9b4fd27Smrg
9140b9b4fd27Smrg    _LT_CONFIG($1)
9141b9b4fd27Smrg  fi # test -n "$compiler"
9142b9b4fd27Smrg
9143b9b4fd27Smrg  GCC=$lt_save_GCC
9144b9b4fd27Smrg  CC="$lt_save_CC"
9145b9b4fd27Smrgfi # test "$_lt_disable_F77" != yes
9146b9b4fd27Smrg
9147b9b4fd27SmrgAC_LANG_POP
9148b9b4fd27Smrg])# _LT_LANG_F77_CONFIG
9149b9b4fd27Smrg
9150b9b4fd27Smrg
9151b9b4fd27Smrg# _LT_LANG_FC_CONFIG([TAG])
9152b9b4fd27Smrg# -------------------------
9153b9b4fd27Smrg# Ensure that the configuration variables for a Fortran compiler are
9154b9b4fd27Smrg# suitably defined.  These variables are subsequently used by _LT_CONFIG
9155b9b4fd27Smrg# to write the compiler configuration to `libtool'.
9156b9b4fd27Smrgm4_defun([_LT_LANG_FC_CONFIG],
9157e8a5466aSmrg[AC_LANG_PUSH(Fortran)
9158e8a5466aSmrg
9159e8a5466aSmrgif test -z "$FC" || test "X$FC" = "Xno"; then
9160e8a5466aSmrg  _lt_disable_FC=yes
9161e8a5466aSmrgfi
9162b9b4fd27Smrg
9163b9b4fd27Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
9164b9b4fd27Smrg_LT_TAGVAR(allow_undefined_flag, $1)=
9165b9b4fd27Smrg_LT_TAGVAR(always_export_symbols, $1)=no
9166b9b4fd27Smrg_LT_TAGVAR(archive_expsym_cmds, $1)=
9167b9b4fd27Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)=
9168b9b4fd27Smrg_LT_TAGVAR(hardcode_direct, $1)=no
9169b9b4fd27Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no
9170b9b4fd27Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
9171b9b4fd27Smrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
9172b9b4fd27Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)=
9173b9b4fd27Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no
9174b9b4fd27Smrg_LT_TAGVAR(hardcode_automatic, $1)=no
9175b9b4fd27Smrg_LT_TAGVAR(inherit_rpath, $1)=no
9176b9b4fd27Smrg_LT_TAGVAR(module_cmds, $1)=
9177b9b4fd27Smrg_LT_TAGVAR(module_expsym_cmds, $1)=
9178b9b4fd27Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown
9179b9b4fd27Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
9180e8a5466aSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag
9181e8a5466aSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
9182b9b4fd27Smrg_LT_TAGVAR(no_undefined_flag, $1)=
9183b9b4fd27Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)=
9184b9b4fd27Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
9185b9b4fd27Smrg
9186b9b4fd27Smrg# Source file extension for fc test sources.
9187b9b4fd27Smrgac_ext=${ac_fc_srcext-f}
9188b9b4fd27Smrg
9189b9b4fd27Smrg# Object file extension for compiled fc test sources.
9190b9b4fd27Smrgobjext=o
9191b9b4fd27Smrg_LT_TAGVAR(objext, $1)=$objext
9192b9b4fd27Smrg
9193b9b4fd27Smrg# No sense in running all these tests if we already determined that
9194b9b4fd27Smrg# the FC compiler isn't working.  Some variables (like enable_shared)
9195b9b4fd27Smrg# are currently assumed to apply to all compilers on this platform,
9196b9b4fd27Smrg# and will be corrupted by setting them based on a non-working compiler.
9197b9b4fd27Smrgif test "$_lt_disable_FC" != yes; then
9198b9b4fd27Smrg  # Code to be used in simple compile tests
9199b9b4fd27Smrg  lt_simple_compile_test_code="\
9200b9b4fd27Smrg      subroutine t
9201b9b4fd27Smrg      return
9202b9b4fd27Smrg      end
9203b9b4fd27Smrg"
9204b9b4fd27Smrg
9205b9b4fd27Smrg  # Code to be used in simple link tests
9206b9b4fd27Smrg  lt_simple_link_test_code="\
9207b9b4fd27Smrg      program t
9208b9b4fd27Smrg      end
9209b9b4fd27Smrg"
9210b9b4fd27Smrg
9211b9b4fd27Smrg  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
9212b9b4fd27Smrg  _LT_TAG_COMPILER
9213b9b4fd27Smrg
9214b9b4fd27Smrg  # save warnings/boilerplate of simple test code
9215b9b4fd27Smrg  _LT_COMPILER_BOILERPLATE
9216b9b4fd27Smrg  _LT_LINKER_BOILERPLATE
9217b9b4fd27Smrg
9218b9b4fd27Smrg  # Allow CC to be a program name with arguments.
9219b9b4fd27Smrg  lt_save_CC="$CC"
9220b9b4fd27Smrg  lt_save_GCC=$GCC
9221b9b4fd27Smrg  CC=${FC-"f95"}
9222b9b4fd27Smrg  compiler=$CC
9223b9b4fd27Smrg  GCC=$ac_cv_fc_compiler_gnu
9224b9b4fd27Smrg
9225b9b4fd27Smrg  _LT_TAGVAR(compiler, $1)=$CC
9226b9b4fd27Smrg  _LT_CC_BASENAME([$compiler])
9227b9b4fd27Smrg
9228b9b4fd27Smrg  if test -n "$compiler"; then
9229b9b4fd27Smrg    AC_MSG_CHECKING([if libtool supports shared libraries])
9230b9b4fd27Smrg    AC_MSG_RESULT([$can_build_shared])
9231b9b4fd27Smrg
9232b9b4fd27Smrg    AC_MSG_CHECKING([whether to build shared libraries])
9233b9b4fd27Smrg    test "$can_build_shared" = "no" && enable_shared=no
9234b9b4fd27Smrg
9235b9b4fd27Smrg    # On AIX, shared libraries and static libraries use the same namespace, and
9236b9b4fd27Smrg    # are all built from PIC.
9237b9b4fd27Smrg    case $host_os in
9238b9b4fd27Smrg      aix3*)
9239b9b4fd27Smrg        test "$enable_shared" = yes && enable_static=no
9240b9b4fd27Smrg        if test -n "$RANLIB"; then
9241b9b4fd27Smrg          archive_cmds="$archive_cmds~\$RANLIB \$lib"
9242b9b4fd27Smrg          postinstall_cmds='$RANLIB $lib'
9243b9b4fd27Smrg        fi
9244caade7ccSmrg        ;;
9245b9b4fd27Smrg      aix[[4-9]]*)
9246b9b4fd27Smrg	if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
9247b9b4fd27Smrg	  test "$enable_shared" = yes && enable_static=no
9248b9b4fd27Smrg	fi
9249b9b4fd27Smrg        ;;
9250b9b4fd27Smrg    esac
9251b9b4fd27Smrg    AC_MSG_RESULT([$enable_shared])
9252b9b4fd27Smrg
9253b9b4fd27Smrg    AC_MSG_CHECKING([whether to build static libraries])
9254b9b4fd27Smrg    # Make sure either enable_shared or enable_static is yes.
9255b9b4fd27Smrg    test "$enable_shared" = yes || enable_static=yes
9256b9b4fd27Smrg    AC_MSG_RESULT([$enable_static])
9257b9b4fd27Smrg
9258b9b4fd27Smrg    _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
9259b9b4fd27Smrg    _LT_TAGVAR(LD, $1)="$LD"
9260b9b4fd27Smrg
9261b9b4fd27Smrg    ## CAVEAT EMPTOR:
9262b9b4fd27Smrg    ## There is no encapsulation within the following macros, do not change
9263b9b4fd27Smrg    ## the running order or otherwise move them around unless you know exactly
9264b9b4fd27Smrg    ## what you are doing...
9265b9b4fd27Smrg    _LT_SYS_HIDDEN_LIBDEPS($1)
9266b9b4fd27Smrg    _LT_COMPILER_PIC($1)
9267b9b4fd27Smrg    _LT_COMPILER_C_O($1)
9268b9b4fd27Smrg    _LT_COMPILER_FILE_LOCKS($1)
9269b9b4fd27Smrg    _LT_LINKER_SHLIBS($1)
9270b9b4fd27Smrg    _LT_SYS_DYNAMIC_LINKER($1)
9271b9b4fd27Smrg    _LT_LINKER_HARDCODE_LIBPATH($1)
9272b9b4fd27Smrg
9273b9b4fd27Smrg    _LT_CONFIG($1)
9274b9b4fd27Smrg  fi # test -n "$compiler"
9275b9b4fd27Smrg
9276b9b4fd27Smrg  GCC=$lt_save_GCC
9277b9b4fd27Smrg  CC="$lt_save_CC"
9278b9b4fd27Smrgfi # test "$_lt_disable_FC" != yes
9279b9b4fd27Smrg
9280b9b4fd27SmrgAC_LANG_POP
9281b9b4fd27Smrg])# _LT_LANG_FC_CONFIG
9282b9b4fd27Smrg
9283b9b4fd27Smrg
9284b9b4fd27Smrg# _LT_LANG_GCJ_CONFIG([TAG])
9285b9b4fd27Smrg# --------------------------
9286b9b4fd27Smrg# Ensure that the configuration variables for the GNU Java Compiler compiler
9287b9b4fd27Smrg# are suitably defined.  These variables are subsequently used by _LT_CONFIG
9288b9b4fd27Smrg# to write the compiler configuration to `libtool'.
9289b9b4fd27Smrgm4_defun([_LT_LANG_GCJ_CONFIG],
9290b9b4fd27Smrg[AC_REQUIRE([LT_PROG_GCJ])dnl
9291b9b4fd27SmrgAC_LANG_SAVE
9292b9b4fd27Smrg
9293b9b4fd27Smrg# Source file extension for Java test sources.
9294b9b4fd27Smrgac_ext=java
9295b9b4fd27Smrg
9296b9b4fd27Smrg# Object file extension for compiled Java test sources.
9297b9b4fd27Smrgobjext=o
9298b9b4fd27Smrg_LT_TAGVAR(objext, $1)=$objext
9299b9b4fd27Smrg
9300b9b4fd27Smrg# Code to be used in simple compile tests
9301b9b4fd27Smrglt_simple_compile_test_code="class foo {}"
9302b9b4fd27Smrg
9303b9b4fd27Smrg# Code to be used in simple link tests
9304b9b4fd27Smrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
9305b9b4fd27Smrg
9306b9b4fd27Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
9307b9b4fd27Smrg_LT_TAG_COMPILER
9308b9b4fd27Smrg
9309b9b4fd27Smrg# save warnings/boilerplate of simple test code
9310b9b4fd27Smrg_LT_COMPILER_BOILERPLATE
9311b9b4fd27Smrg_LT_LINKER_BOILERPLATE
9312b9b4fd27Smrg
9313b9b4fd27Smrg# Allow CC to be a program name with arguments.
9314b9b4fd27Smrglt_save_CC="$CC"
9315b9b4fd27Smrglt_save_GCC=$GCC
9316b9b4fd27SmrgGCC=yes
9317b9b4fd27SmrgCC=${GCJ-"gcj"}
9318b9b4fd27Smrgcompiler=$CC
9319b9b4fd27Smrg_LT_TAGVAR(compiler, $1)=$CC
9320b9b4fd27Smrg_LT_TAGVAR(LD, $1)="$LD"
9321b9b4fd27Smrg_LT_CC_BASENAME([$compiler])
9322caade7ccSmrg
9323b9b4fd27Smrg# GCJ did not exist at the time GCC didn't implicitly link libc in.
9324b9b4fd27Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
9325caade7ccSmrg
9326b9b4fd27Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
9327e8a5466aSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag
9328e8a5466aSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
9329485f0483Smrg
9330b9b4fd27Smrgif test -n "$compiler"; then
9331b9b4fd27Smrg  _LT_COMPILER_NO_RTTI($1)
9332b9b4fd27Smrg  _LT_COMPILER_PIC($1)
9333b9b4fd27Smrg  _LT_COMPILER_C_O($1)
9334b9b4fd27Smrg  _LT_COMPILER_FILE_LOCKS($1)
9335b9b4fd27Smrg  _LT_LINKER_SHLIBS($1)
9336b9b4fd27Smrg  _LT_LINKER_HARDCODE_LIBPATH($1)
9337caade7ccSmrg
9338b9b4fd27Smrg  _LT_CONFIG($1)
9339b9b4fd27Smrgfi
9340caade7ccSmrg
9341b9b4fd27SmrgAC_LANG_RESTORE
9342caade7ccSmrg
9343b9b4fd27SmrgGCC=$lt_save_GCC
9344b9b4fd27SmrgCC="$lt_save_CC"
9345b9b4fd27Smrg])# _LT_LANG_GCJ_CONFIG
9346caade7ccSmrg
9347caade7ccSmrg
9348b9b4fd27Smrg# _LT_LANG_RC_CONFIG([TAG])
9349b9b4fd27Smrg# -------------------------
9350b9b4fd27Smrg# Ensure that the configuration variables for the Windows resource compiler
9351b9b4fd27Smrg# are suitably defined.  These variables are subsequently used by _LT_CONFIG
9352b9b4fd27Smrg# to write the compiler configuration to `libtool'.
9353b9b4fd27Smrgm4_defun([_LT_LANG_RC_CONFIG],
9354b9b4fd27Smrg[AC_REQUIRE([LT_PROG_RC])dnl
9355b9b4fd27SmrgAC_LANG_SAVE
9356caade7ccSmrg
9357b9b4fd27Smrg# Source file extension for RC test sources.
9358b9b4fd27Smrgac_ext=rc
9359caade7ccSmrg
9360b9b4fd27Smrg# Object file extension for compiled RC test sources.
9361b9b4fd27Smrgobjext=o
9362b9b4fd27Smrg_LT_TAGVAR(objext, $1)=$objext
9363caade7ccSmrg
9364b9b4fd27Smrg# Code to be used in simple compile tests
9365b9b4fd27Smrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
9366b9b4fd27Smrg
9367b9b4fd27Smrg# Code to be used in simple link tests
9368b9b4fd27Smrglt_simple_link_test_code="$lt_simple_compile_test_code"
9369b9b4fd27Smrg
9370b9b4fd27Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
9371b9b4fd27Smrg_LT_TAG_COMPILER
9372b9b4fd27Smrg
9373b9b4fd27Smrg# save warnings/boilerplate of simple test code
9374b9b4fd27Smrg_LT_COMPILER_BOILERPLATE
9375b9b4fd27Smrg_LT_LINKER_BOILERPLATE
9376b9b4fd27Smrg
9377b9b4fd27Smrg# Allow CC to be a program name with arguments.
9378b9b4fd27Smrglt_save_CC="$CC"
9379b9b4fd27Smrglt_save_GCC=$GCC
9380b9b4fd27SmrgGCC=
9381b9b4fd27SmrgCC=${RC-"windres"}
9382b9b4fd27Smrgcompiler=$CC
9383b9b4fd27Smrg_LT_TAGVAR(compiler, $1)=$CC
9384b9b4fd27Smrg_LT_CC_BASENAME([$compiler])
9385b9b4fd27Smrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
9386b9b4fd27Smrg
9387b9b4fd27Smrgif test -n "$compiler"; then
9388b9b4fd27Smrg  :
9389b9b4fd27Smrg  _LT_CONFIG($1)
9390caade7ccSmrgfi
9391caade7ccSmrg
9392b9b4fd27SmrgGCC=$lt_save_GCC
9393b9b4fd27SmrgAC_LANG_RESTORE
9394b9b4fd27SmrgCC="$lt_save_CC"
9395b9b4fd27Smrg])# _LT_LANG_RC_CONFIG
9396b9b4fd27Smrg
9397b9b4fd27Smrg
9398b9b4fd27Smrg# LT_PROG_GCJ
9399b9b4fd27Smrg# -----------
9400b9b4fd27SmrgAC_DEFUN([LT_PROG_GCJ],
9401b9b4fd27Smrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
9402b9b4fd27Smrg  [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
9403b9b4fd27Smrg    [AC_CHECK_TOOL(GCJ, gcj,)
9404b9b4fd27Smrg      test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
9405b9b4fd27Smrg      AC_SUBST(GCJFLAGS)])])[]dnl
9406caade7ccSmrg])
9407caade7ccSmrg
9408b9b4fd27Smrg# Old name:
9409b9b4fd27SmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
9410b9b4fd27Smrgdnl aclocal-1.4 backwards compatibility:
9411b9b4fd27Smrgdnl AC_DEFUN([LT_AC_PROG_GCJ], [])
9412caade7ccSmrg
9413caade7ccSmrg
9414b9b4fd27Smrg# LT_PROG_RC
9415b9b4fd27Smrg# ----------
9416b9b4fd27SmrgAC_DEFUN([LT_PROG_RC],
9417b9b4fd27Smrg[AC_CHECK_TOOL(RC, windres,)
9418b9b4fd27Smrg])
9419caade7ccSmrg
9420b9b4fd27Smrg# Old name:
9421b9b4fd27SmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
9422b9b4fd27Smrgdnl aclocal-1.4 backwards compatibility:
9423b9b4fd27Smrgdnl AC_DEFUN([LT_AC_PROG_RC], [])
9424caade7ccSmrg
9425caade7ccSmrg
9426b9b4fd27Smrg# _LT_DECL_EGREP
9427b9b4fd27Smrg# --------------
9428b9b4fd27Smrg# If we don't have a new enough Autoconf to choose the best grep
9429b9b4fd27Smrg# available, choose the one first in the user's PATH.
9430b9b4fd27Smrgm4_defun([_LT_DECL_EGREP],
9431b9b4fd27Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl
9432b9b4fd27SmrgAC_REQUIRE([AC_PROG_FGREP])dnl
9433b9b4fd27Smrgtest -z "$GREP" && GREP=grep
9434b9b4fd27Smrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines])
9435b9b4fd27Smrg_LT_DECL([], [EGREP], [1], [An ERE matcher])
9436b9b4fd27Smrg_LT_DECL([], [FGREP], [1], [A literal string matcher])
9437b9b4fd27Smrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
9438b9b4fd27SmrgAC_SUBST([GREP])
9439b9b4fd27Smrg])
9440caade7ccSmrg
9441caade7ccSmrg
9442b9b4fd27Smrg# _LT_DECL_OBJDUMP
9443b9b4fd27Smrg# --------------
9444b9b4fd27Smrg# If we don't have a new enough Autoconf to choose the best objdump
9445b9b4fd27Smrg# available, choose the one first in the user's PATH.
9446b9b4fd27Smrgm4_defun([_LT_DECL_OBJDUMP],
9447b9b4fd27Smrg[AC_CHECK_TOOL(OBJDUMP, objdump, false)
9448b9b4fd27Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump
9449b9b4fd27Smrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
9450b9b4fd27SmrgAC_SUBST([OBJDUMP])
9451b9b4fd27Smrg])
9452caade7ccSmrg
9453caade7ccSmrg
9454b9b4fd27Smrg# _LT_DECL_SED
9455b9b4fd27Smrg# ------------
9456b9b4fd27Smrg# Check for a fully-functional sed program, that truncates
9457b9b4fd27Smrg# as few characters as possible.  Prefer GNU sed if found.
9458b9b4fd27Smrgm4_defun([_LT_DECL_SED],
9459b9b4fd27Smrg[AC_PROG_SED
9460b9b4fd27Smrgtest -z "$SED" && SED=sed
9461b9b4fd27SmrgXsed="$SED -e 1s/^X//"
9462b9b4fd27Smrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output])
9463b9b4fd27Smrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
9464b9b4fd27Smrg    [Sed that helps us avoid accidentally triggering echo(1) options like -n])
9465b9b4fd27Smrg])# _LT_DECL_SED
9466b9b4fd27Smrg
9467b9b4fd27Smrgm4_ifndef([AC_PROG_SED], [
9468b9b4fd27Smrg# NOTE: This macro has been submitted for inclusion into   #
9469b9b4fd27Smrg#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
9470b9b4fd27Smrg#  a released version of Autoconf we should remove this    #
9471b9b4fd27Smrg#  macro and use it instead.                               #
9472b9b4fd27Smrg
9473b9b4fd27Smrgm4_defun([AC_PROG_SED],
9474b9b4fd27Smrg[AC_MSG_CHECKING([for a sed that does not truncate output])
9475b9b4fd27SmrgAC_CACHE_VAL(lt_cv_path_SED,
9476b9b4fd27Smrg[# Loop through the user's path and test for sed and gsed.
9477b9b4fd27Smrg# Then use that list of sed's as ones to test for truncation.
9478b9b4fd27Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9479b9b4fd27Smrgfor as_dir in $PATH
9480b9b4fd27Smrgdo
9481b9b4fd27Smrg  IFS=$as_save_IFS
9482b9b4fd27Smrg  test -z "$as_dir" && as_dir=.
9483b9b4fd27Smrg  for lt_ac_prog in sed gsed; do
9484b9b4fd27Smrg    for ac_exec_ext in '' $ac_executable_extensions; do
9485b9b4fd27Smrg      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
9486b9b4fd27Smrg        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
9487caade7ccSmrg      fi
9488b9b4fd27Smrg    done
9489b9b4fd27Smrg  done
9490b9b4fd27Smrgdone
9491b9b4fd27SmrgIFS=$as_save_IFS
9492b9b4fd27Smrglt_ac_max=0
9493b9b4fd27Smrglt_ac_count=0
9494b9b4fd27Smrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris
9495b9b4fd27Smrg# along with /bin/sed that truncates output.
9496b9b4fd27Smrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
9497b9b4fd27Smrg  test ! -f $lt_ac_sed && continue
9498b9b4fd27Smrg  cat /dev/null > conftest.in
9499b9b4fd27Smrg  lt_ac_count=0
9500b9b4fd27Smrg  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
9501b9b4fd27Smrg  # Check for GNU sed and select it if it is found.
9502b9b4fd27Smrg  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
9503b9b4fd27Smrg    lt_cv_path_SED=$lt_ac_sed
9504b9b4fd27Smrg    break
9505b9b4fd27Smrg  fi
9506b9b4fd27Smrg  while true; do
9507b9b4fd27Smrg    cat conftest.in conftest.in >conftest.tmp
9508b9b4fd27Smrg    mv conftest.tmp conftest.in
9509b9b4fd27Smrg    cp conftest.in conftest.nl
9510b9b4fd27Smrg    echo >>conftest.nl
9511b9b4fd27Smrg    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
9512b9b4fd27Smrg    cmp -s conftest.out conftest.nl || break
9513b9b4fd27Smrg    # 10000 chars as input seems more than enough
9514b9b4fd27Smrg    test $lt_ac_count -gt 10 && break
9515b9b4fd27Smrg    lt_ac_count=`expr $lt_ac_count + 1`
9516b9b4fd27Smrg    if test $lt_ac_count -gt $lt_ac_max; then
9517b9b4fd27Smrg      lt_ac_max=$lt_ac_count
9518b9b4fd27Smrg      lt_cv_path_SED=$lt_ac_sed
9519b9b4fd27Smrg    fi
9520b9b4fd27Smrg  done
9521b9b4fd27Smrgdone
9522b9b4fd27Smrg])
9523b9b4fd27SmrgSED=$lt_cv_path_SED
9524b9b4fd27SmrgAC_SUBST([SED])
9525b9b4fd27SmrgAC_MSG_RESULT([$SED])
9526b9b4fd27Smrg])#AC_PROG_SED
9527b9b4fd27Smrg])#m4_ifndef
9528b9b4fd27Smrg
9529b9b4fd27Smrg# Old name:
9530b9b4fd27SmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
9531b9b4fd27Smrgdnl aclocal-1.4 backwards compatibility:
9532b9b4fd27Smrgdnl AC_DEFUN([LT_AC_PROG_SED], [])
9533b9b4fd27Smrg
9534b9b4fd27Smrg
9535b9b4fd27Smrg# _LT_CHECK_SHELL_FEATURES
9536b9b4fd27Smrg# ------------------------
9537b9b4fd27Smrg# Find out whether the shell is Bourne or XSI compatible,
9538b9b4fd27Smrg# or has some other useful features.
9539b9b4fd27Smrgm4_defun([_LT_CHECK_SHELL_FEATURES],
9540b9b4fd27Smrg[AC_MSG_CHECKING([whether the shell understands some XSI constructs])
9541b9b4fd27Smrg# Try some XSI features
9542b9b4fd27Smrgxsi_shell=no
9543b9b4fd27Smrg( _lt_dummy="a/b/c"
9544b9b4fd27Smrg  test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
9545b9b4fd27Smrg      = c,a/b,, \
9546b9b4fd27Smrg    && eval 'test $(( 1 + 1 )) -eq 2 \
9547b9b4fd27Smrg    && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
9548b9b4fd27Smrg  && xsi_shell=yes
9549b9b4fd27SmrgAC_MSG_RESULT([$xsi_shell])
9550b9b4fd27Smrg_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
9551b9b4fd27Smrg
9552b9b4fd27SmrgAC_MSG_CHECKING([whether the shell understands "+="])
9553b9b4fd27Smrglt_shell_append=no
9554b9b4fd27Smrg( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
9555b9b4fd27Smrg    >/dev/null 2>&1 \
9556b9b4fd27Smrg  && lt_shell_append=yes
9557b9b4fd27SmrgAC_MSG_RESULT([$lt_shell_append])
9558b9b4fd27Smrg_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
9559b9b4fd27Smrg
9560b9b4fd27Smrgif ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
9561b9b4fd27Smrg  lt_unset=unset
9562b9b4fd27Smrgelse
9563b9b4fd27Smrg  lt_unset=false
9564b9b4fd27Smrgfi
9565b9b4fd27Smrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
9566b9b4fd27Smrg
9567b9b4fd27Smrg# test EBCDIC or ASCII
9568b9b4fd27Smrgcase `echo X|tr X '\101'` in
9569b9b4fd27Smrg A) # ASCII based system
9570b9b4fd27Smrg    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
9571b9b4fd27Smrg  lt_SP2NL='tr \040 \012'
9572b9b4fd27Smrg  lt_NL2SP='tr \015\012 \040\040'
9573b9b4fd27Smrg  ;;
9574b9b4fd27Smrg *) # EBCDIC based system
9575b9b4fd27Smrg  lt_SP2NL='tr \100 \n'
9576b9b4fd27Smrg  lt_NL2SP='tr \r\n \100\100'
9577b9b4fd27Smrg  ;;
9578b9b4fd27Smrgesac
9579b9b4fd27Smrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
9580b9b4fd27Smrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
9581b9b4fd27Smrg])# _LT_CHECK_SHELL_FEATURES
9582caade7ccSmrg
9583caade7ccSmrg
9584b9b4fd27Smrg# _LT_PROG_XSI_SHELLFNS
9585b9b4fd27Smrg# ---------------------
9586b9b4fd27Smrg# Bourne and XSI compatible variants of some useful shell functions.
9587b9b4fd27Smrgm4_defun([_LT_PROG_XSI_SHELLFNS],
9588b9b4fd27Smrg[case $xsi_shell in
9589b9b4fd27Smrg  yes)
9590b9b4fd27Smrg    cat << \_LT_EOF >> "$cfgfile"
9591b9b4fd27Smrg
9592b9b4fd27Smrg# func_dirname file append nondir_replacement
9593b9b4fd27Smrg# Compute the dirname of FILE.  If nonempty, add APPEND to the result,
9594b9b4fd27Smrg# otherwise set result to NONDIR_REPLACEMENT.
9595b9b4fd27Smrgfunc_dirname ()
9596b9b4fd27Smrg{
9597b9b4fd27Smrg  case ${1} in
9598b9b4fd27Smrg    */*) func_dirname_result="${1%/*}${2}" ;;
9599b9b4fd27Smrg    *  ) func_dirname_result="${3}" ;;
9600b9b4fd27Smrg  esac
9601b9b4fd27Smrg}
9602caade7ccSmrg
9603b9b4fd27Smrg# func_basename file
9604b9b4fd27Smrgfunc_basename ()
9605b9b4fd27Smrg{
9606b9b4fd27Smrg  func_basename_result="${1##*/}"
9607b9b4fd27Smrg}
9608caade7ccSmrg
9609b9b4fd27Smrg# func_dirname_and_basename file append nondir_replacement
9610b9b4fd27Smrg# perform func_basename and func_dirname in a single function
9611b9b4fd27Smrg# call:
9612b9b4fd27Smrg#   dirname:  Compute the dirname of FILE.  If nonempty,
9613b9b4fd27Smrg#             add APPEND to the result, otherwise set result
9614b9b4fd27Smrg#             to NONDIR_REPLACEMENT.
9615b9b4fd27Smrg#             value returned in "$func_dirname_result"
9616b9b4fd27Smrg#   basename: Compute filename of FILE.
9617b9b4fd27Smrg#             value retuned in "$func_basename_result"
9618b9b4fd27Smrg# Implementation must be kept synchronized with func_dirname
9619b9b4fd27Smrg# and func_basename. For efficiency, we do not delegate to
9620b9b4fd27Smrg# those functions but instead duplicate the functionality here.
9621b9b4fd27Smrgfunc_dirname_and_basename ()
9622b9b4fd27Smrg{
9623b9b4fd27Smrg  case ${1} in
9624b9b4fd27Smrg    */*) func_dirname_result="${1%/*}${2}" ;;
9625b9b4fd27Smrg    *  ) func_dirname_result="${3}" ;;
9626b9b4fd27Smrg  esac
9627b9b4fd27Smrg  func_basename_result="${1##*/}"
9628b9b4fd27Smrg}
9629caade7ccSmrg
9630b9b4fd27Smrg# func_stripname prefix suffix name
9631b9b4fd27Smrg# strip PREFIX and SUFFIX off of NAME.
9632b9b4fd27Smrg# PREFIX and SUFFIX must not contain globbing or regex special
9633b9b4fd27Smrg# characters, hashes, percent signs, but SUFFIX may contain a leading
9634b9b4fd27Smrg# dot (in which case that matches only a dot).
9635b9b4fd27Smrgfunc_stripname ()
9636b9b4fd27Smrg{
9637b9b4fd27Smrg  # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
9638b9b4fd27Smrg  # positional parameters, so assign one to ordinary parameter first.
9639b9b4fd27Smrg  func_stripname_result=${3}
9640b9b4fd27Smrg  func_stripname_result=${func_stripname_result#"${1}"}
9641b9b4fd27Smrg  func_stripname_result=${func_stripname_result%"${2}"}
9642b9b4fd27Smrg}
9643caade7ccSmrg
9644b9b4fd27Smrg# func_opt_split
9645b9b4fd27Smrgfunc_opt_split ()
9646b9b4fd27Smrg{
9647b9b4fd27Smrg  func_opt_split_opt=${1%%=*}
9648b9b4fd27Smrg  func_opt_split_arg=${1#*=}
9649b9b4fd27Smrg}
9650caade7ccSmrg
9651b9b4fd27Smrg# func_lo2o object
9652b9b4fd27Smrgfunc_lo2o ()
9653b9b4fd27Smrg{
9654b9b4fd27Smrg  case ${1} in
9655b9b4fd27Smrg    *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
9656b9b4fd27Smrg    *)    func_lo2o_result=${1} ;;
9657b9b4fd27Smrg  esac
9658b9b4fd27Smrg}
9659caade7ccSmrg
9660b9b4fd27Smrg# func_xform libobj-or-source
9661b9b4fd27Smrgfunc_xform ()
9662b9b4fd27Smrg{
9663b9b4fd27Smrg  func_xform_result=${1%.*}.lo
9664b9b4fd27Smrg}
9665caade7ccSmrg
9666b9b4fd27Smrg# func_arith arithmetic-term...
9667b9b4fd27Smrgfunc_arith ()
9668b9b4fd27Smrg{
9669b9b4fd27Smrg  func_arith_result=$(( $[*] ))
9670b9b4fd27Smrg}
9671b9b4fd27Smrg
9672b9b4fd27Smrg# func_len string
9673b9b4fd27Smrg# STRING may not start with a hyphen.
9674b9b4fd27Smrgfunc_len ()
9675b9b4fd27Smrg{
9676b9b4fd27Smrg  func_len_result=${#1}
9677b9b4fd27Smrg}
9678caade7ccSmrg
9679caade7ccSmrg_LT_EOF
9680b9b4fd27Smrg    ;;
9681b9b4fd27Smrg  *) # Bourne compatible functions.
9682b9b4fd27Smrg    cat << \_LT_EOF >> "$cfgfile"
9683caade7ccSmrg
9684b9b4fd27Smrg# func_dirname file append nondir_replacement
9685b9b4fd27Smrg# Compute the dirname of FILE.  If nonempty, add APPEND to the result,
9686b9b4fd27Smrg# otherwise set result to NONDIR_REPLACEMENT.
9687b9b4fd27Smrgfunc_dirname ()
9688b9b4fd27Smrg{
9689b9b4fd27Smrg  # Extract subdirectory from the argument.
9690e8a5466aSmrg  func_dirname_result=`$ECHO "${1}" | $SED "$dirname"`
9691b9b4fd27Smrg  if test "X$func_dirname_result" = "X${1}"; then
9692b9b4fd27Smrg    func_dirname_result="${3}"
9693b9b4fd27Smrg  else
9694b9b4fd27Smrg    func_dirname_result="$func_dirname_result${2}"
9695b9b4fd27Smrg  fi
9696b9b4fd27Smrg}
9697caade7ccSmrg
9698b9b4fd27Smrg# func_basename file
9699b9b4fd27Smrgfunc_basename ()
9700b9b4fd27Smrg{
9701e8a5466aSmrg  func_basename_result=`$ECHO "${1}" | $SED "$basename"`
9702b9b4fd27Smrg}
9703caade7ccSmrg
9704b9b4fd27Smrgdnl func_dirname_and_basename
9705b9b4fd27Smrgdnl A portable version of this function is already defined in general.m4sh
9706b9b4fd27Smrgdnl so there is no need for it here.
9707b9b4fd27Smrg
9708b9b4fd27Smrg# func_stripname prefix suffix name
9709b9b4fd27Smrg# strip PREFIX and SUFFIX off of NAME.
9710b9b4fd27Smrg# PREFIX and SUFFIX must not contain globbing or regex special
9711b9b4fd27Smrg# characters, hashes, percent signs, but SUFFIX may contain a leading
9712b9b4fd27Smrg# dot (in which case that matches only a dot).
9713b9b4fd27Smrg# func_strip_suffix prefix name
9714b9b4fd27Smrgfunc_stripname ()
9715b9b4fd27Smrg{
9716b9b4fd27Smrg  case ${2} in
9717e8a5466aSmrg    .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
9718e8a5466aSmrg    *)  func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
9719b9b4fd27Smrg  esac
9720b9b4fd27Smrg}
9721caade7ccSmrg
9722b9b4fd27Smrg# sed scripts:
9723b9b4fd27Smrgmy_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q'
9724b9b4fd27Smrgmy_sed_long_arg='1s/^-[[^=]]*=//'
9725caade7ccSmrg
9726b9b4fd27Smrg# func_opt_split
9727b9b4fd27Smrgfunc_opt_split ()
9728b9b4fd27Smrg{
9729e8a5466aSmrg  func_opt_split_opt=`$ECHO "${1}" | $SED "$my_sed_long_opt"`
9730e8a5466aSmrg  func_opt_split_arg=`$ECHO "${1}" | $SED "$my_sed_long_arg"`
9731b9b4fd27Smrg}
9732caade7ccSmrg
9733b9b4fd27Smrg# func_lo2o object
9734b9b4fd27Smrgfunc_lo2o ()
9735b9b4fd27Smrg{
9736e8a5466aSmrg  func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"`
9737b9b4fd27Smrg}
9738caade7ccSmrg
9739b9b4fd27Smrg# func_xform libobj-or-source
9740b9b4fd27Smrgfunc_xform ()
9741b9b4fd27Smrg{
9742e8a5466aSmrg  func_xform_result=`$ECHO "${1}" | $SED 's/\.[[^.]]*$/.lo/'`
9743b9b4fd27Smrg}
9744caade7ccSmrg
9745b9b4fd27Smrg# func_arith arithmetic-term...
9746b9b4fd27Smrgfunc_arith ()
9747b9b4fd27Smrg{
9748b9b4fd27Smrg  func_arith_result=`expr "$[@]"`
9749b9b4fd27Smrg}
9750caade7ccSmrg
9751b9b4fd27Smrg# func_len string
9752b9b4fd27Smrg# STRING may not start with a hyphen.
9753b9b4fd27Smrgfunc_len ()
9754b9b4fd27Smrg{
9755b9b4fd27Smrg  func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len`
9756b9b4fd27Smrg}
9757caade7ccSmrg
9758b9b4fd27Smrg_LT_EOF
9759b9b4fd27Smrgesac
9760caade7ccSmrg
9761b9b4fd27Smrgcase $lt_shell_append in
9762b9b4fd27Smrg  yes)
9763b9b4fd27Smrg    cat << \_LT_EOF >> "$cfgfile"
9764caade7ccSmrg
9765b9b4fd27Smrg# func_append var value
9766b9b4fd27Smrg# Append VALUE to the end of shell variable VAR.
9767b9b4fd27Smrgfunc_append ()
9768b9b4fd27Smrg{
9769b9b4fd27Smrg  eval "$[1]+=\$[2]"
9770b9b4fd27Smrg}
9771b9b4fd27Smrg_LT_EOF
9772b9b4fd27Smrg    ;;
9773b9b4fd27Smrg  *)
9774b9b4fd27Smrg    cat << \_LT_EOF >> "$cfgfile"
9775caade7ccSmrg
9776b9b4fd27Smrg# func_append var value
9777b9b4fd27Smrg# Append VALUE to the end of shell variable VAR.
9778b9b4fd27Smrgfunc_append ()
9779b9b4fd27Smrg{
9780b9b4fd27Smrg  eval "$[1]=\$$[1]\$[2]"
9781b9b4fd27Smrg}
9782caade7ccSmrg
9783b9b4fd27Smrg_LT_EOF
9784b9b4fd27Smrg    ;;
9785b9b4fd27Smrg  esac
9786b9b4fd27Smrg])
9787caade7ccSmrg
9788b9b4fd27Smrg# Helper functions for option handling.                    -*- Autoconf -*-
9789b9b4fd27Smrg#
9790e8a5466aSmrg#   Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation,
9791e8a5466aSmrg#   Inc.
9792b9b4fd27Smrg#   Written by Gary V. Vaughan, 2004
9793b9b4fd27Smrg#
9794b9b4fd27Smrg# This file is free software; the Free Software Foundation gives
9795b9b4fd27Smrg# unlimited permission to copy and/or distribute it, with or without
9796b9b4fd27Smrg# modifications, as long as this notice is preserved.
9797caade7ccSmrg
9798e8a5466aSmrg# serial 7 ltoptions.m4
9799caade7ccSmrg
9800b9b4fd27Smrg# This is to help aclocal find these macros, as it can't see m4_define.
9801b9b4fd27SmrgAC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
9802b9b4fd27Smrg
9803b9b4fd27Smrg
9804b9b4fd27Smrg# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
9805b9b4fd27Smrg# ------------------------------------------
9806b9b4fd27Smrgm4_define([_LT_MANGLE_OPTION],
9807b9b4fd27Smrg[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
9808b9b4fd27Smrg
9809b9b4fd27Smrg
9810b9b4fd27Smrg# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
9811b9b4fd27Smrg# ---------------------------------------
9812b9b4fd27Smrg# Set option OPTION-NAME for macro MACRO-NAME, and if there is a
9813b9b4fd27Smrg# matching handler defined, dispatch to it.  Other OPTION-NAMEs are
9814b9b4fd27Smrg# saved as a flag.
9815b9b4fd27Smrgm4_define([_LT_SET_OPTION],
9816b9b4fd27Smrg[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
9817b9b4fd27Smrgm4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
9818b9b4fd27Smrg        _LT_MANGLE_DEFUN([$1], [$2]),
9819b9b4fd27Smrg    [m4_warning([Unknown $1 option `$2'])])[]dnl
9820b9b4fd27Smrg])
9821b9b4fd27Smrg
9822b9b4fd27Smrg
9823b9b4fd27Smrg# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
9824b9b4fd27Smrg# ------------------------------------------------------------
9825b9b4fd27Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
9826b9b4fd27Smrgm4_define([_LT_IF_OPTION],
9827b9b4fd27Smrg[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
9828b9b4fd27Smrg
9829b9b4fd27Smrg
9830b9b4fd27Smrg# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
9831b9b4fd27Smrg# -------------------------------------------------------
9832b9b4fd27Smrg# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
9833b9b4fd27Smrg# are set.
9834b9b4fd27Smrgm4_define([_LT_UNLESS_OPTIONS],
9835b9b4fd27Smrg[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
9836b9b4fd27Smrg	    [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
9837b9b4fd27Smrg		      [m4_define([$0_found])])])[]dnl
9838b9b4fd27Smrgm4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
9839b9b4fd27Smrg])[]dnl
9840b9b4fd27Smrg])
9841caade7ccSmrg
9842caade7ccSmrg
9843b9b4fd27Smrg# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
9844b9b4fd27Smrg# ----------------------------------------
9845b9b4fd27Smrg# OPTION-LIST is a space-separated list of Libtool options associated
9846b9b4fd27Smrg# with MACRO-NAME.  If any OPTION has a matching handler declared with
9847b9b4fd27Smrg# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
9848b9b4fd27Smrg# the unknown option and exit.
9849b9b4fd27Smrgm4_defun([_LT_SET_OPTIONS],
9850b9b4fd27Smrg[# Set options
9851b9b4fd27Smrgm4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
9852b9b4fd27Smrg    [_LT_SET_OPTION([$1], _LT_Option)])
9853b9b4fd27Smrg
9854b9b4fd27Smrgm4_if([$1],[LT_INIT],[
9855b9b4fd27Smrg  dnl
9856b9b4fd27Smrg  dnl Simply set some default values (i.e off) if boolean options were not
9857b9b4fd27Smrg  dnl specified:
9858b9b4fd27Smrg  _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
9859b9b4fd27Smrg  ])
9860b9b4fd27Smrg  _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
9861b9b4fd27Smrg  ])
9862b9b4fd27Smrg  dnl
9863b9b4fd27Smrg  dnl If no reference was made to various pairs of opposing options, then
9864b9b4fd27Smrg  dnl we run the default mode handler for the pair.  For example, if neither
9865b9b4fd27Smrg  dnl `shared' nor `disable-shared' was passed, we enable building of shared
9866b9b4fd27Smrg  dnl archives by default:
9867b9b4fd27Smrg  _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
9868b9b4fd27Smrg  _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
9869b9b4fd27Smrg  _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
9870b9b4fd27Smrg  _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
9871b9b4fd27Smrg  		   [_LT_ENABLE_FAST_INSTALL])
9872b9b4fd27Smrg  ])
9873b9b4fd27Smrg])# _LT_SET_OPTIONS
9874caade7ccSmrg
9875caade7ccSmrg
9876caade7ccSmrg
9877b9b4fd27Smrg# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
9878b9b4fd27Smrg# -----------------------------------------
9879b9b4fd27Smrgm4_define([_LT_MANGLE_DEFUN],
9880b9b4fd27Smrg[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
9881caade7ccSmrg
9882caade7ccSmrg
9883b9b4fd27Smrg# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
9884b9b4fd27Smrg# -----------------------------------------------
9885b9b4fd27Smrgm4_define([LT_OPTION_DEFINE],
9886b9b4fd27Smrg[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
9887b9b4fd27Smrg])# LT_OPTION_DEFINE
9888caade7ccSmrg
9889caade7ccSmrg
9890b9b4fd27Smrg# dlopen
9891b9b4fd27Smrg# ------
9892b9b4fd27SmrgLT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
9893b9b4fd27Smrg])
9894caade7ccSmrg
9895b9b4fd27SmrgAU_DEFUN([AC_LIBTOOL_DLOPEN],
9896b9b4fd27Smrg[_LT_SET_OPTION([LT_INIT], [dlopen])
9897b9b4fd27SmrgAC_DIAGNOSE([obsolete],
9898b9b4fd27Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you
9899b9b4fd27Smrgput the `dlopen' option into LT_INIT's first parameter.])
9900b9b4fd27Smrg])
9901caade7ccSmrg
9902b9b4fd27Smrgdnl aclocal-1.4 backwards compatibility:
9903b9b4fd27Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
9904caade7ccSmrg
9905caade7ccSmrg
9906b9b4fd27Smrg# win32-dll
9907b9b4fd27Smrg# ---------
9908b9b4fd27Smrg# Declare package support for building win32 dll's.
9909b9b4fd27SmrgLT_OPTION_DEFINE([LT_INIT], [win32-dll],
9910b9b4fd27Smrg[enable_win32_dll=yes
9911caade7ccSmrg
9912b9b4fd27Smrgcase $host in
9913e8a5466aSmrg*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
9914b9b4fd27Smrg  AC_CHECK_TOOL(AS, as, false)
9915b9b4fd27Smrg  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
9916b9b4fd27Smrg  AC_CHECK_TOOL(OBJDUMP, objdump, false)
9917b9b4fd27Smrg  ;;
9918b9b4fd27Smrgesac
9919caade7ccSmrg
9920b9b4fd27Smrgtest -z "$AS" && AS=as
9921e8a5466aSmrg_LT_DECL([], [AS],      [1], [Assembler program])dnl
9922caade7ccSmrg
9923b9b4fd27Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool
9924e8a5466aSmrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl
9925caade7ccSmrg
9926b9b4fd27Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump
9927e8a5466aSmrg_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl
9928b9b4fd27Smrg])# win32-dll
9929caade7ccSmrg
9930b9b4fd27SmrgAU_DEFUN([AC_LIBTOOL_WIN32_DLL],
9931b9b4fd27Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
9932b9b4fd27Smrg_LT_SET_OPTION([LT_INIT], [win32-dll])
9933b9b4fd27SmrgAC_DIAGNOSE([obsolete],
9934b9b4fd27Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you
9935b9b4fd27Smrgput the `win32-dll' option into LT_INIT's first parameter.])
9936b9b4fd27Smrg])
9937caade7ccSmrg
9938b9b4fd27Smrgdnl aclocal-1.4 backwards compatibility:
9939b9b4fd27Smrgdnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
9940caade7ccSmrg
9941caade7ccSmrg
9942b9b4fd27Smrg# _LT_ENABLE_SHARED([DEFAULT])
9943b9b4fd27Smrg# ----------------------------
9944b9b4fd27Smrg# implement the --enable-shared flag, and supports the `shared' and
9945b9b4fd27Smrg# `disable-shared' LT_INIT options.
9946b9b4fd27Smrg# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
9947b9b4fd27Smrgm4_define([_LT_ENABLE_SHARED],
9948b9b4fd27Smrg[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
9949b9b4fd27SmrgAC_ARG_ENABLE([shared],
9950b9b4fd27Smrg    [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
9951b9b4fd27Smrg	[build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
9952b9b4fd27Smrg    [p=${PACKAGE-default}
9953b9b4fd27Smrg    case $enableval in
9954b9b4fd27Smrg    yes) enable_shared=yes ;;
9955b9b4fd27Smrg    no) enable_shared=no ;;
9956b9b4fd27Smrg    *)
9957b9b4fd27Smrg      enable_shared=no
9958b9b4fd27Smrg      # Look at the argument we got.  We use all the common list separators.
9959b9b4fd27Smrg      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
9960b9b4fd27Smrg      for pkg in $enableval; do
9961b9b4fd27Smrg	IFS="$lt_save_ifs"
9962b9b4fd27Smrg	if test "X$pkg" = "X$p"; then
9963b9b4fd27Smrg	  enable_shared=yes
9964b9b4fd27Smrg	fi
9965b9b4fd27Smrg      done
9966b9b4fd27Smrg      IFS="$lt_save_ifs"
9967caade7ccSmrg      ;;
9968b9b4fd27Smrg    esac],
9969b9b4fd27Smrg    [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
9970caade7ccSmrg
9971b9b4fd27Smrg    _LT_DECL([build_libtool_libs], [enable_shared], [0],
9972b9b4fd27Smrg	[Whether or not to build shared libraries])
9973b9b4fd27Smrg])# _LT_ENABLE_SHARED
9974caade7ccSmrg
9975b9b4fd27SmrgLT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
9976b9b4fd27SmrgLT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
9977caade7ccSmrg
9978b9b4fd27Smrg# Old names:
9979b9b4fd27SmrgAC_DEFUN([AC_ENABLE_SHARED],
9980b9b4fd27Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
9981b9b4fd27Smrg])
9982caade7ccSmrg
9983b9b4fd27SmrgAC_DEFUN([AC_DISABLE_SHARED],
9984b9b4fd27Smrg[_LT_SET_OPTION([LT_INIT], [disable-shared])
9985b9b4fd27Smrg])
9986caade7ccSmrg
9987b9b4fd27SmrgAU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
9988b9b4fd27SmrgAU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
9989b9b4fd27Smrg
9990b9b4fd27Smrgdnl aclocal-1.4 backwards compatibility:
9991b9b4fd27Smrgdnl AC_DEFUN([AM_ENABLE_SHARED], [])
9992b9b4fd27Smrgdnl AC_DEFUN([AM_DISABLE_SHARED], [])
9993caade7ccSmrg
9994caade7ccSmrg
9995caade7ccSmrg
9996b9b4fd27Smrg# _LT_ENABLE_STATIC([DEFAULT])
9997b9b4fd27Smrg# ----------------------------
9998b9b4fd27Smrg# implement the --enable-static flag, and support the `static' and
9999b9b4fd27Smrg# `disable-static' LT_INIT options.
10000b9b4fd27Smrg# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
10001b9b4fd27Smrgm4_define([_LT_ENABLE_STATIC],
10002b9b4fd27Smrg[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
10003b9b4fd27SmrgAC_ARG_ENABLE([static],
10004b9b4fd27Smrg    [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
10005b9b4fd27Smrg	[build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
10006b9b4fd27Smrg    [p=${PACKAGE-default}
10007b9b4fd27Smrg    case $enableval in
10008b9b4fd27Smrg    yes) enable_static=yes ;;
10009b9b4fd27Smrg    no) enable_static=no ;;
10010caade7ccSmrg    *)
10011b9b4fd27Smrg     enable_static=no
10012b9b4fd27Smrg      # Look at the argument we got.  We use all the common list separators.
10013b9b4fd27Smrg      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
10014b9b4fd27Smrg      for pkg in $enableval; do
10015b9b4fd27Smrg	IFS="$lt_save_ifs"
10016b9b4fd27Smrg	if test "X$pkg" = "X$p"; then
10017b9b4fd27Smrg	  enable_static=yes
10018b9b4fd27Smrg	fi
10019b9b4fd27Smrg      done
10020b9b4fd27Smrg      IFS="$lt_save_ifs"
10021caade7ccSmrg      ;;
10022b9b4fd27Smrg    esac],
10023b9b4fd27Smrg    [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
10024caade7ccSmrg
10025b9b4fd27Smrg    _LT_DECL([build_old_libs], [enable_static], [0],
10026b9b4fd27Smrg	[Whether or not to build static libraries])
10027b9b4fd27Smrg])# _LT_ENABLE_STATIC
10028caade7ccSmrg
10029b9b4fd27SmrgLT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
10030b9b4fd27SmrgLT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
10031caade7ccSmrg
10032b9b4fd27Smrg# Old names:
10033b9b4fd27SmrgAC_DEFUN([AC_ENABLE_STATIC],
10034b9b4fd27Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
10035b9b4fd27Smrg])
10036caade7ccSmrg
10037b9b4fd27SmrgAC_DEFUN([AC_DISABLE_STATIC],
10038b9b4fd27Smrg[_LT_SET_OPTION([LT_INIT], [disable-static])
10039b9b4fd27Smrg])
10040caade7ccSmrg
10041b9b4fd27SmrgAU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
10042b9b4fd27SmrgAU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
10043b9b4fd27Smrg
10044b9b4fd27Smrgdnl aclocal-1.4 backwards compatibility:
10045b9b4fd27Smrgdnl AC_DEFUN([AM_ENABLE_STATIC], [])
10046b9b4fd27Smrgdnl AC_DEFUN([AM_DISABLE_STATIC], [])
10047caade7ccSmrg
10048caade7ccSmrg
10049caade7ccSmrg
10050b9b4fd27Smrg# _LT_ENABLE_FAST_INSTALL([DEFAULT])
10051b9b4fd27Smrg# ----------------------------------
10052b9b4fd27Smrg# implement the --enable-fast-install flag, and support the `fast-install'
10053b9b4fd27Smrg# and `disable-fast-install' LT_INIT options.
10054b9b4fd27Smrg# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
10055b9b4fd27Smrgm4_define([_LT_ENABLE_FAST_INSTALL],
10056b9b4fd27Smrg[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
10057b9b4fd27SmrgAC_ARG_ENABLE([fast-install],
10058b9b4fd27Smrg    [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
10059b9b4fd27Smrg    [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
10060b9b4fd27Smrg    [p=${PACKAGE-default}
10061b9b4fd27Smrg    case $enableval in
10062b9b4fd27Smrg    yes) enable_fast_install=yes ;;
10063b9b4fd27Smrg    no) enable_fast_install=no ;;
10064b9b4fd27Smrg    *)
10065b9b4fd27Smrg      enable_fast_install=no
10066b9b4fd27Smrg      # Look at the argument we got.  We use all the common list separators.
10067b9b4fd27Smrg      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
10068b9b4fd27Smrg      for pkg in $enableval; do
10069b9b4fd27Smrg	IFS="$lt_save_ifs"
10070b9b4fd27Smrg	if test "X$pkg" = "X$p"; then
10071b9b4fd27Smrg	  enable_fast_install=yes
10072b9b4fd27Smrg	fi
10073b9b4fd27Smrg      done
10074b9b4fd27Smrg      IFS="$lt_save_ifs"
10075b9b4fd27Smrg      ;;
10076b9b4fd27Smrg    esac],
10077b9b4fd27Smrg    [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
10078caade7ccSmrg
10079b9b4fd27Smrg_LT_DECL([fast_install], [enable_fast_install], [0],
10080b9b4fd27Smrg	 [Whether or not to optimize for fast installation])dnl
10081b9b4fd27Smrg])# _LT_ENABLE_FAST_INSTALL
10082caade7ccSmrg
10083b9b4fd27SmrgLT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
10084b9b4fd27SmrgLT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
10085caade7ccSmrg
10086b9b4fd27Smrg# Old names:
10087b9b4fd27SmrgAU_DEFUN([AC_ENABLE_FAST_INSTALL],
10088b9b4fd27Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
10089b9b4fd27SmrgAC_DIAGNOSE([obsolete],
10090b9b4fd27Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put
10091b9b4fd27Smrgthe `fast-install' option into LT_INIT's first parameter.])
10092caade7ccSmrg])
10093caade7ccSmrg
10094b9b4fd27SmrgAU_DEFUN([AC_DISABLE_FAST_INSTALL],
10095b9b4fd27Smrg[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
10096b9b4fd27SmrgAC_DIAGNOSE([obsolete],
10097b9b4fd27Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put
10098b9b4fd27Smrgthe `disable-fast-install' option into LT_INIT's first parameter.])
10099caade7ccSmrg])
10100caade7ccSmrg
10101b9b4fd27Smrgdnl aclocal-1.4 backwards compatibility:
10102b9b4fd27Smrgdnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
10103b9b4fd27Smrgdnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
10104485f0483Smrg
10105485f0483Smrg
10106b9b4fd27Smrg# _LT_WITH_PIC([MODE])
10107b9b4fd27Smrg# --------------------
10108b9b4fd27Smrg# implement the --with-pic flag, and support the `pic-only' and `no-pic'
10109b9b4fd27Smrg# LT_INIT options.
10110b9b4fd27Smrg# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
10111b9b4fd27Smrgm4_define([_LT_WITH_PIC],
10112b9b4fd27Smrg[AC_ARG_WITH([pic],
10113b9b4fd27Smrg    [AS_HELP_STRING([--with-pic],
10114b9b4fd27Smrg	[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
10115b9b4fd27Smrg    [pic_mode="$withval"],
10116b9b4fd27Smrg    [pic_mode=default])
10117485f0483Smrg
10118b9b4fd27Smrgtest -z "$pic_mode" && pic_mode=m4_default([$1], [default])
10119485f0483Smrg
10120b9b4fd27Smrg_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
10121b9b4fd27Smrg])# _LT_WITH_PIC
10122b9b4fd27Smrg
10123b9b4fd27SmrgLT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
10124b9b4fd27SmrgLT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
10125b9b4fd27Smrg
10126b9b4fd27Smrg# Old name:
10127b9b4fd27SmrgAU_DEFUN([AC_LIBTOOL_PICMODE],
10128b9b4fd27Smrg[_LT_SET_OPTION([LT_INIT], [pic-only])
10129b9b4fd27SmrgAC_DIAGNOSE([obsolete],
10130b9b4fd27Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you
10131b9b4fd27Smrgput the `pic-only' option into LT_INIT's first parameter.])
10132caade7ccSmrg])
10133caade7ccSmrg
10134b9b4fd27Smrgdnl aclocal-1.4 backwards compatibility:
10135b9b4fd27Smrgdnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
10136caade7ccSmrg
10137caade7ccSmrg
10138b9b4fd27Smrgm4_define([_LTDL_MODE], [])
10139b9b4fd27SmrgLT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
10140b9b4fd27Smrg		 [m4_define([_LTDL_MODE], [nonrecursive])])
10141b9b4fd27SmrgLT_OPTION_DEFINE([LTDL_INIT], [recursive],
10142b9b4fd27Smrg		 [m4_define([_LTDL_MODE], [recursive])])
10143b9b4fd27SmrgLT_OPTION_DEFINE([LTDL_INIT], [subproject],
10144b9b4fd27Smrg		 [m4_define([_LTDL_MODE], [subproject])])
10145b9b4fd27Smrg
10146b9b4fd27Smrgm4_define([_LTDL_TYPE], [])
10147b9b4fd27SmrgLT_OPTION_DEFINE([LTDL_INIT], [installable],
10148b9b4fd27Smrg		 [m4_define([_LTDL_TYPE], [installable])])
10149b9b4fd27SmrgLT_OPTION_DEFINE([LTDL_INIT], [convenience],
10150b9b4fd27Smrg		 [m4_define([_LTDL_TYPE], [convenience])])
10151b9b4fd27Smrg
10152b9b4fd27Smrg# ltsugar.m4 -- libtool m4 base layer.                         -*-Autoconf-*-
10153caade7ccSmrg#
10154b9b4fd27Smrg# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
10155b9b4fd27Smrg# Written by Gary V. Vaughan, 2004
10156caade7ccSmrg#
10157b9b4fd27Smrg# This file is free software; the Free Software Foundation gives
10158b9b4fd27Smrg# unlimited permission to copy and/or distribute it, with or without
10159b9b4fd27Smrg# modifications, as long as this notice is preserved.
10160caade7ccSmrg
10161b9b4fd27Smrg# serial 6 ltsugar.m4
10162caade7ccSmrg
10163b9b4fd27Smrg# This is to help aclocal find these macros, as it can't see m4_define.
10164b9b4fd27SmrgAC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
10165caade7ccSmrg
10166b9b4fd27Smrg
10167b9b4fd27Smrg# lt_join(SEP, ARG1, [ARG2...])
10168485f0483Smrg# -----------------------------
10169b9b4fd27Smrg# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
10170b9b4fd27Smrg# associated separator.
10171b9b4fd27Smrg# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
10172b9b4fd27Smrg# versions in m4sugar had bugs.
10173b9b4fd27Smrgm4_define([lt_join],
10174b9b4fd27Smrg[m4_if([$#], [1], [],
10175b9b4fd27Smrg       [$#], [2], [[$2]],
10176b9b4fd27Smrg       [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
10177b9b4fd27Smrgm4_define([_lt_join],
10178b9b4fd27Smrg[m4_if([$#$2], [2], [],
10179b9b4fd27Smrg       [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
10180b9b4fd27Smrg
10181b9b4fd27Smrg
10182b9b4fd27Smrg# lt_car(LIST)
10183b9b4fd27Smrg# lt_cdr(LIST)
10184b9b4fd27Smrg# ------------
10185b9b4fd27Smrg# Manipulate m4 lists.
10186b9b4fd27Smrg# These macros are necessary as long as will still need to support
10187b9b4fd27Smrg# Autoconf-2.59 which quotes differently.
10188b9b4fd27Smrgm4_define([lt_car], [[$1]])
10189b9b4fd27Smrgm4_define([lt_cdr],
10190b9b4fd27Smrg[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
10191b9b4fd27Smrg       [$#], 1, [],
10192b9b4fd27Smrg       [m4_dquote(m4_shift($@))])])
10193b9b4fd27Smrgm4_define([lt_unquote], $1)
10194b9b4fd27Smrg
10195b9b4fd27Smrg
10196b9b4fd27Smrg# lt_append(MACRO-NAME, STRING, [SEPARATOR])
10197b9b4fd27Smrg# ------------------------------------------
10198b9b4fd27Smrg# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
10199b9b4fd27Smrg# Note that neither SEPARATOR nor STRING are expanded; they are appended
10200b9b4fd27Smrg# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
10201b9b4fd27Smrg# No SEPARATOR is output if MACRO-NAME was previously undefined (different
10202b9b4fd27Smrg# than defined and empty).
10203b9b4fd27Smrg#
10204b9b4fd27Smrg# This macro is needed until we can rely on Autoconf 2.62, since earlier
10205b9b4fd27Smrg# versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
10206b9b4fd27Smrgm4_define([lt_append],
10207b9b4fd27Smrg[m4_define([$1],
10208b9b4fd27Smrg	   m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
10209b9b4fd27Smrg
10210b9b4fd27Smrg
10211b9b4fd27Smrg
10212b9b4fd27Smrg# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
10213b9b4fd27Smrg# ----------------------------------------------------------
10214b9b4fd27Smrg# Produce a SEP delimited list of all paired combinations of elements of
10215b9b4fd27Smrg# PREFIX-LIST with SUFFIX1 through SUFFIXn.  Each element of the list
10216b9b4fd27Smrg# has the form PREFIXmINFIXSUFFIXn.
10217b9b4fd27Smrg# Needed until we can rely on m4_combine added in Autoconf 2.62.
10218b9b4fd27Smrgm4_define([lt_combine],
10219b9b4fd27Smrg[m4_if(m4_eval([$# > 3]), [1],
10220b9b4fd27Smrg       [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
10221b9b4fd27Smrg[[m4_foreach([_Lt_prefix], [$2],
10222b9b4fd27Smrg	     [m4_foreach([_Lt_suffix],
10223b9b4fd27Smrg		]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
10224b9b4fd27Smrg	[_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
10225b9b4fd27Smrg
10226b9b4fd27Smrg
10227b9b4fd27Smrg# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
10228b9b4fd27Smrg# -----------------------------------------------------------------------
10229b9b4fd27Smrg# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
10230b9b4fd27Smrg# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
10231b9b4fd27Smrgm4_define([lt_if_append_uniq],
10232b9b4fd27Smrg[m4_ifdef([$1],
10233b9b4fd27Smrg	  [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
10234b9b4fd27Smrg		 [lt_append([$1], [$2], [$3])$4],
10235b9b4fd27Smrg		 [$5])],
10236b9b4fd27Smrg	  [lt_append([$1], [$2], [$3])$4])])
10237b9b4fd27Smrg
10238b9b4fd27Smrg
10239b9b4fd27Smrg# lt_dict_add(DICT, KEY, VALUE)
10240b9b4fd27Smrg# -----------------------------
10241b9b4fd27Smrgm4_define([lt_dict_add],
10242b9b4fd27Smrg[m4_define([$1($2)], [$3])])
10243485f0483Smrg
10244485f0483Smrg
10245b9b4fd27Smrg# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
10246b9b4fd27Smrg# --------------------------------------------
10247b9b4fd27Smrgm4_define([lt_dict_add_subkey],
10248b9b4fd27Smrg[m4_define([$1($2:$3)], [$4])])
10249caade7ccSmrg
10250caade7ccSmrg
10251b9b4fd27Smrg# lt_dict_fetch(DICT, KEY, [SUBKEY])
10252b9b4fd27Smrg# ----------------------------------
10253b9b4fd27Smrgm4_define([lt_dict_fetch],
10254b9b4fd27Smrg[m4_ifval([$3],
10255b9b4fd27Smrg	m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
10256b9b4fd27Smrg    m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
10257caade7ccSmrg
10258485f0483Smrg
10259b9b4fd27Smrg# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
10260b9b4fd27Smrg# -----------------------------------------------------------------
10261b9b4fd27Smrgm4_define([lt_if_dict_fetch],
10262b9b4fd27Smrg[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
10263b9b4fd27Smrg	[$5],
10264b9b4fd27Smrg    [$6])])
10265caade7ccSmrg
10266485f0483Smrg
10267b9b4fd27Smrg# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
10268b9b4fd27Smrg# --------------------------------------------------------------
10269b9b4fd27Smrgm4_define([lt_dict_filter],
10270b9b4fd27Smrg[m4_if([$5], [], [],
10271b9b4fd27Smrg  [lt_join(m4_quote(m4_default([$4], [[, ]])),
10272b9b4fd27Smrg           lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
10273b9b4fd27Smrg		      [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
10274b9b4fd27Smrg])
10275485f0483Smrg
10276b9b4fd27Smrg# ltversion.m4 -- version numbers			-*- Autoconf -*-
10277b9b4fd27Smrg#
10278b9b4fd27Smrg#   Copyright (C) 2004 Free Software Foundation, Inc.
10279b9b4fd27Smrg#   Written by Scott James Remnant, 2004
10280b9b4fd27Smrg#
10281b9b4fd27Smrg# This file is free software; the Free Software Foundation gives
10282b9b4fd27Smrg# unlimited permission to copy and/or distribute it, with or without
10283b9b4fd27Smrg# modifications, as long as this notice is preserved.
10284caade7ccSmrg
10285b9b4fd27Smrg# Generated from ltversion.in.
10286caade7ccSmrg
10287e8a5466aSmrg# serial 3175 ltversion.m4
10288b9b4fd27Smrg# This file is part of GNU Libtool
10289caade7ccSmrg
10290e8a5466aSmrgm4_define([LT_PACKAGE_VERSION], [2.2.10])
10291e8a5466aSmrgm4_define([LT_PACKAGE_REVISION], [1.3175])
10292b9b4fd27Smrg
10293b9b4fd27SmrgAC_DEFUN([LTVERSION_VERSION],
10294e8a5466aSmrg[macro_version='2.2.10'
10295e8a5466aSmrgmacro_revision='1.3175'
10296b9b4fd27Smrg_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
10297b9b4fd27Smrg_LT_DECL(, macro_revision, 0)
10298b9b4fd27Smrg])
10299b9b4fd27Smrg
10300b9b4fd27Smrg# lt~obsolete.m4 -- aclocal satisfying obsolete definitions.    -*-Autoconf-*-
10301b9b4fd27Smrg#
10302e8a5466aSmrg#   Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
10303b9b4fd27Smrg#   Written by Scott James Remnant, 2004.
10304b9b4fd27Smrg#
10305b9b4fd27Smrg# This file is free software; the Free Software Foundation gives
10306b9b4fd27Smrg# unlimited permission to copy and/or distribute it, with or without
10307b9b4fd27Smrg# modifications, as long as this notice is preserved.
10308b9b4fd27Smrg
10309e8a5466aSmrg# serial 5 lt~obsolete.m4
10310b9b4fd27Smrg
10311b9b4fd27Smrg# These exist entirely to fool aclocal when bootstrapping libtool.
10312b9b4fd27Smrg#
10313b9b4fd27Smrg# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
10314b9b4fd27Smrg# which have later been changed to m4_define as they aren't part of the
10315b9b4fd27Smrg# exported API, or moved to Autoconf or Automake where they belong.
10316b9b4fd27Smrg#
10317b9b4fd27Smrg# The trouble is, aclocal is a bit thick.  It'll see the old AC_DEFUN
10318b9b4fd27Smrg# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
10319b9b4fd27Smrg# using a macro with the same name in our local m4/libtool.m4 it'll
10320b9b4fd27Smrg# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
10321b9b4fd27Smrg# and doesn't know about Autoconf macros at all.)
10322b9b4fd27Smrg#
10323b9b4fd27Smrg# So we provide this file, which has a silly filename so it's always
10324b9b4fd27Smrg# included after everything else.  This provides aclocal with the
10325b9b4fd27Smrg# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
10326b9b4fd27Smrg# because those macros already exist, or will be overwritten later.
10327b9b4fd27Smrg# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 
10328b9b4fd27Smrg#
10329b9b4fd27Smrg# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
10330b9b4fd27Smrg# Yes, that means every name once taken will need to remain here until
10331b9b4fd27Smrg# we give up compatibility with versions before 1.7, at which point
10332b9b4fd27Smrg# we need to keep only those names which we still refer to.
10333b9b4fd27Smrg
10334b9b4fd27Smrg# This is to help aclocal find these macros, as it can't see m4_define.
10335b9b4fd27SmrgAC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
10336b9b4fd27Smrg
10337b9b4fd27Smrgm4_ifndef([AC_LIBTOOL_LINKER_OPTION],	[AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
10338b9b4fd27Smrgm4_ifndef([AC_PROG_EGREP],		[AC_DEFUN([AC_PROG_EGREP])])
10339b9b4fd27Smrgm4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH],	[AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
10340b9b4fd27Smrgm4_ifndef([_LT_AC_SHELL_INIT],		[AC_DEFUN([_LT_AC_SHELL_INIT])])
10341b9b4fd27Smrgm4_ifndef([_LT_AC_SYS_LIBPATH_AIX],	[AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
10342b9b4fd27Smrgm4_ifndef([_LT_PROG_LTMAIN],		[AC_DEFUN([_LT_PROG_LTMAIN])])
10343b9b4fd27Smrgm4_ifndef([_LT_AC_TAGVAR],		[AC_DEFUN([_LT_AC_TAGVAR])])
10344b9b4fd27Smrgm4_ifndef([AC_LTDL_ENABLE_INSTALL],	[AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
10345b9b4fd27Smrgm4_ifndef([AC_LTDL_PREOPEN],		[AC_DEFUN([AC_LTDL_PREOPEN])])
10346b9b4fd27Smrgm4_ifndef([_LT_AC_SYS_COMPILER],	[AC_DEFUN([_LT_AC_SYS_COMPILER])])
10347b9b4fd27Smrgm4_ifndef([_LT_AC_LOCK],		[AC_DEFUN([_LT_AC_LOCK])])
10348b9b4fd27Smrgm4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE],	[AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
10349b9b4fd27Smrgm4_ifndef([_LT_AC_TRY_DLOPEN_SELF],	[AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
10350b9b4fd27Smrgm4_ifndef([AC_LIBTOOL_PROG_CC_C_O],	[AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
10351b9b4fd27Smrgm4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
10352b9b4fd27Smrgm4_ifndef([AC_LIBTOOL_OBJDIR],		[AC_DEFUN([AC_LIBTOOL_OBJDIR])])
10353b9b4fd27Smrgm4_ifndef([AC_LTDL_OBJDIR],		[AC_DEFUN([AC_LTDL_OBJDIR])])
10354b9b4fd27Smrgm4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
10355b9b4fd27Smrgm4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP],	[AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
10356b9b4fd27Smrgm4_ifndef([AC_PATH_MAGIC],		[AC_DEFUN([AC_PATH_MAGIC])])
10357b9b4fd27Smrgm4_ifndef([AC_PROG_LD_GNU],		[AC_DEFUN([AC_PROG_LD_GNU])])
10358b9b4fd27Smrgm4_ifndef([AC_PROG_LD_RELOAD_FLAG],	[AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
10359b9b4fd27Smrgm4_ifndef([AC_DEPLIBS_CHECK_METHOD],	[AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
10360b9b4fd27Smrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
10361b9b4fd27Smrgm4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
10362b9b4fd27Smrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
10363b9b4fd27Smrgm4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS],	[AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
10364b9b4fd27Smrgm4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP],	[AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
10365b9b4fd27Smrgm4_ifndef([LT_AC_PROG_EGREP],		[AC_DEFUN([LT_AC_PROG_EGREP])])
10366b9b4fd27Smrgm4_ifndef([LT_AC_PROG_SED],		[AC_DEFUN([LT_AC_PROG_SED])])
10367b9b4fd27Smrgm4_ifndef([_LT_CC_BASENAME],		[AC_DEFUN([_LT_CC_BASENAME])])
10368b9b4fd27Smrgm4_ifndef([_LT_COMPILER_BOILERPLATE],	[AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
10369b9b4fd27Smrgm4_ifndef([_LT_LINKER_BOILERPLATE],	[AC_DEFUN([_LT_LINKER_BOILERPLATE])])
10370b9b4fd27Smrgm4_ifndef([_AC_PROG_LIBTOOL],		[AC_DEFUN([_AC_PROG_LIBTOOL])])
10371b9b4fd27Smrgm4_ifndef([AC_LIBTOOL_SETUP],		[AC_DEFUN([AC_LIBTOOL_SETUP])])
10372b9b4fd27Smrgm4_ifndef([_LT_AC_CHECK_DLFCN],		[AC_DEFUN([_LT_AC_CHECK_DLFCN])])
10373b9b4fd27Smrgm4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER],	[AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
10374b9b4fd27Smrgm4_ifndef([_LT_AC_TAGCONFIG],		[AC_DEFUN([_LT_AC_TAGCONFIG])])
10375b9b4fd27Smrgm4_ifndef([AC_DISABLE_FAST_INSTALL],	[AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
10376b9b4fd27Smrgm4_ifndef([_LT_AC_LANG_CXX],		[AC_DEFUN([_LT_AC_LANG_CXX])])
10377b9b4fd27Smrgm4_ifndef([_LT_AC_LANG_F77],		[AC_DEFUN([_LT_AC_LANG_F77])])
10378b9b4fd27Smrgm4_ifndef([_LT_AC_LANG_GCJ],		[AC_DEFUN([_LT_AC_LANG_GCJ])])
10379b9b4fd27Smrgm4_ifndef([AC_LIBTOOL_LANG_C_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
10380b9b4fd27Smrgm4_ifndef([_LT_AC_LANG_C_CONFIG],	[AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
10381b9b4fd27Smrgm4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
10382b9b4fd27Smrgm4_ifndef([_LT_AC_LANG_CXX_CONFIG],	[AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
10383b9b4fd27Smrgm4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
10384b9b4fd27Smrgm4_ifndef([_LT_AC_LANG_F77_CONFIG],	[AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
10385b9b4fd27Smrgm4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
10386b9b4fd27Smrgm4_ifndef([_LT_AC_LANG_GCJ_CONFIG],	[AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
10387b9b4fd27Smrgm4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
10388b9b4fd27Smrgm4_ifndef([_LT_AC_LANG_RC_CONFIG],	[AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
10389b9b4fd27Smrgm4_ifndef([AC_LIBTOOL_CONFIG],		[AC_DEFUN([AC_LIBTOOL_CONFIG])])
10390b9b4fd27Smrgm4_ifndef([_LT_AC_FILE_LTDLL_C],	[AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
10391e8a5466aSmrgm4_ifndef([_LT_REQUIRED_DARWIN_CHECKS],	[AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
10392e8a5466aSmrgm4_ifndef([_LT_AC_PROG_CXXCPP],		[AC_DEFUN([_LT_AC_PROG_CXXCPP])])
10393e8a5466aSmrgm4_ifndef([_LT_PREPARE_SED_QUOTE_VARS],	[AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
10394e8a5466aSmrgm4_ifndef([_LT_PROG_ECHO_BACKSLASH],	[AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
10395e8a5466aSmrgm4_ifndef([_LT_PROG_F77],		[AC_DEFUN([_LT_PROG_F77])])
10396e8a5466aSmrgm4_ifndef([_LT_PROG_FC],		[AC_DEFUN([_LT_PROG_FC])])
10397e8a5466aSmrgm4_ifndef([_LT_PROG_CXX],		[AC_DEFUN([_LT_PROG_CXX])])
10398caade7ccSmrg
10399