aclocal.m4 revision 145b7b3c
1145b7b3cSmrg# generated automatically by aclocal 1.10 -*- Autoconf -*-
2145b7b3cSmrg
3145b7b3cSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4145b7b3cSmrg# 2005, 2006  Free Software Foundation, Inc.
5145b7b3cSmrg# This file is free software; the Free Software Foundation
6145b7b3cSmrg# gives unlimited permission to copy and/or distribute it,
7145b7b3cSmrg# with or without modifications, as long as this notice is preserved.
8145b7b3cSmrg
9145b7b3cSmrg# This program is distributed in the hope that it will be useful,
10145b7b3cSmrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11145b7b3cSmrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12145b7b3cSmrg# PARTICULAR PURPOSE.
13145b7b3cSmrg
14145b7b3cSmrgm4_if(m4_PACKAGE_VERSION, [2.61],,
15145b7b3cSmrg[m4_fatal([this file was generated for autoconf 2.61.
16145b7b3cSmrgYou have another version of autoconf.  If you want to use that,
17145b7b3cSmrgyou should regenerate the build system entirely.], [63])])
18145b7b3cSmrg
19145b7b3cSmrg# Copyright (C) 2002, 2003, 2005, 2006  Free Software Foundation, Inc.
20145b7b3cSmrg#
21145b7b3cSmrg# This file is free software; the Free Software Foundation
22145b7b3cSmrg# gives unlimited permission to copy and/or distribute it,
23145b7b3cSmrg# with or without modifications, as long as this notice is preserved.
24145b7b3cSmrg
25145b7b3cSmrg# AM_AUTOMAKE_VERSION(VERSION)
26145b7b3cSmrg# ----------------------------
27145b7b3cSmrg# Automake X.Y traces this macro to ensure aclocal.m4 has been
28145b7b3cSmrg# generated from the m4 files accompanying Automake X.Y.
29145b7b3cSmrg# (This private macro should not be called outside this file.)
30145b7b3cSmrgAC_DEFUN([AM_AUTOMAKE_VERSION],
31145b7b3cSmrg[am__api_version='1.10'
32145b7b3cSmrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
33145b7b3cSmrgdnl require some minimum version.  Point them to the right macro.
34145b7b3cSmrgm4_if([$1], [1.10], [],
35145b7b3cSmrg      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
36145b7b3cSmrg])
37145b7b3cSmrg
38145b7b3cSmrg# _AM_AUTOCONF_VERSION(VERSION)
39145b7b3cSmrg# -----------------------------
40145b7b3cSmrg# aclocal traces this macro to find the Autoconf version.
41145b7b3cSmrg# This is a private macro too.  Using m4_define simplifies
42145b7b3cSmrg# the logic in aclocal, which can simply ignore this definition.
43145b7b3cSmrgm4_define([_AM_AUTOCONF_VERSION], [])
44145b7b3cSmrg
45145b7b3cSmrg# AM_SET_CURRENT_AUTOMAKE_VERSION
46145b7b3cSmrg# -------------------------------
47145b7b3cSmrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
48145b7b3cSmrg# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
49145b7b3cSmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
50145b7b3cSmrg[AM_AUTOMAKE_VERSION([1.10])dnl
51145b7b3cSmrg_AM_AUTOCONF_VERSION(m4_PACKAGE_VERSION)])
52145b7b3cSmrg
53145b7b3cSmrg# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
54145b7b3cSmrg
55145b7b3cSmrg# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
56145b7b3cSmrg#
57145b7b3cSmrg# This file is free software; the Free Software Foundation
58145b7b3cSmrg# gives unlimited permission to copy and/or distribute it,
59145b7b3cSmrg# with or without modifications, as long as this notice is preserved.
60145b7b3cSmrg
61145b7b3cSmrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
62145b7b3cSmrg# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
63145b7b3cSmrg# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
64145b7b3cSmrg#
65145b7b3cSmrg# Of course, Automake must honor this variable whenever it calls a
66145b7b3cSmrg# tool from the auxiliary directory.  The problem is that $srcdir (and
67145b7b3cSmrg# therefore $ac_aux_dir as well) can be either absolute or relative,
68145b7b3cSmrg# depending on how configure is run.  This is pretty annoying, since
69145b7b3cSmrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top
70145b7b3cSmrg# source directory, any form will work fine, but in subdirectories a
71145b7b3cSmrg# relative path needs to be adjusted first.
72145b7b3cSmrg#
73145b7b3cSmrg# $ac_aux_dir/missing
74145b7b3cSmrg#    fails when called from a subdirectory if $ac_aux_dir is relative
75145b7b3cSmrg# $top_srcdir/$ac_aux_dir/missing
76145b7b3cSmrg#    fails if $ac_aux_dir is absolute,
77145b7b3cSmrg#    fails when called from a subdirectory in a VPATH build with
78145b7b3cSmrg#          a relative $ac_aux_dir
79145b7b3cSmrg#
80145b7b3cSmrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
81145b7b3cSmrg# are both prefixed by $srcdir.  In an in-source build this is usually
82145b7b3cSmrg# harmless because $srcdir is `.', but things will broke when you
83145b7b3cSmrg# start a VPATH build or use an absolute $srcdir.
84145b7b3cSmrg#
85145b7b3cSmrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
86145b7b3cSmrg# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
87145b7b3cSmrg#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
88145b7b3cSmrg# and then we would define $MISSING as
89145b7b3cSmrg#   MISSING="\${SHELL} $am_aux_dir/missing"
90145b7b3cSmrg# This will work as long as MISSING is not called from configure, because
91145b7b3cSmrg# unfortunately $(top_srcdir) has no meaning in configure.
92145b7b3cSmrg# However there are other variables, like CC, which are often used in
93145b7b3cSmrg# configure, and could therefore not use this "fixed" $ac_aux_dir.
94145b7b3cSmrg#
95145b7b3cSmrg# Another solution, used here, is to always expand $ac_aux_dir to an
96145b7b3cSmrg# absolute PATH.  The drawback is that using absolute paths prevent a
97145b7b3cSmrg# configured tree to be moved without reconfiguration.
98145b7b3cSmrg
99145b7b3cSmrgAC_DEFUN([AM_AUX_DIR_EXPAND],
100145b7b3cSmrg[dnl Rely on autoconf to set up CDPATH properly.
101145b7b3cSmrgAC_PREREQ([2.50])dnl
102145b7b3cSmrg# expand $ac_aux_dir to an absolute path
103145b7b3cSmrgam_aux_dir=`cd $ac_aux_dir && pwd`
104145b7b3cSmrg])
105145b7b3cSmrg
106145b7b3cSmrg# AM_CONDITIONAL                                            -*- Autoconf -*-
107145b7b3cSmrg
108145b7b3cSmrg# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006
109145b7b3cSmrg# Free Software Foundation, Inc.
110145b7b3cSmrg#
111145b7b3cSmrg# This file is free software; the Free Software Foundation
112145b7b3cSmrg# gives unlimited permission to copy and/or distribute it,
113145b7b3cSmrg# with or without modifications, as long as this notice is preserved.
114145b7b3cSmrg
115145b7b3cSmrg# serial 8
116145b7b3cSmrg
117145b7b3cSmrg# AM_CONDITIONAL(NAME, SHELL-CONDITION)
118145b7b3cSmrg# -------------------------------------
119145b7b3cSmrg# Define a conditional.
120145b7b3cSmrgAC_DEFUN([AM_CONDITIONAL],
121145b7b3cSmrg[AC_PREREQ(2.52)dnl
122145b7b3cSmrg ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
123145b7b3cSmrg	[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
124145b7b3cSmrgAC_SUBST([$1_TRUE])dnl
125145b7b3cSmrgAC_SUBST([$1_FALSE])dnl
126145b7b3cSmrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl
127145b7b3cSmrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl
128145b7b3cSmrgif $2; then
129145b7b3cSmrg  $1_TRUE=
130145b7b3cSmrg  $1_FALSE='#'
131145b7b3cSmrgelse
132145b7b3cSmrg  $1_TRUE='#'
133145b7b3cSmrg  $1_FALSE=
134145b7b3cSmrgfi
135145b7b3cSmrgAC_CONFIG_COMMANDS_PRE(
136145b7b3cSmrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
137145b7b3cSmrg  AC_MSG_ERROR([[conditional "$1" was never defined.
138145b7b3cSmrgUsually this means the macro was only invoked conditionally.]])
139145b7b3cSmrgfi])])
140145b7b3cSmrg
141145b7b3cSmrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
142145b7b3cSmrg# Free Software Foundation, Inc.
143145b7b3cSmrg#
144145b7b3cSmrg# This file is free software; the Free Software Foundation
145145b7b3cSmrg# gives unlimited permission to copy and/or distribute it,
146145b7b3cSmrg# with or without modifications, as long as this notice is preserved.
147145b7b3cSmrg
148145b7b3cSmrg# serial 9
149145b7b3cSmrg
150145b7b3cSmrg# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
151145b7b3cSmrg# written in clear, in which case automake, when reading aclocal.m4,
152145b7b3cSmrg# will think it sees a *use*, and therefore will trigger all it's
153145b7b3cSmrg# C support machinery.  Also note that it means that autoscan, seeing
154145b7b3cSmrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
155145b7b3cSmrg
156145b7b3cSmrg
157145b7b3cSmrg# _AM_DEPENDENCIES(NAME)
158145b7b3cSmrg# ----------------------
159145b7b3cSmrg# See how the compiler implements dependency checking.
160145b7b3cSmrg# NAME is "CC", "CXX", "GCJ", or "OBJC".
161145b7b3cSmrg# We try a few techniques and use that to set a single cache variable.
162145b7b3cSmrg#
163145b7b3cSmrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
164145b7b3cSmrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
165145b7b3cSmrg# dependency, and given that the user is not expected to run this macro,
166145b7b3cSmrg# just rely on AC_PROG_CC.
167145b7b3cSmrgAC_DEFUN([_AM_DEPENDENCIES],
168145b7b3cSmrg[AC_REQUIRE([AM_SET_DEPDIR])dnl
169145b7b3cSmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
170145b7b3cSmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl
171145b7b3cSmrgAC_REQUIRE([AM_DEP_TRACK])dnl
172145b7b3cSmrg
173145b7b3cSmrgifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
174145b7b3cSmrg       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
175145b7b3cSmrg       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
176145b7b3cSmrg       [$1], UPC,  [depcc="$UPC"  am_compiler_list=],
177145b7b3cSmrg       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
178145b7b3cSmrg                   [depcc="$$1"   am_compiler_list=])
179145b7b3cSmrg
180145b7b3cSmrgAC_CACHE_CHECK([dependency style of $depcc],
181145b7b3cSmrg               [am_cv_$1_dependencies_compiler_type],
182145b7b3cSmrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
183145b7b3cSmrg  # We make a subdir and do the tests there.  Otherwise we can end up
184145b7b3cSmrg  # making bogus files that we don't know about and never remove.  For
185145b7b3cSmrg  # instance it was reported that on HP-UX the gcc test will end up
186145b7b3cSmrg  # making a dummy file named `D' -- because `-MD' means `put the output
187145b7b3cSmrg  # in D'.
188145b7b3cSmrg  mkdir conftest.dir
189145b7b3cSmrg  # Copy depcomp to subdir because otherwise we won't find it if we're
190145b7b3cSmrg  # using a relative directory.
191145b7b3cSmrg  cp "$am_depcomp" conftest.dir
192145b7b3cSmrg  cd conftest.dir
193145b7b3cSmrg  # We will build objects and dependencies in a subdirectory because
194145b7b3cSmrg  # it helps to detect inapplicable dependency modes.  For instance
195145b7b3cSmrg  # both Tru64's cc and ICC support -MD to output dependencies as a
196145b7b3cSmrg  # side effect of compilation, but ICC will put the dependencies in
197145b7b3cSmrg  # the current directory while Tru64 will put them in the object
198145b7b3cSmrg  # directory.
199145b7b3cSmrg  mkdir sub
200145b7b3cSmrg
201145b7b3cSmrg  am_cv_$1_dependencies_compiler_type=none
202145b7b3cSmrg  if test "$am_compiler_list" = ""; then
203145b7b3cSmrg     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
204145b7b3cSmrg  fi
205145b7b3cSmrg  for depmode in $am_compiler_list; do
206145b7b3cSmrg    # Setup a source with many dependencies, because some compilers
207145b7b3cSmrg    # like to wrap large dependency lists on column 80 (with \), and
208145b7b3cSmrg    # we should not choose a depcomp mode which is confused by this.
209145b7b3cSmrg    #
210145b7b3cSmrg    # We need to recreate these files for each test, as the compiler may
211145b7b3cSmrg    # overwrite some of them when testing with obscure command lines.
212145b7b3cSmrg    # This happens at least with the AIX C compiler.
213145b7b3cSmrg    : > sub/conftest.c
214145b7b3cSmrg    for i in 1 2 3 4 5 6; do
215145b7b3cSmrg      echo '#include "conftst'$i'.h"' >> sub/conftest.c
216145b7b3cSmrg      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
217145b7b3cSmrg      # Solaris 8's {/usr,}/bin/sh.
218145b7b3cSmrg      touch sub/conftst$i.h
219145b7b3cSmrg    done
220145b7b3cSmrg    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
221145b7b3cSmrg
222145b7b3cSmrg    case $depmode in
223145b7b3cSmrg    nosideeffect)
224145b7b3cSmrg      # after this tag, mechanisms are not by side-effect, so they'll
225145b7b3cSmrg      # only be used when explicitly requested
226145b7b3cSmrg      if test "x$enable_dependency_tracking" = xyes; then
227145b7b3cSmrg	continue
228145b7b3cSmrg      else
229145b7b3cSmrg	break
230145b7b3cSmrg      fi
231145b7b3cSmrg      ;;
232145b7b3cSmrg    none) break ;;
233145b7b3cSmrg    esac
234145b7b3cSmrg    # We check with `-c' and `-o' for the sake of the "dashmstdout"
235145b7b3cSmrg    # mode.  It turns out that the SunPro C++ compiler does not properly
236145b7b3cSmrg    # handle `-M -o', and we need to detect this.
237145b7b3cSmrg    if depmode=$depmode \
238145b7b3cSmrg       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
239145b7b3cSmrg       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
240145b7b3cSmrg       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
241145b7b3cSmrg         >/dev/null 2>conftest.err &&
242145b7b3cSmrg       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
243145b7b3cSmrg       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
244145b7b3cSmrg       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
245145b7b3cSmrg       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
246145b7b3cSmrg      # icc doesn't choke on unknown options, it will just issue warnings
247145b7b3cSmrg      # or remarks (even with -Werror).  So we grep stderr for any message
248145b7b3cSmrg      # that says an option was ignored or not supported.
249145b7b3cSmrg      # When given -MP, icc 7.0 and 7.1 complain thusly:
250145b7b3cSmrg      #   icc: Command line warning: ignoring option '-M'; no argument required
251145b7b3cSmrg      # The diagnosis changed in icc 8.0:
252145b7b3cSmrg      #   icc: Command line remark: option '-MP' not supported
253145b7b3cSmrg      if (grep 'ignoring option' conftest.err ||
254145b7b3cSmrg          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
255145b7b3cSmrg        am_cv_$1_dependencies_compiler_type=$depmode
256145b7b3cSmrg        break
257145b7b3cSmrg      fi
258145b7b3cSmrg    fi
259145b7b3cSmrg  done
260145b7b3cSmrg
261145b7b3cSmrg  cd ..
262145b7b3cSmrg  rm -rf conftest.dir
263145b7b3cSmrgelse
264145b7b3cSmrg  am_cv_$1_dependencies_compiler_type=none
265145b7b3cSmrgfi
266145b7b3cSmrg])
267145b7b3cSmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
268145b7b3cSmrgAM_CONDITIONAL([am__fastdep$1], [
269145b7b3cSmrg  test "x$enable_dependency_tracking" != xno \
270145b7b3cSmrg  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
271145b7b3cSmrg])
272145b7b3cSmrg
273145b7b3cSmrg
274145b7b3cSmrg# AM_SET_DEPDIR
275145b7b3cSmrg# -------------
276145b7b3cSmrg# Choose a directory name for dependency files.
277145b7b3cSmrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES
278145b7b3cSmrgAC_DEFUN([AM_SET_DEPDIR],
279145b7b3cSmrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
280145b7b3cSmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
281145b7b3cSmrg])
282145b7b3cSmrg
283145b7b3cSmrg
284145b7b3cSmrg# AM_DEP_TRACK
285145b7b3cSmrg# ------------
286145b7b3cSmrgAC_DEFUN([AM_DEP_TRACK],
287145b7b3cSmrg[AC_ARG_ENABLE(dependency-tracking,
288145b7b3cSmrg[  --disable-dependency-tracking  speeds up one-time build
289145b7b3cSmrg  --enable-dependency-tracking   do not reject slow dependency extractors])
290145b7b3cSmrgif test "x$enable_dependency_tracking" != xno; then
291145b7b3cSmrg  am_depcomp="$ac_aux_dir/depcomp"
292145b7b3cSmrg  AMDEPBACKSLASH='\'
293145b7b3cSmrgfi
294145b7b3cSmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
295145b7b3cSmrgAC_SUBST([AMDEPBACKSLASH])dnl
296145b7b3cSmrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
297145b7b3cSmrg])
298145b7b3cSmrg
299145b7b3cSmrg# Generate code to set up dependency tracking.              -*- Autoconf -*-
300145b7b3cSmrg
301145b7b3cSmrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
302145b7b3cSmrg# Free Software Foundation, Inc.
303145b7b3cSmrg#
304145b7b3cSmrg# This file is free software; the Free Software Foundation
305145b7b3cSmrg# gives unlimited permission to copy and/or distribute it,
306145b7b3cSmrg# with or without modifications, as long as this notice is preserved.
307145b7b3cSmrg
308145b7b3cSmrg#serial 3
309145b7b3cSmrg
310145b7b3cSmrg# _AM_OUTPUT_DEPENDENCY_COMMANDS
311145b7b3cSmrg# ------------------------------
312145b7b3cSmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
313145b7b3cSmrg[for mf in $CONFIG_FILES; do
314145b7b3cSmrg  # Strip MF so we end up with the name of the file.
315145b7b3cSmrg  mf=`echo "$mf" | sed -e 's/:.*$//'`
316145b7b3cSmrg  # Check whether this is an Automake generated Makefile or not.
317145b7b3cSmrg  # We used to match only the files named `Makefile.in', but
318145b7b3cSmrg  # some people rename them; so instead we look at the file content.
319145b7b3cSmrg  # Grep'ing the first line is not enough: some people post-process
320145b7b3cSmrg  # each Makefile.in and add a new line on top of each file to say so.
321145b7b3cSmrg  # Grep'ing the whole file is not good either: AIX grep has a line
322145b7b3cSmrg  # limit of 2048, but all sed's we know have understand at least 4000.
323145b7b3cSmrg  if sed 10q "$mf" | grep '^#.*generated by automake' > /dev/null 2>&1; then
324145b7b3cSmrg    dirpart=`AS_DIRNAME("$mf")`
325145b7b3cSmrg  else
326145b7b3cSmrg    continue
327145b7b3cSmrg  fi
328145b7b3cSmrg  # Extract the definition of DEPDIR, am__include, and am__quote
329145b7b3cSmrg  # from the Makefile without running `make'.
330145b7b3cSmrg  DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
331145b7b3cSmrg  test -z "$DEPDIR" && continue
332145b7b3cSmrg  am__include=`sed -n 's/^am__include = //p' < "$mf"`
333145b7b3cSmrg  test -z "am__include" && continue
334145b7b3cSmrg  am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
335145b7b3cSmrg  # When using ansi2knr, U may be empty or an underscore; expand it
336145b7b3cSmrg  U=`sed -n 's/^U = //p' < "$mf"`
337145b7b3cSmrg  # Find all dependency output files, they are included files with
338145b7b3cSmrg  # $(DEPDIR) in their names.  We invoke sed twice because it is the
339145b7b3cSmrg  # simplest approach to changing $(DEPDIR) to its actual value in the
340145b7b3cSmrg  # expansion.
341145b7b3cSmrg  for file in `sed -n "
342145b7b3cSmrg    s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
343145b7b3cSmrg       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
344145b7b3cSmrg    # Make sure the directory exists.
345145b7b3cSmrg    test -f "$dirpart/$file" && continue
346145b7b3cSmrg    fdir=`AS_DIRNAME(["$file"])`
347145b7b3cSmrg    AS_MKDIR_P([$dirpart/$fdir])
348145b7b3cSmrg    # echo "creating $dirpart/$file"
349145b7b3cSmrg    echo '# dummy' > "$dirpart/$file"
350145b7b3cSmrg  done
351145b7b3cSmrgdone
352145b7b3cSmrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS
353145b7b3cSmrg
354145b7b3cSmrg
355145b7b3cSmrg# AM_OUTPUT_DEPENDENCY_COMMANDS
356145b7b3cSmrg# -----------------------------
357145b7b3cSmrg# This macro should only be invoked once -- use via AC_REQUIRE.
358145b7b3cSmrg#
359145b7b3cSmrg# This code is only required when automatic dependency tracking
360145b7b3cSmrg# is enabled.  FIXME.  This creates each `.P' file that we will
361145b7b3cSmrg# need in order to bootstrap the dependency handling code.
362145b7b3cSmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
363145b7b3cSmrg[AC_CONFIG_COMMANDS([depfiles],
364145b7b3cSmrg     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
365145b7b3cSmrg     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
366145b7b3cSmrg])
367145b7b3cSmrg
368145b7b3cSmrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
369145b7b3cSmrg# Free Software Foundation, Inc.
370145b7b3cSmrg#
371145b7b3cSmrg# This file is free software; the Free Software Foundation
372145b7b3cSmrg# gives unlimited permission to copy and/or distribute it,
373145b7b3cSmrg# with or without modifications, as long as this notice is preserved.
374145b7b3cSmrg
375145b7b3cSmrg# serial 8
376145b7b3cSmrg
377145b7b3cSmrg# AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
378145b7b3cSmrgAU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
379145b7b3cSmrg
380145b7b3cSmrg# Do all the work for Automake.                             -*- Autoconf -*-
381145b7b3cSmrg
382145b7b3cSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
383145b7b3cSmrg# 2005, 2006 Free Software Foundation, Inc.
384145b7b3cSmrg#
385145b7b3cSmrg# This file is free software; the Free Software Foundation
386145b7b3cSmrg# gives unlimited permission to copy and/or distribute it,
387145b7b3cSmrg# with or without modifications, as long as this notice is preserved.
388145b7b3cSmrg
389145b7b3cSmrg# serial 12
390145b7b3cSmrg
391145b7b3cSmrg# This macro actually does too much.  Some checks are only needed if
392145b7b3cSmrg# your package does certain things.  But this isn't really a big deal.
393145b7b3cSmrg
394145b7b3cSmrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
395145b7b3cSmrg# AM_INIT_AUTOMAKE([OPTIONS])
396145b7b3cSmrg# -----------------------------------------------
397145b7b3cSmrg# The call with PACKAGE and VERSION arguments is the old style
398145b7b3cSmrg# call (pre autoconf-2.50), which is being phased out.  PACKAGE
399145b7b3cSmrg# and VERSION should now be passed to AC_INIT and removed from
400145b7b3cSmrg# the call to AM_INIT_AUTOMAKE.
401145b7b3cSmrg# We support both call styles for the transition.  After
402145b7b3cSmrg# the next Automake release, Autoconf can make the AC_INIT
403145b7b3cSmrg# arguments mandatory, and then we can depend on a new Autoconf
404145b7b3cSmrg# release and drop the old call support.
405145b7b3cSmrgAC_DEFUN([AM_INIT_AUTOMAKE],
406145b7b3cSmrg[AC_PREREQ([2.60])dnl
407145b7b3cSmrgdnl Autoconf wants to disallow AM_ names.  We explicitly allow
408145b7b3cSmrgdnl the ones we care about.
409145b7b3cSmrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
410145b7b3cSmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
411145b7b3cSmrgAC_REQUIRE([AC_PROG_INSTALL])dnl
412145b7b3cSmrgif test "`cd $srcdir && pwd`" != "`pwd`"; then
413145b7b3cSmrg  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
414145b7b3cSmrg  # is not polluted with repeated "-I."
415145b7b3cSmrg  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
416145b7b3cSmrg  # test to see if srcdir already configured
417145b7b3cSmrg  if test -f $srcdir/config.status; then
418145b7b3cSmrg    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
419145b7b3cSmrg  fi
420145b7b3cSmrgfi
421145b7b3cSmrg
422145b7b3cSmrg# test whether we have cygpath
423145b7b3cSmrgif test -z "$CYGPATH_W"; then
424145b7b3cSmrg  if (cygpath --version) >/dev/null 2>/dev/null; then
425145b7b3cSmrg    CYGPATH_W='cygpath -w'
426145b7b3cSmrg  else
427145b7b3cSmrg    CYGPATH_W=echo
428145b7b3cSmrg  fi
429145b7b3cSmrgfi
430145b7b3cSmrgAC_SUBST([CYGPATH_W])
431145b7b3cSmrg
432145b7b3cSmrg# Define the identity of the package.
433145b7b3cSmrgdnl Distinguish between old-style and new-style calls.
434145b7b3cSmrgm4_ifval([$2],
435145b7b3cSmrg[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
436145b7b3cSmrg AC_SUBST([PACKAGE], [$1])dnl
437145b7b3cSmrg AC_SUBST([VERSION], [$2])],
438145b7b3cSmrg[_AM_SET_OPTIONS([$1])dnl
439145b7b3cSmrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
440145b7b3cSmrgm4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
441145b7b3cSmrg  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
442145b7b3cSmrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
443145b7b3cSmrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
444145b7b3cSmrg
445145b7b3cSmrg_AM_IF_OPTION([no-define],,
446145b7b3cSmrg[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
447145b7b3cSmrg AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
448145b7b3cSmrg
449145b7b3cSmrg# Some tools Automake needs.
450145b7b3cSmrgAC_REQUIRE([AM_SANITY_CHECK])dnl
451145b7b3cSmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl
452145b7b3cSmrgAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
453145b7b3cSmrgAM_MISSING_PROG(AUTOCONF, autoconf)
454145b7b3cSmrgAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
455145b7b3cSmrgAM_MISSING_PROG(AUTOHEADER, autoheader)
456145b7b3cSmrgAM_MISSING_PROG(MAKEINFO, makeinfo)
457145b7b3cSmrgAM_PROG_INSTALL_SH
458145b7b3cSmrgAM_PROG_INSTALL_STRIP
459145b7b3cSmrgAC_REQUIRE([AM_PROG_MKDIR_P])dnl
460145b7b3cSmrg# We need awk for the "check" target.  The system "awk" is bad on
461145b7b3cSmrg# some platforms.
462145b7b3cSmrgAC_REQUIRE([AC_PROG_AWK])dnl
463145b7b3cSmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl
464145b7b3cSmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl
465145b7b3cSmrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
466145b7b3cSmrg              [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
467145b7b3cSmrg	      		     [_AM_PROG_TAR([v7])])])
468145b7b3cSmrg_AM_IF_OPTION([no-dependencies],,
469145b7b3cSmrg[AC_PROVIDE_IFELSE([AC_PROG_CC],
470145b7b3cSmrg                  [_AM_DEPENDENCIES(CC)],
471145b7b3cSmrg                  [define([AC_PROG_CC],
472145b7b3cSmrg                          defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
473145b7b3cSmrgAC_PROVIDE_IFELSE([AC_PROG_CXX],
474145b7b3cSmrg                  [_AM_DEPENDENCIES(CXX)],
475145b7b3cSmrg                  [define([AC_PROG_CXX],
476145b7b3cSmrg                          defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
477145b7b3cSmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC],
478145b7b3cSmrg                  [_AM_DEPENDENCIES(OBJC)],
479145b7b3cSmrg                  [define([AC_PROG_OBJC],
480145b7b3cSmrg                          defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
481145b7b3cSmrg])
482145b7b3cSmrg])
483145b7b3cSmrg
484145b7b3cSmrg
485145b7b3cSmrg# When config.status generates a header, we must update the stamp-h file.
486145b7b3cSmrg# This file resides in the same directory as the config header
487145b7b3cSmrg# that is generated.  The stamp files are numbered to have different names.
488145b7b3cSmrg
489145b7b3cSmrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
490145b7b3cSmrg# loop where config.status creates the headers, so we can generate
491145b7b3cSmrg# our stamp files there.
492145b7b3cSmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
493145b7b3cSmrg[# Compute $1's index in $config_headers.
494145b7b3cSmrg_am_stamp_count=1
495145b7b3cSmrgfor _am_header in $config_headers :; do
496145b7b3cSmrg  case $_am_header in
497145b7b3cSmrg    $1 | $1:* )
498145b7b3cSmrg      break ;;
499145b7b3cSmrg    * )
500145b7b3cSmrg      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
501145b7b3cSmrg  esac
502145b7b3cSmrgdone
503145b7b3cSmrgecho "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
504145b7b3cSmrg
505145b7b3cSmrg# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
506145b7b3cSmrg#
507145b7b3cSmrg# This file is free software; the Free Software Foundation
508145b7b3cSmrg# gives unlimited permission to copy and/or distribute it,
509145b7b3cSmrg# with or without modifications, as long as this notice is preserved.
510145b7b3cSmrg
511145b7b3cSmrg# AM_PROG_INSTALL_SH
512145b7b3cSmrg# ------------------
513145b7b3cSmrg# Define $install_sh.
514145b7b3cSmrgAC_DEFUN([AM_PROG_INSTALL_SH],
515145b7b3cSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
516145b7b3cSmrginstall_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"}
517145b7b3cSmrgAC_SUBST(install_sh)])
518145b7b3cSmrg
519145b7b3cSmrg# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
520145b7b3cSmrg#
521145b7b3cSmrg# This file is free software; the Free Software Foundation
522145b7b3cSmrg# gives unlimited permission to copy and/or distribute it,
523145b7b3cSmrg# with or without modifications, as long as this notice is preserved.
524145b7b3cSmrg
525145b7b3cSmrg# serial 2
526145b7b3cSmrg
527145b7b3cSmrg# Check whether the underlying file-system supports filenames
528145b7b3cSmrg# with a leading dot.  For instance MS-DOS doesn't.
529145b7b3cSmrgAC_DEFUN([AM_SET_LEADING_DOT],
530145b7b3cSmrg[rm -rf .tst 2>/dev/null
531145b7b3cSmrgmkdir .tst 2>/dev/null
532145b7b3cSmrgif test -d .tst; then
533145b7b3cSmrg  am__leading_dot=.
534145b7b3cSmrgelse
535145b7b3cSmrg  am__leading_dot=_
536145b7b3cSmrgfi
537145b7b3cSmrgrmdir .tst 2>/dev/null
538145b7b3cSmrgAC_SUBST([am__leading_dot])])
539145b7b3cSmrg
540145b7b3cSmrg# Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
541145b7b3cSmrg# From Jim Meyering
542145b7b3cSmrg
543145b7b3cSmrg# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005
544145b7b3cSmrg# Free Software Foundation, Inc.
545145b7b3cSmrg#
546145b7b3cSmrg# This file is free software; the Free Software Foundation
547145b7b3cSmrg# gives unlimited permission to copy and/or distribute it,
548145b7b3cSmrg# with or without modifications, as long as this notice is preserved.
549145b7b3cSmrg
550145b7b3cSmrg# serial 4
551145b7b3cSmrg
552145b7b3cSmrgAC_DEFUN([AM_MAINTAINER_MODE],
553145b7b3cSmrg[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
554145b7b3cSmrg  dnl maintainer-mode is disabled by default
555145b7b3cSmrg  AC_ARG_ENABLE(maintainer-mode,
556145b7b3cSmrg[  --enable-maintainer-mode  enable make rules and dependencies not useful
557145b7b3cSmrg			  (and sometimes confusing) to the casual installer],
558145b7b3cSmrg      USE_MAINTAINER_MODE=$enableval,
559145b7b3cSmrg      USE_MAINTAINER_MODE=no)
560145b7b3cSmrg  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
561145b7b3cSmrg  AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
562145b7b3cSmrg  MAINT=$MAINTAINER_MODE_TRUE
563145b7b3cSmrg  AC_SUBST(MAINT)dnl
564145b7b3cSmrg]
565145b7b3cSmrg)
566145b7b3cSmrg
567145b7b3cSmrgAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
568145b7b3cSmrg
569145b7b3cSmrg# Check to see how 'make' treats includes.	            -*- Autoconf -*-
570145b7b3cSmrg
571145b7b3cSmrg# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
572145b7b3cSmrg#
573145b7b3cSmrg# This file is free software; the Free Software Foundation
574145b7b3cSmrg# gives unlimited permission to copy and/or distribute it,
575145b7b3cSmrg# with or without modifications, as long as this notice is preserved.
576145b7b3cSmrg
577145b7b3cSmrg# serial 3
578145b7b3cSmrg
579145b7b3cSmrg# AM_MAKE_INCLUDE()
580145b7b3cSmrg# -----------------
581145b7b3cSmrg# Check to see how make treats includes.
582145b7b3cSmrgAC_DEFUN([AM_MAKE_INCLUDE],
583145b7b3cSmrg[am_make=${MAKE-make}
584145b7b3cSmrgcat > confinc << 'END'
585145b7b3cSmrgam__doit:
586145b7b3cSmrg	@echo done
587145b7b3cSmrg.PHONY: am__doit
588145b7b3cSmrgEND
589145b7b3cSmrg# If we don't find an include directive, just comment out the code.
590145b7b3cSmrgAC_MSG_CHECKING([for style of include used by $am_make])
591145b7b3cSmrgam__include="#"
592145b7b3cSmrgam__quote=
593145b7b3cSmrg_am_result=none
594145b7b3cSmrg# First try GNU make style include.
595145b7b3cSmrgecho "include confinc" > confmf
596145b7b3cSmrg# We grep out `Entering directory' and `Leaving directory'
597145b7b3cSmrg# messages which can occur if `w' ends up in MAKEFLAGS.
598145b7b3cSmrg# In particular we don't look at `^make:' because GNU make might
599145b7b3cSmrg# be invoked under some other name (usually "gmake"), in which
600145b7b3cSmrg# case it prints its new name instead of `make'.
601145b7b3cSmrgif test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
602145b7b3cSmrg   am__include=include
603145b7b3cSmrg   am__quote=
604145b7b3cSmrg   _am_result=GNU
605145b7b3cSmrgfi
606145b7b3cSmrg# Now try BSD make style include.
607145b7b3cSmrgif test "$am__include" = "#"; then
608145b7b3cSmrg   echo '.include "confinc"' > confmf
609145b7b3cSmrg   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
610145b7b3cSmrg      am__include=.include
611145b7b3cSmrg      am__quote="\""
612145b7b3cSmrg      _am_result=BSD
613145b7b3cSmrg   fi
614145b7b3cSmrgfi
615145b7b3cSmrgAC_SUBST([am__include])
616145b7b3cSmrgAC_SUBST([am__quote])
617145b7b3cSmrgAC_MSG_RESULT([$_am_result])
618145b7b3cSmrgrm -f confinc confmf
619145b7b3cSmrg])
620145b7b3cSmrg
621145b7b3cSmrg# Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005
622145b7b3cSmrg# Free Software Foundation, Inc.
623145b7b3cSmrg#
624145b7b3cSmrg# This file is free software; the Free Software Foundation
625145b7b3cSmrg# gives unlimited permission to copy and/or distribute it,
626145b7b3cSmrg# with or without modifications, as long as this notice is preserved.
627145b7b3cSmrg
628145b7b3cSmrg# serial 5
629145b7b3cSmrg
630145b7b3cSmrg# AM_PROG_CC_C_O
631145b7b3cSmrg# --------------
632145b7b3cSmrg# Like AC_PROG_CC_C_O, but changed for automake.
633145b7b3cSmrgAC_DEFUN([AM_PROG_CC_C_O],
634145b7b3cSmrg[AC_REQUIRE([AC_PROG_CC_C_O])dnl
635145b7b3cSmrgAC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
636145b7b3cSmrgAC_REQUIRE_AUX_FILE([compile])dnl
637145b7b3cSmrg# FIXME: we rely on the cache variable name because
638145b7b3cSmrg# there is no other way.
639145b7b3cSmrgset dummy $CC
640145b7b3cSmrgac_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']`
641145b7b3cSmrgif eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" != yes"; then
642145b7b3cSmrg   # Losing compiler, so override with the script.
643145b7b3cSmrg   # FIXME: It is wrong to rewrite CC.
644145b7b3cSmrg   # But if we don't then we get into trouble of one sort or another.
645145b7b3cSmrg   # A longer-term fix would be to have automake use am__CC in this case,
646145b7b3cSmrg   # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
647145b7b3cSmrg   CC="$am_aux_dir/compile $CC"
648145b7b3cSmrgfi
649145b7b3cSmrgdnl Make sure AC_PROG_CC is never called again, or it will override our
650145b7b3cSmrgdnl setting of CC.
651145b7b3cSmrgm4_define([AC_PROG_CC],
652145b7b3cSmrg          [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])])
653145b7b3cSmrg])
654145b7b3cSmrg
655145b7b3cSmrg# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
656145b7b3cSmrg
657145b7b3cSmrg# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005
658145b7b3cSmrg# Free Software Foundation, Inc.
659145b7b3cSmrg#
660145b7b3cSmrg# This file is free software; the Free Software Foundation
661145b7b3cSmrg# gives unlimited permission to copy and/or distribute it,
662145b7b3cSmrg# with or without modifications, as long as this notice is preserved.
663145b7b3cSmrg
664145b7b3cSmrg# serial 5
665145b7b3cSmrg
666145b7b3cSmrg# AM_MISSING_PROG(NAME, PROGRAM)
667145b7b3cSmrg# ------------------------------
668145b7b3cSmrgAC_DEFUN([AM_MISSING_PROG],
669145b7b3cSmrg[AC_REQUIRE([AM_MISSING_HAS_RUN])
670145b7b3cSmrg$1=${$1-"${am_missing_run}$2"}
671145b7b3cSmrgAC_SUBST($1)])
672145b7b3cSmrg
673145b7b3cSmrg
674145b7b3cSmrg# AM_MISSING_HAS_RUN
675145b7b3cSmrg# ------------------
676145b7b3cSmrg# Define MISSING if not defined so far and test if it supports --run.
677145b7b3cSmrg# If it does, set am_missing_run to use it, otherwise, to nothing.
678145b7b3cSmrgAC_DEFUN([AM_MISSING_HAS_RUN],
679145b7b3cSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
680145b7b3cSmrgAC_REQUIRE_AUX_FILE([missing])dnl
681145b7b3cSmrgtest x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
682145b7b3cSmrg# Use eval to expand $SHELL
683145b7b3cSmrgif eval "$MISSING --run true"; then
684145b7b3cSmrg  am_missing_run="$MISSING --run "
685145b7b3cSmrgelse
686145b7b3cSmrg  am_missing_run=
687145b7b3cSmrg  AC_MSG_WARN([`missing' script is too old or missing])
688145b7b3cSmrgfi
689145b7b3cSmrg])
690145b7b3cSmrg
691145b7b3cSmrg# Copyright (C) 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
692145b7b3cSmrg#
693145b7b3cSmrg# This file is free software; the Free Software Foundation
694145b7b3cSmrg# gives unlimited permission to copy and/or distribute it,
695145b7b3cSmrg# with or without modifications, as long as this notice is preserved.
696145b7b3cSmrg
697145b7b3cSmrg# AM_PROG_MKDIR_P
698145b7b3cSmrg# ---------------
699145b7b3cSmrg# Check for `mkdir -p'.
700145b7b3cSmrgAC_DEFUN([AM_PROG_MKDIR_P],
701145b7b3cSmrg[AC_PREREQ([2.60])dnl
702145b7b3cSmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl
703145b7b3cSmrgdnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
704145b7b3cSmrgdnl while keeping a definition of mkdir_p for backward compatibility.
705145b7b3cSmrgdnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
706145b7b3cSmrgdnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
707145b7b3cSmrgdnl Makefile.ins that do not define MKDIR_P, so we do our own
708145b7b3cSmrgdnl adjustment using top_builddir (which is defined more often than
709145b7b3cSmrgdnl MKDIR_P).
710145b7b3cSmrgAC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
711145b7b3cSmrgcase $mkdir_p in
712145b7b3cSmrg  [[\\/$]]* | ?:[[\\/]]*) ;;
713145b7b3cSmrg  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
714145b7b3cSmrgesac
715145b7b3cSmrg])
716145b7b3cSmrg
717145b7b3cSmrg# Helper functions for option handling.                     -*- Autoconf -*-
718145b7b3cSmrg
719145b7b3cSmrg# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
720145b7b3cSmrg#
721145b7b3cSmrg# This file is free software; the Free Software Foundation
722145b7b3cSmrg# gives unlimited permission to copy and/or distribute it,
723145b7b3cSmrg# with or without modifications, as long as this notice is preserved.
724145b7b3cSmrg
725145b7b3cSmrg# serial 3
726145b7b3cSmrg
727145b7b3cSmrg# _AM_MANGLE_OPTION(NAME)
728145b7b3cSmrg# -----------------------
729145b7b3cSmrgAC_DEFUN([_AM_MANGLE_OPTION],
730145b7b3cSmrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
731145b7b3cSmrg
732145b7b3cSmrg# _AM_SET_OPTION(NAME)
733145b7b3cSmrg# ------------------------------
734145b7b3cSmrg# Set option NAME.  Presently that only means defining a flag for this option.
735145b7b3cSmrgAC_DEFUN([_AM_SET_OPTION],
736145b7b3cSmrg[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
737145b7b3cSmrg
738145b7b3cSmrg# _AM_SET_OPTIONS(OPTIONS)
739145b7b3cSmrg# ----------------------------------
740145b7b3cSmrg# OPTIONS is a space-separated list of Automake options.
741145b7b3cSmrgAC_DEFUN([_AM_SET_OPTIONS],
742145b7b3cSmrg[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
743145b7b3cSmrg
744145b7b3cSmrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
745145b7b3cSmrg# -------------------------------------------
746145b7b3cSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
747145b7b3cSmrgAC_DEFUN([_AM_IF_OPTION],
748145b7b3cSmrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
749145b7b3cSmrg
750145b7b3cSmrg# Check to make sure that the build environment is sane.    -*- Autoconf -*-
751145b7b3cSmrg
752145b7b3cSmrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
753145b7b3cSmrg# Free Software Foundation, Inc.
754145b7b3cSmrg#
755145b7b3cSmrg# This file is free software; the Free Software Foundation
756145b7b3cSmrg# gives unlimited permission to copy and/or distribute it,
757145b7b3cSmrg# with or without modifications, as long as this notice is preserved.
758145b7b3cSmrg
759145b7b3cSmrg# serial 4
760145b7b3cSmrg
761145b7b3cSmrg# AM_SANITY_CHECK
762145b7b3cSmrg# ---------------
763145b7b3cSmrgAC_DEFUN([AM_SANITY_CHECK],
764145b7b3cSmrg[AC_MSG_CHECKING([whether build environment is sane])
765145b7b3cSmrg# Just in case
766145b7b3cSmrgsleep 1
767145b7b3cSmrgecho timestamp > conftest.file
768145b7b3cSmrg# Do `set' in a subshell so we don't clobber the current shell's
769145b7b3cSmrg# arguments.  Must try -L first in case configure is actually a
770145b7b3cSmrg# symlink; some systems play weird games with the mod time of symlinks
771145b7b3cSmrg# (eg FreeBSD returns the mod time of the symlink's containing
772145b7b3cSmrg# directory).
773145b7b3cSmrgif (
774145b7b3cSmrg   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
775145b7b3cSmrg   if test "$[*]" = "X"; then
776145b7b3cSmrg      # -L didn't work.
777145b7b3cSmrg      set X `ls -t $srcdir/configure conftest.file`
778145b7b3cSmrg   fi
779145b7b3cSmrg   rm -f conftest.file
780145b7b3cSmrg   if test "$[*]" != "X $srcdir/configure conftest.file" \
781145b7b3cSmrg      && test "$[*]" != "X conftest.file $srcdir/configure"; then
782145b7b3cSmrg
783145b7b3cSmrg      # If neither matched, then we have a broken ls.  This can happen
784145b7b3cSmrg      # if, for instance, CONFIG_SHELL is bash and it inherits a
785145b7b3cSmrg      # broken ls alias from the environment.  This has actually
786145b7b3cSmrg      # happened.  Such a system could not be considered "sane".
787145b7b3cSmrg      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
788145b7b3cSmrgalias in your environment])
789145b7b3cSmrg   fi
790145b7b3cSmrg
791145b7b3cSmrg   test "$[2]" = conftest.file
792145b7b3cSmrg   )
793145b7b3cSmrgthen
794145b7b3cSmrg   # Ok.
795145b7b3cSmrg   :
796145b7b3cSmrgelse
797145b7b3cSmrg   AC_MSG_ERROR([newly created file is older than distributed files!
798145b7b3cSmrgCheck your system clock])
799145b7b3cSmrgfi
800145b7b3cSmrgAC_MSG_RESULT(yes)])
801145b7b3cSmrg
802145b7b3cSmrg# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
803145b7b3cSmrg#
804145b7b3cSmrg# This file is free software; the Free Software Foundation
805145b7b3cSmrg# gives unlimited permission to copy and/or distribute it,
806145b7b3cSmrg# with or without modifications, as long as this notice is preserved.
807145b7b3cSmrg
808145b7b3cSmrg# AM_PROG_INSTALL_STRIP
809145b7b3cSmrg# ---------------------
810145b7b3cSmrg# One issue with vendor `install' (even GNU) is that you can't
811145b7b3cSmrg# specify the program used to strip binaries.  This is especially
812145b7b3cSmrg# annoying in cross-compiling environments, where the build's strip
813145b7b3cSmrg# is unlikely to handle the host's binaries.
814145b7b3cSmrg# Fortunately install-sh will honor a STRIPPROG variable, so we
815145b7b3cSmrg# always use install-sh in `make install-strip', and initialize
816145b7b3cSmrg# STRIPPROG with the value of the STRIP variable (set by the user).
817145b7b3cSmrgAC_DEFUN([AM_PROG_INSTALL_STRIP],
818145b7b3cSmrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
819145b7b3cSmrg# Installed binaries are usually stripped using `strip' when the user
820145b7b3cSmrg# run `make install-strip'.  However `strip' might not be the right
821145b7b3cSmrg# tool to use in cross-compilation environments, therefore Automake
822145b7b3cSmrg# will honor the `STRIP' environment variable to overrule this program.
823145b7b3cSmrgdnl Don't test for $cross_compiling = yes, because it might be `maybe'.
824145b7b3cSmrgif test "$cross_compiling" != no; then
825145b7b3cSmrg  AC_CHECK_TOOL([STRIP], [strip], :)
826145b7b3cSmrgfi
827145b7b3cSmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
828145b7b3cSmrgAC_SUBST([INSTALL_STRIP_PROGRAM])])
829145b7b3cSmrg
830145b7b3cSmrg# Copyright (C) 2006  Free Software Foundation, Inc.
831145b7b3cSmrg#
832145b7b3cSmrg# This file is free software; the Free Software Foundation
833145b7b3cSmrg# gives unlimited permission to copy and/or distribute it,
834145b7b3cSmrg# with or without modifications, as long as this notice is preserved.
835145b7b3cSmrg
836145b7b3cSmrg# _AM_SUBST_NOTMAKE(VARIABLE)
837145b7b3cSmrg# ---------------------------
838145b7b3cSmrg# Prevent Automake from outputing VARIABLE = @VARIABLE@ in Makefile.in.
839145b7b3cSmrg# This macro is traced by Automake.
840145b7b3cSmrgAC_DEFUN([_AM_SUBST_NOTMAKE])
841145b7b3cSmrg
842145b7b3cSmrg# Check how to create a tarball.                            -*- Autoconf -*-
843145b7b3cSmrg
844145b7b3cSmrg# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
845145b7b3cSmrg#
846145b7b3cSmrg# This file is free software; the Free Software Foundation
847145b7b3cSmrg# gives unlimited permission to copy and/or distribute it,
848145b7b3cSmrg# with or without modifications, as long as this notice is preserved.
849145b7b3cSmrg
850145b7b3cSmrg# serial 2
851145b7b3cSmrg
852145b7b3cSmrg# _AM_PROG_TAR(FORMAT)
853145b7b3cSmrg# --------------------
854145b7b3cSmrg# Check how to create a tarball in format FORMAT.
855145b7b3cSmrg# FORMAT should be one of `v7', `ustar', or `pax'.
856145b7b3cSmrg#
857145b7b3cSmrg# Substitute a variable $(am__tar) that is a command
858145b7b3cSmrg# writing to stdout a FORMAT-tarball containing the directory
859145b7b3cSmrg# $tardir.
860145b7b3cSmrg#     tardir=directory && $(am__tar) > result.tar
861145b7b3cSmrg#
862145b7b3cSmrg# Substitute a variable $(am__untar) that extract such
863145b7b3cSmrg# a tarball read from stdin.
864145b7b3cSmrg#     $(am__untar) < result.tar
865145b7b3cSmrgAC_DEFUN([_AM_PROG_TAR],
866145b7b3cSmrg[# Always define AMTAR for backward compatibility.
867145b7b3cSmrgAM_MISSING_PROG([AMTAR], [tar])
868145b7b3cSmrgm4_if([$1], [v7],
869145b7b3cSmrg     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
870145b7b3cSmrg     [m4_case([$1], [ustar],, [pax],,
871145b7b3cSmrg              [m4_fatal([Unknown tar format])])
872145b7b3cSmrgAC_MSG_CHECKING([how to create a $1 tar archive])
873145b7b3cSmrg# Loop over all known methods to create a tar archive until one works.
874145b7b3cSmrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
875145b7b3cSmrg_am_tools=${am_cv_prog_tar_$1-$_am_tools}
876145b7b3cSmrg# Do not fold the above two line into one, because Tru64 sh and
877145b7b3cSmrg# Solaris sh will not grok spaces in the rhs of `-'.
878145b7b3cSmrgfor _am_tool in $_am_tools
879145b7b3cSmrgdo
880145b7b3cSmrg  case $_am_tool in
881145b7b3cSmrg  gnutar)
882145b7b3cSmrg    for _am_tar in tar gnutar gtar;
883145b7b3cSmrg    do
884145b7b3cSmrg      AM_RUN_LOG([$_am_tar --version]) && break
885145b7b3cSmrg    done
886145b7b3cSmrg    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
887145b7b3cSmrg    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
888145b7b3cSmrg    am__untar="$_am_tar -xf -"
889145b7b3cSmrg    ;;
890145b7b3cSmrg  plaintar)
891145b7b3cSmrg    # Must skip GNU tar: if it does not support --format= it doesn't create
892145b7b3cSmrg    # ustar tarball either.
893145b7b3cSmrg    (tar --version) >/dev/null 2>&1 && continue
894145b7b3cSmrg    am__tar='tar chf - "$$tardir"'
895145b7b3cSmrg    am__tar_='tar chf - "$tardir"'
896145b7b3cSmrg    am__untar='tar xf -'
897145b7b3cSmrg    ;;
898145b7b3cSmrg  pax)
899145b7b3cSmrg    am__tar='pax -L -x $1 -w "$$tardir"'
900145b7b3cSmrg    am__tar_='pax -L -x $1 -w "$tardir"'
901145b7b3cSmrg    am__untar='pax -r'
902145b7b3cSmrg    ;;
903145b7b3cSmrg  cpio)
904145b7b3cSmrg    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
905145b7b3cSmrg    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
906145b7b3cSmrg    am__untar='cpio -i -H $1 -d'
907145b7b3cSmrg    ;;
908145b7b3cSmrg  none)
909145b7b3cSmrg    am__tar=false
910145b7b3cSmrg    am__tar_=false
911145b7b3cSmrg    am__untar=false
912145b7b3cSmrg    ;;
913145b7b3cSmrg  esac
914145b7b3cSmrg
915145b7b3cSmrg  # If the value was cached, stop now.  We just wanted to have am__tar
916145b7b3cSmrg  # and am__untar set.
917145b7b3cSmrg  test -n "${am_cv_prog_tar_$1}" && break
918145b7b3cSmrg
919145b7b3cSmrg  # tar/untar a dummy directory, and stop if the command works
920145b7b3cSmrg  rm -rf conftest.dir
921145b7b3cSmrg  mkdir conftest.dir
922145b7b3cSmrg  echo GrepMe > conftest.dir/file
923145b7b3cSmrg  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
924145b7b3cSmrg  rm -rf conftest.dir
925145b7b3cSmrg  if test -s conftest.tar; then
926145b7b3cSmrg    AM_RUN_LOG([$am__untar <conftest.tar])
927145b7b3cSmrg    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
928145b7b3cSmrg  fi
929145b7b3cSmrgdone
930145b7b3cSmrgrm -rf conftest.dir
931145b7b3cSmrg
932145b7b3cSmrgAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
933145b7b3cSmrgAC_MSG_RESULT([$am_cv_prog_tar_$1])])
934145b7b3cSmrgAC_SUBST([am__tar])
935145b7b3cSmrgAC_SUBST([am__untar])
936145b7b3cSmrg]) # _AM_PROG_TAR
937145b7b3cSmrg
938145b7b3cSmrgdnl Copyright 2005 Red Hat, Inc
939145b7b3cSmrgdnl 
940145b7b3cSmrgdnl Permission to use, copy, modify, distribute, and sell this software and its
941145b7b3cSmrgdnl documentation for any purpose is hereby granted without fee, provided that
942145b7b3cSmrgdnl the above copyright notice appear in all copies and that both that
943145b7b3cSmrgdnl copyright notice and this permission notice appear in supporting
944145b7b3cSmrgdnl documentation.
945145b7b3cSmrgdnl 
946145b7b3cSmrgdnl The above copyright notice and this permission notice shall be included
947145b7b3cSmrgdnl in all copies or substantial portions of the Software.
948145b7b3cSmrgdnl 
949145b7b3cSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
950145b7b3cSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
951145b7b3cSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
952145b7b3cSmrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
953145b7b3cSmrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
954145b7b3cSmrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
955145b7b3cSmrgdnl OTHER DEALINGS IN THE SOFTWARE.
956145b7b3cSmrgdnl 
957145b7b3cSmrgdnl Except as contained in this notice, the name of the copyright holders shall
958145b7b3cSmrgdnl not be used in advertising or otherwise to promote the sale, use or
959145b7b3cSmrgdnl other dealings in this Software without prior written authorization
960145b7b3cSmrgdnl from the copyright holders.
961145b7b3cSmrgdnl 
962145b7b3cSmrg
963145b7b3cSmrg# XAW_CHECK_XPRINT_SUPPORT()
964145b7b3cSmrg# --------------------------
965145b7b3cSmrg# Adds --enable/disable-xprint and selects the appropriate version of the Xaw 
966145b7b3cSmrg# library. If neither --enable-xprint nor --disable-xprint are given, 
967145b7b3cSmrg# the presence of an Xaw with Xprint support will be auto detected
968145b7b3cSmrg
969145b7b3cSmrgAC_DEFUN([XAW_CHECK_XPRINT_SUPPORT],[
970145b7b3cSmrg	AC_ARG_ENABLE(xprint, AC_HELP_STRING([--enable-xprint], [Enable XPrint support]),
971145b7b3cSmrg			[use_xprint=$enableval],[use_xprint=auto])
972145b7b3cSmrg	if test "x$use_xprint" = "xyes"; then
973145b7b3cSmrg		TMP_CHECK1=xaw8
974145b7b3cSmrg		TMP_CHECK2=
975145b7b3cSmrg		xaw_use_xprint=yes
976145b7b3cSmrg	elif test "x$use_xprint" = "xno"; then
977145b7b3cSmrg		TMP_CHECK1=xaw7
978145b7b3cSmrg		TMP_CHECK2=
979145b7b3cSmrg		xaw_use_xprint=no
980145b7b3cSmrg	else
981145b7b3cSmrg		TMP_CHECK1=xaw8
982145b7b3cSmrg		TMP_CHECK2=xaw7
983145b7b3cSmrg		xaw_use_xprint=yes
984145b7b3cSmrg	fi
985145b7b3cSmrg
986145b7b3cSmrg	PKG_CHECK_MODULES(TMP_XAW, $TMP_CHECK1, success=yes, success=no)
987145b7b3cSmrg	if [[ ! -z $TMP_CHECK2 ]] ; then
988145b7b3cSmrg		if test $success = no ; then
989145b7b3cSmrg			PKG_CHECK_MODULES(TMP_XAW, $TMP_CHECK2, success=yes, success=no)
990145b7b3cSmrg			xaw_use_xprint=no
991145b7b3cSmrg		fi
992145b7b3cSmrg	fi
993145b7b3cSmrg
994145b7b3cSmrg	if test "x$success" = "xyes"; then
995145b7b3cSmrg		$1_CFLAGS=$TMP_XAW_CFLAGS
996145b7b3cSmrg		$1_LIBS=$TMP_XAW_LIBS
997145b7b3cSmrg
998145b7b3cSmrg		AM_CONDITIONAL([XAW_USE_XPRINT], [test "x$xaw_use_xprint" = "xyes"])
999145b7b3cSmrg	else
1000145b7b3cSmrg		AC_MSG_ERROR([No suitable version of Xaw found])
1001145b7b3cSmrg	fi
1002145b7b3cSmrg])
1003145b7b3cSmrg
1004145b7b3cSmrgdnl
1005145b7b3cSmrgdnl Copyright 2005-2006 Sun Microsystems, Inc.  All rights reserved.
1006145b7b3cSmrgdnl 
1007145b7b3cSmrgdnl Permission is hereby granted, free of charge, to any person obtaining a
1008145b7b3cSmrgdnl copy of this software and associated documentation files (the
1009145b7b3cSmrgdnl "Software"), to deal in the Software without restriction, including
1010145b7b3cSmrgdnl without limitation the rights to use, copy, modify, merge, publish,
1011145b7b3cSmrgdnl distribute, and/or sell copies of the Software, and to permit persons
1012145b7b3cSmrgdnl to whom the Software is furnished to do so, provided that the above
1013145b7b3cSmrgdnl copyright notice(s) and this permission notice appear in all copies of
1014145b7b3cSmrgdnl the Software and that both the above copyright notice(s) and this
1015145b7b3cSmrgdnl permission notice appear in supporting documentation.
1016145b7b3cSmrgdnl
1017145b7b3cSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
1018145b7b3cSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
1019145b7b3cSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
1020145b7b3cSmrgdnl OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
1021145b7b3cSmrgdnl HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
1022145b7b3cSmrgdnl INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
1023145b7b3cSmrgdnl FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
1024145b7b3cSmrgdnl NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
1025145b7b3cSmrgdnl WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
1026145b7b3cSmrgdnl
1027145b7b3cSmrgdnl Except as contained in this notice, the name of a copyright holder
1028145b7b3cSmrgdnl shall not be used in advertising or otherwise to promote the sale, use
1029145b7b3cSmrgdnl or other dealings in this Software without prior written authorization
1030145b7b3cSmrgdnl of the copyright holder.
1031145b7b3cSmrg
1032145b7b3cSmrg# XORG_MACROS_VERSION(required-version)
1033145b7b3cSmrg# -------------------------------------
1034145b7b3cSmrg# Minimum version: 1.1.0
1035145b7b3cSmrg#
1036145b7b3cSmrg# If you're using a macro added in Version 1.1 or newer, include this in
1037145b7b3cSmrg# your configure.ac with the minimum required version, such as:
1038145b7b3cSmrg# XORG_MACROS_VERSION(1.1)
1039145b7b3cSmrg#
1040145b7b3cSmrg# To force at least a version with this macro defined, also add:
1041145b7b3cSmrg# m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.1 or later before running autoconf/autogen])])
1042145b7b3cSmrg#
1043145b7b3cSmrg#
1044145b7b3cSmrg# See the "minimum version" comment for each macro you use to see what 
1045145b7b3cSmrg# version you require.
1046145b7b3cSmrgAC_DEFUN([XORG_MACROS_VERSION],[
1047145b7b3cSmrg	[XORG_MACROS_needed_version=$1
1048145b7b3cSmrg	XORG_MACROS_needed_major=`echo $XORG_MACROS_needed_version | sed 's/\..*$//'`
1049145b7b3cSmrg	XORG_MACROS_needed_minor=`echo $XORG_MACROS_needed_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`]
1050145b7b3cSmrg	AC_MSG_CHECKING([if xorg-macros used to generate configure is at least ${XORG_MACROS_needed_major}.${XORG_MACROS_needed_minor}])
1051145b7b3cSmrg	[XORG_MACROS_version=1.1.5
1052145b7b3cSmrg	XORG_MACROS_major=`echo $XORG_MACROS_version | sed 's/\..*$//'`
1053145b7b3cSmrg	XORG_MACROS_minor=`echo $XORG_MACROS_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`]
1054145b7b3cSmrg	if test $XORG_MACROS_major -ne $XORG_MACROS_needed_major ; then
1055145b7b3cSmrg		AC_MSG_ERROR([configure built with incompatible version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.x])
1056145b7b3cSmrg	fi
1057145b7b3cSmrg	if test $XORG_MACROS_minor -lt $XORG_MACROS_needed_minor ; then
1058145b7b3cSmrg		AC_MSG_ERROR([configure built with too old of a version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.${XORG_MACROS_minor}.0 or newer])
1059145b7b3cSmrg	fi
1060145b7b3cSmrg	AC_MSG_RESULT([yes, $XORG_MACROS_version])
1061145b7b3cSmrg]) # XORG_MACROS_VERSION
1062145b7b3cSmrg
1063145b7b3cSmrg# XORG_PROG_RAWCPP()
1064145b7b3cSmrg# ------------------
1065145b7b3cSmrg# Minimum version: 1.0.0
1066145b7b3cSmrg#
1067145b7b3cSmrg# Find cpp program and necessary flags for use in pre-processing text files
1068145b7b3cSmrg# such as man pages and config files
1069145b7b3cSmrgAC_DEFUN([XORG_PROG_RAWCPP],[
1070145b7b3cSmrgAC_REQUIRE([AC_PROG_CPP])
1071145b7b3cSmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 
1072145b7b3cSmrg   [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib])
1073145b7b3cSmrg
1074145b7b3cSmrg# Check for flag to avoid builtin definitions - assumes unix is predefined,
1075145b7b3cSmrg# which is not the best choice for supporting other OS'es, but covers most
1076145b7b3cSmrg# of the ones we need for now.
1077145b7b3cSmrgAC_MSG_CHECKING([if $RAWCPP requires -undef])
1078145b7b3cSmrgAC_LANG_CONFTEST([Does cpp redefine unix ?])
1079145b7b3cSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
1080145b7b3cSmrg	AC_MSG_RESULT([no])
1081145b7b3cSmrgelse
1082145b7b3cSmrg	if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
1083145b7b3cSmrg		RAWCPPFLAGS=-undef
1084145b7b3cSmrg		AC_MSG_RESULT([yes])
1085145b7b3cSmrg	else
1086145b7b3cSmrg		AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef.  I don't know what to do.])
1087145b7b3cSmrg	fi
1088145b7b3cSmrgfi
1089145b7b3cSmrgrm -f conftest.$ac_ext
1090145b7b3cSmrg
1091145b7b3cSmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional])
1092145b7b3cSmrgAC_LANG_CONFTEST([Does cpp preserve   "whitespace"?])
1093145b7b3cSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
1094145b7b3cSmrg	AC_MSG_RESULT([no])
1095145b7b3cSmrgelse
1096145b7b3cSmrg	if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
1097145b7b3cSmrg		RAWCPPFLAGS="${RAWCPPFLAGS} -traditional"
1098145b7b3cSmrg		AC_MSG_RESULT([yes])
1099145b7b3cSmrg	else
1100145b7b3cSmrg		AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional.  I don't know what to do.])
1101145b7b3cSmrg	fi
1102145b7b3cSmrgfi
1103145b7b3cSmrgrm -f conftest.$ac_ext
1104145b7b3cSmrgAC_SUBST(RAWCPPFLAGS)
1105145b7b3cSmrg]) # XORG_PROG_RAWCPP
1106145b7b3cSmrg
1107145b7b3cSmrg# XORG_MANPAGE_SECTIONS()
1108145b7b3cSmrg# -----------------------
1109145b7b3cSmrg# Minimum version: 1.0.0
1110145b7b3cSmrg#
1111145b7b3cSmrg# Determine which sections man pages go in for the different man page types
1112145b7b3cSmrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files.
1113145b7b3cSmrg# Not sure if there's any better way than just hardcoding by OS name.
1114145b7b3cSmrg# Override default settings by setting environment variables
1115145b7b3cSmrg
1116145b7b3cSmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[
1117145b7b3cSmrgAC_REQUIRE([AC_CANONICAL_HOST])
1118145b7b3cSmrg
1119145b7b3cSmrgif test x$APP_MAN_SUFFIX = x    ; then
1120145b7b3cSmrg    APP_MAN_SUFFIX=1
1121145b7b3cSmrgfi
1122145b7b3cSmrgif test x$APP_MAN_DIR = x    ; then
1123145b7b3cSmrg    APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)'
1124145b7b3cSmrgfi
1125145b7b3cSmrg
1126145b7b3cSmrgif test x$LIB_MAN_SUFFIX = x    ; then
1127145b7b3cSmrg    LIB_MAN_SUFFIX=3
1128145b7b3cSmrgfi
1129145b7b3cSmrgif test x$LIB_MAN_DIR = x    ; then
1130145b7b3cSmrg    LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)'
1131145b7b3cSmrgfi
1132145b7b3cSmrg
1133145b7b3cSmrgif test x$FILE_MAN_SUFFIX = x    ; then
1134145b7b3cSmrg    case $host_os in
1135145b7b3cSmrg	solaris*)	FILE_MAN_SUFFIX=4  ;;
1136145b7b3cSmrg	*)		FILE_MAN_SUFFIX=5  ;;
1137145b7b3cSmrg    esac
1138145b7b3cSmrgfi
1139145b7b3cSmrgif test x$FILE_MAN_DIR = x    ; then
1140145b7b3cSmrg    FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)'
1141145b7b3cSmrgfi
1142145b7b3cSmrg
1143145b7b3cSmrgif test x$MISC_MAN_SUFFIX = x    ; then
1144145b7b3cSmrg    case $host_os in
1145145b7b3cSmrg	solaris*)	MISC_MAN_SUFFIX=5  ;;
1146145b7b3cSmrg	*)		MISC_MAN_SUFFIX=7  ;;
1147145b7b3cSmrg    esac
1148145b7b3cSmrgfi
1149145b7b3cSmrgif test x$MISC_MAN_DIR = x    ; then
1150145b7b3cSmrg    MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)'
1151145b7b3cSmrgfi
1152145b7b3cSmrg
1153145b7b3cSmrgif test x$DRIVER_MAN_SUFFIX = x    ; then
1154145b7b3cSmrg    case $host_os in
1155145b7b3cSmrg	solaris*)	DRIVER_MAN_SUFFIX=7  ;;
1156145b7b3cSmrg	*)		DRIVER_MAN_SUFFIX=4  ;;
1157145b7b3cSmrg    esac
1158145b7b3cSmrgfi
1159145b7b3cSmrgif test x$DRIVER_MAN_DIR = x    ; then
1160145b7b3cSmrg    DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)'
1161145b7b3cSmrgfi
1162145b7b3cSmrg
1163145b7b3cSmrgif test x$ADMIN_MAN_SUFFIX = x    ; then
1164145b7b3cSmrg    case $host_os in
1165145b7b3cSmrg	solaris*)	ADMIN_MAN_SUFFIX=1m ;;
1166145b7b3cSmrg	*)		ADMIN_MAN_SUFFIX=8  ;;
1167145b7b3cSmrg    esac
1168145b7b3cSmrgfi
1169145b7b3cSmrgif test x$ADMIN_MAN_DIR = x    ; then
1170145b7b3cSmrg    ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)'
1171145b7b3cSmrgfi
1172145b7b3cSmrg
1173145b7b3cSmrg
1174145b7b3cSmrgAC_SUBST([APP_MAN_SUFFIX])
1175145b7b3cSmrgAC_SUBST([LIB_MAN_SUFFIX])
1176145b7b3cSmrgAC_SUBST([FILE_MAN_SUFFIX])
1177145b7b3cSmrgAC_SUBST([MISC_MAN_SUFFIX])
1178145b7b3cSmrgAC_SUBST([DRIVER_MAN_SUFFIX])
1179145b7b3cSmrgAC_SUBST([ADMIN_MAN_SUFFIX])
1180145b7b3cSmrgAC_SUBST([APP_MAN_DIR])
1181145b7b3cSmrgAC_SUBST([LIB_MAN_DIR])
1182145b7b3cSmrgAC_SUBST([FILE_MAN_DIR])
1183145b7b3cSmrgAC_SUBST([MISC_MAN_DIR])
1184145b7b3cSmrgAC_SUBST([DRIVER_MAN_DIR])
1185145b7b3cSmrgAC_SUBST([ADMIN_MAN_DIR])
1186145b7b3cSmrg]) # XORG_MANPAGE_SECTIONS
1187145b7b3cSmrg
1188145b7b3cSmrg# XORG_CHECK_LINUXDOC
1189145b7b3cSmrg# -------------------
1190145b7b3cSmrg# Minimum version: 1.0.0
1191145b7b3cSmrg#
1192145b7b3cSmrg# Defines the variable MAKE_TEXT if the necessary tools and
1193145b7b3cSmrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt.
1194145b7b3cSmrg# Whether or not the necessary tools and files are found can be checked
1195145b7b3cSmrg# with the AM_CONDITIONAL "BUILD_LINUXDOC"
1196145b7b3cSmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[
1197145b7b3cSmrgXORG_SGML_PATH=$prefix/share/sgml
1198145b7b3cSmrgHAVE_DEFS_ENT=
1199145b7b3cSmrg
1200145b7b3cSmrgif test x"$cross_compiling" = x"yes" ; then
1201145b7b3cSmrg  HAVE_DEFS_ENT=no
1202145b7b3cSmrgelse
1203145b7b3cSmrg  AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes])
1204145b7b3cSmrgfi
1205145b7b3cSmrg
1206145b7b3cSmrgAC_PATH_PROG(LINUXDOC, linuxdoc)
1207145b7b3cSmrgAC_PATH_PROG(PS2PDF, ps2pdf)
1208145b7b3cSmrg
1209145b7b3cSmrgAC_MSG_CHECKING([Whether to build documentation])
1210145b7b3cSmrg
1211145b7b3cSmrgif test x$HAVE_DEFS_ENT != x && test x$LINUXDOC != x ; then
1212145b7b3cSmrg   BUILDDOC=yes
1213145b7b3cSmrgelse
1214145b7b3cSmrg   BUILDDOC=no
1215145b7b3cSmrgfi
1216145b7b3cSmrg
1217145b7b3cSmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes])
1218145b7b3cSmrg
1219145b7b3cSmrgAC_MSG_RESULT([$BUILDDOC])
1220145b7b3cSmrg
1221145b7b3cSmrgAC_MSG_CHECKING([Whether to build pdf documentation])
1222145b7b3cSmrg
1223145b7b3cSmrgif test x$PS2PDF != x && test x$BUILD_PDFDOC != xno; then
1224145b7b3cSmrg   BUILDPDFDOC=yes
1225145b7b3cSmrgelse
1226145b7b3cSmrg   BUILDPDFDOC=no
1227145b7b3cSmrgfi
1228145b7b3cSmrg
1229145b7b3cSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
1230145b7b3cSmrg
1231145b7b3cSmrgAC_MSG_RESULT([$BUILDPDFDOC])
1232145b7b3cSmrg
1233145b7b3cSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt"
1234145b7b3cSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps"
1235145b7b3cSmrgMAKE_PDF="$PS2PDF"
1236145b7b3cSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC  -B html --split=0"
1237145b7b3cSmrg
1238145b7b3cSmrgAC_SUBST(MAKE_TEXT)
1239145b7b3cSmrgAC_SUBST(MAKE_PS)
1240145b7b3cSmrgAC_SUBST(MAKE_PDF)
1241145b7b3cSmrgAC_SUBST(MAKE_HTML)
1242145b7b3cSmrg]) # XORG_CHECK_LINUXDOC
1243145b7b3cSmrg
1244145b7b3cSmrg# XORG_CHECK_DOCBOOK
1245145b7b3cSmrg# -------------------
1246145b7b3cSmrg# Minimum version: 1.0.0
1247145b7b3cSmrg#
1248145b7b3cSmrg# Checks for the ability to build output formats from SGML DocBook source.
1249145b7b3cSmrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC"
1250145b7b3cSmrg# indicates whether the necessary tools and files are found and, if set,
1251145b7b3cSmrg# $(MAKE_XXX) blah.sgml will produce blah.xxx.
1252145b7b3cSmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[
1253145b7b3cSmrgXORG_SGML_PATH=$prefix/share/sgml
1254145b7b3cSmrgHAVE_DEFS_ENT=
1255145b7b3cSmrgBUILDTXTDOC=no
1256145b7b3cSmrgBUILDPDFDOC=no
1257145b7b3cSmrgBUILDPSDOC=no
1258145b7b3cSmrgBUILDHTMLDOC=no
1259145b7b3cSmrg
1260145b7b3cSmrgAC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes])
1261145b7b3cSmrg
1262145b7b3cSmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps)
1263145b7b3cSmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf)
1264145b7b3cSmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html)
1265145b7b3cSmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt)
1266145b7b3cSmrg
1267145b7b3cSmrgAC_MSG_CHECKING([Whether to build text documentation])
1268145b7b3cSmrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKTXT != x &&
1269145b7b3cSmrg   test x$BUILD_TXTDOC != xno; then
1270145b7b3cSmrg	BUILDTXTDOC=yes
1271145b7b3cSmrgfi
1272145b7b3cSmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes])
1273145b7b3cSmrgAC_MSG_RESULT([$BUILDTXTDOC])
1274145b7b3cSmrg
1275145b7b3cSmrgAC_MSG_CHECKING([Whether to build PDF documentation])
1276145b7b3cSmrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPDF != x &&
1277145b7b3cSmrg   test x$BUILD_PDFDOC != xno; then
1278145b7b3cSmrg	BUILDPDFDOC=yes
1279145b7b3cSmrgfi
1280145b7b3cSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
1281145b7b3cSmrgAC_MSG_RESULT([$BUILDPDFDOC])
1282145b7b3cSmrg
1283145b7b3cSmrgAC_MSG_CHECKING([Whether to build PostScript documentation])
1284145b7b3cSmrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPS != x &&
1285145b7b3cSmrg   test x$BUILD_PSDOC != xno; then
1286145b7b3cSmrg	BUILDPSDOC=yes
1287145b7b3cSmrgfi
1288145b7b3cSmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes])
1289145b7b3cSmrgAC_MSG_RESULT([$BUILDPSDOC])
1290145b7b3cSmrg
1291145b7b3cSmrgAC_MSG_CHECKING([Whether to build HTML documentation])
1292145b7b3cSmrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKHTML != x &&
1293145b7b3cSmrg   test x$BUILD_HTMLDOC != xno; then
1294145b7b3cSmrg	BUILDHTMLDOC=yes
1295145b7b3cSmrgfi
1296145b7b3cSmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes])
1297145b7b3cSmrgAC_MSG_RESULT([$BUILDHTMLDOC])
1298145b7b3cSmrg
1299145b7b3cSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT"
1300145b7b3cSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS"
1301145b7b3cSmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF"
1302145b7b3cSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML"
1303145b7b3cSmrg
1304145b7b3cSmrgAC_SUBST(MAKE_TEXT)
1305145b7b3cSmrgAC_SUBST(MAKE_PS)
1306145b7b3cSmrgAC_SUBST(MAKE_PDF)
1307145b7b3cSmrgAC_SUBST(MAKE_HTML)
1308145b7b3cSmrg]) # XORG_CHECK_DOCBOOK
1309145b7b3cSmrg
1310145b7b3cSmrg# XORG_CHECK_MALLOC_ZERO
1311145b7b3cSmrg# ----------------------
1312145b7b3cSmrg# Minimum version: 1.0.0
1313145b7b3cSmrg#
1314145b7b3cSmrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if
1315145b7b3cSmrg# malloc(0) returns NULL.  Packages should add one of these cflags to
1316145b7b3cSmrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them.
1317145b7b3cSmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[
1318145b7b3cSmrgAC_ARG_ENABLE(malloc0returnsnull,
1319145b7b3cSmrg	AC_HELP_STRING([--enable-malloc0returnsnull],
1320145b7b3cSmrg		       [malloc(0) returns NULL (default: auto)]),
1321145b7b3cSmrg	[MALLOC_ZERO_RETURNS_NULL=$enableval],
1322145b7b3cSmrg	[MALLOC_ZERO_RETURNS_NULL=auto])
1323145b7b3cSmrg
1324145b7b3cSmrgAC_MSG_CHECKING([whether malloc(0) returns NULL])
1325145b7b3cSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then
1326145b7b3cSmrg	AC_RUN_IFELSE([
1327145b7b3cSmrgchar *malloc();
1328145b7b3cSmrgchar *realloc();
1329145b7b3cSmrgchar *calloc();
1330145b7b3cSmrgmain() {
1331145b7b3cSmrg    char *m0, *r0, *c0, *p;
1332145b7b3cSmrg    m0 = malloc(0);
1333145b7b3cSmrg    p = malloc(10);
1334145b7b3cSmrg    r0 = realloc(p,0);
1335145b7b3cSmrg    c0 = calloc(0);
1336145b7b3cSmrg    exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1);
1337145b7b3cSmrg}],
1338145b7b3cSmrg		[MALLOC_ZERO_RETURNS_NULL=yes],
1339145b7b3cSmrg		[MALLOC_ZERO_RETURNS_NULL=no])
1340145b7b3cSmrgfi
1341145b7b3cSmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL])
1342145b7b3cSmrg
1343145b7b3cSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then
1344145b7b3cSmrg	MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL"
1345145b7b3cSmrg	XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS
1346145b7b3cSmrg	XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC"
1347145b7b3cSmrgelse
1348145b7b3cSmrg	MALLOC_ZERO_CFLAGS=""
1349145b7b3cSmrg	XMALLOC_ZERO_CFLAGS=""
1350145b7b3cSmrg	XTMALLOC_ZERO_CFLAGS=""
1351145b7b3cSmrgfi
1352145b7b3cSmrg
1353145b7b3cSmrgAC_SUBST([MALLOC_ZERO_CFLAGS])
1354145b7b3cSmrgAC_SUBST([XMALLOC_ZERO_CFLAGS])
1355145b7b3cSmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS])
1356145b7b3cSmrg]) # XORG_CHECK_MALLOC_ZERO
1357145b7b3cSmrg
1358145b7b3cSmrg# XORG_WITH_LINT()
1359145b7b3cSmrg# ----------------
1360145b7b3cSmrg# Minimum version: 1.1.0
1361145b7b3cSmrg#
1362145b7b3cSmrg# Sets up flags for source checkers such as lint and sparse if --with-lint
1363145b7b3cSmrg# is specified.   (Use --with-lint=sparse for sparse.)
1364145b7b3cSmrg# Sets $LINT to name of source checker passed with --with-lint (default: lint)
1365145b7b3cSmrg# Sets $LINT_FLAGS to flags to pass to source checker
1366145b7b3cSmrg# Sets LINT automake conditional if enabled (default: disabled)
1367145b7b3cSmrg#
1368145b7b3cSmrgAC_DEFUN([XORG_WITH_LINT],[
1369145b7b3cSmrg
1370145b7b3cSmrg# Allow checking code with lint, sparse, etc.
1371145b7b3cSmrgAC_ARG_WITH(lint, [AC_HELP_STRING([--with-lint],
1372145b7b3cSmrg		[Use a lint-style source code checker (default: disabled)])],
1373145b7b3cSmrg		[use_lint=$withval], [use_lint=no])
1374145b7b3cSmrgif test "x$use_lint" = "xyes" ; then
1375145b7b3cSmrg	LINT="lint"
1376145b7b3cSmrgelse
1377145b7b3cSmrg	LINT="$use_lint"
1378145b7b3cSmrgfi
1379145b7b3cSmrgif test "x$LINT_FLAGS" = "x" -a "x$LINT" != "xno" ; then
1380145b7b3cSmrg    case $LINT in
1381145b7b3cSmrg	lint|*/lint)
1382145b7b3cSmrg	    case $host_os in
1383145b7b3cSmrg		solaris*)
1384145b7b3cSmrg			LINT_FLAGS="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2"
1385145b7b3cSmrg			;;
1386145b7b3cSmrg	    esac
1387145b7b3cSmrg	    ;;
1388145b7b3cSmrg    esac
1389145b7b3cSmrgfi
1390145b7b3cSmrg
1391145b7b3cSmrgAC_SUBST(LINT)
1392145b7b3cSmrgAC_SUBST(LINT_FLAGS)
1393145b7b3cSmrgAM_CONDITIONAL(LINT, [test x$LINT != xno])
1394145b7b3cSmrg
1395145b7b3cSmrg]) # XORG_WITH_LINT
1396145b7b3cSmrg
1397145b7b3cSmrg# XORG_LINT_LIBRARY(LIBNAME)
1398145b7b3cSmrg# --------------------------
1399145b7b3cSmrg# Minimum version: 1.1.0
1400145b7b3cSmrg#
1401145b7b3cSmrg# Sets up flags for building lint libraries for checking programs that call
1402145b7b3cSmrg# functions in the library.
1403145b7b3cSmrg# Disabled by default, enable with --enable-lint-library
1404145b7b3cSmrg# Sets: 
1405145b7b3cSmrg#	@LINTLIB@		- name of lint library file to make
1406145b7b3cSmrg#	MAKE_LINT_LIB		- automake conditional
1407145b7b3cSmrg#
1408145b7b3cSmrg
1409145b7b3cSmrgAC_DEFUN([XORG_LINT_LIBRARY],[
1410145b7b3cSmrgAC_REQUIRE([XORG_WITH_LINT])
1411145b7b3cSmrg# Build lint "library" for more indepth checks of programs calling this library
1412145b7b3cSmrgAC_ARG_ENABLE(lint-library, [AC_HELP_STRING([--enable-lint-library],
1413145b7b3cSmrg	[Create lint library (default: disabled)])],
1414145b7b3cSmrg	[make_lint_lib=$enableval], [make_lint_lib=no])
1415145b7b3cSmrgif test "x$make_lint_lib" != "xno" ; then
1416145b7b3cSmrg	if test "x$LINT" = "xno" ; then
1417145b7b3cSmrg		AC_MSG_ERROR([Cannot make lint library without --with-lint])
1418145b7b3cSmrg	fi
1419145b7b3cSmrg	if test "x$make_lint_lib" = "xyes" ; then
1420145b7b3cSmrg		LINTLIB=llib-l$1.ln
1421145b7b3cSmrg	else
1422145b7b3cSmrg		LINTLIB=$make_lint_lib
1423145b7b3cSmrg	fi
1424145b7b3cSmrgfi
1425145b7b3cSmrgAC_SUBST(LINTLIB)
1426145b7b3cSmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno])
1427145b7b3cSmrg
1428145b7b3cSmrg]) # XORG_LINT_LIBRARY
1429145b7b3cSmrg
1430145b7b3cSmrgdnl Copyright 2005 Red Hat, Inc
1431145b7b3cSmrgdnl
1432145b7b3cSmrgdnl Permission to use, copy, modify, distribute, and sell this software and its
1433145b7b3cSmrgdnl documentation for any purpose is hereby granted without fee, provided that
1434145b7b3cSmrgdnl the above copyright notice appear in all copies and that both that
1435145b7b3cSmrgdnl copyright notice and this permission notice appear in supporting
1436145b7b3cSmrgdnl documentation.
1437145b7b3cSmrgdnl
1438145b7b3cSmrgdnl The above copyright notice and this permission notice shall be included
1439145b7b3cSmrgdnl in all copies or substantial portions of the Software.
1440145b7b3cSmrgdnl
1441145b7b3cSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
1442145b7b3cSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
1443145b7b3cSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
1444145b7b3cSmrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
1445145b7b3cSmrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
1446145b7b3cSmrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
1447145b7b3cSmrgdnl OTHER DEALINGS IN THE SOFTWARE.
1448145b7b3cSmrgdnl
1449145b7b3cSmrgdnl Except as contained in this notice, the name of the copyright holders shall
1450145b7b3cSmrgdnl not be used in advertising or otherwise to promote the sale, use or
1451145b7b3cSmrgdnl other dealings in this Software without prior written authorization
1452145b7b3cSmrgdnl from the copyright holders.
1453145b7b3cSmrgdnl
1454145b7b3cSmrg
1455145b7b3cSmrg# XORG_RELEASE_VERSION
1456145b7b3cSmrg# --------------------
1457145b7b3cSmrg# Adds --with/without-release-string and changes the PACKAGE and
1458145b7b3cSmrg# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION".  If
1459145b7b3cSmrg# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged.  Also
1460145b7b3cSmrg# defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use.
1461145b7b3cSmrg 
1462145b7b3cSmrgAC_DEFUN([XORG_RELEASE_VERSION],[
1463145b7b3cSmrg	AC_ARG_WITH(release-version,
1464145b7b3cSmrg			AC_HELP_STRING([--with-release-version=STRING],
1465145b7b3cSmrg				[Use release version string in package name]),
1466145b7b3cSmrg			[RELEASE_VERSION="$withval"],
1467145b7b3cSmrg			[RELEASE_VERSION=""])
1468145b7b3cSmrg	if test "x$RELEASE_VERSION" != "x"; then
1469145b7b3cSmrg		PACKAGE="$PACKAGE-$RELEASE_VERSION"
1470145b7b3cSmrg		PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION"
1471145b7b3cSmrg		AC_MSG_NOTICE([Building with package name set to $PACKAGE])
1472145b7b3cSmrg	fi
1473145b7b3cSmrg	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR],
1474145b7b3cSmrg		[`echo $PACKAGE_VERSION | cut -d . -f 1`],
1475145b7b3cSmrg		[Major version of this package])
1476145b7b3cSmrg	PVM=`echo $PACKAGE_VERSION | cut -d . -f 2`
1477145b7b3cSmrg	if test "x$PVM" = "x"; then
1478145b7b3cSmrg		PVM="0"
1479145b7b3cSmrg	fi
1480145b7b3cSmrg	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR],
1481145b7b3cSmrg		[$PVM],
1482145b7b3cSmrg		[Minor version of this package])
1483145b7b3cSmrg	PVP=`echo $PACKAGE_VERSION | cut -d . -f 3`
1484145b7b3cSmrg	if test "x$PVP" = "x"; then
1485145b7b3cSmrg		PVP="0"
1486145b7b3cSmrg	fi
1487145b7b3cSmrg	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL],
1488145b7b3cSmrg		[$PVP],
1489145b7b3cSmrg		[Patch version of this package])
1490145b7b3cSmrg])
1491145b7b3cSmrg
1492145b7b3cSmrgdnl $XdotOrg: lib/xtrans/xtrans.m4,v 1.6 2005/07/26 18:59:11 alanc Exp $
1493145b7b3cSmrgdnl
1494145b7b3cSmrgdnl Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
1495145b7b3cSmrgdnl 
1496145b7b3cSmrgdnl Permission to use, copy, modify, distribute, and sell this software and its
1497145b7b3cSmrgdnl documentation for any purpose is hereby granted without fee, provided that
1498145b7b3cSmrgdnl the above copyright notice appear in all copies and that both that
1499145b7b3cSmrgdnl copyright notice and this permission notice appear in supporting
1500145b7b3cSmrgdnl documentation.
1501145b7b3cSmrgdnl 
1502145b7b3cSmrgdnl The above copyright notice and this permission notice shall be included
1503145b7b3cSmrgdnl in all copies or substantial portions of the Software.
1504145b7b3cSmrgdnl 
1505145b7b3cSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
1506145b7b3cSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
1507145b7b3cSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
1508145b7b3cSmrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
1509145b7b3cSmrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
1510145b7b3cSmrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
1511145b7b3cSmrgdnl OTHER DEALINGS IN THE SOFTWARE.
1512145b7b3cSmrgdnl 
1513145b7b3cSmrgdnl Except as contained in this notice, the name of the copyright holders shall
1514145b7b3cSmrgdnl not be used in advertising or otherwise to promote the sale, use or
1515145b7b3cSmrgdnl other dealings in this Software without prior written authorization
1516145b7b3cSmrgdnl from the copyright holders.
1517145b7b3cSmrgdnl 
1518145b7b3cSmrg
1519145b7b3cSmrg# XTRANS_TCP_FLAGS()
1520145b7b3cSmrg# ------------------
1521145b7b3cSmrg# Find needed libraries for TCP sockets, and check for IPv6 support
1522145b7b3cSmrgAC_DEFUN([XTRANS_TCP_FLAGS],[
1523145b7b3cSmrg # SVR4 hides these in libraries other than libc
1524145b7b3cSmrg AC_SEARCH_LIBS(socket, [socket])
1525145b7b3cSmrg AC_SEARCH_LIBS(gethostbyname, [nsl])
1526145b7b3cSmrg
1527145b7b3cSmrg # Needs to come after above checks for libsocket & libnsl for SVR4 systems
1528145b7b3cSmrg AC_ARG_ENABLE(ipv6, 
1529145b7b3cSmrg	AC_HELP_STRING([--enable-IPv6],[Enable IPv6 support]),
1530145b7b3cSmrg	[IPV6CONN=$enableval], 
1531145b7b3cSmrg	[AC_CHECK_FUNC(getaddrinfo,[IPV6CONN=yes],[IPV6CONN=no])])
1532145b7b3cSmrg AC_MSG_CHECKING([if IPv6 support should be built])
1533145b7b3cSmrg if test "$IPV6CONN" = "yes"; then
1534145b7b3cSmrg	AC_DEFINE(IPv6,1,[Support IPv6 for TCP connections])
1535145b7b3cSmrg fi
1536145b7b3cSmrg AC_MSG_RESULT($IPV6CONN)
1537145b7b3cSmrg
1538145b7b3cSmrg # 4.3BSD-Reno added a new member to struct sockaddr_in
1539145b7b3cSmrg AC_CHECK_MEMBER([struct sockaddr_in.sin_len], 
1540145b7b3cSmrg	AC_DEFINE([BSD44SOCKETS],1,
1541145b7b3cSmrg 	    [Define to 1 if `struct sockaddr_in' has a `sin_len' member]), [], [
1542145b7b3cSmrg#include <sys/types.h>
1543145b7b3cSmrg#include <sys/socket.h>
1544145b7b3cSmrg#include <netinet/in.h>
1545145b7b3cSmrg ])
1546145b7b3cSmrg]) # XTRANS_TCP_FLAGS
1547145b7b3cSmrg
1548145b7b3cSmrg# XTRANS_CONNECTION_FLAGS()
1549145b7b3cSmrg# -------------------------
1550145b7b3cSmrg# Standard checks for which Xtrans transports to use by the Xorg packages
1551145b7b3cSmrg# that use Xtrans functions
1552145b7b3cSmrgAC_DEFUN([XTRANS_CONNECTION_FLAGS],[
1553145b7b3cSmrg AC_REQUIRE([AC_CANONICAL_HOST])
1554145b7b3cSmrg AC_REQUIRE([AC_TYPE_SIGNAL])
1555145b7b3cSmrg AC_ARG_ENABLE(unix-transport,
1556145b7b3cSmrg	AC_HELP_STRING([--enable-unix-transport],[Enable UNIX domain socket transport]),
1557145b7b3cSmrg	[UNIXCONN=$enableval], [UNIXCONN=yes])
1558145b7b3cSmrg AC_ARG_ENABLE(tcp-transport, 
1559145b7b3cSmrg	AC_HELP_STRING([--enable-tcp-transport],[Enable TCP socket transport]),
1560145b7b3cSmrg	[TCPCONN=$enableval], [TCPCONN=yes])
1561145b7b3cSmrg AC_MSG_CHECKING([if Xtrans should support UNIX socket connections])
1562145b7b3cSmrg if test "$UNIXCONN" = "yes"; then
1563145b7b3cSmrg	AC_DEFINE(UNIXCONN,1,[Support UNIX socket connections])
1564145b7b3cSmrg fi
1565145b7b3cSmrg AC_MSG_RESULT($UNIXCONN)
1566145b7b3cSmrg AC_MSG_CHECKING([if Xtrans should support TCP socket connections])
1567145b7b3cSmrg AC_MSG_RESULT($TCPCONN)
1568145b7b3cSmrg if test "$TCPCONN" = "yes"; then
1569145b7b3cSmrg	AC_DEFINE(TCPCONN,1,[Support TCP socket connections])
1570145b7b3cSmrg	XTRANS_TCP_FLAGS
1571145b7b3cSmrg fi
1572145b7b3cSmrg [case $host_os in
1573145b7b3cSmrg	solaris*|sco*|sysv4*)	localdef="yes" ;;
1574145b7b3cSmrg	*)			localdef="no"  ;;
1575145b7b3cSmrg esac]
1576145b7b3cSmrg AC_ARG_ENABLE(local-transport,
1577145b7b3cSmrg	AC_HELP_STRING([--enable-local-transport],[Enable os-specific local transport]),
1578145b7b3cSmrg	[LOCALCONN=$enableval], [LOCALCONN=$localdef])
1579145b7b3cSmrg AC_MSG_CHECKING([if Xtrans should support os-specific local connections])
1580145b7b3cSmrg AC_MSG_RESULT($LOCALCONN)
1581145b7b3cSmrg if test "$LOCALCONN" = "yes"; then
1582145b7b3cSmrg	AC_DEFINE(LOCALCONN,1,[Support os-specific local connections])
1583145b7b3cSmrg fi
1584145b7b3cSmrg 
1585145b7b3cSmrg]) # XTRANS_CONNECTION_FLAGS
1586145b7b3cSmrg
1587145b7b3cSmrg
1588145b7b3cSmrg# XTRANS_SECURE_RPC_FLAGS()
1589145b7b3cSmrg# -------------------------
1590145b7b3cSmrg# Check for Secure RPC functions - must come after XTRANS_TCP_FLAGS
1591145b7b3cSmrg# so that any necessary networking libraries are already found
1592145b7b3cSmrgAC_DEFUN([XTRANS_SECURE_RPC_FLAGS],
1593145b7b3cSmrg[AC_REQUIRE([XTRANS_TCP_FLAGS])
1594145b7b3cSmrg AC_ARG_ENABLE(secure-rpc, 
1595145b7b3cSmrg	AC_HELP_STRING([--enable-secure-rpc],[Enable Secure RPC]),
1596145b7b3cSmrg        [SECURE_RPC=$enableval], [SECURE_RPC="try"])
1597145b7b3cSmrg
1598145b7b3cSmrg if test "x$SECURE_RPC" = "xyes" -o "x$SECURE_RPC" = "xtry" ; then
1599145b7b3cSmrg	FOUND_SECURE_RPC="no"
1600145b7b3cSmrg	AC_CHECK_FUNCS([authdes_seccreate authdes_create],
1601145b7b3cSmrg			[FOUND_SECURE_RPC="yes"])
1602145b7b3cSmrg	if test "x$FOUND_SECURE_RPC" = "xno" ; then
1603145b7b3cSmrg		if test "x$SECURE_RPC" = "xyes" ; then
1604145b7b3cSmrg	AC_MSG_ERROR([Secure RPC requested, but required functions not found])
1605145b7b3cSmrg		fi	
1606145b7b3cSmrg		SECURE_RPC="no"
1607145b7b3cSmrg	else
1608145b7b3cSmrg		dnl FreeBSD keeps getsecretkey in librpcsvc
1609145b7b3cSmrg		AC_SEARCH_LIBS(getsecretkey, [rpcsvc])
1610145b7b3cSmrg		SECURE_RPC="yes"
1611145b7b3cSmrg	fi
1612145b7b3cSmrg fi
1613145b7b3cSmrg AC_MSG_CHECKING([if Secure RPC authentication ("SUN-DES-1") should be supported])
1614145b7b3cSmrg if test "x$SECURE_RPC" = "xyes" ; then
1615145b7b3cSmrg	AC_DEFINE(SECURE_RPC, 1, [Support Secure RPC ("SUN-DES-1") authentication for X11 clients])
1616145b7b3cSmrg fi
1617145b7b3cSmrg AC_MSG_RESULT($SECURE_RPC)
1618145b7b3cSmrg]) # XTRANS_SECURE_RPC_FLAGS
1619145b7b3cSmrg
1620145b7b3cSmrg
1621145b7b3cSmrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
1622145b7b3cSmrg
1623145b7b3cSmrg# serial 48 AC_PROG_LIBTOOL
1624145b7b3cSmrg
1625145b7b3cSmrg
1626145b7b3cSmrg# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
1627145b7b3cSmrg# -----------------------------------------------------------
1628145b7b3cSmrg# If this macro is not defined by Autoconf, define it here.
1629145b7b3cSmrgm4_ifdef([AC_PROVIDE_IFELSE],
1630145b7b3cSmrg         [],
1631145b7b3cSmrg         [m4_define([AC_PROVIDE_IFELSE],
1632145b7b3cSmrg	         [m4_ifdef([AC_PROVIDE_$1],
1633145b7b3cSmrg		           [$2], [$3])])])
1634145b7b3cSmrg
1635145b7b3cSmrg
1636145b7b3cSmrg# AC_PROG_LIBTOOL
1637145b7b3cSmrg# ---------------
1638145b7b3cSmrgAC_DEFUN([AC_PROG_LIBTOOL],
1639145b7b3cSmrg[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
1640145b7b3cSmrgdnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
1641145b7b3cSmrgdnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
1642145b7b3cSmrg  AC_PROVIDE_IFELSE([AC_PROG_CXX],
1643145b7b3cSmrg    [AC_LIBTOOL_CXX],
1644145b7b3cSmrg    [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
1645145b7b3cSmrg  ])])
1646145b7b3cSmrgdnl And a similar setup for Fortran 77 support
1647145b7b3cSmrg  AC_PROVIDE_IFELSE([AC_PROG_F77],
1648145b7b3cSmrg    [AC_LIBTOOL_F77],
1649145b7b3cSmrg    [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
1650145b7b3cSmrg])])
1651145b7b3cSmrg
1652145b7b3cSmrgdnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
1653145b7b3cSmrgdnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
1654145b7b3cSmrgdnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
1655145b7b3cSmrg  AC_PROVIDE_IFELSE([AC_PROG_GCJ],
1656145b7b3cSmrg    [AC_LIBTOOL_GCJ],
1657145b7b3cSmrg    [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
1658145b7b3cSmrg      [AC_LIBTOOL_GCJ],
1659145b7b3cSmrg      [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
1660145b7b3cSmrg	[AC_LIBTOOL_GCJ],
1661145b7b3cSmrg      [ifdef([AC_PROG_GCJ],
1662145b7b3cSmrg	     [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
1663145b7b3cSmrg       ifdef([A][M_PROG_GCJ],
1664145b7b3cSmrg	     [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
1665145b7b3cSmrg       ifdef([LT_AC_PROG_GCJ],
1666145b7b3cSmrg	     [define([LT_AC_PROG_GCJ],
1667145b7b3cSmrg		defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
1668145b7b3cSmrg])])# AC_PROG_LIBTOOL
1669145b7b3cSmrg
1670145b7b3cSmrg
1671145b7b3cSmrg# _AC_PROG_LIBTOOL
1672145b7b3cSmrg# ----------------
1673145b7b3cSmrgAC_DEFUN([_AC_PROG_LIBTOOL],
1674145b7b3cSmrg[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
1675145b7b3cSmrgAC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
1676145b7b3cSmrgAC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
1677145b7b3cSmrgAC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
1678145b7b3cSmrg
1679145b7b3cSmrg# This can be used to rebuild libtool when needed
1680145b7b3cSmrgLIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
1681145b7b3cSmrg
1682145b7b3cSmrg# Always use our own libtool.
1683145b7b3cSmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool'
1684145b7b3cSmrgAC_SUBST(LIBTOOL)dnl
1685145b7b3cSmrg
1686145b7b3cSmrg# Prevent multiple expansion
1687145b7b3cSmrgdefine([AC_PROG_LIBTOOL], [])
1688145b7b3cSmrg])# _AC_PROG_LIBTOOL
1689145b7b3cSmrg
1690145b7b3cSmrg
1691145b7b3cSmrg# AC_LIBTOOL_SETUP
1692145b7b3cSmrg# ----------------
1693145b7b3cSmrgAC_DEFUN([AC_LIBTOOL_SETUP],
1694145b7b3cSmrg[AC_PREREQ(2.50)dnl
1695145b7b3cSmrgAC_REQUIRE([AC_ENABLE_SHARED])dnl
1696145b7b3cSmrgAC_REQUIRE([AC_ENABLE_STATIC])dnl
1697145b7b3cSmrgAC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
1698145b7b3cSmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl
1699145b7b3cSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl
1700145b7b3cSmrgAC_REQUIRE([AC_PROG_CC])dnl
1701145b7b3cSmrgAC_REQUIRE([AC_PROG_LD])dnl
1702145b7b3cSmrgAC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
1703145b7b3cSmrgAC_REQUIRE([AC_PROG_NM])dnl
1704145b7b3cSmrg
1705145b7b3cSmrgAC_REQUIRE([AC_PROG_LN_S])dnl
1706145b7b3cSmrgAC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
1707145b7b3cSmrg# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
1708145b7b3cSmrgAC_REQUIRE([AC_OBJEXT])dnl
1709145b7b3cSmrgAC_REQUIRE([AC_EXEEXT])dnl
1710145b7b3cSmrgdnl
1711145b7b3cSmrg
1712145b7b3cSmrgAC_LIBTOOL_SYS_MAX_CMD_LEN
1713145b7b3cSmrgAC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
1714145b7b3cSmrgAC_LIBTOOL_OBJDIR
1715145b7b3cSmrg
1716145b7b3cSmrgAC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
1717145b7b3cSmrg_LT_AC_PROG_ECHO_BACKSLASH
1718145b7b3cSmrg
1719145b7b3cSmrgcase $host_os in
1720145b7b3cSmrgaix3*)
1721145b7b3cSmrg  # AIX sometimes has problems with the GCC collect2 program.  For some
1722145b7b3cSmrg  # reason, if we set the COLLECT_NAMES environment variable, the problems
1723145b7b3cSmrg  # vanish in a puff of smoke.
1724145b7b3cSmrg  if test "X${COLLECT_NAMES+set}" != Xset; then
1725145b7b3cSmrg    COLLECT_NAMES=
1726145b7b3cSmrg    export COLLECT_NAMES
1727145b7b3cSmrg  fi
1728145b7b3cSmrg  ;;
1729145b7b3cSmrgesac
1730145b7b3cSmrg
1731145b7b3cSmrg# Sed substitution that helps us do robust quoting.  It backslashifies
1732145b7b3cSmrg# metacharacters that are still active within double-quoted strings.
1733145b7b3cSmrgXsed='sed -e 1s/^X//'
1734145b7b3cSmrg[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
1735145b7b3cSmrg
1736145b7b3cSmrg# Same as above, but do not quote variable references.
1737145b7b3cSmrg[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
1738145b7b3cSmrg
1739145b7b3cSmrg# Sed substitution to delay expansion of an escaped shell variable in a
1740145b7b3cSmrg# double_quote_subst'ed string.
1741145b7b3cSmrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
1742145b7b3cSmrg
1743145b7b3cSmrg# Sed substitution to avoid accidental globbing in evaled expressions
1744145b7b3cSmrgno_glob_subst='s/\*/\\\*/g'
1745145b7b3cSmrg
1746145b7b3cSmrg# Constants:
1747145b7b3cSmrgrm="rm -f"
1748145b7b3cSmrg
1749145b7b3cSmrg# Global variables:
1750145b7b3cSmrgdefault_ofile=libtool
1751145b7b3cSmrgcan_build_shared=yes
1752145b7b3cSmrg
1753145b7b3cSmrg# All known linkers require a `.a' archive for static linking (except MSVC,
1754145b7b3cSmrg# which needs '.lib').
1755145b7b3cSmrglibext=a
1756145b7b3cSmrgltmain="$ac_aux_dir/ltmain.sh"
1757145b7b3cSmrgofile="$default_ofile"
1758145b7b3cSmrgwith_gnu_ld="$lt_cv_prog_gnu_ld"
1759145b7b3cSmrg
1760145b7b3cSmrgAC_CHECK_TOOL(AR, ar, false)
1761145b7b3cSmrgAC_CHECK_TOOL(RANLIB, ranlib, :)
1762145b7b3cSmrgAC_CHECK_TOOL(STRIP, strip, :)
1763145b7b3cSmrg
1764145b7b3cSmrgold_CC="$CC"
1765145b7b3cSmrgold_CFLAGS="$CFLAGS"
1766145b7b3cSmrg
1767145b7b3cSmrg# Set sane defaults for various variables
1768145b7b3cSmrgtest -z "$AR" && AR=ar
1769145b7b3cSmrgtest -z "$AR_FLAGS" && AR_FLAGS=cru
1770145b7b3cSmrgtest -z "$AS" && AS=as
1771145b7b3cSmrgtest -z "$CC" && CC=cc
1772145b7b3cSmrgtest -z "$LTCC" && LTCC=$CC
1773145b7b3cSmrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
1774145b7b3cSmrgtest -z "$DLLTOOL" && DLLTOOL=dlltool
1775145b7b3cSmrgtest -z "$LD" && LD=ld
1776145b7b3cSmrgtest -z "$LN_S" && LN_S="ln -s"
1777145b7b3cSmrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file
1778145b7b3cSmrgtest -z "$NM" && NM=nm
1779145b7b3cSmrgtest -z "$SED" && SED=sed
1780145b7b3cSmrgtest -z "$OBJDUMP" && OBJDUMP=objdump
1781145b7b3cSmrgtest -z "$RANLIB" && RANLIB=:
1782145b7b3cSmrgtest -z "$STRIP" && STRIP=:
1783145b7b3cSmrgtest -z "$ac_objext" && ac_objext=o
1784145b7b3cSmrg
1785145b7b3cSmrg# Determine commands to create old-style static archives.
1786145b7b3cSmrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
1787145b7b3cSmrgold_postinstall_cmds='chmod 644 $oldlib'
1788145b7b3cSmrgold_postuninstall_cmds=
1789145b7b3cSmrg
1790145b7b3cSmrgif test -n "$RANLIB"; then
1791145b7b3cSmrg  case $host_os in
1792145b7b3cSmrg  openbsd*)
1793145b7b3cSmrg    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
1794145b7b3cSmrg    ;;
1795145b7b3cSmrg  *)
1796145b7b3cSmrg    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
1797145b7b3cSmrg    ;;
1798145b7b3cSmrg  esac
1799145b7b3cSmrg  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
1800145b7b3cSmrgfi
1801145b7b3cSmrg
1802145b7b3cSmrg_LT_CC_BASENAME([$compiler])
1803145b7b3cSmrg
1804145b7b3cSmrg# Only perform the check for file, if the check method requires it
1805145b7b3cSmrgcase $deplibs_check_method in
1806145b7b3cSmrgfile_magic*)
1807145b7b3cSmrg  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
1808145b7b3cSmrg    AC_PATH_MAGIC
1809145b7b3cSmrg  fi
1810145b7b3cSmrg  ;;
1811145b7b3cSmrgesac
1812145b7b3cSmrg
1813145b7b3cSmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
1814145b7b3cSmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
1815145b7b3cSmrgenable_win32_dll=yes, enable_win32_dll=no)
1816145b7b3cSmrg
1817145b7b3cSmrgAC_ARG_ENABLE([libtool-lock],
1818145b7b3cSmrg    [AC_HELP_STRING([--disable-libtool-lock],
1819145b7b3cSmrg	[avoid locking (might break parallel builds)])])
1820145b7b3cSmrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
1821145b7b3cSmrg
1822145b7b3cSmrgAC_ARG_WITH([pic],
1823145b7b3cSmrg    [AC_HELP_STRING([--with-pic],
1824145b7b3cSmrg	[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
1825145b7b3cSmrg    [pic_mode="$withval"],
1826145b7b3cSmrg    [pic_mode=default])
1827145b7b3cSmrgtest -z "$pic_mode" && pic_mode=default
1828145b7b3cSmrg
1829145b7b3cSmrg# Use C for the default configuration in the libtool script
1830145b7b3cSmrgtagname=
1831145b7b3cSmrgAC_LIBTOOL_LANG_C_CONFIG
1832145b7b3cSmrg_LT_AC_TAGCONFIG
1833145b7b3cSmrg])# AC_LIBTOOL_SETUP
1834145b7b3cSmrg
1835145b7b3cSmrg
1836145b7b3cSmrg# _LT_AC_SYS_COMPILER
1837145b7b3cSmrg# -------------------
1838145b7b3cSmrgAC_DEFUN([_LT_AC_SYS_COMPILER],
1839145b7b3cSmrg[AC_REQUIRE([AC_PROG_CC])dnl
1840145b7b3cSmrg
1841145b7b3cSmrg# If no C compiler was specified, use CC.
1842145b7b3cSmrgLTCC=${LTCC-"$CC"}
1843145b7b3cSmrg
1844145b7b3cSmrg# If no C compiler flags were specified, use CFLAGS.
1845145b7b3cSmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"}
1846145b7b3cSmrg
1847145b7b3cSmrg# Allow CC to be a program name with arguments.
1848145b7b3cSmrgcompiler=$CC
1849145b7b3cSmrg])# _LT_AC_SYS_COMPILER
1850145b7b3cSmrg
1851145b7b3cSmrg
1852145b7b3cSmrg# _LT_CC_BASENAME(CC)
1853145b7b3cSmrg# -------------------
1854145b7b3cSmrg# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
1855145b7b3cSmrgAC_DEFUN([_LT_CC_BASENAME],
1856145b7b3cSmrg[for cc_temp in $1""; do
1857145b7b3cSmrg  case $cc_temp in
1858145b7b3cSmrg    compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
1859145b7b3cSmrg    distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
1860145b7b3cSmrg    \-*) ;;
1861145b7b3cSmrg    *) break;;
1862145b7b3cSmrg  esac
1863145b7b3cSmrgdone
1864145b7b3cSmrgcc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
1865145b7b3cSmrg])
1866145b7b3cSmrg
1867145b7b3cSmrg
1868145b7b3cSmrg# _LT_COMPILER_BOILERPLATE
1869145b7b3cSmrg# ------------------------
1870145b7b3cSmrg# Check for compiler boilerplate output or warnings with
1871145b7b3cSmrg# the simple compiler test code.
1872145b7b3cSmrgAC_DEFUN([_LT_COMPILER_BOILERPLATE],
1873145b7b3cSmrg[ac_outfile=conftest.$ac_objext
1874145b7b3cSmrgprintf "$lt_simple_compile_test_code" >conftest.$ac_ext
1875145b7b3cSmrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
1876145b7b3cSmrg_lt_compiler_boilerplate=`cat conftest.err`
1877145b7b3cSmrg$rm conftest*
1878145b7b3cSmrg])# _LT_COMPILER_BOILERPLATE
1879145b7b3cSmrg
1880145b7b3cSmrg
1881145b7b3cSmrg# _LT_LINKER_BOILERPLATE
1882145b7b3cSmrg# ----------------------
1883145b7b3cSmrg# Check for linker boilerplate output or warnings with
1884145b7b3cSmrg# the simple link test code.
1885145b7b3cSmrgAC_DEFUN([_LT_LINKER_BOILERPLATE],
1886145b7b3cSmrg[ac_outfile=conftest.$ac_objext
1887145b7b3cSmrgprintf "$lt_simple_link_test_code" >conftest.$ac_ext
1888145b7b3cSmrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
1889145b7b3cSmrg_lt_linker_boilerplate=`cat conftest.err`
1890145b7b3cSmrg$rm conftest*
1891145b7b3cSmrg])# _LT_LINKER_BOILERPLATE
1892145b7b3cSmrg
1893145b7b3cSmrg
1894145b7b3cSmrg# _LT_AC_SYS_LIBPATH_AIX
1895145b7b3cSmrg# ----------------------
1896145b7b3cSmrg# Links a minimal program and checks the executable
1897145b7b3cSmrg# for the system default hardcoded library path. In most cases,
1898145b7b3cSmrg# this is /usr/lib:/lib, but when the MPI compilers are used
1899145b7b3cSmrg# the location of the communication and MPI libs are included too.
1900145b7b3cSmrg# If we don't find anything, use the default library path according
1901145b7b3cSmrg# to the aix ld manual.
1902145b7b3cSmrgAC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
1903145b7b3cSmrg[AC_LINK_IFELSE(AC_LANG_PROGRAM,[
1904145b7b3cSmrgaix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
1905145b7b3cSmrg}'`
1906145b7b3cSmrg# Check for a 64-bit object if we didn't find anything.
1907145b7b3cSmrgif test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
1908145b7b3cSmrg}'`; fi],[])
1909145b7b3cSmrgif test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
1910145b7b3cSmrg])# _LT_AC_SYS_LIBPATH_AIX
1911145b7b3cSmrg
1912145b7b3cSmrg
1913145b7b3cSmrg# _LT_AC_SHELL_INIT(ARG)
1914145b7b3cSmrg# ----------------------
1915145b7b3cSmrgAC_DEFUN([_LT_AC_SHELL_INIT],
1916145b7b3cSmrg[ifdef([AC_DIVERSION_NOTICE],
1917145b7b3cSmrg	     [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
1918145b7b3cSmrg	 [AC_DIVERT_PUSH(NOTICE)])
1919145b7b3cSmrg$1
1920145b7b3cSmrgAC_DIVERT_POP
1921145b7b3cSmrg])# _LT_AC_SHELL_INIT
1922145b7b3cSmrg
1923145b7b3cSmrg
1924145b7b3cSmrg# _LT_AC_PROG_ECHO_BACKSLASH
1925145b7b3cSmrg# --------------------------
1926145b7b3cSmrg# Add some code to the start of the generated configure script which
1927145b7b3cSmrg# will find an echo command which doesn't interpret backslashes.
1928145b7b3cSmrgAC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
1929145b7b3cSmrg[_LT_AC_SHELL_INIT([
1930145b7b3cSmrg# Check that we are running under the correct shell.
1931145b7b3cSmrgSHELL=${CONFIG_SHELL-/bin/sh}
1932145b7b3cSmrg
1933145b7b3cSmrgcase X$ECHO in
1934145b7b3cSmrgX*--fallback-echo)
1935145b7b3cSmrg  # Remove one level of quotation (which was required for Make).
1936145b7b3cSmrg  ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
1937145b7b3cSmrg  ;;
1938145b7b3cSmrgesac
1939145b7b3cSmrg
1940145b7b3cSmrgecho=${ECHO-echo}
1941145b7b3cSmrgif test "X[$]1" = X--no-reexec; then
1942145b7b3cSmrg  # Discard the --no-reexec flag, and continue.
1943145b7b3cSmrg  shift
1944145b7b3cSmrgelif test "X[$]1" = X--fallback-echo; then
1945145b7b3cSmrg  # Avoid inline document here, it may be left over
1946145b7b3cSmrg  :
1947145b7b3cSmrgelif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
1948145b7b3cSmrg  # Yippee, $echo works!
1949145b7b3cSmrg  :
1950145b7b3cSmrgelse
1951145b7b3cSmrg  # Restart under the correct shell.
1952145b7b3cSmrg  exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
1953145b7b3cSmrgfi
1954145b7b3cSmrg
1955145b7b3cSmrgif test "X[$]1" = X--fallback-echo; then
1956145b7b3cSmrg  # used as fallback echo
1957145b7b3cSmrg  shift
1958145b7b3cSmrg  cat <<EOF
1959145b7b3cSmrg[$]*
1960145b7b3cSmrgEOF
1961145b7b3cSmrg  exit 0
1962145b7b3cSmrgfi
1963145b7b3cSmrg
1964145b7b3cSmrg# The HP-UX ksh and POSIX shell print the target directory to stdout
1965145b7b3cSmrg# if CDPATH is set.
1966145b7b3cSmrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
1967145b7b3cSmrg
1968145b7b3cSmrgif test -z "$ECHO"; then
1969145b7b3cSmrgif test "X${echo_test_string+set}" != Xset; then
1970145b7b3cSmrg# find a string as large as possible, as long as the shell can cope with it
1971145b7b3cSmrg  for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
1972145b7b3cSmrg    # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
1973145b7b3cSmrg    if (echo_test_string=`eval $cmd`) 2>/dev/null &&
1974145b7b3cSmrg       echo_test_string=`eval $cmd` &&
1975145b7b3cSmrg       (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
1976145b7b3cSmrg    then
1977145b7b3cSmrg      break
1978145b7b3cSmrg    fi
1979145b7b3cSmrg  done
1980145b7b3cSmrgfi
1981145b7b3cSmrg
1982145b7b3cSmrgif test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
1983145b7b3cSmrg   echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
1984145b7b3cSmrg   test "X$echo_testing_string" = "X$echo_test_string"; then
1985145b7b3cSmrg  :
1986145b7b3cSmrgelse
1987145b7b3cSmrg  # The Solaris, AIX, and Digital Unix default echo programs unquote
1988145b7b3cSmrg  # backslashes.  This makes it impossible to quote backslashes using
1989145b7b3cSmrg  #   echo "$something" | sed 's/\\/\\\\/g'
1990145b7b3cSmrg  #
1991145b7b3cSmrg  # So, first we look for a working echo in the user's PATH.
1992145b7b3cSmrg
1993145b7b3cSmrg  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
1994145b7b3cSmrg  for dir in $PATH /usr/ucb; do
1995145b7b3cSmrg    IFS="$lt_save_ifs"
1996145b7b3cSmrg    if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
1997145b7b3cSmrg       test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
1998145b7b3cSmrg       echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
1999145b7b3cSmrg       test "X$echo_testing_string" = "X$echo_test_string"; then
2000145b7b3cSmrg      echo="$dir/echo"
2001145b7b3cSmrg      break
2002145b7b3cSmrg    fi
2003145b7b3cSmrg  done
2004145b7b3cSmrg  IFS="$lt_save_ifs"
2005145b7b3cSmrg
2006145b7b3cSmrg  if test "X$echo" = Xecho; then
2007145b7b3cSmrg    # We didn't find a better echo, so look for alternatives.
2008145b7b3cSmrg    if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
2009145b7b3cSmrg       echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
2010145b7b3cSmrg       test "X$echo_testing_string" = "X$echo_test_string"; then
2011145b7b3cSmrg      # This shell has a builtin print -r that does the trick.
2012145b7b3cSmrg      echo='print -r'
2013145b7b3cSmrg    elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
2014145b7b3cSmrg	 test "X$CONFIG_SHELL" != X/bin/ksh; then
2015145b7b3cSmrg      # If we have ksh, try running configure again with it.
2016145b7b3cSmrg      ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
2017145b7b3cSmrg      export ORIGINAL_CONFIG_SHELL
2018145b7b3cSmrg      CONFIG_SHELL=/bin/ksh
2019145b7b3cSmrg      export CONFIG_SHELL
2020145b7b3cSmrg      exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
2021145b7b3cSmrg    else
2022145b7b3cSmrg      # Try using printf.
2023145b7b3cSmrg      echo='printf %s\n'
2024145b7b3cSmrg      if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
2025145b7b3cSmrg	 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
2026145b7b3cSmrg	 test "X$echo_testing_string" = "X$echo_test_string"; then
2027145b7b3cSmrg	# Cool, printf works
2028145b7b3cSmrg	:
2029145b7b3cSmrg      elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
2030145b7b3cSmrg	   test "X$echo_testing_string" = 'X\t' &&
2031145b7b3cSmrg	   echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
2032145b7b3cSmrg	   test "X$echo_testing_string" = "X$echo_test_string"; then
2033145b7b3cSmrg	CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
2034145b7b3cSmrg	export CONFIG_SHELL
2035145b7b3cSmrg	SHELL="$CONFIG_SHELL"
2036145b7b3cSmrg	export SHELL
2037145b7b3cSmrg	echo="$CONFIG_SHELL [$]0 --fallback-echo"
2038145b7b3cSmrg      elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
2039145b7b3cSmrg	   test "X$echo_testing_string" = 'X\t' &&
2040145b7b3cSmrg	   echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
2041145b7b3cSmrg	   test "X$echo_testing_string" = "X$echo_test_string"; then
2042145b7b3cSmrg	echo="$CONFIG_SHELL [$]0 --fallback-echo"
2043145b7b3cSmrg      else
2044145b7b3cSmrg	# maybe with a smaller string...
2045145b7b3cSmrg	prev=:
2046145b7b3cSmrg
2047145b7b3cSmrg	for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
2048145b7b3cSmrg	  if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
2049145b7b3cSmrg	  then
2050145b7b3cSmrg	    break
2051145b7b3cSmrg	  fi
2052145b7b3cSmrg	  prev="$cmd"
2053145b7b3cSmrg	done
2054145b7b3cSmrg
2055145b7b3cSmrg	if test "$prev" != 'sed 50q "[$]0"'; then
2056145b7b3cSmrg	  echo_test_string=`eval $prev`
2057145b7b3cSmrg	  export echo_test_string
2058145b7b3cSmrg	  exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
2059145b7b3cSmrg	else
2060145b7b3cSmrg	  # Oops.  We lost completely, so just stick with echo.
2061145b7b3cSmrg	  echo=echo
2062145b7b3cSmrg	fi
2063145b7b3cSmrg      fi
2064145b7b3cSmrg    fi
2065145b7b3cSmrg  fi
2066145b7b3cSmrgfi
2067145b7b3cSmrgfi
2068145b7b3cSmrg
2069145b7b3cSmrg# Copy echo and quote the copy suitably for passing to libtool from
2070145b7b3cSmrg# the Makefile, instead of quoting the original, which is used later.
2071145b7b3cSmrgECHO=$echo
2072145b7b3cSmrgif test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
2073145b7b3cSmrg   ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
2074145b7b3cSmrgfi
2075145b7b3cSmrg
2076145b7b3cSmrgAC_SUBST(ECHO)
2077145b7b3cSmrg])])# _LT_AC_PROG_ECHO_BACKSLASH
2078145b7b3cSmrg
2079145b7b3cSmrg
2080145b7b3cSmrg# _LT_AC_LOCK
2081145b7b3cSmrg# -----------
2082145b7b3cSmrgAC_DEFUN([_LT_AC_LOCK],
2083145b7b3cSmrg[AC_ARG_ENABLE([libtool-lock],
2084145b7b3cSmrg    [AC_HELP_STRING([--disable-libtool-lock],
2085145b7b3cSmrg	[avoid locking (might break parallel builds)])])
2086145b7b3cSmrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
2087145b7b3cSmrg
2088145b7b3cSmrg# Some flags need to be propagated to the compiler or linker for good
2089145b7b3cSmrg# libtool support.
2090145b7b3cSmrgcase $host in
2091145b7b3cSmrgia64-*-hpux*)
2092145b7b3cSmrg  # Find out which ABI we are using.
2093145b7b3cSmrg  echo 'int i;' > conftest.$ac_ext
2094145b7b3cSmrg  if AC_TRY_EVAL(ac_compile); then
2095145b7b3cSmrg    case `/usr/bin/file conftest.$ac_objext` in
2096145b7b3cSmrg    *ELF-32*)
2097145b7b3cSmrg      HPUX_IA64_MODE="32"
2098145b7b3cSmrg      ;;
2099145b7b3cSmrg    *ELF-64*)
2100145b7b3cSmrg      HPUX_IA64_MODE="64"
2101145b7b3cSmrg      ;;
2102145b7b3cSmrg    esac
2103145b7b3cSmrg  fi
2104145b7b3cSmrg  rm -rf conftest*
2105145b7b3cSmrg  ;;
2106145b7b3cSmrg*-*-irix6*)
2107145b7b3cSmrg  # Find out which ABI we are using.
2108145b7b3cSmrg  echo '[#]line __oline__ "configure"' > conftest.$ac_ext
2109145b7b3cSmrg  if AC_TRY_EVAL(ac_compile); then
2110145b7b3cSmrg   if test "$lt_cv_prog_gnu_ld" = yes; then
2111145b7b3cSmrg    case `/usr/bin/file conftest.$ac_objext` in
2112145b7b3cSmrg    *32-bit*)
2113145b7b3cSmrg      LD="${LD-ld} -melf32bsmip"
2114145b7b3cSmrg      ;;
2115145b7b3cSmrg    *N32*)
2116145b7b3cSmrg      LD="${LD-ld} -melf32bmipn32"
2117145b7b3cSmrg      ;;
2118145b7b3cSmrg    *64-bit*)
2119145b7b3cSmrg      LD="${LD-ld} -melf64bmip"
2120145b7b3cSmrg      ;;
2121145b7b3cSmrg    esac
2122145b7b3cSmrg   else
2123145b7b3cSmrg    case `/usr/bin/file conftest.$ac_objext` in
2124145b7b3cSmrg    *32-bit*)
2125145b7b3cSmrg      LD="${LD-ld} -32"
2126145b7b3cSmrg      ;;
2127145b7b3cSmrg    *N32*)
2128145b7b3cSmrg      LD="${LD-ld} -n32"
2129145b7b3cSmrg      ;;
2130145b7b3cSmrg    *64-bit*)
2131145b7b3cSmrg      LD="${LD-ld} -64"
2132145b7b3cSmrg      ;;
2133145b7b3cSmrg    esac
2134145b7b3cSmrg   fi
2135145b7b3cSmrg  fi
2136145b7b3cSmrg  rm -rf conftest*
2137145b7b3cSmrg  ;;
2138145b7b3cSmrg
2139145b7b3cSmrgx86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
2140145b7b3cSmrg  # Find out which ABI we are using.
2141145b7b3cSmrg  echo 'int i;' > conftest.$ac_ext
2142145b7b3cSmrg  if AC_TRY_EVAL(ac_compile); then
2143145b7b3cSmrg    case `/usr/bin/file conftest.o` in
2144145b7b3cSmrg    *32-bit*)
2145145b7b3cSmrg      case $host in
2146145b7b3cSmrg        x86_64-*linux*)
2147145b7b3cSmrg          LD="${LD-ld} -m elf_i386"
2148145b7b3cSmrg          ;;
2149145b7b3cSmrg        ppc64-*linux*|powerpc64-*linux*)
2150145b7b3cSmrg          LD="${LD-ld} -m elf32ppclinux"
2151145b7b3cSmrg          ;;
2152145b7b3cSmrg        s390x-*linux*)
2153145b7b3cSmrg          LD="${LD-ld} -m elf_s390"
2154145b7b3cSmrg          ;;
2155145b7b3cSmrg        sparc64-*linux*)
2156145b7b3cSmrg          LD="${LD-ld} -m elf32_sparc"
2157145b7b3cSmrg          ;;
2158145b7b3cSmrg      esac
2159145b7b3cSmrg      ;;
2160145b7b3cSmrg    *64-bit*)
2161145b7b3cSmrg      case $host in
2162145b7b3cSmrg        x86_64-*linux*)
2163145b7b3cSmrg          LD="${LD-ld} -m elf_x86_64"
2164145b7b3cSmrg          ;;
2165145b7b3cSmrg        ppc*-*linux*|powerpc*-*linux*)
2166145b7b3cSmrg          LD="${LD-ld} -m elf64ppc"
2167145b7b3cSmrg          ;;
2168145b7b3cSmrg        s390*-*linux*)
2169145b7b3cSmrg          LD="${LD-ld} -m elf64_s390"
2170145b7b3cSmrg          ;;
2171145b7b3cSmrg        sparc*-*linux*)
2172145b7b3cSmrg          LD="${LD-ld} -m elf64_sparc"
2173145b7b3cSmrg          ;;
2174145b7b3cSmrg      esac
2175145b7b3cSmrg      ;;
2176145b7b3cSmrg    esac
2177145b7b3cSmrg  fi
2178145b7b3cSmrg  rm -rf conftest*
2179145b7b3cSmrg  ;;
2180145b7b3cSmrg
2181145b7b3cSmrg*-*-sco3.2v5*)
2182145b7b3cSmrg  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
2183145b7b3cSmrg  SAVE_CFLAGS="$CFLAGS"
2184145b7b3cSmrg  CFLAGS="$CFLAGS -belf"
2185145b7b3cSmrg  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
2186145b7b3cSmrg    [AC_LANG_PUSH(C)
2187145b7b3cSmrg     AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
2188145b7b3cSmrg     AC_LANG_POP])
2189145b7b3cSmrg  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
2190145b7b3cSmrg    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
2191145b7b3cSmrg    CFLAGS="$SAVE_CFLAGS"
2192145b7b3cSmrg  fi
2193145b7b3cSmrg  ;;
2194145b7b3cSmrgsparc*-*solaris*)
2195145b7b3cSmrg  # Find out which ABI we are using.
2196145b7b3cSmrg  echo 'int i;' > conftest.$ac_ext
2197145b7b3cSmrg  if AC_TRY_EVAL(ac_compile); then
2198145b7b3cSmrg    case `/usr/bin/file conftest.o` in
2199145b7b3cSmrg    *64-bit*)
2200145b7b3cSmrg      case $lt_cv_prog_gnu_ld in
2201145b7b3cSmrg      yes*) LD="${LD-ld} -m elf64_sparc" ;;
2202145b7b3cSmrg      *)    LD="${LD-ld} -64" ;;
2203145b7b3cSmrg      esac
2204145b7b3cSmrg      ;;
2205145b7b3cSmrg    esac
2206145b7b3cSmrg  fi
2207145b7b3cSmrg  rm -rf conftest*
2208145b7b3cSmrg  ;;
2209145b7b3cSmrg
2210145b7b3cSmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
2211145b7b3cSmrg[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
2212145b7b3cSmrg  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
2213145b7b3cSmrg  AC_CHECK_TOOL(AS, as, false)
2214145b7b3cSmrg  AC_CHECK_TOOL(OBJDUMP, objdump, false)
2215145b7b3cSmrg  ;;
2216145b7b3cSmrg  ])
2217145b7b3cSmrgesac
2218145b7b3cSmrg
2219145b7b3cSmrgneed_locks="$enable_libtool_lock"
2220145b7b3cSmrg
2221145b7b3cSmrg])# _LT_AC_LOCK
2222145b7b3cSmrg
2223145b7b3cSmrg
2224145b7b3cSmrg# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
2225145b7b3cSmrg#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
2226145b7b3cSmrg# ----------------------------------------------------------------
2227145b7b3cSmrg# Check whether the given compiler option works
2228145b7b3cSmrgAC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
2229145b7b3cSmrg[AC_REQUIRE([LT_AC_PROG_SED])
2230145b7b3cSmrgAC_CACHE_CHECK([$1], [$2],
2231145b7b3cSmrg  [$2=no
2232145b7b3cSmrg  ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
2233145b7b3cSmrg   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
2234145b7b3cSmrg   lt_compiler_flag="$3"
2235145b7b3cSmrg   # Insert the option either (1) after the last *FLAGS variable, or
2236145b7b3cSmrg   # (2) before a word containing "conftest.", or (3) at the end.
2237145b7b3cSmrg   # Note that $ac_compile itself does not contain backslashes and begins
2238145b7b3cSmrg   # with a dollar sign (not a hyphen), so the echo should work correctly.
2239145b7b3cSmrg   # The option is referenced via a variable to avoid confusing sed.
2240145b7b3cSmrg   lt_compile=`echo "$ac_compile" | $SED \
2241145b7b3cSmrg   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
2242145b7b3cSmrg   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
2243145b7b3cSmrg   -e 's:$: $lt_compiler_flag:'`
2244145b7b3cSmrg   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
2245145b7b3cSmrg   (eval "$lt_compile" 2>conftest.err)
2246145b7b3cSmrg   ac_status=$?
2247145b7b3cSmrg   cat conftest.err >&AS_MESSAGE_LOG_FD
2248145b7b3cSmrg   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
2249145b7b3cSmrg   if (exit $ac_status) && test -s "$ac_outfile"; then
2250145b7b3cSmrg     # The compiler can only warn and ignore the option if not recognized
2251145b7b3cSmrg     # So say no if there are warnings other than the usual output.
2252145b7b3cSmrg     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
2253145b7b3cSmrg     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
2254145b7b3cSmrg     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
2255145b7b3cSmrg       $2=yes
2256145b7b3cSmrg     fi
2257145b7b3cSmrg   fi
2258145b7b3cSmrg   $rm conftest*
2259145b7b3cSmrg])
2260145b7b3cSmrg
2261145b7b3cSmrgif test x"[$]$2" = xyes; then
2262145b7b3cSmrg    ifelse([$5], , :, [$5])
2263145b7b3cSmrgelse
2264145b7b3cSmrg    ifelse([$6], , :, [$6])
2265145b7b3cSmrgfi
2266145b7b3cSmrg])# AC_LIBTOOL_COMPILER_OPTION
2267145b7b3cSmrg
2268145b7b3cSmrg
2269145b7b3cSmrg# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
2270145b7b3cSmrg#                          [ACTION-SUCCESS], [ACTION-FAILURE])
2271145b7b3cSmrg# ------------------------------------------------------------
2272145b7b3cSmrg# Check whether the given compiler option works
2273145b7b3cSmrgAC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
2274145b7b3cSmrg[AC_CACHE_CHECK([$1], [$2],
2275145b7b3cSmrg  [$2=no
2276145b7b3cSmrg   save_LDFLAGS="$LDFLAGS"
2277145b7b3cSmrg   LDFLAGS="$LDFLAGS $3"
2278145b7b3cSmrg   printf "$lt_simple_link_test_code" > conftest.$ac_ext
2279145b7b3cSmrg   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
2280145b7b3cSmrg     # The linker can only warn and ignore the option if not recognized
2281145b7b3cSmrg     # So say no if there are warnings
2282145b7b3cSmrg     if test -s conftest.err; then
2283145b7b3cSmrg       # Append any errors to the config.log.
2284145b7b3cSmrg       cat conftest.err 1>&AS_MESSAGE_LOG_FD
2285145b7b3cSmrg       $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
2286145b7b3cSmrg       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
2287145b7b3cSmrg       if diff conftest.exp conftest.er2 >/dev/null; then
2288145b7b3cSmrg         $2=yes
2289145b7b3cSmrg       fi
2290145b7b3cSmrg     else
2291145b7b3cSmrg       $2=yes
2292145b7b3cSmrg     fi
2293145b7b3cSmrg   fi
2294145b7b3cSmrg   $rm conftest*
2295145b7b3cSmrg   LDFLAGS="$save_LDFLAGS"
2296145b7b3cSmrg])
2297145b7b3cSmrg
2298145b7b3cSmrgif test x"[$]$2" = xyes; then
2299145b7b3cSmrg    ifelse([$4], , :, [$4])
2300145b7b3cSmrgelse
2301145b7b3cSmrg    ifelse([$5], , :, [$5])
2302145b7b3cSmrgfi
2303145b7b3cSmrg])# AC_LIBTOOL_LINKER_OPTION
2304145b7b3cSmrg
2305145b7b3cSmrg
2306145b7b3cSmrg# AC_LIBTOOL_SYS_MAX_CMD_LEN
2307145b7b3cSmrg# --------------------------
2308145b7b3cSmrgAC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
2309145b7b3cSmrg[# find the maximum length of command line arguments
2310145b7b3cSmrgAC_MSG_CHECKING([the maximum length of command line arguments])
2311145b7b3cSmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
2312145b7b3cSmrg  i=0
2313145b7b3cSmrg  teststring="ABCD"
2314145b7b3cSmrg
2315145b7b3cSmrg  case $build_os in
2316145b7b3cSmrg  msdosdjgpp*)
2317145b7b3cSmrg    # On DJGPP, this test can blow up pretty badly due to problems in libc
2318145b7b3cSmrg    # (any single argument exceeding 2000 bytes causes a buffer overrun
2319145b7b3cSmrg    # during glob expansion).  Even if it were fixed, the result of this
2320145b7b3cSmrg    # check would be larger than it should be.
2321145b7b3cSmrg    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
2322145b7b3cSmrg    ;;
2323145b7b3cSmrg
2324145b7b3cSmrg  gnu*)
2325145b7b3cSmrg    # Under GNU Hurd, this test is not required because there is
2326145b7b3cSmrg    # no limit to the length of command line arguments.
2327145b7b3cSmrg    # Libtool will interpret -1 as no limit whatsoever
2328145b7b3cSmrg    lt_cv_sys_max_cmd_len=-1;
2329145b7b3cSmrg    ;;
2330145b7b3cSmrg
2331145b7b3cSmrg  cygwin* | mingw*)
2332145b7b3cSmrg    # On Win9x/ME, this test blows up -- it succeeds, but takes
2333145b7b3cSmrg    # about 5 minutes as the teststring grows exponentially.
2334145b7b3cSmrg    # Worse, since 9x/ME are not pre-emptively multitasking,
2335145b7b3cSmrg    # you end up with a "frozen" computer, even though with patience
2336145b7b3cSmrg    # the test eventually succeeds (with a max line length of 256k).
2337145b7b3cSmrg    # Instead, let's just punt: use the minimum linelength reported by
2338145b7b3cSmrg    # all of the supported platforms: 8192 (on NT/2K/XP).
2339145b7b3cSmrg    lt_cv_sys_max_cmd_len=8192;
2340145b7b3cSmrg    ;;
2341145b7b3cSmrg
2342145b7b3cSmrg  amigaos*)
2343145b7b3cSmrg    # On AmigaOS with pdksh, this test takes hours, literally.
2344145b7b3cSmrg    # So we just punt and use a minimum line length of 8192.
2345145b7b3cSmrg    lt_cv_sys_max_cmd_len=8192;
2346145b7b3cSmrg    ;;
2347145b7b3cSmrg
2348145b7b3cSmrg  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
2349145b7b3cSmrg    # This has been around since 386BSD, at least.  Likely further.
2350145b7b3cSmrg    if test -x /sbin/sysctl; then
2351145b7b3cSmrg      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
2352145b7b3cSmrg    elif test -x /usr/sbin/sysctl; then
2353145b7b3cSmrg      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
2354145b7b3cSmrg    else
2355145b7b3cSmrg      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
2356145b7b3cSmrg    fi
2357145b7b3cSmrg    # And add a safety zone
2358145b7b3cSmrg    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
2359145b7b3cSmrg    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
2360145b7b3cSmrg    ;;
2361145b7b3cSmrg
2362145b7b3cSmrg  interix*)
2363145b7b3cSmrg    # We know the value 262144 and hardcode it with a safety zone (like BSD)
2364145b7b3cSmrg    lt_cv_sys_max_cmd_len=196608
2365145b7b3cSmrg    ;;
2366145b7b3cSmrg
2367145b7b3cSmrg  osf*)
2368145b7b3cSmrg    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
2369145b7b3cSmrg    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
2370145b7b3cSmrg    # nice to cause kernel panics so lets avoid the loop below.
2371145b7b3cSmrg    # First set a reasonable default.
2372145b7b3cSmrg    lt_cv_sys_max_cmd_len=16384
2373145b7b3cSmrg    #
2374145b7b3cSmrg    if test -x /sbin/sysconfig; then
2375145b7b3cSmrg      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
2376145b7b3cSmrg        *1*) lt_cv_sys_max_cmd_len=-1 ;;
2377145b7b3cSmrg      esac
2378145b7b3cSmrg    fi
2379145b7b3cSmrg    ;;
2380145b7b3cSmrg  sco3.2v5*)
2381145b7b3cSmrg    lt_cv_sys_max_cmd_len=102400
2382145b7b3cSmrg    ;;
2383145b7b3cSmrg  sysv5* | sco5v6* | sysv4.2uw2*)
2384145b7b3cSmrg    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
2385145b7b3cSmrg    if test -n "$kargmax"; then
2386145b7b3cSmrg      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ 	]]//'`
2387145b7b3cSmrg    else
2388145b7b3cSmrg      lt_cv_sys_max_cmd_len=32768
2389145b7b3cSmrg    fi
2390145b7b3cSmrg    ;;
2391145b7b3cSmrg  *)
2392145b7b3cSmrg    # If test is not a shell built-in, we'll probably end up computing a
2393145b7b3cSmrg    # maximum length that is only half of the actual maximum length, but
2394145b7b3cSmrg    # we can't tell.
2395145b7b3cSmrg    SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
2396145b7b3cSmrg    while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
2397145b7b3cSmrg	       = "XX$teststring") >/dev/null 2>&1 &&
2398145b7b3cSmrg	    new_result=`expr "X$teststring" : ".*" 2>&1` &&
2399145b7b3cSmrg	    lt_cv_sys_max_cmd_len=$new_result &&
2400145b7b3cSmrg	    test $i != 17 # 1/2 MB should be enough
2401145b7b3cSmrg    do
2402145b7b3cSmrg      i=`expr $i + 1`
2403145b7b3cSmrg      teststring=$teststring$teststring
2404145b7b3cSmrg    done
2405145b7b3cSmrg    teststring=
2406145b7b3cSmrg    # Add a significant safety factor because C++ compilers can tack on massive
2407145b7b3cSmrg    # amounts of additional arguments before passing them to the linker.
2408145b7b3cSmrg    # It appears as though 1/2 is a usable value.
2409145b7b3cSmrg    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
2410145b7b3cSmrg    ;;
2411145b7b3cSmrg  esac
2412145b7b3cSmrg])
2413145b7b3cSmrgif test -n $lt_cv_sys_max_cmd_len ; then
2414145b7b3cSmrg  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
2415145b7b3cSmrgelse
2416145b7b3cSmrg  AC_MSG_RESULT(none)
2417145b7b3cSmrgfi
2418145b7b3cSmrg])# AC_LIBTOOL_SYS_MAX_CMD_LEN
2419145b7b3cSmrg
2420145b7b3cSmrg
2421145b7b3cSmrg# _LT_AC_CHECK_DLFCN
2422145b7b3cSmrg# ------------------
2423145b7b3cSmrgAC_DEFUN([_LT_AC_CHECK_DLFCN],
2424145b7b3cSmrg[AC_CHECK_HEADERS(dlfcn.h)dnl
2425145b7b3cSmrg])# _LT_AC_CHECK_DLFCN
2426145b7b3cSmrg
2427145b7b3cSmrg
2428145b7b3cSmrg# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
2429145b7b3cSmrg#                           ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
2430145b7b3cSmrg# ---------------------------------------------------------------------
2431145b7b3cSmrgAC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
2432145b7b3cSmrg[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
2433145b7b3cSmrgif test "$cross_compiling" = yes; then :
2434145b7b3cSmrg  [$4]
2435145b7b3cSmrgelse
2436145b7b3cSmrg  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
2437145b7b3cSmrg  lt_status=$lt_dlunknown
2438145b7b3cSmrg  cat > conftest.$ac_ext <<EOF
2439145b7b3cSmrg[#line __oline__ "configure"
2440145b7b3cSmrg#include "confdefs.h"
2441145b7b3cSmrg
2442145b7b3cSmrg#if HAVE_DLFCN_H
2443145b7b3cSmrg#include <dlfcn.h>
2444145b7b3cSmrg#endif
2445145b7b3cSmrg
2446145b7b3cSmrg#include <stdio.h>
2447145b7b3cSmrg
2448145b7b3cSmrg#ifdef RTLD_GLOBAL
2449145b7b3cSmrg#  define LT_DLGLOBAL		RTLD_GLOBAL
2450145b7b3cSmrg#else
2451145b7b3cSmrg#  ifdef DL_GLOBAL
2452145b7b3cSmrg#    define LT_DLGLOBAL		DL_GLOBAL
2453145b7b3cSmrg#  else
2454145b7b3cSmrg#    define LT_DLGLOBAL		0
2455145b7b3cSmrg#  endif
2456145b7b3cSmrg#endif
2457145b7b3cSmrg
2458145b7b3cSmrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
2459145b7b3cSmrg   find out it does not work in some platform. */
2460145b7b3cSmrg#ifndef LT_DLLAZY_OR_NOW
2461145b7b3cSmrg#  ifdef RTLD_LAZY
2462145b7b3cSmrg#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
2463145b7b3cSmrg#  else
2464145b7b3cSmrg#    ifdef DL_LAZY
2465145b7b3cSmrg#      define LT_DLLAZY_OR_NOW		DL_LAZY
2466145b7b3cSmrg#    else
2467145b7b3cSmrg#      ifdef RTLD_NOW
2468145b7b3cSmrg#        define LT_DLLAZY_OR_NOW	RTLD_NOW
2469145b7b3cSmrg#      else
2470145b7b3cSmrg#        ifdef DL_NOW
2471145b7b3cSmrg#          define LT_DLLAZY_OR_NOW	DL_NOW
2472145b7b3cSmrg#        else
2473145b7b3cSmrg#          define LT_DLLAZY_OR_NOW	0
2474145b7b3cSmrg#        endif
2475145b7b3cSmrg#      endif
2476145b7b3cSmrg#    endif
2477145b7b3cSmrg#  endif
2478145b7b3cSmrg#endif
2479145b7b3cSmrg
2480145b7b3cSmrg#ifdef __cplusplus
2481145b7b3cSmrgextern "C" void exit (int);
2482145b7b3cSmrg#endif
2483145b7b3cSmrg
2484145b7b3cSmrgvoid fnord() { int i=42;}
2485145b7b3cSmrgint main ()
2486145b7b3cSmrg{
2487145b7b3cSmrg  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
2488145b7b3cSmrg  int status = $lt_dlunknown;
2489145b7b3cSmrg
2490145b7b3cSmrg  if (self)
2491145b7b3cSmrg    {
2492145b7b3cSmrg      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
2493145b7b3cSmrg      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
2494145b7b3cSmrg      /* dlclose (self); */
2495145b7b3cSmrg    }
2496145b7b3cSmrg  else
2497145b7b3cSmrg    puts (dlerror ());
2498145b7b3cSmrg
2499145b7b3cSmrg    exit (status);
2500145b7b3cSmrg}]
2501145b7b3cSmrgEOF
2502145b7b3cSmrg  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
2503145b7b3cSmrg    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
2504145b7b3cSmrg    lt_status=$?
2505145b7b3cSmrg    case x$lt_status in
2506145b7b3cSmrg      x$lt_dlno_uscore) $1 ;;
2507145b7b3cSmrg      x$lt_dlneed_uscore) $2 ;;
2508145b7b3cSmrg      x$lt_dlunknown|x*) $3 ;;
2509145b7b3cSmrg    esac
2510145b7b3cSmrg  else :
2511145b7b3cSmrg    # compilation failed
2512145b7b3cSmrg    $3
2513145b7b3cSmrg  fi
2514145b7b3cSmrgfi
2515145b7b3cSmrgrm -fr conftest*
2516145b7b3cSmrg])# _LT_AC_TRY_DLOPEN_SELF
2517145b7b3cSmrg
2518145b7b3cSmrg
2519145b7b3cSmrg# AC_LIBTOOL_DLOPEN_SELF
2520145b7b3cSmrg# ----------------------
2521145b7b3cSmrgAC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
2522145b7b3cSmrg[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
2523145b7b3cSmrgif test "x$enable_dlopen" != xyes; then
2524145b7b3cSmrg  enable_dlopen=unknown
2525145b7b3cSmrg  enable_dlopen_self=unknown
2526145b7b3cSmrg  enable_dlopen_self_static=unknown
2527145b7b3cSmrgelse
2528145b7b3cSmrg  lt_cv_dlopen=no
2529145b7b3cSmrg  lt_cv_dlopen_libs=
2530145b7b3cSmrg
2531145b7b3cSmrg  case $host_os in
2532145b7b3cSmrg  beos*)
2533145b7b3cSmrg    lt_cv_dlopen="load_add_on"
2534145b7b3cSmrg    lt_cv_dlopen_libs=
2535145b7b3cSmrg    lt_cv_dlopen_self=yes
2536145b7b3cSmrg    ;;
2537145b7b3cSmrg
2538145b7b3cSmrg  mingw* | pw32*)
2539145b7b3cSmrg    lt_cv_dlopen="LoadLibrary"
2540145b7b3cSmrg    lt_cv_dlopen_libs=
2541145b7b3cSmrg   ;;
2542145b7b3cSmrg
2543145b7b3cSmrg  cygwin*)
2544145b7b3cSmrg    lt_cv_dlopen="dlopen"
2545145b7b3cSmrg    lt_cv_dlopen_libs=
2546145b7b3cSmrg   ;;
2547145b7b3cSmrg
2548145b7b3cSmrg  darwin*)
2549145b7b3cSmrg  # if libdl is installed we need to link against it
2550145b7b3cSmrg    AC_CHECK_LIB([dl], [dlopen],
2551145b7b3cSmrg		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
2552145b7b3cSmrg    lt_cv_dlopen="dyld"
2553145b7b3cSmrg    lt_cv_dlopen_libs=
2554145b7b3cSmrg    lt_cv_dlopen_self=yes
2555145b7b3cSmrg    ])
2556145b7b3cSmrg   ;;
2557145b7b3cSmrg
2558145b7b3cSmrg  *)
2559145b7b3cSmrg    AC_CHECK_FUNC([shl_load],
2560145b7b3cSmrg	  [lt_cv_dlopen="shl_load"],
2561145b7b3cSmrg      [AC_CHECK_LIB([dld], [shl_load],
2562145b7b3cSmrg	    [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
2563145b7b3cSmrg	[AC_CHECK_FUNC([dlopen],
2564145b7b3cSmrg	      [lt_cv_dlopen="dlopen"],
2565145b7b3cSmrg	  [AC_CHECK_LIB([dl], [dlopen],
2566145b7b3cSmrg		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
2567145b7b3cSmrg	    [AC_CHECK_LIB([svld], [dlopen],
2568145b7b3cSmrg		  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
2569145b7b3cSmrg	      [AC_CHECK_LIB([dld], [dld_link],
2570145b7b3cSmrg		    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
2571145b7b3cSmrg	      ])
2572145b7b3cSmrg	    ])
2573145b7b3cSmrg	  ])
2574145b7b3cSmrg	])
2575145b7b3cSmrg      ])
2576145b7b3cSmrg    ;;
2577145b7b3cSmrg  esac
2578145b7b3cSmrg
2579145b7b3cSmrg  if test "x$lt_cv_dlopen" != xno; then
2580145b7b3cSmrg    enable_dlopen=yes
2581145b7b3cSmrg  else
2582145b7b3cSmrg    enable_dlopen=no
2583145b7b3cSmrg  fi
2584145b7b3cSmrg
2585145b7b3cSmrg  case $lt_cv_dlopen in
2586145b7b3cSmrg  dlopen)
2587145b7b3cSmrg    save_CPPFLAGS="$CPPFLAGS"
2588145b7b3cSmrg    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
2589145b7b3cSmrg
2590145b7b3cSmrg    save_LDFLAGS="$LDFLAGS"
2591145b7b3cSmrg    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
2592145b7b3cSmrg
2593145b7b3cSmrg    save_LIBS="$LIBS"
2594145b7b3cSmrg    LIBS="$lt_cv_dlopen_libs $LIBS"
2595145b7b3cSmrg
2596145b7b3cSmrg    AC_CACHE_CHECK([whether a program can dlopen itself],
2597145b7b3cSmrg	  lt_cv_dlopen_self, [dnl
2598145b7b3cSmrg	  _LT_AC_TRY_DLOPEN_SELF(
2599145b7b3cSmrg	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
2600145b7b3cSmrg	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
2601145b7b3cSmrg    ])
2602145b7b3cSmrg
2603145b7b3cSmrg    if test "x$lt_cv_dlopen_self" = xyes; then
2604145b7b3cSmrg      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
2605145b7b3cSmrg      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
2606145b7b3cSmrg    	  lt_cv_dlopen_self_static, [dnl
2607145b7b3cSmrg	  _LT_AC_TRY_DLOPEN_SELF(
2608145b7b3cSmrg	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
2609145b7b3cSmrg	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
2610145b7b3cSmrg      ])
2611145b7b3cSmrg    fi
2612145b7b3cSmrg
2613145b7b3cSmrg    CPPFLAGS="$save_CPPFLAGS"
2614145b7b3cSmrg    LDFLAGS="$save_LDFLAGS"
2615145b7b3cSmrg    LIBS="$save_LIBS"
2616145b7b3cSmrg    ;;
2617145b7b3cSmrg  esac
2618145b7b3cSmrg
2619145b7b3cSmrg  case $lt_cv_dlopen_self in
2620145b7b3cSmrg  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
2621145b7b3cSmrg  *) enable_dlopen_self=unknown ;;
2622145b7b3cSmrg  esac
2623145b7b3cSmrg
2624145b7b3cSmrg  case $lt_cv_dlopen_self_static in
2625145b7b3cSmrg  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
2626145b7b3cSmrg  *) enable_dlopen_self_static=unknown ;;
2627145b7b3cSmrg  esac
2628145b7b3cSmrgfi
2629145b7b3cSmrg])# AC_LIBTOOL_DLOPEN_SELF
2630145b7b3cSmrg
2631145b7b3cSmrg
2632145b7b3cSmrg# AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
2633145b7b3cSmrg# ---------------------------------
2634145b7b3cSmrg# Check to see if options -c and -o are simultaneously supported by compiler
2635145b7b3cSmrgAC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
2636145b7b3cSmrg[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
2637145b7b3cSmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
2638145b7b3cSmrg  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
2639145b7b3cSmrg  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
2640145b7b3cSmrg   $rm -r conftest 2>/dev/null
2641145b7b3cSmrg   mkdir conftest
2642145b7b3cSmrg   cd conftest
2643145b7b3cSmrg   mkdir out
2644145b7b3cSmrg   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
2645145b7b3cSmrg
2646145b7b3cSmrg   lt_compiler_flag="-o out/conftest2.$ac_objext"
2647145b7b3cSmrg   # Insert the option either (1) after the last *FLAGS variable, or
2648145b7b3cSmrg   # (2) before a word containing "conftest.", or (3) at the end.
2649145b7b3cSmrg   # Note that $ac_compile itself does not contain backslashes and begins
2650145b7b3cSmrg   # with a dollar sign (not a hyphen), so the echo should work correctly.
2651145b7b3cSmrg   lt_compile=`echo "$ac_compile" | $SED \
2652145b7b3cSmrg   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
2653145b7b3cSmrg   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
2654145b7b3cSmrg   -e 's:$: $lt_compiler_flag:'`
2655145b7b3cSmrg   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
2656145b7b3cSmrg   (eval "$lt_compile" 2>out/conftest.err)
2657145b7b3cSmrg   ac_status=$?
2658145b7b3cSmrg   cat out/conftest.err >&AS_MESSAGE_LOG_FD
2659145b7b3cSmrg   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
2660145b7b3cSmrg   if (exit $ac_status) && test -s out/conftest2.$ac_objext
2661145b7b3cSmrg   then
2662145b7b3cSmrg     # The compiler can only warn and ignore the option if not recognized
2663145b7b3cSmrg     # So say no if there are warnings
2664145b7b3cSmrg     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
2665145b7b3cSmrg     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
2666145b7b3cSmrg     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
2667145b7b3cSmrg       _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
2668145b7b3cSmrg     fi
2669145b7b3cSmrg   fi
2670145b7b3cSmrg   chmod u+w . 2>&AS_MESSAGE_LOG_FD
2671145b7b3cSmrg   $rm conftest*
2672145b7b3cSmrg   # SGI C++ compiler will create directory out/ii_files/ for
2673145b7b3cSmrg   # template instantiation
2674145b7b3cSmrg   test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
2675145b7b3cSmrg   $rm out/* && rmdir out
2676145b7b3cSmrg   cd ..
2677145b7b3cSmrg   rmdir conftest
2678145b7b3cSmrg   $rm conftest*
2679145b7b3cSmrg])
2680145b7b3cSmrg])# AC_LIBTOOL_PROG_CC_C_O
2681145b7b3cSmrg
2682145b7b3cSmrg
2683145b7b3cSmrg# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
2684145b7b3cSmrg# -----------------------------------------
2685145b7b3cSmrg# Check to see if we can do hard links to lock some files if needed
2686145b7b3cSmrgAC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
2687145b7b3cSmrg[AC_REQUIRE([_LT_AC_LOCK])dnl
2688145b7b3cSmrg
2689145b7b3cSmrghard_links="nottested"
2690145b7b3cSmrgif test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
2691145b7b3cSmrg  # do not overwrite the value of need_locks provided by the user
2692145b7b3cSmrg  AC_MSG_CHECKING([if we can lock with hard links])
2693145b7b3cSmrg  hard_links=yes
2694145b7b3cSmrg  $rm conftest*
2695145b7b3cSmrg  ln conftest.a conftest.b 2>/dev/null && hard_links=no
2696145b7b3cSmrg  touch conftest.a
2697145b7b3cSmrg  ln conftest.a conftest.b 2>&5 || hard_links=no
2698145b7b3cSmrg  ln conftest.a conftest.b 2>/dev/null && hard_links=no
2699145b7b3cSmrg  AC_MSG_RESULT([$hard_links])
2700145b7b3cSmrg  if test "$hard_links" = no; then
2701145b7b3cSmrg    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
2702145b7b3cSmrg    need_locks=warn
2703145b7b3cSmrg  fi
2704145b7b3cSmrgelse
2705145b7b3cSmrg  need_locks=no
2706145b7b3cSmrgfi
2707145b7b3cSmrg])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
2708145b7b3cSmrg
2709145b7b3cSmrg
2710145b7b3cSmrg# AC_LIBTOOL_OBJDIR
2711145b7b3cSmrg# -----------------
2712145b7b3cSmrgAC_DEFUN([AC_LIBTOOL_OBJDIR],
2713145b7b3cSmrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
2714145b7b3cSmrg[rm -f .libs 2>/dev/null
2715145b7b3cSmrgmkdir .libs 2>/dev/null
2716145b7b3cSmrgif test -d .libs; then
2717145b7b3cSmrg  lt_cv_objdir=.libs
2718145b7b3cSmrgelse
2719145b7b3cSmrg  # MS-DOS does not allow filenames that begin with a dot.
2720145b7b3cSmrg  lt_cv_objdir=_libs
2721145b7b3cSmrgfi
2722145b7b3cSmrgrmdir .libs 2>/dev/null])
2723145b7b3cSmrgobjdir=$lt_cv_objdir
2724145b7b3cSmrg])# AC_LIBTOOL_OBJDIR
2725145b7b3cSmrg
2726145b7b3cSmrg
2727145b7b3cSmrg# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
2728145b7b3cSmrg# ----------------------------------------------
2729145b7b3cSmrg# Check hardcoding attributes.
2730145b7b3cSmrgAC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
2731145b7b3cSmrg[AC_MSG_CHECKING([how to hardcode library paths into programs])
2732145b7b3cSmrg_LT_AC_TAGVAR(hardcode_action, $1)=
2733145b7b3cSmrgif test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
2734145b7b3cSmrg   test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \
2735145b7b3cSmrg   test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
2736145b7b3cSmrg
2737145b7b3cSmrg  # We can hardcode non-existant directories.
2738145b7b3cSmrg  if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
2739145b7b3cSmrg     # If the only mechanism to avoid hardcoding is shlibpath_var, we
2740145b7b3cSmrg     # have to relink, otherwise we might link with an installed library
2741145b7b3cSmrg     # when we should be linking with a yet-to-be-installed one
2742145b7b3cSmrg     ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
2743145b7b3cSmrg     test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
2744145b7b3cSmrg    # Linking always hardcodes the temporary library directory.
2745145b7b3cSmrg    _LT_AC_TAGVAR(hardcode_action, $1)=relink
2746145b7b3cSmrg  else
2747145b7b3cSmrg    # We can link without hardcoding, and we can hardcode nonexisting dirs.
2748145b7b3cSmrg    _LT_AC_TAGVAR(hardcode_action, $1)=immediate
2749145b7b3cSmrg  fi
2750145b7b3cSmrgelse
2751145b7b3cSmrg  # We cannot hardcode anything, or else we can only hardcode existing
2752145b7b3cSmrg  # directories.
2753145b7b3cSmrg  _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
2754145b7b3cSmrgfi
2755145b7b3cSmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
2756145b7b3cSmrg
2757145b7b3cSmrgif test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
2758145b7b3cSmrg  # Fast installation is not supported
2759145b7b3cSmrg  enable_fast_install=no
2760145b7b3cSmrgelif test "$shlibpath_overrides_runpath" = yes ||
2761145b7b3cSmrg     test "$enable_shared" = no; then
2762145b7b3cSmrg  # Fast installation is not necessary
2763145b7b3cSmrg  enable_fast_install=needless
2764145b7b3cSmrgfi
2765145b7b3cSmrg])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
2766145b7b3cSmrg
2767145b7b3cSmrg
2768145b7b3cSmrg# AC_LIBTOOL_SYS_LIB_STRIP
2769145b7b3cSmrg# ------------------------
2770145b7b3cSmrgAC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
2771145b7b3cSmrg[striplib=
2772145b7b3cSmrgold_striplib=
2773145b7b3cSmrgAC_MSG_CHECKING([whether stripping libraries is possible])
2774145b7b3cSmrgif test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
2775145b7b3cSmrg  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
2776145b7b3cSmrg  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
2777145b7b3cSmrg  AC_MSG_RESULT([yes])
2778145b7b3cSmrgelse
2779145b7b3cSmrg# FIXME - insert some real tests, host_os isn't really good enough
2780145b7b3cSmrg  case $host_os in
2781145b7b3cSmrg   darwin*)
2782145b7b3cSmrg       if test -n "$STRIP" ; then
2783145b7b3cSmrg         striplib="$STRIP -x"
2784145b7b3cSmrg         AC_MSG_RESULT([yes])
2785145b7b3cSmrg       else
2786145b7b3cSmrg  AC_MSG_RESULT([no])
2787145b7b3cSmrgfi
2788145b7b3cSmrg       ;;
2789145b7b3cSmrg   *)
2790145b7b3cSmrg  AC_MSG_RESULT([no])
2791145b7b3cSmrg    ;;
2792145b7b3cSmrg  esac
2793145b7b3cSmrgfi
2794145b7b3cSmrg])# AC_LIBTOOL_SYS_LIB_STRIP
2795145b7b3cSmrg
2796145b7b3cSmrg
2797145b7b3cSmrg# AC_LIBTOOL_SYS_DYNAMIC_LINKER
2798145b7b3cSmrg# -----------------------------
2799145b7b3cSmrg# PORTME Fill in your ld.so characteristics
2800145b7b3cSmrgAC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
2801145b7b3cSmrg[AC_MSG_CHECKING([dynamic linker characteristics])
2802145b7b3cSmrglibrary_names_spec=
2803145b7b3cSmrglibname_spec='lib$name'
2804145b7b3cSmrgsoname_spec=
2805145b7b3cSmrgshrext_cmds=".so"
2806145b7b3cSmrgpostinstall_cmds=
2807145b7b3cSmrgpostuninstall_cmds=
2808145b7b3cSmrgfinish_cmds=
2809145b7b3cSmrgfinish_eval=
2810145b7b3cSmrgshlibpath_var=
2811145b7b3cSmrgshlibpath_overrides_runpath=unknown
2812145b7b3cSmrgversion_type=none
2813145b7b3cSmrgdynamic_linker="$host_os ld.so"
2814145b7b3cSmrgsys_lib_dlsearch_path_spec="/lib /usr/lib"
2815145b7b3cSmrgif test "$GCC" = yes; then
2816145b7b3cSmrg  sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
2817145b7b3cSmrg  if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
2818145b7b3cSmrg    # if the path contains ";" then we assume it to be the separator
2819145b7b3cSmrg    # otherwise default to the standard path separator (i.e. ":") - it is
2820145b7b3cSmrg    # assumed that no part of a normal pathname contains ";" but that should
2821145b7b3cSmrg    # okay in the real world where ";" in dirpaths is itself problematic.
2822145b7b3cSmrg    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
2823145b7b3cSmrg  else
2824145b7b3cSmrg    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
2825145b7b3cSmrg  fi
2826145b7b3cSmrgelse
2827145b7b3cSmrg  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2828145b7b3cSmrgfi
2829145b7b3cSmrgneed_lib_prefix=unknown
2830145b7b3cSmrghardcode_into_libs=no
2831145b7b3cSmrg
2832145b7b3cSmrg# when you set need_version to no, make sure it does not cause -set_version
2833145b7b3cSmrg# flags to be left without arguments
2834145b7b3cSmrgneed_version=unknown
2835145b7b3cSmrg
2836145b7b3cSmrgcase $host_os in
2837145b7b3cSmrgaix3*)
2838145b7b3cSmrg  version_type=linux
2839145b7b3cSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
2840145b7b3cSmrg  shlibpath_var=LIBPATH
2841145b7b3cSmrg
2842145b7b3cSmrg  # AIX 3 has no versioning support, so we append a major version to the name.
2843145b7b3cSmrg  soname_spec='${libname}${release}${shared_ext}$major'
2844145b7b3cSmrg  ;;
2845145b7b3cSmrg
2846145b7b3cSmrgaix4* | aix5*)
2847145b7b3cSmrg  version_type=linux
2848145b7b3cSmrg  need_lib_prefix=no
2849145b7b3cSmrg  need_version=no
2850145b7b3cSmrg  hardcode_into_libs=yes
2851145b7b3cSmrg  if test "$host_cpu" = ia64; then
2852145b7b3cSmrg    # AIX 5 supports IA64
2853145b7b3cSmrg    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
2854145b7b3cSmrg    shlibpath_var=LD_LIBRARY_PATH
2855145b7b3cSmrg  else
2856145b7b3cSmrg    # With GCC up to 2.95.x, collect2 would create an import file
2857145b7b3cSmrg    # for dependence libraries.  The import file would start with
2858145b7b3cSmrg    # the line `#! .'.  This would cause the generated library to
2859145b7b3cSmrg    # depend on `.', always an invalid library.  This was fixed in
2860145b7b3cSmrg    # development snapshots of GCC prior to 3.0.
2861145b7b3cSmrg    case $host_os in
2862145b7b3cSmrg      aix4 | aix4.[[01]] | aix4.[[01]].*)
2863145b7b3cSmrg      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
2864145b7b3cSmrg	   echo ' yes '
2865145b7b3cSmrg	   echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
2866145b7b3cSmrg	:
2867145b7b3cSmrg      else
2868145b7b3cSmrg	can_build_shared=no
2869145b7b3cSmrg      fi
2870145b7b3cSmrg      ;;
2871145b7b3cSmrg    esac
2872145b7b3cSmrg    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
2873145b7b3cSmrg    # soname into executable. Probably we can add versioning support to
2874145b7b3cSmrg    # collect2, so additional links can be useful in future.
2875145b7b3cSmrg    if test "$aix_use_runtimelinking" = yes; then
2876145b7b3cSmrg      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
2877145b7b3cSmrg      # instead of lib<name>.a to let people know that these are not
2878145b7b3cSmrg      # typical AIX shared libraries.
2879145b7b3cSmrg      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2880145b7b3cSmrg    else
2881145b7b3cSmrg      # We preserve .a as extension for shared libraries through AIX4.2
2882145b7b3cSmrg      # and later when we are not doing run time linking.
2883145b7b3cSmrg      library_names_spec='${libname}${release}.a $libname.a'
2884145b7b3cSmrg      soname_spec='${libname}${release}${shared_ext}$major'
2885145b7b3cSmrg    fi
2886145b7b3cSmrg    shlibpath_var=LIBPATH
2887145b7b3cSmrg  fi
2888145b7b3cSmrg  ;;
2889145b7b3cSmrg
2890145b7b3cSmrgamigaos*)
2891145b7b3cSmrg  library_names_spec='$libname.ixlibrary $libname.a'
2892145b7b3cSmrg  # Create ${libname}_ixlibrary.a entries in /sys/libs.
2893145b7b3cSmrg  finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
2894145b7b3cSmrg  ;;
2895145b7b3cSmrg
2896145b7b3cSmrgbeos*)
2897145b7b3cSmrg  library_names_spec='${libname}${shared_ext}'
2898145b7b3cSmrg  dynamic_linker="$host_os ld.so"
2899145b7b3cSmrg  shlibpath_var=LIBRARY_PATH
2900145b7b3cSmrg  ;;
2901145b7b3cSmrg
2902145b7b3cSmrgbsdi[[45]]*)
2903145b7b3cSmrg  version_type=linux
2904145b7b3cSmrg  need_version=no
2905145b7b3cSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2906145b7b3cSmrg  soname_spec='${libname}${release}${shared_ext}$major'
2907145b7b3cSmrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
2908145b7b3cSmrg  shlibpath_var=LD_LIBRARY_PATH
2909145b7b3cSmrg  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
2910145b7b3cSmrg  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
2911145b7b3cSmrg  # the default ld.so.conf also contains /usr/contrib/lib and
2912145b7b3cSmrg  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
2913145b7b3cSmrg  # libtool to hard-code these into programs
2914145b7b3cSmrg  ;;
2915145b7b3cSmrg
2916145b7b3cSmrgcygwin* | mingw* | pw32*)
2917145b7b3cSmrg  version_type=windows
2918145b7b3cSmrg  shrext_cmds=".dll"
2919145b7b3cSmrg  need_version=no
2920145b7b3cSmrg  need_lib_prefix=no
2921145b7b3cSmrg
2922145b7b3cSmrg  case $GCC,$host_os in
2923145b7b3cSmrg  yes,cygwin* | yes,mingw* | yes,pw32*)
2924145b7b3cSmrg    library_names_spec='$libname.dll.a'
2925145b7b3cSmrg    # DLL is installed to $(libdir)/../bin by postinstall_cmds
2926145b7b3cSmrg    postinstall_cmds='base_file=`basename \${file}`~
2927145b7b3cSmrg      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
2928145b7b3cSmrg      dldir=$destdir/`dirname \$dlpath`~
2929145b7b3cSmrg      test -d \$dldir || mkdir -p \$dldir~
2930145b7b3cSmrg      $install_prog $dir/$dlname \$dldir/$dlname~
2931145b7b3cSmrg      chmod a+x \$dldir/$dlname'
2932145b7b3cSmrg    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
2933145b7b3cSmrg      dlpath=$dir/\$dldll~
2934145b7b3cSmrg       $rm \$dlpath'
2935145b7b3cSmrg    shlibpath_overrides_runpath=yes
2936145b7b3cSmrg
2937145b7b3cSmrg    case $host_os in
2938145b7b3cSmrg    cygwin*)
2939145b7b3cSmrg      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
2940145b7b3cSmrg      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2941145b7b3cSmrg      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
2942145b7b3cSmrg      ;;
2943145b7b3cSmrg    mingw*)
2944145b7b3cSmrg      # MinGW DLLs use traditional 'lib' prefix
2945145b7b3cSmrg      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2946145b7b3cSmrg      sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
2947145b7b3cSmrg      if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
2948145b7b3cSmrg        # It is most probably a Windows format PATH printed by
2949145b7b3cSmrg        # mingw gcc, but we are running on Cygwin. Gcc prints its search
2950145b7b3cSmrg        # path with ; separators, and with drive letters. We can handle the
2951145b7b3cSmrg        # drive letters (cygwin fileutils understands them), so leave them,
2952145b7b3cSmrg        # especially as we might pass files found there to a mingw objdump,
2953145b7b3cSmrg        # which wouldn't understand a cygwinified path. Ahh.
2954145b7b3cSmrg        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
2955145b7b3cSmrg      else
2956145b7b3cSmrg        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
2957145b7b3cSmrg      fi
2958145b7b3cSmrg      ;;
2959145b7b3cSmrg    pw32*)
2960145b7b3cSmrg      # pw32 DLLs use 'pw' prefix rather than 'lib'
2961145b7b3cSmrg      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2962145b7b3cSmrg      ;;
2963145b7b3cSmrg    esac
2964145b7b3cSmrg    ;;
2965145b7b3cSmrg
2966145b7b3cSmrg  *)
2967145b7b3cSmrg    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
2968145b7b3cSmrg    ;;
2969145b7b3cSmrg  esac
2970145b7b3cSmrg  dynamic_linker='Win32 ld.exe'
2971145b7b3cSmrg  # FIXME: first we should search . and the directory the executable is in
2972145b7b3cSmrg  shlibpath_var=PATH
2973145b7b3cSmrg  ;;
2974145b7b3cSmrg
2975145b7b3cSmrgdarwin* | rhapsody*)
2976145b7b3cSmrg  dynamic_linker="$host_os dyld"
2977145b7b3cSmrg  version_type=darwin
2978145b7b3cSmrg  need_lib_prefix=no
2979145b7b3cSmrg  need_version=no
2980145b7b3cSmrg  library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
2981145b7b3cSmrg  soname_spec='${libname}${release}${major}$shared_ext'
2982145b7b3cSmrg  shlibpath_overrides_runpath=yes
2983145b7b3cSmrg  shlibpath_var=DYLD_LIBRARY_PATH
2984145b7b3cSmrg  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
2985145b7b3cSmrg  # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
2986145b7b3cSmrg  if test "$GCC" = yes; then
2987145b7b3cSmrg    sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
2988145b7b3cSmrg  else
2989145b7b3cSmrg    sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
2990145b7b3cSmrg  fi
2991145b7b3cSmrg  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
2992145b7b3cSmrg  ;;
2993145b7b3cSmrg
2994145b7b3cSmrgdgux*)
2995145b7b3cSmrg  version_type=linux
2996145b7b3cSmrg  need_lib_prefix=no
2997145b7b3cSmrg  need_version=no
2998145b7b3cSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
2999145b7b3cSmrg  soname_spec='${libname}${release}${shared_ext}$major'
3000145b7b3cSmrg  shlibpath_var=LD_LIBRARY_PATH
3001145b7b3cSmrg  ;;
3002145b7b3cSmrg
3003145b7b3cSmrgfreebsd1*)
3004145b7b3cSmrg  dynamic_linker=no
3005145b7b3cSmrg  ;;
3006145b7b3cSmrg
3007145b7b3cSmrgkfreebsd*-gnu)
3008145b7b3cSmrg  version_type=linux
3009145b7b3cSmrg  need_lib_prefix=no
3010145b7b3cSmrg  need_version=no
3011145b7b3cSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
3012145b7b3cSmrg  soname_spec='${libname}${release}${shared_ext}$major'
3013145b7b3cSmrg  shlibpath_var=LD_LIBRARY_PATH
3014145b7b3cSmrg  shlibpath_overrides_runpath=no
3015145b7b3cSmrg  hardcode_into_libs=yes
3016145b7b3cSmrg  dynamic_linker='GNU ld.so'
3017145b7b3cSmrg  ;;
3018145b7b3cSmrg
3019145b7b3cSmrgfreebsd* | dragonfly*)
3020145b7b3cSmrg  # DragonFly does not have aout.  When/if they implement a new
3021145b7b3cSmrg  # versioning mechanism, adjust this.
3022145b7b3cSmrg  if test -x /usr/bin/objformat; then
3023145b7b3cSmrg    objformat=`/usr/bin/objformat`
3024145b7b3cSmrg  else
3025145b7b3cSmrg    case $host_os in
3026145b7b3cSmrg    freebsd[[123]]*) objformat=aout ;;
3027145b7b3cSmrg    *) objformat=elf ;;
3028145b7b3cSmrg    esac
3029145b7b3cSmrg  fi
3030145b7b3cSmrg  version_type=freebsd-$objformat
3031145b7b3cSmrg  case $version_type in
3032145b7b3cSmrg    freebsd-elf*)
3033145b7b3cSmrg      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
3034145b7b3cSmrg      need_version=no
3035145b7b3cSmrg      need_lib_prefix=no
3036145b7b3cSmrg      ;;
3037145b7b3cSmrg    freebsd-*)
3038145b7b3cSmrg      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
3039145b7b3cSmrg      need_version=yes
3040145b7b3cSmrg      ;;
3041145b7b3cSmrg  esac
3042145b7b3cSmrg  shlibpath_var=LD_LIBRARY_PATH
3043145b7b3cSmrg  case $host_os in
3044145b7b3cSmrg  freebsd2*)
3045145b7b3cSmrg    shlibpath_overrides_runpath=yes
3046145b7b3cSmrg    ;;
3047145b7b3cSmrg  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
3048145b7b3cSmrg    shlibpath_overrides_runpath=yes
3049145b7b3cSmrg    hardcode_into_libs=yes
3050145b7b3cSmrg    ;;
3051145b7b3cSmrg  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
3052145b7b3cSmrg  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
3053145b7b3cSmrg    shlibpath_overrides_runpath=no
3054145b7b3cSmrg    hardcode_into_libs=yes
3055145b7b3cSmrg    ;;
3056145b7b3cSmrg  freebsd*) # from 4.6 on
3057145b7b3cSmrg    shlibpath_overrides_runpath=yes
3058145b7b3cSmrg    hardcode_into_libs=yes
3059145b7b3cSmrg    ;;
3060145b7b3cSmrg  esac
3061145b7b3cSmrg  ;;
3062145b7b3cSmrg
3063145b7b3cSmrggnu*)
3064145b7b3cSmrg  version_type=linux
3065145b7b3cSmrg  need_lib_prefix=no
3066145b7b3cSmrg  need_version=no
3067145b7b3cSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
3068145b7b3cSmrg  soname_spec='${libname}${release}${shared_ext}$major'
3069145b7b3cSmrg  shlibpath_var=LD_LIBRARY_PATH
3070145b7b3cSmrg  hardcode_into_libs=yes
3071145b7b3cSmrg  ;;
3072145b7b3cSmrg
3073145b7b3cSmrghpux9* | hpux10* | hpux11*)
3074145b7b3cSmrg  # Give a soname corresponding to the major version so that dld.sl refuses to
3075145b7b3cSmrg  # link against other versions.
3076145b7b3cSmrg  version_type=sunos
3077145b7b3cSmrg  need_lib_prefix=no
3078145b7b3cSmrg  need_version=no
3079145b7b3cSmrg  case $host_cpu in
3080145b7b3cSmrg  ia64*)
3081145b7b3cSmrg    shrext_cmds='.so'
3082145b7b3cSmrg    hardcode_into_libs=yes
3083145b7b3cSmrg    dynamic_linker="$host_os dld.so"
3084145b7b3cSmrg    shlibpath_var=LD_LIBRARY_PATH
3085145b7b3cSmrg    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
3086145b7b3cSmrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3087145b7b3cSmrg    soname_spec='${libname}${release}${shared_ext}$major'
3088145b7b3cSmrg    if test "X$HPUX_IA64_MODE" = X32; then
3089145b7b3cSmrg      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
3090145b7b3cSmrg    else
3091145b7b3cSmrg      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
3092145b7b3cSmrg    fi
3093145b7b3cSmrg    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
3094145b7b3cSmrg    ;;
3095145b7b3cSmrg   hppa*64*)
3096145b7b3cSmrg     shrext_cmds='.sl'
3097145b7b3cSmrg     hardcode_into_libs=yes
3098145b7b3cSmrg     dynamic_linker="$host_os dld.sl"
3099145b7b3cSmrg     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
3100145b7b3cSmrg     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
3101145b7b3cSmrg     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3102145b7b3cSmrg     soname_spec='${libname}${release}${shared_ext}$major'
3103145b7b3cSmrg     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
3104145b7b3cSmrg     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
3105145b7b3cSmrg     ;;
3106145b7b3cSmrg   *)
3107145b7b3cSmrg    shrext_cmds='.sl'
3108145b7b3cSmrg    dynamic_linker="$host_os dld.sl"
3109145b7b3cSmrg    shlibpath_var=SHLIB_PATH
3110145b7b3cSmrg    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
3111145b7b3cSmrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3112145b7b3cSmrg    soname_spec='${libname}${release}${shared_ext}$major'
3113145b7b3cSmrg    ;;
3114145b7b3cSmrg  esac
3115145b7b3cSmrg  # HP-UX runs *really* slowly unless shared libraries are mode 555.
3116145b7b3cSmrg  postinstall_cmds='chmod 555 $lib'
3117145b7b3cSmrg  ;;
3118145b7b3cSmrg
3119145b7b3cSmrginterix3*)
3120145b7b3cSmrg  version_type=linux
3121145b7b3cSmrg  need_lib_prefix=no
3122145b7b3cSmrg  need_version=no
3123145b7b3cSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
3124145b7b3cSmrg  soname_spec='${libname}${release}${shared_ext}$major'
3125145b7b3cSmrg  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
3126145b7b3cSmrg  shlibpath_var=LD_LIBRARY_PATH
3127145b7b3cSmrg  shlibpath_overrides_runpath=no
3128145b7b3cSmrg  hardcode_into_libs=yes
3129145b7b3cSmrg  ;;
3130145b7b3cSmrg
3131145b7b3cSmrgirix5* | irix6* | nonstopux*)
3132145b7b3cSmrg  case $host_os in
3133145b7b3cSmrg    nonstopux*) version_type=nonstopux ;;
3134145b7b3cSmrg    *)
3135145b7b3cSmrg	if test "$lt_cv_prog_gnu_ld" = yes; then
3136145b7b3cSmrg		version_type=linux
3137145b7b3cSmrg	else
3138145b7b3cSmrg		version_type=irix
3139145b7b3cSmrg	fi ;;
3140145b7b3cSmrg  esac
3141145b7b3cSmrg  need_lib_prefix=no
3142145b7b3cSmrg  need_version=no
3143145b7b3cSmrg  soname_spec='${libname}${release}${shared_ext}$major'
3144145b7b3cSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
3145145b7b3cSmrg  case $host_os in
3146145b7b3cSmrg  irix5* | nonstopux*)
3147145b7b3cSmrg    libsuff= shlibsuff=
3148145b7b3cSmrg    ;;
3149145b7b3cSmrg  *)
3150145b7b3cSmrg    case $LD in # libtool.m4 will add one of these switches to LD
3151145b7b3cSmrg    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
3152145b7b3cSmrg      libsuff= shlibsuff= libmagic=32-bit;;
3153145b7b3cSmrg    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
3154145b7b3cSmrg      libsuff=32 shlibsuff=N32 libmagic=N32;;
3155145b7b3cSmrg    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
3156145b7b3cSmrg      libsuff=64 shlibsuff=64 libmagic=64-bit;;
3157145b7b3cSmrg    *) libsuff= shlibsuff= libmagic=never-match;;
3158145b7b3cSmrg    esac
3159145b7b3cSmrg    ;;
3160145b7b3cSmrg  esac
3161145b7b3cSmrg  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
3162145b7b3cSmrg  shlibpath_overrides_runpath=no
3163145b7b3cSmrg  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
3164145b7b3cSmrg  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
3165145b7b3cSmrg  hardcode_into_libs=yes
3166145b7b3cSmrg  ;;
3167145b7b3cSmrg
3168145b7b3cSmrg# No shared lib support for Linux oldld, aout, or coff.
3169145b7b3cSmrglinux*oldld* | linux*aout* | linux*coff*)
3170145b7b3cSmrg  dynamic_linker=no
3171145b7b3cSmrg  ;;
3172145b7b3cSmrg
3173145b7b3cSmrg# This must be Linux ELF.
3174145b7b3cSmrglinux*)
3175145b7b3cSmrg  version_type=linux
3176145b7b3cSmrg  need_lib_prefix=no
3177145b7b3cSmrg  need_version=no
3178145b7b3cSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3179145b7b3cSmrg  soname_spec='${libname}${release}${shared_ext}$major'
3180145b7b3cSmrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
3181145b7b3cSmrg  shlibpath_var=LD_LIBRARY_PATH
3182145b7b3cSmrg  shlibpath_overrides_runpath=no
3183145b7b3cSmrg  # This implies no fast_install, which is unacceptable.
3184145b7b3cSmrg  # Some rework will be needed to allow for fast_install
3185145b7b3cSmrg  # before this can be enabled.
3186145b7b3cSmrg  hardcode_into_libs=yes
3187145b7b3cSmrg
3188145b7b3cSmrg  # Append ld.so.conf contents to the search path
3189145b7b3cSmrg  if test -f /etc/ld.so.conf; then
3190145b7b3cSmrg    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
3191145b7b3cSmrg    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
3192145b7b3cSmrg  fi
3193145b7b3cSmrg
3194145b7b3cSmrg  # We used to test for /lib/ld.so.1 and disable shared libraries on
3195145b7b3cSmrg  # powerpc, because MkLinux only supported shared libraries with the
3196145b7b3cSmrg  # GNU dynamic linker.  Since this was broken with cross compilers,
3197145b7b3cSmrg  # most powerpc-linux boxes support dynamic linking these days and
3198145b7b3cSmrg  # people can always --disable-shared, the test was removed, and we
3199145b7b3cSmrg  # assume the GNU/Linux dynamic linker is in use.
3200145b7b3cSmrg  dynamic_linker='GNU/Linux ld.so'
3201145b7b3cSmrg  ;;
3202145b7b3cSmrg
3203145b7b3cSmrgknetbsd*-gnu)
3204145b7b3cSmrg  version_type=linux
3205145b7b3cSmrg  need_lib_prefix=no
3206145b7b3cSmrg  need_version=no
3207145b7b3cSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
3208145b7b3cSmrg  soname_spec='${libname}${release}${shared_ext}$major'
3209145b7b3cSmrg  shlibpath_var=LD_LIBRARY_PATH
3210145b7b3cSmrg  shlibpath_overrides_runpath=no
3211145b7b3cSmrg  hardcode_into_libs=yes
3212145b7b3cSmrg  dynamic_linker='GNU ld.so'
3213145b7b3cSmrg  ;;
3214145b7b3cSmrg
3215145b7b3cSmrgnetbsd*)
3216145b7b3cSmrg  version_type=sunos
3217145b7b3cSmrg  need_lib_prefix=no
3218145b7b3cSmrg  need_version=no
3219145b7b3cSmrg  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
3220145b7b3cSmrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
3221145b7b3cSmrg    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
3222145b7b3cSmrg    dynamic_linker='NetBSD (a.out) ld.so'
3223145b7b3cSmrg  else
3224145b7b3cSmrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
3225145b7b3cSmrg    soname_spec='${libname}${release}${shared_ext}$major'
3226145b7b3cSmrg    dynamic_linker='NetBSD ld.elf_so'
3227145b7b3cSmrg  fi
3228145b7b3cSmrg  shlibpath_var=LD_LIBRARY_PATH
3229145b7b3cSmrg  shlibpath_overrides_runpath=yes
3230145b7b3cSmrg  hardcode_into_libs=yes
3231145b7b3cSmrg  ;;
3232145b7b3cSmrg
3233145b7b3cSmrgnewsos6)
3234145b7b3cSmrg  version_type=linux
3235145b7b3cSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3236145b7b3cSmrg  shlibpath_var=LD_LIBRARY_PATH
3237145b7b3cSmrg  shlibpath_overrides_runpath=yes
3238145b7b3cSmrg  ;;
3239145b7b3cSmrg
3240145b7b3cSmrgnto-qnx*)
3241145b7b3cSmrg  version_type=linux
3242145b7b3cSmrg  need_lib_prefix=no
3243145b7b3cSmrg  need_version=no
3244145b7b3cSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3245145b7b3cSmrg  soname_spec='${libname}${release}${shared_ext}$major'
3246145b7b3cSmrg  shlibpath_var=LD_LIBRARY_PATH
3247145b7b3cSmrg  shlibpath_overrides_runpath=yes
3248145b7b3cSmrg  ;;
3249145b7b3cSmrg
3250145b7b3cSmrgopenbsd*)
3251145b7b3cSmrg  version_type=sunos
3252145b7b3cSmrg  sys_lib_dlsearch_path_spec="/usr/lib"
3253145b7b3cSmrg  need_lib_prefix=no
3254145b7b3cSmrg  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
3255145b7b3cSmrg  case $host_os in
3256145b7b3cSmrg    openbsd3.3 | openbsd3.3.*) need_version=yes ;;
3257145b7b3cSmrg    *)                         need_version=no  ;;
3258145b7b3cSmrg  esac
3259145b7b3cSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
3260145b7b3cSmrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
3261145b7b3cSmrg  shlibpath_var=LD_LIBRARY_PATH
3262145b7b3cSmrg  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3263145b7b3cSmrg    case $host_os in
3264145b7b3cSmrg      openbsd2.[[89]] | openbsd2.[[89]].*)
3265145b7b3cSmrg	shlibpath_overrides_runpath=no
3266145b7b3cSmrg	;;
3267145b7b3cSmrg      *)
3268145b7b3cSmrg	shlibpath_overrides_runpath=yes
3269145b7b3cSmrg	;;
3270145b7b3cSmrg      esac
3271145b7b3cSmrg  else
3272145b7b3cSmrg    shlibpath_overrides_runpath=yes
3273145b7b3cSmrg  fi
3274145b7b3cSmrg  ;;
3275145b7b3cSmrg
3276145b7b3cSmrgos2*)
3277145b7b3cSmrg  libname_spec='$name'
3278145b7b3cSmrg  shrext_cmds=".dll"
3279145b7b3cSmrg  need_lib_prefix=no
3280145b7b3cSmrg  library_names_spec='$libname${shared_ext} $libname.a'
3281145b7b3cSmrg  dynamic_linker='OS/2 ld.exe'
3282145b7b3cSmrg  shlibpath_var=LIBPATH
3283145b7b3cSmrg  ;;
3284145b7b3cSmrg
3285145b7b3cSmrgosf3* | osf4* | osf5*)
3286145b7b3cSmrg  version_type=osf
3287145b7b3cSmrg  need_lib_prefix=no
3288145b7b3cSmrg  need_version=no
3289145b7b3cSmrg  soname_spec='${libname}${release}${shared_ext}$major'
3290145b7b3cSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3291145b7b3cSmrg  shlibpath_var=LD_LIBRARY_PATH
3292145b7b3cSmrg  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
3293145b7b3cSmrg  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
3294145b7b3cSmrg  ;;
3295145b7b3cSmrg
3296145b7b3cSmrgsolaris*)
3297145b7b3cSmrg  version_type=linux
3298145b7b3cSmrg  need_lib_prefix=no
3299145b7b3cSmrg  need_version=no
3300145b7b3cSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3301145b7b3cSmrg  soname_spec='${libname}${release}${shared_ext}$major'
3302145b7b3cSmrg  shlibpath_var=LD_LIBRARY_PATH
3303145b7b3cSmrg  shlibpath_overrides_runpath=yes
3304145b7b3cSmrg  hardcode_into_libs=yes
3305145b7b3cSmrg  # ldd complains unless libraries are executable
3306145b7b3cSmrg  postinstall_cmds='chmod +x $lib'
3307145b7b3cSmrg  ;;
3308145b7b3cSmrg
3309145b7b3cSmrgsunos4*)
3310145b7b3cSmrg  version_type=sunos
3311145b7b3cSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
3312145b7b3cSmrg  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
3313145b7b3cSmrg  shlibpath_var=LD_LIBRARY_PATH
3314145b7b3cSmrg  shlibpath_overrides_runpath=yes
3315145b7b3cSmrg  if test "$with_gnu_ld" = yes; then
3316145b7b3cSmrg    need_lib_prefix=no
3317145b7b3cSmrg  fi
3318145b7b3cSmrg  need_version=yes
3319145b7b3cSmrg  ;;
3320145b7b3cSmrg
3321145b7b3cSmrgsysv4 | sysv4.3*)
3322145b7b3cSmrg  version_type=linux
3323145b7b3cSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3324145b7b3cSmrg  soname_spec='${libname}${release}${shared_ext}$major'
3325145b7b3cSmrg  shlibpath_var=LD_LIBRARY_PATH
3326145b7b3cSmrg  case $host_vendor in
3327145b7b3cSmrg    sni)
3328145b7b3cSmrg      shlibpath_overrides_runpath=no
3329145b7b3cSmrg      need_lib_prefix=no
3330145b7b3cSmrg      export_dynamic_flag_spec='${wl}-Blargedynsym'
3331145b7b3cSmrg      runpath_var=LD_RUN_PATH
3332145b7b3cSmrg      ;;
3333145b7b3cSmrg    siemens)
3334145b7b3cSmrg      need_lib_prefix=no
3335145b7b3cSmrg      ;;
3336145b7b3cSmrg    motorola)
3337145b7b3cSmrg      need_lib_prefix=no
3338145b7b3cSmrg      need_version=no
3339145b7b3cSmrg      shlibpath_overrides_runpath=no
3340145b7b3cSmrg      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
3341145b7b3cSmrg      ;;
3342145b7b3cSmrg  esac
3343145b7b3cSmrg  ;;
3344145b7b3cSmrg
3345145b7b3cSmrgsysv4*MP*)
3346145b7b3cSmrg  if test -d /usr/nec ;then
3347145b7b3cSmrg    version_type=linux
3348145b7b3cSmrg    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
3349145b7b3cSmrg    soname_spec='$libname${shared_ext}.$major'
3350145b7b3cSmrg    shlibpath_var=LD_LIBRARY_PATH
3351145b7b3cSmrg  fi
3352145b7b3cSmrg  ;;
3353145b7b3cSmrg
3354145b7b3cSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3355145b7b3cSmrg  version_type=freebsd-elf
3356145b7b3cSmrg  need_lib_prefix=no
3357145b7b3cSmrg  need_version=no
3358145b7b3cSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
3359145b7b3cSmrg  soname_spec='${libname}${release}${shared_ext}$major'
3360145b7b3cSmrg  shlibpath_var=LD_LIBRARY_PATH
3361145b7b3cSmrg  hardcode_into_libs=yes
3362145b7b3cSmrg  if test "$with_gnu_ld" = yes; then
3363145b7b3cSmrg    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
3364145b7b3cSmrg    shlibpath_overrides_runpath=no
3365145b7b3cSmrg  else
3366145b7b3cSmrg    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
3367145b7b3cSmrg    shlibpath_overrides_runpath=yes
3368145b7b3cSmrg    case $host_os in
3369145b7b3cSmrg      sco3.2v5*)
3370145b7b3cSmrg        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
3371145b7b3cSmrg	;;
3372145b7b3cSmrg    esac
3373145b7b3cSmrg  fi
3374145b7b3cSmrg  sys_lib_dlsearch_path_spec='/usr/lib'
3375145b7b3cSmrg  ;;
3376145b7b3cSmrg
3377145b7b3cSmrguts4*)
3378145b7b3cSmrg  version_type=linux
3379145b7b3cSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3380145b7b3cSmrg  soname_spec='${libname}${release}${shared_ext}$major'
3381145b7b3cSmrg  shlibpath_var=LD_LIBRARY_PATH
3382145b7b3cSmrg  ;;
3383145b7b3cSmrg
3384145b7b3cSmrg*)
3385145b7b3cSmrg  dynamic_linker=no
3386145b7b3cSmrg  ;;
3387145b7b3cSmrgesac
3388145b7b3cSmrgAC_MSG_RESULT([$dynamic_linker])
3389145b7b3cSmrgtest "$dynamic_linker" = no && can_build_shared=no
3390145b7b3cSmrg
3391145b7b3cSmrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var"
3392145b7b3cSmrgif test "$GCC" = yes; then
3393145b7b3cSmrg  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
3394145b7b3cSmrgfi
3395145b7b3cSmrg])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
3396145b7b3cSmrg
3397145b7b3cSmrg
3398145b7b3cSmrg# _LT_AC_TAGCONFIG
3399145b7b3cSmrg# ----------------
3400145b7b3cSmrgAC_DEFUN([_LT_AC_TAGCONFIG],
3401145b7b3cSmrg[AC_ARG_WITH([tags],
3402145b7b3cSmrg    [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
3403145b7b3cSmrg        [include additional configurations @<:@automatic@:>@])],
3404145b7b3cSmrg    [tagnames="$withval"])
3405145b7b3cSmrg
3406145b7b3cSmrgif test -f "$ltmain" && test -n "$tagnames"; then
3407145b7b3cSmrg  if test ! -f "${ofile}"; then
3408145b7b3cSmrg    AC_MSG_WARN([output file `$ofile' does not exist])
3409145b7b3cSmrg  fi
3410145b7b3cSmrg
3411145b7b3cSmrg  if test -z "$LTCC"; then
3412145b7b3cSmrg    eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
3413145b7b3cSmrg    if test -z "$LTCC"; then
3414145b7b3cSmrg      AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
3415145b7b3cSmrg    else
3416145b7b3cSmrg      AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
3417145b7b3cSmrg    fi
3418145b7b3cSmrg  fi
3419145b7b3cSmrg  if test -z "$LTCFLAGS"; then
3420145b7b3cSmrg    eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`"
3421145b7b3cSmrg  fi
3422145b7b3cSmrg
3423145b7b3cSmrg  # Extract list of available tagged configurations in $ofile.
3424145b7b3cSmrg  # Note that this assumes the entire list is on one line.
3425145b7b3cSmrg  available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
3426145b7b3cSmrg
3427145b7b3cSmrg  lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
3428145b7b3cSmrg  for tagname in $tagnames; do
3429145b7b3cSmrg    IFS="$lt_save_ifs"
3430145b7b3cSmrg    # Check whether tagname contains only valid characters
3431145b7b3cSmrg    case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
3432145b7b3cSmrg    "") ;;
3433145b7b3cSmrg    *)  AC_MSG_ERROR([invalid tag name: $tagname])
3434145b7b3cSmrg	;;
3435145b7b3cSmrg    esac
3436145b7b3cSmrg
3437145b7b3cSmrg    if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
3438145b7b3cSmrg    then
3439145b7b3cSmrg      AC_MSG_ERROR([tag name \"$tagname\" already exists])
3440145b7b3cSmrg    fi
3441145b7b3cSmrg
3442145b7b3cSmrg    # Update the list of available tags.
3443145b7b3cSmrg    if test -n "$tagname"; then
3444145b7b3cSmrg      echo appending configuration tag \"$tagname\" to $ofile
3445145b7b3cSmrg
3446145b7b3cSmrg      case $tagname in
3447145b7b3cSmrg      CXX)
3448145b7b3cSmrg	if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
3449145b7b3cSmrg	    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
3450145b7b3cSmrg	    (test "X$CXX" != "Xg++"))) ; then
3451145b7b3cSmrg	  AC_LIBTOOL_LANG_CXX_CONFIG
3452145b7b3cSmrg	else
3453145b7b3cSmrg	  tagname=""
3454145b7b3cSmrg	fi
3455145b7b3cSmrg	;;
3456145b7b3cSmrg
3457145b7b3cSmrg      F77)
3458145b7b3cSmrg	if test -n "$F77" && test "X$F77" != "Xno"; then
3459145b7b3cSmrg	  AC_LIBTOOL_LANG_F77_CONFIG
3460145b7b3cSmrg	else
3461145b7b3cSmrg	  tagname=""
3462145b7b3cSmrg	fi
3463145b7b3cSmrg	;;
3464145b7b3cSmrg
3465145b7b3cSmrg      GCJ)
3466145b7b3cSmrg	if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
3467145b7b3cSmrg	  AC_LIBTOOL_LANG_GCJ_CONFIG
3468145b7b3cSmrg	else
3469145b7b3cSmrg	  tagname=""
3470145b7b3cSmrg	fi
3471145b7b3cSmrg	;;
3472145b7b3cSmrg
3473145b7b3cSmrg      RC)
3474145b7b3cSmrg	AC_LIBTOOL_LANG_RC_CONFIG
3475145b7b3cSmrg	;;
3476145b7b3cSmrg
3477145b7b3cSmrg      *)
3478145b7b3cSmrg	AC_MSG_ERROR([Unsupported tag name: $tagname])
3479145b7b3cSmrg	;;
3480145b7b3cSmrg      esac
3481145b7b3cSmrg
3482145b7b3cSmrg      # Append the new tag name to the list of available tags.
3483145b7b3cSmrg      if test -n "$tagname" ; then
3484145b7b3cSmrg      available_tags="$available_tags $tagname"
3485145b7b3cSmrg    fi
3486145b7b3cSmrg    fi
3487145b7b3cSmrg  done
3488145b7b3cSmrg  IFS="$lt_save_ifs"
3489145b7b3cSmrg
3490145b7b3cSmrg  # Now substitute the updated list of available tags.
3491145b7b3cSmrg  if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
3492145b7b3cSmrg    mv "${ofile}T" "$ofile"
3493145b7b3cSmrg    chmod +x "$ofile"
3494145b7b3cSmrg  else
3495145b7b3cSmrg    rm -f "${ofile}T"
3496145b7b3cSmrg    AC_MSG_ERROR([unable to update list of available tagged configurations.])
3497145b7b3cSmrg  fi
3498145b7b3cSmrgfi
3499145b7b3cSmrg])# _LT_AC_TAGCONFIG
3500145b7b3cSmrg
3501145b7b3cSmrg
3502145b7b3cSmrg# AC_LIBTOOL_DLOPEN
3503145b7b3cSmrg# -----------------
3504145b7b3cSmrg# enable checks for dlopen support
3505145b7b3cSmrgAC_DEFUN([AC_LIBTOOL_DLOPEN],
3506145b7b3cSmrg [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
3507145b7b3cSmrg])# AC_LIBTOOL_DLOPEN
3508145b7b3cSmrg
3509145b7b3cSmrg
3510145b7b3cSmrg# AC_LIBTOOL_WIN32_DLL
3511145b7b3cSmrg# --------------------
3512145b7b3cSmrg# declare package support for building win32 DLLs
3513145b7b3cSmrgAC_DEFUN([AC_LIBTOOL_WIN32_DLL],
3514145b7b3cSmrg[AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
3515145b7b3cSmrg])# AC_LIBTOOL_WIN32_DLL
3516145b7b3cSmrg
3517145b7b3cSmrg
3518145b7b3cSmrg# AC_ENABLE_SHARED([DEFAULT])
3519145b7b3cSmrg# ---------------------------
3520145b7b3cSmrg# implement the --enable-shared flag
3521145b7b3cSmrg# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
3522145b7b3cSmrgAC_DEFUN([AC_ENABLE_SHARED],
3523145b7b3cSmrg[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
3524145b7b3cSmrgAC_ARG_ENABLE([shared],
3525145b7b3cSmrg    [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
3526145b7b3cSmrg	[build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
3527145b7b3cSmrg    [p=${PACKAGE-default}
3528145b7b3cSmrg    case $enableval in
3529145b7b3cSmrg    yes) enable_shared=yes ;;
3530145b7b3cSmrg    no) enable_shared=no ;;
3531145b7b3cSmrg    *)
3532145b7b3cSmrg      enable_shared=no
3533145b7b3cSmrg      # Look at the argument we got.  We use all the common list separators.
3534145b7b3cSmrg      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
3535145b7b3cSmrg      for pkg in $enableval; do
3536145b7b3cSmrg	IFS="$lt_save_ifs"
3537145b7b3cSmrg	if test "X$pkg" = "X$p"; then
3538145b7b3cSmrg	  enable_shared=yes
3539145b7b3cSmrg	fi
3540145b7b3cSmrg      done
3541145b7b3cSmrg      IFS="$lt_save_ifs"
3542145b7b3cSmrg      ;;
3543145b7b3cSmrg    esac],
3544145b7b3cSmrg    [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
3545145b7b3cSmrg])# AC_ENABLE_SHARED
3546145b7b3cSmrg
3547145b7b3cSmrg
3548145b7b3cSmrg# AC_DISABLE_SHARED
3549145b7b3cSmrg# -----------------
3550145b7b3cSmrg# set the default shared flag to --disable-shared
3551145b7b3cSmrgAC_DEFUN([AC_DISABLE_SHARED],
3552145b7b3cSmrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3553145b7b3cSmrgAC_ENABLE_SHARED(no)
3554145b7b3cSmrg])# AC_DISABLE_SHARED
3555145b7b3cSmrg
3556145b7b3cSmrg
3557145b7b3cSmrg# AC_ENABLE_STATIC([DEFAULT])
3558145b7b3cSmrg# ---------------------------
3559145b7b3cSmrg# implement the --enable-static flag
3560145b7b3cSmrg# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
3561145b7b3cSmrgAC_DEFUN([AC_ENABLE_STATIC],
3562145b7b3cSmrg[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
3563145b7b3cSmrgAC_ARG_ENABLE([static],
3564145b7b3cSmrg    [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
3565145b7b3cSmrg	[build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
3566145b7b3cSmrg    [p=${PACKAGE-default}
3567145b7b3cSmrg    case $enableval in
3568145b7b3cSmrg    yes) enable_static=yes ;;
3569145b7b3cSmrg    no) enable_static=no ;;
3570145b7b3cSmrg    *)
3571145b7b3cSmrg     enable_static=no
3572145b7b3cSmrg      # Look at the argument we got.  We use all the common list separators.
3573145b7b3cSmrg      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
3574145b7b3cSmrg      for pkg in $enableval; do
3575145b7b3cSmrg	IFS="$lt_save_ifs"
3576145b7b3cSmrg	if test "X$pkg" = "X$p"; then
3577145b7b3cSmrg	  enable_static=yes
3578145b7b3cSmrg	fi
3579145b7b3cSmrg      done
3580145b7b3cSmrg      IFS="$lt_save_ifs"
3581145b7b3cSmrg      ;;
3582145b7b3cSmrg    esac],
3583145b7b3cSmrg    [enable_static=]AC_ENABLE_STATIC_DEFAULT)
3584145b7b3cSmrg])# AC_ENABLE_STATIC
3585145b7b3cSmrg
3586145b7b3cSmrg
3587145b7b3cSmrg# AC_DISABLE_STATIC
3588145b7b3cSmrg# -----------------
3589145b7b3cSmrg# set the default static flag to --disable-static
3590145b7b3cSmrgAC_DEFUN([AC_DISABLE_STATIC],
3591145b7b3cSmrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3592145b7b3cSmrgAC_ENABLE_STATIC(no)
3593145b7b3cSmrg])# AC_DISABLE_STATIC
3594145b7b3cSmrg
3595145b7b3cSmrg
3596145b7b3cSmrg# AC_ENABLE_FAST_INSTALL([DEFAULT])
3597145b7b3cSmrg# ---------------------------------
3598145b7b3cSmrg# implement the --enable-fast-install flag
3599145b7b3cSmrg# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
3600145b7b3cSmrgAC_DEFUN([AC_ENABLE_FAST_INSTALL],
3601145b7b3cSmrg[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
3602145b7b3cSmrgAC_ARG_ENABLE([fast-install],
3603145b7b3cSmrg    [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
3604145b7b3cSmrg    [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
3605145b7b3cSmrg    [p=${PACKAGE-default}
3606145b7b3cSmrg    case $enableval in
3607145b7b3cSmrg    yes) enable_fast_install=yes ;;
3608145b7b3cSmrg    no) enable_fast_install=no ;;
3609145b7b3cSmrg    *)
3610145b7b3cSmrg      enable_fast_install=no
3611145b7b3cSmrg      # Look at the argument we got.  We use all the common list separators.
3612145b7b3cSmrg      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
3613145b7b3cSmrg      for pkg in $enableval; do
3614145b7b3cSmrg	IFS="$lt_save_ifs"
3615145b7b3cSmrg	if test "X$pkg" = "X$p"; then
3616145b7b3cSmrg	  enable_fast_install=yes
3617145b7b3cSmrg	fi
3618145b7b3cSmrg      done
3619145b7b3cSmrg      IFS="$lt_save_ifs"
3620145b7b3cSmrg      ;;
3621145b7b3cSmrg    esac],
3622145b7b3cSmrg    [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
3623145b7b3cSmrg])# AC_ENABLE_FAST_INSTALL
3624145b7b3cSmrg
3625145b7b3cSmrg
3626145b7b3cSmrg# AC_DISABLE_FAST_INSTALL
3627145b7b3cSmrg# -----------------------
3628145b7b3cSmrg# set the default to --disable-fast-install
3629145b7b3cSmrgAC_DEFUN([AC_DISABLE_FAST_INSTALL],
3630145b7b3cSmrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3631145b7b3cSmrgAC_ENABLE_FAST_INSTALL(no)
3632145b7b3cSmrg])# AC_DISABLE_FAST_INSTALL
3633145b7b3cSmrg
3634145b7b3cSmrg
3635145b7b3cSmrg# AC_LIBTOOL_PICMODE([MODE])
3636145b7b3cSmrg# --------------------------
3637145b7b3cSmrg# implement the --with-pic flag
3638145b7b3cSmrg# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
3639145b7b3cSmrgAC_DEFUN([AC_LIBTOOL_PICMODE],
3640145b7b3cSmrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3641145b7b3cSmrgpic_mode=ifelse($#,1,$1,default)
3642145b7b3cSmrg])# AC_LIBTOOL_PICMODE
3643145b7b3cSmrg
3644145b7b3cSmrg
3645145b7b3cSmrg# AC_PROG_EGREP
3646145b7b3cSmrg# -------------
3647145b7b3cSmrg# This is predefined starting with Autoconf 2.54, so this conditional
3648145b7b3cSmrg# definition can be removed once we require Autoconf 2.54 or later.
3649145b7b3cSmrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
3650145b7b3cSmrg[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
3651145b7b3cSmrg   [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3652145b7b3cSmrg    then ac_cv_prog_egrep='grep -E'
3653145b7b3cSmrg    else ac_cv_prog_egrep='egrep'
3654145b7b3cSmrg    fi])
3655145b7b3cSmrg EGREP=$ac_cv_prog_egrep
3656145b7b3cSmrg AC_SUBST([EGREP])
3657145b7b3cSmrg])])
3658145b7b3cSmrg
3659145b7b3cSmrg
3660145b7b3cSmrg# AC_PATH_TOOL_PREFIX
3661145b7b3cSmrg# -------------------
3662145b7b3cSmrg# find a file program which can recognise shared library
3663145b7b3cSmrgAC_DEFUN([AC_PATH_TOOL_PREFIX],
3664145b7b3cSmrg[AC_REQUIRE([AC_PROG_EGREP])dnl
3665145b7b3cSmrgAC_MSG_CHECKING([for $1])
3666145b7b3cSmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
3667145b7b3cSmrg[case $MAGIC_CMD in
3668145b7b3cSmrg[[\\/*] |  ?:[\\/]*])
3669145b7b3cSmrg  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
3670145b7b3cSmrg  ;;
3671145b7b3cSmrg*)
3672145b7b3cSmrg  lt_save_MAGIC_CMD="$MAGIC_CMD"
3673145b7b3cSmrg  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3674145b7b3cSmrgdnl $ac_dummy forces splitting on constant user-supplied paths.
3675145b7b3cSmrgdnl POSIX.2 word splitting is done only on the output of word expansions,
3676145b7b3cSmrgdnl not every word.  This closes a longstanding sh security hole.
3677145b7b3cSmrg  ac_dummy="ifelse([$2], , $PATH, [$2])"
3678145b7b3cSmrg  for ac_dir in $ac_dummy; do
3679145b7b3cSmrg    IFS="$lt_save_ifs"
3680145b7b3cSmrg    test -z "$ac_dir" && ac_dir=.
3681145b7b3cSmrg    if test -f $ac_dir/$1; then
3682145b7b3cSmrg      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
3683145b7b3cSmrg      if test -n "$file_magic_test_file"; then
3684145b7b3cSmrg	case $deplibs_check_method in
3685145b7b3cSmrg	"file_magic "*)
3686145b7b3cSmrg	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
3687145b7b3cSmrg	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3688145b7b3cSmrg	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
3689145b7b3cSmrg	    $EGREP "$file_magic_regex" > /dev/null; then
3690145b7b3cSmrg	    :
3691145b7b3cSmrg	  else
3692145b7b3cSmrg	    cat <<EOF 1>&2
3693145b7b3cSmrg
3694145b7b3cSmrg*** Warning: the command libtool uses to detect shared libraries,
3695145b7b3cSmrg*** $file_magic_cmd, produces output that libtool cannot recognize.
3696145b7b3cSmrg*** The result is that libtool may fail to recognize shared libraries
3697145b7b3cSmrg*** as such.  This will affect the creation of libtool libraries that
3698145b7b3cSmrg*** depend on shared libraries, but programs linked with such libtool
3699145b7b3cSmrg*** libraries will work regardless of this problem.  Nevertheless, you
3700145b7b3cSmrg*** may want to report the problem to your system manager and/or to
3701145b7b3cSmrg*** bug-libtool@gnu.org
3702145b7b3cSmrg
3703145b7b3cSmrgEOF
3704145b7b3cSmrg	  fi ;;
3705145b7b3cSmrg	esac
3706145b7b3cSmrg      fi
3707145b7b3cSmrg      break
3708145b7b3cSmrg    fi
3709145b7b3cSmrg  done
3710145b7b3cSmrg  IFS="$lt_save_ifs"
3711145b7b3cSmrg  MAGIC_CMD="$lt_save_MAGIC_CMD"
3712145b7b3cSmrg  ;;
3713145b7b3cSmrgesac])
3714145b7b3cSmrgMAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3715145b7b3cSmrgif test -n "$MAGIC_CMD"; then
3716145b7b3cSmrg  AC_MSG_RESULT($MAGIC_CMD)
3717145b7b3cSmrgelse
3718145b7b3cSmrg  AC_MSG_RESULT(no)
3719145b7b3cSmrgfi
3720145b7b3cSmrg])# AC_PATH_TOOL_PREFIX
3721145b7b3cSmrg
3722145b7b3cSmrg
3723145b7b3cSmrg# AC_PATH_MAGIC
3724145b7b3cSmrg# -------------
3725145b7b3cSmrg# find a file program which can recognise a shared library
3726145b7b3cSmrgAC_DEFUN([AC_PATH_MAGIC],
3727145b7b3cSmrg[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
3728145b7b3cSmrgif test -z "$lt_cv_path_MAGIC_CMD"; then
3729145b7b3cSmrg  if test -n "$ac_tool_prefix"; then
3730145b7b3cSmrg    AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
3731145b7b3cSmrg  else
3732145b7b3cSmrg    MAGIC_CMD=:
3733145b7b3cSmrg  fi
3734145b7b3cSmrgfi
3735145b7b3cSmrg])# AC_PATH_MAGIC
3736145b7b3cSmrg
3737145b7b3cSmrg
3738145b7b3cSmrg# AC_PROG_LD
3739145b7b3cSmrg# ----------
3740145b7b3cSmrg# find the pathname to the GNU or non-GNU linker
3741145b7b3cSmrgAC_DEFUN([AC_PROG_LD],
3742145b7b3cSmrg[AC_ARG_WITH([gnu-ld],
3743145b7b3cSmrg    [AC_HELP_STRING([--with-gnu-ld],
3744145b7b3cSmrg	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
3745145b7b3cSmrg    [test "$withval" = no || with_gnu_ld=yes],
3746145b7b3cSmrg    [with_gnu_ld=no])
3747145b7b3cSmrgAC_REQUIRE([LT_AC_PROG_SED])dnl
3748145b7b3cSmrgAC_REQUIRE([AC_PROG_CC])dnl
3749145b7b3cSmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl
3750145b7b3cSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl
3751145b7b3cSmrgac_prog=ld
3752145b7b3cSmrgif test "$GCC" = yes; then
3753145b7b3cSmrg  # Check if gcc -print-prog-name=ld gives a path.
3754145b7b3cSmrg  AC_MSG_CHECKING([for ld used by $CC])
3755145b7b3cSmrg  case $host in
3756145b7b3cSmrg  *-*-mingw*)
3757145b7b3cSmrg    # gcc leaves a trailing carriage return which upsets mingw
3758145b7b3cSmrg    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3759145b7b3cSmrg  *)
3760145b7b3cSmrg    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3761145b7b3cSmrg  esac
3762145b7b3cSmrg  case $ac_prog in
3763145b7b3cSmrg    # Accept absolute paths.
3764145b7b3cSmrg    [[\\/]]* | ?:[[\\/]]*)
3765145b7b3cSmrg      re_direlt='/[[^/]][[^/]]*/\.\./'
3766145b7b3cSmrg      # Canonicalize the pathname of ld
3767145b7b3cSmrg      ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
3768145b7b3cSmrg      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3769145b7b3cSmrg	ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
3770145b7b3cSmrg      done
3771145b7b3cSmrg      test -z "$LD" && LD="$ac_prog"
3772145b7b3cSmrg      ;;
3773145b7b3cSmrg  "")
3774145b7b3cSmrg    # If it fails, then pretend we aren't using GCC.
3775145b7b3cSmrg    ac_prog=ld
3776145b7b3cSmrg    ;;
3777145b7b3cSmrg  *)
3778145b7b3cSmrg    # If it is relative, then search for the first ld in PATH.
3779145b7b3cSmrg    with_gnu_ld=unknown
3780145b7b3cSmrg    ;;
3781145b7b3cSmrg  esac
3782145b7b3cSmrgelif test "$with_gnu_ld" = yes; then
3783145b7b3cSmrg  AC_MSG_CHECKING([for GNU ld])
3784145b7b3cSmrgelse
3785145b7b3cSmrg  AC_MSG_CHECKING([for non-GNU ld])
3786145b7b3cSmrgfi
3787145b7b3cSmrgAC_CACHE_VAL(lt_cv_path_LD,
3788145b7b3cSmrg[if test -z "$LD"; then
3789145b7b3cSmrg  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3790145b7b3cSmrg  for ac_dir in $PATH; do
3791145b7b3cSmrg    IFS="$lt_save_ifs"
3792145b7b3cSmrg    test -z "$ac_dir" && ac_dir=.
3793145b7b3cSmrg    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3794145b7b3cSmrg      lt_cv_path_LD="$ac_dir/$ac_prog"
3795145b7b3cSmrg      # Check to see if the program is GNU ld.  I'd rather use --version,
3796145b7b3cSmrg      # but apparently some variants of GNU ld only accept -v.
3797145b7b3cSmrg      # Break only if it was the GNU/non-GNU ld that we prefer.
3798145b7b3cSmrg      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
3799145b7b3cSmrg      *GNU* | *'with BFD'*)
3800145b7b3cSmrg	test "$with_gnu_ld" != no && break
3801145b7b3cSmrg	;;
3802145b7b3cSmrg      *)
3803145b7b3cSmrg	test "$with_gnu_ld" != yes && break
3804145b7b3cSmrg	;;
3805145b7b3cSmrg      esac
3806145b7b3cSmrg    fi
3807145b7b3cSmrg  done
3808145b7b3cSmrg  IFS="$lt_save_ifs"
3809145b7b3cSmrgelse
3810145b7b3cSmrg  lt_cv_path_LD="$LD" # Let the user override the test with a path.
3811145b7b3cSmrgfi])
3812145b7b3cSmrgLD="$lt_cv_path_LD"
3813145b7b3cSmrgif test -n "$LD"; then
3814145b7b3cSmrg  AC_MSG_RESULT($LD)
3815145b7b3cSmrgelse
3816145b7b3cSmrg  AC_MSG_RESULT(no)
3817145b7b3cSmrgfi
3818145b7b3cSmrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
3819145b7b3cSmrgAC_PROG_LD_GNU
3820145b7b3cSmrg])# AC_PROG_LD
3821145b7b3cSmrg
3822145b7b3cSmrg
3823145b7b3cSmrg# AC_PROG_LD_GNU
3824145b7b3cSmrg# --------------
3825145b7b3cSmrgAC_DEFUN([AC_PROG_LD_GNU],
3826145b7b3cSmrg[AC_REQUIRE([AC_PROG_EGREP])dnl
3827145b7b3cSmrgAC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
3828145b7b3cSmrg[# I'd rather use --version here, but apparently some GNU lds only accept -v.
3829145b7b3cSmrgcase `$LD -v 2>&1 </dev/null` in
3830145b7b3cSmrg*GNU* | *'with BFD'*)
3831145b7b3cSmrg  lt_cv_prog_gnu_ld=yes
3832145b7b3cSmrg  ;;
3833145b7b3cSmrg*)
3834145b7b3cSmrg  lt_cv_prog_gnu_ld=no
3835145b7b3cSmrg  ;;
3836145b7b3cSmrgesac])
3837145b7b3cSmrgwith_gnu_ld=$lt_cv_prog_gnu_ld
3838145b7b3cSmrg])# AC_PROG_LD_GNU
3839145b7b3cSmrg
3840145b7b3cSmrg
3841145b7b3cSmrg# AC_PROG_LD_RELOAD_FLAG
3842145b7b3cSmrg# ----------------------
3843145b7b3cSmrg# find reload flag for linker
3844145b7b3cSmrg#   -- PORTME Some linkers may need a different reload flag.
3845145b7b3cSmrgAC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
3846145b7b3cSmrg[AC_CACHE_CHECK([for $LD option to reload object files],
3847145b7b3cSmrg  lt_cv_ld_reload_flag,
3848145b7b3cSmrg  [lt_cv_ld_reload_flag='-r'])
3849145b7b3cSmrgreload_flag=$lt_cv_ld_reload_flag
3850145b7b3cSmrgcase $reload_flag in
3851145b7b3cSmrg"" | " "*) ;;
3852145b7b3cSmrg*) reload_flag=" $reload_flag" ;;
3853145b7b3cSmrgesac
3854145b7b3cSmrgreload_cmds='$LD$reload_flag -o $output$reload_objs'
3855145b7b3cSmrgcase $host_os in
3856145b7b3cSmrg  darwin*)
3857145b7b3cSmrg    if test "$GCC" = yes; then
3858145b7b3cSmrg      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
3859145b7b3cSmrg    else
3860145b7b3cSmrg      reload_cmds='$LD$reload_flag -o $output$reload_objs'
3861145b7b3cSmrg    fi
3862145b7b3cSmrg    ;;
3863145b7b3cSmrgesac
3864145b7b3cSmrg])# AC_PROG_LD_RELOAD_FLAG
3865145b7b3cSmrg
3866145b7b3cSmrg
3867145b7b3cSmrg# AC_DEPLIBS_CHECK_METHOD
3868145b7b3cSmrg# -----------------------
3869145b7b3cSmrg# how to check for library dependencies
3870145b7b3cSmrg#  -- PORTME fill in with the dynamic library characteristics
3871145b7b3cSmrgAC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
3872145b7b3cSmrg[AC_CACHE_CHECK([how to recognise dependent libraries],
3873145b7b3cSmrglt_cv_deplibs_check_method,
3874145b7b3cSmrg[lt_cv_file_magic_cmd='$MAGIC_CMD'
3875145b7b3cSmrglt_cv_file_magic_test_file=
3876145b7b3cSmrglt_cv_deplibs_check_method='unknown'
3877145b7b3cSmrg# Need to set the preceding variable on all platforms that support
3878145b7b3cSmrg# interlibrary dependencies.
3879145b7b3cSmrg# 'none' -- dependencies not supported.
3880145b7b3cSmrg# `unknown' -- same as none, but documents that we really don't know.
3881145b7b3cSmrg# 'pass_all' -- all dependencies passed with no checks.
3882145b7b3cSmrg# 'test_compile' -- check by making test program.
3883145b7b3cSmrg# 'file_magic [[regex]]' -- check by looking for files in library path
3884145b7b3cSmrg# which responds to the $file_magic_cmd with a given extended regex.
3885145b7b3cSmrg# If you have `file' or equivalent on your system and you're not sure
3886145b7b3cSmrg# whether `pass_all' will *always* work, you probably want this one.
3887145b7b3cSmrg
3888145b7b3cSmrgcase $host_os in
3889145b7b3cSmrgaix4* | aix5*)
3890145b7b3cSmrg  lt_cv_deplibs_check_method=pass_all
3891145b7b3cSmrg  ;;
3892145b7b3cSmrg
3893145b7b3cSmrgbeos*)
3894145b7b3cSmrg  lt_cv_deplibs_check_method=pass_all
3895145b7b3cSmrg  ;;
3896145b7b3cSmrg
3897145b7b3cSmrgbsdi[[45]]*)
3898145b7b3cSmrg  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
3899145b7b3cSmrg  lt_cv_file_magic_cmd='/usr/bin/file -L'
3900145b7b3cSmrg  lt_cv_file_magic_test_file=/shlib/libc.so
3901145b7b3cSmrg  ;;
3902145b7b3cSmrg
3903145b7b3cSmrgcygwin*)
3904145b7b3cSmrg  # func_win32_libid is a shell function defined in ltmain.sh
3905145b7b3cSmrg  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3906145b7b3cSmrg  lt_cv_file_magic_cmd='func_win32_libid'
3907145b7b3cSmrg  ;;
3908145b7b3cSmrg
3909145b7b3cSmrgmingw* | pw32*)
3910145b7b3cSmrg  # Base MSYS/MinGW do not provide the 'file' command needed by
3911145b7b3cSmrg  # func_win32_libid shell function, so use a weaker test based on 'objdump'.
3912145b7b3cSmrg  lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3913145b7b3cSmrg  lt_cv_file_magic_cmd='$OBJDUMP -f'
3914145b7b3cSmrg  ;;
3915145b7b3cSmrg
3916145b7b3cSmrgdarwin* | rhapsody*)
3917145b7b3cSmrg  lt_cv_deplibs_check_method=pass_all
3918145b7b3cSmrg  ;;
3919145b7b3cSmrg
3920145b7b3cSmrgfreebsd* | kfreebsd*-gnu | dragonfly*)
3921145b7b3cSmrg  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3922145b7b3cSmrg    case $host_cpu in
3923145b7b3cSmrg    i*86 )
3924145b7b3cSmrg      # Not sure whether the presence of OpenBSD here was a mistake.
3925145b7b3cSmrg      # Let's accept both of them until this is cleared up.
3926145b7b3cSmrg      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
3927145b7b3cSmrg      lt_cv_file_magic_cmd=/usr/bin/file
3928145b7b3cSmrg      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3929145b7b3cSmrg      ;;
3930145b7b3cSmrg    esac
3931145b7b3cSmrg  else
3932145b7b3cSmrg    lt_cv_deplibs_check_method=pass_all
3933145b7b3cSmrg  fi
3934145b7b3cSmrg  ;;
3935145b7b3cSmrg
3936145b7b3cSmrggnu*)
3937145b7b3cSmrg  lt_cv_deplibs_check_method=pass_all
3938145b7b3cSmrg  ;;
3939145b7b3cSmrg
3940145b7b3cSmrghpux10.20* | hpux11*)
3941145b7b3cSmrg  lt_cv_file_magic_cmd=/usr/bin/file
3942145b7b3cSmrg  case $host_cpu in
3943145b7b3cSmrg  ia64*)
3944145b7b3cSmrg    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
3945145b7b3cSmrg    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
3946145b7b3cSmrg    ;;
3947145b7b3cSmrg  hppa*64*)
3948145b7b3cSmrg    [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]']
3949145b7b3cSmrg    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
3950145b7b3cSmrg    ;;
3951145b7b3cSmrg  *)
3952145b7b3cSmrg    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
3953145b7b3cSmrg    lt_cv_file_magic_test_file=/usr/lib/libc.sl
3954145b7b3cSmrg    ;;
3955145b7b3cSmrg  esac
3956145b7b3cSmrg  ;;
3957145b7b3cSmrg
3958145b7b3cSmrginterix3*)
3959145b7b3cSmrg  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
3960145b7b3cSmrg  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
3961145b7b3cSmrg  ;;
3962145b7b3cSmrg
3963145b7b3cSmrgirix5* | irix6* | nonstopux*)
3964145b7b3cSmrg  case $LD in
3965145b7b3cSmrg  *-32|*"-32 ") libmagic=32-bit;;
3966145b7b3cSmrg  *-n32|*"-n32 ") libmagic=N32;;
3967145b7b3cSmrg  *-64|*"-64 ") libmagic=64-bit;;
3968145b7b3cSmrg  *) libmagic=never-match;;
3969145b7b3cSmrg  esac
3970145b7b3cSmrg  lt_cv_deplibs_check_method=pass_all
3971145b7b3cSmrg  ;;
3972145b7b3cSmrg
3973145b7b3cSmrg# This must be Linux ELF.
3974145b7b3cSmrglinux*)
3975145b7b3cSmrg  lt_cv_deplibs_check_method=pass_all
3976145b7b3cSmrg  ;;
3977145b7b3cSmrg
3978145b7b3cSmrgnetbsd*)
3979145b7b3cSmrg  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3980145b7b3cSmrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3981145b7b3cSmrg  else
3982145b7b3cSmrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
3983145b7b3cSmrg  fi
3984145b7b3cSmrg  ;;
3985145b7b3cSmrg
3986145b7b3cSmrgnewos6*)
3987145b7b3cSmrg  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
3988145b7b3cSmrg  lt_cv_file_magic_cmd=/usr/bin/file
3989145b7b3cSmrg  lt_cv_file_magic_test_file=/usr/lib/libnls.so
3990145b7b3cSmrg  ;;
3991145b7b3cSmrg
3992145b7b3cSmrgnto-qnx*)
3993145b7b3cSmrg  lt_cv_deplibs_check_method=unknown
3994145b7b3cSmrg  ;;
3995145b7b3cSmrg
3996145b7b3cSmrgopenbsd*)
3997145b7b3cSmrg  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3998145b7b3cSmrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
3999145b7b3cSmrg  else
4000145b7b3cSmrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
4001145b7b3cSmrg  fi
4002145b7b3cSmrg  ;;
4003145b7b3cSmrg
4004145b7b3cSmrgosf3* | osf4* | osf5*)
4005145b7b3cSmrg  lt_cv_deplibs_check_method=pass_all
4006145b7b3cSmrg  ;;
4007145b7b3cSmrg
4008145b7b3cSmrgsolaris*)
4009145b7b3cSmrg  lt_cv_deplibs_check_method=pass_all
4010145b7b3cSmrg  ;;
4011145b7b3cSmrg
4012145b7b3cSmrgsysv4 | sysv4.3*)
4013145b7b3cSmrg  case $host_vendor in
4014145b7b3cSmrg  motorola)
4015145b7b3cSmrg    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]]'
4016145b7b3cSmrg    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
4017145b7b3cSmrg    ;;
4018145b7b3cSmrg  ncr)
4019145b7b3cSmrg    lt_cv_deplibs_check_method=pass_all
4020145b7b3cSmrg    ;;
4021145b7b3cSmrg  sequent)
4022145b7b3cSmrg    lt_cv_file_magic_cmd='/bin/file'
4023145b7b3cSmrg    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
4024145b7b3cSmrg    ;;
4025145b7b3cSmrg  sni)
4026145b7b3cSmrg    lt_cv_file_magic_cmd='/bin/file'
4027145b7b3cSmrg    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
4028145b7b3cSmrg    lt_cv_file_magic_test_file=/lib/libc.so
4029145b7b3cSmrg    ;;
4030145b7b3cSmrg  siemens)
4031145b7b3cSmrg    lt_cv_deplibs_check_method=pass_all
4032145b7b3cSmrg    ;;
4033145b7b3cSmrg  pc)
4034145b7b3cSmrg    lt_cv_deplibs_check_method=pass_all
4035145b7b3cSmrg    ;;
4036145b7b3cSmrg  esac
4037145b7b3cSmrg  ;;
4038145b7b3cSmrg
4039145b7b3cSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
4040145b7b3cSmrg  lt_cv_deplibs_check_method=pass_all
4041145b7b3cSmrg  ;;
4042145b7b3cSmrgesac
4043145b7b3cSmrg])
4044145b7b3cSmrgfile_magic_cmd=$lt_cv_file_magic_cmd
4045145b7b3cSmrgdeplibs_check_method=$lt_cv_deplibs_check_method
4046145b7b3cSmrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown
4047145b7b3cSmrg])# AC_DEPLIBS_CHECK_METHOD
4048145b7b3cSmrg
4049145b7b3cSmrg
4050145b7b3cSmrg# AC_PROG_NM
4051145b7b3cSmrg# ----------
4052145b7b3cSmrg# find the pathname to a BSD-compatible name lister
4053145b7b3cSmrgAC_DEFUN([AC_PROG_NM],
4054145b7b3cSmrg[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
4055145b7b3cSmrg[if test -n "$NM"; then
4056145b7b3cSmrg  # Let the user override the test.
4057145b7b3cSmrg  lt_cv_path_NM="$NM"
4058145b7b3cSmrgelse
4059145b7b3cSmrg  lt_nm_to_check="${ac_tool_prefix}nm"
4060145b7b3cSmrg  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 
4061145b7b3cSmrg    lt_nm_to_check="$lt_nm_to_check nm"
4062145b7b3cSmrg  fi
4063145b7b3cSmrg  for lt_tmp_nm in $lt_nm_to_check; do
4064145b7b3cSmrg    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4065145b7b3cSmrg    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
4066145b7b3cSmrg      IFS="$lt_save_ifs"
4067145b7b3cSmrg      test -z "$ac_dir" && ac_dir=.
4068145b7b3cSmrg      tmp_nm="$ac_dir/$lt_tmp_nm"
4069145b7b3cSmrg      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
4070145b7b3cSmrg	# Check to see if the nm accepts a BSD-compat flag.
4071145b7b3cSmrg	# Adding the `sed 1q' prevents false positives on HP-UX, which says:
4072145b7b3cSmrg	#   nm: unknown option "B" ignored
4073145b7b3cSmrg	# Tru64's nm complains that /dev/null is an invalid object file
4074145b7b3cSmrg	case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
4075145b7b3cSmrg	*/dev/null* | *'Invalid file or object type'*)
4076145b7b3cSmrg	  lt_cv_path_NM="$tmp_nm -B"
4077145b7b3cSmrg	  break
4078145b7b3cSmrg	  ;;
4079145b7b3cSmrg	*)
4080145b7b3cSmrg	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
4081145b7b3cSmrg	  */dev/null*)
4082145b7b3cSmrg	    lt_cv_path_NM="$tmp_nm -p"
4083145b7b3cSmrg	    break
4084145b7b3cSmrg	    ;;
4085145b7b3cSmrg	  *)
4086145b7b3cSmrg	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
4087145b7b3cSmrg	    continue # so that we can try to find one that supports BSD flags
4088145b7b3cSmrg	    ;;
4089145b7b3cSmrg	  esac
4090145b7b3cSmrg	  ;;
4091145b7b3cSmrg	esac
4092145b7b3cSmrg      fi
4093145b7b3cSmrg    done
4094145b7b3cSmrg    IFS="$lt_save_ifs"
4095145b7b3cSmrg  done
4096145b7b3cSmrg  test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
4097145b7b3cSmrgfi])
4098145b7b3cSmrgNM="$lt_cv_path_NM"
4099145b7b3cSmrg])# AC_PROG_NM
4100145b7b3cSmrg
4101145b7b3cSmrg
4102145b7b3cSmrg# AC_CHECK_LIBM
4103145b7b3cSmrg# -------------
4104145b7b3cSmrg# check for math library
4105145b7b3cSmrgAC_DEFUN([AC_CHECK_LIBM],
4106145b7b3cSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
4107145b7b3cSmrgLIBM=
4108145b7b3cSmrgcase $host in
4109145b7b3cSmrg*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
4110145b7b3cSmrg  # These system don't have libm, or don't need it
4111145b7b3cSmrg  ;;
4112145b7b3cSmrg*-ncr-sysv4.3*)
4113145b7b3cSmrg  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
4114145b7b3cSmrg  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
4115145b7b3cSmrg  ;;
4116145b7b3cSmrg*)
4117145b7b3cSmrg  AC_CHECK_LIB(m, cos, LIBM="-lm")
4118145b7b3cSmrg  ;;
4119145b7b3cSmrgesac
4120145b7b3cSmrg])# AC_CHECK_LIBM
4121145b7b3cSmrg
4122145b7b3cSmrg
4123145b7b3cSmrg# AC_LIBLTDL_CONVENIENCE([DIRECTORY])
4124145b7b3cSmrg# -----------------------------------
4125145b7b3cSmrg# sets LIBLTDL to the link flags for the libltdl convenience library and
4126145b7b3cSmrg# LTDLINCL to the include flags for the libltdl header and adds
4127145b7b3cSmrg# --enable-ltdl-convenience to the configure arguments.  Note that
4128145b7b3cSmrg# AC_CONFIG_SUBDIRS is not called here.  If DIRECTORY is not provided,
4129145b7b3cSmrg# it is assumed to be `libltdl'.  LIBLTDL will be prefixed with
4130145b7b3cSmrg# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/'
4131145b7b3cSmrg# (note the single quotes!).  If your package is not flat and you're not
4132145b7b3cSmrg# using automake, define top_builddir and top_srcdir appropriately in
4133145b7b3cSmrg# the Makefiles.
4134145b7b3cSmrgAC_DEFUN([AC_LIBLTDL_CONVENIENCE],
4135145b7b3cSmrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
4136145b7b3cSmrg  case $enable_ltdl_convenience in
4137145b7b3cSmrg  no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
4138145b7b3cSmrg  "") enable_ltdl_convenience=yes
4139145b7b3cSmrg      ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
4140145b7b3cSmrg  esac
4141145b7b3cSmrg  LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
4142145b7b3cSmrg  LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
4143145b7b3cSmrg  # For backwards non-gettext consistent compatibility...
4144145b7b3cSmrg  INCLTDL="$LTDLINCL"
4145145b7b3cSmrg])# AC_LIBLTDL_CONVENIENCE
4146145b7b3cSmrg
4147145b7b3cSmrg
4148145b7b3cSmrg# AC_LIBLTDL_INSTALLABLE([DIRECTORY])
4149145b7b3cSmrg# -----------------------------------
4150145b7b3cSmrg# sets LIBLTDL to the link flags for the libltdl installable library and
4151145b7b3cSmrg# LTDLINCL to the include flags for the libltdl header and adds
4152145b7b3cSmrg# --enable-ltdl-install to the configure arguments.  Note that
4153145b7b3cSmrg# AC_CONFIG_SUBDIRS is not called here.  If DIRECTORY is not provided,
4154145b7b3cSmrg# and an installed libltdl is not found, it is assumed to be `libltdl'.
4155145b7b3cSmrg# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with
4156145b7b3cSmrg# '${top_srcdir}/' (note the single quotes!).  If your package is not
4157145b7b3cSmrg# flat and you're not using automake, define top_builddir and top_srcdir
4158145b7b3cSmrg# appropriately in the Makefiles.
4159145b7b3cSmrg# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
4160145b7b3cSmrgAC_DEFUN([AC_LIBLTDL_INSTALLABLE],
4161145b7b3cSmrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
4162145b7b3cSmrg  AC_CHECK_LIB(ltdl, lt_dlinit,
4163145b7b3cSmrg  [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
4164145b7b3cSmrg  [if test x"$enable_ltdl_install" = xno; then
4165145b7b3cSmrg     AC_MSG_WARN([libltdl not installed, but installation disabled])
4166145b7b3cSmrg   else
4167145b7b3cSmrg     enable_ltdl_install=yes
4168145b7b3cSmrg   fi
4169145b7b3cSmrg  ])
4170145b7b3cSmrg  if test x"$enable_ltdl_install" = x"yes"; then
4171145b7b3cSmrg    ac_configure_args="$ac_configure_args --enable-ltdl-install"
4172145b7b3cSmrg    LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
4173145b7b3cSmrg    LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
4174145b7b3cSmrg  else
4175145b7b3cSmrg    ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
4176145b7b3cSmrg    LIBLTDL="-lltdl"
4177145b7b3cSmrg    LTDLINCL=
4178145b7b3cSmrg  fi
4179145b7b3cSmrg  # For backwards non-gettext consistent compatibility...
4180145b7b3cSmrg  INCLTDL="$LTDLINCL"
4181145b7b3cSmrg])# AC_LIBLTDL_INSTALLABLE
4182145b7b3cSmrg
4183145b7b3cSmrg
4184145b7b3cSmrg# AC_LIBTOOL_CXX
4185145b7b3cSmrg# --------------
4186145b7b3cSmrg# enable support for C++ libraries
4187145b7b3cSmrgAC_DEFUN([AC_LIBTOOL_CXX],
4188145b7b3cSmrg[AC_REQUIRE([_LT_AC_LANG_CXX])
4189145b7b3cSmrg])# AC_LIBTOOL_CXX
4190145b7b3cSmrg
4191145b7b3cSmrg
4192145b7b3cSmrg# _LT_AC_LANG_CXX
4193145b7b3cSmrg# ---------------
4194145b7b3cSmrgAC_DEFUN([_LT_AC_LANG_CXX],
4195145b7b3cSmrg[AC_REQUIRE([AC_PROG_CXX])
4196145b7b3cSmrgAC_REQUIRE([_LT_AC_PROG_CXXCPP])
4197145b7b3cSmrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
4198145b7b3cSmrg])# _LT_AC_LANG_CXX
4199145b7b3cSmrg
4200145b7b3cSmrg# _LT_AC_PROG_CXXCPP
4201145b7b3cSmrg# ------------------
4202145b7b3cSmrgAC_DEFUN([_LT_AC_PROG_CXXCPP],
4203145b7b3cSmrg[
4204145b7b3cSmrgAC_REQUIRE([AC_PROG_CXX])
4205145b7b3cSmrgif test -n "$CXX" && ( test "X$CXX" != "Xno" &&
4206145b7b3cSmrg    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
4207145b7b3cSmrg    (test "X$CXX" != "Xg++"))) ; then
4208145b7b3cSmrg  AC_PROG_CXXCPP
4209145b7b3cSmrgfi
4210145b7b3cSmrg])# _LT_AC_PROG_CXXCPP
4211145b7b3cSmrg
4212145b7b3cSmrg# AC_LIBTOOL_F77
4213145b7b3cSmrg# --------------
4214145b7b3cSmrg# enable support for Fortran 77 libraries
4215145b7b3cSmrgAC_DEFUN([AC_LIBTOOL_F77],
4216145b7b3cSmrg[AC_REQUIRE([_LT_AC_LANG_F77])
4217145b7b3cSmrg])# AC_LIBTOOL_F77
4218145b7b3cSmrg
4219145b7b3cSmrg
4220145b7b3cSmrg# _LT_AC_LANG_F77
4221145b7b3cSmrg# ---------------
4222145b7b3cSmrgAC_DEFUN([_LT_AC_LANG_F77],
4223145b7b3cSmrg[AC_REQUIRE([AC_PROG_F77])
4224145b7b3cSmrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
4225145b7b3cSmrg])# _LT_AC_LANG_F77
4226145b7b3cSmrg
4227145b7b3cSmrg
4228145b7b3cSmrg# AC_LIBTOOL_GCJ
4229145b7b3cSmrg# --------------
4230145b7b3cSmrg# enable support for GCJ libraries
4231145b7b3cSmrgAC_DEFUN([AC_LIBTOOL_GCJ],
4232145b7b3cSmrg[AC_REQUIRE([_LT_AC_LANG_GCJ])
4233145b7b3cSmrg])# AC_LIBTOOL_GCJ
4234145b7b3cSmrg
4235145b7b3cSmrg
4236145b7b3cSmrg# _LT_AC_LANG_GCJ
4237145b7b3cSmrg# ---------------
4238145b7b3cSmrgAC_DEFUN([_LT_AC_LANG_GCJ],
4239145b7b3cSmrg[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
4240145b7b3cSmrg  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
4241145b7b3cSmrg    [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
4242145b7b3cSmrg      [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
4243145b7b3cSmrg	 [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
4244145b7b3cSmrg	   [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
4245145b7b3cSmrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
4246145b7b3cSmrg])# _LT_AC_LANG_GCJ
4247145b7b3cSmrg
4248145b7b3cSmrg
4249145b7b3cSmrg# AC_LIBTOOL_RC
4250145b7b3cSmrg# -------------
4251145b7b3cSmrg# enable support for Windows resource files
4252145b7b3cSmrgAC_DEFUN([AC_LIBTOOL_RC],
4253145b7b3cSmrg[AC_REQUIRE([LT_AC_PROG_RC])
4254145b7b3cSmrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
4255145b7b3cSmrg])# AC_LIBTOOL_RC
4256145b7b3cSmrg
4257145b7b3cSmrg
4258145b7b3cSmrg# AC_LIBTOOL_LANG_C_CONFIG
4259145b7b3cSmrg# ------------------------
4260145b7b3cSmrg# Ensure that the configuration vars for the C compiler are
4261145b7b3cSmrg# suitably defined.  Those variables are subsequently used by
4262145b7b3cSmrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4263145b7b3cSmrgAC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
4264145b7b3cSmrgAC_DEFUN([_LT_AC_LANG_C_CONFIG],
4265145b7b3cSmrg[lt_save_CC="$CC"
4266145b7b3cSmrgAC_LANG_PUSH(C)
4267145b7b3cSmrg
4268145b7b3cSmrg# Source file extension for C test sources.
4269145b7b3cSmrgac_ext=c
4270145b7b3cSmrg
4271145b7b3cSmrg# Object file extension for compiled C test sources.
4272145b7b3cSmrgobjext=o
4273145b7b3cSmrg_LT_AC_TAGVAR(objext, $1)=$objext
4274145b7b3cSmrg
4275145b7b3cSmrg# Code to be used in simple compile tests
4276145b7b3cSmrglt_simple_compile_test_code="int some_variable = 0;\n"
4277145b7b3cSmrg
4278145b7b3cSmrg# Code to be used in simple link tests
4279145b7b3cSmrglt_simple_link_test_code='int main(){return(0);}\n'
4280145b7b3cSmrg
4281145b7b3cSmrg_LT_AC_SYS_COMPILER
4282145b7b3cSmrg
4283145b7b3cSmrg# save warnings/boilerplate of simple test code
4284145b7b3cSmrg_LT_COMPILER_BOILERPLATE
4285145b7b3cSmrg_LT_LINKER_BOILERPLATE
4286145b7b3cSmrg
4287145b7b3cSmrgAC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
4288145b7b3cSmrgAC_LIBTOOL_PROG_COMPILER_PIC($1)
4289145b7b3cSmrgAC_LIBTOOL_PROG_CC_C_O($1)
4290145b7b3cSmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
4291145b7b3cSmrgAC_LIBTOOL_PROG_LD_SHLIBS($1)
4292145b7b3cSmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
4293145b7b3cSmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
4294145b7b3cSmrgAC_LIBTOOL_SYS_LIB_STRIP
4295145b7b3cSmrgAC_LIBTOOL_DLOPEN_SELF
4296145b7b3cSmrg
4297145b7b3cSmrg# Report which library types will actually be built
4298145b7b3cSmrgAC_MSG_CHECKING([if libtool supports shared libraries])
4299145b7b3cSmrgAC_MSG_RESULT([$can_build_shared])
4300145b7b3cSmrg
4301145b7b3cSmrgAC_MSG_CHECKING([whether to build shared libraries])
4302145b7b3cSmrgtest "$can_build_shared" = "no" && enable_shared=no
4303145b7b3cSmrg
4304145b7b3cSmrg# On AIX, shared libraries and static libraries use the same namespace, and
4305145b7b3cSmrg# are all built from PIC.
4306145b7b3cSmrgcase $host_os in
4307145b7b3cSmrgaix3*)
4308145b7b3cSmrg  test "$enable_shared" = yes && enable_static=no
4309145b7b3cSmrg  if test -n "$RANLIB"; then
4310145b7b3cSmrg    archive_cmds="$archive_cmds~\$RANLIB \$lib"
4311145b7b3cSmrg    postinstall_cmds='$RANLIB $lib'
4312145b7b3cSmrg  fi
4313145b7b3cSmrg  ;;
4314145b7b3cSmrg
4315145b7b3cSmrgaix4* | aix5*)
4316145b7b3cSmrg  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
4317145b7b3cSmrg    test "$enable_shared" = yes && enable_static=no
4318145b7b3cSmrg  fi
4319145b7b3cSmrg    ;;
4320145b7b3cSmrgesac
4321145b7b3cSmrgAC_MSG_RESULT([$enable_shared])
4322145b7b3cSmrg
4323145b7b3cSmrgAC_MSG_CHECKING([whether to build static libraries])
4324145b7b3cSmrg# Make sure either enable_shared or enable_static is yes.
4325145b7b3cSmrgtest "$enable_shared" = yes || enable_static=yes
4326145b7b3cSmrgAC_MSG_RESULT([$enable_static])
4327145b7b3cSmrg
4328145b7b3cSmrgAC_LIBTOOL_CONFIG($1)
4329145b7b3cSmrg
4330145b7b3cSmrgAC_LANG_POP
4331145b7b3cSmrgCC="$lt_save_CC"
4332145b7b3cSmrg])# AC_LIBTOOL_LANG_C_CONFIG
4333145b7b3cSmrg
4334145b7b3cSmrg
4335145b7b3cSmrg# AC_LIBTOOL_LANG_CXX_CONFIG
4336145b7b3cSmrg# --------------------------
4337145b7b3cSmrg# Ensure that the configuration vars for the C compiler are
4338145b7b3cSmrg# suitably defined.  Those variables are subsequently used by
4339145b7b3cSmrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4340145b7b3cSmrgAC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
4341145b7b3cSmrgAC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
4342145b7b3cSmrg[AC_LANG_PUSH(C++)
4343145b7b3cSmrgAC_REQUIRE([AC_PROG_CXX])
4344145b7b3cSmrgAC_REQUIRE([_LT_AC_PROG_CXXCPP])
4345145b7b3cSmrg
4346145b7b3cSmrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4347145b7b3cSmrg_LT_AC_TAGVAR(allow_undefined_flag, $1)=
4348145b7b3cSmrg_LT_AC_TAGVAR(always_export_symbols, $1)=no
4349145b7b3cSmrg_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
4350145b7b3cSmrg_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
4351145b7b3cSmrg_LT_AC_TAGVAR(hardcode_direct, $1)=no
4352145b7b3cSmrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
4353145b7b3cSmrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
4354145b7b3cSmrg_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
4355145b7b3cSmrg_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
4356145b7b3cSmrg_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
4357145b7b3cSmrg_LT_AC_TAGVAR(hardcode_automatic, $1)=no
4358145b7b3cSmrg_LT_AC_TAGVAR(module_cmds, $1)=
4359145b7b3cSmrg_LT_AC_TAGVAR(module_expsym_cmds, $1)=
4360145b7b3cSmrg_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
4361145b7b3cSmrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
4362145b7b3cSmrg_LT_AC_TAGVAR(no_undefined_flag, $1)=
4363145b7b3cSmrg_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
4364145b7b3cSmrg_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
4365145b7b3cSmrg
4366145b7b3cSmrg# Dependencies to place before and after the object being linked:
4367145b7b3cSmrg_LT_AC_TAGVAR(predep_objects, $1)=
4368145b7b3cSmrg_LT_AC_TAGVAR(postdep_objects, $1)=
4369145b7b3cSmrg_LT_AC_TAGVAR(predeps, $1)=
4370145b7b3cSmrg_LT_AC_TAGVAR(postdeps, $1)=
4371145b7b3cSmrg_LT_AC_TAGVAR(compiler_lib_search_path, $1)=
4372145b7b3cSmrg
4373145b7b3cSmrg# Source file extension for C++ test sources.
4374145b7b3cSmrgac_ext=cpp
4375145b7b3cSmrg
4376145b7b3cSmrg# Object file extension for compiled C++ test sources.
4377145b7b3cSmrgobjext=o
4378145b7b3cSmrg_LT_AC_TAGVAR(objext, $1)=$objext
4379145b7b3cSmrg
4380145b7b3cSmrg# Code to be used in simple compile tests
4381145b7b3cSmrglt_simple_compile_test_code="int some_variable = 0;\n"
4382145b7b3cSmrg
4383145b7b3cSmrg# Code to be used in simple link tests
4384145b7b3cSmrglt_simple_link_test_code='int main(int, char *[[]]) { return(0); }\n'
4385145b7b3cSmrg
4386145b7b3cSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
4387145b7b3cSmrg_LT_AC_SYS_COMPILER
4388145b7b3cSmrg
4389145b7b3cSmrg# save warnings/boilerplate of simple test code
4390145b7b3cSmrg_LT_COMPILER_BOILERPLATE
4391145b7b3cSmrg_LT_LINKER_BOILERPLATE
4392145b7b3cSmrg
4393145b7b3cSmrg# Allow CC to be a program name with arguments.
4394145b7b3cSmrglt_save_CC=$CC
4395145b7b3cSmrglt_save_LD=$LD
4396145b7b3cSmrglt_save_GCC=$GCC
4397145b7b3cSmrgGCC=$GXX
4398145b7b3cSmrglt_save_with_gnu_ld=$with_gnu_ld
4399145b7b3cSmrglt_save_path_LD=$lt_cv_path_LD
4400145b7b3cSmrgif test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
4401145b7b3cSmrg  lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
4402145b7b3cSmrgelse
4403145b7b3cSmrg  $as_unset lt_cv_prog_gnu_ld
4404145b7b3cSmrgfi
4405145b7b3cSmrgif test -n "${lt_cv_path_LDCXX+set}"; then
4406145b7b3cSmrg  lt_cv_path_LD=$lt_cv_path_LDCXX
4407145b7b3cSmrgelse
4408145b7b3cSmrg  $as_unset lt_cv_path_LD
4409145b7b3cSmrgfi
4410145b7b3cSmrgtest -z "${LDCXX+set}" || LD=$LDCXX
4411145b7b3cSmrgCC=${CXX-"c++"}
4412145b7b3cSmrgcompiler=$CC
4413145b7b3cSmrg_LT_AC_TAGVAR(compiler, $1)=$CC
4414145b7b3cSmrg_LT_CC_BASENAME([$compiler])
4415145b7b3cSmrg
4416145b7b3cSmrg# We don't want -fno-exception wen compiling C++ code, so set the
4417145b7b3cSmrg# no_builtin_flag separately
4418145b7b3cSmrgif test "$GXX" = yes; then
4419145b7b3cSmrg  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
4420145b7b3cSmrgelse
4421145b7b3cSmrg  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
4422145b7b3cSmrgfi
4423145b7b3cSmrg
4424145b7b3cSmrgif test "$GXX" = yes; then
4425145b7b3cSmrg  # Set up default GNU C++ configuration
4426145b7b3cSmrg
4427145b7b3cSmrg  AC_PROG_LD
4428145b7b3cSmrg
4429145b7b3cSmrg  # Check if GNU C++ uses GNU ld as the underlying linker, since the
4430145b7b3cSmrg  # archiving commands below assume that GNU ld is being used.
4431145b7b3cSmrg  if test "$with_gnu_ld" = yes; then
4432145b7b3cSmrg    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
4433145b7b3cSmrg    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
4434145b7b3cSmrg
4435145b7b3cSmrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
4436145b7b3cSmrg    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4437145b7b3cSmrg
4438145b7b3cSmrg    # If archive_cmds runs LD, not CC, wlarc should be empty
4439145b7b3cSmrg    # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
4440145b7b3cSmrg    #     investigate it a little bit more. (MM)
4441145b7b3cSmrg    wlarc='${wl}'
4442145b7b3cSmrg
4443145b7b3cSmrg    # ancient GNU ld didn't support --whole-archive et. al.
4444145b7b3cSmrg    if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
4445145b7b3cSmrg	grep 'no-whole-archive' > /dev/null; then
4446145b7b3cSmrg      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
4447145b7b3cSmrg    else
4448145b7b3cSmrg      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
4449145b7b3cSmrg    fi
4450145b7b3cSmrg  else
4451145b7b3cSmrg    with_gnu_ld=no
4452145b7b3cSmrg    wlarc=
4453145b7b3cSmrg
4454145b7b3cSmrg    # A generic and very simple default shared library creation
4455145b7b3cSmrg    # command for GNU C++ for the case where it uses the native
4456145b7b3cSmrg    # linker, instead of GNU ld.  If possible, this setting should
4457145b7b3cSmrg    # overridden to take advantage of the native linker features on
4458145b7b3cSmrg    # the platform it is being used on.
4459145b7b3cSmrg    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
4460145b7b3cSmrg  fi
4461145b7b3cSmrg
4462145b7b3cSmrg  # Commands to make compiler produce verbose output that lists
4463145b7b3cSmrg  # what "hidden" libraries, object files and flags are used when
4464145b7b3cSmrg  # linking a shared library.
4465145b7b3cSmrg  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
4466145b7b3cSmrg
4467145b7b3cSmrgelse
4468145b7b3cSmrg  GXX=no
4469145b7b3cSmrg  with_gnu_ld=no
4470145b7b3cSmrg  wlarc=
4471145b7b3cSmrgfi
4472145b7b3cSmrg
4473145b7b3cSmrg# PORTME: fill in a description of your system's C++ link characteristics
4474145b7b3cSmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
4475145b7b3cSmrg_LT_AC_TAGVAR(ld_shlibs, $1)=yes
4476145b7b3cSmrgcase $host_os in
4477145b7b3cSmrg  aix3*)
4478145b7b3cSmrg    # FIXME: insert proper C++ library support
4479145b7b3cSmrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
4480145b7b3cSmrg    ;;
4481145b7b3cSmrg  aix4* | aix5*)
4482145b7b3cSmrg    if test "$host_cpu" = ia64; then
4483145b7b3cSmrg      # On IA64, the linker does run time linking by default, so we don't
4484145b7b3cSmrg      # have to do anything special.
4485145b7b3cSmrg      aix_use_runtimelinking=no
4486145b7b3cSmrg      exp_sym_flag='-Bexport'
4487145b7b3cSmrg      no_entry_flag=""
4488145b7b3cSmrg    else
4489145b7b3cSmrg      aix_use_runtimelinking=no
4490145b7b3cSmrg
4491145b7b3cSmrg      # Test if we are trying to use run time linking or normal
4492145b7b3cSmrg      # AIX style linking. If -brtl is somewhere in LDFLAGS, we
4493145b7b3cSmrg      # need to do runtime linking.
4494145b7b3cSmrg      case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
4495145b7b3cSmrg	for ld_flag in $LDFLAGS; do
4496145b7b3cSmrg	  case $ld_flag in
4497145b7b3cSmrg	  *-brtl*)
4498145b7b3cSmrg	    aix_use_runtimelinking=yes
4499145b7b3cSmrg	    break
4500145b7b3cSmrg	    ;;
4501145b7b3cSmrg	  esac
4502145b7b3cSmrg	done
4503145b7b3cSmrg	;;
4504145b7b3cSmrg      esac
4505145b7b3cSmrg
4506145b7b3cSmrg      exp_sym_flag='-bexport'
4507145b7b3cSmrg      no_entry_flag='-bnoentry'
4508145b7b3cSmrg    fi
4509145b7b3cSmrg
4510145b7b3cSmrg    # When large executables or shared objects are built, AIX ld can
4511145b7b3cSmrg    # have problems creating the table of contents.  If linking a library
4512145b7b3cSmrg    # or program results in "error TOC overflow" add -mminimal-toc to
4513145b7b3cSmrg    # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
4514145b7b3cSmrg    # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
4515145b7b3cSmrg
4516145b7b3cSmrg    _LT_AC_TAGVAR(archive_cmds, $1)=''
4517145b7b3cSmrg    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4518145b7b3cSmrg    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
4519145b7b3cSmrg    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4520145b7b3cSmrg
4521145b7b3cSmrg    if test "$GXX" = yes; then
4522145b7b3cSmrg      case $host_os in aix4.[[012]]|aix4.[[012]].*)
4523145b7b3cSmrg      # We only want to do this on AIX 4.2 and lower, the check
4524145b7b3cSmrg      # below for broken collect2 doesn't work under 4.3+
4525145b7b3cSmrg	collect2name=`${CC} -print-prog-name=collect2`
4526145b7b3cSmrg	if test -f "$collect2name" && \
4527145b7b3cSmrg	   strings "$collect2name" | grep resolve_lib_name >/dev/null
4528145b7b3cSmrg	then
4529145b7b3cSmrg	  # We have reworked collect2
4530145b7b3cSmrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4531145b7b3cSmrg	else
4532145b7b3cSmrg	  # We have old collect2
4533145b7b3cSmrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
4534145b7b3cSmrg	  # It fails to find uninstalled libraries when the uninstalled
4535145b7b3cSmrg	  # path is not listed in the libpath.  Setting hardcode_minus_L
4536145b7b3cSmrg	  # to unsupported forces relinking
4537145b7b3cSmrg	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
4538145b7b3cSmrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4539145b7b3cSmrg	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
4540145b7b3cSmrg	fi
4541145b7b3cSmrg	;;
4542145b7b3cSmrg      esac
4543145b7b3cSmrg      shared_flag='-shared'
4544145b7b3cSmrg      if test "$aix_use_runtimelinking" = yes; then
4545145b7b3cSmrg	shared_flag="$shared_flag "'${wl}-G'
4546145b7b3cSmrg      fi
4547145b7b3cSmrg    else
4548145b7b3cSmrg      # not using gcc
4549145b7b3cSmrg      if test "$host_cpu" = ia64; then
4550145b7b3cSmrg	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
4551145b7b3cSmrg	# chokes on -Wl,-G. The following line is correct:
4552145b7b3cSmrg	shared_flag='-G'
4553145b7b3cSmrg      else
4554145b7b3cSmrg	if test "$aix_use_runtimelinking" = yes; then
4555145b7b3cSmrg	  shared_flag='${wl}-G'
4556145b7b3cSmrg	else
4557145b7b3cSmrg	  shared_flag='${wl}-bM:SRE'
4558145b7b3cSmrg	fi
4559145b7b3cSmrg      fi
4560145b7b3cSmrg    fi
4561145b7b3cSmrg
4562145b7b3cSmrg    # It seems that -bexpall does not export symbols beginning with
4563145b7b3cSmrg    # underscore (_), so it is better to generate a list of symbols to export.
4564145b7b3cSmrg    _LT_AC_TAGVAR(always_export_symbols, $1)=yes
4565145b7b3cSmrg    if test "$aix_use_runtimelinking" = yes; then
4566145b7b3cSmrg      # Warning - without using the other runtime loading flags (-brtl),
4567145b7b3cSmrg      # -berok will link without error, but may produce a broken library.
4568145b7b3cSmrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
4569145b7b3cSmrg      # Determine the default libpath from the value encoded in an empty executable.
4570145b7b3cSmrg      _LT_AC_SYS_LIBPATH_AIX
4571145b7b3cSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
4572145b7b3cSmrg
4573145b7b3cSmrg      _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
4574145b7b3cSmrg     else
4575145b7b3cSmrg      if test "$host_cpu" = ia64; then
4576145b7b3cSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
4577145b7b3cSmrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
4578145b7b3cSmrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
4579145b7b3cSmrg      else
4580145b7b3cSmrg	# Determine the default libpath from the value encoded in an empty executable.
4581145b7b3cSmrg	_LT_AC_SYS_LIBPATH_AIX
4582145b7b3cSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
4583145b7b3cSmrg	# Warning - without using the other run time loading flags,
4584145b7b3cSmrg	# -berok will link without error, but may produce a broken library.
4585145b7b3cSmrg	_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
4586145b7b3cSmrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
4587145b7b3cSmrg	# Exported symbols can be pulled into shared objects from archives
4588145b7b3cSmrg	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
4589145b7b3cSmrg	_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
4590145b7b3cSmrg	# This is similar to how AIX traditionally builds its shared libraries.
4591145b7b3cSmrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
4592145b7b3cSmrg      fi
4593145b7b3cSmrg    fi
4594145b7b3cSmrg    ;;
4595145b7b3cSmrg
4596145b7b3cSmrg  beos*)
4597145b7b3cSmrg    if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
4598145b7b3cSmrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
4599145b7b3cSmrg      # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
4600145b7b3cSmrg      # support --undefined.  This deserves some investigation.  FIXME
4601145b7b3cSmrg      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4602145b7b3cSmrg    else
4603145b7b3cSmrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
4604145b7b3cSmrg    fi
4605145b7b3cSmrg    ;;
4606145b7b3cSmrg
4607145b7b3cSmrg  chorus*)
4608145b7b3cSmrg    case $cc_basename in
4609145b7b3cSmrg      *)
4610145b7b3cSmrg	# FIXME: insert proper C++ library support
4611145b7b3cSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
4612145b7b3cSmrg	;;
4613145b7b3cSmrg    esac
4614145b7b3cSmrg    ;;
4615145b7b3cSmrg
4616145b7b3cSmrg  cygwin* | mingw* | pw32*)
4617145b7b3cSmrg    # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
4618145b7b3cSmrg    # as there is no search path for DLLs.
4619145b7b3cSmrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4620145b7b3cSmrg    _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
4621145b7b3cSmrg    _LT_AC_TAGVAR(always_export_symbols, $1)=no
4622145b7b3cSmrg    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
4623145b7b3cSmrg
4624145b7b3cSmrg    if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
4625145b7b3cSmrg      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
4626145b7b3cSmrg      # If the export-symbols file already is a .def file (1st line
4627145b7b3cSmrg      # is EXPORTS), use it as is; otherwise, prepend...
4628145b7b3cSmrg      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
4629145b7b3cSmrg	cp $export_symbols $output_objdir/$soname.def;
4630145b7b3cSmrg      else
4631145b7b3cSmrg	echo EXPORTS > $output_objdir/$soname.def;
4632145b7b3cSmrg	cat $export_symbols >> $output_objdir/$soname.def;
4633145b7b3cSmrg      fi~
4634145b7b3cSmrg      $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'
4635145b7b3cSmrg    else
4636145b7b3cSmrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
4637145b7b3cSmrg    fi
4638145b7b3cSmrg  ;;
4639145b7b3cSmrg      darwin* | rhapsody*)
4640145b7b3cSmrg        case $host_os in
4641145b7b3cSmrg        rhapsody* | darwin1.[[012]])
4642145b7b3cSmrg         _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
4643145b7b3cSmrg         ;;
4644145b7b3cSmrg       *) # Darwin 1.3 on
4645145b7b3cSmrg         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
4646145b7b3cSmrg           _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
4647145b7b3cSmrg         else
4648145b7b3cSmrg           case ${MACOSX_DEPLOYMENT_TARGET} in
4649145b7b3cSmrg             10.[[012]])
4650145b7b3cSmrg               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
4651145b7b3cSmrg               ;;
4652145b7b3cSmrg             10.*)
4653145b7b3cSmrg               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
4654145b7b3cSmrg               ;;
4655145b7b3cSmrg           esac
4656145b7b3cSmrg         fi
4657145b7b3cSmrg         ;;
4658145b7b3cSmrg        esac
4659145b7b3cSmrg      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4660145b7b3cSmrg      _LT_AC_TAGVAR(hardcode_direct, $1)=no
4661145b7b3cSmrg      _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
4662145b7b3cSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
4663145b7b3cSmrg      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
4664145b7b3cSmrg      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4665145b7b3cSmrg
4666145b7b3cSmrg    if test "$GXX" = yes ; then
4667145b7b3cSmrg      lt_int_apple_cc_single_mod=no
4668145b7b3cSmrg      output_verbose_link_cmd='echo'
4669145b7b3cSmrg      if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then
4670145b7b3cSmrg       lt_int_apple_cc_single_mod=yes
4671145b7b3cSmrg      fi
4672145b7b3cSmrg      if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
4673145b7b3cSmrg       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
4674145b7b3cSmrg      else
4675145b7b3cSmrg          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
4676145b7b3cSmrg        fi
4677145b7b3cSmrg        _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
4678145b7b3cSmrg        # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
4679145b7b3cSmrg          if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
4680145b7b3cSmrg            _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
4681145b7b3cSmrg          else
4682145b7b3cSmrg            _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "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~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
4683145b7b3cSmrg          fi
4684145b7b3cSmrg            _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
4685145b7b3cSmrg      else
4686145b7b3cSmrg      case $cc_basename in
4687145b7b3cSmrg        xlc*)
4688145b7b3cSmrg         output_verbose_link_cmd='echo'
4689145b7b3cSmrg          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
4690145b7b3cSmrg          _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
4691145b7b3cSmrg          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
4692145b7b3cSmrg          _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
4693145b7b3cSmrg          _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
4694145b7b3cSmrg          ;;
4695145b7b3cSmrg       *)
4696145b7b3cSmrg         _LT_AC_TAGVAR(ld_shlibs, $1)=no
4697145b7b3cSmrg          ;;
4698145b7b3cSmrg      esac
4699145b7b3cSmrg      fi
4700145b7b3cSmrg        ;;
4701145b7b3cSmrg
4702145b7b3cSmrg  dgux*)
4703145b7b3cSmrg    case $cc_basename in
4704145b7b3cSmrg      ec++*)
4705145b7b3cSmrg	# FIXME: insert proper C++ library support
4706145b7b3cSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
4707145b7b3cSmrg	;;
4708145b7b3cSmrg      ghcx*)
4709145b7b3cSmrg	# Green Hills C++ Compiler
4710145b7b3cSmrg	# FIXME: insert proper C++ library support
4711145b7b3cSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
4712145b7b3cSmrg	;;
4713145b7b3cSmrg      *)
4714145b7b3cSmrg	# FIXME: insert proper C++ library support
4715145b7b3cSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
4716145b7b3cSmrg	;;
4717145b7b3cSmrg    esac
4718145b7b3cSmrg    ;;
4719145b7b3cSmrg  freebsd[[12]]*)
4720145b7b3cSmrg    # C++ shared libraries reported to be fairly broken before switch to ELF
4721145b7b3cSmrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
4722145b7b3cSmrg    ;;
4723145b7b3cSmrg  freebsd-elf*)
4724145b7b3cSmrg    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4725145b7b3cSmrg    ;;
4726145b7b3cSmrg  freebsd* | kfreebsd*-gnu | dragonfly*)
4727145b7b3cSmrg    # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
4728145b7b3cSmrg    # conventions
4729145b7b3cSmrg    _LT_AC_TAGVAR(ld_shlibs, $1)=yes
4730145b7b3cSmrg    ;;
4731145b7b3cSmrg  gnu*)
4732145b7b3cSmrg    ;;
4733145b7b3cSmrg  hpux9*)
4734145b7b3cSmrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
4735145b7b3cSmrg    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4736145b7b3cSmrg    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4737145b7b3cSmrg    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4738145b7b3cSmrg    _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
4739145b7b3cSmrg				# but as the default
4740145b7b3cSmrg				# location of the library.
4741145b7b3cSmrg
4742145b7b3cSmrg    case $cc_basename in
4743145b7b3cSmrg    CC*)
4744145b7b3cSmrg      # FIXME: insert proper C++ library support
4745145b7b3cSmrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
4746145b7b3cSmrg      ;;
4747145b7b3cSmrg    aCC*)
4748145b7b3cSmrg      _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
4749145b7b3cSmrg      # Commands to make compiler produce verbose output that lists
4750145b7b3cSmrg      # what "hidden" libraries, object files and flags are used when
4751145b7b3cSmrg      # linking a shared library.
4752145b7b3cSmrg      #
4753145b7b3cSmrg      # There doesn't appear to be a way to prevent this compiler from
4754145b7b3cSmrg      # explicitly linking system object files so we need to strip them
4755145b7b3cSmrg      # from the output so that they don't get included in the library
4756145b7b3cSmrg      # dependencies.
4757145b7b3cSmrg      output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[[-]]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
4758145b7b3cSmrg      ;;
4759145b7b3cSmrg    *)
4760145b7b3cSmrg      if test "$GXX" = yes; then
4761145b7b3cSmrg        _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
4762145b7b3cSmrg      else
4763145b7b3cSmrg        # FIXME: insert proper C++ library support
4764145b7b3cSmrg        _LT_AC_TAGVAR(ld_shlibs, $1)=no
4765145b7b3cSmrg      fi
4766145b7b3cSmrg      ;;
4767145b7b3cSmrg    esac
4768145b7b3cSmrg    ;;
4769145b7b3cSmrg  hpux10*|hpux11*)
4770145b7b3cSmrg    if test $with_gnu_ld = no; then
4771145b7b3cSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
4772145b7b3cSmrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4773145b7b3cSmrg
4774145b7b3cSmrg      case $host_cpu in
4775145b7b3cSmrg      hppa*64*|ia64*)
4776145b7b3cSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
4777145b7b3cSmrg        ;;
4778145b7b3cSmrg      *)
4779145b7b3cSmrg	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4780145b7b3cSmrg        ;;
4781145b7b3cSmrg      esac
4782145b7b3cSmrg    fi
4783145b7b3cSmrg    case $host_cpu in
4784145b7b3cSmrg    hppa*64*|ia64*)
4785145b7b3cSmrg      _LT_AC_TAGVAR(hardcode_direct, $1)=no
4786145b7b3cSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4787145b7b3cSmrg      ;;
4788145b7b3cSmrg    *)
4789145b7b3cSmrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4790145b7b3cSmrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
4791145b7b3cSmrg					      # but as the default
4792145b7b3cSmrg					      # location of the library.
4793145b7b3cSmrg      ;;
4794145b7b3cSmrg    esac
4795145b7b3cSmrg
4796145b7b3cSmrg    case $cc_basename in
4797145b7b3cSmrg      CC*)
4798145b7b3cSmrg	# FIXME: insert proper C++ library support
4799145b7b3cSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
4800145b7b3cSmrg	;;
4801145b7b3cSmrg      aCC*)
4802145b7b3cSmrg	case $host_cpu in
4803145b7b3cSmrg	hppa*64*)
4804145b7b3cSmrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
4805145b7b3cSmrg	  ;;
4806145b7b3cSmrg	ia64*)
4807145b7b3cSmrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
4808145b7b3cSmrg	  ;;
4809145b7b3cSmrg	*)
4810145b7b3cSmrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
4811145b7b3cSmrg	  ;;
4812145b7b3cSmrg	esac
4813145b7b3cSmrg	# Commands to make compiler produce verbose output that lists
4814145b7b3cSmrg	# what "hidden" libraries, object files and flags are used when
4815145b7b3cSmrg	# linking a shared library.
4816145b7b3cSmrg	#
4817145b7b3cSmrg	# There doesn't appear to be a way to prevent this compiler from
4818145b7b3cSmrg	# explicitly linking system object files so we need to strip them
4819145b7b3cSmrg	# from the output so that they don't get included in the library
4820145b7b3cSmrg	# dependencies.
4821145b7b3cSmrg	output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
4822145b7b3cSmrg	;;
4823145b7b3cSmrg      *)
4824145b7b3cSmrg	if test "$GXX" = yes; then
4825145b7b3cSmrg	  if test $with_gnu_ld = no; then
4826145b7b3cSmrg	    case $host_cpu in
4827145b7b3cSmrg	    hppa*64*)
4828145b7b3cSmrg	      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
4829145b7b3cSmrg	      ;;
4830145b7b3cSmrg	    ia64*)
4831145b7b3cSmrg	      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
4832145b7b3cSmrg	      ;;
4833145b7b3cSmrg	    *)
4834145b7b3cSmrg	      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
4835145b7b3cSmrg	      ;;
4836145b7b3cSmrg	    esac
4837145b7b3cSmrg	  fi
4838145b7b3cSmrg	else
4839145b7b3cSmrg	  # FIXME: insert proper C++ library support
4840145b7b3cSmrg	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
4841145b7b3cSmrg	fi
4842145b7b3cSmrg	;;
4843145b7b3cSmrg    esac
4844145b7b3cSmrg    ;;
4845145b7b3cSmrg  interix3*)
4846145b7b3cSmrg    _LT_AC_TAGVAR(hardcode_direct, $1)=no
4847145b7b3cSmrg    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4848145b7b3cSmrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4849145b7b3cSmrg    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4850145b7b3cSmrg    # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
4851145b7b3cSmrg    # Instead, shared libraries are loaded at an image base (0x10000000 by
4852145b7b3cSmrg    # default) and relocated if they conflict, which is a slow very memory
4853145b7b3cSmrg    # consuming and fragmenting process.  To avoid this, we pick a random,
4854145b7b3cSmrg    # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
4855145b7b3cSmrg    # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
4856145b7b3cSmrg    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
4857145b7b3cSmrg    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
4858145b7b3cSmrg    ;;
4859145b7b3cSmrg  irix5* | irix6*)
4860145b7b3cSmrg    case $cc_basename in
4861145b7b3cSmrg      CC*)
4862145b7b3cSmrg	# SGI C++
4863145b7b3cSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
4864145b7b3cSmrg
4865145b7b3cSmrg	# Archives containing C++ object files must be created using
4866145b7b3cSmrg	# "CC -ar", where "CC" is the IRIX C++ compiler.  This is
4867145b7b3cSmrg	# necessary to make sure instantiated templates are included
4868145b7b3cSmrg	# in the archive.
4869145b7b3cSmrg	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
4870145b7b3cSmrg	;;
4871145b7b3cSmrg      *)
4872145b7b3cSmrg	if test "$GXX" = yes; then
4873145b7b3cSmrg	  if test "$with_gnu_ld" = no; then
4874145b7b3cSmrg	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
4875145b7b3cSmrg	  else
4876145b7b3cSmrg	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib'
4877145b7b3cSmrg	  fi
4878145b7b3cSmrg	fi
4879145b7b3cSmrg	_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4880145b7b3cSmrg	;;
4881145b7b3cSmrg    esac
4882145b7b3cSmrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4883145b7b3cSmrg    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4884145b7b3cSmrg    ;;
4885145b7b3cSmrg  linux*)
4886145b7b3cSmrg    case $cc_basename in
4887145b7b3cSmrg      KCC*)
4888145b7b3cSmrg	# Kuck and Associates, Inc. (KAI) C++ Compiler
4889145b7b3cSmrg
4890145b7b3cSmrg	# KCC will only create a shared library if the output file
4891145b7b3cSmrg	# ends with ".so" (or ".sl" for HP-UX), so rename the library
4892145b7b3cSmrg	# to its proper name (with version) after linking.
4893145b7b3cSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
4894145b7b3cSmrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
4895145b7b3cSmrg	# Commands to make compiler produce verbose output that lists
4896145b7b3cSmrg	# what "hidden" libraries, object files and flags are used when
4897145b7b3cSmrg	# linking a shared library.
4898145b7b3cSmrg	#
4899145b7b3cSmrg	# There doesn't appear to be a way to prevent this compiler from
4900145b7b3cSmrg	# explicitly linking system object files so we need to strip them
4901145b7b3cSmrg	# from the output so that they don't get included in the library
4902145b7b3cSmrg	# dependencies.
4903145b7b3cSmrg	output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
4904145b7b3cSmrg
4905145b7b3cSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
4906145b7b3cSmrg	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4907145b7b3cSmrg
4908145b7b3cSmrg	# Archives containing C++ object files must be created using
4909145b7b3cSmrg	# "CC -Bstatic", where "CC" is the KAI C++ compiler.
4910145b7b3cSmrg	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
4911145b7b3cSmrg	;;
4912145b7b3cSmrg      icpc*)
4913145b7b3cSmrg	# Intel C++
4914145b7b3cSmrg	with_gnu_ld=yes
4915145b7b3cSmrg	# version 8.0 and above of icpc choke on multiply defined symbols
4916145b7b3cSmrg	# if we add $predep_objects and $postdep_objects, however 7.1 and
4917145b7b3cSmrg	# earlier do not add the objects themselves.
4918145b7b3cSmrg	case `$CC -V 2>&1` in
4919145b7b3cSmrg	*"Version 7."*)
4920145b7b3cSmrg  	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
4921145b7b3cSmrg  	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
4922145b7b3cSmrg	  ;;
4923145b7b3cSmrg	*)  # Version 8.0 or newer
4924145b7b3cSmrg	  tmp_idyn=
4925145b7b3cSmrg	  case $host_cpu in
4926145b7b3cSmrg	    ia64*) tmp_idyn=' -i_dynamic';;
4927145b7b3cSmrg	  esac
4928145b7b3cSmrg  	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4929145b7b3cSmrg	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
4930145b7b3cSmrg	  ;;
4931145b7b3cSmrg	esac
4932145b7b3cSmrg	_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4933145b7b3cSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4934145b7b3cSmrg	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4935145b7b3cSmrg	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
4936145b7b3cSmrg	;;
4937145b7b3cSmrg      pgCC*)
4938145b7b3cSmrg        # Portland Group C++ compiler
4939145b7b3cSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
4940145b7b3cSmrg  	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
4941145b7b3cSmrg
4942145b7b3cSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
4943145b7b3cSmrg	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4944145b7b3cSmrg	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
4945145b7b3cSmrg        ;;
4946145b7b3cSmrg      cxx*)
4947145b7b3cSmrg	# Compaq C++
4948145b7b3cSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
4949145b7b3cSmrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname  -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
4950145b7b3cSmrg
4951145b7b3cSmrg	runpath_var=LD_RUN_PATH
4952145b7b3cSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
4953145b7b3cSmrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4954145b7b3cSmrg
4955145b7b3cSmrg	# Commands to make compiler produce verbose output that lists
4956145b7b3cSmrg	# what "hidden" libraries, object files and flags are used when
4957145b7b3cSmrg	# linking a shared library.
4958145b7b3cSmrg	#
4959145b7b3cSmrg	# There doesn't appear to be a way to prevent this compiler from
4960145b7b3cSmrg	# explicitly linking system object files so we need to strip them
4961145b7b3cSmrg	# from the output so that they don't get included in the library
4962145b7b3cSmrg	# dependencies.
4963145b7b3cSmrg	output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
4964145b7b3cSmrg	;;
4965145b7b3cSmrg    esac
4966145b7b3cSmrg    ;;
4967145b7b3cSmrg  lynxos*)
4968145b7b3cSmrg    # FIXME: insert proper C++ library support
4969145b7b3cSmrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
4970145b7b3cSmrg    ;;
4971145b7b3cSmrg  m88k*)
4972145b7b3cSmrg    # FIXME: insert proper C++ library support
4973145b7b3cSmrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
4974145b7b3cSmrg    ;;
4975145b7b3cSmrg  mvs*)
4976145b7b3cSmrg    case $cc_basename in
4977145b7b3cSmrg      cxx*)
4978145b7b3cSmrg	# FIXME: insert proper C++ library support
4979145b7b3cSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
4980145b7b3cSmrg	;;
4981145b7b3cSmrg      *)
4982145b7b3cSmrg	# FIXME: insert proper C++ library support
4983145b7b3cSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
4984145b7b3cSmrg	;;
4985145b7b3cSmrg    esac
4986145b7b3cSmrg    ;;
4987145b7b3cSmrg  netbsd*)
4988145b7b3cSmrg    if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
4989145b7b3cSmrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
4990145b7b3cSmrg      wlarc=
4991145b7b3cSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4992145b7b3cSmrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4993145b7b3cSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4994145b7b3cSmrg    fi
4995145b7b3cSmrg    # Workaround some broken pre-1.5 toolchains
4996145b7b3cSmrg    output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
4997145b7b3cSmrg    ;;
4998145b7b3cSmrg  openbsd2*)
4999145b7b3cSmrg    # C++ shared libraries are fairly broken
5000145b7b3cSmrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
5001145b7b3cSmrg    ;;
5002145b7b3cSmrg  openbsd*)
5003145b7b3cSmrg    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5004145b7b3cSmrg    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5005145b7b3cSmrg    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
5006145b7b3cSmrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5007145b7b3cSmrg    if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5008145b7b3cSmrg      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
5009145b7b3cSmrg      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5010145b7b3cSmrg      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5011145b7b3cSmrg    fi
5012145b7b3cSmrg    output_verbose_link_cmd='echo'
5013145b7b3cSmrg    ;;
5014145b7b3cSmrg  osf3*)
5015145b7b3cSmrg    case $cc_basename in
5016145b7b3cSmrg      KCC*)
5017145b7b3cSmrg	# Kuck and Associates, Inc. (KAI) C++ Compiler
5018145b7b3cSmrg
5019145b7b3cSmrg	# KCC will only create a shared library if the output file
5020145b7b3cSmrg	# ends with ".so" (or ".sl" for HP-UX), so rename the library
5021145b7b3cSmrg	# to its proper name (with version) after linking.
5022145b7b3cSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
5023145b7b3cSmrg
5024145b7b3cSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5025145b7b3cSmrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5026145b7b3cSmrg
5027145b7b3cSmrg	# Archives containing C++ object files must be created using
5028145b7b3cSmrg	# "CC -Bstatic", where "CC" is the KAI C++ compiler.
5029145b7b3cSmrg	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
5030145b7b3cSmrg
5031145b7b3cSmrg	;;
5032145b7b3cSmrg      RCC*)
5033145b7b3cSmrg	# Rational C++ 2.4.1
5034145b7b3cSmrg	# FIXME: insert proper C++ library support
5035145b7b3cSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5036145b7b3cSmrg	;;
5037145b7b3cSmrg      cxx*)
5038145b7b3cSmrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
5039145b7b3cSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
5040145b7b3cSmrg
5041145b7b3cSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5042145b7b3cSmrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5043145b7b3cSmrg
5044145b7b3cSmrg	# Commands to make compiler produce verbose output that lists
5045145b7b3cSmrg	# what "hidden" libraries, object files and flags are used when
5046145b7b3cSmrg	# linking a shared library.
5047145b7b3cSmrg	#
5048145b7b3cSmrg	# There doesn't appear to be a way to prevent this compiler from
5049145b7b3cSmrg	# explicitly linking system object files so we need to strip them
5050145b7b3cSmrg	# from the output so that they don't get included in the library
5051145b7b3cSmrg	# dependencies.
5052145b7b3cSmrg	output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
5053145b7b3cSmrg	;;
5054145b7b3cSmrg      *)
5055145b7b3cSmrg	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
5056145b7b3cSmrg	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
5057145b7b3cSmrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
5058145b7b3cSmrg
5059145b7b3cSmrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5060145b7b3cSmrg	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5061145b7b3cSmrg
5062145b7b3cSmrg	  # Commands to make compiler produce verbose output that lists
5063145b7b3cSmrg	  # what "hidden" libraries, object files and flags are used when
5064145b7b3cSmrg	  # linking a shared library.
5065145b7b3cSmrg	  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
5066145b7b3cSmrg
5067145b7b3cSmrg	else
5068145b7b3cSmrg	  # FIXME: insert proper C++ library support
5069145b7b3cSmrg	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
5070145b7b3cSmrg	fi
5071145b7b3cSmrg	;;
5072145b7b3cSmrg    esac
5073145b7b3cSmrg    ;;
5074145b7b3cSmrg  osf4* | osf5*)
5075145b7b3cSmrg    case $cc_basename in
5076145b7b3cSmrg      KCC*)
5077145b7b3cSmrg	# Kuck and Associates, Inc. (KAI) C++ Compiler
5078145b7b3cSmrg
5079145b7b3cSmrg	# KCC will only create a shared library if the output file
5080145b7b3cSmrg	# ends with ".so" (or ".sl" for HP-UX), so rename the library
5081145b7b3cSmrg	# to its proper name (with version) after linking.
5082145b7b3cSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
5083145b7b3cSmrg
5084145b7b3cSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5085145b7b3cSmrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5086145b7b3cSmrg
5087145b7b3cSmrg	# Archives containing C++ object files must be created using
5088145b7b3cSmrg	# the KAI C++ compiler.
5089145b7b3cSmrg	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
5090145b7b3cSmrg	;;
5091145b7b3cSmrg      RCC*)
5092145b7b3cSmrg	# Rational C++ 2.4.1
5093145b7b3cSmrg	# FIXME: insert proper C++ library support
5094145b7b3cSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5095145b7b3cSmrg	;;
5096145b7b3cSmrg      cxx*)
5097145b7b3cSmrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5098145b7b3cSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
5099145b7b3cSmrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
5100145b7b3cSmrg	  echo "-hidden">> $lib.exp~
5101145b7b3cSmrg	  $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~
5102145b7b3cSmrg	  $rm $lib.exp'
5103145b7b3cSmrg
5104145b7b3cSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
5105145b7b3cSmrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5106145b7b3cSmrg
5107145b7b3cSmrg	# Commands to make compiler produce verbose output that lists
5108145b7b3cSmrg	# what "hidden" libraries, object files and flags are used when
5109145b7b3cSmrg	# linking a shared library.
5110145b7b3cSmrg	#
5111145b7b3cSmrg	# There doesn't appear to be a way to prevent this compiler from
5112145b7b3cSmrg	# explicitly linking system object files so we need to strip them
5113145b7b3cSmrg	# from the output so that they don't get included in the library
5114145b7b3cSmrg	# dependencies.
5115145b7b3cSmrg	output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
5116145b7b3cSmrg	;;
5117145b7b3cSmrg      *)
5118145b7b3cSmrg	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
5119145b7b3cSmrg	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
5120145b7b3cSmrg	 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
5121145b7b3cSmrg
5122145b7b3cSmrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5123145b7b3cSmrg	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5124145b7b3cSmrg
5125145b7b3cSmrg	  # Commands to make compiler produce verbose output that lists
5126145b7b3cSmrg	  # what "hidden" libraries, object files and flags are used when
5127145b7b3cSmrg	  # linking a shared library.
5128145b7b3cSmrg	  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
5129145b7b3cSmrg
5130145b7b3cSmrg	else
5131145b7b3cSmrg	  # FIXME: insert proper C++ library support
5132145b7b3cSmrg	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
5133145b7b3cSmrg	fi
5134145b7b3cSmrg	;;
5135145b7b3cSmrg    esac
5136145b7b3cSmrg    ;;
5137145b7b3cSmrg  psos*)
5138145b7b3cSmrg    # FIXME: insert proper C++ library support
5139145b7b3cSmrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
5140145b7b3cSmrg    ;;
5141145b7b3cSmrg  sunos4*)
5142145b7b3cSmrg    case $cc_basename in
5143145b7b3cSmrg      CC*)
5144145b7b3cSmrg	# Sun C++ 4.x
5145145b7b3cSmrg	# FIXME: insert proper C++ library support
5146145b7b3cSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5147145b7b3cSmrg	;;
5148145b7b3cSmrg      lcc*)
5149145b7b3cSmrg	# Lucid
5150145b7b3cSmrg	# FIXME: insert proper C++ library support
5151145b7b3cSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5152145b7b3cSmrg	;;
5153145b7b3cSmrg      *)
5154145b7b3cSmrg	# FIXME: insert proper C++ library support
5155145b7b3cSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5156145b7b3cSmrg	;;
5157145b7b3cSmrg    esac
5158145b7b3cSmrg    ;;
5159145b7b3cSmrg  solaris*)
5160145b7b3cSmrg    case $cc_basename in
5161145b7b3cSmrg      CC*)
5162145b7b3cSmrg	# Sun C++ 4.2, 5.x and Centerline C++
5163145b7b3cSmrg        _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes
5164145b7b3cSmrg	_LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
5165145b7b3cSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
5166145b7b3cSmrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5167145b7b3cSmrg	$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'
5168145b7b3cSmrg
5169145b7b3cSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5170145b7b3cSmrg	_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5171145b7b3cSmrg	case $host_os in
5172145b7b3cSmrg	  solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
5173145b7b3cSmrg	  *)
5174145b7b3cSmrg	    # The C++ compiler is used as linker so we must use $wl
5175145b7b3cSmrg	    # flag to pass the commands to the underlying system
5176145b7b3cSmrg	    # linker. We must also pass each convience library through
5177145b7b3cSmrg	    # to the system linker between allextract/defaultextract.
5178145b7b3cSmrg	    # The C++ compiler will combine linker options so we
5179145b7b3cSmrg	    # cannot just pass the convience library names through
5180145b7b3cSmrg	    # without $wl.
5181145b7b3cSmrg	    # Supported since Solaris 2.6 (maybe 2.5.1?)
5182145b7b3cSmrg	    _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract'
5183145b7b3cSmrg	    ;;
5184145b7b3cSmrg	esac
5185145b7b3cSmrg	_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
5186145b7b3cSmrg
5187145b7b3cSmrg	output_verbose_link_cmd='echo'
5188145b7b3cSmrg
5189145b7b3cSmrg	# Archives containing C++ object files must be created using
5190145b7b3cSmrg	# "CC -xar", where "CC" is the Sun C++ compiler.  This is
5191145b7b3cSmrg	# necessary to make sure instantiated templates are included
5192145b7b3cSmrg	# in the archive.
5193145b7b3cSmrg	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
5194145b7b3cSmrg	;;
5195145b7b3cSmrg      gcx*)
5196145b7b3cSmrg	# Green Hills C++ Compiler
5197145b7b3cSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
5198145b7b3cSmrg
5199145b7b3cSmrg	# The C++ compiler must be used to create the archive.
5200145b7b3cSmrg	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
5201145b7b3cSmrg	;;
5202145b7b3cSmrg      *)
5203145b7b3cSmrg	# GNU C++ compiler with Solaris linker
5204145b7b3cSmrg	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
5205145b7b3cSmrg	  _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
5206145b7b3cSmrg	  if $CC --version | grep -v '^2\.7' > /dev/null; then
5207145b7b3cSmrg	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
5208145b7b3cSmrg	    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5209145b7b3cSmrg		$CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
5210145b7b3cSmrg
5211145b7b3cSmrg	    # Commands to make compiler produce verbose output that lists
5212145b7b3cSmrg	    # what "hidden" libraries, object files and flags are used when
5213145b7b3cSmrg	    # linking a shared library.
5214145b7b3cSmrg	    output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
5215145b7b3cSmrg	  else
5216145b7b3cSmrg	    # g++ 2.7 appears to require `-G' NOT `-shared' on this
5217145b7b3cSmrg	    # platform.
5218145b7b3cSmrg	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
5219145b7b3cSmrg	    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5220145b7b3cSmrg		$CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
5221145b7b3cSmrg
5222145b7b3cSmrg	    # Commands to make compiler produce verbose output that lists
5223145b7b3cSmrg	    # what "hidden" libraries, object files and flags are used when
5224145b7b3cSmrg	    # linking a shared library.
5225145b7b3cSmrg	    output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
5226145b7b3cSmrg	  fi
5227145b7b3cSmrg
5228145b7b3cSmrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
5229145b7b3cSmrg	fi
5230145b7b3cSmrg	;;
5231145b7b3cSmrg    esac
5232145b7b3cSmrg    ;;
5233145b7b3cSmrg  sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
5234145b7b3cSmrg    _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
5235145b7b3cSmrg    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
5236145b7b3cSmrg    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5237145b7b3cSmrg    runpath_var='LD_RUN_PATH'
5238145b7b3cSmrg
5239145b7b3cSmrg    case $cc_basename in
5240145b7b3cSmrg      CC*)
5241145b7b3cSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5242145b7b3cSmrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5243145b7b3cSmrg	;;
5244145b7b3cSmrg      *)
5245145b7b3cSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5246145b7b3cSmrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5247145b7b3cSmrg	;;
5248145b7b3cSmrg    esac
5249145b7b3cSmrg    ;;
5250145b7b3cSmrg  sysv5* | sco3.2v5* | sco5v6*)
5251145b7b3cSmrg    # Note: We can NOT use -z defs as we might desire, because we do not
5252145b7b3cSmrg    # link with -lc, and that would cause any symbols used from libc to
5253145b7b3cSmrg    # always be unresolved, which means just about no library would
5254145b7b3cSmrg    # ever link correctly.  If we're not using GNU ld we use -z text
5255145b7b3cSmrg    # though, which does catch some bad symbols but isn't as heavy-handed
5256145b7b3cSmrg    # as -z defs.
5257145b7b3cSmrg    # For security reasons, it is highly recommended that you always
5258145b7b3cSmrg    # use absolute paths for naming shared libraries, and exclude the
5259145b7b3cSmrg    # DT_RUNPATH tag from executables and libraries.  But doing so
5260145b7b3cSmrg    # requires that you compile everything twice, which is a pain.
5261145b7b3cSmrg    # So that behaviour is only enabled if SCOABSPATH is set to a
5262145b7b3cSmrg    # non-empty value in the environment.  Most likely only useful for
5263145b7b3cSmrg    # creating official distributions of packages.
5264145b7b3cSmrg    # This is a hack until libtool officially supports absolute path
5265145b7b3cSmrg    # names for shared libraries.
5266145b7b3cSmrg    _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
5267145b7b3cSmrg    _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
5268145b7b3cSmrg    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
5269145b7b3cSmrg    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5270145b7b3cSmrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
5271145b7b3cSmrg    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
5272145b7b3cSmrg    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
5273145b7b3cSmrg    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
5274145b7b3cSmrg    runpath_var='LD_RUN_PATH'
5275145b7b3cSmrg
5276145b7b3cSmrg    case $cc_basename in
5277145b7b3cSmrg      CC*)
5278145b7b3cSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
5279145b7b3cSmrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
5280145b7b3cSmrg	;;
5281145b7b3cSmrg      *)
5282145b7b3cSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
5283145b7b3cSmrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
5284145b7b3cSmrg	;;
5285145b7b3cSmrg    esac
5286145b7b3cSmrg    ;;
5287145b7b3cSmrg  tandem*)
5288145b7b3cSmrg    case $cc_basename in
5289145b7b3cSmrg      NCC*)
5290145b7b3cSmrg	# NonStop-UX NCC 3.20
5291145b7b3cSmrg	# FIXME: insert proper C++ library support
5292145b7b3cSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5293145b7b3cSmrg	;;
5294145b7b3cSmrg      *)
5295145b7b3cSmrg	# FIXME: insert proper C++ library support
5296145b7b3cSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5297145b7b3cSmrg	;;
5298145b7b3cSmrg    esac
5299145b7b3cSmrg    ;;
5300145b7b3cSmrg  vxworks*)
5301145b7b3cSmrg    # FIXME: insert proper C++ library support
5302145b7b3cSmrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
5303145b7b3cSmrg    ;;
5304145b7b3cSmrg  *)
5305145b7b3cSmrg    # FIXME: insert proper C++ library support
5306145b7b3cSmrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
5307145b7b3cSmrg    ;;
5308145b7b3cSmrgesac
5309145b7b3cSmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
5310145b7b3cSmrgtest "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
5311145b7b3cSmrg
5312145b7b3cSmrg_LT_AC_TAGVAR(GCC, $1)="$GXX"
5313145b7b3cSmrg_LT_AC_TAGVAR(LD, $1)="$LD"
5314145b7b3cSmrg
5315145b7b3cSmrgAC_LIBTOOL_POSTDEP_PREDEP($1)
5316145b7b3cSmrgAC_LIBTOOL_PROG_COMPILER_PIC($1)
5317145b7b3cSmrgAC_LIBTOOL_PROG_CC_C_O($1)
5318145b7b3cSmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
5319145b7b3cSmrgAC_LIBTOOL_PROG_LD_SHLIBS($1)
5320145b7b3cSmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
5321145b7b3cSmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
5322145b7b3cSmrg
5323145b7b3cSmrgAC_LIBTOOL_CONFIG($1)
5324145b7b3cSmrg
5325145b7b3cSmrgAC_LANG_POP
5326145b7b3cSmrgCC=$lt_save_CC
5327145b7b3cSmrgLDCXX=$LD
5328145b7b3cSmrgLD=$lt_save_LD
5329145b7b3cSmrgGCC=$lt_save_GCC
5330145b7b3cSmrgwith_gnu_ldcxx=$with_gnu_ld
5331145b7b3cSmrgwith_gnu_ld=$lt_save_with_gnu_ld
5332145b7b3cSmrglt_cv_path_LDCXX=$lt_cv_path_LD
5333145b7b3cSmrglt_cv_path_LD=$lt_save_path_LD
5334145b7b3cSmrglt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
5335145b7b3cSmrglt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
5336145b7b3cSmrg])# AC_LIBTOOL_LANG_CXX_CONFIG
5337145b7b3cSmrg
5338145b7b3cSmrg# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
5339145b7b3cSmrg# ------------------------------------
5340145b7b3cSmrg# Figure out "hidden" library dependencies from verbose
5341145b7b3cSmrg# compiler output when linking a shared library.
5342145b7b3cSmrg# Parse the compiler output and extract the necessary
5343145b7b3cSmrg# objects, libraries and library flags.
5344145b7b3cSmrgAC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[
5345145b7b3cSmrgdnl we can't use the lt_simple_compile_test_code here,
5346145b7b3cSmrgdnl because it contains code intended for an executable,
5347145b7b3cSmrgdnl not a library.  It's possible we should let each
5348145b7b3cSmrgdnl tag define a new lt_????_link_test_code variable,
5349145b7b3cSmrgdnl but it's only used here...
5350145b7b3cSmrgifelse([$1],[],[cat > conftest.$ac_ext <<EOF
5351145b7b3cSmrgint a;
5352145b7b3cSmrgvoid foo (void) { a = 0; }
5353145b7b3cSmrgEOF
5354145b7b3cSmrg],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
5355145b7b3cSmrgclass Foo
5356145b7b3cSmrg{
5357145b7b3cSmrgpublic:
5358145b7b3cSmrg  Foo (void) { a = 0; }
5359145b7b3cSmrgprivate:
5360145b7b3cSmrg  int a;
5361145b7b3cSmrg};
5362145b7b3cSmrgEOF
5363145b7b3cSmrg],[$1],[F77],[cat > conftest.$ac_ext <<EOF
5364145b7b3cSmrg      subroutine foo
5365145b7b3cSmrg      implicit none
5366145b7b3cSmrg      integer*4 a
5367145b7b3cSmrg      a=0
5368145b7b3cSmrg      return
5369145b7b3cSmrg      end
5370145b7b3cSmrgEOF
5371145b7b3cSmrg],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
5372145b7b3cSmrgpublic class foo {
5373145b7b3cSmrg  private int a;
5374145b7b3cSmrg  public void bar (void) {
5375145b7b3cSmrg    a = 0;
5376145b7b3cSmrg  }
5377145b7b3cSmrg};
5378145b7b3cSmrgEOF
5379145b7b3cSmrg])
5380145b7b3cSmrgdnl Parse the compiler output and extract the necessary
5381145b7b3cSmrgdnl objects, libraries and library flags.
5382145b7b3cSmrgif AC_TRY_EVAL(ac_compile); then
5383145b7b3cSmrg  # Parse the compiler output and extract the necessary
5384145b7b3cSmrg  # objects, libraries and library flags.
5385145b7b3cSmrg
5386145b7b3cSmrg  # Sentinel used to keep track of whether or not we are before
5387145b7b3cSmrg  # the conftest object file.
5388145b7b3cSmrg  pre_test_object_deps_done=no
5389145b7b3cSmrg
5390145b7b3cSmrg  # The `*' in the case matches for architectures that use `case' in
5391145b7b3cSmrg  # $output_verbose_cmd can trigger glob expansion during the loop
5392145b7b3cSmrg  # eval without this substitution.
5393145b7b3cSmrg  output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"`
5394145b7b3cSmrg
5395145b7b3cSmrg  for p in `eval $output_verbose_link_cmd`; do
5396145b7b3cSmrg    case $p in
5397145b7b3cSmrg
5398145b7b3cSmrg    -L* | -R* | -l*)
5399145b7b3cSmrg       # Some compilers place space between "-{L,R}" and the path.
5400145b7b3cSmrg       # Remove the space.
5401145b7b3cSmrg       if test $p = "-L" \
5402145b7b3cSmrg	  || test $p = "-R"; then
5403145b7b3cSmrg	 prev=$p
5404145b7b3cSmrg	 continue
5405145b7b3cSmrg       else
5406145b7b3cSmrg	 prev=
5407145b7b3cSmrg       fi
5408145b7b3cSmrg
5409145b7b3cSmrg       if test "$pre_test_object_deps_done" = no; then
5410145b7b3cSmrg	 case $p in
5411145b7b3cSmrg	 -L* | -R*)
5412145b7b3cSmrg	   # Internal compiler library paths should come after those
5413145b7b3cSmrg	   # provided the user.  The postdeps already come after the
5414145b7b3cSmrg	   # user supplied libs so there is no need to process them.
5415145b7b3cSmrg	   if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
5416145b7b3cSmrg	     _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
5417145b7b3cSmrg	   else
5418145b7b3cSmrg	     _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
5419145b7b3cSmrg	   fi
5420145b7b3cSmrg	   ;;
5421145b7b3cSmrg	 # The "-l" case would never come before the object being
5422145b7b3cSmrg	 # linked, so don't bother handling this case.
5423145b7b3cSmrg	 esac
5424145b7b3cSmrg       else
5425145b7b3cSmrg	 if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
5426145b7b3cSmrg	   _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
5427145b7b3cSmrg	 else
5428145b7b3cSmrg	   _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
5429145b7b3cSmrg	 fi
5430145b7b3cSmrg       fi
5431145b7b3cSmrg       ;;
5432145b7b3cSmrg
5433145b7b3cSmrg    *.$objext)
5434145b7b3cSmrg       # This assumes that the test object file only shows up
5435145b7b3cSmrg       # once in the compiler output.
5436145b7b3cSmrg       if test "$p" = "conftest.$objext"; then
5437145b7b3cSmrg	 pre_test_object_deps_done=yes
5438145b7b3cSmrg	 continue
5439145b7b3cSmrg       fi
5440145b7b3cSmrg
5441145b7b3cSmrg       if test "$pre_test_object_deps_done" = no; then
5442145b7b3cSmrg	 if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
5443145b7b3cSmrg	   _LT_AC_TAGVAR(predep_objects, $1)="$p"
5444145b7b3cSmrg	 else
5445145b7b3cSmrg	   _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
5446145b7b3cSmrg	 fi
5447145b7b3cSmrg       else
5448145b7b3cSmrg	 if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
5449145b7b3cSmrg	   _LT_AC_TAGVAR(postdep_objects, $1)="$p"
5450145b7b3cSmrg	 else
5451145b7b3cSmrg	   _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
5452145b7b3cSmrg	 fi
5453145b7b3cSmrg       fi
5454145b7b3cSmrg       ;;
5455145b7b3cSmrg
5456145b7b3cSmrg    *) ;; # Ignore the rest.
5457145b7b3cSmrg
5458145b7b3cSmrg    esac
5459145b7b3cSmrg  done
5460145b7b3cSmrg
5461145b7b3cSmrg  # Clean up.
5462145b7b3cSmrg  rm -f a.out a.exe
5463145b7b3cSmrgelse
5464145b7b3cSmrg  echo "libtool.m4: error: problem compiling $1 test program"
5465145b7b3cSmrgfi
5466145b7b3cSmrg
5467145b7b3cSmrg$rm -f confest.$objext
5468145b7b3cSmrg
5469145b7b3cSmrg# PORTME: override above test on systems where it is broken
5470145b7b3cSmrgifelse([$1],[CXX],
5471145b7b3cSmrg[case $host_os in
5472145b7b3cSmrginterix3*)
5473145b7b3cSmrg  # Interix 3.5 installs completely hosed .la files for C++, so rather than
5474145b7b3cSmrg  # hack all around it, let's just trust "g++" to DTRT.
5475145b7b3cSmrg  _LT_AC_TAGVAR(predep_objects,$1)=
5476145b7b3cSmrg  _LT_AC_TAGVAR(postdep_objects,$1)=
5477145b7b3cSmrg  _LT_AC_TAGVAR(postdeps,$1)=
5478145b7b3cSmrg  ;;
5479145b7b3cSmrg
5480145b7b3cSmrgsolaris*)
5481145b7b3cSmrg  case $cc_basename in
5482145b7b3cSmrg  CC*)
5483145b7b3cSmrg    # Adding this requires a known-good setup of shared libraries for
5484145b7b3cSmrg    # Sun compiler versions before 5.6, else PIC objects from an old
5485145b7b3cSmrg    # archive will be linked into the output, leading to subtle bugs.
5486145b7b3cSmrg    _LT_AC_TAGVAR(postdeps,$1)='-lCstd -lCrun'
5487145b7b3cSmrg    ;;
5488145b7b3cSmrg  esac
5489145b7b3cSmrg  ;;
5490145b7b3cSmrgesac
5491145b7b3cSmrg])
5492145b7b3cSmrg
5493145b7b3cSmrgcase " $_LT_AC_TAGVAR(postdeps, $1) " in
5494145b7b3cSmrg*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
5495145b7b3cSmrgesac
5496145b7b3cSmrg])# AC_LIBTOOL_POSTDEP_PREDEP
5497145b7b3cSmrg
5498145b7b3cSmrg# AC_LIBTOOL_LANG_F77_CONFIG
5499145b7b3cSmrg# --------------------------
5500145b7b3cSmrg# Ensure that the configuration vars for the C compiler are
5501145b7b3cSmrg# suitably defined.  Those variables are subsequently used by
5502145b7b3cSmrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
5503145b7b3cSmrgAC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
5504145b7b3cSmrgAC_DEFUN([_LT_AC_LANG_F77_CONFIG],
5505145b7b3cSmrg[AC_REQUIRE([AC_PROG_F77])
5506145b7b3cSmrgAC_LANG_PUSH(Fortran 77)
5507145b7b3cSmrg
5508145b7b3cSmrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
5509145b7b3cSmrg_LT_AC_TAGVAR(allow_undefined_flag, $1)=
5510145b7b3cSmrg_LT_AC_TAGVAR(always_export_symbols, $1)=no
5511145b7b3cSmrg_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
5512145b7b3cSmrg_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
5513145b7b3cSmrg_LT_AC_TAGVAR(hardcode_direct, $1)=no
5514145b7b3cSmrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
5515145b7b3cSmrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
5516145b7b3cSmrg_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
5517145b7b3cSmrg_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
5518145b7b3cSmrg_LT_AC_TAGVAR(hardcode_automatic, $1)=no
5519145b7b3cSmrg_LT_AC_TAGVAR(module_cmds, $1)=
5520145b7b3cSmrg_LT_AC_TAGVAR(module_expsym_cmds, $1)=
5521145b7b3cSmrg_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
5522145b7b3cSmrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
5523145b7b3cSmrg_LT_AC_TAGVAR(no_undefined_flag, $1)=
5524145b7b3cSmrg_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5525145b7b3cSmrg_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5526145b7b3cSmrg
5527145b7b3cSmrg# Source file extension for f77 test sources.
5528145b7b3cSmrgac_ext=f
5529145b7b3cSmrg
5530145b7b3cSmrg# Object file extension for compiled f77 test sources.
5531145b7b3cSmrgobjext=o
5532145b7b3cSmrg_LT_AC_TAGVAR(objext, $1)=$objext
5533145b7b3cSmrg
5534145b7b3cSmrg# Code to be used in simple compile tests
5535145b7b3cSmrglt_simple_compile_test_code="      subroutine t\n      return\n      end\n"
5536145b7b3cSmrg
5537145b7b3cSmrg# Code to be used in simple link tests
5538145b7b3cSmrglt_simple_link_test_code="      program t\n      end\n"
5539145b7b3cSmrg
5540145b7b3cSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
5541145b7b3cSmrg_LT_AC_SYS_COMPILER
5542145b7b3cSmrg
5543145b7b3cSmrg# save warnings/boilerplate of simple test code
5544145b7b3cSmrg_LT_COMPILER_BOILERPLATE
5545145b7b3cSmrg_LT_LINKER_BOILERPLATE
5546145b7b3cSmrg
5547145b7b3cSmrg# Allow CC to be a program name with arguments.
5548145b7b3cSmrglt_save_CC="$CC"
5549145b7b3cSmrgCC=${F77-"f77"}
5550145b7b3cSmrgcompiler=$CC
5551145b7b3cSmrg_LT_AC_TAGVAR(compiler, $1)=$CC
5552145b7b3cSmrg_LT_CC_BASENAME([$compiler])
5553145b7b3cSmrg
5554145b7b3cSmrgAC_MSG_CHECKING([if libtool supports shared libraries])
5555145b7b3cSmrgAC_MSG_RESULT([$can_build_shared])
5556145b7b3cSmrg
5557145b7b3cSmrgAC_MSG_CHECKING([whether to build shared libraries])
5558145b7b3cSmrgtest "$can_build_shared" = "no" && enable_shared=no
5559145b7b3cSmrg
5560145b7b3cSmrg# On AIX, shared libraries and static libraries use the same namespace, and
5561145b7b3cSmrg# are all built from PIC.
5562145b7b3cSmrgcase $host_os in
5563145b7b3cSmrgaix3*)
5564145b7b3cSmrg  test "$enable_shared" = yes && enable_static=no
5565145b7b3cSmrg  if test -n "$RANLIB"; then
5566145b7b3cSmrg    archive_cmds="$archive_cmds~\$RANLIB \$lib"
5567145b7b3cSmrg    postinstall_cmds='$RANLIB $lib'
5568145b7b3cSmrg  fi
5569145b7b3cSmrg  ;;
5570145b7b3cSmrgaix4* | aix5*)
5571145b7b3cSmrg  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
5572145b7b3cSmrg    test "$enable_shared" = yes && enable_static=no
5573145b7b3cSmrg  fi
5574145b7b3cSmrg  ;;
5575145b7b3cSmrgesac
5576145b7b3cSmrgAC_MSG_RESULT([$enable_shared])
5577145b7b3cSmrg
5578145b7b3cSmrgAC_MSG_CHECKING([whether to build static libraries])
5579145b7b3cSmrg# Make sure either enable_shared or enable_static is yes.
5580145b7b3cSmrgtest "$enable_shared" = yes || enable_static=yes
5581145b7b3cSmrgAC_MSG_RESULT([$enable_static])
5582145b7b3cSmrg
5583145b7b3cSmrg_LT_AC_TAGVAR(GCC, $1)="$G77"
5584145b7b3cSmrg_LT_AC_TAGVAR(LD, $1)="$LD"
5585145b7b3cSmrg
5586145b7b3cSmrgAC_LIBTOOL_PROG_COMPILER_PIC($1)
5587145b7b3cSmrgAC_LIBTOOL_PROG_CC_C_O($1)
5588145b7b3cSmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
5589145b7b3cSmrgAC_LIBTOOL_PROG_LD_SHLIBS($1)
5590145b7b3cSmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
5591145b7b3cSmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
5592145b7b3cSmrg
5593145b7b3cSmrgAC_LIBTOOL_CONFIG($1)
5594145b7b3cSmrg
5595145b7b3cSmrgAC_LANG_POP
5596145b7b3cSmrgCC="$lt_save_CC"
5597145b7b3cSmrg])# AC_LIBTOOL_LANG_F77_CONFIG
5598145b7b3cSmrg
5599145b7b3cSmrg
5600145b7b3cSmrg# AC_LIBTOOL_LANG_GCJ_CONFIG
5601145b7b3cSmrg# --------------------------
5602145b7b3cSmrg# Ensure that the configuration vars for the C compiler are
5603145b7b3cSmrg# suitably defined.  Those variables are subsequently used by
5604145b7b3cSmrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
5605145b7b3cSmrgAC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
5606145b7b3cSmrgAC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
5607145b7b3cSmrg[AC_LANG_SAVE
5608145b7b3cSmrg
5609145b7b3cSmrg# Source file extension for Java test sources.
5610145b7b3cSmrgac_ext=java
5611145b7b3cSmrg
5612145b7b3cSmrg# Object file extension for compiled Java test sources.
5613145b7b3cSmrgobjext=o
5614145b7b3cSmrg_LT_AC_TAGVAR(objext, $1)=$objext
5615145b7b3cSmrg
5616145b7b3cSmrg# Code to be used in simple compile tests
5617145b7b3cSmrglt_simple_compile_test_code="class foo {}\n"
5618145b7b3cSmrg
5619145b7b3cSmrg# Code to be used in simple link tests
5620145b7b3cSmrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }\n'
5621145b7b3cSmrg
5622145b7b3cSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
5623145b7b3cSmrg_LT_AC_SYS_COMPILER
5624145b7b3cSmrg
5625145b7b3cSmrg# save warnings/boilerplate of simple test code
5626145b7b3cSmrg_LT_COMPILER_BOILERPLATE
5627145b7b3cSmrg_LT_LINKER_BOILERPLATE
5628145b7b3cSmrg
5629145b7b3cSmrg# Allow CC to be a program name with arguments.
5630145b7b3cSmrglt_save_CC="$CC"
5631145b7b3cSmrgCC=${GCJ-"gcj"}
5632145b7b3cSmrgcompiler=$CC
5633145b7b3cSmrg_LT_AC_TAGVAR(compiler, $1)=$CC
5634145b7b3cSmrg_LT_CC_BASENAME([$compiler])
5635145b7b3cSmrg
5636145b7b3cSmrg# GCJ did not exist at the time GCC didn't implicitly link libc in.
5637145b7b3cSmrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
5638145b7b3cSmrg
5639145b7b3cSmrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
5640145b7b3cSmrg
5641145b7b3cSmrgAC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
5642145b7b3cSmrgAC_LIBTOOL_PROG_COMPILER_PIC($1)
5643145b7b3cSmrgAC_LIBTOOL_PROG_CC_C_O($1)
5644145b7b3cSmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
5645145b7b3cSmrgAC_LIBTOOL_PROG_LD_SHLIBS($1)
5646145b7b3cSmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
5647145b7b3cSmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
5648145b7b3cSmrg
5649145b7b3cSmrgAC_LIBTOOL_CONFIG($1)
5650145b7b3cSmrg
5651145b7b3cSmrgAC_LANG_RESTORE
5652145b7b3cSmrgCC="$lt_save_CC"
5653145b7b3cSmrg])# AC_LIBTOOL_LANG_GCJ_CONFIG
5654145b7b3cSmrg
5655145b7b3cSmrg
5656145b7b3cSmrg# AC_LIBTOOL_LANG_RC_CONFIG
5657145b7b3cSmrg# -------------------------
5658145b7b3cSmrg# Ensure that the configuration vars for the Windows resource compiler are
5659145b7b3cSmrg# suitably defined.  Those variables are subsequently used by
5660145b7b3cSmrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
5661145b7b3cSmrgAC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
5662145b7b3cSmrgAC_DEFUN([_LT_AC_LANG_RC_CONFIG],
5663145b7b3cSmrg[AC_LANG_SAVE
5664145b7b3cSmrg
5665145b7b3cSmrg# Source file extension for RC test sources.
5666145b7b3cSmrgac_ext=rc
5667145b7b3cSmrg
5668145b7b3cSmrg# Object file extension for compiled RC test sources.
5669145b7b3cSmrgobjext=o
5670145b7b3cSmrg_LT_AC_TAGVAR(objext, $1)=$objext
5671145b7b3cSmrg
5672145b7b3cSmrg# Code to be used in simple compile tests
5673145b7b3cSmrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
5674145b7b3cSmrg
5675145b7b3cSmrg# Code to be used in simple link tests
5676145b7b3cSmrglt_simple_link_test_code="$lt_simple_compile_test_code"
5677145b7b3cSmrg
5678145b7b3cSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
5679145b7b3cSmrg_LT_AC_SYS_COMPILER
5680145b7b3cSmrg
5681145b7b3cSmrg# save warnings/boilerplate of simple test code
5682145b7b3cSmrg_LT_COMPILER_BOILERPLATE
5683145b7b3cSmrg_LT_LINKER_BOILERPLATE
5684145b7b3cSmrg
5685145b7b3cSmrg# Allow CC to be a program name with arguments.
5686145b7b3cSmrglt_save_CC="$CC"
5687145b7b3cSmrgCC=${RC-"windres"}
5688145b7b3cSmrgcompiler=$CC
5689145b7b3cSmrg_LT_AC_TAGVAR(compiler, $1)=$CC
5690145b7b3cSmrg_LT_CC_BASENAME([$compiler])
5691145b7b3cSmrg_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
5692145b7b3cSmrg
5693145b7b3cSmrgAC_LIBTOOL_CONFIG($1)
5694145b7b3cSmrg
5695145b7b3cSmrgAC_LANG_RESTORE
5696145b7b3cSmrgCC="$lt_save_CC"
5697145b7b3cSmrg])# AC_LIBTOOL_LANG_RC_CONFIG
5698145b7b3cSmrg
5699145b7b3cSmrg
5700145b7b3cSmrg# AC_LIBTOOL_CONFIG([TAGNAME])
5701145b7b3cSmrg# ----------------------------
5702145b7b3cSmrg# If TAGNAME is not passed, then create an initial libtool script
5703145b7b3cSmrg# with a default configuration from the untagged config vars.  Otherwise
5704145b7b3cSmrg# add code to config.status for appending the configuration named by
5705145b7b3cSmrg# TAGNAME from the matching tagged config vars.
5706145b7b3cSmrgAC_DEFUN([AC_LIBTOOL_CONFIG],
5707145b7b3cSmrg[# The else clause should only fire when bootstrapping the
5708145b7b3cSmrg# libtool distribution, otherwise you forgot to ship ltmain.sh
5709145b7b3cSmrg# with your package, and you will get complaints that there are
5710145b7b3cSmrg# no rules to generate ltmain.sh.
5711145b7b3cSmrgif test -f "$ltmain"; then
5712145b7b3cSmrg  # See if we are running on zsh, and set the options which allow our commands through
5713145b7b3cSmrg  # without removal of \ escapes.
5714145b7b3cSmrg  if test -n "${ZSH_VERSION+set}" ; then
5715145b7b3cSmrg    setopt NO_GLOB_SUBST
5716145b7b3cSmrg  fi
5717145b7b3cSmrg  # Now quote all the things that may contain metacharacters while being
5718145b7b3cSmrg  # careful not to overquote the AC_SUBSTed values.  We take copies of the
5719145b7b3cSmrg  # variables and quote the copies for generation of the libtool script.
5720145b7b3cSmrg  for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
5721145b7b3cSmrg    SED SHELL STRIP \
5722145b7b3cSmrg    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
5723145b7b3cSmrg    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
5724145b7b3cSmrg    deplibs_check_method reload_flag reload_cmds need_locks \
5725145b7b3cSmrg    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
5726145b7b3cSmrg    lt_cv_sys_global_symbol_to_c_name_address \
5727145b7b3cSmrg    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
5728145b7b3cSmrg    old_postinstall_cmds old_postuninstall_cmds \
5729145b7b3cSmrg    _LT_AC_TAGVAR(compiler, $1) \
5730145b7b3cSmrg    _LT_AC_TAGVAR(CC, $1) \
5731145b7b3cSmrg    _LT_AC_TAGVAR(LD, $1) \
5732145b7b3cSmrg    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
5733145b7b3cSmrg    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
5734145b7b3cSmrg    _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
5735145b7b3cSmrg    _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
5736145b7b3cSmrg    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
5737145b7b3cSmrg    _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
5738145b7b3cSmrg    _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
5739145b7b3cSmrg    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
5740145b7b3cSmrg    _LT_AC_TAGVAR(old_archive_cmds, $1) \
5741145b7b3cSmrg    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
5742145b7b3cSmrg    _LT_AC_TAGVAR(predep_objects, $1) \
5743145b7b3cSmrg    _LT_AC_TAGVAR(postdep_objects, $1) \
5744145b7b3cSmrg    _LT_AC_TAGVAR(predeps, $1) \
5745145b7b3cSmrg    _LT_AC_TAGVAR(postdeps, $1) \
5746145b7b3cSmrg    _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
5747145b7b3cSmrg    _LT_AC_TAGVAR(archive_cmds, $1) \
5748145b7b3cSmrg    _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
5749145b7b3cSmrg    _LT_AC_TAGVAR(postinstall_cmds, $1) \
5750145b7b3cSmrg    _LT_AC_TAGVAR(postuninstall_cmds, $1) \
5751145b7b3cSmrg    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
5752145b7b3cSmrg    _LT_AC_TAGVAR(allow_undefined_flag, $1) \
5753145b7b3cSmrg    _LT_AC_TAGVAR(no_undefined_flag, $1) \
5754145b7b3cSmrg    _LT_AC_TAGVAR(export_symbols_cmds, $1) \
5755145b7b3cSmrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
5756145b7b3cSmrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
5757145b7b3cSmrg    _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
5758145b7b3cSmrg    _LT_AC_TAGVAR(hardcode_automatic, $1) \
5759145b7b3cSmrg    _LT_AC_TAGVAR(module_cmds, $1) \
5760145b7b3cSmrg    _LT_AC_TAGVAR(module_expsym_cmds, $1) \
5761145b7b3cSmrg    _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
5762145b7b3cSmrg    _LT_AC_TAGVAR(exclude_expsyms, $1) \
5763145b7b3cSmrg    _LT_AC_TAGVAR(include_expsyms, $1); do
5764145b7b3cSmrg
5765145b7b3cSmrg    case $var in
5766145b7b3cSmrg    _LT_AC_TAGVAR(old_archive_cmds, $1) | \
5767145b7b3cSmrg    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
5768145b7b3cSmrg    _LT_AC_TAGVAR(archive_cmds, $1) | \
5769145b7b3cSmrg    _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
5770145b7b3cSmrg    _LT_AC_TAGVAR(module_cmds, $1) | \
5771145b7b3cSmrg    _LT_AC_TAGVAR(module_expsym_cmds, $1) | \
5772145b7b3cSmrg    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
5773145b7b3cSmrg    _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
5774145b7b3cSmrg    extract_expsyms_cmds | reload_cmds | finish_cmds | \
5775145b7b3cSmrg    postinstall_cmds | postuninstall_cmds | \
5776145b7b3cSmrg    old_postinstall_cmds | old_postuninstall_cmds | \
5777145b7b3cSmrg    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
5778145b7b3cSmrg      # Double-quote double-evaled strings.
5779145b7b3cSmrg      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
5780145b7b3cSmrg      ;;
5781145b7b3cSmrg    *)
5782145b7b3cSmrg      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
5783145b7b3cSmrg      ;;
5784145b7b3cSmrg    esac
5785145b7b3cSmrg  done
5786145b7b3cSmrg
5787145b7b3cSmrg  case $lt_echo in
5788145b7b3cSmrg  *'\[$]0 --fallback-echo"')
5789145b7b3cSmrg    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
5790145b7b3cSmrg    ;;
5791145b7b3cSmrg  esac
5792145b7b3cSmrg
5793145b7b3cSmrgifelse([$1], [],
5794145b7b3cSmrg  [cfgfile="${ofile}T"
5795145b7b3cSmrg  trap "$rm \"$cfgfile\"; exit 1" 1 2 15
5796145b7b3cSmrg  $rm -f "$cfgfile"
5797145b7b3cSmrg  AC_MSG_NOTICE([creating $ofile])],
5798145b7b3cSmrg  [cfgfile="$ofile"])
5799145b7b3cSmrg
5800145b7b3cSmrg  cat <<__EOF__ >> "$cfgfile"
5801145b7b3cSmrgifelse([$1], [],
5802145b7b3cSmrg[#! $SHELL
5803145b7b3cSmrg
5804145b7b3cSmrg# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
5805145b7b3cSmrg# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
5806145b7b3cSmrg# NOTE: Changes made to this file will be lost: look at ltmain.sh.
5807145b7b3cSmrg#
5808145b7b3cSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
5809145b7b3cSmrg# Free Software Foundation, Inc.
5810145b7b3cSmrg#
5811145b7b3cSmrg# This file is part of GNU Libtool:
5812145b7b3cSmrg# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
5813145b7b3cSmrg#
5814145b7b3cSmrg# This program is free software; you can redistribute it and/or modify
5815145b7b3cSmrg# it under the terms of the GNU General Public License as published by
5816145b7b3cSmrg# the Free Software Foundation; either version 2 of the License, or
5817145b7b3cSmrg# (at your option) any later version.
5818145b7b3cSmrg#
5819145b7b3cSmrg# This program is distributed in the hope that it will be useful, but
5820145b7b3cSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of
5821145b7b3cSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
5822145b7b3cSmrg# General Public License for more details.
5823145b7b3cSmrg#
5824145b7b3cSmrg# You should have received a copy of the GNU General Public License
5825145b7b3cSmrg# along with this program; if not, write to the Free Software
5826145b7b3cSmrg# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
5827145b7b3cSmrg#
5828145b7b3cSmrg# As a special exception to the GNU General Public License, if you
5829145b7b3cSmrg# distribute this file as part of a program that contains a
5830145b7b3cSmrg# configuration script generated by Autoconf, you may include it under
5831145b7b3cSmrg# the same distribution terms that you use for the rest of that program.
5832145b7b3cSmrg
5833145b7b3cSmrg# A sed program that does not truncate output.
5834145b7b3cSmrgSED=$lt_SED
5835145b7b3cSmrg
5836145b7b3cSmrg# Sed that helps us avoid accidentally triggering echo(1) options like -n.
5837145b7b3cSmrgXsed="$SED -e 1s/^X//"
5838145b7b3cSmrg
5839145b7b3cSmrg# The HP-UX ksh and POSIX shell print the target directory to stdout
5840145b7b3cSmrg# if CDPATH is set.
5841145b7b3cSmrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
5842145b7b3cSmrg
5843145b7b3cSmrg# The names of the tagged configurations supported by this script.
5844145b7b3cSmrgavailable_tags=
5845145b7b3cSmrg
5846145b7b3cSmrg# ### BEGIN LIBTOOL CONFIG],
5847145b7b3cSmrg[# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
5848145b7b3cSmrg
5849145b7b3cSmrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
5850145b7b3cSmrg
5851145b7b3cSmrg# Shell to use when invoking shell scripts.
5852145b7b3cSmrgSHELL=$lt_SHELL
5853145b7b3cSmrg
5854145b7b3cSmrg# Whether or not to build shared libraries.
5855145b7b3cSmrgbuild_libtool_libs=$enable_shared
5856145b7b3cSmrg
5857145b7b3cSmrg# Whether or not to build static libraries.
5858145b7b3cSmrgbuild_old_libs=$enable_static
5859145b7b3cSmrg
5860145b7b3cSmrg# Whether or not to add -lc for building shared libraries.
5861145b7b3cSmrgbuild_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
5862145b7b3cSmrg
5863145b7b3cSmrg# Whether or not to disallow shared libs when runtime libs are static
5864145b7b3cSmrgallow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
5865145b7b3cSmrg
5866145b7b3cSmrg# Whether or not to optimize for fast installation.
5867145b7b3cSmrgfast_install=$enable_fast_install
5868145b7b3cSmrg
5869145b7b3cSmrg# The host system.
5870145b7b3cSmrghost_alias=$host_alias
5871145b7b3cSmrghost=$host
5872145b7b3cSmrghost_os=$host_os
5873145b7b3cSmrg
5874145b7b3cSmrg# The build system.
5875145b7b3cSmrgbuild_alias=$build_alias
5876145b7b3cSmrgbuild=$build
5877145b7b3cSmrgbuild_os=$build_os
5878145b7b3cSmrg
5879145b7b3cSmrg# An echo program that does not interpret backslashes.
5880145b7b3cSmrgecho=$lt_echo
5881145b7b3cSmrg
5882145b7b3cSmrg# The archiver.
5883145b7b3cSmrgAR=$lt_AR
5884145b7b3cSmrgAR_FLAGS=$lt_AR_FLAGS
5885145b7b3cSmrg
5886145b7b3cSmrg# A C compiler.
5887145b7b3cSmrgLTCC=$lt_LTCC
5888145b7b3cSmrg
5889145b7b3cSmrg# LTCC compiler flags.
5890145b7b3cSmrgLTCFLAGS=$lt_LTCFLAGS
5891145b7b3cSmrg
5892145b7b3cSmrg# A language-specific compiler.
5893145b7b3cSmrgCC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
5894145b7b3cSmrg
5895145b7b3cSmrg# Is the compiler the GNU C compiler?
5896145b7b3cSmrgwith_gcc=$_LT_AC_TAGVAR(GCC, $1)
5897145b7b3cSmrg
5898145b7b3cSmrg# An ERE matcher.
5899145b7b3cSmrgEGREP=$lt_EGREP
5900145b7b3cSmrg
5901145b7b3cSmrg# The linker used to build libraries.
5902145b7b3cSmrgLD=$lt_[]_LT_AC_TAGVAR(LD, $1)
5903145b7b3cSmrg
5904145b7b3cSmrg# Whether we need hard or soft links.
5905145b7b3cSmrgLN_S=$lt_LN_S
5906145b7b3cSmrg
5907145b7b3cSmrg# A BSD-compatible nm program.
5908145b7b3cSmrgNM=$lt_NM
5909145b7b3cSmrg
5910145b7b3cSmrg# A symbol stripping program
5911145b7b3cSmrgSTRIP=$lt_STRIP
5912145b7b3cSmrg
5913145b7b3cSmrg# Used to examine libraries when file_magic_cmd begins "file"
5914145b7b3cSmrgMAGIC_CMD=$MAGIC_CMD
5915145b7b3cSmrg
5916145b7b3cSmrg# Used on cygwin: DLL creation program.
5917145b7b3cSmrgDLLTOOL="$DLLTOOL"
5918145b7b3cSmrg
5919145b7b3cSmrg# Used on cygwin: object dumper.
5920145b7b3cSmrgOBJDUMP="$OBJDUMP"
5921145b7b3cSmrg
5922145b7b3cSmrg# Used on cygwin: assembler.
5923145b7b3cSmrgAS="$AS"
5924145b7b3cSmrg
5925145b7b3cSmrg# The name of the directory that contains temporary libtool files.
5926145b7b3cSmrgobjdir=$objdir
5927145b7b3cSmrg
5928145b7b3cSmrg# How to create reloadable object files.
5929145b7b3cSmrgreload_flag=$lt_reload_flag
5930145b7b3cSmrgreload_cmds=$lt_reload_cmds
5931145b7b3cSmrg
5932145b7b3cSmrg# How to pass a linker flag through the compiler.
5933145b7b3cSmrgwl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
5934145b7b3cSmrg
5935145b7b3cSmrg# Object file suffix (normally "o").
5936145b7b3cSmrgobjext="$ac_objext"
5937145b7b3cSmrg
5938145b7b3cSmrg# Old archive suffix (normally "a").
5939145b7b3cSmrglibext="$libext"
5940145b7b3cSmrg
5941145b7b3cSmrg# Shared library suffix (normally ".so").
5942145b7b3cSmrgshrext_cmds='$shrext_cmds'
5943145b7b3cSmrg
5944145b7b3cSmrg# Executable file suffix (normally "").
5945145b7b3cSmrgexeext="$exeext"
5946145b7b3cSmrg
5947145b7b3cSmrg# Additional compiler flags for building library objects.
5948145b7b3cSmrgpic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
5949145b7b3cSmrgpic_mode=$pic_mode
5950145b7b3cSmrg
5951145b7b3cSmrg# What is the maximum length of a command?
5952145b7b3cSmrgmax_cmd_len=$lt_cv_sys_max_cmd_len
5953145b7b3cSmrg
5954145b7b3cSmrg# Does compiler simultaneously support -c and -o options?
5955145b7b3cSmrgcompiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
5956145b7b3cSmrg
5957145b7b3cSmrg# Must we lock files when doing compilation?
5958145b7b3cSmrgneed_locks=$lt_need_locks
5959145b7b3cSmrg
5960145b7b3cSmrg# Do we need the lib prefix for modules?
5961145b7b3cSmrgneed_lib_prefix=$need_lib_prefix
5962145b7b3cSmrg
5963145b7b3cSmrg# Do we need a version for libraries?
5964145b7b3cSmrgneed_version=$need_version
5965145b7b3cSmrg
5966145b7b3cSmrg# Whether dlopen is supported.
5967145b7b3cSmrgdlopen_support=$enable_dlopen
5968145b7b3cSmrg
5969145b7b3cSmrg# Whether dlopen of programs is supported.
5970145b7b3cSmrgdlopen_self=$enable_dlopen_self
5971145b7b3cSmrg
5972145b7b3cSmrg# Whether dlopen of statically linked programs is supported.
5973145b7b3cSmrgdlopen_self_static=$enable_dlopen_self_static
5974145b7b3cSmrg
5975145b7b3cSmrg# Compiler flag to prevent dynamic linking.
5976145b7b3cSmrglink_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
5977145b7b3cSmrg
5978145b7b3cSmrg# Compiler flag to turn off builtin functions.
5979145b7b3cSmrgno_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
5980145b7b3cSmrg
5981145b7b3cSmrg# Compiler flag to allow reflexive dlopens.
5982145b7b3cSmrgexport_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
5983145b7b3cSmrg
5984145b7b3cSmrg# Compiler flag to generate shared objects directly from archives.
5985145b7b3cSmrgwhole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
5986145b7b3cSmrg
5987145b7b3cSmrg# Compiler flag to generate thread-safe objects.
5988145b7b3cSmrgthread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
5989145b7b3cSmrg
5990145b7b3cSmrg# Library versioning type.
5991145b7b3cSmrgversion_type=$version_type
5992145b7b3cSmrg
5993145b7b3cSmrg# Format of library name prefix.
5994145b7b3cSmrglibname_spec=$lt_libname_spec
5995145b7b3cSmrg
5996145b7b3cSmrg# List of archive names.  First name is the real one, the rest are links.
5997145b7b3cSmrg# The last name is the one that the linker finds with -lNAME.
5998145b7b3cSmrglibrary_names_spec=$lt_library_names_spec
5999145b7b3cSmrg
6000145b7b3cSmrg# The coded name of the library, if different from the real name.
6001145b7b3cSmrgsoname_spec=$lt_soname_spec
6002145b7b3cSmrg
6003145b7b3cSmrg# Commands used to build and install an old-style archive.
6004145b7b3cSmrgRANLIB=$lt_RANLIB
6005145b7b3cSmrgold_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
6006145b7b3cSmrgold_postinstall_cmds=$lt_old_postinstall_cmds
6007145b7b3cSmrgold_postuninstall_cmds=$lt_old_postuninstall_cmds
6008145b7b3cSmrg
6009145b7b3cSmrg# Create an old-style archive from a shared archive.
6010145b7b3cSmrgold_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
6011145b7b3cSmrg
6012145b7b3cSmrg# Create a temporary old-style archive to link instead of a shared archive.
6013145b7b3cSmrgold_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
6014145b7b3cSmrg
6015145b7b3cSmrg# Commands used to build and install a shared archive.
6016145b7b3cSmrgarchive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
6017145b7b3cSmrgarchive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
6018145b7b3cSmrgpostinstall_cmds=$lt_postinstall_cmds
6019145b7b3cSmrgpostuninstall_cmds=$lt_postuninstall_cmds
6020145b7b3cSmrg
6021145b7b3cSmrg# Commands used to build a loadable module (assumed same as above if empty)
6022145b7b3cSmrgmodule_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
6023145b7b3cSmrgmodule_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
6024145b7b3cSmrg
6025145b7b3cSmrg# Commands to strip libraries.
6026145b7b3cSmrgold_striplib=$lt_old_striplib
6027145b7b3cSmrgstriplib=$lt_striplib
6028145b7b3cSmrg
6029145b7b3cSmrg# Dependencies to place before the objects being linked to create a
6030145b7b3cSmrg# shared library.
6031145b7b3cSmrgpredep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
6032145b7b3cSmrg
6033145b7b3cSmrg# Dependencies to place after the objects being linked to create a
6034145b7b3cSmrg# shared library.
6035145b7b3cSmrgpostdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
6036145b7b3cSmrg
6037145b7b3cSmrg# Dependencies to place before the objects being linked to create a
6038145b7b3cSmrg# shared library.
6039145b7b3cSmrgpredeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
6040145b7b3cSmrg
6041145b7b3cSmrg# Dependencies to place after the objects being linked to create a
6042145b7b3cSmrg# shared library.
6043145b7b3cSmrgpostdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
6044145b7b3cSmrg
6045145b7b3cSmrg# The library search path used internally by the compiler when linking
6046145b7b3cSmrg# a shared library.
6047145b7b3cSmrgcompiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
6048145b7b3cSmrg
6049145b7b3cSmrg# Method to check whether dependent libraries are shared objects.
6050145b7b3cSmrgdeplibs_check_method=$lt_deplibs_check_method
6051145b7b3cSmrg
6052145b7b3cSmrg# Command to use when deplibs_check_method == file_magic.
6053145b7b3cSmrgfile_magic_cmd=$lt_file_magic_cmd
6054145b7b3cSmrg
6055145b7b3cSmrg# Flag that allows shared libraries with undefined symbols to be built.
6056145b7b3cSmrgallow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
6057145b7b3cSmrg
6058145b7b3cSmrg# Flag that forces no undefined symbols.
6059145b7b3cSmrgno_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
6060145b7b3cSmrg
6061145b7b3cSmrg# Commands used to finish a libtool library installation in a directory.
6062145b7b3cSmrgfinish_cmds=$lt_finish_cmds
6063145b7b3cSmrg
6064145b7b3cSmrg# Same as above, but a single script fragment to be evaled but not shown.
6065145b7b3cSmrgfinish_eval=$lt_finish_eval
6066145b7b3cSmrg
6067145b7b3cSmrg# Take the output of nm and produce a listing of raw symbols and C names.
6068145b7b3cSmrgglobal_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
6069145b7b3cSmrg
6070145b7b3cSmrg# Transform the output of nm in a proper C declaration
6071145b7b3cSmrgglobal_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
6072145b7b3cSmrg
6073145b7b3cSmrg# Transform the output of nm in a C name address pair
6074145b7b3cSmrgglobal_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
6075145b7b3cSmrg
6076145b7b3cSmrg# This is the shared library runtime path variable.
6077145b7b3cSmrgrunpath_var=$runpath_var
6078145b7b3cSmrg
6079145b7b3cSmrg# This is the shared library path variable.
6080145b7b3cSmrgshlibpath_var=$shlibpath_var
6081145b7b3cSmrg
6082145b7b3cSmrg# Is shlibpath searched before the hard-coded library search path?
6083145b7b3cSmrgshlibpath_overrides_runpath=$shlibpath_overrides_runpath
6084145b7b3cSmrg
6085145b7b3cSmrg# How to hardcode a shared library path into an executable.
6086145b7b3cSmrghardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
6087145b7b3cSmrg
6088145b7b3cSmrg# Whether we should hardcode library paths into libraries.
6089145b7b3cSmrghardcode_into_libs=$hardcode_into_libs
6090145b7b3cSmrg
6091145b7b3cSmrg# Flag to hardcode \$libdir into a binary during linking.
6092145b7b3cSmrg# This must work even if \$libdir does not exist.
6093145b7b3cSmrghardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
6094145b7b3cSmrg
6095145b7b3cSmrg# If ld is used when linking, flag to hardcode \$libdir into
6096145b7b3cSmrg# a binary during linking. This must work even if \$libdir does
6097145b7b3cSmrg# not exist.
6098145b7b3cSmrghardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
6099145b7b3cSmrg
6100145b7b3cSmrg# Whether we need a single -rpath flag with a separated argument.
6101145b7b3cSmrghardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
6102145b7b3cSmrg
6103145b7b3cSmrg# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
6104145b7b3cSmrg# resulting binary.
6105145b7b3cSmrghardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
6106145b7b3cSmrg
6107145b7b3cSmrg# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
6108145b7b3cSmrg# resulting binary.
6109145b7b3cSmrghardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
6110145b7b3cSmrg
6111145b7b3cSmrg# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
6112145b7b3cSmrg# the resulting binary.
6113145b7b3cSmrghardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
6114145b7b3cSmrg
6115145b7b3cSmrg# Set to yes if building a shared library automatically hardcodes DIR into the library
6116145b7b3cSmrg# and all subsequent libraries and executables linked against it.
6117145b7b3cSmrghardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)
6118145b7b3cSmrg
6119145b7b3cSmrg# Variables whose values should be saved in libtool wrapper scripts and
6120145b7b3cSmrg# restored at relink time.
6121145b7b3cSmrgvariables_saved_for_relink="$variables_saved_for_relink"
6122145b7b3cSmrg
6123145b7b3cSmrg# Whether libtool must link a program against all its dependency libraries.
6124145b7b3cSmrglink_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
6125145b7b3cSmrg
6126145b7b3cSmrg# Compile-time system search path for libraries
6127145b7b3cSmrgsys_lib_search_path_spec=$lt_sys_lib_search_path_spec
6128145b7b3cSmrg
6129145b7b3cSmrg# Run-time system search path for libraries
6130145b7b3cSmrgsys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
6131145b7b3cSmrg
6132145b7b3cSmrg# Fix the shell variable \$srcfile for the compiler.
6133145b7b3cSmrgfix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)"
6134145b7b3cSmrg
6135145b7b3cSmrg# Set to yes if exported symbols are required.
6136145b7b3cSmrgalways_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
6137145b7b3cSmrg
6138145b7b3cSmrg# The commands to list exported symbols.
6139145b7b3cSmrgexport_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
6140145b7b3cSmrg
6141145b7b3cSmrg# The commands to extract the exported symbol list from a shared archive.
6142145b7b3cSmrgextract_expsyms_cmds=$lt_extract_expsyms_cmds
6143145b7b3cSmrg
6144145b7b3cSmrg# Symbols that should not be listed in the preloaded symbols.
6145145b7b3cSmrgexclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
6146145b7b3cSmrg
6147145b7b3cSmrg# Symbols that must always be exported.
6148145b7b3cSmrginclude_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
6149145b7b3cSmrg
6150145b7b3cSmrgifelse([$1],[],
6151145b7b3cSmrg[# ### END LIBTOOL CONFIG],
6152145b7b3cSmrg[# ### END LIBTOOL TAG CONFIG: $tagname])
6153145b7b3cSmrg
6154145b7b3cSmrg__EOF__
6155145b7b3cSmrg
6156145b7b3cSmrgifelse([$1],[], [
6157145b7b3cSmrg  case $host_os in
6158145b7b3cSmrg  aix3*)
6159145b7b3cSmrg    cat <<\EOF >> "$cfgfile"
6160145b7b3cSmrg
6161145b7b3cSmrg# AIX sometimes has problems with the GCC collect2 program.  For some
6162145b7b3cSmrg# reason, if we set the COLLECT_NAMES environment variable, the problems
6163145b7b3cSmrg# vanish in a puff of smoke.
6164145b7b3cSmrgif test "X${COLLECT_NAMES+set}" != Xset; then
6165145b7b3cSmrg  COLLECT_NAMES=
6166145b7b3cSmrg  export COLLECT_NAMES
6167145b7b3cSmrgfi
6168145b7b3cSmrgEOF
6169145b7b3cSmrg    ;;
6170145b7b3cSmrg  esac
6171145b7b3cSmrg
6172145b7b3cSmrg  # We use sed instead of cat because bash on DJGPP gets confused if
6173145b7b3cSmrg  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
6174145b7b3cSmrg  # text mode, it properly converts lines to CR/LF.  This bash problem
6175145b7b3cSmrg  # is reportedly fixed, but why not run on old versions too?
6176145b7b3cSmrg  sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
6177145b7b3cSmrg
6178145b7b3cSmrg  mv -f "$cfgfile" "$ofile" || \
6179145b7b3cSmrg    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
6180145b7b3cSmrg  chmod +x "$ofile"
6181145b7b3cSmrg])
6182145b7b3cSmrgelse
6183145b7b3cSmrg  # If there is no Makefile yet, we rely on a make rule to execute
6184145b7b3cSmrg  # `config.status --recheck' to rerun these tests and create the
6185145b7b3cSmrg  # libtool script then.
6186145b7b3cSmrg  ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
6187145b7b3cSmrg  if test -f "$ltmain_in"; then
6188145b7b3cSmrg    test -f Makefile && make "$ltmain"
6189145b7b3cSmrg  fi
6190145b7b3cSmrgfi
6191145b7b3cSmrg])# AC_LIBTOOL_CONFIG
6192145b7b3cSmrg
6193145b7b3cSmrg
6194145b7b3cSmrg# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
6195145b7b3cSmrg# -------------------------------------------
6196145b7b3cSmrgAC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
6197145b7b3cSmrg[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
6198145b7b3cSmrg
6199145b7b3cSmrg_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
6200145b7b3cSmrg
6201145b7b3cSmrgif test "$GCC" = yes; then
6202145b7b3cSmrg  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
6203145b7b3cSmrg
6204145b7b3cSmrg  AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
6205145b7b3cSmrg    lt_cv_prog_compiler_rtti_exceptions,
6206145b7b3cSmrg    [-fno-rtti -fno-exceptions], [],
6207145b7b3cSmrg    [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
6208145b7b3cSmrgfi
6209145b7b3cSmrg])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
6210145b7b3cSmrg
6211145b7b3cSmrg
6212145b7b3cSmrg# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
6213145b7b3cSmrg# ---------------------------------
6214145b7b3cSmrgAC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
6215145b7b3cSmrg[AC_REQUIRE([AC_CANONICAL_HOST])
6216145b7b3cSmrgAC_REQUIRE([AC_PROG_NM])
6217145b7b3cSmrgAC_REQUIRE([AC_OBJEXT])
6218145b7b3cSmrg# Check for command to grab the raw symbol name followed by C symbol from nm.
6219145b7b3cSmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object])
6220145b7b3cSmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
6221145b7b3cSmrg[
6222145b7b3cSmrg# These are sane defaults that work on at least a few old systems.
6223145b7b3cSmrg# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
6224145b7b3cSmrg
6225145b7b3cSmrg# Character class describing NM global symbol codes.
6226145b7b3cSmrgsymcode='[[BCDEGRST]]'
6227145b7b3cSmrg
6228145b7b3cSmrg# Regexp to match symbols that can be accessed directly from C.
6229145b7b3cSmrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
6230145b7b3cSmrg
6231145b7b3cSmrg# Transform an extracted symbol line into a proper C declaration
6232145b7b3cSmrglt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
6233145b7b3cSmrg
6234145b7b3cSmrg# Transform an extracted symbol line into symbol name and symbol address
6235145b7b3cSmrglt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
6236145b7b3cSmrg
6237145b7b3cSmrg# Define system-specific variables.
6238145b7b3cSmrgcase $host_os in
6239145b7b3cSmrgaix*)
6240145b7b3cSmrg  symcode='[[BCDT]]'
6241145b7b3cSmrg  ;;
6242145b7b3cSmrgcygwin* | mingw* | pw32*)
6243145b7b3cSmrg  symcode='[[ABCDGISTW]]'
6244145b7b3cSmrg  ;;
6245145b7b3cSmrghpux*) # Its linker distinguishes data from code symbols
6246145b7b3cSmrg  if test "$host_cpu" = ia64; then
6247145b7b3cSmrg    symcode='[[ABCDEGRST]]'
6248145b7b3cSmrg  fi
6249145b7b3cSmrg  lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
6250145b7b3cSmrg  lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
6251145b7b3cSmrg  ;;
6252145b7b3cSmrglinux*)
6253145b7b3cSmrg  if test "$host_cpu" = ia64; then
6254145b7b3cSmrg    symcode='[[ABCDGIRSTW]]'
6255145b7b3cSmrg    lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
6256145b7b3cSmrg    lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
6257145b7b3cSmrg  fi
6258145b7b3cSmrg  ;;
6259145b7b3cSmrgirix* | nonstopux*)
6260145b7b3cSmrg  symcode='[[BCDEGRST]]'
6261145b7b3cSmrg  ;;
6262145b7b3cSmrgosf*)
6263145b7b3cSmrg  symcode='[[BCDEGQRST]]'
6264145b7b3cSmrg  ;;
6265145b7b3cSmrgsolaris*)
6266145b7b3cSmrg  symcode='[[BDRT]]'
6267145b7b3cSmrg  ;;
6268145b7b3cSmrgsco3.2v5*)
6269145b7b3cSmrg  symcode='[[DT]]'
6270145b7b3cSmrg  ;;
6271145b7b3cSmrgsysv4.2uw2*)
6272145b7b3cSmrg  symcode='[[DT]]'
6273145b7b3cSmrg  ;;
6274145b7b3cSmrgsysv5* | sco5v6* | unixware* | OpenUNIX*)
6275145b7b3cSmrg  symcode='[[ABDT]]'
6276145b7b3cSmrg  ;;
6277145b7b3cSmrgsysv4)
6278145b7b3cSmrg  symcode='[[DFNSTU]]'
6279145b7b3cSmrg  ;;
6280145b7b3cSmrgesac
6281145b7b3cSmrg
6282145b7b3cSmrg# Handle CRLF in mingw tool chain
6283145b7b3cSmrgopt_cr=
6284145b7b3cSmrgcase $build_os in
6285145b7b3cSmrgmingw*)
6286145b7b3cSmrg  opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
6287145b7b3cSmrg  ;;
6288145b7b3cSmrgesac
6289145b7b3cSmrg
6290145b7b3cSmrg# If we're using GNU nm, then use its standard symbol codes.
6291145b7b3cSmrgcase `$NM -V 2>&1` in
6292145b7b3cSmrg*GNU* | *'with BFD'*)
6293145b7b3cSmrg  symcode='[[ABCDGIRSTW]]' ;;
6294145b7b3cSmrgesac
6295145b7b3cSmrg
6296145b7b3cSmrg# Try without a prefix undercore, then with it.
6297145b7b3cSmrgfor ac_symprfx in "" "_"; do
6298145b7b3cSmrg
6299145b7b3cSmrg  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
6300145b7b3cSmrg  symxfrm="\\1 $ac_symprfx\\2 \\2"
6301145b7b3cSmrg
6302145b7b3cSmrg  # Write the raw and C identifiers.
6303145b7b3cSmrg  lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ 	]]\($symcode$symcode*\)[[ 	]][[ 	]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
6304145b7b3cSmrg
6305145b7b3cSmrg  # Check to see that the pipe works correctly.
6306145b7b3cSmrg  pipe_works=no
6307145b7b3cSmrg
6308145b7b3cSmrg  rm -f conftest*
6309145b7b3cSmrg  cat > conftest.$ac_ext <<EOF
6310145b7b3cSmrg#ifdef __cplusplus
6311145b7b3cSmrgextern "C" {
6312145b7b3cSmrg#endif
6313145b7b3cSmrgchar nm_test_var;
6314145b7b3cSmrgvoid nm_test_func(){}
6315145b7b3cSmrg#ifdef __cplusplus
6316145b7b3cSmrg}
6317145b7b3cSmrg#endif
6318145b7b3cSmrgint main(){nm_test_var='a';nm_test_func();return(0);}
6319145b7b3cSmrgEOF
6320145b7b3cSmrg
6321145b7b3cSmrg  if AC_TRY_EVAL(ac_compile); then
6322145b7b3cSmrg    # Now try to grab the symbols.
6323145b7b3cSmrg    nlist=conftest.nm
6324145b7b3cSmrg    if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
6325145b7b3cSmrg      # Try sorting and uniquifying the output.
6326145b7b3cSmrg      if sort "$nlist" | uniq > "$nlist"T; then
6327145b7b3cSmrg	mv -f "$nlist"T "$nlist"
6328145b7b3cSmrg      else
6329145b7b3cSmrg	rm -f "$nlist"T
6330145b7b3cSmrg      fi
6331145b7b3cSmrg
6332145b7b3cSmrg      # Make sure that we snagged all the symbols we need.
6333145b7b3cSmrg      if grep ' nm_test_var$' "$nlist" >/dev/null; then
6334145b7b3cSmrg	if grep ' nm_test_func$' "$nlist" >/dev/null; then
6335145b7b3cSmrg	  cat <<EOF > conftest.$ac_ext
6336145b7b3cSmrg#ifdef __cplusplus
6337145b7b3cSmrgextern "C" {
6338145b7b3cSmrg#endif
6339145b7b3cSmrg
6340145b7b3cSmrgEOF
6341145b7b3cSmrg	  # Now generate the symbol file.
6342145b7b3cSmrg	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
6343145b7b3cSmrg
6344145b7b3cSmrg	  cat <<EOF >> conftest.$ac_ext
6345145b7b3cSmrg#if defined (__STDC__) && __STDC__
6346145b7b3cSmrg# define lt_ptr_t void *
6347145b7b3cSmrg#else
6348145b7b3cSmrg# define lt_ptr_t char *
6349145b7b3cSmrg# define const
6350145b7b3cSmrg#endif
6351145b7b3cSmrg
6352145b7b3cSmrg/* The mapping between symbol names and symbols. */
6353145b7b3cSmrgconst struct {
6354145b7b3cSmrg  const char *name;
6355145b7b3cSmrg  lt_ptr_t address;
6356145b7b3cSmrg}
6357145b7b3cSmrglt_preloaded_symbols[[]] =
6358145b7b3cSmrg{
6359145b7b3cSmrgEOF
6360145b7b3cSmrg	  $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
6361145b7b3cSmrg	  cat <<\EOF >> conftest.$ac_ext
6362145b7b3cSmrg  {0, (lt_ptr_t) 0}
6363145b7b3cSmrg};
6364145b7b3cSmrg
6365145b7b3cSmrg#ifdef __cplusplus
6366145b7b3cSmrg}
6367145b7b3cSmrg#endif
6368145b7b3cSmrgEOF
6369145b7b3cSmrg	  # Now try linking the two files.
6370145b7b3cSmrg	  mv conftest.$ac_objext conftstm.$ac_objext
6371145b7b3cSmrg	  lt_save_LIBS="$LIBS"
6372145b7b3cSmrg	  lt_save_CFLAGS="$CFLAGS"
6373145b7b3cSmrg	  LIBS="conftstm.$ac_objext"
6374145b7b3cSmrg	  CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
6375145b7b3cSmrg	  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
6376145b7b3cSmrg	    pipe_works=yes
6377145b7b3cSmrg	  fi
6378145b7b3cSmrg	  LIBS="$lt_save_LIBS"
6379145b7b3cSmrg	  CFLAGS="$lt_save_CFLAGS"
6380145b7b3cSmrg	else
6381145b7b3cSmrg	  echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
6382145b7b3cSmrg	fi
6383145b7b3cSmrg      else
6384145b7b3cSmrg	echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
6385145b7b3cSmrg      fi
6386145b7b3cSmrg    else
6387145b7b3cSmrg      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
6388145b7b3cSmrg    fi
6389145b7b3cSmrg  else
6390145b7b3cSmrg    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
6391145b7b3cSmrg    cat conftest.$ac_ext >&5
6392145b7b3cSmrg  fi
6393145b7b3cSmrg  rm -f conftest* conftst*
6394145b7b3cSmrg
6395145b7b3cSmrg  # Do not use the global_symbol_pipe unless it works.
6396145b7b3cSmrg  if test "$pipe_works" = yes; then
6397145b7b3cSmrg    break
6398145b7b3cSmrg  else
6399145b7b3cSmrg    lt_cv_sys_global_symbol_pipe=
6400145b7b3cSmrg  fi
6401145b7b3cSmrgdone
6402145b7b3cSmrg])
6403145b7b3cSmrgif test -z "$lt_cv_sys_global_symbol_pipe"; then
6404145b7b3cSmrg  lt_cv_sys_global_symbol_to_cdecl=
6405145b7b3cSmrgfi
6406145b7b3cSmrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
6407145b7b3cSmrg  AC_MSG_RESULT(failed)
6408145b7b3cSmrgelse
6409145b7b3cSmrg  AC_MSG_RESULT(ok)
6410145b7b3cSmrgfi
6411145b7b3cSmrg]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
6412145b7b3cSmrg
6413145b7b3cSmrg
6414145b7b3cSmrg# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
6415145b7b3cSmrg# ---------------------------------------
6416145b7b3cSmrgAC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
6417145b7b3cSmrg[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
6418145b7b3cSmrg_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
6419145b7b3cSmrg_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
6420145b7b3cSmrg
6421145b7b3cSmrgAC_MSG_CHECKING([for $compiler option to produce PIC])
6422145b7b3cSmrg ifelse([$1],[CXX],[
6423145b7b3cSmrg  # C++ specific cases for pic, static, wl, etc.
6424145b7b3cSmrg  if test "$GXX" = yes; then
6425145b7b3cSmrg    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6426145b7b3cSmrg    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
6427145b7b3cSmrg
6428145b7b3cSmrg    case $host_os in
6429145b7b3cSmrg    aix*)
6430145b7b3cSmrg      # All AIX code is PIC.
6431145b7b3cSmrg      if test "$host_cpu" = ia64; then
6432145b7b3cSmrg	# AIX 5 now supports IA64 processor
6433145b7b3cSmrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6434145b7b3cSmrg      fi
6435145b7b3cSmrg      ;;
6436145b7b3cSmrg    amigaos*)
6437145b7b3cSmrg      # FIXME: we need at least 68020 code to build shared libraries, but
6438145b7b3cSmrg      # adding the `-m68020' flag to GCC prevents building anything better,
6439145b7b3cSmrg      # like `-m68040'.
6440145b7b3cSmrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
6441145b7b3cSmrg      ;;
6442145b7b3cSmrg    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
6443145b7b3cSmrg      # PIC is the default for these OSes.
6444145b7b3cSmrg      ;;
6445145b7b3cSmrg    mingw* | os2* | pw32*)
6446145b7b3cSmrg      # This hack is so that the source file can tell whether it is being
6447145b7b3cSmrg      # built for inclusion in a dll (and should export symbols for example).
6448145b7b3cSmrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
6449145b7b3cSmrg      ;;
6450145b7b3cSmrg    darwin* | rhapsody*)
6451145b7b3cSmrg      # PIC is the default on this platform
6452145b7b3cSmrg      # Common symbols not allowed in MH_DYLIB files
6453145b7b3cSmrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
6454145b7b3cSmrg      ;;
6455145b7b3cSmrg    *djgpp*)
6456145b7b3cSmrg      # DJGPP does not support shared libraries at all
6457145b7b3cSmrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
6458145b7b3cSmrg      ;;
6459145b7b3cSmrg    interix3*)
6460145b7b3cSmrg      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
6461145b7b3cSmrg      # Instead, we relocate shared libraries at runtime.
6462145b7b3cSmrg      ;;
6463145b7b3cSmrg    sysv4*MP*)
6464145b7b3cSmrg      if test -d /usr/nec; then
6465145b7b3cSmrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
6466145b7b3cSmrg      fi
6467145b7b3cSmrg      ;;
6468145b7b3cSmrg    hpux*)
6469145b7b3cSmrg      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
6470145b7b3cSmrg      # not for PA HP-UX.
6471145b7b3cSmrg      case $host_cpu in
6472145b7b3cSmrg      hppa*64*|ia64*)
6473145b7b3cSmrg	;;
6474145b7b3cSmrg      *)
6475145b7b3cSmrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6476145b7b3cSmrg	;;
6477145b7b3cSmrg      esac
6478145b7b3cSmrg      ;;
6479145b7b3cSmrg    *)
6480145b7b3cSmrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6481145b7b3cSmrg      ;;
6482145b7b3cSmrg    esac
6483145b7b3cSmrg  else
6484145b7b3cSmrg    case $host_os in
6485145b7b3cSmrg      aix4* | aix5*)
6486145b7b3cSmrg	# All AIX code is PIC.
6487145b7b3cSmrg	if test "$host_cpu" = ia64; then
6488145b7b3cSmrg	  # AIX 5 now supports IA64 processor
6489145b7b3cSmrg	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6490145b7b3cSmrg	else
6491145b7b3cSmrg	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
6492145b7b3cSmrg	fi
6493145b7b3cSmrg	;;
6494145b7b3cSmrg      chorus*)
6495145b7b3cSmrg	case $cc_basename in
6496145b7b3cSmrg	cxch68*)
6497145b7b3cSmrg	  # Green Hills C++ Compiler
6498145b7b3cSmrg	  # _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
6499145b7b3cSmrg	  ;;
6500145b7b3cSmrg	esac
6501145b7b3cSmrg	;;
6502145b7b3cSmrg       darwin*)
6503145b7b3cSmrg         # PIC is the default on this platform
6504145b7b3cSmrg         # Common symbols not allowed in MH_DYLIB files
6505145b7b3cSmrg         case $cc_basename in
6506145b7b3cSmrg           xlc*)
6507145b7b3cSmrg           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
6508145b7b3cSmrg           _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6509145b7b3cSmrg           ;;
6510145b7b3cSmrg         esac
6511145b7b3cSmrg       ;;
6512145b7b3cSmrg      dgux*)
6513145b7b3cSmrg	case $cc_basename in
6514145b7b3cSmrg	  ec++*)
6515145b7b3cSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6516145b7b3cSmrg	    ;;
6517145b7b3cSmrg	  ghcx*)
6518145b7b3cSmrg	    # Green Hills C++ Compiler
6519145b7b3cSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6520145b7b3cSmrg	    ;;
6521145b7b3cSmrg	  *)
6522145b7b3cSmrg	    ;;
6523145b7b3cSmrg	esac
6524145b7b3cSmrg	;;
6525145b7b3cSmrg      freebsd* | kfreebsd*-gnu | dragonfly*)
6526145b7b3cSmrg	# FreeBSD uses GNU C++
6527145b7b3cSmrg	;;
6528145b7b3cSmrg      hpux9* | hpux10* | hpux11*)
6529145b7b3cSmrg	case $cc_basename in
6530145b7b3cSmrg	  CC*)
6531145b7b3cSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6532145b7b3cSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
6533145b7b3cSmrg	    if test "$host_cpu" != ia64; then
6534145b7b3cSmrg	      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
6535145b7b3cSmrg	    fi
6536145b7b3cSmrg	    ;;
6537145b7b3cSmrg	  aCC*)
6538145b7b3cSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6539145b7b3cSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
6540145b7b3cSmrg	    case $host_cpu in
6541145b7b3cSmrg	    hppa*64*|ia64*)
6542145b7b3cSmrg	      # +Z the default
6543145b7b3cSmrg	      ;;
6544145b7b3cSmrg	    *)
6545145b7b3cSmrg	      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
6546145b7b3cSmrg	      ;;
6547145b7b3cSmrg	    esac
6548145b7b3cSmrg	    ;;
6549145b7b3cSmrg	  *)
6550145b7b3cSmrg	    ;;
6551145b7b3cSmrg	esac
6552145b7b3cSmrg	;;
6553145b7b3cSmrg      interix*)
6554145b7b3cSmrg	# This is c89, which is MS Visual C++ (no shared libs)
6555145b7b3cSmrg	# Anyone wants to do a port?
6556145b7b3cSmrg	;;
6557145b7b3cSmrg      irix5* | irix6* | nonstopux*)
6558145b7b3cSmrg	case $cc_basename in
6559145b7b3cSmrg	  CC*)
6560145b7b3cSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6561145b7b3cSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6562145b7b3cSmrg	    # CC pic flag -KPIC is the default.
6563145b7b3cSmrg	    ;;
6564145b7b3cSmrg	  *)
6565145b7b3cSmrg	    ;;
6566145b7b3cSmrg	esac
6567145b7b3cSmrg	;;
6568145b7b3cSmrg      linux*)
6569145b7b3cSmrg	case $cc_basename in
6570145b7b3cSmrg	  KCC*)
6571145b7b3cSmrg	    # KAI C++ Compiler
6572145b7b3cSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
6573145b7b3cSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6574145b7b3cSmrg	    ;;
6575145b7b3cSmrg	  icpc* | ecpc*)
6576145b7b3cSmrg	    # Intel C++
6577145b7b3cSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6578145b7b3cSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6579145b7b3cSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
6580145b7b3cSmrg	    ;;
6581145b7b3cSmrg	  pgCC*)
6582145b7b3cSmrg	    # Portland Group C++ compiler.
6583145b7b3cSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6584145b7b3cSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
6585145b7b3cSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6586145b7b3cSmrg	    ;;
6587145b7b3cSmrg	  cxx*)
6588145b7b3cSmrg	    # Compaq C++
6589145b7b3cSmrg	    # Make sure the PIC flag is empty.  It appears that all Alpha
6590145b7b3cSmrg	    # Linux and Compaq Tru64 Unix objects are PIC.
6591145b7b3cSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
6592145b7b3cSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6593145b7b3cSmrg	    ;;
6594145b7b3cSmrg	  *)
6595145b7b3cSmrg	    ;;
6596145b7b3cSmrg	esac
6597145b7b3cSmrg	;;
6598145b7b3cSmrg      lynxos*)
6599145b7b3cSmrg	;;
6600145b7b3cSmrg      m88k*)
6601145b7b3cSmrg	;;
6602145b7b3cSmrg      mvs*)
6603145b7b3cSmrg	case $cc_basename in
6604145b7b3cSmrg	  cxx*)
6605145b7b3cSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
6606145b7b3cSmrg	    ;;
6607145b7b3cSmrg	  *)
6608145b7b3cSmrg	    ;;
6609145b7b3cSmrg	esac
6610145b7b3cSmrg	;;
6611145b7b3cSmrg      netbsd*)
6612145b7b3cSmrg	;;
6613145b7b3cSmrg      osf3* | osf4* | osf5*)
6614145b7b3cSmrg	case $cc_basename in
6615145b7b3cSmrg	  KCC*)
6616145b7b3cSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
6617145b7b3cSmrg	    ;;
6618145b7b3cSmrg	  RCC*)
6619145b7b3cSmrg	    # Rational C++ 2.4.1
6620145b7b3cSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6621145b7b3cSmrg	    ;;
6622145b7b3cSmrg	  cxx*)
6623145b7b3cSmrg	    # Digital/Compaq C++
6624145b7b3cSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6625145b7b3cSmrg	    # Make sure the PIC flag is empty.  It appears that all Alpha
6626145b7b3cSmrg	    # Linux and Compaq Tru64 Unix objects are PIC.
6627145b7b3cSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
6628145b7b3cSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6629145b7b3cSmrg	    ;;
6630145b7b3cSmrg	  *)
6631145b7b3cSmrg	    ;;
6632145b7b3cSmrg	esac
6633145b7b3cSmrg	;;
6634145b7b3cSmrg      psos*)
6635145b7b3cSmrg	;;
6636145b7b3cSmrg      solaris*)
6637145b7b3cSmrg	case $cc_basename in
6638145b7b3cSmrg	  CC*)
6639145b7b3cSmrg	    # Sun C++ 4.2, 5.x and Centerline C++
6640145b7b3cSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6641145b7b3cSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6642145b7b3cSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
6643145b7b3cSmrg	    ;;
6644145b7b3cSmrg	  gcx*)
6645145b7b3cSmrg	    # Green Hills C++ Compiler
6646145b7b3cSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
6647145b7b3cSmrg	    ;;
6648145b7b3cSmrg	  *)
6649145b7b3cSmrg	    ;;
6650145b7b3cSmrg	esac
6651145b7b3cSmrg	;;
6652145b7b3cSmrg      sunos4*)
6653145b7b3cSmrg	case $cc_basename in
6654145b7b3cSmrg	  CC*)
6655145b7b3cSmrg	    # Sun C++ 4.x
6656145b7b3cSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6657145b7b3cSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6658145b7b3cSmrg	    ;;
6659145b7b3cSmrg	  lcc*)
6660145b7b3cSmrg	    # Lucid
6661145b7b3cSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6662145b7b3cSmrg	    ;;
6663145b7b3cSmrg	  *)
6664145b7b3cSmrg	    ;;
6665145b7b3cSmrg	esac
6666145b7b3cSmrg	;;
6667145b7b3cSmrg      tandem*)
6668145b7b3cSmrg	case $cc_basename in
6669145b7b3cSmrg	  NCC*)
6670145b7b3cSmrg	    # NonStop-UX NCC 3.20
6671145b7b3cSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6672145b7b3cSmrg	    ;;
6673145b7b3cSmrg	  *)
6674145b7b3cSmrg	    ;;
6675145b7b3cSmrg	esac
6676145b7b3cSmrg	;;
6677145b7b3cSmrg      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
6678145b7b3cSmrg	case $cc_basename in
6679145b7b3cSmrg	  CC*)
6680145b7b3cSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6681145b7b3cSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6682145b7b3cSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6683145b7b3cSmrg	    ;;
6684145b7b3cSmrg	esac
6685145b7b3cSmrg	;;
6686145b7b3cSmrg      vxworks*)
6687145b7b3cSmrg	;;
6688145b7b3cSmrg      *)
6689145b7b3cSmrg	_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
6690145b7b3cSmrg	;;
6691145b7b3cSmrg    esac
6692145b7b3cSmrg  fi
6693145b7b3cSmrg],
6694145b7b3cSmrg[
6695145b7b3cSmrg  if test "$GCC" = yes; then
6696145b7b3cSmrg    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6697145b7b3cSmrg    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
6698145b7b3cSmrg
6699145b7b3cSmrg    case $host_os in
6700145b7b3cSmrg      aix*)
6701145b7b3cSmrg      # All AIX code is PIC.
6702145b7b3cSmrg      if test "$host_cpu" = ia64; then
6703145b7b3cSmrg	# AIX 5 now supports IA64 processor
6704145b7b3cSmrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6705145b7b3cSmrg      fi
6706145b7b3cSmrg      ;;
6707145b7b3cSmrg
6708145b7b3cSmrg    amigaos*)
6709145b7b3cSmrg      # FIXME: we need at least 68020 code to build shared libraries, but
6710145b7b3cSmrg      # adding the `-m68020' flag to GCC prevents building anything better,
6711145b7b3cSmrg      # like `-m68040'.
6712145b7b3cSmrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
6713145b7b3cSmrg      ;;
6714145b7b3cSmrg
6715145b7b3cSmrg    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
6716145b7b3cSmrg      # PIC is the default for these OSes.
6717145b7b3cSmrg      ;;
6718145b7b3cSmrg
6719145b7b3cSmrg    mingw* | pw32* | os2*)
6720145b7b3cSmrg      # This hack is so that the source file can tell whether it is being
6721145b7b3cSmrg      # built for inclusion in a dll (and should export symbols for example).
6722145b7b3cSmrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
6723145b7b3cSmrg      ;;
6724145b7b3cSmrg
6725145b7b3cSmrg    darwin* | rhapsody*)
6726145b7b3cSmrg      # PIC is the default on this platform
6727145b7b3cSmrg      # Common symbols not allowed in MH_DYLIB files
6728145b7b3cSmrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
6729145b7b3cSmrg      ;;
6730145b7b3cSmrg
6731145b7b3cSmrg    interix3*)
6732145b7b3cSmrg      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
6733145b7b3cSmrg      # Instead, we relocate shared libraries at runtime.
6734145b7b3cSmrg      ;;
6735145b7b3cSmrg
6736145b7b3cSmrg    msdosdjgpp*)
6737145b7b3cSmrg      # Just because we use GCC doesn't mean we suddenly get shared libraries
6738145b7b3cSmrg      # on systems that don't support them.
6739145b7b3cSmrg      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
6740145b7b3cSmrg      enable_shared=no
6741145b7b3cSmrg      ;;
6742145b7b3cSmrg
6743145b7b3cSmrg    sysv4*MP*)
6744145b7b3cSmrg      if test -d /usr/nec; then
6745145b7b3cSmrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
6746145b7b3cSmrg      fi
6747145b7b3cSmrg      ;;
6748145b7b3cSmrg
6749145b7b3cSmrg    hpux*)
6750145b7b3cSmrg      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
6751145b7b3cSmrg      # not for PA HP-UX.
6752145b7b3cSmrg      case $host_cpu in
6753145b7b3cSmrg      hppa*64*|ia64*)
6754145b7b3cSmrg	# +Z the default
6755145b7b3cSmrg	;;
6756145b7b3cSmrg      *)
6757145b7b3cSmrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6758145b7b3cSmrg	;;
6759145b7b3cSmrg      esac
6760145b7b3cSmrg      ;;
6761145b7b3cSmrg
6762145b7b3cSmrg    *)
6763145b7b3cSmrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6764145b7b3cSmrg      ;;
6765145b7b3cSmrg    esac
6766145b7b3cSmrg  else
6767145b7b3cSmrg    # PORTME Check for flag to pass linker flags through the system compiler.
6768145b7b3cSmrg    case $host_os in
6769145b7b3cSmrg    aix*)
6770145b7b3cSmrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6771145b7b3cSmrg      if test "$host_cpu" = ia64; then
6772145b7b3cSmrg	# AIX 5 now supports IA64 processor
6773145b7b3cSmrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6774145b7b3cSmrg      else
6775145b7b3cSmrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
6776145b7b3cSmrg      fi
6777145b7b3cSmrg      ;;
6778145b7b3cSmrg      darwin*)
6779145b7b3cSmrg        # PIC is the default on this platform
6780145b7b3cSmrg        # Common symbols not allowed in MH_DYLIB files
6781145b7b3cSmrg       case $cc_basename in
6782145b7b3cSmrg         xlc*)
6783145b7b3cSmrg         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
6784145b7b3cSmrg         _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6785145b7b3cSmrg         ;;
6786145b7b3cSmrg       esac
6787145b7b3cSmrg       ;;
6788145b7b3cSmrg
6789145b7b3cSmrg    mingw* | pw32* | os2*)
6790145b7b3cSmrg      # This hack is so that the source file can tell whether it is being
6791145b7b3cSmrg      # built for inclusion in a dll (and should export symbols for example).
6792145b7b3cSmrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
6793145b7b3cSmrg      ;;
6794145b7b3cSmrg
6795145b7b3cSmrg    hpux9* | hpux10* | hpux11*)
6796145b7b3cSmrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6797145b7b3cSmrg      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
6798145b7b3cSmrg      # not for PA HP-UX.
6799145b7b3cSmrg      case $host_cpu in
6800145b7b3cSmrg      hppa*64*|ia64*)
6801145b7b3cSmrg	# +Z the default
6802145b7b3cSmrg	;;
6803145b7b3cSmrg      *)
6804145b7b3cSmrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
6805145b7b3cSmrg	;;
6806145b7b3cSmrg      esac
6807145b7b3cSmrg      # Is there a better lt_prog_compiler_static that works with the bundled CC?
6808145b7b3cSmrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
6809145b7b3cSmrg      ;;
6810145b7b3cSmrg
6811145b7b3cSmrg    irix5* | irix6* | nonstopux*)
6812145b7b3cSmrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6813145b7b3cSmrg      # PIC (with -KPIC) is the default.
6814145b7b3cSmrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6815145b7b3cSmrg      ;;
6816145b7b3cSmrg
6817145b7b3cSmrg    newsos6)
6818145b7b3cSmrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6819145b7b3cSmrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6820145b7b3cSmrg      ;;
6821145b7b3cSmrg
6822145b7b3cSmrg    linux*)
6823145b7b3cSmrg      case $cc_basename in
6824145b7b3cSmrg      icc* | ecc*)
6825145b7b3cSmrg	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6826145b7b3cSmrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6827145b7b3cSmrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
6828145b7b3cSmrg        ;;
6829145b7b3cSmrg      pgcc* | pgf77* | pgf90* | pgf95*)
6830145b7b3cSmrg        # Portland Group compilers (*not* the Pentium gcc compiler,
6831145b7b3cSmrg	# which looks to be a dead project)
6832145b7b3cSmrg	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6833145b7b3cSmrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
6834145b7b3cSmrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6835145b7b3cSmrg        ;;
6836145b7b3cSmrg      ccc*)
6837145b7b3cSmrg        _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6838145b7b3cSmrg        # All Alpha code is PIC.
6839145b7b3cSmrg        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6840145b7b3cSmrg        ;;
6841145b7b3cSmrg      esac
6842145b7b3cSmrg      ;;
6843145b7b3cSmrg
6844145b7b3cSmrg    osf3* | osf4* | osf5*)
6845145b7b3cSmrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6846145b7b3cSmrg      # All OSF/1 code is PIC.
6847145b7b3cSmrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6848145b7b3cSmrg      ;;
6849145b7b3cSmrg
6850145b7b3cSmrg    solaris*)
6851145b7b3cSmrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6852145b7b3cSmrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6853145b7b3cSmrg      case $cc_basename in
6854145b7b3cSmrg      f77* | f90* | f95*)
6855145b7b3cSmrg	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
6856145b7b3cSmrg      *)
6857145b7b3cSmrg	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
6858145b7b3cSmrg      esac
6859145b7b3cSmrg      ;;
6860145b7b3cSmrg
6861145b7b3cSmrg    sunos4*)
6862145b7b3cSmrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
6863145b7b3cSmrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
6864145b7b3cSmrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6865145b7b3cSmrg      ;;
6866145b7b3cSmrg
6867145b7b3cSmrg    sysv4 | sysv4.2uw2* | sysv4.3*)
6868145b7b3cSmrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6869145b7b3cSmrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6870145b7b3cSmrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6871145b7b3cSmrg      ;;
6872145b7b3cSmrg
6873145b7b3cSmrg    sysv4*MP*)
6874145b7b3cSmrg      if test -d /usr/nec ;then
6875145b7b3cSmrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
6876145b7b3cSmrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6877145b7b3cSmrg      fi
6878145b7b3cSmrg      ;;
6879145b7b3cSmrg
6880145b7b3cSmrg    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
6881145b7b3cSmrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6882145b7b3cSmrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6883145b7b3cSmrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6884145b7b3cSmrg      ;;
6885145b7b3cSmrg
6886145b7b3cSmrg    unicos*)
6887145b7b3cSmrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6888145b7b3cSmrg      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
6889145b7b3cSmrg      ;;
6890145b7b3cSmrg
6891145b7b3cSmrg    uts4*)
6892145b7b3cSmrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6893145b7b3cSmrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6894145b7b3cSmrg      ;;
6895145b7b3cSmrg
6896145b7b3cSmrg    *)
6897145b7b3cSmrg      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
6898145b7b3cSmrg      ;;
6899145b7b3cSmrg    esac
6900145b7b3cSmrg  fi
6901145b7b3cSmrg])
6902145b7b3cSmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
6903145b7b3cSmrg
6904145b7b3cSmrg#
6905145b7b3cSmrg# Check to make sure the PIC flag actually works.
6906145b7b3cSmrg#
6907145b7b3cSmrgif test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
6908145b7b3cSmrg  AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
6909145b7b3cSmrg    _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
6910145b7b3cSmrg    [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
6911145b7b3cSmrg    [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
6912145b7b3cSmrg     "" | " "*) ;;
6913145b7b3cSmrg     *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
6914145b7b3cSmrg     esac],
6915145b7b3cSmrg    [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
6916145b7b3cSmrg     _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
6917145b7b3cSmrgfi
6918145b7b3cSmrgcase $host_os in
6919145b7b3cSmrg  # For platforms which do not support PIC, -DPIC is meaningless:
6920145b7b3cSmrg  *djgpp*)
6921145b7b3cSmrg    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
6922145b7b3cSmrg    ;;
6923145b7b3cSmrg  *)
6924145b7b3cSmrg    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
6925145b7b3cSmrg    ;;
6926145b7b3cSmrgesac
6927145b7b3cSmrg
6928145b7b3cSmrg#
6929145b7b3cSmrg# Check to make sure the static flag actually works.
6930145b7b3cSmrg#
6931145b7b3cSmrgwl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\"
6932145b7b3cSmrgAC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
6933145b7b3cSmrg  _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
6934145b7b3cSmrg  $lt_tmp_static_flag,
6935145b7b3cSmrg  [],
6936145b7b3cSmrg  [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
6937145b7b3cSmrg])
6938145b7b3cSmrg
6939145b7b3cSmrg
6940145b7b3cSmrg# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
6941145b7b3cSmrg# ------------------------------------
6942145b7b3cSmrg# See if the linker supports building shared libraries.
6943145b7b3cSmrgAC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
6944145b7b3cSmrg[AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
6945145b7b3cSmrgifelse([$1],[CXX],[
6946145b7b3cSmrg  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
6947145b7b3cSmrg  case $host_os in
6948145b7b3cSmrg  aix4* | aix5*)
6949145b7b3cSmrg    # If we're using GNU nm, then we don't want the "-C" option.
6950145b7b3cSmrg    # -C means demangle to AIX nm, but means don't demangle with GNU nm
6951145b7b3cSmrg    if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
6952145b7b3cSmrg      _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
6953145b7b3cSmrg    else
6954145b7b3cSmrg      _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
6955145b7b3cSmrg    fi
6956145b7b3cSmrg    ;;
6957145b7b3cSmrg  pw32*)
6958145b7b3cSmrg    _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
6959145b7b3cSmrg  ;;
6960145b7b3cSmrg  cygwin* | mingw*)
6961145b7b3cSmrg    _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/;/^.* __nm__/s/^.* __nm__\([[^ ]]*\) [[^ ]]*/\1 DATA/;/^I /d;/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
6962145b7b3cSmrg  ;;
6963145b7b3cSmrg  *)
6964145b7b3cSmrg    _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
6965145b7b3cSmrg  ;;
6966145b7b3cSmrg  esac
6967145b7b3cSmrg],[
6968145b7b3cSmrg  runpath_var=
6969145b7b3cSmrg  _LT_AC_TAGVAR(allow_undefined_flag, $1)=
6970145b7b3cSmrg  _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
6971145b7b3cSmrg  _LT_AC_TAGVAR(archive_cmds, $1)=
6972145b7b3cSmrg  _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
6973145b7b3cSmrg  _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
6974145b7b3cSmrg  _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
6975145b7b3cSmrg  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
6976145b7b3cSmrg  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
6977145b7b3cSmrg  _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
6978145b7b3cSmrg  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
6979145b7b3cSmrg  _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
6980145b7b3cSmrg  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
6981145b7b3cSmrg  _LT_AC_TAGVAR(hardcode_direct, $1)=no
6982145b7b3cSmrg  _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
6983145b7b3cSmrg  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
6984145b7b3cSmrg  _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
6985145b7b3cSmrg  _LT_AC_TAGVAR(hardcode_automatic, $1)=no
6986145b7b3cSmrg  _LT_AC_TAGVAR(module_cmds, $1)=
6987145b7b3cSmrg  _LT_AC_TAGVAR(module_expsym_cmds, $1)=
6988145b7b3cSmrg  _LT_AC_TAGVAR(always_export_symbols, $1)=no
6989145b7b3cSmrg  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
6990145b7b3cSmrg  # include_expsyms should be a list of space-separated symbols to be *always*
6991145b7b3cSmrg  # included in the symbol list
6992145b7b3cSmrg  _LT_AC_TAGVAR(include_expsyms, $1)=
6993145b7b3cSmrg  # exclude_expsyms can be an extended regexp of symbols to exclude
6994145b7b3cSmrg  # it will be wrapped by ` (' and `)$', so one must not match beginning or
6995145b7b3cSmrg  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
6996145b7b3cSmrg  # as well as any symbol that contains `d'.
6997145b7b3cSmrg  _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
6998145b7b3cSmrg  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
6999145b7b3cSmrg  # platforms (ab)use it in PIC code, but their linkers get confused if
7000145b7b3cSmrg  # the symbol is explicitly referenced.  Since portable code cannot
7001145b7b3cSmrg  # rely on this symbol name, it's probably fine to never include it in
7002145b7b3cSmrg  # preloaded symbol tables.
7003145b7b3cSmrg  extract_expsyms_cmds=
7004145b7b3cSmrg  # Just being paranoid about ensuring that cc_basename is set.
7005145b7b3cSmrg  _LT_CC_BASENAME([$compiler])
7006145b7b3cSmrg  case $host_os in
7007145b7b3cSmrg  cygwin* | mingw* | pw32*)
7008145b7b3cSmrg    # FIXME: the MSVC++ port hasn't been tested in a loooong time
7009145b7b3cSmrg    # When not using gcc, we currently assume that we are using
7010145b7b3cSmrg    # Microsoft Visual C++.
7011145b7b3cSmrg    if test "$GCC" != yes; then
7012145b7b3cSmrg      with_gnu_ld=no
7013145b7b3cSmrg    fi
7014145b7b3cSmrg    ;;
7015145b7b3cSmrg  interix*)
7016145b7b3cSmrg    # we just hope/assume this is gcc and not c89 (= MSVC++)
7017145b7b3cSmrg    with_gnu_ld=yes
7018145b7b3cSmrg    ;;
7019145b7b3cSmrg  openbsd*)
7020145b7b3cSmrg    with_gnu_ld=no
7021145b7b3cSmrg    ;;
7022145b7b3cSmrg  esac
7023145b7b3cSmrg
7024145b7b3cSmrg  _LT_AC_TAGVAR(ld_shlibs, $1)=yes
7025145b7b3cSmrg  if test "$with_gnu_ld" = yes; then
7026145b7b3cSmrg    # If archive_cmds runs LD, not CC, wlarc should be empty
7027145b7b3cSmrg    wlarc='${wl}'
7028145b7b3cSmrg
7029145b7b3cSmrg    # Set some defaults for GNU ld with shared library support. These
7030145b7b3cSmrg    # are reset later if shared libraries are not supported. Putting them
7031145b7b3cSmrg    # here allows them to be overridden if necessary.
7032145b7b3cSmrg    runpath_var=LD_RUN_PATH
7033145b7b3cSmrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
7034145b7b3cSmrg    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7035145b7b3cSmrg    # ancient GNU ld didn't support --whole-archive et. al.
7036145b7b3cSmrg    if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
7037145b7b3cSmrg	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
7038145b7b3cSmrg      else
7039145b7b3cSmrg  	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
7040145b7b3cSmrg    fi
7041145b7b3cSmrg    supports_anon_versioning=no
7042145b7b3cSmrg    case `$LD -v 2>/dev/null` in
7043145b7b3cSmrg      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
7044145b7b3cSmrg      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
7045145b7b3cSmrg      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
7046145b7b3cSmrg      *\ 2.11.*) ;; # other 2.11 versions
7047145b7b3cSmrg      *) supports_anon_versioning=yes ;;
7048145b7b3cSmrg    esac
7049145b7b3cSmrg
7050145b7b3cSmrg    # See if GNU ld supports shared libraries.
7051145b7b3cSmrg    case $host_os in
7052145b7b3cSmrg    aix3* | aix4* | aix5*)
7053145b7b3cSmrg      # On AIX/PPC, the GNU linker is very broken
7054145b7b3cSmrg      if test "$host_cpu" != ia64; then
7055145b7b3cSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
7056145b7b3cSmrg	cat <<EOF 1>&2
7057145b7b3cSmrg
7058145b7b3cSmrg*** Warning: the GNU linker, at least up to release 2.9.1, is reported
7059145b7b3cSmrg*** to be unable to reliably create shared libraries on AIX.
7060145b7b3cSmrg*** Therefore, libtool is disabling shared libraries support.  If you
7061145b7b3cSmrg*** really care for shared libraries, you may want to modify your PATH
7062145b7b3cSmrg*** so that a non-GNU linker is found, and then restart.
7063145b7b3cSmrg
7064145b7b3cSmrgEOF
7065145b7b3cSmrg      fi
7066145b7b3cSmrg      ;;
7067145b7b3cSmrg
7068145b7b3cSmrg    amigaos*)
7069145b7b3cSmrg      _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
7070145b7b3cSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7071145b7b3cSmrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
7072145b7b3cSmrg
7073145b7b3cSmrg      # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
7074145b7b3cSmrg      # that the semantics of dynamic libraries on AmigaOS, at least up
7075145b7b3cSmrg      # to version 4, is to share data among multiple programs linked
7076145b7b3cSmrg      # with the same dynamic library.  Since this doesn't match the
7077145b7b3cSmrg      # behavior of shared libraries on other platforms, we can't use
7078145b7b3cSmrg      # them.
7079145b7b3cSmrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
7080145b7b3cSmrg      ;;
7081145b7b3cSmrg
7082145b7b3cSmrg    beos*)
7083145b7b3cSmrg      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
7084145b7b3cSmrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
7085145b7b3cSmrg	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
7086145b7b3cSmrg	# support --undefined.  This deserves some investigation.  FIXME
7087145b7b3cSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7088145b7b3cSmrg      else
7089145b7b3cSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
7090145b7b3cSmrg      fi
7091145b7b3cSmrg      ;;
7092145b7b3cSmrg
7093145b7b3cSmrg    cygwin* | mingw* | pw32*)
7094145b7b3cSmrg      # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
7095145b7b3cSmrg      # as there is no search path for DLLs.
7096145b7b3cSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7097145b7b3cSmrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
7098145b7b3cSmrg      _LT_AC_TAGVAR(always_export_symbols, $1)=no
7099145b7b3cSmrg      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
7100145b7b3cSmrg      _LT_AC_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'
7101145b7b3cSmrg
7102145b7b3cSmrg      if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
7103145b7b3cSmrg        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
7104145b7b3cSmrg	# If the export-symbols file already is a .def file (1st line
7105145b7b3cSmrg	# is EXPORTS), use it as is; otherwise, prepend...
7106145b7b3cSmrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
7107145b7b3cSmrg	  cp $export_symbols $output_objdir/$soname.def;
7108145b7b3cSmrg	else
7109145b7b3cSmrg	  echo EXPORTS > $output_objdir/$soname.def;
7110145b7b3cSmrg	  cat $export_symbols >> $output_objdir/$soname.def;
7111145b7b3cSmrg	fi~
7112145b7b3cSmrg	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
7113145b7b3cSmrg      else
7114145b7b3cSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
7115145b7b3cSmrg      fi
7116145b7b3cSmrg      ;;
7117145b7b3cSmrg
7118145b7b3cSmrg    interix3*)
7119145b7b3cSmrg      _LT_AC_TAGVAR(hardcode_direct, $1)=no
7120145b7b3cSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7121145b7b3cSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7122145b7b3cSmrg      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7123145b7b3cSmrg      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
7124145b7b3cSmrg      # Instead, shared libraries are loaded at an image base (0x10000000 by
7125145b7b3cSmrg      # default) and relocated if they conflict, which is a slow very memory
7126145b7b3cSmrg      # consuming and fragmenting process.  To avoid this, we pick a random,
7127145b7b3cSmrg      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
7128145b7b3cSmrg      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
7129145b7b3cSmrg      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
7130145b7b3cSmrg      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
7131145b7b3cSmrg      ;;
7132145b7b3cSmrg
7133145b7b3cSmrg    linux*)
7134145b7b3cSmrg      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
7135145b7b3cSmrg	tmp_addflag=
7136145b7b3cSmrg	case $cc_basename,$host_cpu in
7137145b7b3cSmrg	pgcc*)				# Portland Group C compiler
7138145b7b3cSmrg	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
7139145b7b3cSmrg	  tmp_addflag=' $pic_flag'
7140145b7b3cSmrg	  ;;
7141145b7b3cSmrg	pgf77* | pgf90* | pgf95*)	# Portland Group f77 and f90 compilers
7142145b7b3cSmrg	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
7143145b7b3cSmrg	  tmp_addflag=' $pic_flag -Mnomain' ;;
7144145b7b3cSmrg	ecc*,ia64* | icc*,ia64*)		# Intel C compiler on ia64
7145145b7b3cSmrg	  tmp_addflag=' -i_dynamic' ;;
7146145b7b3cSmrg	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
7147145b7b3cSmrg	  tmp_addflag=' -i_dynamic -nofor_main' ;;
7148145b7b3cSmrg	ifc* | ifort*)			# Intel Fortran compiler
7149145b7b3cSmrg	  tmp_addflag=' -nofor_main' ;;
7150145b7b3cSmrg	esac
7151145b7b3cSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7152145b7b3cSmrg
7153145b7b3cSmrg	if test $supports_anon_versioning = yes; then
7154145b7b3cSmrg	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~
7155145b7b3cSmrg  cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
7156145b7b3cSmrg  $echo "local: *; };" >> $output_objdir/$libname.ver~
7157145b7b3cSmrg	  $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
7158145b7b3cSmrg	fi
7159145b7b3cSmrg      else
7160145b7b3cSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
7161145b7b3cSmrg      fi
7162145b7b3cSmrg      ;;
7163145b7b3cSmrg
7164145b7b3cSmrg    netbsd*)
7165145b7b3cSmrg      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
7166145b7b3cSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
7167145b7b3cSmrg	wlarc=
7168145b7b3cSmrg      else
7169145b7b3cSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7170145b7b3cSmrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
7171145b7b3cSmrg      fi
7172145b7b3cSmrg      ;;
7173145b7b3cSmrg
7174145b7b3cSmrg    solaris*)
7175145b7b3cSmrg      if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
7176145b7b3cSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
7177145b7b3cSmrg	cat <<EOF 1>&2
7178145b7b3cSmrg
7179145b7b3cSmrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably
7180145b7b3cSmrg*** create shared libraries on Solaris systems.  Therefore, libtool
7181145b7b3cSmrg*** is disabling shared libraries support.  We urge you to upgrade GNU
7182145b7b3cSmrg*** binutils to release 2.9.1 or newer.  Another option is to modify
7183145b7b3cSmrg*** your PATH or compiler configuration so that the native linker is
7184145b7b3cSmrg*** used, and then restart.
7185145b7b3cSmrg
7186145b7b3cSmrgEOF
7187145b7b3cSmrg      elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
7188145b7b3cSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7189145b7b3cSmrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
7190145b7b3cSmrg      else
7191145b7b3cSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
7192145b7b3cSmrg      fi
7193145b7b3cSmrg      ;;
7194145b7b3cSmrg
7195145b7b3cSmrg    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
7196145b7b3cSmrg      case `$LD -v 2>&1` in
7197145b7b3cSmrg        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 
7198145b7b3cSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
7199145b7b3cSmrg	cat <<_LT_EOF 1>&2
7200145b7b3cSmrg
7201145b7b3cSmrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
7202145b7b3cSmrg*** reliably create shared libraries on SCO systems.  Therefore, libtool
7203145b7b3cSmrg*** is disabling shared libraries support.  We urge you to upgrade GNU
7204145b7b3cSmrg*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
7205145b7b3cSmrg*** your PATH or compiler configuration so that the native linker is
7206145b7b3cSmrg*** used, and then restart.
7207145b7b3cSmrg
7208145b7b3cSmrg_LT_EOF
7209145b7b3cSmrg	;;
7210145b7b3cSmrg	*)
7211145b7b3cSmrg	  if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
7212145b7b3cSmrg	    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
7213145b7b3cSmrg	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib'
7214145b7b3cSmrg	    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib'
7215145b7b3cSmrg	  else
7216145b7b3cSmrg	    _LT_AC_TAGVAR(ld_shlibs, $1)=no
7217145b7b3cSmrg	  fi
7218145b7b3cSmrg	;;
7219145b7b3cSmrg      esac
7220145b7b3cSmrg      ;;
7221145b7b3cSmrg
7222145b7b3cSmrg    sunos4*)
7223145b7b3cSmrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
7224145b7b3cSmrg      wlarc=
7225145b7b3cSmrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
7226145b7b3cSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7227145b7b3cSmrg      ;;
7228145b7b3cSmrg
7229145b7b3cSmrg    *)
7230145b7b3cSmrg      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
7231145b7b3cSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7232145b7b3cSmrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
7233145b7b3cSmrg      else
7234145b7b3cSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
7235145b7b3cSmrg      fi
7236145b7b3cSmrg      ;;
7237145b7b3cSmrg    esac
7238145b7b3cSmrg
7239145b7b3cSmrg    if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then
7240145b7b3cSmrg      runpath_var=
7241145b7b3cSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
7242145b7b3cSmrg      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
7243145b7b3cSmrg      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
7244145b7b3cSmrg    fi
7245145b7b3cSmrg  else
7246145b7b3cSmrg    # PORTME fill in a description of your system's linker (not GNU ld)
7247145b7b3cSmrg    case $host_os in
7248145b7b3cSmrg    aix3*)
7249145b7b3cSmrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
7250145b7b3cSmrg      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
7251145b7b3cSmrg      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
7252145b7b3cSmrg      # Note: this linker hardcodes the directories in LIBPATH if there
7253145b7b3cSmrg      # are no directories specified by -L.
7254145b7b3cSmrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
7255145b7b3cSmrg      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
7256145b7b3cSmrg	# Neither direct hardcoding nor static linking is supported with a
7257145b7b3cSmrg	# broken collect2.
7258145b7b3cSmrg	_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
7259145b7b3cSmrg      fi
7260145b7b3cSmrg      ;;
7261145b7b3cSmrg
7262145b7b3cSmrg    aix4* | aix5*)
7263145b7b3cSmrg      if test "$host_cpu" = ia64; then
7264145b7b3cSmrg	# On IA64, the linker does run time linking by default, so we don't
7265145b7b3cSmrg	# have to do anything special.
7266145b7b3cSmrg	aix_use_runtimelinking=no
7267145b7b3cSmrg	exp_sym_flag='-Bexport'
7268145b7b3cSmrg	no_entry_flag=""
7269145b7b3cSmrg      else
7270145b7b3cSmrg	# If we're using GNU nm, then we don't want the "-C" option.
7271145b7b3cSmrg	# -C means demangle to AIX nm, but means don't demangle with GNU nm
7272145b7b3cSmrg	if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
7273145b7b3cSmrg	  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
7274145b7b3cSmrg	else
7275145b7b3cSmrg	  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
7276145b7b3cSmrg	fi
7277145b7b3cSmrg	aix_use_runtimelinking=no
7278145b7b3cSmrg
7279145b7b3cSmrg	# Test if we are trying to use run time linking or normal
7280145b7b3cSmrg	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
7281145b7b3cSmrg	# need to do runtime linking.
7282145b7b3cSmrg	case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
7283145b7b3cSmrg	  for ld_flag in $LDFLAGS; do
7284145b7b3cSmrg  	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
7285145b7b3cSmrg  	    aix_use_runtimelinking=yes
7286145b7b3cSmrg  	    break
7287145b7b3cSmrg  	  fi
7288145b7b3cSmrg	  done
7289145b7b3cSmrg	  ;;
7290145b7b3cSmrg	esac
7291145b7b3cSmrg
7292145b7b3cSmrg	exp_sym_flag='-bexport'
7293145b7b3cSmrg	no_entry_flag='-bnoentry'
7294145b7b3cSmrg      fi
7295145b7b3cSmrg
7296145b7b3cSmrg      # When large executables or shared objects are built, AIX ld can
7297145b7b3cSmrg      # have problems creating the table of contents.  If linking a library
7298145b7b3cSmrg      # or program results in "error TOC overflow" add -mminimal-toc to
7299145b7b3cSmrg      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
7300145b7b3cSmrg      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
7301145b7b3cSmrg
7302145b7b3cSmrg      _LT_AC_TAGVAR(archive_cmds, $1)=''
7303145b7b3cSmrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
7304145b7b3cSmrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
7305145b7b3cSmrg      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
7306145b7b3cSmrg
7307145b7b3cSmrg      if test "$GCC" = yes; then
7308145b7b3cSmrg	case $host_os in aix4.[[012]]|aix4.[[012]].*)
7309145b7b3cSmrg	# We only want to do this on AIX 4.2 and lower, the check
7310145b7b3cSmrg	# below for broken collect2 doesn't work under 4.3+
7311145b7b3cSmrg	  collect2name=`${CC} -print-prog-name=collect2`
7312145b7b3cSmrg	  if test -f "$collect2name" && \
7313145b7b3cSmrg  	   strings "$collect2name" | grep resolve_lib_name >/dev/null
7314145b7b3cSmrg	  then
7315145b7b3cSmrg  	  # We have reworked collect2
7316145b7b3cSmrg  	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes
7317145b7b3cSmrg	  else
7318145b7b3cSmrg  	  # We have old collect2
7319145b7b3cSmrg  	  _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
7320145b7b3cSmrg  	  # It fails to find uninstalled libraries when the uninstalled
7321145b7b3cSmrg  	  # path is not listed in the libpath.  Setting hardcode_minus_L
7322145b7b3cSmrg  	  # to unsupported forces relinking
7323145b7b3cSmrg  	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
7324145b7b3cSmrg  	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7325145b7b3cSmrg  	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
7326145b7b3cSmrg	  fi
7327145b7b3cSmrg	  ;;
7328145b7b3cSmrg	esac
7329145b7b3cSmrg	shared_flag='-shared'
7330145b7b3cSmrg	if test "$aix_use_runtimelinking" = yes; then
7331145b7b3cSmrg	  shared_flag="$shared_flag "'${wl}-G'
7332145b7b3cSmrg	fi
7333145b7b3cSmrg      else
7334145b7b3cSmrg	# not using gcc
7335145b7b3cSmrg	if test "$host_cpu" = ia64; then
7336145b7b3cSmrg  	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
7337145b7b3cSmrg  	# chokes on -Wl,-G. The following line is correct:
7338145b7b3cSmrg	  shared_flag='-G'
7339145b7b3cSmrg	else
7340145b7b3cSmrg	  if test "$aix_use_runtimelinking" = yes; then
7341145b7b3cSmrg	    shared_flag='${wl}-G'
7342145b7b3cSmrg	  else
7343145b7b3cSmrg	    shared_flag='${wl}-bM:SRE'
7344145b7b3cSmrg	  fi
7345145b7b3cSmrg	fi
7346145b7b3cSmrg      fi
7347145b7b3cSmrg
7348145b7b3cSmrg      # It seems that -bexpall does not export symbols beginning with
7349145b7b3cSmrg      # underscore (_), so it is better to generate a list of symbols to export.
7350145b7b3cSmrg      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
7351145b7b3cSmrg      if test "$aix_use_runtimelinking" = yes; then
7352145b7b3cSmrg	# Warning - without using the other runtime loading flags (-brtl),
7353145b7b3cSmrg	# -berok will link without error, but may produce a broken library.
7354145b7b3cSmrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
7355145b7b3cSmrg       # Determine the default libpath from the value encoded in an empty executable.
7356145b7b3cSmrg       _LT_AC_SYS_LIBPATH_AIX
7357145b7b3cSmrg       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
7358145b7b3cSmrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
7359145b7b3cSmrg       else
7360145b7b3cSmrg	if test "$host_cpu" = ia64; then
7361145b7b3cSmrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
7362145b7b3cSmrg	  _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
7363145b7b3cSmrg	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
7364145b7b3cSmrg	else
7365145b7b3cSmrg	 # Determine the default libpath from the value encoded in an empty executable.
7366145b7b3cSmrg	 _LT_AC_SYS_LIBPATH_AIX
7367145b7b3cSmrg	 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
7368145b7b3cSmrg	  # Warning - without using the other run time loading flags,
7369145b7b3cSmrg	  # -berok will link without error, but may produce a broken library.
7370145b7b3cSmrg	  _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
7371145b7b3cSmrg	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
7372145b7b3cSmrg	  # Exported symbols can be pulled into shared objects from archives
7373145b7b3cSmrg	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
7374145b7b3cSmrg	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
7375145b7b3cSmrg	  # This is similar to how AIX traditionally builds its shared libraries.
7376145b7b3cSmrg	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
7377145b7b3cSmrg	fi
7378145b7b3cSmrg      fi
7379145b7b3cSmrg      ;;
7380145b7b3cSmrg
7381145b7b3cSmrg    amigaos*)
7382145b7b3cSmrg      _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
7383145b7b3cSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7384145b7b3cSmrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
7385145b7b3cSmrg      # see comment about different semantics on the GNU ld section
7386145b7b3cSmrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
7387145b7b3cSmrg      ;;
7388145b7b3cSmrg
7389145b7b3cSmrg    bsdi[[45]]*)
7390145b7b3cSmrg      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
7391145b7b3cSmrg      ;;
7392145b7b3cSmrg
7393145b7b3cSmrg    cygwin* | mingw* | pw32*)
7394145b7b3cSmrg      # When not using gcc, we currently assume that we are using
7395145b7b3cSmrg      # Microsoft Visual C++.
7396145b7b3cSmrg      # hardcode_libdir_flag_spec is actually meaningless, as there is
7397145b7b3cSmrg      # no search path for DLLs.
7398145b7b3cSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
7399145b7b3cSmrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
7400145b7b3cSmrg      # Tell ltmain to make .lib files, not .a files.
7401145b7b3cSmrg      libext=lib
7402145b7b3cSmrg      # Tell ltmain to make .dll files, not .so files.
7403145b7b3cSmrg      shrext_cmds=".dll"
7404145b7b3cSmrg      # FIXME: Setting linknames here is a bad hack.
7405145b7b3cSmrg      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
7406145b7b3cSmrg      # The linker will automatically build a .lib file if we build a DLL.
7407145b7b3cSmrg      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
7408145b7b3cSmrg      # FIXME: Should let the user specify the lib program.
7409145b7b3cSmrg      _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
7410145b7b3cSmrg      _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
7411145b7b3cSmrg      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
7412145b7b3cSmrg      ;;
7413145b7b3cSmrg
7414145b7b3cSmrg    darwin* | rhapsody*)
7415145b7b3cSmrg      case $host_os in
7416145b7b3cSmrg        rhapsody* | darwin1.[[012]])
7417145b7b3cSmrg         _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
7418145b7b3cSmrg         ;;
7419145b7b3cSmrg       *) # Darwin 1.3 on
7420145b7b3cSmrg         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
7421145b7b3cSmrg           _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
7422145b7b3cSmrg         else
7423145b7b3cSmrg           case ${MACOSX_DEPLOYMENT_TARGET} in
7424145b7b3cSmrg             10.[[012]])
7425145b7b3cSmrg               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
7426145b7b3cSmrg               ;;
7427145b7b3cSmrg             10.*)
7428145b7b3cSmrg               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
7429145b7b3cSmrg               ;;
7430145b7b3cSmrg           esac
7431145b7b3cSmrg         fi
7432145b7b3cSmrg         ;;
7433145b7b3cSmrg      esac
7434145b7b3cSmrg      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
7435145b7b3cSmrg      _LT_AC_TAGVAR(hardcode_direct, $1)=no
7436145b7b3cSmrg      _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
7437145b7b3cSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
7438145b7b3cSmrg      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
7439145b7b3cSmrg      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
7440145b7b3cSmrg    if test "$GCC" = yes ; then
7441145b7b3cSmrg    	output_verbose_link_cmd='echo'
7442145b7b3cSmrg        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
7443145b7b3cSmrg      _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
7444145b7b3cSmrg      # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
7445145b7b3cSmrg      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
7446145b7b3cSmrg      _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
7447145b7b3cSmrg    else
7448145b7b3cSmrg      case $cc_basename in
7449145b7b3cSmrg        xlc*)
7450145b7b3cSmrg         output_verbose_link_cmd='echo'
7451145b7b3cSmrg         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
7452145b7b3cSmrg         _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
7453145b7b3cSmrg          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
7454145b7b3cSmrg         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
7455145b7b3cSmrg          _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
7456145b7b3cSmrg          ;;
7457145b7b3cSmrg       *)
7458145b7b3cSmrg         _LT_AC_TAGVAR(ld_shlibs, $1)=no
7459145b7b3cSmrg          ;;
7460145b7b3cSmrg      esac
7461145b7b3cSmrg    fi
7462145b7b3cSmrg      ;;
7463145b7b3cSmrg
7464145b7b3cSmrg    dgux*)
7465145b7b3cSmrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7466145b7b3cSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7467145b7b3cSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7468145b7b3cSmrg      ;;
7469145b7b3cSmrg
7470145b7b3cSmrg    freebsd1*)
7471145b7b3cSmrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
7472145b7b3cSmrg      ;;
7473145b7b3cSmrg
7474145b7b3cSmrg    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
7475145b7b3cSmrg    # support.  Future versions do this automatically, but an explicit c++rt0.o
7476145b7b3cSmrg    # does not break anything, and helps significantly (at the cost of a little
7477145b7b3cSmrg    # extra space).
7478145b7b3cSmrg    freebsd2.2*)
7479145b7b3cSmrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
7480145b7b3cSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7481145b7b3cSmrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
7482145b7b3cSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7483145b7b3cSmrg      ;;
7484145b7b3cSmrg
7485145b7b3cSmrg    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
7486145b7b3cSmrg    freebsd2*)
7487145b7b3cSmrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
7488145b7b3cSmrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
7489145b7b3cSmrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
7490145b7b3cSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7491145b7b3cSmrg      ;;
7492145b7b3cSmrg
7493145b7b3cSmrg    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
7494145b7b3cSmrg    freebsd* | kfreebsd*-gnu | dragonfly*)
7495145b7b3cSmrg      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
7496145b7b3cSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7497145b7b3cSmrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
7498145b7b3cSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7499145b7b3cSmrg      ;;
7500145b7b3cSmrg
7501145b7b3cSmrg    hpux9*)
7502145b7b3cSmrg      if test "$GCC" = yes; then
7503145b7b3cSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
7504145b7b3cSmrg      else
7505145b7b3cSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
7506145b7b3cSmrg      fi
7507145b7b3cSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
7508145b7b3cSmrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
7509145b7b3cSmrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
7510145b7b3cSmrg
7511145b7b3cSmrg      # hardcode_minus_L: Not really in the search PATH,
7512145b7b3cSmrg      # but as the default location of the library.
7513145b7b3cSmrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
7514145b7b3cSmrg      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7515145b7b3cSmrg      ;;
7516145b7b3cSmrg
7517145b7b3cSmrg    hpux10*)
7518145b7b3cSmrg      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
7519145b7b3cSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
7520145b7b3cSmrg      else
7521145b7b3cSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
7522145b7b3cSmrg      fi
7523145b7b3cSmrg      if test "$with_gnu_ld" = no; then
7524145b7b3cSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
7525145b7b3cSmrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
7526145b7b3cSmrg
7527145b7b3cSmrg	_LT_AC_TAGVAR(hardcode_direct, $1)=yes
7528145b7b3cSmrg	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7529145b7b3cSmrg
7530145b7b3cSmrg	# hardcode_minus_L: Not really in the search PATH,
7531145b7b3cSmrg	# but as the default location of the library.
7532145b7b3cSmrg	_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
7533145b7b3cSmrg      fi
7534145b7b3cSmrg      ;;
7535145b7b3cSmrg
7536145b7b3cSmrg    hpux11*)
7537145b7b3cSmrg      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
7538145b7b3cSmrg	case $host_cpu in
7539145b7b3cSmrg	hppa*64*)
7540145b7b3cSmrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
7541145b7b3cSmrg	  ;;
7542145b7b3cSmrg	ia64*)
7543145b7b3cSmrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
7544145b7b3cSmrg	  ;;
7545145b7b3cSmrg	*)
7546145b7b3cSmrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
7547145b7b3cSmrg	  ;;
7548145b7b3cSmrg	esac
7549145b7b3cSmrg      else
7550145b7b3cSmrg	case $host_cpu in
7551145b7b3cSmrg	hppa*64*)
7552145b7b3cSmrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
7553145b7b3cSmrg	  ;;
7554145b7b3cSmrg	ia64*)
7555145b7b3cSmrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
7556145b7b3cSmrg	  ;;
7557145b7b3cSmrg	*)
7558145b7b3cSmrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
7559145b7b3cSmrg	  ;;
7560145b7b3cSmrg	esac
7561145b7b3cSmrg      fi
7562145b7b3cSmrg      if test "$with_gnu_ld" = no; then
7563145b7b3cSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
7564145b7b3cSmrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
7565145b7b3cSmrg
7566145b7b3cSmrg	case $host_cpu in
7567145b7b3cSmrg	hppa*64*|ia64*)
7568145b7b3cSmrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
7569145b7b3cSmrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=no
7570145b7b3cSmrg	  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7571145b7b3cSmrg	  ;;
7572145b7b3cSmrg	*)
7573145b7b3cSmrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes
7574145b7b3cSmrg	  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7575145b7b3cSmrg
7576145b7b3cSmrg	  # hardcode_minus_L: Not really in the search PATH,
7577145b7b3cSmrg	  # but as the default location of the library.
7578145b7b3cSmrg	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
7579145b7b3cSmrg	  ;;
7580145b7b3cSmrg	esac
7581145b7b3cSmrg      fi
7582145b7b3cSmrg      ;;
7583145b7b3cSmrg
7584145b7b3cSmrg    irix5* | irix6* | nonstopux*)
7585145b7b3cSmrg      if test "$GCC" = yes; then
7586145b7b3cSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
7587145b7b3cSmrg      else
7588145b7b3cSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
7589145b7b3cSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
7590145b7b3cSmrg      fi
7591145b7b3cSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7592145b7b3cSmrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
7593145b7b3cSmrg      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
7594145b7b3cSmrg      ;;
7595145b7b3cSmrg
7596145b7b3cSmrg    netbsd*)
7597145b7b3cSmrg      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
7598145b7b3cSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
7599145b7b3cSmrg      else
7600145b7b3cSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
7601145b7b3cSmrg      fi
7602145b7b3cSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7603145b7b3cSmrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
7604145b7b3cSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7605145b7b3cSmrg      ;;
7606145b7b3cSmrg
7607145b7b3cSmrg    newsos6)
7608145b7b3cSmrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7609145b7b3cSmrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
7610145b7b3cSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7611145b7b3cSmrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
7612145b7b3cSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7613145b7b3cSmrg      ;;
7614145b7b3cSmrg
7615145b7b3cSmrg    openbsd*)
7616145b7b3cSmrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
7617145b7b3cSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7618145b7b3cSmrg      if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
7619145b7b3cSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
7620145b7b3cSmrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
7621145b7b3cSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7622145b7b3cSmrg	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7623145b7b3cSmrg      else
7624145b7b3cSmrg       case $host_os in
7625145b7b3cSmrg	 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
7626145b7b3cSmrg	   _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
7627145b7b3cSmrg	   _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7628145b7b3cSmrg	   ;;
7629145b7b3cSmrg	 *)
7630145b7b3cSmrg	   _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
7631145b7b3cSmrg	   _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7632145b7b3cSmrg	   ;;
7633145b7b3cSmrg       esac
7634145b7b3cSmrg      fi
7635145b7b3cSmrg      ;;
7636145b7b3cSmrg
7637145b7b3cSmrg    os2*)
7638145b7b3cSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7639145b7b3cSmrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
7640145b7b3cSmrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
7641145b7b3cSmrg      _LT_AC_TAGVAR(archive_cmds, $1)='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
7642145b7b3cSmrg      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
7643145b7b3cSmrg      ;;
7644145b7b3cSmrg
7645145b7b3cSmrg    osf3*)
7646145b7b3cSmrg      if test "$GCC" = yes; then
7647145b7b3cSmrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
7648145b7b3cSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
7649145b7b3cSmrg      else
7650145b7b3cSmrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
7651145b7b3cSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
7652145b7b3cSmrg      fi
7653145b7b3cSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7654145b7b3cSmrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
7655145b7b3cSmrg      ;;
7656145b7b3cSmrg
7657145b7b3cSmrg    osf4* | osf5*)	# as osf3* with the addition of -msym flag
7658145b7b3cSmrg      if test "$GCC" = yes; then
7659145b7b3cSmrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
7660145b7b3cSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
7661145b7b3cSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7662145b7b3cSmrg      else
7663145b7b3cSmrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
7664145b7b3cSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
7665145b7b3cSmrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
7666145b7b3cSmrg	$LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp'
7667145b7b3cSmrg
7668145b7b3cSmrg	# Both c and cxx compiler support -rpath directly
7669145b7b3cSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
7670145b7b3cSmrg      fi
7671145b7b3cSmrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
7672145b7b3cSmrg      ;;
7673145b7b3cSmrg
7674145b7b3cSmrg    solaris*)
7675145b7b3cSmrg      _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
7676145b7b3cSmrg      if test "$GCC" = yes; then
7677145b7b3cSmrg	wlarc='${wl}'
7678145b7b3cSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
7679145b7b3cSmrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
7680145b7b3cSmrg	  $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
7681145b7b3cSmrg      else
7682145b7b3cSmrg	wlarc=''
7683145b7b3cSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
7684145b7b3cSmrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
7685145b7b3cSmrg  	$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
7686145b7b3cSmrg      fi
7687145b7b3cSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7688145b7b3cSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7689145b7b3cSmrg      case $host_os in
7690145b7b3cSmrg      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
7691145b7b3cSmrg      *)
7692145b7b3cSmrg 	# The compiler driver will combine linker options so we
7693145b7b3cSmrg 	# cannot just pass the convience library names through
7694145b7b3cSmrg 	# without $wl, iff we do not link with $LD.
7695145b7b3cSmrg 	# Luckily, gcc supports the same syntax we need for Sun Studio.
7696145b7b3cSmrg 	# Supported since Solaris 2.6 (maybe 2.5.1?)
7697145b7b3cSmrg 	case $wlarc in
7698145b7b3cSmrg 	'')
7699145b7b3cSmrg 	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
7700145b7b3cSmrg 	*)
7701145b7b3cSmrg 	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;;
7702145b7b3cSmrg 	esac ;;
7703145b7b3cSmrg      esac
7704145b7b3cSmrg      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
7705145b7b3cSmrg      ;;
7706145b7b3cSmrg
7707145b7b3cSmrg    sunos4*)
7708145b7b3cSmrg      if test "x$host_vendor" = xsequent; then
7709145b7b3cSmrg	# Use $CC to link under sequent, because it throws in some extra .o
7710145b7b3cSmrg	# files that make .init and .fini sections work.
7711145b7b3cSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
7712145b7b3cSmrg      else
7713145b7b3cSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
7714145b7b3cSmrg      fi
7715145b7b3cSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7716145b7b3cSmrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
7717145b7b3cSmrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
7718145b7b3cSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7719145b7b3cSmrg      ;;
7720145b7b3cSmrg
7721145b7b3cSmrg    sysv4)
7722145b7b3cSmrg      case $host_vendor in
7723145b7b3cSmrg	sni)
7724145b7b3cSmrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7725145b7b3cSmrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
7726145b7b3cSmrg	;;
7727145b7b3cSmrg	siemens)
7728145b7b3cSmrg	  ## LD is ld it makes a PLAMLIB
7729145b7b3cSmrg	  ## CC just makes a GrossModule.
7730145b7b3cSmrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
7731145b7b3cSmrg	  _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
7732145b7b3cSmrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=no
7733145b7b3cSmrg        ;;
7734145b7b3cSmrg	motorola)
7735145b7b3cSmrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7736145b7b3cSmrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
7737145b7b3cSmrg	;;
7738145b7b3cSmrg      esac
7739145b7b3cSmrg      runpath_var='LD_RUN_PATH'
7740145b7b3cSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7741145b7b3cSmrg      ;;
7742145b7b3cSmrg
7743145b7b3cSmrg    sysv4.3*)
7744145b7b3cSmrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7745145b7b3cSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7746145b7b3cSmrg      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
7747145b7b3cSmrg      ;;
7748145b7b3cSmrg
7749145b7b3cSmrg    sysv4*MP*)
7750145b7b3cSmrg      if test -d /usr/nec; then
7751145b7b3cSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7752145b7b3cSmrg	_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7753145b7b3cSmrg	runpath_var=LD_RUN_PATH
7754145b7b3cSmrg	hardcode_runpath_var=yes
7755145b7b3cSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=yes
7756145b7b3cSmrg      fi
7757145b7b3cSmrg      ;;
7758145b7b3cSmrg
7759145b7b3cSmrg    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7*)
7760145b7b3cSmrg      _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
7761145b7b3cSmrg      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
7762145b7b3cSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7763145b7b3cSmrg      runpath_var='LD_RUN_PATH'
7764145b7b3cSmrg
7765145b7b3cSmrg      if test "$GCC" = yes; then
7766145b7b3cSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7767145b7b3cSmrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7768145b7b3cSmrg      else
7769145b7b3cSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7770145b7b3cSmrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7771145b7b3cSmrg      fi
7772145b7b3cSmrg      ;;
7773145b7b3cSmrg
7774145b7b3cSmrg    sysv5* | sco3.2v5* | sco5v6*)
7775145b7b3cSmrg      # Note: We can NOT use -z defs as we might desire, because we do not
7776145b7b3cSmrg      # link with -lc, and that would cause any symbols used from libc to
7777145b7b3cSmrg      # always be unresolved, which means just about no library would
7778145b7b3cSmrg      # ever link correctly.  If we're not using GNU ld we use -z text
7779145b7b3cSmrg      # though, which does catch some bad symbols but isn't as heavy-handed
7780145b7b3cSmrg      # as -z defs.
7781145b7b3cSmrg      _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
7782145b7b3cSmrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
7783145b7b3cSmrg      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
7784145b7b3cSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7785145b7b3cSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
7786145b7b3cSmrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
7787145b7b3cSmrg      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
7788145b7b3cSmrg      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
7789145b7b3cSmrg      runpath_var='LD_RUN_PATH'
7790145b7b3cSmrg
7791145b7b3cSmrg      if test "$GCC" = yes; then
7792145b7b3cSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
7793145b7b3cSmrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
7794145b7b3cSmrg      else
7795145b7b3cSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
7796145b7b3cSmrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
7797145b7b3cSmrg      fi
7798145b7b3cSmrg      ;;
7799145b7b3cSmrg
7800145b7b3cSmrg    uts4*)
7801145b7b3cSmrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7802145b7b3cSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7803145b7b3cSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7804145b7b3cSmrg      ;;
7805145b7b3cSmrg
7806145b7b3cSmrg    *)
7807145b7b3cSmrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
7808145b7b3cSmrg      ;;
7809145b7b3cSmrg    esac
7810145b7b3cSmrg  fi
7811145b7b3cSmrg])
7812145b7b3cSmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
7813145b7b3cSmrgtest "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
7814145b7b3cSmrg
7815145b7b3cSmrg#
7816145b7b3cSmrg# Do we need to explicitly link libc?
7817145b7b3cSmrg#
7818145b7b3cSmrgcase "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
7819145b7b3cSmrgx|xyes)
7820145b7b3cSmrg  # Assume -lc should be added
7821145b7b3cSmrg  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
7822145b7b3cSmrg
7823145b7b3cSmrg  if test "$enable_shared" = yes && test "$GCC" = yes; then
7824145b7b3cSmrg    case $_LT_AC_TAGVAR(archive_cmds, $1) in
7825145b7b3cSmrg    *'~'*)
7826145b7b3cSmrg      # FIXME: we may have to deal with multi-command sequences.
7827145b7b3cSmrg      ;;
7828145b7b3cSmrg    '$CC '*)
7829145b7b3cSmrg      # Test whether the compiler implicitly links with -lc since on some
7830145b7b3cSmrg      # systems, -lgcc has to come before -lc. If gcc already passes -lc
7831145b7b3cSmrg      # to ld, don't add -lc before -lgcc.
7832145b7b3cSmrg      AC_MSG_CHECKING([whether -lc should be explicitly linked in])
7833145b7b3cSmrg      $rm conftest*
7834145b7b3cSmrg      printf "$lt_simple_compile_test_code" > conftest.$ac_ext
7835145b7b3cSmrg
7836145b7b3cSmrg      if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
7837145b7b3cSmrg        soname=conftest
7838145b7b3cSmrg        lib=conftest
7839145b7b3cSmrg        libobjs=conftest.$ac_objext
7840145b7b3cSmrg        deplibs=
7841145b7b3cSmrg        wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
7842145b7b3cSmrg	pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
7843145b7b3cSmrg        compiler_flags=-v
7844145b7b3cSmrg        linker_flags=-v
7845145b7b3cSmrg        verstring=
7846145b7b3cSmrg        output_objdir=.
7847145b7b3cSmrg        libname=conftest
7848145b7b3cSmrg        lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
7849145b7b3cSmrg        _LT_AC_TAGVAR(allow_undefined_flag, $1)=
7850145b7b3cSmrg        if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
7851145b7b3cSmrg        then
7852145b7b3cSmrg	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
7853145b7b3cSmrg        else
7854145b7b3cSmrg	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
7855145b7b3cSmrg        fi
7856145b7b3cSmrg        _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
7857145b7b3cSmrg      else
7858145b7b3cSmrg        cat conftest.err 1>&5
7859145b7b3cSmrg      fi
7860145b7b3cSmrg      $rm conftest*
7861145b7b3cSmrg      AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
7862145b7b3cSmrg      ;;
7863145b7b3cSmrg    esac
7864145b7b3cSmrg  fi
7865145b7b3cSmrg  ;;
7866145b7b3cSmrgesac
7867145b7b3cSmrg])# AC_LIBTOOL_PROG_LD_SHLIBS
7868145b7b3cSmrg
7869145b7b3cSmrg
7870145b7b3cSmrg# _LT_AC_FILE_LTDLL_C
7871145b7b3cSmrg# -------------------
7872145b7b3cSmrg# Be careful that the start marker always follows a newline.
7873145b7b3cSmrgAC_DEFUN([_LT_AC_FILE_LTDLL_C], [
7874145b7b3cSmrg# /* ltdll.c starts here */
7875145b7b3cSmrg# #define WIN32_LEAN_AND_MEAN
7876145b7b3cSmrg# #include <windows.h>
7877145b7b3cSmrg# #undef WIN32_LEAN_AND_MEAN
7878145b7b3cSmrg# #include <stdio.h>
7879145b7b3cSmrg#
7880145b7b3cSmrg# #ifndef __CYGWIN__
7881145b7b3cSmrg# #  ifdef __CYGWIN32__
7882145b7b3cSmrg# #    define __CYGWIN__ __CYGWIN32__
7883145b7b3cSmrg# #  endif
7884145b7b3cSmrg# #endif
7885145b7b3cSmrg#
7886145b7b3cSmrg# #ifdef __cplusplus
7887145b7b3cSmrg# extern "C" {
7888145b7b3cSmrg# #endif
7889145b7b3cSmrg# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
7890145b7b3cSmrg# #ifdef __cplusplus
7891145b7b3cSmrg# }
7892145b7b3cSmrg# #endif
7893145b7b3cSmrg#
7894145b7b3cSmrg# #ifdef __CYGWIN__
7895145b7b3cSmrg# #include <cygwin/cygwin_dll.h>
7896145b7b3cSmrg# DECLARE_CYGWIN_DLL( DllMain );
7897145b7b3cSmrg# #endif
7898145b7b3cSmrg# HINSTANCE __hDllInstance_base;
7899145b7b3cSmrg#
7900145b7b3cSmrg# BOOL APIENTRY
7901145b7b3cSmrg# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
7902145b7b3cSmrg# {
7903145b7b3cSmrg#   __hDllInstance_base = hInst;
7904145b7b3cSmrg#   return TRUE;
7905145b7b3cSmrg# }
7906145b7b3cSmrg# /* ltdll.c ends here */
7907145b7b3cSmrg])# _LT_AC_FILE_LTDLL_C
7908145b7b3cSmrg
7909145b7b3cSmrg
7910145b7b3cSmrg# _LT_AC_TAGVAR(VARNAME, [TAGNAME])
7911145b7b3cSmrg# ---------------------------------
7912145b7b3cSmrgAC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
7913145b7b3cSmrg
7914145b7b3cSmrg
7915145b7b3cSmrg# old names
7916145b7b3cSmrgAC_DEFUN([AM_PROG_LIBTOOL],   [AC_PROG_LIBTOOL])
7917145b7b3cSmrgAC_DEFUN([AM_ENABLE_SHARED],  [AC_ENABLE_SHARED($@)])
7918145b7b3cSmrgAC_DEFUN([AM_ENABLE_STATIC],  [AC_ENABLE_STATIC($@)])
7919145b7b3cSmrgAC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
7920145b7b3cSmrgAC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
7921145b7b3cSmrgAC_DEFUN([AM_PROG_LD],        [AC_PROG_LD])
7922145b7b3cSmrgAC_DEFUN([AM_PROG_NM],        [AC_PROG_NM])
7923145b7b3cSmrg
7924145b7b3cSmrg# This is just to silence aclocal about the macro not being used
7925145b7b3cSmrgifelse([AC_DISABLE_FAST_INSTALL])
7926145b7b3cSmrg
7927145b7b3cSmrgAC_DEFUN([LT_AC_PROG_GCJ],
7928145b7b3cSmrg[AC_CHECK_TOOL(GCJ, gcj, no)
7929145b7b3cSmrg  test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
7930145b7b3cSmrg  AC_SUBST(GCJFLAGS)
7931145b7b3cSmrg])
7932145b7b3cSmrg
7933145b7b3cSmrgAC_DEFUN([LT_AC_PROG_RC],
7934145b7b3cSmrg[AC_CHECK_TOOL(RC, windres, no)
7935145b7b3cSmrg])
7936145b7b3cSmrg
7937145b7b3cSmrg# NOTE: This macro has been submitted for inclusion into   #
7938145b7b3cSmrg#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
7939145b7b3cSmrg#  a released version of Autoconf we should remove this    #
7940145b7b3cSmrg#  macro and use it instead.                               #
7941145b7b3cSmrg# LT_AC_PROG_SED
7942145b7b3cSmrg# --------------
7943145b7b3cSmrg# Check for a fully-functional sed program, that truncates
7944145b7b3cSmrg# as few characters as possible.  Prefer GNU sed if found.
7945145b7b3cSmrgAC_DEFUN([LT_AC_PROG_SED],
7946145b7b3cSmrg[AC_MSG_CHECKING([for a sed that does not truncate output])
7947145b7b3cSmrgAC_CACHE_VAL(lt_cv_path_SED,
7948145b7b3cSmrg[# Loop through the user's path and test for sed and gsed.
7949145b7b3cSmrg# Then use that list of sed's as ones to test for truncation.
7950145b7b3cSmrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7951145b7b3cSmrgfor as_dir in $PATH
7952145b7b3cSmrgdo
7953145b7b3cSmrg  IFS=$as_save_IFS
7954145b7b3cSmrg  test -z "$as_dir" && as_dir=.
7955145b7b3cSmrg  for lt_ac_prog in sed gsed; do
7956145b7b3cSmrg    for ac_exec_ext in '' $ac_executable_extensions; do
7957145b7b3cSmrg      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
7958145b7b3cSmrg        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
7959145b7b3cSmrg      fi
7960145b7b3cSmrg    done
7961145b7b3cSmrg  done
7962145b7b3cSmrgdone
7963145b7b3cSmrglt_ac_max=0
7964145b7b3cSmrglt_ac_count=0
7965145b7b3cSmrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris
7966145b7b3cSmrg# along with /bin/sed that truncates output.
7967145b7b3cSmrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
7968145b7b3cSmrg  test ! -f $lt_ac_sed && continue
7969145b7b3cSmrg  cat /dev/null > conftest.in
7970145b7b3cSmrg  lt_ac_count=0
7971145b7b3cSmrg  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
7972145b7b3cSmrg  # Check for GNU sed and select it if it is found.
7973145b7b3cSmrg  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
7974145b7b3cSmrg    lt_cv_path_SED=$lt_ac_sed
7975145b7b3cSmrg    break
7976145b7b3cSmrg  fi
7977145b7b3cSmrg  while true; do
7978145b7b3cSmrg    cat conftest.in conftest.in >conftest.tmp
7979145b7b3cSmrg    mv conftest.tmp conftest.in
7980145b7b3cSmrg    cp conftest.in conftest.nl
7981145b7b3cSmrg    echo >>conftest.nl
7982145b7b3cSmrg    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
7983145b7b3cSmrg    cmp -s conftest.out conftest.nl || break
7984145b7b3cSmrg    # 10000 chars as input seems more than enough
7985145b7b3cSmrg    test $lt_ac_count -gt 10 && break
7986145b7b3cSmrg    lt_ac_count=`expr $lt_ac_count + 1`
7987145b7b3cSmrg    if test $lt_ac_count -gt $lt_ac_max; then
7988145b7b3cSmrg      lt_ac_max=$lt_ac_count
7989145b7b3cSmrg      lt_cv_path_SED=$lt_ac_sed
7990145b7b3cSmrg    fi
7991145b7b3cSmrg  done
7992145b7b3cSmrgdone
7993145b7b3cSmrg])
7994145b7b3cSmrgSED=$lt_cv_path_SED
7995145b7b3cSmrgAC_MSG_RESULT([$SED])
7996145b7b3cSmrg])
7997145b7b3cSmrg
7998145b7b3cSmrg# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
7999145b7b3cSmrg# 
8000145b7b3cSmrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
8001145b7b3cSmrg#
8002145b7b3cSmrg# This program is free software; you can redistribute it and/or modify
8003145b7b3cSmrg# it under the terms of the GNU General Public License as published by
8004145b7b3cSmrg# the Free Software Foundation; either version 2 of the License, or
8005145b7b3cSmrg# (at your option) any later version.
8006145b7b3cSmrg#
8007145b7b3cSmrg# This program is distributed in the hope that it will be useful, but
8008145b7b3cSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of
8009145b7b3cSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
8010145b7b3cSmrg# General Public License for more details.
8011145b7b3cSmrg#
8012145b7b3cSmrg# You should have received a copy of the GNU General Public License
8013145b7b3cSmrg# along with this program; if not, write to the Free Software
8014145b7b3cSmrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
8015145b7b3cSmrg#
8016145b7b3cSmrg# As a special exception to the GNU General Public License, if you
8017145b7b3cSmrg# distribute this file as part of a program that contains a
8018145b7b3cSmrg# configuration script generated by Autoconf, you may include it under
8019145b7b3cSmrg# the same distribution terms that you use for the rest of that program.
8020145b7b3cSmrg
8021145b7b3cSmrg# PKG_PROG_PKG_CONFIG([MIN-VERSION])
8022145b7b3cSmrg# ----------------------------------
8023145b7b3cSmrgAC_DEFUN([PKG_PROG_PKG_CONFIG],
8024145b7b3cSmrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
8025145b7b3cSmrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$])
8026145b7b3cSmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
8027145b7b3cSmrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
8028145b7b3cSmrg	AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
8029145b7b3cSmrgfi
8030145b7b3cSmrgif test -n "$PKG_CONFIG"; then
8031145b7b3cSmrg	_pkg_min_version=m4_ifval([$1], [$1], [0.9.0])
8032145b7b3cSmrg	AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
8033145b7b3cSmrg	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
8034145b7b3cSmrg		AC_MSG_RESULT([yes])
8035145b7b3cSmrg	else
8036145b7b3cSmrg		AC_MSG_RESULT([no])
8037145b7b3cSmrg		PKG_CONFIG=""
8038145b7b3cSmrg	fi
8039145b7b3cSmrg		
8040145b7b3cSmrgfi[]dnl
8041145b7b3cSmrg])# PKG_PROG_PKG_CONFIG
8042145b7b3cSmrg
8043145b7b3cSmrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
8044145b7b3cSmrg#
8045145b7b3cSmrg# Check to see whether a particular set of modules exists.  Similar
8046145b7b3cSmrg# to PKG_CHECK_MODULES(), but does not set variables or print errors.
8047145b7b3cSmrg#
8048145b7b3cSmrg#
8049145b7b3cSmrg# Similar to PKG_CHECK_MODULES, make sure that the first instance of
8050145b7b3cSmrg# this or PKG_CHECK_MODULES is called, or make sure to call
8051145b7b3cSmrg# PKG_CHECK_EXISTS manually
8052145b7b3cSmrg# --------------------------------------------------------------
8053145b7b3cSmrgAC_DEFUN([PKG_CHECK_EXISTS],
8054145b7b3cSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
8055145b7b3cSmrgif test -n "$PKG_CONFIG" && \
8056145b7b3cSmrg    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
8057145b7b3cSmrg  m4_ifval([$2], [$2], [:])
8058145b7b3cSmrgm4_ifvaln([$3], [else
8059145b7b3cSmrg  $3])dnl
8060145b7b3cSmrgfi])
8061145b7b3cSmrg
8062145b7b3cSmrg
8063145b7b3cSmrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
8064145b7b3cSmrg# ---------------------------------------------
8065145b7b3cSmrgm4_define([_PKG_CONFIG],
8066145b7b3cSmrg[if test -n "$PKG_CONFIG"; then
8067145b7b3cSmrg        PKG_CHECK_EXISTS([$3],
8068145b7b3cSmrg                         [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
8069145b7b3cSmrg			 [pkg_failed=yes])
8070145b7b3cSmrgelse
8071145b7b3cSmrg	pkg_failed=untried
8072145b7b3cSmrgfi[]dnl
8073145b7b3cSmrg])# _PKG_CONFIG
8074145b7b3cSmrg
8075145b7b3cSmrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
8076145b7b3cSmrg# [ACTION-IF-NOT-FOUND])
8077145b7b3cSmrg#
8078145b7b3cSmrg#
8079145b7b3cSmrg# Note that if there is a possibility the first call to
8080145b7b3cSmrg# PKG_CHECK_MODULES might not happen, you should be sure to include an
8081145b7b3cSmrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
8082145b7b3cSmrg#
8083145b7b3cSmrg#
8084145b7b3cSmrg# --------------------------------------------------------------
8085145b7b3cSmrgAC_DEFUN([PKG_CHECK_MODULES],
8086145b7b3cSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
8087145b7b3cSmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
8088145b7b3cSmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
8089145b7b3cSmrg
8090145b7b3cSmrgpkg_failed=no
8091145b7b3cSmrgAC_MSG_CHECKING([for $1])
8092145b7b3cSmrg
8093145b7b3cSmrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
8094145b7b3cSmrg_PKG_CONFIG([$1][_LIBS], [libs], [$2])
8095145b7b3cSmrg
8096145b7b3cSmrgif test $pkg_failed = yes; then
8097145b7b3cSmrg	$1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
8098145b7b3cSmrg	# Put the nasty error message in config.log where it belongs
8099145b7b3cSmrg	echo "$$1[]_PKG_ERRORS" 1>&AS_MESSAGE_LOG_FD
8100145b7b3cSmrg
8101145b7b3cSmrg	ifelse([$4], , [AC_MSG_ERROR(dnl
8102145b7b3cSmrg[Package requirements ($2) were not met.
8103145b7b3cSmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you
8104145b7b3cSmrginstalled software in a non-standard prefix.
8105145b7b3cSmrg
8106145b7b3cSmrgAlternatively you may set the $1_CFLAGS and $1_LIBS environment variables
8107145b7b3cSmrgto avoid the need to call pkg-config.  See the pkg-config man page for
8108145b7b3cSmrgmore details.])],
8109145b7b3cSmrg		[$4])
8110145b7b3cSmrgelif test $pkg_failed = untried; then
8111145b7b3cSmrg	ifelse([$4], , [AC_MSG_FAILURE(dnl
8112145b7b3cSmrg[The pkg-config script could not be found or is too old.  Make sure it
8113145b7b3cSmrgis in your PATH or set the PKG_CONFIG environment variable to the full
8114145b7b3cSmrgpath to pkg-config.
8115145b7b3cSmrg
8116145b7b3cSmrgAlternatively you may set the $1_CFLAGS and $1_LIBS environment variables
8117145b7b3cSmrgto avoid the need to call pkg-config.  See the pkg-config man page for
8118145b7b3cSmrgmore details.
8119145b7b3cSmrg
8120145b7b3cSmrgTo get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.])],
8121145b7b3cSmrg		[$4])
8122145b7b3cSmrgelse
8123145b7b3cSmrg	$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
8124145b7b3cSmrg	$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
8125145b7b3cSmrg        AC_MSG_RESULT([yes])
8126145b7b3cSmrg	ifelse([$3], , :, [$3])
8127145b7b3cSmrgfi[]dnl
8128145b7b3cSmrg])# PKG_CHECK_MODULES
8129145b7b3cSmrg
8130145b7b3cSmrgm4_include([acinclude.m4])
8131