aclocal.m4 revision 266e564d
1266e564dSmrg# generated automatically by aclocal 1.10 -*- Autoconf -*-
2266e564dSmrg
3266e564dSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4266e564dSmrg# 2005, 2006  Free Software Foundation, Inc.
5266e564dSmrg# This file is free software; the Free Software Foundation
6266e564dSmrg# gives unlimited permission to copy and/or distribute it,
7266e564dSmrg# with or without modifications, as long as this notice is preserved.
8266e564dSmrg
9266e564dSmrg# This program is distributed in the hope that it will be useful,
10266e564dSmrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11266e564dSmrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12266e564dSmrg# PARTICULAR PURPOSE.
13266e564dSmrg
14266e564dSmrgm4_if(m4_PACKAGE_VERSION, [2.61],,
15266e564dSmrg[m4_fatal([this file was generated for autoconf 2.61.
16266e564dSmrgYou have another version of autoconf.  If you want to use that,
17266e564dSmrgyou should regenerate the build system entirely.], [63])])
18266e564dSmrg
19266e564dSmrg# Copyright (C) 2002, 2003, 2005, 2006  Free Software Foundation, Inc.
20266e564dSmrg#
21266e564dSmrg# This file is free software; the Free Software Foundation
22266e564dSmrg# gives unlimited permission to copy and/or distribute it,
23266e564dSmrg# with or without modifications, as long as this notice is preserved.
24266e564dSmrg
25266e564dSmrg# AM_AUTOMAKE_VERSION(VERSION)
26266e564dSmrg# ----------------------------
27266e564dSmrg# Automake X.Y traces this macro to ensure aclocal.m4 has been
28266e564dSmrg# generated from the m4 files accompanying Automake X.Y.
29266e564dSmrg# (This private macro should not be called outside this file.)
30266e564dSmrgAC_DEFUN([AM_AUTOMAKE_VERSION],
31266e564dSmrg[am__api_version='1.10'
32266e564dSmrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
33266e564dSmrgdnl require some minimum version.  Point them to the right macro.
34266e564dSmrgm4_if([$1], [1.10], [],
35266e564dSmrg      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
36266e564dSmrg])
37266e564dSmrg
38266e564dSmrg# _AM_AUTOCONF_VERSION(VERSION)
39266e564dSmrg# -----------------------------
40266e564dSmrg# aclocal traces this macro to find the Autoconf version.
41266e564dSmrg# This is a private macro too.  Using m4_define simplifies
42266e564dSmrg# the logic in aclocal, which can simply ignore this definition.
43266e564dSmrgm4_define([_AM_AUTOCONF_VERSION], [])
44266e564dSmrg
45266e564dSmrg# AM_SET_CURRENT_AUTOMAKE_VERSION
46266e564dSmrg# -------------------------------
47266e564dSmrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
48266e564dSmrg# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
49266e564dSmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
50266e564dSmrg[AM_AUTOMAKE_VERSION([1.10])dnl
51266e564dSmrg_AM_AUTOCONF_VERSION(m4_PACKAGE_VERSION)])
52266e564dSmrg
53266e564dSmrg# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
54266e564dSmrg
55266e564dSmrg# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
56266e564dSmrg#
57266e564dSmrg# This file is free software; the Free Software Foundation
58266e564dSmrg# gives unlimited permission to copy and/or distribute it,
59266e564dSmrg# with or without modifications, as long as this notice is preserved.
60266e564dSmrg
61266e564dSmrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
62266e564dSmrg# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
63266e564dSmrg# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
64266e564dSmrg#
65266e564dSmrg# Of course, Automake must honor this variable whenever it calls a
66266e564dSmrg# tool from the auxiliary directory.  The problem is that $srcdir (and
67266e564dSmrg# therefore $ac_aux_dir as well) can be either absolute or relative,
68266e564dSmrg# depending on how configure is run.  This is pretty annoying, since
69266e564dSmrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top
70266e564dSmrg# source directory, any form will work fine, but in subdirectories a
71266e564dSmrg# relative path needs to be adjusted first.
72266e564dSmrg#
73266e564dSmrg# $ac_aux_dir/missing
74266e564dSmrg#    fails when called from a subdirectory if $ac_aux_dir is relative
75266e564dSmrg# $top_srcdir/$ac_aux_dir/missing
76266e564dSmrg#    fails if $ac_aux_dir is absolute,
77266e564dSmrg#    fails when called from a subdirectory in a VPATH build with
78266e564dSmrg#          a relative $ac_aux_dir
79266e564dSmrg#
80266e564dSmrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
81266e564dSmrg# are both prefixed by $srcdir.  In an in-source build this is usually
82266e564dSmrg# harmless because $srcdir is `.', but things will broke when you
83266e564dSmrg# start a VPATH build or use an absolute $srcdir.
84266e564dSmrg#
85266e564dSmrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
86266e564dSmrg# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
87266e564dSmrg#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
88266e564dSmrg# and then we would define $MISSING as
89266e564dSmrg#   MISSING="\${SHELL} $am_aux_dir/missing"
90266e564dSmrg# This will work as long as MISSING is not called from configure, because
91266e564dSmrg# unfortunately $(top_srcdir) has no meaning in configure.
92266e564dSmrg# However there are other variables, like CC, which are often used in
93266e564dSmrg# configure, and could therefore not use this "fixed" $ac_aux_dir.
94266e564dSmrg#
95266e564dSmrg# Another solution, used here, is to always expand $ac_aux_dir to an
96266e564dSmrg# absolute PATH.  The drawback is that using absolute paths prevent a
97266e564dSmrg# configured tree to be moved without reconfiguration.
98266e564dSmrg
99266e564dSmrgAC_DEFUN([AM_AUX_DIR_EXPAND],
100266e564dSmrg[dnl Rely on autoconf to set up CDPATH properly.
101266e564dSmrgAC_PREREQ([2.50])dnl
102266e564dSmrg# expand $ac_aux_dir to an absolute path
103266e564dSmrgam_aux_dir=`cd $ac_aux_dir && pwd`
104266e564dSmrg])
105266e564dSmrg
106266e564dSmrg# AM_CONDITIONAL                                            -*- Autoconf -*-
107266e564dSmrg
108266e564dSmrg# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006
109266e564dSmrg# Free Software Foundation, Inc.
110266e564dSmrg#
111266e564dSmrg# This file is free software; the Free Software Foundation
112266e564dSmrg# gives unlimited permission to copy and/or distribute it,
113266e564dSmrg# with or without modifications, as long as this notice is preserved.
114266e564dSmrg
115266e564dSmrg# serial 8
116266e564dSmrg
117266e564dSmrg# AM_CONDITIONAL(NAME, SHELL-CONDITION)
118266e564dSmrg# -------------------------------------
119266e564dSmrg# Define a conditional.
120266e564dSmrgAC_DEFUN([AM_CONDITIONAL],
121266e564dSmrg[AC_PREREQ(2.52)dnl
122266e564dSmrg ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
123266e564dSmrg	[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
124266e564dSmrgAC_SUBST([$1_TRUE])dnl
125266e564dSmrgAC_SUBST([$1_FALSE])dnl
126266e564dSmrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl
127266e564dSmrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl
128266e564dSmrgif $2; then
129266e564dSmrg  $1_TRUE=
130266e564dSmrg  $1_FALSE='#'
131266e564dSmrgelse
132266e564dSmrg  $1_TRUE='#'
133266e564dSmrg  $1_FALSE=
134266e564dSmrgfi
135266e564dSmrgAC_CONFIG_COMMANDS_PRE(
136266e564dSmrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
137266e564dSmrg  AC_MSG_ERROR([[conditional "$1" was never defined.
138266e564dSmrgUsually this means the macro was only invoked conditionally.]])
139266e564dSmrgfi])])
140266e564dSmrg
141266e564dSmrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
142266e564dSmrg# Free Software Foundation, Inc.
143266e564dSmrg#
144266e564dSmrg# This file is free software; the Free Software Foundation
145266e564dSmrg# gives unlimited permission to copy and/or distribute it,
146266e564dSmrg# with or without modifications, as long as this notice is preserved.
147266e564dSmrg
148266e564dSmrg# serial 9
149266e564dSmrg
150266e564dSmrg# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
151266e564dSmrg# written in clear, in which case automake, when reading aclocal.m4,
152266e564dSmrg# will think it sees a *use*, and therefore will trigger all it's
153266e564dSmrg# C support machinery.  Also note that it means that autoscan, seeing
154266e564dSmrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
155266e564dSmrg
156266e564dSmrg
157266e564dSmrg# _AM_DEPENDENCIES(NAME)
158266e564dSmrg# ----------------------
159266e564dSmrg# See how the compiler implements dependency checking.
160266e564dSmrg# NAME is "CC", "CXX", "GCJ", or "OBJC".
161266e564dSmrg# We try a few techniques and use that to set a single cache variable.
162266e564dSmrg#
163266e564dSmrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
164266e564dSmrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
165266e564dSmrg# dependency, and given that the user is not expected to run this macro,
166266e564dSmrg# just rely on AC_PROG_CC.
167266e564dSmrgAC_DEFUN([_AM_DEPENDENCIES],
168266e564dSmrg[AC_REQUIRE([AM_SET_DEPDIR])dnl
169266e564dSmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
170266e564dSmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl
171266e564dSmrgAC_REQUIRE([AM_DEP_TRACK])dnl
172266e564dSmrg
173266e564dSmrgifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
174266e564dSmrg       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
175266e564dSmrg       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
176266e564dSmrg       [$1], UPC,  [depcc="$UPC"  am_compiler_list=],
177266e564dSmrg       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
178266e564dSmrg                   [depcc="$$1"   am_compiler_list=])
179266e564dSmrg
180266e564dSmrgAC_CACHE_CHECK([dependency style of $depcc],
181266e564dSmrg               [am_cv_$1_dependencies_compiler_type],
182266e564dSmrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
183266e564dSmrg  # We make a subdir and do the tests there.  Otherwise we can end up
184266e564dSmrg  # making bogus files that we don't know about and never remove.  For
185266e564dSmrg  # instance it was reported that on HP-UX the gcc test will end up
186266e564dSmrg  # making a dummy file named `D' -- because `-MD' means `put the output
187266e564dSmrg  # in D'.
188266e564dSmrg  mkdir conftest.dir
189266e564dSmrg  # Copy depcomp to subdir because otherwise we won't find it if we're
190266e564dSmrg  # using a relative directory.
191266e564dSmrg  cp "$am_depcomp" conftest.dir
192266e564dSmrg  cd conftest.dir
193266e564dSmrg  # We will build objects and dependencies in a subdirectory because
194266e564dSmrg  # it helps to detect inapplicable dependency modes.  For instance
195266e564dSmrg  # both Tru64's cc and ICC support -MD to output dependencies as a
196266e564dSmrg  # side effect of compilation, but ICC will put the dependencies in
197266e564dSmrg  # the current directory while Tru64 will put them in the object
198266e564dSmrg  # directory.
199266e564dSmrg  mkdir sub
200266e564dSmrg
201266e564dSmrg  am_cv_$1_dependencies_compiler_type=none
202266e564dSmrg  if test "$am_compiler_list" = ""; then
203266e564dSmrg     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
204266e564dSmrg  fi
205266e564dSmrg  for depmode in $am_compiler_list; do
206266e564dSmrg    # Setup a source with many dependencies, because some compilers
207266e564dSmrg    # like to wrap large dependency lists on column 80 (with \), and
208266e564dSmrg    # we should not choose a depcomp mode which is confused by this.
209266e564dSmrg    #
210266e564dSmrg    # We need to recreate these files for each test, as the compiler may
211266e564dSmrg    # overwrite some of them when testing with obscure command lines.
212266e564dSmrg    # This happens at least with the AIX C compiler.
213266e564dSmrg    : > sub/conftest.c
214266e564dSmrg    for i in 1 2 3 4 5 6; do
215266e564dSmrg      echo '#include "conftst'$i'.h"' >> sub/conftest.c
216266e564dSmrg      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
217266e564dSmrg      # Solaris 8's {/usr,}/bin/sh.
218266e564dSmrg      touch sub/conftst$i.h
219266e564dSmrg    done
220266e564dSmrg    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
221266e564dSmrg
222266e564dSmrg    case $depmode in
223266e564dSmrg    nosideeffect)
224266e564dSmrg      # after this tag, mechanisms are not by side-effect, so they'll
225266e564dSmrg      # only be used when explicitly requested
226266e564dSmrg      if test "x$enable_dependency_tracking" = xyes; then
227266e564dSmrg	continue
228266e564dSmrg      else
229266e564dSmrg	break
230266e564dSmrg      fi
231266e564dSmrg      ;;
232266e564dSmrg    none) break ;;
233266e564dSmrg    esac
234266e564dSmrg    # We check with `-c' and `-o' for the sake of the "dashmstdout"
235266e564dSmrg    # mode.  It turns out that the SunPro C++ compiler does not properly
236266e564dSmrg    # handle `-M -o', and we need to detect this.
237266e564dSmrg    if depmode=$depmode \
238266e564dSmrg       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
239266e564dSmrg       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
240266e564dSmrg       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
241266e564dSmrg         >/dev/null 2>conftest.err &&
242266e564dSmrg       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
243266e564dSmrg       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
244266e564dSmrg       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
245266e564dSmrg       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
246266e564dSmrg      # icc doesn't choke on unknown options, it will just issue warnings
247266e564dSmrg      # or remarks (even with -Werror).  So we grep stderr for any message
248266e564dSmrg      # that says an option was ignored or not supported.
249266e564dSmrg      # When given -MP, icc 7.0 and 7.1 complain thusly:
250266e564dSmrg      #   icc: Command line warning: ignoring option '-M'; no argument required
251266e564dSmrg      # The diagnosis changed in icc 8.0:
252266e564dSmrg      #   icc: Command line remark: option '-MP' not supported
253266e564dSmrg      if (grep 'ignoring option' conftest.err ||
254266e564dSmrg          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
255266e564dSmrg        am_cv_$1_dependencies_compiler_type=$depmode
256266e564dSmrg        break
257266e564dSmrg      fi
258266e564dSmrg    fi
259266e564dSmrg  done
260266e564dSmrg
261266e564dSmrg  cd ..
262266e564dSmrg  rm -rf conftest.dir
263266e564dSmrgelse
264266e564dSmrg  am_cv_$1_dependencies_compiler_type=none
265266e564dSmrgfi
266266e564dSmrg])
267266e564dSmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
268266e564dSmrgAM_CONDITIONAL([am__fastdep$1], [
269266e564dSmrg  test "x$enable_dependency_tracking" != xno \
270266e564dSmrg  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
271266e564dSmrg])
272266e564dSmrg
273266e564dSmrg
274266e564dSmrg# AM_SET_DEPDIR
275266e564dSmrg# -------------
276266e564dSmrg# Choose a directory name for dependency files.
277266e564dSmrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES
278266e564dSmrgAC_DEFUN([AM_SET_DEPDIR],
279266e564dSmrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
280266e564dSmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
281266e564dSmrg])
282266e564dSmrg
283266e564dSmrg
284266e564dSmrg# AM_DEP_TRACK
285266e564dSmrg# ------------
286266e564dSmrgAC_DEFUN([AM_DEP_TRACK],
287266e564dSmrg[AC_ARG_ENABLE(dependency-tracking,
288266e564dSmrg[  --disable-dependency-tracking  speeds up one-time build
289266e564dSmrg  --enable-dependency-tracking   do not reject slow dependency extractors])
290266e564dSmrgif test "x$enable_dependency_tracking" != xno; then
291266e564dSmrg  am_depcomp="$ac_aux_dir/depcomp"
292266e564dSmrg  AMDEPBACKSLASH='\'
293266e564dSmrgfi
294266e564dSmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
295266e564dSmrgAC_SUBST([AMDEPBACKSLASH])dnl
296266e564dSmrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
297266e564dSmrg])
298266e564dSmrg
299266e564dSmrg# Generate code to set up dependency tracking.              -*- Autoconf -*-
300266e564dSmrg
301266e564dSmrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
302266e564dSmrg# Free Software Foundation, Inc.
303266e564dSmrg#
304266e564dSmrg# This file is free software; the Free Software Foundation
305266e564dSmrg# gives unlimited permission to copy and/or distribute it,
306266e564dSmrg# with or without modifications, as long as this notice is preserved.
307266e564dSmrg
308266e564dSmrg#serial 3
309266e564dSmrg
310266e564dSmrg# _AM_OUTPUT_DEPENDENCY_COMMANDS
311266e564dSmrg# ------------------------------
312266e564dSmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
313266e564dSmrg[for mf in $CONFIG_FILES; do
314266e564dSmrg  # Strip MF so we end up with the name of the file.
315266e564dSmrg  mf=`echo "$mf" | sed -e 's/:.*$//'`
316266e564dSmrg  # Check whether this is an Automake generated Makefile or not.
317266e564dSmrg  # We used to match only the files named `Makefile.in', but
318266e564dSmrg  # some people rename them; so instead we look at the file content.
319266e564dSmrg  # Grep'ing the first line is not enough: some people post-process
320266e564dSmrg  # each Makefile.in and add a new line on top of each file to say so.
321266e564dSmrg  # Grep'ing the whole file is not good either: AIX grep has a line
322266e564dSmrg  # limit of 2048, but all sed's we know have understand at least 4000.
323266e564dSmrg  if sed 10q "$mf" | grep '^#.*generated by automake' > /dev/null 2>&1; then
324266e564dSmrg    dirpart=`AS_DIRNAME("$mf")`
325266e564dSmrg  else
326266e564dSmrg    continue
327266e564dSmrg  fi
328266e564dSmrg  # Extract the definition of DEPDIR, am__include, and am__quote
329266e564dSmrg  # from the Makefile without running `make'.
330266e564dSmrg  DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
331266e564dSmrg  test -z "$DEPDIR" && continue
332266e564dSmrg  am__include=`sed -n 's/^am__include = //p' < "$mf"`
333266e564dSmrg  test -z "am__include" && continue
334266e564dSmrg  am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
335266e564dSmrg  # When using ansi2knr, U may be empty or an underscore; expand it
336266e564dSmrg  U=`sed -n 's/^U = //p' < "$mf"`
337266e564dSmrg  # Find all dependency output files, they are included files with
338266e564dSmrg  # $(DEPDIR) in their names.  We invoke sed twice because it is the
339266e564dSmrg  # simplest approach to changing $(DEPDIR) to its actual value in the
340266e564dSmrg  # expansion.
341266e564dSmrg  for file in `sed -n "
342266e564dSmrg    s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
343266e564dSmrg       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
344266e564dSmrg    # Make sure the directory exists.
345266e564dSmrg    test -f "$dirpart/$file" && continue
346266e564dSmrg    fdir=`AS_DIRNAME(["$file"])`
347266e564dSmrg    AS_MKDIR_P([$dirpart/$fdir])
348266e564dSmrg    # echo "creating $dirpart/$file"
349266e564dSmrg    echo '# dummy' > "$dirpart/$file"
350266e564dSmrg  done
351266e564dSmrgdone
352266e564dSmrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS
353266e564dSmrg
354266e564dSmrg
355266e564dSmrg# AM_OUTPUT_DEPENDENCY_COMMANDS
356266e564dSmrg# -----------------------------
357266e564dSmrg# This macro should only be invoked once -- use via AC_REQUIRE.
358266e564dSmrg#
359266e564dSmrg# This code is only required when automatic dependency tracking
360266e564dSmrg# is enabled.  FIXME.  This creates each `.P' file that we will
361266e564dSmrg# need in order to bootstrap the dependency handling code.
362266e564dSmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
363266e564dSmrg[AC_CONFIG_COMMANDS([depfiles],
364266e564dSmrg     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
365266e564dSmrg     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
366266e564dSmrg])
367266e564dSmrg
368266e564dSmrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
369266e564dSmrg# Free Software Foundation, Inc.
370266e564dSmrg#
371266e564dSmrg# This file is free software; the Free Software Foundation
372266e564dSmrg# gives unlimited permission to copy and/or distribute it,
373266e564dSmrg# with or without modifications, as long as this notice is preserved.
374266e564dSmrg
375266e564dSmrg# serial 8
376266e564dSmrg
377266e564dSmrg# AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
378266e564dSmrgAU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
379266e564dSmrg
380266e564dSmrg# Do all the work for Automake.                             -*- Autoconf -*-
381266e564dSmrg
382266e564dSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
383266e564dSmrg# 2005, 2006 Free Software Foundation, Inc.
384266e564dSmrg#
385266e564dSmrg# This file is free software; the Free Software Foundation
386266e564dSmrg# gives unlimited permission to copy and/or distribute it,
387266e564dSmrg# with or without modifications, as long as this notice is preserved.
388266e564dSmrg
389266e564dSmrg# serial 12
390266e564dSmrg
391266e564dSmrg# This macro actually does too much.  Some checks are only needed if
392266e564dSmrg# your package does certain things.  But this isn't really a big deal.
393266e564dSmrg
394266e564dSmrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
395266e564dSmrg# AM_INIT_AUTOMAKE([OPTIONS])
396266e564dSmrg# -----------------------------------------------
397266e564dSmrg# The call with PACKAGE and VERSION arguments is the old style
398266e564dSmrg# call (pre autoconf-2.50), which is being phased out.  PACKAGE
399266e564dSmrg# and VERSION should now be passed to AC_INIT and removed from
400266e564dSmrg# the call to AM_INIT_AUTOMAKE.
401266e564dSmrg# We support both call styles for the transition.  After
402266e564dSmrg# the next Automake release, Autoconf can make the AC_INIT
403266e564dSmrg# arguments mandatory, and then we can depend on a new Autoconf
404266e564dSmrg# release and drop the old call support.
405266e564dSmrgAC_DEFUN([AM_INIT_AUTOMAKE],
406266e564dSmrg[AC_PREREQ([2.60])dnl
407266e564dSmrgdnl Autoconf wants to disallow AM_ names.  We explicitly allow
408266e564dSmrgdnl the ones we care about.
409266e564dSmrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
410266e564dSmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
411266e564dSmrgAC_REQUIRE([AC_PROG_INSTALL])dnl
412266e564dSmrgif test "`cd $srcdir && pwd`" != "`pwd`"; then
413266e564dSmrg  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
414266e564dSmrg  # is not polluted with repeated "-I."
415266e564dSmrg  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
416266e564dSmrg  # test to see if srcdir already configured
417266e564dSmrg  if test -f $srcdir/config.status; then
418266e564dSmrg    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
419266e564dSmrg  fi
420266e564dSmrgfi
421266e564dSmrg
422266e564dSmrg# test whether we have cygpath
423266e564dSmrgif test -z "$CYGPATH_W"; then
424266e564dSmrg  if (cygpath --version) >/dev/null 2>/dev/null; then
425266e564dSmrg    CYGPATH_W='cygpath -w'
426266e564dSmrg  else
427266e564dSmrg    CYGPATH_W=echo
428266e564dSmrg  fi
429266e564dSmrgfi
430266e564dSmrgAC_SUBST([CYGPATH_W])
431266e564dSmrg
432266e564dSmrg# Define the identity of the package.
433266e564dSmrgdnl Distinguish between old-style and new-style calls.
434266e564dSmrgm4_ifval([$2],
435266e564dSmrg[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
436266e564dSmrg AC_SUBST([PACKAGE], [$1])dnl
437266e564dSmrg AC_SUBST([VERSION], [$2])],
438266e564dSmrg[_AM_SET_OPTIONS([$1])dnl
439266e564dSmrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
440266e564dSmrgm4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
441266e564dSmrg  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
442266e564dSmrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
443266e564dSmrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
444266e564dSmrg
445266e564dSmrg_AM_IF_OPTION([no-define],,
446266e564dSmrg[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
447266e564dSmrg AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
448266e564dSmrg
449266e564dSmrg# Some tools Automake needs.
450266e564dSmrgAC_REQUIRE([AM_SANITY_CHECK])dnl
451266e564dSmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl
452266e564dSmrgAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
453266e564dSmrgAM_MISSING_PROG(AUTOCONF, autoconf)
454266e564dSmrgAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
455266e564dSmrgAM_MISSING_PROG(AUTOHEADER, autoheader)
456266e564dSmrgAM_MISSING_PROG(MAKEINFO, makeinfo)
457266e564dSmrgAM_PROG_INSTALL_SH
458266e564dSmrgAM_PROG_INSTALL_STRIP
459266e564dSmrgAC_REQUIRE([AM_PROG_MKDIR_P])dnl
460266e564dSmrg# We need awk for the "check" target.  The system "awk" is bad on
461266e564dSmrg# some platforms.
462266e564dSmrgAC_REQUIRE([AC_PROG_AWK])dnl
463266e564dSmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl
464266e564dSmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl
465266e564dSmrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
466266e564dSmrg              [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
467266e564dSmrg	      		     [_AM_PROG_TAR([v7])])])
468266e564dSmrg_AM_IF_OPTION([no-dependencies],,
469266e564dSmrg[AC_PROVIDE_IFELSE([AC_PROG_CC],
470266e564dSmrg                  [_AM_DEPENDENCIES(CC)],
471266e564dSmrg                  [define([AC_PROG_CC],
472266e564dSmrg                          defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
473266e564dSmrgAC_PROVIDE_IFELSE([AC_PROG_CXX],
474266e564dSmrg                  [_AM_DEPENDENCIES(CXX)],
475266e564dSmrg                  [define([AC_PROG_CXX],
476266e564dSmrg                          defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
477266e564dSmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC],
478266e564dSmrg                  [_AM_DEPENDENCIES(OBJC)],
479266e564dSmrg                  [define([AC_PROG_OBJC],
480266e564dSmrg                          defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
481266e564dSmrg])
482266e564dSmrg])
483266e564dSmrg
484266e564dSmrg
485266e564dSmrg# When config.status generates a header, we must update the stamp-h file.
486266e564dSmrg# This file resides in the same directory as the config header
487266e564dSmrg# that is generated.  The stamp files are numbered to have different names.
488266e564dSmrg
489266e564dSmrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
490266e564dSmrg# loop where config.status creates the headers, so we can generate
491266e564dSmrg# our stamp files there.
492266e564dSmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
493266e564dSmrg[# Compute $1's index in $config_headers.
494266e564dSmrg_am_stamp_count=1
495266e564dSmrgfor _am_header in $config_headers :; do
496266e564dSmrg  case $_am_header in
497266e564dSmrg    $1 | $1:* )
498266e564dSmrg      break ;;
499266e564dSmrg    * )
500266e564dSmrg      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
501266e564dSmrg  esac
502266e564dSmrgdone
503266e564dSmrgecho "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
504266e564dSmrg
505266e564dSmrg# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
506266e564dSmrg#
507266e564dSmrg# This file is free software; the Free Software Foundation
508266e564dSmrg# gives unlimited permission to copy and/or distribute it,
509266e564dSmrg# with or without modifications, as long as this notice is preserved.
510266e564dSmrg
511266e564dSmrg# AM_PROG_INSTALL_SH
512266e564dSmrg# ------------------
513266e564dSmrg# Define $install_sh.
514266e564dSmrgAC_DEFUN([AM_PROG_INSTALL_SH],
515266e564dSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
516266e564dSmrginstall_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"}
517266e564dSmrgAC_SUBST(install_sh)])
518266e564dSmrg
519266e564dSmrg# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
520266e564dSmrg#
521266e564dSmrg# This file is free software; the Free Software Foundation
522266e564dSmrg# gives unlimited permission to copy and/or distribute it,
523266e564dSmrg# with or without modifications, as long as this notice is preserved.
524266e564dSmrg
525266e564dSmrg# serial 2
526266e564dSmrg
527266e564dSmrg# Check whether the underlying file-system supports filenames
528266e564dSmrg# with a leading dot.  For instance MS-DOS doesn't.
529266e564dSmrgAC_DEFUN([AM_SET_LEADING_DOT],
530266e564dSmrg[rm -rf .tst 2>/dev/null
531266e564dSmrgmkdir .tst 2>/dev/null
532266e564dSmrgif test -d .tst; then
533266e564dSmrg  am__leading_dot=.
534266e564dSmrgelse
535266e564dSmrg  am__leading_dot=_
536266e564dSmrgfi
537266e564dSmrgrmdir .tst 2>/dev/null
538266e564dSmrgAC_SUBST([am__leading_dot])])
539266e564dSmrg
540266e564dSmrg# Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
541266e564dSmrg# From Jim Meyering
542266e564dSmrg
543266e564dSmrg# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005
544266e564dSmrg# Free Software Foundation, Inc.
545266e564dSmrg#
546266e564dSmrg# This file is free software; the Free Software Foundation
547266e564dSmrg# gives unlimited permission to copy and/or distribute it,
548266e564dSmrg# with or without modifications, as long as this notice is preserved.
549266e564dSmrg
550266e564dSmrg# serial 4
551266e564dSmrg
552266e564dSmrgAC_DEFUN([AM_MAINTAINER_MODE],
553266e564dSmrg[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
554266e564dSmrg  dnl maintainer-mode is disabled by default
555266e564dSmrg  AC_ARG_ENABLE(maintainer-mode,
556266e564dSmrg[  --enable-maintainer-mode  enable make rules and dependencies not useful
557266e564dSmrg			  (and sometimes confusing) to the casual installer],
558266e564dSmrg      USE_MAINTAINER_MODE=$enableval,
559266e564dSmrg      USE_MAINTAINER_MODE=no)
560266e564dSmrg  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
561266e564dSmrg  AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
562266e564dSmrg  MAINT=$MAINTAINER_MODE_TRUE
563266e564dSmrg  AC_SUBST(MAINT)dnl
564266e564dSmrg]
565266e564dSmrg)
566266e564dSmrg
567266e564dSmrgAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
568266e564dSmrg
569266e564dSmrg# Check to see how 'make' treats includes.	            -*- Autoconf -*-
570266e564dSmrg
571266e564dSmrg# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
572266e564dSmrg#
573266e564dSmrg# This file is free software; the Free Software Foundation
574266e564dSmrg# gives unlimited permission to copy and/or distribute it,
575266e564dSmrg# with or without modifications, as long as this notice is preserved.
576266e564dSmrg
577266e564dSmrg# serial 3
578266e564dSmrg
579266e564dSmrg# AM_MAKE_INCLUDE()
580266e564dSmrg# -----------------
581266e564dSmrg# Check to see how make treats includes.
582266e564dSmrgAC_DEFUN([AM_MAKE_INCLUDE],
583266e564dSmrg[am_make=${MAKE-make}
584266e564dSmrgcat > confinc << 'END'
585266e564dSmrgam__doit:
586266e564dSmrg	@echo done
587266e564dSmrg.PHONY: am__doit
588266e564dSmrgEND
589266e564dSmrg# If we don't find an include directive, just comment out the code.
590266e564dSmrgAC_MSG_CHECKING([for style of include used by $am_make])
591266e564dSmrgam__include="#"
592266e564dSmrgam__quote=
593266e564dSmrg_am_result=none
594266e564dSmrg# First try GNU make style include.
595266e564dSmrgecho "include confinc" > confmf
596266e564dSmrg# We grep out `Entering directory' and `Leaving directory'
597266e564dSmrg# messages which can occur if `w' ends up in MAKEFLAGS.
598266e564dSmrg# In particular we don't look at `^make:' because GNU make might
599266e564dSmrg# be invoked under some other name (usually "gmake"), in which
600266e564dSmrg# case it prints its new name instead of `make'.
601266e564dSmrgif test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
602266e564dSmrg   am__include=include
603266e564dSmrg   am__quote=
604266e564dSmrg   _am_result=GNU
605266e564dSmrgfi
606266e564dSmrg# Now try BSD make style include.
607266e564dSmrgif test "$am__include" = "#"; then
608266e564dSmrg   echo '.include "confinc"' > confmf
609266e564dSmrg   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
610266e564dSmrg      am__include=.include
611266e564dSmrg      am__quote="\""
612266e564dSmrg      _am_result=BSD
613266e564dSmrg   fi
614266e564dSmrgfi
615266e564dSmrgAC_SUBST([am__include])
616266e564dSmrgAC_SUBST([am__quote])
617266e564dSmrgAC_MSG_RESULT([$_am_result])
618266e564dSmrgrm -f confinc confmf
619266e564dSmrg])
620266e564dSmrg
621266e564dSmrg# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
622266e564dSmrg
623266e564dSmrg# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005
624266e564dSmrg# Free Software Foundation, Inc.
625266e564dSmrg#
626266e564dSmrg# This file is free software; the Free Software Foundation
627266e564dSmrg# gives unlimited permission to copy and/or distribute it,
628266e564dSmrg# with or without modifications, as long as this notice is preserved.
629266e564dSmrg
630266e564dSmrg# serial 5
631266e564dSmrg
632266e564dSmrg# AM_MISSING_PROG(NAME, PROGRAM)
633266e564dSmrg# ------------------------------
634266e564dSmrgAC_DEFUN([AM_MISSING_PROG],
635266e564dSmrg[AC_REQUIRE([AM_MISSING_HAS_RUN])
636266e564dSmrg$1=${$1-"${am_missing_run}$2"}
637266e564dSmrgAC_SUBST($1)])
638266e564dSmrg
639266e564dSmrg
640266e564dSmrg# AM_MISSING_HAS_RUN
641266e564dSmrg# ------------------
642266e564dSmrg# Define MISSING if not defined so far and test if it supports --run.
643266e564dSmrg# If it does, set am_missing_run to use it, otherwise, to nothing.
644266e564dSmrgAC_DEFUN([AM_MISSING_HAS_RUN],
645266e564dSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
646266e564dSmrgAC_REQUIRE_AUX_FILE([missing])dnl
647266e564dSmrgtest x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
648266e564dSmrg# Use eval to expand $SHELL
649266e564dSmrgif eval "$MISSING --run true"; then
650266e564dSmrg  am_missing_run="$MISSING --run "
651266e564dSmrgelse
652266e564dSmrg  am_missing_run=
653266e564dSmrg  AC_MSG_WARN([`missing' script is too old or missing])
654266e564dSmrgfi
655266e564dSmrg])
656266e564dSmrg
657266e564dSmrg# Copyright (C) 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
658266e564dSmrg#
659266e564dSmrg# This file is free software; the Free Software Foundation
660266e564dSmrg# gives unlimited permission to copy and/or distribute it,
661266e564dSmrg# with or without modifications, as long as this notice is preserved.
662266e564dSmrg
663266e564dSmrg# AM_PROG_MKDIR_P
664266e564dSmrg# ---------------
665266e564dSmrg# Check for `mkdir -p'.
666266e564dSmrgAC_DEFUN([AM_PROG_MKDIR_P],
667266e564dSmrg[AC_PREREQ([2.60])dnl
668266e564dSmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl
669266e564dSmrgdnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
670266e564dSmrgdnl while keeping a definition of mkdir_p for backward compatibility.
671266e564dSmrgdnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
672266e564dSmrgdnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
673266e564dSmrgdnl Makefile.ins that do not define MKDIR_P, so we do our own
674266e564dSmrgdnl adjustment using top_builddir (which is defined more often than
675266e564dSmrgdnl MKDIR_P).
676266e564dSmrgAC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
677266e564dSmrgcase $mkdir_p in
678266e564dSmrg  [[\\/$]]* | ?:[[\\/]]*) ;;
679266e564dSmrg  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
680266e564dSmrgesac
681266e564dSmrg])
682266e564dSmrg
683266e564dSmrg# Helper functions for option handling.                     -*- Autoconf -*-
684266e564dSmrg
685266e564dSmrg# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
686266e564dSmrg#
687266e564dSmrg# This file is free software; the Free Software Foundation
688266e564dSmrg# gives unlimited permission to copy and/or distribute it,
689266e564dSmrg# with or without modifications, as long as this notice is preserved.
690266e564dSmrg
691266e564dSmrg# serial 3
692266e564dSmrg
693266e564dSmrg# _AM_MANGLE_OPTION(NAME)
694266e564dSmrg# -----------------------
695266e564dSmrgAC_DEFUN([_AM_MANGLE_OPTION],
696266e564dSmrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
697266e564dSmrg
698266e564dSmrg# _AM_SET_OPTION(NAME)
699266e564dSmrg# ------------------------------
700266e564dSmrg# Set option NAME.  Presently that only means defining a flag for this option.
701266e564dSmrgAC_DEFUN([_AM_SET_OPTION],
702266e564dSmrg[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
703266e564dSmrg
704266e564dSmrg# _AM_SET_OPTIONS(OPTIONS)
705266e564dSmrg# ----------------------------------
706266e564dSmrg# OPTIONS is a space-separated list of Automake options.
707266e564dSmrgAC_DEFUN([_AM_SET_OPTIONS],
708266e564dSmrg[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
709266e564dSmrg
710266e564dSmrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
711266e564dSmrg# -------------------------------------------
712266e564dSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
713266e564dSmrgAC_DEFUN([_AM_IF_OPTION],
714266e564dSmrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
715266e564dSmrg
716266e564dSmrg# Check to make sure that the build environment is sane.    -*- Autoconf -*-
717266e564dSmrg
718266e564dSmrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
719266e564dSmrg# Free Software Foundation, Inc.
720266e564dSmrg#
721266e564dSmrg# This file is free software; the Free Software Foundation
722266e564dSmrg# gives unlimited permission to copy and/or distribute it,
723266e564dSmrg# with or without modifications, as long as this notice is preserved.
724266e564dSmrg
725266e564dSmrg# serial 4
726266e564dSmrg
727266e564dSmrg# AM_SANITY_CHECK
728266e564dSmrg# ---------------
729266e564dSmrgAC_DEFUN([AM_SANITY_CHECK],
730266e564dSmrg[AC_MSG_CHECKING([whether build environment is sane])
731266e564dSmrg# Just in case
732266e564dSmrgsleep 1
733266e564dSmrgecho timestamp > conftest.file
734266e564dSmrg# Do `set' in a subshell so we don't clobber the current shell's
735266e564dSmrg# arguments.  Must try -L first in case configure is actually a
736266e564dSmrg# symlink; some systems play weird games with the mod time of symlinks
737266e564dSmrg# (eg FreeBSD returns the mod time of the symlink's containing
738266e564dSmrg# directory).
739266e564dSmrgif (
740266e564dSmrg   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
741266e564dSmrg   if test "$[*]" = "X"; then
742266e564dSmrg      # -L didn't work.
743266e564dSmrg      set X `ls -t $srcdir/configure conftest.file`
744266e564dSmrg   fi
745266e564dSmrg   rm -f conftest.file
746266e564dSmrg   if test "$[*]" != "X $srcdir/configure conftest.file" \
747266e564dSmrg      && test "$[*]" != "X conftest.file $srcdir/configure"; then
748266e564dSmrg
749266e564dSmrg      # If neither matched, then we have a broken ls.  This can happen
750266e564dSmrg      # if, for instance, CONFIG_SHELL is bash and it inherits a
751266e564dSmrg      # broken ls alias from the environment.  This has actually
752266e564dSmrg      # happened.  Such a system could not be considered "sane".
753266e564dSmrg      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
754266e564dSmrgalias in your environment])
755266e564dSmrg   fi
756266e564dSmrg
757266e564dSmrg   test "$[2]" = conftest.file
758266e564dSmrg   )
759266e564dSmrgthen
760266e564dSmrg   # Ok.
761266e564dSmrg   :
762266e564dSmrgelse
763266e564dSmrg   AC_MSG_ERROR([newly created file is older than distributed files!
764266e564dSmrgCheck your system clock])
765266e564dSmrgfi
766266e564dSmrgAC_MSG_RESULT(yes)])
767266e564dSmrg
768266e564dSmrg# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
769266e564dSmrg#
770266e564dSmrg# This file is free software; the Free Software Foundation
771266e564dSmrg# gives unlimited permission to copy and/or distribute it,
772266e564dSmrg# with or without modifications, as long as this notice is preserved.
773266e564dSmrg
774266e564dSmrg# AM_PROG_INSTALL_STRIP
775266e564dSmrg# ---------------------
776266e564dSmrg# One issue with vendor `install' (even GNU) is that you can't
777266e564dSmrg# specify the program used to strip binaries.  This is especially
778266e564dSmrg# annoying in cross-compiling environments, where the build's strip
779266e564dSmrg# is unlikely to handle the host's binaries.
780266e564dSmrg# Fortunately install-sh will honor a STRIPPROG variable, so we
781266e564dSmrg# always use install-sh in `make install-strip', and initialize
782266e564dSmrg# STRIPPROG with the value of the STRIP variable (set by the user).
783266e564dSmrgAC_DEFUN([AM_PROG_INSTALL_STRIP],
784266e564dSmrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
785266e564dSmrg# Installed binaries are usually stripped using `strip' when the user
786266e564dSmrg# run `make install-strip'.  However `strip' might not be the right
787266e564dSmrg# tool to use in cross-compilation environments, therefore Automake
788266e564dSmrg# will honor the `STRIP' environment variable to overrule this program.
789266e564dSmrgdnl Don't test for $cross_compiling = yes, because it might be `maybe'.
790266e564dSmrgif test "$cross_compiling" != no; then
791266e564dSmrg  AC_CHECK_TOOL([STRIP], [strip], :)
792266e564dSmrgfi
793266e564dSmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
794266e564dSmrgAC_SUBST([INSTALL_STRIP_PROGRAM])])
795266e564dSmrg
796266e564dSmrg# Copyright (C) 2006  Free Software Foundation, Inc.
797266e564dSmrg#
798266e564dSmrg# This file is free software; the Free Software Foundation
799266e564dSmrg# gives unlimited permission to copy and/or distribute it,
800266e564dSmrg# with or without modifications, as long as this notice is preserved.
801266e564dSmrg
802266e564dSmrg# _AM_SUBST_NOTMAKE(VARIABLE)
803266e564dSmrg# ---------------------------
804266e564dSmrg# Prevent Automake from outputing VARIABLE = @VARIABLE@ in Makefile.in.
805266e564dSmrg# This macro is traced by Automake.
806266e564dSmrgAC_DEFUN([_AM_SUBST_NOTMAKE])
807266e564dSmrg
808266e564dSmrg# Check how to create a tarball.                            -*- Autoconf -*-
809266e564dSmrg
810266e564dSmrg# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
811266e564dSmrg#
812266e564dSmrg# This file is free software; the Free Software Foundation
813266e564dSmrg# gives unlimited permission to copy and/or distribute it,
814266e564dSmrg# with or without modifications, as long as this notice is preserved.
815266e564dSmrg
816266e564dSmrg# serial 2
817266e564dSmrg
818266e564dSmrg# _AM_PROG_TAR(FORMAT)
819266e564dSmrg# --------------------
820266e564dSmrg# Check how to create a tarball in format FORMAT.
821266e564dSmrg# FORMAT should be one of `v7', `ustar', or `pax'.
822266e564dSmrg#
823266e564dSmrg# Substitute a variable $(am__tar) that is a command
824266e564dSmrg# writing to stdout a FORMAT-tarball containing the directory
825266e564dSmrg# $tardir.
826266e564dSmrg#     tardir=directory && $(am__tar) > result.tar
827266e564dSmrg#
828266e564dSmrg# Substitute a variable $(am__untar) that extract such
829266e564dSmrg# a tarball read from stdin.
830266e564dSmrg#     $(am__untar) < result.tar
831266e564dSmrgAC_DEFUN([_AM_PROG_TAR],
832266e564dSmrg[# Always define AMTAR for backward compatibility.
833266e564dSmrgAM_MISSING_PROG([AMTAR], [tar])
834266e564dSmrgm4_if([$1], [v7],
835266e564dSmrg     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
836266e564dSmrg     [m4_case([$1], [ustar],, [pax],,
837266e564dSmrg              [m4_fatal([Unknown tar format])])
838266e564dSmrgAC_MSG_CHECKING([how to create a $1 tar archive])
839266e564dSmrg# Loop over all known methods to create a tar archive until one works.
840266e564dSmrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
841266e564dSmrg_am_tools=${am_cv_prog_tar_$1-$_am_tools}
842266e564dSmrg# Do not fold the above two line into one, because Tru64 sh and
843266e564dSmrg# Solaris sh will not grok spaces in the rhs of `-'.
844266e564dSmrgfor _am_tool in $_am_tools
845266e564dSmrgdo
846266e564dSmrg  case $_am_tool in
847266e564dSmrg  gnutar)
848266e564dSmrg    for _am_tar in tar gnutar gtar;
849266e564dSmrg    do
850266e564dSmrg      AM_RUN_LOG([$_am_tar --version]) && break
851266e564dSmrg    done
852266e564dSmrg    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
853266e564dSmrg    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
854266e564dSmrg    am__untar="$_am_tar -xf -"
855266e564dSmrg    ;;
856266e564dSmrg  plaintar)
857266e564dSmrg    # Must skip GNU tar: if it does not support --format= it doesn't create
858266e564dSmrg    # ustar tarball either.
859266e564dSmrg    (tar --version) >/dev/null 2>&1 && continue
860266e564dSmrg    am__tar='tar chf - "$$tardir"'
861266e564dSmrg    am__tar_='tar chf - "$tardir"'
862266e564dSmrg    am__untar='tar xf -'
863266e564dSmrg    ;;
864266e564dSmrg  pax)
865266e564dSmrg    am__tar='pax -L -x $1 -w "$$tardir"'
866266e564dSmrg    am__tar_='pax -L -x $1 -w "$tardir"'
867266e564dSmrg    am__untar='pax -r'
868266e564dSmrg    ;;
869266e564dSmrg  cpio)
870266e564dSmrg    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
871266e564dSmrg    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
872266e564dSmrg    am__untar='cpio -i -H $1 -d'
873266e564dSmrg    ;;
874266e564dSmrg  none)
875266e564dSmrg    am__tar=false
876266e564dSmrg    am__tar_=false
877266e564dSmrg    am__untar=false
878266e564dSmrg    ;;
879266e564dSmrg  esac
880266e564dSmrg
881266e564dSmrg  # If the value was cached, stop now.  We just wanted to have am__tar
882266e564dSmrg  # and am__untar set.
883266e564dSmrg  test -n "${am_cv_prog_tar_$1}" && break
884266e564dSmrg
885266e564dSmrg  # tar/untar a dummy directory, and stop if the command works
886266e564dSmrg  rm -rf conftest.dir
887266e564dSmrg  mkdir conftest.dir
888266e564dSmrg  echo GrepMe > conftest.dir/file
889266e564dSmrg  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
890266e564dSmrg  rm -rf conftest.dir
891266e564dSmrg  if test -s conftest.tar; then
892266e564dSmrg    AM_RUN_LOG([$am__untar <conftest.tar])
893266e564dSmrg    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
894266e564dSmrg  fi
895266e564dSmrgdone
896266e564dSmrgrm -rf conftest.dir
897266e564dSmrg
898266e564dSmrgAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
899266e564dSmrgAC_MSG_RESULT([$am_cv_prog_tar_$1])])
900266e564dSmrgAC_SUBST([am__tar])
901266e564dSmrgAC_SUBST([am__untar])
902266e564dSmrg]) # _AM_PROG_TAR
903266e564dSmrg
904266e564dSmrgdnl
905266e564dSmrgdnl Copyright 2005-2006 Sun Microsystems, Inc.  All rights reserved.
906266e564dSmrgdnl 
907266e564dSmrgdnl Permission is hereby granted, free of charge, to any person obtaining a
908266e564dSmrgdnl copy of this software and associated documentation files (the
909266e564dSmrgdnl "Software"), to deal in the Software without restriction, including
910266e564dSmrgdnl without limitation the rights to use, copy, modify, merge, publish,
911266e564dSmrgdnl distribute, and/or sell copies of the Software, and to permit persons
912266e564dSmrgdnl to whom the Software is furnished to do so, provided that the above
913266e564dSmrgdnl copyright notice(s) and this permission notice appear in all copies of
914266e564dSmrgdnl the Software and that both the above copyright notice(s) and this
915266e564dSmrgdnl permission notice appear in supporting documentation.
916266e564dSmrgdnl
917266e564dSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
918266e564dSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
919266e564dSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
920266e564dSmrgdnl OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
921266e564dSmrgdnl HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
922266e564dSmrgdnl INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
923266e564dSmrgdnl FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
924266e564dSmrgdnl NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
925266e564dSmrgdnl WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
926266e564dSmrgdnl
927266e564dSmrgdnl Except as contained in this notice, the name of a copyright holder
928266e564dSmrgdnl shall not be used in advertising or otherwise to promote the sale, use
929266e564dSmrgdnl or other dealings in this Software without prior written authorization
930266e564dSmrgdnl of the copyright holder.
931266e564dSmrg
932266e564dSmrg# XORG_MACROS_VERSION(required-version)
933266e564dSmrg# -------------------------------------
934266e564dSmrg# Minimum version: 1.1.0
935266e564dSmrg#
936266e564dSmrg# If you're using a macro added in Version 1.1 or newer, include this in
937266e564dSmrg# your configure.ac with the minimum required version, such as:
938266e564dSmrg# XORG_MACROS_VERSION(1.1)
939266e564dSmrg#
940266e564dSmrg# To force at least a version with this macro defined, also add:
941266e564dSmrg# m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.1 or later before running autoconf/autogen])])
942266e564dSmrg#
943266e564dSmrg#
944266e564dSmrg# See the "minimum version" comment for each macro you use to see what 
945266e564dSmrg# version you require.
946266e564dSmrgAC_DEFUN([XORG_MACROS_VERSION],[
947266e564dSmrg	[XORG_MACROS_needed_version=$1
948266e564dSmrg	XORG_MACROS_needed_major=`echo $XORG_MACROS_needed_version | sed 's/\..*$//'`
949266e564dSmrg	XORG_MACROS_needed_minor=`echo $XORG_MACROS_needed_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`]
950266e564dSmrg	AC_MSG_CHECKING([if xorg-macros used to generate configure is at least ${XORG_MACROS_needed_major}.${XORG_MACROS_needed_minor}])
951266e564dSmrg	[XORG_MACROS_version=1.1.5
952266e564dSmrg	XORG_MACROS_major=`echo $XORG_MACROS_version | sed 's/\..*$//'`
953266e564dSmrg	XORG_MACROS_minor=`echo $XORG_MACROS_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`]
954266e564dSmrg	if test $XORG_MACROS_major -ne $XORG_MACROS_needed_major ; then
955266e564dSmrg		AC_MSG_ERROR([configure built with incompatible version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.x])
956266e564dSmrg	fi
957266e564dSmrg	if test $XORG_MACROS_minor -lt $XORG_MACROS_needed_minor ; then
958266e564dSmrg		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])
959266e564dSmrg	fi
960266e564dSmrg	AC_MSG_RESULT([yes, $XORG_MACROS_version])
961266e564dSmrg]) # XORG_MACROS_VERSION
962266e564dSmrg
963266e564dSmrg# XORG_PROG_RAWCPP()
964266e564dSmrg# ------------------
965266e564dSmrg# Minimum version: 1.0.0
966266e564dSmrg#
967266e564dSmrg# Find cpp program and necessary flags for use in pre-processing text files
968266e564dSmrg# such as man pages and config files
969266e564dSmrgAC_DEFUN([XORG_PROG_RAWCPP],[
970266e564dSmrgAC_REQUIRE([AC_PROG_CPP])
971266e564dSmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 
972266e564dSmrg   [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib])
973266e564dSmrg
974266e564dSmrg# Check for flag to avoid builtin definitions - assumes unix is predefined,
975266e564dSmrg# which is not the best choice for supporting other OS'es, but covers most
976266e564dSmrg# of the ones we need for now.
977266e564dSmrgAC_MSG_CHECKING([if $RAWCPP requires -undef])
978266e564dSmrgAC_LANG_CONFTEST([Does cpp redefine unix ?])
979266e564dSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
980266e564dSmrg	AC_MSG_RESULT([no])
981266e564dSmrgelse
982266e564dSmrg	if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
983266e564dSmrg		RAWCPPFLAGS=-undef
984266e564dSmrg		AC_MSG_RESULT([yes])
985266e564dSmrg	else
986266e564dSmrg		AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef.  I don't know what to do.])
987266e564dSmrg	fi
988266e564dSmrgfi
989266e564dSmrgrm -f conftest.$ac_ext
990266e564dSmrg
991266e564dSmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional])
992266e564dSmrgAC_LANG_CONFTEST([Does cpp preserve   "whitespace"?])
993266e564dSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
994266e564dSmrg	AC_MSG_RESULT([no])
995266e564dSmrgelse
996266e564dSmrg	if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
997266e564dSmrg		RAWCPPFLAGS="${RAWCPPFLAGS} -traditional"
998266e564dSmrg		AC_MSG_RESULT([yes])
999266e564dSmrg	else
1000266e564dSmrg		AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional.  I don't know what to do.])
1001266e564dSmrg	fi
1002266e564dSmrgfi
1003266e564dSmrgrm -f conftest.$ac_ext
1004266e564dSmrgAC_SUBST(RAWCPPFLAGS)
1005266e564dSmrg]) # XORG_PROG_RAWCPP
1006266e564dSmrg
1007266e564dSmrg# XORG_MANPAGE_SECTIONS()
1008266e564dSmrg# -----------------------
1009266e564dSmrg# Minimum version: 1.0.0
1010266e564dSmrg#
1011266e564dSmrg# Determine which sections man pages go in for the different man page types
1012266e564dSmrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files.
1013266e564dSmrg# Not sure if there's any better way than just hardcoding by OS name.
1014266e564dSmrg# Override default settings by setting environment variables
1015266e564dSmrg
1016266e564dSmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[
1017266e564dSmrgAC_REQUIRE([AC_CANONICAL_HOST])
1018266e564dSmrg
1019266e564dSmrgif test x$APP_MAN_SUFFIX = x    ; then
1020266e564dSmrg    APP_MAN_SUFFIX=1
1021266e564dSmrgfi
1022266e564dSmrgif test x$APP_MAN_DIR = x    ; then
1023266e564dSmrg    APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)'
1024266e564dSmrgfi
1025266e564dSmrg
1026266e564dSmrgif test x$LIB_MAN_SUFFIX = x    ; then
1027266e564dSmrg    LIB_MAN_SUFFIX=3
1028266e564dSmrgfi
1029266e564dSmrgif test x$LIB_MAN_DIR = x    ; then
1030266e564dSmrg    LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)'
1031266e564dSmrgfi
1032266e564dSmrg
1033266e564dSmrgif test x$FILE_MAN_SUFFIX = x    ; then
1034266e564dSmrg    case $host_os in
1035266e564dSmrg	solaris*)	FILE_MAN_SUFFIX=4  ;;
1036266e564dSmrg	*)		FILE_MAN_SUFFIX=5  ;;
1037266e564dSmrg    esac
1038266e564dSmrgfi
1039266e564dSmrgif test x$FILE_MAN_DIR = x    ; then
1040266e564dSmrg    FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)'
1041266e564dSmrgfi
1042266e564dSmrg
1043266e564dSmrgif test x$MISC_MAN_SUFFIX = x    ; then
1044266e564dSmrg    case $host_os in
1045266e564dSmrg	solaris*)	MISC_MAN_SUFFIX=5  ;;
1046266e564dSmrg	*)		MISC_MAN_SUFFIX=7  ;;
1047266e564dSmrg    esac
1048266e564dSmrgfi
1049266e564dSmrgif test x$MISC_MAN_DIR = x    ; then
1050266e564dSmrg    MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)'
1051266e564dSmrgfi
1052266e564dSmrg
1053266e564dSmrgif test x$DRIVER_MAN_SUFFIX = x    ; then
1054266e564dSmrg    case $host_os in
1055266e564dSmrg	solaris*)	DRIVER_MAN_SUFFIX=7  ;;
1056266e564dSmrg	*)		DRIVER_MAN_SUFFIX=4  ;;
1057266e564dSmrg    esac
1058266e564dSmrgfi
1059266e564dSmrgif test x$DRIVER_MAN_DIR = x    ; then
1060266e564dSmrg    DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)'
1061266e564dSmrgfi
1062266e564dSmrg
1063266e564dSmrgif test x$ADMIN_MAN_SUFFIX = x    ; then
1064266e564dSmrg    case $host_os in
1065266e564dSmrg	solaris*)	ADMIN_MAN_SUFFIX=1m ;;
1066266e564dSmrg	*)		ADMIN_MAN_SUFFIX=8  ;;
1067266e564dSmrg    esac
1068266e564dSmrgfi
1069266e564dSmrgif test x$ADMIN_MAN_DIR = x    ; then
1070266e564dSmrg    ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)'
1071266e564dSmrgfi
1072266e564dSmrg
1073266e564dSmrg
1074266e564dSmrgAC_SUBST([APP_MAN_SUFFIX])
1075266e564dSmrgAC_SUBST([LIB_MAN_SUFFIX])
1076266e564dSmrgAC_SUBST([FILE_MAN_SUFFIX])
1077266e564dSmrgAC_SUBST([MISC_MAN_SUFFIX])
1078266e564dSmrgAC_SUBST([DRIVER_MAN_SUFFIX])
1079266e564dSmrgAC_SUBST([ADMIN_MAN_SUFFIX])
1080266e564dSmrgAC_SUBST([APP_MAN_DIR])
1081266e564dSmrgAC_SUBST([LIB_MAN_DIR])
1082266e564dSmrgAC_SUBST([FILE_MAN_DIR])
1083266e564dSmrgAC_SUBST([MISC_MAN_DIR])
1084266e564dSmrgAC_SUBST([DRIVER_MAN_DIR])
1085266e564dSmrgAC_SUBST([ADMIN_MAN_DIR])
1086266e564dSmrg]) # XORG_MANPAGE_SECTIONS
1087266e564dSmrg
1088266e564dSmrg# XORG_CHECK_LINUXDOC
1089266e564dSmrg# -------------------
1090266e564dSmrg# Minimum version: 1.0.0
1091266e564dSmrg#
1092266e564dSmrg# Defines the variable MAKE_TEXT if the necessary tools and
1093266e564dSmrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt.
1094266e564dSmrg# Whether or not the necessary tools and files are found can be checked
1095266e564dSmrg# with the AM_CONDITIONAL "BUILD_LINUXDOC"
1096266e564dSmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[
1097266e564dSmrgXORG_SGML_PATH=$prefix/share/sgml
1098266e564dSmrgHAVE_DEFS_ENT=
1099266e564dSmrg
1100266e564dSmrgif test x"$cross_compiling" = x"yes" ; then
1101266e564dSmrg  HAVE_DEFS_ENT=no
1102266e564dSmrgelse
1103266e564dSmrg  AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes])
1104266e564dSmrgfi
1105266e564dSmrg
1106266e564dSmrgAC_PATH_PROG(LINUXDOC, linuxdoc)
1107266e564dSmrgAC_PATH_PROG(PS2PDF, ps2pdf)
1108266e564dSmrg
1109266e564dSmrgAC_MSG_CHECKING([Whether to build documentation])
1110266e564dSmrg
1111266e564dSmrgif test x$HAVE_DEFS_ENT != x && test x$LINUXDOC != x ; then
1112266e564dSmrg   BUILDDOC=yes
1113266e564dSmrgelse
1114266e564dSmrg   BUILDDOC=no
1115266e564dSmrgfi
1116266e564dSmrg
1117266e564dSmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes])
1118266e564dSmrg
1119266e564dSmrgAC_MSG_RESULT([$BUILDDOC])
1120266e564dSmrg
1121266e564dSmrgAC_MSG_CHECKING([Whether to build pdf documentation])
1122266e564dSmrg
1123266e564dSmrgif test x$PS2PDF != x && test x$BUILD_PDFDOC != xno; then
1124266e564dSmrg   BUILDPDFDOC=yes
1125266e564dSmrgelse
1126266e564dSmrg   BUILDPDFDOC=no
1127266e564dSmrgfi
1128266e564dSmrg
1129266e564dSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
1130266e564dSmrg
1131266e564dSmrgAC_MSG_RESULT([$BUILDPDFDOC])
1132266e564dSmrg
1133266e564dSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt"
1134266e564dSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps"
1135266e564dSmrgMAKE_PDF="$PS2PDF"
1136266e564dSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC  -B html --split=0"
1137266e564dSmrg
1138266e564dSmrgAC_SUBST(MAKE_TEXT)
1139266e564dSmrgAC_SUBST(MAKE_PS)
1140266e564dSmrgAC_SUBST(MAKE_PDF)
1141266e564dSmrgAC_SUBST(MAKE_HTML)
1142266e564dSmrg]) # XORG_CHECK_LINUXDOC
1143266e564dSmrg
1144266e564dSmrg# XORG_CHECK_DOCBOOK
1145266e564dSmrg# -------------------
1146266e564dSmrg# Minimum version: 1.0.0
1147266e564dSmrg#
1148266e564dSmrg# Checks for the ability to build output formats from SGML DocBook source.
1149266e564dSmrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC"
1150266e564dSmrg# indicates whether the necessary tools and files are found and, if set,
1151266e564dSmrg# $(MAKE_XXX) blah.sgml will produce blah.xxx.
1152266e564dSmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[
1153266e564dSmrgXORG_SGML_PATH=$prefix/share/sgml
1154266e564dSmrgHAVE_DEFS_ENT=
1155266e564dSmrgBUILDTXTDOC=no
1156266e564dSmrgBUILDPDFDOC=no
1157266e564dSmrgBUILDPSDOC=no
1158266e564dSmrgBUILDHTMLDOC=no
1159266e564dSmrg
1160266e564dSmrgAC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes])
1161266e564dSmrg
1162266e564dSmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps)
1163266e564dSmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf)
1164266e564dSmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html)
1165266e564dSmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt)
1166266e564dSmrg
1167266e564dSmrgAC_MSG_CHECKING([Whether to build text documentation])
1168266e564dSmrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKTXT != x &&
1169266e564dSmrg   test x$BUILD_TXTDOC != xno; then
1170266e564dSmrg	BUILDTXTDOC=yes
1171266e564dSmrgfi
1172266e564dSmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes])
1173266e564dSmrgAC_MSG_RESULT([$BUILDTXTDOC])
1174266e564dSmrg
1175266e564dSmrgAC_MSG_CHECKING([Whether to build PDF documentation])
1176266e564dSmrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPDF != x &&
1177266e564dSmrg   test x$BUILD_PDFDOC != xno; then
1178266e564dSmrg	BUILDPDFDOC=yes
1179266e564dSmrgfi
1180266e564dSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
1181266e564dSmrgAC_MSG_RESULT([$BUILDPDFDOC])
1182266e564dSmrg
1183266e564dSmrgAC_MSG_CHECKING([Whether to build PostScript documentation])
1184266e564dSmrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPS != x &&
1185266e564dSmrg   test x$BUILD_PSDOC != xno; then
1186266e564dSmrg	BUILDPSDOC=yes
1187266e564dSmrgfi
1188266e564dSmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes])
1189266e564dSmrgAC_MSG_RESULT([$BUILDPSDOC])
1190266e564dSmrg
1191266e564dSmrgAC_MSG_CHECKING([Whether to build HTML documentation])
1192266e564dSmrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKHTML != x &&
1193266e564dSmrg   test x$BUILD_HTMLDOC != xno; then
1194266e564dSmrg	BUILDHTMLDOC=yes
1195266e564dSmrgfi
1196266e564dSmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes])
1197266e564dSmrgAC_MSG_RESULT([$BUILDHTMLDOC])
1198266e564dSmrg
1199266e564dSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT"
1200266e564dSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS"
1201266e564dSmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF"
1202266e564dSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML"
1203266e564dSmrg
1204266e564dSmrgAC_SUBST(MAKE_TEXT)
1205266e564dSmrgAC_SUBST(MAKE_PS)
1206266e564dSmrgAC_SUBST(MAKE_PDF)
1207266e564dSmrgAC_SUBST(MAKE_HTML)
1208266e564dSmrg]) # XORG_CHECK_DOCBOOK
1209266e564dSmrg
1210266e564dSmrg# XORG_CHECK_MALLOC_ZERO
1211266e564dSmrg# ----------------------
1212266e564dSmrg# Minimum version: 1.0.0
1213266e564dSmrg#
1214266e564dSmrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if
1215266e564dSmrg# malloc(0) returns NULL.  Packages should add one of these cflags to
1216266e564dSmrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them.
1217266e564dSmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[
1218266e564dSmrgAC_ARG_ENABLE(malloc0returnsnull,
1219266e564dSmrg	AC_HELP_STRING([--enable-malloc0returnsnull],
1220266e564dSmrg		       [malloc(0) returns NULL (default: auto)]),
1221266e564dSmrg	[MALLOC_ZERO_RETURNS_NULL=$enableval],
1222266e564dSmrg	[MALLOC_ZERO_RETURNS_NULL=auto])
1223266e564dSmrg
1224266e564dSmrgAC_MSG_CHECKING([whether malloc(0) returns NULL])
1225266e564dSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then
1226266e564dSmrg	AC_RUN_IFELSE([
1227266e564dSmrgchar *malloc();
1228266e564dSmrgchar *realloc();
1229266e564dSmrgchar *calloc();
1230266e564dSmrgmain() {
1231266e564dSmrg    char *m0, *r0, *c0, *p;
1232266e564dSmrg    m0 = malloc(0);
1233266e564dSmrg    p = malloc(10);
1234266e564dSmrg    r0 = realloc(p,0);
1235266e564dSmrg    c0 = calloc(0);
1236266e564dSmrg    exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1);
1237266e564dSmrg}],
1238266e564dSmrg		[MALLOC_ZERO_RETURNS_NULL=yes],
1239266e564dSmrg		[MALLOC_ZERO_RETURNS_NULL=no])
1240266e564dSmrgfi
1241266e564dSmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL])
1242266e564dSmrg
1243266e564dSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then
1244266e564dSmrg	MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL"
1245266e564dSmrg	XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS
1246266e564dSmrg	XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC"
1247266e564dSmrgelse
1248266e564dSmrg	MALLOC_ZERO_CFLAGS=""
1249266e564dSmrg	XMALLOC_ZERO_CFLAGS=""
1250266e564dSmrg	XTMALLOC_ZERO_CFLAGS=""
1251266e564dSmrgfi
1252266e564dSmrg
1253266e564dSmrgAC_SUBST([MALLOC_ZERO_CFLAGS])
1254266e564dSmrgAC_SUBST([XMALLOC_ZERO_CFLAGS])
1255266e564dSmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS])
1256266e564dSmrg]) # XORG_CHECK_MALLOC_ZERO
1257266e564dSmrg
1258266e564dSmrg# XORG_WITH_LINT()
1259266e564dSmrg# ----------------
1260266e564dSmrg# Minimum version: 1.1.0
1261266e564dSmrg#
1262266e564dSmrg# Sets up flags for source checkers such as lint and sparse if --with-lint
1263266e564dSmrg# is specified.   (Use --with-lint=sparse for sparse.)
1264266e564dSmrg# Sets $LINT to name of source checker passed with --with-lint (default: lint)
1265266e564dSmrg# Sets $LINT_FLAGS to flags to pass to source checker
1266266e564dSmrg# Sets LINT automake conditional if enabled (default: disabled)
1267266e564dSmrg#
1268266e564dSmrgAC_DEFUN([XORG_WITH_LINT],[
1269266e564dSmrg
1270266e564dSmrg# Allow checking code with lint, sparse, etc.
1271266e564dSmrgAC_ARG_WITH(lint, [AC_HELP_STRING([--with-lint],
1272266e564dSmrg		[Use a lint-style source code checker (default: disabled)])],
1273266e564dSmrg		[use_lint=$withval], [use_lint=no])
1274266e564dSmrgif test "x$use_lint" = "xyes" ; then
1275266e564dSmrg	LINT="lint"
1276266e564dSmrgelse
1277266e564dSmrg	LINT="$use_lint"
1278266e564dSmrgfi
1279266e564dSmrgif test "x$LINT_FLAGS" = "x" -a "x$LINT" != "xno" ; then
1280266e564dSmrg    case $LINT in
1281266e564dSmrg	lint|*/lint)
1282266e564dSmrg	    case $host_os in
1283266e564dSmrg		solaris*)
1284266e564dSmrg			LINT_FLAGS="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2"
1285266e564dSmrg			;;
1286266e564dSmrg	    esac
1287266e564dSmrg	    ;;
1288266e564dSmrg    esac
1289266e564dSmrgfi
1290266e564dSmrg
1291266e564dSmrgAC_SUBST(LINT)
1292266e564dSmrgAC_SUBST(LINT_FLAGS)
1293266e564dSmrgAM_CONDITIONAL(LINT, [test x$LINT != xno])
1294266e564dSmrg
1295266e564dSmrg]) # XORG_WITH_LINT
1296266e564dSmrg
1297266e564dSmrg# XORG_LINT_LIBRARY(LIBNAME)
1298266e564dSmrg# --------------------------
1299266e564dSmrg# Minimum version: 1.1.0
1300266e564dSmrg#
1301266e564dSmrg# Sets up flags for building lint libraries for checking programs that call
1302266e564dSmrg# functions in the library.
1303266e564dSmrg# Disabled by default, enable with --enable-lint-library
1304266e564dSmrg# Sets: 
1305266e564dSmrg#	@LINTLIB@		- name of lint library file to make
1306266e564dSmrg#	MAKE_LINT_LIB		- automake conditional
1307266e564dSmrg#
1308266e564dSmrg
1309266e564dSmrgAC_DEFUN([XORG_LINT_LIBRARY],[
1310266e564dSmrgAC_REQUIRE([XORG_WITH_LINT])
1311266e564dSmrg# Build lint "library" for more indepth checks of programs calling this library
1312266e564dSmrgAC_ARG_ENABLE(lint-library, [AC_HELP_STRING([--enable-lint-library],
1313266e564dSmrg	[Create lint library (default: disabled)])],
1314266e564dSmrg	[make_lint_lib=$enableval], [make_lint_lib=no])
1315266e564dSmrgif test "x$make_lint_lib" != "xno" ; then
1316266e564dSmrg	if test "x$LINT" = "xno" ; then
1317266e564dSmrg		AC_MSG_ERROR([Cannot make lint library without --with-lint])
1318266e564dSmrg	fi
1319266e564dSmrg	if test "x$make_lint_lib" = "xyes" ; then
1320266e564dSmrg		LINTLIB=llib-l$1.ln
1321266e564dSmrg	else
1322266e564dSmrg		LINTLIB=$make_lint_lib
1323266e564dSmrg	fi
1324266e564dSmrgfi
1325266e564dSmrgAC_SUBST(LINTLIB)
1326266e564dSmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno])
1327266e564dSmrg
1328266e564dSmrg]) # XORG_LINT_LIBRARY
1329266e564dSmrg
1330266e564dSmrgdnl Copyright 2005 Red Hat, Inc
1331266e564dSmrgdnl
1332266e564dSmrgdnl Permission to use, copy, modify, distribute, and sell this software and its
1333266e564dSmrgdnl documentation for any purpose is hereby granted without fee, provided that
1334266e564dSmrgdnl the above copyright notice appear in all copies and that both that
1335266e564dSmrgdnl copyright notice and this permission notice appear in supporting
1336266e564dSmrgdnl documentation.
1337266e564dSmrgdnl
1338266e564dSmrgdnl The above copyright notice and this permission notice shall be included
1339266e564dSmrgdnl in all copies or substantial portions of the Software.
1340266e564dSmrgdnl
1341266e564dSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
1342266e564dSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
1343266e564dSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
1344266e564dSmrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
1345266e564dSmrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
1346266e564dSmrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
1347266e564dSmrgdnl OTHER DEALINGS IN THE SOFTWARE.
1348266e564dSmrgdnl
1349266e564dSmrgdnl Except as contained in this notice, the name of the copyright holders shall
1350266e564dSmrgdnl not be used in advertising or otherwise to promote the sale, use or
1351266e564dSmrgdnl other dealings in this Software without prior written authorization
1352266e564dSmrgdnl from the copyright holders.
1353266e564dSmrgdnl
1354266e564dSmrg
1355266e564dSmrg# XORG_RELEASE_VERSION
1356266e564dSmrg# --------------------
1357266e564dSmrg# Adds --with/without-release-string and changes the PACKAGE and
1358266e564dSmrg# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION".  If
1359266e564dSmrg# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged.  Also
1360266e564dSmrg# defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use.
1361266e564dSmrg 
1362266e564dSmrgAC_DEFUN([XORG_RELEASE_VERSION],[
1363266e564dSmrg	AC_ARG_WITH(release-version,
1364266e564dSmrg			AC_HELP_STRING([--with-release-version=STRING],
1365266e564dSmrg				[Use release version string in package name]),
1366266e564dSmrg			[RELEASE_VERSION="$withval"],
1367266e564dSmrg			[RELEASE_VERSION=""])
1368266e564dSmrg	if test "x$RELEASE_VERSION" != "x"; then
1369266e564dSmrg		PACKAGE="$PACKAGE-$RELEASE_VERSION"
1370266e564dSmrg		PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION"
1371266e564dSmrg		AC_MSG_NOTICE([Building with package name set to $PACKAGE])
1372266e564dSmrg	fi
1373266e564dSmrg	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR],
1374266e564dSmrg		[`echo $PACKAGE_VERSION | cut -d . -f 1`],
1375266e564dSmrg		[Major version of this package])
1376266e564dSmrg	PVM=`echo $PACKAGE_VERSION | cut -d . -f 2`
1377266e564dSmrg	if test "x$PVM" = "x"; then
1378266e564dSmrg		PVM="0"
1379266e564dSmrg	fi
1380266e564dSmrg	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR],
1381266e564dSmrg		[$PVM],
1382266e564dSmrg		[Minor version of this package])
1383266e564dSmrg	PVP=`echo $PACKAGE_VERSION | cut -d . -f 3`
1384266e564dSmrg	if test "x$PVP" = "x"; then
1385266e564dSmrg		PVP="0"
1386266e564dSmrg	fi
1387266e564dSmrg	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL],
1388266e564dSmrg		[$PVP],
1389266e564dSmrg		[Patch version of this package])
1390266e564dSmrg])
1391266e564dSmrg
1392266e564dSmrgdnl $XdotOrg: lib/xtrans/xtrans.m4,v 1.6 2005/07/26 18:59:11 alanc Exp $
1393266e564dSmrgdnl
1394266e564dSmrgdnl Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
1395266e564dSmrgdnl 
1396266e564dSmrgdnl Permission to use, copy, modify, distribute, and sell this software and its
1397266e564dSmrgdnl documentation for any purpose is hereby granted without fee, provided that
1398266e564dSmrgdnl the above copyright notice appear in all copies and that both that
1399266e564dSmrgdnl copyright notice and this permission notice appear in supporting
1400266e564dSmrgdnl documentation.
1401266e564dSmrgdnl 
1402266e564dSmrgdnl The above copyright notice and this permission notice shall be included
1403266e564dSmrgdnl in all copies or substantial portions of the Software.
1404266e564dSmrgdnl 
1405266e564dSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
1406266e564dSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
1407266e564dSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
1408266e564dSmrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
1409266e564dSmrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
1410266e564dSmrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
1411266e564dSmrgdnl OTHER DEALINGS IN THE SOFTWARE.
1412266e564dSmrgdnl 
1413266e564dSmrgdnl Except as contained in this notice, the name of the copyright holders shall
1414266e564dSmrgdnl not be used in advertising or otherwise to promote the sale, use or
1415266e564dSmrgdnl other dealings in this Software without prior written authorization
1416266e564dSmrgdnl from the copyright holders.
1417266e564dSmrgdnl 
1418266e564dSmrg
1419266e564dSmrg# XTRANS_TCP_FLAGS()
1420266e564dSmrg# ------------------
1421266e564dSmrg# Find needed libraries for TCP sockets, and check for IPv6 support
1422266e564dSmrgAC_DEFUN([XTRANS_TCP_FLAGS],[
1423266e564dSmrg # SVR4 hides these in libraries other than libc
1424266e564dSmrg AC_SEARCH_LIBS(socket, [socket])
1425266e564dSmrg AC_SEARCH_LIBS(gethostbyname, [nsl])
1426266e564dSmrg
1427266e564dSmrg # Needs to come after above checks for libsocket & libnsl for SVR4 systems
1428266e564dSmrg AC_ARG_ENABLE(ipv6, 
1429266e564dSmrg	AC_HELP_STRING([--enable-IPv6],[Enable IPv6 support]),
1430266e564dSmrg	[IPV6CONN=$enableval], 
1431266e564dSmrg	[AC_CHECK_FUNC(getaddrinfo,[IPV6CONN=yes],[IPV6CONN=no])])
1432266e564dSmrg AC_MSG_CHECKING([if IPv6 support should be built])
1433266e564dSmrg if test "$IPV6CONN" = "yes"; then
1434266e564dSmrg	AC_DEFINE(IPv6,1,[Support IPv6 for TCP connections])
1435266e564dSmrg fi
1436266e564dSmrg AC_MSG_RESULT($IPV6CONN)
1437266e564dSmrg
1438266e564dSmrg # 4.3BSD-Reno added a new member to struct sockaddr_in
1439266e564dSmrg AC_CHECK_MEMBER([struct sockaddr_in.sin_len], 
1440266e564dSmrg	AC_DEFINE([BSD44SOCKETS],1,
1441266e564dSmrg 	    [Define to 1 if `struct sockaddr_in' has a `sin_len' member]), [], [
1442266e564dSmrg#include <sys/types.h>
1443266e564dSmrg#include <sys/socket.h>
1444266e564dSmrg#include <netinet/in.h>
1445266e564dSmrg ])
1446266e564dSmrg]) # XTRANS_TCP_FLAGS
1447266e564dSmrg
1448266e564dSmrg# XTRANS_CONNECTION_FLAGS()
1449266e564dSmrg# -------------------------
1450266e564dSmrg# Standard checks for which Xtrans transports to use by the Xorg packages
1451266e564dSmrg# that use Xtrans functions
1452266e564dSmrgAC_DEFUN([XTRANS_CONNECTION_FLAGS],[
1453266e564dSmrg AC_REQUIRE([AC_CANONICAL_HOST])
1454266e564dSmrg AC_REQUIRE([AC_TYPE_SIGNAL])
1455266e564dSmrg AC_ARG_ENABLE(unix-transport,
1456266e564dSmrg	AC_HELP_STRING([--enable-unix-transport],[Enable UNIX domain socket transport]),
1457266e564dSmrg	[UNIXCONN=$enableval], [UNIXCONN=yes])
1458266e564dSmrg AC_ARG_ENABLE(tcp-transport, 
1459266e564dSmrg	AC_HELP_STRING([--enable-tcp-transport],[Enable TCP socket transport]),
1460266e564dSmrg	[TCPCONN=$enableval], [TCPCONN=yes])
1461266e564dSmrg AC_MSG_CHECKING([if Xtrans should support UNIX socket connections])
1462266e564dSmrg if test "$UNIXCONN" = "yes"; then
1463266e564dSmrg	AC_DEFINE(UNIXCONN,1,[Support UNIX socket connections])
1464266e564dSmrg fi
1465266e564dSmrg AC_MSG_RESULT($UNIXCONN)
1466266e564dSmrg AC_MSG_CHECKING([if Xtrans should support TCP socket connections])
1467266e564dSmrg AC_MSG_RESULT($TCPCONN)
1468266e564dSmrg if test "$TCPCONN" = "yes"; then
1469266e564dSmrg	AC_DEFINE(TCPCONN,1,[Support TCP socket connections])
1470266e564dSmrg	XTRANS_TCP_FLAGS
1471266e564dSmrg fi
1472266e564dSmrg [case $host_os in
1473266e564dSmrg	solaris*|sco*|sysv4*)	localdef="yes" ;;
1474266e564dSmrg	*)			localdef="no"  ;;
1475266e564dSmrg esac]
1476266e564dSmrg AC_ARG_ENABLE(local-transport,
1477266e564dSmrg	AC_HELP_STRING([--enable-local-transport],[Enable os-specific local transport]),
1478266e564dSmrg	[LOCALCONN=$enableval], [LOCALCONN=$localdef])
1479266e564dSmrg AC_MSG_CHECKING([if Xtrans should support os-specific local connections])
1480266e564dSmrg AC_MSG_RESULT($LOCALCONN)
1481266e564dSmrg if test "$LOCALCONN" = "yes"; then
1482266e564dSmrg	AC_DEFINE(LOCALCONN,1,[Support os-specific local connections])
1483266e564dSmrg fi
1484266e564dSmrg 
1485266e564dSmrg]) # XTRANS_CONNECTION_FLAGS
1486266e564dSmrg
1487266e564dSmrg
1488266e564dSmrg# XTRANS_SECURE_RPC_FLAGS()
1489266e564dSmrg# -------------------------
1490266e564dSmrg# Check for Secure RPC functions - must come after XTRANS_TCP_FLAGS
1491266e564dSmrg# so that any necessary networking libraries are already found
1492266e564dSmrgAC_DEFUN([XTRANS_SECURE_RPC_FLAGS],
1493266e564dSmrg[AC_REQUIRE([XTRANS_TCP_FLAGS])
1494266e564dSmrg AC_ARG_ENABLE(secure-rpc, 
1495266e564dSmrg	AC_HELP_STRING([--enable-secure-rpc],[Enable Secure RPC]),
1496266e564dSmrg        [SECURE_RPC=$enableval], [SECURE_RPC="try"])
1497266e564dSmrg
1498266e564dSmrg if test "x$SECURE_RPC" = "xyes" -o "x$SECURE_RPC" = "xtry" ; then
1499266e564dSmrg	FOUND_SECURE_RPC="no"
1500266e564dSmrg	AC_CHECK_FUNCS([authdes_seccreate authdes_create],
1501266e564dSmrg			[FOUND_SECURE_RPC="yes"])
1502266e564dSmrg	if test "x$FOUND_SECURE_RPC" = "xno" ; then
1503266e564dSmrg		if test "x$SECURE_RPC" = "xyes" ; then
1504266e564dSmrg	AC_MSG_ERROR([Secure RPC requested, but required functions not found])
1505266e564dSmrg		fi	
1506266e564dSmrg		SECURE_RPC="no"
1507266e564dSmrg	else
1508266e564dSmrg		dnl FreeBSD keeps getsecretkey in librpcsvc
1509266e564dSmrg		AC_SEARCH_LIBS(getsecretkey, [rpcsvc])
1510266e564dSmrg		SECURE_RPC="yes"
1511266e564dSmrg	fi
1512266e564dSmrg fi
1513266e564dSmrg AC_MSG_CHECKING([if Secure RPC authentication ("SUN-DES-1") should be supported])
1514266e564dSmrg if test "x$SECURE_RPC" = "xyes" ; then
1515266e564dSmrg	AC_DEFINE(SECURE_RPC, 1, [Support Secure RPC ("SUN-DES-1") authentication for X11 clients])
1516266e564dSmrg fi
1517266e564dSmrg AC_MSG_RESULT($SECURE_RPC)
1518266e564dSmrg]) # XTRANS_SECURE_RPC_FLAGS
1519266e564dSmrg
1520266e564dSmrg
1521266e564dSmrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
1522266e564dSmrg
1523266e564dSmrg# serial 48 AC_PROG_LIBTOOL
1524266e564dSmrg
1525266e564dSmrg
1526266e564dSmrg# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
1527266e564dSmrg# -----------------------------------------------------------
1528266e564dSmrg# If this macro is not defined by Autoconf, define it here.
1529266e564dSmrgm4_ifdef([AC_PROVIDE_IFELSE],
1530266e564dSmrg         [],
1531266e564dSmrg         [m4_define([AC_PROVIDE_IFELSE],
1532266e564dSmrg	         [m4_ifdef([AC_PROVIDE_$1],
1533266e564dSmrg		           [$2], [$3])])])
1534266e564dSmrg
1535266e564dSmrg
1536266e564dSmrg# AC_PROG_LIBTOOL
1537266e564dSmrg# ---------------
1538266e564dSmrgAC_DEFUN([AC_PROG_LIBTOOL],
1539266e564dSmrg[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
1540266e564dSmrgdnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
1541266e564dSmrgdnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
1542266e564dSmrg  AC_PROVIDE_IFELSE([AC_PROG_CXX],
1543266e564dSmrg    [AC_LIBTOOL_CXX],
1544266e564dSmrg    [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
1545266e564dSmrg  ])])
1546266e564dSmrgdnl And a similar setup for Fortran 77 support
1547266e564dSmrg  AC_PROVIDE_IFELSE([AC_PROG_F77],
1548266e564dSmrg    [AC_LIBTOOL_F77],
1549266e564dSmrg    [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
1550266e564dSmrg])])
1551266e564dSmrg
1552266e564dSmrgdnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
1553266e564dSmrgdnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
1554266e564dSmrgdnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
1555266e564dSmrg  AC_PROVIDE_IFELSE([AC_PROG_GCJ],
1556266e564dSmrg    [AC_LIBTOOL_GCJ],
1557266e564dSmrg    [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
1558266e564dSmrg      [AC_LIBTOOL_GCJ],
1559266e564dSmrg      [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
1560266e564dSmrg	[AC_LIBTOOL_GCJ],
1561266e564dSmrg      [ifdef([AC_PROG_GCJ],
1562266e564dSmrg	     [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
1563266e564dSmrg       ifdef([A][M_PROG_GCJ],
1564266e564dSmrg	     [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
1565266e564dSmrg       ifdef([LT_AC_PROG_GCJ],
1566266e564dSmrg	     [define([LT_AC_PROG_GCJ],
1567266e564dSmrg		defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
1568266e564dSmrg])])# AC_PROG_LIBTOOL
1569266e564dSmrg
1570266e564dSmrg
1571266e564dSmrg# _AC_PROG_LIBTOOL
1572266e564dSmrg# ----------------
1573266e564dSmrgAC_DEFUN([_AC_PROG_LIBTOOL],
1574266e564dSmrg[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
1575266e564dSmrgAC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
1576266e564dSmrgAC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
1577266e564dSmrgAC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
1578266e564dSmrg
1579266e564dSmrg# This can be used to rebuild libtool when needed
1580266e564dSmrgLIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
1581266e564dSmrg
1582266e564dSmrg# Always use our own libtool.
1583266e564dSmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool'
1584266e564dSmrgAC_SUBST(LIBTOOL)dnl
1585266e564dSmrg
1586266e564dSmrg# Prevent multiple expansion
1587266e564dSmrgdefine([AC_PROG_LIBTOOL], [])
1588266e564dSmrg])# _AC_PROG_LIBTOOL
1589266e564dSmrg
1590266e564dSmrg
1591266e564dSmrg# AC_LIBTOOL_SETUP
1592266e564dSmrg# ----------------
1593266e564dSmrgAC_DEFUN([AC_LIBTOOL_SETUP],
1594266e564dSmrg[AC_PREREQ(2.50)dnl
1595266e564dSmrgAC_REQUIRE([AC_ENABLE_SHARED])dnl
1596266e564dSmrgAC_REQUIRE([AC_ENABLE_STATIC])dnl
1597266e564dSmrgAC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
1598266e564dSmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl
1599266e564dSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl
1600266e564dSmrgAC_REQUIRE([AC_PROG_CC])dnl
1601266e564dSmrgAC_REQUIRE([AC_PROG_LD])dnl
1602266e564dSmrgAC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
1603266e564dSmrgAC_REQUIRE([AC_PROG_NM])dnl
1604266e564dSmrg
1605266e564dSmrgAC_REQUIRE([AC_PROG_LN_S])dnl
1606266e564dSmrgAC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
1607266e564dSmrg# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
1608266e564dSmrgAC_REQUIRE([AC_OBJEXT])dnl
1609266e564dSmrgAC_REQUIRE([AC_EXEEXT])dnl
1610266e564dSmrgdnl
1611266e564dSmrg
1612266e564dSmrgAC_LIBTOOL_SYS_MAX_CMD_LEN
1613266e564dSmrgAC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
1614266e564dSmrgAC_LIBTOOL_OBJDIR
1615266e564dSmrg
1616266e564dSmrgAC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
1617266e564dSmrg_LT_AC_PROG_ECHO_BACKSLASH
1618266e564dSmrg
1619266e564dSmrgcase $host_os in
1620266e564dSmrgaix3*)
1621266e564dSmrg  # AIX sometimes has problems with the GCC collect2 program.  For some
1622266e564dSmrg  # reason, if we set the COLLECT_NAMES environment variable, the problems
1623266e564dSmrg  # vanish in a puff of smoke.
1624266e564dSmrg  if test "X${COLLECT_NAMES+set}" != Xset; then
1625266e564dSmrg    COLLECT_NAMES=
1626266e564dSmrg    export COLLECT_NAMES
1627266e564dSmrg  fi
1628266e564dSmrg  ;;
1629266e564dSmrgesac
1630266e564dSmrg
1631266e564dSmrg# Sed substitution that helps us do robust quoting.  It backslashifies
1632266e564dSmrg# metacharacters that are still active within double-quoted strings.
1633266e564dSmrgXsed='sed -e 1s/^X//'
1634266e564dSmrg[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
1635266e564dSmrg
1636266e564dSmrg# Same as above, but do not quote variable references.
1637266e564dSmrg[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
1638266e564dSmrg
1639266e564dSmrg# Sed substitution to delay expansion of an escaped shell variable in a
1640266e564dSmrg# double_quote_subst'ed string.
1641266e564dSmrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
1642266e564dSmrg
1643266e564dSmrg# Sed substitution to avoid accidental globbing in evaled expressions
1644266e564dSmrgno_glob_subst='s/\*/\\\*/g'
1645266e564dSmrg
1646266e564dSmrg# Constants:
1647266e564dSmrgrm="rm -f"
1648266e564dSmrg
1649266e564dSmrg# Global variables:
1650266e564dSmrgdefault_ofile=libtool
1651266e564dSmrgcan_build_shared=yes
1652266e564dSmrg
1653266e564dSmrg# All known linkers require a `.a' archive for static linking (except MSVC,
1654266e564dSmrg# which needs '.lib').
1655266e564dSmrglibext=a
1656266e564dSmrgltmain="$ac_aux_dir/ltmain.sh"
1657266e564dSmrgofile="$default_ofile"
1658266e564dSmrgwith_gnu_ld="$lt_cv_prog_gnu_ld"
1659266e564dSmrg
1660266e564dSmrgAC_CHECK_TOOL(AR, ar, false)
1661266e564dSmrgAC_CHECK_TOOL(RANLIB, ranlib, :)
1662266e564dSmrgAC_CHECK_TOOL(STRIP, strip, :)
1663266e564dSmrg
1664266e564dSmrgold_CC="$CC"
1665266e564dSmrgold_CFLAGS="$CFLAGS"
1666266e564dSmrg
1667266e564dSmrg# Set sane defaults for various variables
1668266e564dSmrgtest -z "$AR" && AR=ar
1669266e564dSmrgtest -z "$AR_FLAGS" && AR_FLAGS=cru
1670266e564dSmrgtest -z "$AS" && AS=as
1671266e564dSmrgtest -z "$CC" && CC=cc
1672266e564dSmrgtest -z "$LTCC" && LTCC=$CC
1673266e564dSmrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
1674266e564dSmrgtest -z "$DLLTOOL" && DLLTOOL=dlltool
1675266e564dSmrgtest -z "$LD" && LD=ld
1676266e564dSmrgtest -z "$LN_S" && LN_S="ln -s"
1677266e564dSmrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file
1678266e564dSmrgtest -z "$NM" && NM=nm
1679266e564dSmrgtest -z "$SED" && SED=sed
1680266e564dSmrgtest -z "$OBJDUMP" && OBJDUMP=objdump
1681266e564dSmrgtest -z "$RANLIB" && RANLIB=:
1682266e564dSmrgtest -z "$STRIP" && STRIP=:
1683266e564dSmrgtest -z "$ac_objext" && ac_objext=o
1684266e564dSmrg
1685266e564dSmrg# Determine commands to create old-style static archives.
1686266e564dSmrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
1687266e564dSmrgold_postinstall_cmds='chmod 644 $oldlib'
1688266e564dSmrgold_postuninstall_cmds=
1689266e564dSmrg
1690266e564dSmrgif test -n "$RANLIB"; then
1691266e564dSmrg  case $host_os in
1692266e564dSmrg  openbsd*)
1693266e564dSmrg    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
1694266e564dSmrg    ;;
1695266e564dSmrg  *)
1696266e564dSmrg    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
1697266e564dSmrg    ;;
1698266e564dSmrg  esac
1699266e564dSmrg  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
1700266e564dSmrgfi
1701266e564dSmrg
1702266e564dSmrg_LT_CC_BASENAME([$compiler])
1703266e564dSmrg
1704266e564dSmrg# Only perform the check for file, if the check method requires it
1705266e564dSmrgcase $deplibs_check_method in
1706266e564dSmrgfile_magic*)
1707266e564dSmrg  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
1708266e564dSmrg    AC_PATH_MAGIC
1709266e564dSmrg  fi
1710266e564dSmrg  ;;
1711266e564dSmrgesac
1712266e564dSmrg
1713266e564dSmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
1714266e564dSmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
1715266e564dSmrgenable_win32_dll=yes, enable_win32_dll=no)
1716266e564dSmrg
1717266e564dSmrgAC_ARG_ENABLE([libtool-lock],
1718266e564dSmrg    [AC_HELP_STRING([--disable-libtool-lock],
1719266e564dSmrg	[avoid locking (might break parallel builds)])])
1720266e564dSmrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
1721266e564dSmrg
1722266e564dSmrgAC_ARG_WITH([pic],
1723266e564dSmrg    [AC_HELP_STRING([--with-pic],
1724266e564dSmrg	[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
1725266e564dSmrg    [pic_mode="$withval"],
1726266e564dSmrg    [pic_mode=default])
1727266e564dSmrgtest -z "$pic_mode" && pic_mode=default
1728266e564dSmrg
1729266e564dSmrg# Use C for the default configuration in the libtool script
1730266e564dSmrgtagname=
1731266e564dSmrgAC_LIBTOOL_LANG_C_CONFIG
1732266e564dSmrg_LT_AC_TAGCONFIG
1733266e564dSmrg])# AC_LIBTOOL_SETUP
1734266e564dSmrg
1735266e564dSmrg
1736266e564dSmrg# _LT_AC_SYS_COMPILER
1737266e564dSmrg# -------------------
1738266e564dSmrgAC_DEFUN([_LT_AC_SYS_COMPILER],
1739266e564dSmrg[AC_REQUIRE([AC_PROG_CC])dnl
1740266e564dSmrg
1741266e564dSmrg# If no C compiler was specified, use CC.
1742266e564dSmrgLTCC=${LTCC-"$CC"}
1743266e564dSmrg
1744266e564dSmrg# If no C compiler flags were specified, use CFLAGS.
1745266e564dSmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"}
1746266e564dSmrg
1747266e564dSmrg# Allow CC to be a program name with arguments.
1748266e564dSmrgcompiler=$CC
1749266e564dSmrg])# _LT_AC_SYS_COMPILER
1750266e564dSmrg
1751266e564dSmrg
1752266e564dSmrg# _LT_CC_BASENAME(CC)
1753266e564dSmrg# -------------------
1754266e564dSmrg# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
1755266e564dSmrgAC_DEFUN([_LT_CC_BASENAME],
1756266e564dSmrg[for cc_temp in $1""; do
1757266e564dSmrg  case $cc_temp in
1758266e564dSmrg    compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
1759266e564dSmrg    distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
1760266e564dSmrg    \-*) ;;
1761266e564dSmrg    *) break;;
1762266e564dSmrg  esac
1763266e564dSmrgdone
1764266e564dSmrgcc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
1765266e564dSmrg])
1766266e564dSmrg
1767266e564dSmrg
1768266e564dSmrg# _LT_COMPILER_BOILERPLATE
1769266e564dSmrg# ------------------------
1770266e564dSmrg# Check for compiler boilerplate output or warnings with
1771266e564dSmrg# the simple compiler test code.
1772266e564dSmrgAC_DEFUN([_LT_COMPILER_BOILERPLATE],
1773266e564dSmrg[ac_outfile=conftest.$ac_objext
1774266e564dSmrgprintf "$lt_simple_compile_test_code" >conftest.$ac_ext
1775266e564dSmrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
1776266e564dSmrg_lt_compiler_boilerplate=`cat conftest.err`
1777266e564dSmrg$rm conftest*
1778266e564dSmrg])# _LT_COMPILER_BOILERPLATE
1779266e564dSmrg
1780266e564dSmrg
1781266e564dSmrg# _LT_LINKER_BOILERPLATE
1782266e564dSmrg# ----------------------
1783266e564dSmrg# Check for linker boilerplate output or warnings with
1784266e564dSmrg# the simple link test code.
1785266e564dSmrgAC_DEFUN([_LT_LINKER_BOILERPLATE],
1786266e564dSmrg[ac_outfile=conftest.$ac_objext
1787266e564dSmrgprintf "$lt_simple_link_test_code" >conftest.$ac_ext
1788266e564dSmrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
1789266e564dSmrg_lt_linker_boilerplate=`cat conftest.err`
1790266e564dSmrg$rm conftest*
1791266e564dSmrg])# _LT_LINKER_BOILERPLATE
1792266e564dSmrg
1793266e564dSmrg
1794266e564dSmrg# _LT_AC_SYS_LIBPATH_AIX
1795266e564dSmrg# ----------------------
1796266e564dSmrg# Links a minimal program and checks the executable
1797266e564dSmrg# for the system default hardcoded library path. In most cases,
1798266e564dSmrg# this is /usr/lib:/lib, but when the MPI compilers are used
1799266e564dSmrg# the location of the communication and MPI libs are included too.
1800266e564dSmrg# If we don't find anything, use the default library path according
1801266e564dSmrg# to the aix ld manual.
1802266e564dSmrgAC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
1803266e564dSmrg[AC_LINK_IFELSE(AC_LANG_PROGRAM,[
1804266e564dSmrgaix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
1805266e564dSmrg}'`
1806266e564dSmrg# Check for a 64-bit object if we didn't find anything.
1807266e564dSmrgif 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; }
1808266e564dSmrg}'`; fi],[])
1809266e564dSmrgif test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
1810266e564dSmrg])# _LT_AC_SYS_LIBPATH_AIX
1811266e564dSmrg
1812266e564dSmrg
1813266e564dSmrg# _LT_AC_SHELL_INIT(ARG)
1814266e564dSmrg# ----------------------
1815266e564dSmrgAC_DEFUN([_LT_AC_SHELL_INIT],
1816266e564dSmrg[ifdef([AC_DIVERSION_NOTICE],
1817266e564dSmrg	     [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
1818266e564dSmrg	 [AC_DIVERT_PUSH(NOTICE)])
1819266e564dSmrg$1
1820266e564dSmrgAC_DIVERT_POP
1821266e564dSmrg])# _LT_AC_SHELL_INIT
1822266e564dSmrg
1823266e564dSmrg
1824266e564dSmrg# _LT_AC_PROG_ECHO_BACKSLASH
1825266e564dSmrg# --------------------------
1826266e564dSmrg# Add some code to the start of the generated configure script which
1827266e564dSmrg# will find an echo command which doesn't interpret backslashes.
1828266e564dSmrgAC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
1829266e564dSmrg[_LT_AC_SHELL_INIT([
1830266e564dSmrg# Check that we are running under the correct shell.
1831266e564dSmrgSHELL=${CONFIG_SHELL-/bin/sh}
1832266e564dSmrg
1833266e564dSmrgcase X$ECHO in
1834266e564dSmrgX*--fallback-echo)
1835266e564dSmrg  # Remove one level of quotation (which was required for Make).
1836266e564dSmrg  ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
1837266e564dSmrg  ;;
1838266e564dSmrgesac
1839266e564dSmrg
1840266e564dSmrgecho=${ECHO-echo}
1841266e564dSmrgif test "X[$]1" = X--no-reexec; then
1842266e564dSmrg  # Discard the --no-reexec flag, and continue.
1843266e564dSmrg  shift
1844266e564dSmrgelif test "X[$]1" = X--fallback-echo; then
1845266e564dSmrg  # Avoid inline document here, it may be left over
1846266e564dSmrg  :
1847266e564dSmrgelif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
1848266e564dSmrg  # Yippee, $echo works!
1849266e564dSmrg  :
1850266e564dSmrgelse
1851266e564dSmrg  # Restart under the correct shell.
1852266e564dSmrg  exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
1853266e564dSmrgfi
1854266e564dSmrg
1855266e564dSmrgif test "X[$]1" = X--fallback-echo; then
1856266e564dSmrg  # used as fallback echo
1857266e564dSmrg  shift
1858266e564dSmrg  cat <<EOF
1859266e564dSmrg[$]*
1860266e564dSmrgEOF
1861266e564dSmrg  exit 0
1862266e564dSmrgfi
1863266e564dSmrg
1864266e564dSmrg# The HP-UX ksh and POSIX shell print the target directory to stdout
1865266e564dSmrg# if CDPATH is set.
1866266e564dSmrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
1867266e564dSmrg
1868266e564dSmrgif test -z "$ECHO"; then
1869266e564dSmrgif test "X${echo_test_string+set}" != Xset; then
1870266e564dSmrg# find a string as large as possible, as long as the shell can cope with it
1871266e564dSmrg  for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
1872266e564dSmrg    # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
1873266e564dSmrg    if (echo_test_string=`eval $cmd`) 2>/dev/null &&
1874266e564dSmrg       echo_test_string=`eval $cmd` &&
1875266e564dSmrg       (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
1876266e564dSmrg    then
1877266e564dSmrg      break
1878266e564dSmrg    fi
1879266e564dSmrg  done
1880266e564dSmrgfi
1881266e564dSmrg
1882266e564dSmrgif test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
1883266e564dSmrg   echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
1884266e564dSmrg   test "X$echo_testing_string" = "X$echo_test_string"; then
1885266e564dSmrg  :
1886266e564dSmrgelse
1887266e564dSmrg  # The Solaris, AIX, and Digital Unix default echo programs unquote
1888266e564dSmrg  # backslashes.  This makes it impossible to quote backslashes using
1889266e564dSmrg  #   echo "$something" | sed 's/\\/\\\\/g'
1890266e564dSmrg  #
1891266e564dSmrg  # So, first we look for a working echo in the user's PATH.
1892266e564dSmrg
1893266e564dSmrg  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
1894266e564dSmrg  for dir in $PATH /usr/ucb; do
1895266e564dSmrg    IFS="$lt_save_ifs"
1896266e564dSmrg    if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
1897266e564dSmrg       test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
1898266e564dSmrg       echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
1899266e564dSmrg       test "X$echo_testing_string" = "X$echo_test_string"; then
1900266e564dSmrg      echo="$dir/echo"
1901266e564dSmrg      break
1902266e564dSmrg    fi
1903266e564dSmrg  done
1904266e564dSmrg  IFS="$lt_save_ifs"
1905266e564dSmrg
1906266e564dSmrg  if test "X$echo" = Xecho; then
1907266e564dSmrg    # We didn't find a better echo, so look for alternatives.
1908266e564dSmrg    if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
1909266e564dSmrg       echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
1910266e564dSmrg       test "X$echo_testing_string" = "X$echo_test_string"; then
1911266e564dSmrg      # This shell has a builtin print -r that does the trick.
1912266e564dSmrg      echo='print -r'
1913266e564dSmrg    elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
1914266e564dSmrg	 test "X$CONFIG_SHELL" != X/bin/ksh; then
1915266e564dSmrg      # If we have ksh, try running configure again with it.
1916266e564dSmrg      ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
1917266e564dSmrg      export ORIGINAL_CONFIG_SHELL
1918266e564dSmrg      CONFIG_SHELL=/bin/ksh
1919266e564dSmrg      export CONFIG_SHELL
1920266e564dSmrg      exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
1921266e564dSmrg    else
1922266e564dSmrg      # Try using printf.
1923266e564dSmrg      echo='printf %s\n'
1924266e564dSmrg      if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
1925266e564dSmrg	 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
1926266e564dSmrg	 test "X$echo_testing_string" = "X$echo_test_string"; then
1927266e564dSmrg	# Cool, printf works
1928266e564dSmrg	:
1929266e564dSmrg      elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1930266e564dSmrg	   test "X$echo_testing_string" = 'X\t' &&
1931266e564dSmrg	   echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1932266e564dSmrg	   test "X$echo_testing_string" = "X$echo_test_string"; then
1933266e564dSmrg	CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
1934266e564dSmrg	export CONFIG_SHELL
1935266e564dSmrg	SHELL="$CONFIG_SHELL"
1936266e564dSmrg	export SHELL
1937266e564dSmrg	echo="$CONFIG_SHELL [$]0 --fallback-echo"
1938266e564dSmrg      elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1939266e564dSmrg	   test "X$echo_testing_string" = 'X\t' &&
1940266e564dSmrg	   echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1941266e564dSmrg	   test "X$echo_testing_string" = "X$echo_test_string"; then
1942266e564dSmrg	echo="$CONFIG_SHELL [$]0 --fallback-echo"
1943266e564dSmrg      else
1944266e564dSmrg	# maybe with a smaller string...
1945266e564dSmrg	prev=:
1946266e564dSmrg
1947266e564dSmrg	for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
1948266e564dSmrg	  if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
1949266e564dSmrg	  then
1950266e564dSmrg	    break
1951266e564dSmrg	  fi
1952266e564dSmrg	  prev="$cmd"
1953266e564dSmrg	done
1954266e564dSmrg
1955266e564dSmrg	if test "$prev" != 'sed 50q "[$]0"'; then
1956266e564dSmrg	  echo_test_string=`eval $prev`
1957266e564dSmrg	  export echo_test_string
1958266e564dSmrg	  exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
1959266e564dSmrg	else
1960266e564dSmrg	  # Oops.  We lost completely, so just stick with echo.
1961266e564dSmrg	  echo=echo
1962266e564dSmrg	fi
1963266e564dSmrg      fi
1964266e564dSmrg    fi
1965266e564dSmrg  fi
1966266e564dSmrgfi
1967266e564dSmrgfi
1968266e564dSmrg
1969266e564dSmrg# Copy echo and quote the copy suitably for passing to libtool from
1970266e564dSmrg# the Makefile, instead of quoting the original, which is used later.
1971266e564dSmrgECHO=$echo
1972266e564dSmrgif test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
1973266e564dSmrg   ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
1974266e564dSmrgfi
1975266e564dSmrg
1976266e564dSmrgAC_SUBST(ECHO)
1977266e564dSmrg])])# _LT_AC_PROG_ECHO_BACKSLASH
1978266e564dSmrg
1979266e564dSmrg
1980266e564dSmrg# _LT_AC_LOCK
1981266e564dSmrg# -----------
1982266e564dSmrgAC_DEFUN([_LT_AC_LOCK],
1983266e564dSmrg[AC_ARG_ENABLE([libtool-lock],
1984266e564dSmrg    [AC_HELP_STRING([--disable-libtool-lock],
1985266e564dSmrg	[avoid locking (might break parallel builds)])])
1986266e564dSmrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
1987266e564dSmrg
1988266e564dSmrg# Some flags need to be propagated to the compiler or linker for good
1989266e564dSmrg# libtool support.
1990266e564dSmrgcase $host in
1991266e564dSmrgia64-*-hpux*)
1992266e564dSmrg  # Find out which ABI we are using.
1993266e564dSmrg  echo 'int i;' > conftest.$ac_ext
1994266e564dSmrg  if AC_TRY_EVAL(ac_compile); then
1995266e564dSmrg    case `/usr/bin/file conftest.$ac_objext` in
1996266e564dSmrg    *ELF-32*)
1997266e564dSmrg      HPUX_IA64_MODE="32"
1998266e564dSmrg      ;;
1999266e564dSmrg    *ELF-64*)
2000266e564dSmrg      HPUX_IA64_MODE="64"
2001266e564dSmrg      ;;
2002266e564dSmrg    esac
2003266e564dSmrg  fi
2004266e564dSmrg  rm -rf conftest*
2005266e564dSmrg  ;;
2006266e564dSmrg*-*-irix6*)
2007266e564dSmrg  # Find out which ABI we are using.
2008266e564dSmrg  echo '[#]line __oline__ "configure"' > conftest.$ac_ext
2009266e564dSmrg  if AC_TRY_EVAL(ac_compile); then
2010266e564dSmrg   if test "$lt_cv_prog_gnu_ld" = yes; then
2011266e564dSmrg    case `/usr/bin/file conftest.$ac_objext` in
2012266e564dSmrg    *32-bit*)
2013266e564dSmrg      LD="${LD-ld} -melf32bsmip"
2014266e564dSmrg      ;;
2015266e564dSmrg    *N32*)
2016266e564dSmrg      LD="${LD-ld} -melf32bmipn32"
2017266e564dSmrg      ;;
2018266e564dSmrg    *64-bit*)
2019266e564dSmrg      LD="${LD-ld} -melf64bmip"
2020266e564dSmrg      ;;
2021266e564dSmrg    esac
2022266e564dSmrg   else
2023266e564dSmrg    case `/usr/bin/file conftest.$ac_objext` in
2024266e564dSmrg    *32-bit*)
2025266e564dSmrg      LD="${LD-ld} -32"
2026266e564dSmrg      ;;
2027266e564dSmrg    *N32*)
2028266e564dSmrg      LD="${LD-ld} -n32"
2029266e564dSmrg      ;;
2030266e564dSmrg    *64-bit*)
2031266e564dSmrg      LD="${LD-ld} -64"
2032266e564dSmrg      ;;
2033266e564dSmrg    esac
2034266e564dSmrg   fi
2035266e564dSmrg  fi
2036266e564dSmrg  rm -rf conftest*
2037266e564dSmrg  ;;
2038266e564dSmrg
2039266e564dSmrgx86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
2040266e564dSmrg  # Find out which ABI we are using.
2041266e564dSmrg  echo 'int i;' > conftest.$ac_ext
2042266e564dSmrg  if AC_TRY_EVAL(ac_compile); then
2043266e564dSmrg    case `/usr/bin/file conftest.o` in
2044266e564dSmrg    *32-bit*)
2045266e564dSmrg      case $host in
2046266e564dSmrg        x86_64-*linux*)
2047266e564dSmrg          LD="${LD-ld} -m elf_i386"
2048266e564dSmrg          ;;
2049266e564dSmrg        ppc64-*linux*|powerpc64-*linux*)
2050266e564dSmrg          LD="${LD-ld} -m elf32ppclinux"
2051266e564dSmrg          ;;
2052266e564dSmrg        s390x-*linux*)
2053266e564dSmrg          LD="${LD-ld} -m elf_s390"
2054266e564dSmrg          ;;
2055266e564dSmrg        sparc64-*linux*)
2056266e564dSmrg          LD="${LD-ld} -m elf32_sparc"
2057266e564dSmrg          ;;
2058266e564dSmrg      esac
2059266e564dSmrg      ;;
2060266e564dSmrg    *64-bit*)
2061266e564dSmrg      case $host in
2062266e564dSmrg        x86_64-*linux*)
2063266e564dSmrg          LD="${LD-ld} -m elf_x86_64"
2064266e564dSmrg          ;;
2065266e564dSmrg        ppc*-*linux*|powerpc*-*linux*)
2066266e564dSmrg          LD="${LD-ld} -m elf64ppc"
2067266e564dSmrg          ;;
2068266e564dSmrg        s390*-*linux*)
2069266e564dSmrg          LD="${LD-ld} -m elf64_s390"
2070266e564dSmrg          ;;
2071266e564dSmrg        sparc*-*linux*)
2072266e564dSmrg          LD="${LD-ld} -m elf64_sparc"
2073266e564dSmrg          ;;
2074266e564dSmrg      esac
2075266e564dSmrg      ;;
2076266e564dSmrg    esac
2077266e564dSmrg  fi
2078266e564dSmrg  rm -rf conftest*
2079266e564dSmrg  ;;
2080266e564dSmrg
2081266e564dSmrg*-*-sco3.2v5*)
2082266e564dSmrg  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
2083266e564dSmrg  SAVE_CFLAGS="$CFLAGS"
2084266e564dSmrg  CFLAGS="$CFLAGS -belf"
2085266e564dSmrg  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
2086266e564dSmrg    [AC_LANG_PUSH(C)
2087266e564dSmrg     AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
2088266e564dSmrg     AC_LANG_POP])
2089266e564dSmrg  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
2090266e564dSmrg    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
2091266e564dSmrg    CFLAGS="$SAVE_CFLAGS"
2092266e564dSmrg  fi
2093266e564dSmrg  ;;
2094266e564dSmrgsparc*-*solaris*)
2095266e564dSmrg  # Find out which ABI we are using.
2096266e564dSmrg  echo 'int i;' > conftest.$ac_ext
2097266e564dSmrg  if AC_TRY_EVAL(ac_compile); then
2098266e564dSmrg    case `/usr/bin/file conftest.o` in
2099266e564dSmrg    *64-bit*)
2100266e564dSmrg      case $lt_cv_prog_gnu_ld in
2101266e564dSmrg      yes*) LD="${LD-ld} -m elf64_sparc" ;;
2102266e564dSmrg      *)    LD="${LD-ld} -64" ;;
2103266e564dSmrg      esac
2104266e564dSmrg      ;;
2105266e564dSmrg    esac
2106266e564dSmrg  fi
2107266e564dSmrg  rm -rf conftest*
2108266e564dSmrg  ;;
2109266e564dSmrg
2110266e564dSmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
2111266e564dSmrg[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
2112266e564dSmrg  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
2113266e564dSmrg  AC_CHECK_TOOL(AS, as, false)
2114266e564dSmrg  AC_CHECK_TOOL(OBJDUMP, objdump, false)
2115266e564dSmrg  ;;
2116266e564dSmrg  ])
2117266e564dSmrgesac
2118266e564dSmrg
2119266e564dSmrgneed_locks="$enable_libtool_lock"
2120266e564dSmrg
2121266e564dSmrg])# _LT_AC_LOCK
2122266e564dSmrg
2123266e564dSmrg
2124266e564dSmrg# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
2125266e564dSmrg#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
2126266e564dSmrg# ----------------------------------------------------------------
2127266e564dSmrg# Check whether the given compiler option works
2128266e564dSmrgAC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
2129266e564dSmrg[AC_REQUIRE([LT_AC_PROG_SED])
2130266e564dSmrgAC_CACHE_CHECK([$1], [$2],
2131266e564dSmrg  [$2=no
2132266e564dSmrg  ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
2133266e564dSmrg   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
2134266e564dSmrg   lt_compiler_flag="$3"
2135266e564dSmrg   # Insert the option either (1) after the last *FLAGS variable, or
2136266e564dSmrg   # (2) before a word containing "conftest.", or (3) at the end.
2137266e564dSmrg   # Note that $ac_compile itself does not contain backslashes and begins
2138266e564dSmrg   # with a dollar sign (not a hyphen), so the echo should work correctly.
2139266e564dSmrg   # The option is referenced via a variable to avoid confusing sed.
2140266e564dSmrg   lt_compile=`echo "$ac_compile" | $SED \
2141266e564dSmrg   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
2142266e564dSmrg   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
2143266e564dSmrg   -e 's:$: $lt_compiler_flag:'`
2144266e564dSmrg   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
2145266e564dSmrg   (eval "$lt_compile" 2>conftest.err)
2146266e564dSmrg   ac_status=$?
2147266e564dSmrg   cat conftest.err >&AS_MESSAGE_LOG_FD
2148266e564dSmrg   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
2149266e564dSmrg   if (exit $ac_status) && test -s "$ac_outfile"; then
2150266e564dSmrg     # The compiler can only warn and ignore the option if not recognized
2151266e564dSmrg     # So say no if there are warnings other than the usual output.
2152266e564dSmrg     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
2153266e564dSmrg     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
2154266e564dSmrg     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
2155266e564dSmrg       $2=yes
2156266e564dSmrg     fi
2157266e564dSmrg   fi
2158266e564dSmrg   $rm conftest*
2159266e564dSmrg])
2160266e564dSmrg
2161266e564dSmrgif test x"[$]$2" = xyes; then
2162266e564dSmrg    ifelse([$5], , :, [$5])
2163266e564dSmrgelse
2164266e564dSmrg    ifelse([$6], , :, [$6])
2165266e564dSmrgfi
2166266e564dSmrg])# AC_LIBTOOL_COMPILER_OPTION
2167266e564dSmrg
2168266e564dSmrg
2169266e564dSmrg# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
2170266e564dSmrg#                          [ACTION-SUCCESS], [ACTION-FAILURE])
2171266e564dSmrg# ------------------------------------------------------------
2172266e564dSmrg# Check whether the given compiler option works
2173266e564dSmrgAC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
2174266e564dSmrg[AC_CACHE_CHECK([$1], [$2],
2175266e564dSmrg  [$2=no
2176266e564dSmrg   save_LDFLAGS="$LDFLAGS"
2177266e564dSmrg   LDFLAGS="$LDFLAGS $3"
2178266e564dSmrg   printf "$lt_simple_link_test_code" > conftest.$ac_ext
2179266e564dSmrg   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
2180266e564dSmrg     # The linker can only warn and ignore the option if not recognized
2181266e564dSmrg     # So say no if there are warnings
2182266e564dSmrg     if test -s conftest.err; then
2183266e564dSmrg       # Append any errors to the config.log.
2184266e564dSmrg       cat conftest.err 1>&AS_MESSAGE_LOG_FD
2185266e564dSmrg       $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
2186266e564dSmrg       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
2187266e564dSmrg       if diff conftest.exp conftest.er2 >/dev/null; then
2188266e564dSmrg         $2=yes
2189266e564dSmrg       fi
2190266e564dSmrg     else
2191266e564dSmrg       $2=yes
2192266e564dSmrg     fi
2193266e564dSmrg   fi
2194266e564dSmrg   $rm conftest*
2195266e564dSmrg   LDFLAGS="$save_LDFLAGS"
2196266e564dSmrg])
2197266e564dSmrg
2198266e564dSmrgif test x"[$]$2" = xyes; then
2199266e564dSmrg    ifelse([$4], , :, [$4])
2200266e564dSmrgelse
2201266e564dSmrg    ifelse([$5], , :, [$5])
2202266e564dSmrgfi
2203266e564dSmrg])# AC_LIBTOOL_LINKER_OPTION
2204266e564dSmrg
2205266e564dSmrg
2206266e564dSmrg# AC_LIBTOOL_SYS_MAX_CMD_LEN
2207266e564dSmrg# --------------------------
2208266e564dSmrgAC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
2209266e564dSmrg[# find the maximum length of command line arguments
2210266e564dSmrgAC_MSG_CHECKING([the maximum length of command line arguments])
2211266e564dSmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
2212266e564dSmrg  i=0
2213266e564dSmrg  teststring="ABCD"
2214266e564dSmrg
2215266e564dSmrg  case $build_os in
2216266e564dSmrg  msdosdjgpp*)
2217266e564dSmrg    # On DJGPP, this test can blow up pretty badly due to problems in libc
2218266e564dSmrg    # (any single argument exceeding 2000 bytes causes a buffer overrun
2219266e564dSmrg    # during glob expansion).  Even if it were fixed, the result of this
2220266e564dSmrg    # check would be larger than it should be.
2221266e564dSmrg    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
2222266e564dSmrg    ;;
2223266e564dSmrg
2224266e564dSmrg  gnu*)
2225266e564dSmrg    # Under GNU Hurd, this test is not required because there is
2226266e564dSmrg    # no limit to the length of command line arguments.
2227266e564dSmrg    # Libtool will interpret -1 as no limit whatsoever
2228266e564dSmrg    lt_cv_sys_max_cmd_len=-1;
2229266e564dSmrg    ;;
2230266e564dSmrg
2231266e564dSmrg  cygwin* | mingw*)
2232266e564dSmrg    # On Win9x/ME, this test blows up -- it succeeds, but takes
2233266e564dSmrg    # about 5 minutes as the teststring grows exponentially.
2234266e564dSmrg    # Worse, since 9x/ME are not pre-emptively multitasking,
2235266e564dSmrg    # you end up with a "frozen" computer, even though with patience
2236266e564dSmrg    # the test eventually succeeds (with a max line length of 256k).
2237266e564dSmrg    # Instead, let's just punt: use the minimum linelength reported by
2238266e564dSmrg    # all of the supported platforms: 8192 (on NT/2K/XP).
2239266e564dSmrg    lt_cv_sys_max_cmd_len=8192;
2240266e564dSmrg    ;;
2241266e564dSmrg
2242266e564dSmrg  amigaos*)
2243266e564dSmrg    # On AmigaOS with pdksh, this test takes hours, literally.
2244266e564dSmrg    # So we just punt and use a minimum line length of 8192.
2245266e564dSmrg    lt_cv_sys_max_cmd_len=8192;
2246266e564dSmrg    ;;
2247266e564dSmrg
2248266e564dSmrg  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
2249266e564dSmrg    # This has been around since 386BSD, at least.  Likely further.
2250266e564dSmrg    if test -x /sbin/sysctl; then
2251266e564dSmrg      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
2252266e564dSmrg    elif test -x /usr/sbin/sysctl; then
2253266e564dSmrg      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
2254266e564dSmrg    else
2255266e564dSmrg      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
2256266e564dSmrg    fi
2257266e564dSmrg    # And add a safety zone
2258266e564dSmrg    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
2259266e564dSmrg    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
2260266e564dSmrg    ;;
2261266e564dSmrg
2262266e564dSmrg  interix*)
2263266e564dSmrg    # We know the value 262144 and hardcode it with a safety zone (like BSD)
2264266e564dSmrg    lt_cv_sys_max_cmd_len=196608
2265266e564dSmrg    ;;
2266266e564dSmrg
2267266e564dSmrg  osf*)
2268266e564dSmrg    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
2269266e564dSmrg    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
2270266e564dSmrg    # nice to cause kernel panics so lets avoid the loop below.
2271266e564dSmrg    # First set a reasonable default.
2272266e564dSmrg    lt_cv_sys_max_cmd_len=16384
2273266e564dSmrg    #
2274266e564dSmrg    if test -x /sbin/sysconfig; then
2275266e564dSmrg      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
2276266e564dSmrg        *1*) lt_cv_sys_max_cmd_len=-1 ;;
2277266e564dSmrg      esac
2278266e564dSmrg    fi
2279266e564dSmrg    ;;
2280266e564dSmrg  sco3.2v5*)
2281266e564dSmrg    lt_cv_sys_max_cmd_len=102400
2282266e564dSmrg    ;;
2283266e564dSmrg  sysv5* | sco5v6* | sysv4.2uw2*)
2284266e564dSmrg    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
2285266e564dSmrg    if test -n "$kargmax"; then
2286266e564dSmrg      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ 	]]//'`
2287266e564dSmrg    else
2288266e564dSmrg      lt_cv_sys_max_cmd_len=32768
2289266e564dSmrg    fi
2290266e564dSmrg    ;;
2291266e564dSmrg  *)
2292266e564dSmrg    # If test is not a shell built-in, we'll probably end up computing a
2293266e564dSmrg    # maximum length that is only half of the actual maximum length, but
2294266e564dSmrg    # we can't tell.
2295266e564dSmrg    SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
2296266e564dSmrg    while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
2297266e564dSmrg	       = "XX$teststring") >/dev/null 2>&1 &&
2298266e564dSmrg	    new_result=`expr "X$teststring" : ".*" 2>&1` &&
2299266e564dSmrg	    lt_cv_sys_max_cmd_len=$new_result &&
2300266e564dSmrg	    test $i != 17 # 1/2 MB should be enough
2301266e564dSmrg    do
2302266e564dSmrg      i=`expr $i + 1`
2303266e564dSmrg      teststring=$teststring$teststring
2304266e564dSmrg    done
2305266e564dSmrg    teststring=
2306266e564dSmrg    # Add a significant safety factor because C++ compilers can tack on massive
2307266e564dSmrg    # amounts of additional arguments before passing them to the linker.
2308266e564dSmrg    # It appears as though 1/2 is a usable value.
2309266e564dSmrg    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
2310266e564dSmrg    ;;
2311266e564dSmrg  esac
2312266e564dSmrg])
2313266e564dSmrgif test -n $lt_cv_sys_max_cmd_len ; then
2314266e564dSmrg  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
2315266e564dSmrgelse
2316266e564dSmrg  AC_MSG_RESULT(none)
2317266e564dSmrgfi
2318266e564dSmrg])# AC_LIBTOOL_SYS_MAX_CMD_LEN
2319266e564dSmrg
2320266e564dSmrg
2321266e564dSmrg# _LT_AC_CHECK_DLFCN
2322266e564dSmrg# ------------------
2323266e564dSmrgAC_DEFUN([_LT_AC_CHECK_DLFCN],
2324266e564dSmrg[AC_CHECK_HEADERS(dlfcn.h)dnl
2325266e564dSmrg])# _LT_AC_CHECK_DLFCN
2326266e564dSmrg
2327266e564dSmrg
2328266e564dSmrg# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
2329266e564dSmrg#                           ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
2330266e564dSmrg# ---------------------------------------------------------------------
2331266e564dSmrgAC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
2332266e564dSmrg[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
2333266e564dSmrgif test "$cross_compiling" = yes; then :
2334266e564dSmrg  [$4]
2335266e564dSmrgelse
2336266e564dSmrg  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
2337266e564dSmrg  lt_status=$lt_dlunknown
2338266e564dSmrg  cat > conftest.$ac_ext <<EOF
2339266e564dSmrg[#line __oline__ "configure"
2340266e564dSmrg#include "confdefs.h"
2341266e564dSmrg
2342266e564dSmrg#if HAVE_DLFCN_H
2343266e564dSmrg#include <dlfcn.h>
2344266e564dSmrg#endif
2345266e564dSmrg
2346266e564dSmrg#include <stdio.h>
2347266e564dSmrg
2348266e564dSmrg#ifdef RTLD_GLOBAL
2349266e564dSmrg#  define LT_DLGLOBAL		RTLD_GLOBAL
2350266e564dSmrg#else
2351266e564dSmrg#  ifdef DL_GLOBAL
2352266e564dSmrg#    define LT_DLGLOBAL		DL_GLOBAL
2353266e564dSmrg#  else
2354266e564dSmrg#    define LT_DLGLOBAL		0
2355266e564dSmrg#  endif
2356266e564dSmrg#endif
2357266e564dSmrg
2358266e564dSmrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
2359266e564dSmrg   find out it does not work in some platform. */
2360266e564dSmrg#ifndef LT_DLLAZY_OR_NOW
2361266e564dSmrg#  ifdef RTLD_LAZY
2362266e564dSmrg#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
2363266e564dSmrg#  else
2364266e564dSmrg#    ifdef DL_LAZY
2365266e564dSmrg#      define LT_DLLAZY_OR_NOW		DL_LAZY
2366266e564dSmrg#    else
2367266e564dSmrg#      ifdef RTLD_NOW
2368266e564dSmrg#        define LT_DLLAZY_OR_NOW	RTLD_NOW
2369266e564dSmrg#      else
2370266e564dSmrg#        ifdef DL_NOW
2371266e564dSmrg#          define LT_DLLAZY_OR_NOW	DL_NOW
2372266e564dSmrg#        else
2373266e564dSmrg#          define LT_DLLAZY_OR_NOW	0
2374266e564dSmrg#        endif
2375266e564dSmrg#      endif
2376266e564dSmrg#    endif
2377266e564dSmrg#  endif
2378266e564dSmrg#endif
2379266e564dSmrg
2380266e564dSmrg#ifdef __cplusplus
2381266e564dSmrgextern "C" void exit (int);
2382266e564dSmrg#endif
2383266e564dSmrg
2384266e564dSmrgvoid fnord() { int i=42;}
2385266e564dSmrgint main ()
2386266e564dSmrg{
2387266e564dSmrg  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
2388266e564dSmrg  int status = $lt_dlunknown;
2389266e564dSmrg
2390266e564dSmrg  if (self)
2391266e564dSmrg    {
2392266e564dSmrg      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
2393266e564dSmrg      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
2394266e564dSmrg      /* dlclose (self); */
2395266e564dSmrg    }
2396266e564dSmrg  else
2397266e564dSmrg    puts (dlerror ());
2398266e564dSmrg
2399266e564dSmrg    exit (status);
2400266e564dSmrg}]
2401266e564dSmrgEOF
2402266e564dSmrg  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
2403266e564dSmrg    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
2404266e564dSmrg    lt_status=$?
2405266e564dSmrg    case x$lt_status in
2406266e564dSmrg      x$lt_dlno_uscore) $1 ;;
2407266e564dSmrg      x$lt_dlneed_uscore) $2 ;;
2408266e564dSmrg      x$lt_dlunknown|x*) $3 ;;
2409266e564dSmrg    esac
2410266e564dSmrg  else :
2411266e564dSmrg    # compilation failed
2412266e564dSmrg    $3
2413266e564dSmrg  fi
2414266e564dSmrgfi
2415266e564dSmrgrm -fr conftest*
2416266e564dSmrg])# _LT_AC_TRY_DLOPEN_SELF
2417266e564dSmrg
2418266e564dSmrg
2419266e564dSmrg# AC_LIBTOOL_DLOPEN_SELF
2420266e564dSmrg# ----------------------
2421266e564dSmrgAC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
2422266e564dSmrg[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
2423266e564dSmrgif test "x$enable_dlopen" != xyes; then
2424266e564dSmrg  enable_dlopen=unknown
2425266e564dSmrg  enable_dlopen_self=unknown
2426266e564dSmrg  enable_dlopen_self_static=unknown
2427266e564dSmrgelse
2428266e564dSmrg  lt_cv_dlopen=no
2429266e564dSmrg  lt_cv_dlopen_libs=
2430266e564dSmrg
2431266e564dSmrg  case $host_os in
2432266e564dSmrg  beos*)
2433266e564dSmrg    lt_cv_dlopen="load_add_on"
2434266e564dSmrg    lt_cv_dlopen_libs=
2435266e564dSmrg    lt_cv_dlopen_self=yes
2436266e564dSmrg    ;;
2437266e564dSmrg
2438266e564dSmrg  mingw* | pw32*)
2439266e564dSmrg    lt_cv_dlopen="LoadLibrary"
2440266e564dSmrg    lt_cv_dlopen_libs=
2441266e564dSmrg   ;;
2442266e564dSmrg
2443266e564dSmrg  cygwin*)
2444266e564dSmrg    lt_cv_dlopen="dlopen"
2445266e564dSmrg    lt_cv_dlopen_libs=
2446266e564dSmrg   ;;
2447266e564dSmrg
2448266e564dSmrg  darwin*)
2449266e564dSmrg  # if libdl is installed we need to link against it
2450266e564dSmrg    AC_CHECK_LIB([dl], [dlopen],
2451266e564dSmrg		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
2452266e564dSmrg    lt_cv_dlopen="dyld"
2453266e564dSmrg    lt_cv_dlopen_libs=
2454266e564dSmrg    lt_cv_dlopen_self=yes
2455266e564dSmrg    ])
2456266e564dSmrg   ;;
2457266e564dSmrg
2458266e564dSmrg  *)
2459266e564dSmrg    AC_CHECK_FUNC([shl_load],
2460266e564dSmrg	  [lt_cv_dlopen="shl_load"],
2461266e564dSmrg      [AC_CHECK_LIB([dld], [shl_load],
2462266e564dSmrg	    [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
2463266e564dSmrg	[AC_CHECK_FUNC([dlopen],
2464266e564dSmrg	      [lt_cv_dlopen="dlopen"],
2465266e564dSmrg	  [AC_CHECK_LIB([dl], [dlopen],
2466266e564dSmrg		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
2467266e564dSmrg	    [AC_CHECK_LIB([svld], [dlopen],
2468266e564dSmrg		  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
2469266e564dSmrg	      [AC_CHECK_LIB([dld], [dld_link],
2470266e564dSmrg		    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
2471266e564dSmrg	      ])
2472266e564dSmrg	    ])
2473266e564dSmrg	  ])
2474266e564dSmrg	])
2475266e564dSmrg      ])
2476266e564dSmrg    ;;
2477266e564dSmrg  esac
2478266e564dSmrg
2479266e564dSmrg  if test "x$lt_cv_dlopen" != xno; then
2480266e564dSmrg    enable_dlopen=yes
2481266e564dSmrg  else
2482266e564dSmrg    enable_dlopen=no
2483266e564dSmrg  fi
2484266e564dSmrg
2485266e564dSmrg  case $lt_cv_dlopen in
2486266e564dSmrg  dlopen)
2487266e564dSmrg    save_CPPFLAGS="$CPPFLAGS"
2488266e564dSmrg    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
2489266e564dSmrg
2490266e564dSmrg    save_LDFLAGS="$LDFLAGS"
2491266e564dSmrg    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
2492266e564dSmrg
2493266e564dSmrg    save_LIBS="$LIBS"
2494266e564dSmrg    LIBS="$lt_cv_dlopen_libs $LIBS"
2495266e564dSmrg
2496266e564dSmrg    AC_CACHE_CHECK([whether a program can dlopen itself],
2497266e564dSmrg	  lt_cv_dlopen_self, [dnl
2498266e564dSmrg	  _LT_AC_TRY_DLOPEN_SELF(
2499266e564dSmrg	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
2500266e564dSmrg	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
2501266e564dSmrg    ])
2502266e564dSmrg
2503266e564dSmrg    if test "x$lt_cv_dlopen_self" = xyes; then
2504266e564dSmrg      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
2505266e564dSmrg      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
2506266e564dSmrg    	  lt_cv_dlopen_self_static, [dnl
2507266e564dSmrg	  _LT_AC_TRY_DLOPEN_SELF(
2508266e564dSmrg	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
2509266e564dSmrg	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
2510266e564dSmrg      ])
2511266e564dSmrg    fi
2512266e564dSmrg
2513266e564dSmrg    CPPFLAGS="$save_CPPFLAGS"
2514266e564dSmrg    LDFLAGS="$save_LDFLAGS"
2515266e564dSmrg    LIBS="$save_LIBS"
2516266e564dSmrg    ;;
2517266e564dSmrg  esac
2518266e564dSmrg
2519266e564dSmrg  case $lt_cv_dlopen_self in
2520266e564dSmrg  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
2521266e564dSmrg  *) enable_dlopen_self=unknown ;;
2522266e564dSmrg  esac
2523266e564dSmrg
2524266e564dSmrg  case $lt_cv_dlopen_self_static in
2525266e564dSmrg  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
2526266e564dSmrg  *) enable_dlopen_self_static=unknown ;;
2527266e564dSmrg  esac
2528266e564dSmrgfi
2529266e564dSmrg])# AC_LIBTOOL_DLOPEN_SELF
2530266e564dSmrg
2531266e564dSmrg
2532266e564dSmrg# AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
2533266e564dSmrg# ---------------------------------
2534266e564dSmrg# Check to see if options -c and -o are simultaneously supported by compiler
2535266e564dSmrgAC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
2536266e564dSmrg[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
2537266e564dSmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
2538266e564dSmrg  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
2539266e564dSmrg  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
2540266e564dSmrg   $rm -r conftest 2>/dev/null
2541266e564dSmrg   mkdir conftest
2542266e564dSmrg   cd conftest
2543266e564dSmrg   mkdir out
2544266e564dSmrg   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
2545266e564dSmrg
2546266e564dSmrg   lt_compiler_flag="-o out/conftest2.$ac_objext"
2547266e564dSmrg   # Insert the option either (1) after the last *FLAGS variable, or
2548266e564dSmrg   # (2) before a word containing "conftest.", or (3) at the end.
2549266e564dSmrg   # Note that $ac_compile itself does not contain backslashes and begins
2550266e564dSmrg   # with a dollar sign (not a hyphen), so the echo should work correctly.
2551266e564dSmrg   lt_compile=`echo "$ac_compile" | $SED \
2552266e564dSmrg   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
2553266e564dSmrg   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
2554266e564dSmrg   -e 's:$: $lt_compiler_flag:'`
2555266e564dSmrg   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
2556266e564dSmrg   (eval "$lt_compile" 2>out/conftest.err)
2557266e564dSmrg   ac_status=$?
2558266e564dSmrg   cat out/conftest.err >&AS_MESSAGE_LOG_FD
2559266e564dSmrg   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
2560266e564dSmrg   if (exit $ac_status) && test -s out/conftest2.$ac_objext
2561266e564dSmrg   then
2562266e564dSmrg     # The compiler can only warn and ignore the option if not recognized
2563266e564dSmrg     # So say no if there are warnings
2564266e564dSmrg     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
2565266e564dSmrg     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
2566266e564dSmrg     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
2567266e564dSmrg       _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
2568266e564dSmrg     fi
2569266e564dSmrg   fi
2570266e564dSmrg   chmod u+w . 2>&AS_MESSAGE_LOG_FD
2571266e564dSmrg   $rm conftest*
2572266e564dSmrg   # SGI C++ compiler will create directory out/ii_files/ for
2573266e564dSmrg   # template instantiation
2574266e564dSmrg   test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
2575266e564dSmrg   $rm out/* && rmdir out
2576266e564dSmrg   cd ..
2577266e564dSmrg   rmdir conftest
2578266e564dSmrg   $rm conftest*
2579266e564dSmrg])
2580266e564dSmrg])# AC_LIBTOOL_PROG_CC_C_O
2581266e564dSmrg
2582266e564dSmrg
2583266e564dSmrg# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
2584266e564dSmrg# -----------------------------------------
2585266e564dSmrg# Check to see if we can do hard links to lock some files if needed
2586266e564dSmrgAC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
2587266e564dSmrg[AC_REQUIRE([_LT_AC_LOCK])dnl
2588266e564dSmrg
2589266e564dSmrghard_links="nottested"
2590266e564dSmrgif test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
2591266e564dSmrg  # do not overwrite the value of need_locks provided by the user
2592266e564dSmrg  AC_MSG_CHECKING([if we can lock with hard links])
2593266e564dSmrg  hard_links=yes
2594266e564dSmrg  $rm conftest*
2595266e564dSmrg  ln conftest.a conftest.b 2>/dev/null && hard_links=no
2596266e564dSmrg  touch conftest.a
2597266e564dSmrg  ln conftest.a conftest.b 2>&5 || hard_links=no
2598266e564dSmrg  ln conftest.a conftest.b 2>/dev/null && hard_links=no
2599266e564dSmrg  AC_MSG_RESULT([$hard_links])
2600266e564dSmrg  if test "$hard_links" = no; then
2601266e564dSmrg    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
2602266e564dSmrg    need_locks=warn
2603266e564dSmrg  fi
2604266e564dSmrgelse
2605266e564dSmrg  need_locks=no
2606266e564dSmrgfi
2607266e564dSmrg])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
2608266e564dSmrg
2609266e564dSmrg
2610266e564dSmrg# AC_LIBTOOL_OBJDIR
2611266e564dSmrg# -----------------
2612266e564dSmrgAC_DEFUN([AC_LIBTOOL_OBJDIR],
2613266e564dSmrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
2614266e564dSmrg[rm -f .libs 2>/dev/null
2615266e564dSmrgmkdir .libs 2>/dev/null
2616266e564dSmrgif test -d .libs; then
2617266e564dSmrg  lt_cv_objdir=.libs
2618266e564dSmrgelse
2619266e564dSmrg  # MS-DOS does not allow filenames that begin with a dot.
2620266e564dSmrg  lt_cv_objdir=_libs
2621266e564dSmrgfi
2622266e564dSmrgrmdir .libs 2>/dev/null])
2623266e564dSmrgobjdir=$lt_cv_objdir
2624266e564dSmrg])# AC_LIBTOOL_OBJDIR
2625266e564dSmrg
2626266e564dSmrg
2627266e564dSmrg# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
2628266e564dSmrg# ----------------------------------------------
2629266e564dSmrg# Check hardcoding attributes.
2630266e564dSmrgAC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
2631266e564dSmrg[AC_MSG_CHECKING([how to hardcode library paths into programs])
2632266e564dSmrg_LT_AC_TAGVAR(hardcode_action, $1)=
2633266e564dSmrgif test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
2634266e564dSmrg   test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \
2635266e564dSmrg   test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
2636266e564dSmrg
2637266e564dSmrg  # We can hardcode non-existant directories.
2638266e564dSmrg  if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
2639266e564dSmrg     # If the only mechanism to avoid hardcoding is shlibpath_var, we
2640266e564dSmrg     # have to relink, otherwise we might link with an installed library
2641266e564dSmrg     # when we should be linking with a yet-to-be-installed one
2642266e564dSmrg     ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
2643266e564dSmrg     test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
2644266e564dSmrg    # Linking always hardcodes the temporary library directory.
2645266e564dSmrg    _LT_AC_TAGVAR(hardcode_action, $1)=relink
2646266e564dSmrg  else
2647266e564dSmrg    # We can link without hardcoding, and we can hardcode nonexisting dirs.
2648266e564dSmrg    _LT_AC_TAGVAR(hardcode_action, $1)=immediate
2649266e564dSmrg  fi
2650266e564dSmrgelse
2651266e564dSmrg  # We cannot hardcode anything, or else we can only hardcode existing
2652266e564dSmrg  # directories.
2653266e564dSmrg  _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
2654266e564dSmrgfi
2655266e564dSmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
2656266e564dSmrg
2657266e564dSmrgif test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
2658266e564dSmrg  # Fast installation is not supported
2659266e564dSmrg  enable_fast_install=no
2660266e564dSmrgelif test "$shlibpath_overrides_runpath" = yes ||
2661266e564dSmrg     test "$enable_shared" = no; then
2662266e564dSmrg  # Fast installation is not necessary
2663266e564dSmrg  enable_fast_install=needless
2664266e564dSmrgfi
2665266e564dSmrg])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
2666266e564dSmrg
2667266e564dSmrg
2668266e564dSmrg# AC_LIBTOOL_SYS_LIB_STRIP
2669266e564dSmrg# ------------------------
2670266e564dSmrgAC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
2671266e564dSmrg[striplib=
2672266e564dSmrgold_striplib=
2673266e564dSmrgAC_MSG_CHECKING([whether stripping libraries is possible])
2674266e564dSmrgif test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
2675266e564dSmrg  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
2676266e564dSmrg  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
2677266e564dSmrg  AC_MSG_RESULT([yes])
2678266e564dSmrgelse
2679266e564dSmrg# FIXME - insert some real tests, host_os isn't really good enough
2680266e564dSmrg  case $host_os in
2681266e564dSmrg   darwin*)
2682266e564dSmrg       if test -n "$STRIP" ; then
2683266e564dSmrg         striplib="$STRIP -x"
2684266e564dSmrg         AC_MSG_RESULT([yes])
2685266e564dSmrg       else
2686266e564dSmrg  AC_MSG_RESULT([no])
2687266e564dSmrgfi
2688266e564dSmrg       ;;
2689266e564dSmrg   *)
2690266e564dSmrg  AC_MSG_RESULT([no])
2691266e564dSmrg    ;;
2692266e564dSmrg  esac
2693266e564dSmrgfi
2694266e564dSmrg])# AC_LIBTOOL_SYS_LIB_STRIP
2695266e564dSmrg
2696266e564dSmrg
2697266e564dSmrg# AC_LIBTOOL_SYS_DYNAMIC_LINKER
2698266e564dSmrg# -----------------------------
2699266e564dSmrg# PORTME Fill in your ld.so characteristics
2700266e564dSmrgAC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
2701266e564dSmrg[AC_MSG_CHECKING([dynamic linker characteristics])
2702266e564dSmrglibrary_names_spec=
2703266e564dSmrglibname_spec='lib$name'
2704266e564dSmrgsoname_spec=
2705266e564dSmrgshrext_cmds=".so"
2706266e564dSmrgpostinstall_cmds=
2707266e564dSmrgpostuninstall_cmds=
2708266e564dSmrgfinish_cmds=
2709266e564dSmrgfinish_eval=
2710266e564dSmrgshlibpath_var=
2711266e564dSmrgshlibpath_overrides_runpath=unknown
2712266e564dSmrgversion_type=none
2713266e564dSmrgdynamic_linker="$host_os ld.so"
2714266e564dSmrgsys_lib_dlsearch_path_spec="/lib /usr/lib"
2715266e564dSmrgif test "$GCC" = yes; then
2716266e564dSmrg  sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
2717266e564dSmrg  if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
2718266e564dSmrg    # if the path contains ";" then we assume it to be the separator
2719266e564dSmrg    # otherwise default to the standard path separator (i.e. ":") - it is
2720266e564dSmrg    # assumed that no part of a normal pathname contains ";" but that should
2721266e564dSmrg    # okay in the real world where ";" in dirpaths is itself problematic.
2722266e564dSmrg    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
2723266e564dSmrg  else
2724266e564dSmrg    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
2725266e564dSmrg  fi
2726266e564dSmrgelse
2727266e564dSmrg  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2728266e564dSmrgfi
2729266e564dSmrgneed_lib_prefix=unknown
2730266e564dSmrghardcode_into_libs=no
2731266e564dSmrg
2732266e564dSmrg# when you set need_version to no, make sure it does not cause -set_version
2733266e564dSmrg# flags to be left without arguments
2734266e564dSmrgneed_version=unknown
2735266e564dSmrg
2736266e564dSmrgcase $host_os in
2737266e564dSmrgaix3*)
2738266e564dSmrg  version_type=linux
2739266e564dSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
2740266e564dSmrg  shlibpath_var=LIBPATH
2741266e564dSmrg
2742266e564dSmrg  # AIX 3 has no versioning support, so we append a major version to the name.
2743266e564dSmrg  soname_spec='${libname}${release}${shared_ext}$major'
2744266e564dSmrg  ;;
2745266e564dSmrg
2746266e564dSmrgaix4* | aix5*)
2747266e564dSmrg  version_type=linux
2748266e564dSmrg  need_lib_prefix=no
2749266e564dSmrg  need_version=no
2750266e564dSmrg  hardcode_into_libs=yes
2751266e564dSmrg  if test "$host_cpu" = ia64; then
2752266e564dSmrg    # AIX 5 supports IA64
2753266e564dSmrg    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
2754266e564dSmrg    shlibpath_var=LD_LIBRARY_PATH
2755266e564dSmrg  else
2756266e564dSmrg    # With GCC up to 2.95.x, collect2 would create an import file
2757266e564dSmrg    # for dependence libraries.  The import file would start with
2758266e564dSmrg    # the line `#! .'.  This would cause the generated library to
2759266e564dSmrg    # depend on `.', always an invalid library.  This was fixed in
2760266e564dSmrg    # development snapshots of GCC prior to 3.0.
2761266e564dSmrg    case $host_os in
2762266e564dSmrg      aix4 | aix4.[[01]] | aix4.[[01]].*)
2763266e564dSmrg      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
2764266e564dSmrg	   echo ' yes '
2765266e564dSmrg	   echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
2766266e564dSmrg	:
2767266e564dSmrg      else
2768266e564dSmrg	can_build_shared=no
2769266e564dSmrg      fi
2770266e564dSmrg      ;;
2771266e564dSmrg    esac
2772266e564dSmrg    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
2773266e564dSmrg    # soname into executable. Probably we can add versioning support to
2774266e564dSmrg    # collect2, so additional links can be useful in future.
2775266e564dSmrg    if test "$aix_use_runtimelinking" = yes; then
2776266e564dSmrg      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
2777266e564dSmrg      # instead of lib<name>.a to let people know that these are not
2778266e564dSmrg      # typical AIX shared libraries.
2779266e564dSmrg      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2780266e564dSmrg    else
2781266e564dSmrg      # We preserve .a as extension for shared libraries through AIX4.2
2782266e564dSmrg      # and later when we are not doing run time linking.
2783266e564dSmrg      library_names_spec='${libname}${release}.a $libname.a'
2784266e564dSmrg      soname_spec='${libname}${release}${shared_ext}$major'
2785266e564dSmrg    fi
2786266e564dSmrg    shlibpath_var=LIBPATH
2787266e564dSmrg  fi
2788266e564dSmrg  ;;
2789266e564dSmrg
2790266e564dSmrgamigaos*)
2791266e564dSmrg  library_names_spec='$libname.ixlibrary $libname.a'
2792266e564dSmrg  # Create ${libname}_ixlibrary.a entries in /sys/libs.
2793266e564dSmrg  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'
2794266e564dSmrg  ;;
2795266e564dSmrg
2796266e564dSmrgbeos*)
2797266e564dSmrg  library_names_spec='${libname}${shared_ext}'
2798266e564dSmrg  dynamic_linker="$host_os ld.so"
2799266e564dSmrg  shlibpath_var=LIBRARY_PATH
2800266e564dSmrg  ;;
2801266e564dSmrg
2802266e564dSmrgbsdi[[45]]*)
2803266e564dSmrg  version_type=linux
2804266e564dSmrg  need_version=no
2805266e564dSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2806266e564dSmrg  soname_spec='${libname}${release}${shared_ext}$major'
2807266e564dSmrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
2808266e564dSmrg  shlibpath_var=LD_LIBRARY_PATH
2809266e564dSmrg  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
2810266e564dSmrg  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
2811266e564dSmrg  # the default ld.so.conf also contains /usr/contrib/lib and
2812266e564dSmrg  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
2813266e564dSmrg  # libtool to hard-code these into programs
2814266e564dSmrg  ;;
2815266e564dSmrg
2816266e564dSmrgcygwin* | mingw* | pw32*)
2817266e564dSmrg  version_type=windows
2818266e564dSmrg  shrext_cmds=".dll"
2819266e564dSmrg  need_version=no
2820266e564dSmrg  need_lib_prefix=no
2821266e564dSmrg
2822266e564dSmrg  case $GCC,$host_os in
2823266e564dSmrg  yes,cygwin* | yes,mingw* | yes,pw32*)
2824266e564dSmrg    library_names_spec='$libname.dll.a'
2825266e564dSmrg    # DLL is installed to $(libdir)/../bin by postinstall_cmds
2826266e564dSmrg    postinstall_cmds='base_file=`basename \${file}`~
2827266e564dSmrg      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
2828266e564dSmrg      dldir=$destdir/`dirname \$dlpath`~
2829266e564dSmrg      test -d \$dldir || mkdir -p \$dldir~
2830266e564dSmrg      $install_prog $dir/$dlname \$dldir/$dlname~
2831266e564dSmrg      chmod a+x \$dldir/$dlname'
2832266e564dSmrg    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
2833266e564dSmrg      dlpath=$dir/\$dldll~
2834266e564dSmrg       $rm \$dlpath'
2835266e564dSmrg    shlibpath_overrides_runpath=yes
2836266e564dSmrg
2837266e564dSmrg    case $host_os in
2838266e564dSmrg    cygwin*)
2839266e564dSmrg      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
2840266e564dSmrg      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2841266e564dSmrg      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
2842266e564dSmrg      ;;
2843266e564dSmrg    mingw*)
2844266e564dSmrg      # MinGW DLLs use traditional 'lib' prefix
2845266e564dSmrg      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2846266e564dSmrg      sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
2847266e564dSmrg      if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
2848266e564dSmrg        # It is most probably a Windows format PATH printed by
2849266e564dSmrg        # mingw gcc, but we are running on Cygwin. Gcc prints its search
2850266e564dSmrg        # path with ; separators, and with drive letters. We can handle the
2851266e564dSmrg        # drive letters (cygwin fileutils understands them), so leave them,
2852266e564dSmrg        # especially as we might pass files found there to a mingw objdump,
2853266e564dSmrg        # which wouldn't understand a cygwinified path. Ahh.
2854266e564dSmrg        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
2855266e564dSmrg      else
2856266e564dSmrg        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
2857266e564dSmrg      fi
2858266e564dSmrg      ;;
2859266e564dSmrg    pw32*)
2860266e564dSmrg      # pw32 DLLs use 'pw' prefix rather than 'lib'
2861266e564dSmrg      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2862266e564dSmrg      ;;
2863266e564dSmrg    esac
2864266e564dSmrg    ;;
2865266e564dSmrg
2866266e564dSmrg  *)
2867266e564dSmrg    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
2868266e564dSmrg    ;;
2869266e564dSmrg  esac
2870266e564dSmrg  dynamic_linker='Win32 ld.exe'
2871266e564dSmrg  # FIXME: first we should search . and the directory the executable is in
2872266e564dSmrg  shlibpath_var=PATH
2873266e564dSmrg  ;;
2874266e564dSmrg
2875266e564dSmrgdarwin* | rhapsody*)
2876266e564dSmrg  dynamic_linker="$host_os dyld"
2877266e564dSmrg  version_type=darwin
2878266e564dSmrg  need_lib_prefix=no
2879266e564dSmrg  need_version=no
2880266e564dSmrg  library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
2881266e564dSmrg  soname_spec='${libname}${release}${major}$shared_ext'
2882266e564dSmrg  shlibpath_overrides_runpath=yes
2883266e564dSmrg  shlibpath_var=DYLD_LIBRARY_PATH
2884266e564dSmrg  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
2885266e564dSmrg  # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
2886266e564dSmrg  if test "$GCC" = yes; then
2887266e564dSmrg    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"`
2888266e564dSmrg  else
2889266e564dSmrg    sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
2890266e564dSmrg  fi
2891266e564dSmrg  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
2892266e564dSmrg  ;;
2893266e564dSmrg
2894266e564dSmrgdgux*)
2895266e564dSmrg  version_type=linux
2896266e564dSmrg  need_lib_prefix=no
2897266e564dSmrg  need_version=no
2898266e564dSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
2899266e564dSmrg  soname_spec='${libname}${release}${shared_ext}$major'
2900266e564dSmrg  shlibpath_var=LD_LIBRARY_PATH
2901266e564dSmrg  ;;
2902266e564dSmrg
2903266e564dSmrgfreebsd1*)
2904266e564dSmrg  dynamic_linker=no
2905266e564dSmrg  ;;
2906266e564dSmrg
2907266e564dSmrgkfreebsd*-gnu)
2908266e564dSmrg  version_type=linux
2909266e564dSmrg  need_lib_prefix=no
2910266e564dSmrg  need_version=no
2911266e564dSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2912266e564dSmrg  soname_spec='${libname}${release}${shared_ext}$major'
2913266e564dSmrg  shlibpath_var=LD_LIBRARY_PATH
2914266e564dSmrg  shlibpath_overrides_runpath=no
2915266e564dSmrg  hardcode_into_libs=yes
2916266e564dSmrg  dynamic_linker='GNU ld.so'
2917266e564dSmrg  ;;
2918266e564dSmrg
2919266e564dSmrgfreebsd* | dragonfly*)
2920266e564dSmrg  # DragonFly does not have aout.  When/if they implement a new
2921266e564dSmrg  # versioning mechanism, adjust this.
2922266e564dSmrg  if test -x /usr/bin/objformat; then
2923266e564dSmrg    objformat=`/usr/bin/objformat`
2924266e564dSmrg  else
2925266e564dSmrg    case $host_os in
2926266e564dSmrg    freebsd[[123]]*) objformat=aout ;;
2927266e564dSmrg    *) objformat=elf ;;
2928266e564dSmrg    esac
2929266e564dSmrg  fi
2930266e564dSmrg  version_type=freebsd-$objformat
2931266e564dSmrg  case $version_type in
2932266e564dSmrg    freebsd-elf*)
2933266e564dSmrg      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
2934266e564dSmrg      need_version=no
2935266e564dSmrg      need_lib_prefix=no
2936266e564dSmrg      ;;
2937266e564dSmrg    freebsd-*)
2938266e564dSmrg      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
2939266e564dSmrg      need_version=yes
2940266e564dSmrg      ;;
2941266e564dSmrg  esac
2942266e564dSmrg  shlibpath_var=LD_LIBRARY_PATH
2943266e564dSmrg  case $host_os in
2944266e564dSmrg  freebsd2*)
2945266e564dSmrg    shlibpath_overrides_runpath=yes
2946266e564dSmrg    ;;
2947266e564dSmrg  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
2948266e564dSmrg    shlibpath_overrides_runpath=yes
2949266e564dSmrg    hardcode_into_libs=yes
2950266e564dSmrg    ;;
2951266e564dSmrg  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
2952266e564dSmrg  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
2953266e564dSmrg    shlibpath_overrides_runpath=no
2954266e564dSmrg    hardcode_into_libs=yes
2955266e564dSmrg    ;;
2956266e564dSmrg  freebsd*) # from 4.6 on
2957266e564dSmrg    shlibpath_overrides_runpath=yes
2958266e564dSmrg    hardcode_into_libs=yes
2959266e564dSmrg    ;;
2960266e564dSmrg  esac
2961266e564dSmrg  ;;
2962266e564dSmrg
2963266e564dSmrggnu*)
2964266e564dSmrg  version_type=linux
2965266e564dSmrg  need_lib_prefix=no
2966266e564dSmrg  need_version=no
2967266e564dSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
2968266e564dSmrg  soname_spec='${libname}${release}${shared_ext}$major'
2969266e564dSmrg  shlibpath_var=LD_LIBRARY_PATH
2970266e564dSmrg  hardcode_into_libs=yes
2971266e564dSmrg  ;;
2972266e564dSmrg
2973266e564dSmrghpux9* | hpux10* | hpux11*)
2974266e564dSmrg  # Give a soname corresponding to the major version so that dld.sl refuses to
2975266e564dSmrg  # link against other versions.
2976266e564dSmrg  version_type=sunos
2977266e564dSmrg  need_lib_prefix=no
2978266e564dSmrg  need_version=no
2979266e564dSmrg  case $host_cpu in
2980266e564dSmrg  ia64*)
2981266e564dSmrg    shrext_cmds='.so'
2982266e564dSmrg    hardcode_into_libs=yes
2983266e564dSmrg    dynamic_linker="$host_os dld.so"
2984266e564dSmrg    shlibpath_var=LD_LIBRARY_PATH
2985266e564dSmrg    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2986266e564dSmrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2987266e564dSmrg    soname_spec='${libname}${release}${shared_ext}$major'
2988266e564dSmrg    if test "X$HPUX_IA64_MODE" = X32; then
2989266e564dSmrg      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
2990266e564dSmrg    else
2991266e564dSmrg      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
2992266e564dSmrg    fi
2993266e564dSmrg    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2994266e564dSmrg    ;;
2995266e564dSmrg   hppa*64*)
2996266e564dSmrg     shrext_cmds='.sl'
2997266e564dSmrg     hardcode_into_libs=yes
2998266e564dSmrg     dynamic_linker="$host_os dld.sl"
2999266e564dSmrg     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
3000266e564dSmrg     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
3001266e564dSmrg     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3002266e564dSmrg     soname_spec='${libname}${release}${shared_ext}$major'
3003266e564dSmrg     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
3004266e564dSmrg     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
3005266e564dSmrg     ;;
3006266e564dSmrg   *)
3007266e564dSmrg    shrext_cmds='.sl'
3008266e564dSmrg    dynamic_linker="$host_os dld.sl"
3009266e564dSmrg    shlibpath_var=SHLIB_PATH
3010266e564dSmrg    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
3011266e564dSmrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3012266e564dSmrg    soname_spec='${libname}${release}${shared_ext}$major'
3013266e564dSmrg    ;;
3014266e564dSmrg  esac
3015266e564dSmrg  # HP-UX runs *really* slowly unless shared libraries are mode 555.
3016266e564dSmrg  postinstall_cmds='chmod 555 $lib'
3017266e564dSmrg  ;;
3018266e564dSmrg
3019266e564dSmrginterix3*)
3020266e564dSmrg  version_type=linux
3021266e564dSmrg  need_lib_prefix=no
3022266e564dSmrg  need_version=no
3023266e564dSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
3024266e564dSmrg  soname_spec='${libname}${release}${shared_ext}$major'
3025266e564dSmrg  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
3026266e564dSmrg  shlibpath_var=LD_LIBRARY_PATH
3027266e564dSmrg  shlibpath_overrides_runpath=no
3028266e564dSmrg  hardcode_into_libs=yes
3029266e564dSmrg  ;;
3030266e564dSmrg
3031266e564dSmrgirix5* | irix6* | nonstopux*)
3032266e564dSmrg  case $host_os in
3033266e564dSmrg    nonstopux*) version_type=nonstopux ;;
3034266e564dSmrg    *)
3035266e564dSmrg	if test "$lt_cv_prog_gnu_ld" = yes; then
3036266e564dSmrg		version_type=linux
3037266e564dSmrg	else
3038266e564dSmrg		version_type=irix
3039266e564dSmrg	fi ;;
3040266e564dSmrg  esac
3041266e564dSmrg  need_lib_prefix=no
3042266e564dSmrg  need_version=no
3043266e564dSmrg  soname_spec='${libname}${release}${shared_ext}$major'
3044266e564dSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
3045266e564dSmrg  case $host_os in
3046266e564dSmrg  irix5* | nonstopux*)
3047266e564dSmrg    libsuff= shlibsuff=
3048266e564dSmrg    ;;
3049266e564dSmrg  *)
3050266e564dSmrg    case $LD in # libtool.m4 will add one of these switches to LD
3051266e564dSmrg    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
3052266e564dSmrg      libsuff= shlibsuff= libmagic=32-bit;;
3053266e564dSmrg    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
3054266e564dSmrg      libsuff=32 shlibsuff=N32 libmagic=N32;;
3055266e564dSmrg    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
3056266e564dSmrg      libsuff=64 shlibsuff=64 libmagic=64-bit;;
3057266e564dSmrg    *) libsuff= shlibsuff= libmagic=never-match;;
3058266e564dSmrg    esac
3059266e564dSmrg    ;;
3060266e564dSmrg  esac
3061266e564dSmrg  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
3062266e564dSmrg  shlibpath_overrides_runpath=no
3063266e564dSmrg  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
3064266e564dSmrg  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
3065266e564dSmrg  hardcode_into_libs=yes
3066266e564dSmrg  ;;
3067266e564dSmrg
3068266e564dSmrg# No shared lib support for Linux oldld, aout, or coff.
3069266e564dSmrglinux*oldld* | linux*aout* | linux*coff*)
3070266e564dSmrg  dynamic_linker=no
3071266e564dSmrg  ;;
3072266e564dSmrg
3073266e564dSmrg# This must be Linux ELF.
3074266e564dSmrglinux*)
3075266e564dSmrg  version_type=linux
3076266e564dSmrg  need_lib_prefix=no
3077266e564dSmrg  need_version=no
3078266e564dSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3079266e564dSmrg  soname_spec='${libname}${release}${shared_ext}$major'
3080266e564dSmrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
3081266e564dSmrg  shlibpath_var=LD_LIBRARY_PATH
3082266e564dSmrg  shlibpath_overrides_runpath=no
3083266e564dSmrg  # This implies no fast_install, which is unacceptable.
3084266e564dSmrg  # Some rework will be needed to allow for fast_install
3085266e564dSmrg  # before this can be enabled.
3086266e564dSmrg  hardcode_into_libs=yes
3087266e564dSmrg
3088266e564dSmrg  # Append ld.so.conf contents to the search path
3089266e564dSmrg  if test -f /etc/ld.so.conf; then
3090266e564dSmrg    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' ' '`
3091266e564dSmrg    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
3092266e564dSmrg  fi
3093266e564dSmrg
3094266e564dSmrg  # We used to test for /lib/ld.so.1 and disable shared libraries on
3095266e564dSmrg  # powerpc, because MkLinux only supported shared libraries with the
3096266e564dSmrg  # GNU dynamic linker.  Since this was broken with cross compilers,
3097266e564dSmrg  # most powerpc-linux boxes support dynamic linking these days and
3098266e564dSmrg  # people can always --disable-shared, the test was removed, and we
3099266e564dSmrg  # assume the GNU/Linux dynamic linker is in use.
3100266e564dSmrg  dynamic_linker='GNU/Linux ld.so'
3101266e564dSmrg  ;;
3102266e564dSmrg
3103266e564dSmrgknetbsd*-gnu)
3104266e564dSmrg  version_type=linux
3105266e564dSmrg  need_lib_prefix=no
3106266e564dSmrg  need_version=no
3107266e564dSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
3108266e564dSmrg  soname_spec='${libname}${release}${shared_ext}$major'
3109266e564dSmrg  shlibpath_var=LD_LIBRARY_PATH
3110266e564dSmrg  shlibpath_overrides_runpath=no
3111266e564dSmrg  hardcode_into_libs=yes
3112266e564dSmrg  dynamic_linker='GNU ld.so'
3113266e564dSmrg  ;;
3114266e564dSmrg
3115266e564dSmrgnetbsd*)
3116266e564dSmrg  version_type=sunos
3117266e564dSmrg  need_lib_prefix=no
3118266e564dSmrg  need_version=no
3119266e564dSmrg  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
3120266e564dSmrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
3121266e564dSmrg    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
3122266e564dSmrg    dynamic_linker='NetBSD (a.out) ld.so'
3123266e564dSmrg  else
3124266e564dSmrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
3125266e564dSmrg    soname_spec='${libname}${release}${shared_ext}$major'
3126266e564dSmrg    dynamic_linker='NetBSD ld.elf_so'
3127266e564dSmrg  fi
3128266e564dSmrg  shlibpath_var=LD_LIBRARY_PATH
3129266e564dSmrg  shlibpath_overrides_runpath=yes
3130266e564dSmrg  hardcode_into_libs=yes
3131266e564dSmrg  ;;
3132266e564dSmrg
3133266e564dSmrgnewsos6)
3134266e564dSmrg  version_type=linux
3135266e564dSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3136266e564dSmrg  shlibpath_var=LD_LIBRARY_PATH
3137266e564dSmrg  shlibpath_overrides_runpath=yes
3138266e564dSmrg  ;;
3139266e564dSmrg
3140266e564dSmrgnto-qnx*)
3141266e564dSmrg  version_type=linux
3142266e564dSmrg  need_lib_prefix=no
3143266e564dSmrg  need_version=no
3144266e564dSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3145266e564dSmrg  soname_spec='${libname}${release}${shared_ext}$major'
3146266e564dSmrg  shlibpath_var=LD_LIBRARY_PATH
3147266e564dSmrg  shlibpath_overrides_runpath=yes
3148266e564dSmrg  ;;
3149266e564dSmrg
3150266e564dSmrgopenbsd*)
3151266e564dSmrg  version_type=sunos
3152266e564dSmrg  sys_lib_dlsearch_path_spec="/usr/lib"
3153266e564dSmrg  need_lib_prefix=no
3154266e564dSmrg  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
3155266e564dSmrg  case $host_os in
3156266e564dSmrg    openbsd3.3 | openbsd3.3.*) need_version=yes ;;
3157266e564dSmrg    *)                         need_version=no  ;;
3158266e564dSmrg  esac
3159266e564dSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
3160266e564dSmrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
3161266e564dSmrg  shlibpath_var=LD_LIBRARY_PATH
3162266e564dSmrg  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3163266e564dSmrg    case $host_os in
3164266e564dSmrg      openbsd2.[[89]] | openbsd2.[[89]].*)
3165266e564dSmrg	shlibpath_overrides_runpath=no
3166266e564dSmrg	;;
3167266e564dSmrg      *)
3168266e564dSmrg	shlibpath_overrides_runpath=yes
3169266e564dSmrg	;;
3170266e564dSmrg      esac
3171266e564dSmrg  else
3172266e564dSmrg    shlibpath_overrides_runpath=yes
3173266e564dSmrg  fi
3174266e564dSmrg  ;;
3175266e564dSmrg
3176266e564dSmrgos2*)
3177266e564dSmrg  libname_spec='$name'
3178266e564dSmrg  shrext_cmds=".dll"
3179266e564dSmrg  need_lib_prefix=no
3180266e564dSmrg  library_names_spec='$libname${shared_ext} $libname.a'
3181266e564dSmrg  dynamic_linker='OS/2 ld.exe'
3182266e564dSmrg  shlibpath_var=LIBPATH
3183266e564dSmrg  ;;
3184266e564dSmrg
3185266e564dSmrgosf3* | osf4* | osf5*)
3186266e564dSmrg  version_type=osf
3187266e564dSmrg  need_lib_prefix=no
3188266e564dSmrg  need_version=no
3189266e564dSmrg  soname_spec='${libname}${release}${shared_ext}$major'
3190266e564dSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3191266e564dSmrg  shlibpath_var=LD_LIBRARY_PATH
3192266e564dSmrg  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
3193266e564dSmrg  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
3194266e564dSmrg  ;;
3195266e564dSmrg
3196266e564dSmrgsolaris*)
3197266e564dSmrg  version_type=linux
3198266e564dSmrg  need_lib_prefix=no
3199266e564dSmrg  need_version=no
3200266e564dSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3201266e564dSmrg  soname_spec='${libname}${release}${shared_ext}$major'
3202266e564dSmrg  shlibpath_var=LD_LIBRARY_PATH
3203266e564dSmrg  shlibpath_overrides_runpath=yes
3204266e564dSmrg  hardcode_into_libs=yes
3205266e564dSmrg  # ldd complains unless libraries are executable
3206266e564dSmrg  postinstall_cmds='chmod +x $lib'
3207266e564dSmrg  ;;
3208266e564dSmrg
3209266e564dSmrgsunos4*)
3210266e564dSmrg  version_type=sunos
3211266e564dSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
3212266e564dSmrg  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
3213266e564dSmrg  shlibpath_var=LD_LIBRARY_PATH
3214266e564dSmrg  shlibpath_overrides_runpath=yes
3215266e564dSmrg  if test "$with_gnu_ld" = yes; then
3216266e564dSmrg    need_lib_prefix=no
3217266e564dSmrg  fi
3218266e564dSmrg  need_version=yes
3219266e564dSmrg  ;;
3220266e564dSmrg
3221266e564dSmrgsysv4 | sysv4.3*)
3222266e564dSmrg  version_type=linux
3223266e564dSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3224266e564dSmrg  soname_spec='${libname}${release}${shared_ext}$major'
3225266e564dSmrg  shlibpath_var=LD_LIBRARY_PATH
3226266e564dSmrg  case $host_vendor in
3227266e564dSmrg    sni)
3228266e564dSmrg      shlibpath_overrides_runpath=no
3229266e564dSmrg      need_lib_prefix=no
3230266e564dSmrg      export_dynamic_flag_spec='${wl}-Blargedynsym'
3231266e564dSmrg      runpath_var=LD_RUN_PATH
3232266e564dSmrg      ;;
3233266e564dSmrg    siemens)
3234266e564dSmrg      need_lib_prefix=no
3235266e564dSmrg      ;;
3236266e564dSmrg    motorola)
3237266e564dSmrg      need_lib_prefix=no
3238266e564dSmrg      need_version=no
3239266e564dSmrg      shlibpath_overrides_runpath=no
3240266e564dSmrg      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
3241266e564dSmrg      ;;
3242266e564dSmrg  esac
3243266e564dSmrg  ;;
3244266e564dSmrg
3245266e564dSmrgsysv4*MP*)
3246266e564dSmrg  if test -d /usr/nec ;then
3247266e564dSmrg    version_type=linux
3248266e564dSmrg    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
3249266e564dSmrg    soname_spec='$libname${shared_ext}.$major'
3250266e564dSmrg    shlibpath_var=LD_LIBRARY_PATH
3251266e564dSmrg  fi
3252266e564dSmrg  ;;
3253266e564dSmrg
3254266e564dSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3255266e564dSmrg  version_type=freebsd-elf
3256266e564dSmrg  need_lib_prefix=no
3257266e564dSmrg  need_version=no
3258266e564dSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
3259266e564dSmrg  soname_spec='${libname}${release}${shared_ext}$major'
3260266e564dSmrg  shlibpath_var=LD_LIBRARY_PATH
3261266e564dSmrg  hardcode_into_libs=yes
3262266e564dSmrg  if test "$with_gnu_ld" = yes; then
3263266e564dSmrg    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
3264266e564dSmrg    shlibpath_overrides_runpath=no
3265266e564dSmrg  else
3266266e564dSmrg    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
3267266e564dSmrg    shlibpath_overrides_runpath=yes
3268266e564dSmrg    case $host_os in
3269266e564dSmrg      sco3.2v5*)
3270266e564dSmrg        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
3271266e564dSmrg	;;
3272266e564dSmrg    esac
3273266e564dSmrg  fi
3274266e564dSmrg  sys_lib_dlsearch_path_spec='/usr/lib'
3275266e564dSmrg  ;;
3276266e564dSmrg
3277266e564dSmrguts4*)
3278266e564dSmrg  version_type=linux
3279266e564dSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3280266e564dSmrg  soname_spec='${libname}${release}${shared_ext}$major'
3281266e564dSmrg  shlibpath_var=LD_LIBRARY_PATH
3282266e564dSmrg  ;;
3283266e564dSmrg
3284266e564dSmrg*)
3285266e564dSmrg  dynamic_linker=no
3286266e564dSmrg  ;;
3287266e564dSmrgesac
3288266e564dSmrgAC_MSG_RESULT([$dynamic_linker])
3289266e564dSmrgtest "$dynamic_linker" = no && can_build_shared=no
3290266e564dSmrg
3291266e564dSmrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var"
3292266e564dSmrgif test "$GCC" = yes; then
3293266e564dSmrg  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
3294266e564dSmrgfi
3295266e564dSmrg])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
3296266e564dSmrg
3297266e564dSmrg
3298266e564dSmrg# _LT_AC_TAGCONFIG
3299266e564dSmrg# ----------------
3300266e564dSmrgAC_DEFUN([_LT_AC_TAGCONFIG],
3301266e564dSmrg[AC_ARG_WITH([tags],
3302266e564dSmrg    [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
3303266e564dSmrg        [include additional configurations @<:@automatic@:>@])],
3304266e564dSmrg    [tagnames="$withval"])
3305266e564dSmrg
3306266e564dSmrgif test -f "$ltmain" && test -n "$tagnames"; then
3307266e564dSmrg  if test ! -f "${ofile}"; then
3308266e564dSmrg    AC_MSG_WARN([output file `$ofile' does not exist])
3309266e564dSmrg  fi
3310266e564dSmrg
3311266e564dSmrg  if test -z "$LTCC"; then
3312266e564dSmrg    eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
3313266e564dSmrg    if test -z "$LTCC"; then
3314266e564dSmrg      AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
3315266e564dSmrg    else
3316266e564dSmrg      AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
3317266e564dSmrg    fi
3318266e564dSmrg  fi
3319266e564dSmrg  if test -z "$LTCFLAGS"; then
3320266e564dSmrg    eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`"
3321266e564dSmrg  fi
3322266e564dSmrg
3323266e564dSmrg  # Extract list of available tagged configurations in $ofile.
3324266e564dSmrg  # Note that this assumes the entire list is on one line.
3325266e564dSmrg  available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
3326266e564dSmrg
3327266e564dSmrg  lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
3328266e564dSmrg  for tagname in $tagnames; do
3329266e564dSmrg    IFS="$lt_save_ifs"
3330266e564dSmrg    # Check whether tagname contains only valid characters
3331266e564dSmrg    case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
3332266e564dSmrg    "") ;;
3333266e564dSmrg    *)  AC_MSG_ERROR([invalid tag name: $tagname])
3334266e564dSmrg	;;
3335266e564dSmrg    esac
3336266e564dSmrg
3337266e564dSmrg    if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
3338266e564dSmrg    then
3339266e564dSmrg      AC_MSG_ERROR([tag name \"$tagname\" already exists])
3340266e564dSmrg    fi
3341266e564dSmrg
3342266e564dSmrg    # Update the list of available tags.
3343266e564dSmrg    if test -n "$tagname"; then
3344266e564dSmrg      echo appending configuration tag \"$tagname\" to $ofile
3345266e564dSmrg
3346266e564dSmrg      case $tagname in
3347266e564dSmrg      CXX)
3348266e564dSmrg	if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
3349266e564dSmrg	    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
3350266e564dSmrg	    (test "X$CXX" != "Xg++"))) ; then
3351266e564dSmrg	  AC_LIBTOOL_LANG_CXX_CONFIG
3352266e564dSmrg	else
3353266e564dSmrg	  tagname=""
3354266e564dSmrg	fi
3355266e564dSmrg	;;
3356266e564dSmrg
3357266e564dSmrg      F77)
3358266e564dSmrg	if test -n "$F77" && test "X$F77" != "Xno"; then
3359266e564dSmrg	  AC_LIBTOOL_LANG_F77_CONFIG
3360266e564dSmrg	else
3361266e564dSmrg	  tagname=""
3362266e564dSmrg	fi
3363266e564dSmrg	;;
3364266e564dSmrg
3365266e564dSmrg      GCJ)
3366266e564dSmrg	if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
3367266e564dSmrg	  AC_LIBTOOL_LANG_GCJ_CONFIG
3368266e564dSmrg	else
3369266e564dSmrg	  tagname=""
3370266e564dSmrg	fi
3371266e564dSmrg	;;
3372266e564dSmrg
3373266e564dSmrg      RC)
3374266e564dSmrg	AC_LIBTOOL_LANG_RC_CONFIG
3375266e564dSmrg	;;
3376266e564dSmrg
3377266e564dSmrg      *)
3378266e564dSmrg	AC_MSG_ERROR([Unsupported tag name: $tagname])
3379266e564dSmrg	;;
3380266e564dSmrg      esac
3381266e564dSmrg
3382266e564dSmrg      # Append the new tag name to the list of available tags.
3383266e564dSmrg      if test -n "$tagname" ; then
3384266e564dSmrg      available_tags="$available_tags $tagname"
3385266e564dSmrg    fi
3386266e564dSmrg    fi
3387266e564dSmrg  done
3388266e564dSmrg  IFS="$lt_save_ifs"
3389266e564dSmrg
3390266e564dSmrg  # Now substitute the updated list of available tags.
3391266e564dSmrg  if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
3392266e564dSmrg    mv "${ofile}T" "$ofile"
3393266e564dSmrg    chmod +x "$ofile"
3394266e564dSmrg  else
3395266e564dSmrg    rm -f "${ofile}T"
3396266e564dSmrg    AC_MSG_ERROR([unable to update list of available tagged configurations.])
3397266e564dSmrg  fi
3398266e564dSmrgfi
3399266e564dSmrg])# _LT_AC_TAGCONFIG
3400266e564dSmrg
3401266e564dSmrg
3402266e564dSmrg# AC_LIBTOOL_DLOPEN
3403266e564dSmrg# -----------------
3404266e564dSmrg# enable checks for dlopen support
3405266e564dSmrgAC_DEFUN([AC_LIBTOOL_DLOPEN],
3406266e564dSmrg [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
3407266e564dSmrg])# AC_LIBTOOL_DLOPEN
3408266e564dSmrg
3409266e564dSmrg
3410266e564dSmrg# AC_LIBTOOL_WIN32_DLL
3411266e564dSmrg# --------------------
3412266e564dSmrg# declare package support for building win32 DLLs
3413266e564dSmrgAC_DEFUN([AC_LIBTOOL_WIN32_DLL],
3414266e564dSmrg[AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
3415266e564dSmrg])# AC_LIBTOOL_WIN32_DLL
3416266e564dSmrg
3417266e564dSmrg
3418266e564dSmrg# AC_ENABLE_SHARED([DEFAULT])
3419266e564dSmrg# ---------------------------
3420266e564dSmrg# implement the --enable-shared flag
3421266e564dSmrg# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
3422266e564dSmrgAC_DEFUN([AC_ENABLE_SHARED],
3423266e564dSmrg[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
3424266e564dSmrgAC_ARG_ENABLE([shared],
3425266e564dSmrg    [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
3426266e564dSmrg	[build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
3427266e564dSmrg    [p=${PACKAGE-default}
3428266e564dSmrg    case $enableval in
3429266e564dSmrg    yes) enable_shared=yes ;;
3430266e564dSmrg    no) enable_shared=no ;;
3431266e564dSmrg    *)
3432266e564dSmrg      enable_shared=no
3433266e564dSmrg      # Look at the argument we got.  We use all the common list separators.
3434266e564dSmrg      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
3435266e564dSmrg      for pkg in $enableval; do
3436266e564dSmrg	IFS="$lt_save_ifs"
3437266e564dSmrg	if test "X$pkg" = "X$p"; then
3438266e564dSmrg	  enable_shared=yes
3439266e564dSmrg	fi
3440266e564dSmrg      done
3441266e564dSmrg      IFS="$lt_save_ifs"
3442266e564dSmrg      ;;
3443266e564dSmrg    esac],
3444266e564dSmrg    [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
3445266e564dSmrg])# AC_ENABLE_SHARED
3446266e564dSmrg
3447266e564dSmrg
3448266e564dSmrg# AC_DISABLE_SHARED
3449266e564dSmrg# -----------------
3450266e564dSmrg# set the default shared flag to --disable-shared
3451266e564dSmrgAC_DEFUN([AC_DISABLE_SHARED],
3452266e564dSmrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3453266e564dSmrgAC_ENABLE_SHARED(no)
3454266e564dSmrg])# AC_DISABLE_SHARED
3455266e564dSmrg
3456266e564dSmrg
3457266e564dSmrg# AC_ENABLE_STATIC([DEFAULT])
3458266e564dSmrg# ---------------------------
3459266e564dSmrg# implement the --enable-static flag
3460266e564dSmrg# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
3461266e564dSmrgAC_DEFUN([AC_ENABLE_STATIC],
3462266e564dSmrg[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
3463266e564dSmrgAC_ARG_ENABLE([static],
3464266e564dSmrg    [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
3465266e564dSmrg	[build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
3466266e564dSmrg    [p=${PACKAGE-default}
3467266e564dSmrg    case $enableval in
3468266e564dSmrg    yes) enable_static=yes ;;
3469266e564dSmrg    no) enable_static=no ;;
3470266e564dSmrg    *)
3471266e564dSmrg     enable_static=no
3472266e564dSmrg      # Look at the argument we got.  We use all the common list separators.
3473266e564dSmrg      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
3474266e564dSmrg      for pkg in $enableval; do
3475266e564dSmrg	IFS="$lt_save_ifs"
3476266e564dSmrg	if test "X$pkg" = "X$p"; then
3477266e564dSmrg	  enable_static=yes
3478266e564dSmrg	fi
3479266e564dSmrg      done
3480266e564dSmrg      IFS="$lt_save_ifs"
3481266e564dSmrg      ;;
3482266e564dSmrg    esac],
3483266e564dSmrg    [enable_static=]AC_ENABLE_STATIC_DEFAULT)
3484266e564dSmrg])# AC_ENABLE_STATIC
3485266e564dSmrg
3486266e564dSmrg
3487266e564dSmrg# AC_DISABLE_STATIC
3488266e564dSmrg# -----------------
3489266e564dSmrg# set the default static flag to --disable-static
3490266e564dSmrgAC_DEFUN([AC_DISABLE_STATIC],
3491266e564dSmrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3492266e564dSmrgAC_ENABLE_STATIC(no)
3493266e564dSmrg])# AC_DISABLE_STATIC
3494266e564dSmrg
3495266e564dSmrg
3496266e564dSmrg# AC_ENABLE_FAST_INSTALL([DEFAULT])
3497266e564dSmrg# ---------------------------------
3498266e564dSmrg# implement the --enable-fast-install flag
3499266e564dSmrg# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
3500266e564dSmrgAC_DEFUN([AC_ENABLE_FAST_INSTALL],
3501266e564dSmrg[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
3502266e564dSmrgAC_ARG_ENABLE([fast-install],
3503266e564dSmrg    [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
3504266e564dSmrg    [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
3505266e564dSmrg    [p=${PACKAGE-default}
3506266e564dSmrg    case $enableval in
3507266e564dSmrg    yes) enable_fast_install=yes ;;
3508266e564dSmrg    no) enable_fast_install=no ;;
3509266e564dSmrg    *)
3510266e564dSmrg      enable_fast_install=no
3511266e564dSmrg      # Look at the argument we got.  We use all the common list separators.
3512266e564dSmrg      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
3513266e564dSmrg      for pkg in $enableval; do
3514266e564dSmrg	IFS="$lt_save_ifs"
3515266e564dSmrg	if test "X$pkg" = "X$p"; then
3516266e564dSmrg	  enable_fast_install=yes
3517266e564dSmrg	fi
3518266e564dSmrg      done
3519266e564dSmrg      IFS="$lt_save_ifs"
3520266e564dSmrg      ;;
3521266e564dSmrg    esac],
3522266e564dSmrg    [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
3523266e564dSmrg])# AC_ENABLE_FAST_INSTALL
3524266e564dSmrg
3525266e564dSmrg
3526266e564dSmrg# AC_DISABLE_FAST_INSTALL
3527266e564dSmrg# -----------------------
3528266e564dSmrg# set the default to --disable-fast-install
3529266e564dSmrgAC_DEFUN([AC_DISABLE_FAST_INSTALL],
3530266e564dSmrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3531266e564dSmrgAC_ENABLE_FAST_INSTALL(no)
3532266e564dSmrg])# AC_DISABLE_FAST_INSTALL
3533266e564dSmrg
3534266e564dSmrg
3535266e564dSmrg# AC_LIBTOOL_PICMODE([MODE])
3536266e564dSmrg# --------------------------
3537266e564dSmrg# implement the --with-pic flag
3538266e564dSmrg# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
3539266e564dSmrgAC_DEFUN([AC_LIBTOOL_PICMODE],
3540266e564dSmrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3541266e564dSmrgpic_mode=ifelse($#,1,$1,default)
3542266e564dSmrg])# AC_LIBTOOL_PICMODE
3543266e564dSmrg
3544266e564dSmrg
3545266e564dSmrg# AC_PROG_EGREP
3546266e564dSmrg# -------------
3547266e564dSmrg# This is predefined starting with Autoconf 2.54, so this conditional
3548266e564dSmrg# definition can be removed once we require Autoconf 2.54 or later.
3549266e564dSmrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
3550266e564dSmrg[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
3551266e564dSmrg   [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3552266e564dSmrg    then ac_cv_prog_egrep='grep -E'
3553266e564dSmrg    else ac_cv_prog_egrep='egrep'
3554266e564dSmrg    fi])
3555266e564dSmrg EGREP=$ac_cv_prog_egrep
3556266e564dSmrg AC_SUBST([EGREP])
3557266e564dSmrg])])
3558266e564dSmrg
3559266e564dSmrg
3560266e564dSmrg# AC_PATH_TOOL_PREFIX
3561266e564dSmrg# -------------------
3562266e564dSmrg# find a file program which can recognise shared library
3563266e564dSmrgAC_DEFUN([AC_PATH_TOOL_PREFIX],
3564266e564dSmrg[AC_REQUIRE([AC_PROG_EGREP])dnl
3565266e564dSmrgAC_MSG_CHECKING([for $1])
3566266e564dSmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
3567266e564dSmrg[case $MAGIC_CMD in
3568266e564dSmrg[[\\/*] |  ?:[\\/]*])
3569266e564dSmrg  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
3570266e564dSmrg  ;;
3571266e564dSmrg*)
3572266e564dSmrg  lt_save_MAGIC_CMD="$MAGIC_CMD"
3573266e564dSmrg  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3574266e564dSmrgdnl $ac_dummy forces splitting on constant user-supplied paths.
3575266e564dSmrgdnl POSIX.2 word splitting is done only on the output of word expansions,
3576266e564dSmrgdnl not every word.  This closes a longstanding sh security hole.
3577266e564dSmrg  ac_dummy="ifelse([$2], , $PATH, [$2])"
3578266e564dSmrg  for ac_dir in $ac_dummy; do
3579266e564dSmrg    IFS="$lt_save_ifs"
3580266e564dSmrg    test -z "$ac_dir" && ac_dir=.
3581266e564dSmrg    if test -f $ac_dir/$1; then
3582266e564dSmrg      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
3583266e564dSmrg      if test -n "$file_magic_test_file"; then
3584266e564dSmrg	case $deplibs_check_method in
3585266e564dSmrg	"file_magic "*)
3586266e564dSmrg	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
3587266e564dSmrg	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3588266e564dSmrg	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
3589266e564dSmrg	    $EGREP "$file_magic_regex" > /dev/null; then
3590266e564dSmrg	    :
3591266e564dSmrg	  else
3592266e564dSmrg	    cat <<EOF 1>&2
3593266e564dSmrg
3594266e564dSmrg*** Warning: the command libtool uses to detect shared libraries,
3595266e564dSmrg*** $file_magic_cmd, produces output that libtool cannot recognize.
3596266e564dSmrg*** The result is that libtool may fail to recognize shared libraries
3597266e564dSmrg*** as such.  This will affect the creation of libtool libraries that
3598266e564dSmrg*** depend on shared libraries, but programs linked with such libtool
3599266e564dSmrg*** libraries will work regardless of this problem.  Nevertheless, you
3600266e564dSmrg*** may want to report the problem to your system manager and/or to
3601266e564dSmrg*** bug-libtool@gnu.org
3602266e564dSmrg
3603266e564dSmrgEOF
3604266e564dSmrg	  fi ;;
3605266e564dSmrg	esac
3606266e564dSmrg      fi
3607266e564dSmrg      break
3608266e564dSmrg    fi
3609266e564dSmrg  done
3610266e564dSmrg  IFS="$lt_save_ifs"
3611266e564dSmrg  MAGIC_CMD="$lt_save_MAGIC_CMD"
3612266e564dSmrg  ;;
3613266e564dSmrgesac])
3614266e564dSmrgMAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3615266e564dSmrgif test -n "$MAGIC_CMD"; then
3616266e564dSmrg  AC_MSG_RESULT($MAGIC_CMD)
3617266e564dSmrgelse
3618266e564dSmrg  AC_MSG_RESULT(no)
3619266e564dSmrgfi
3620266e564dSmrg])# AC_PATH_TOOL_PREFIX
3621266e564dSmrg
3622266e564dSmrg
3623266e564dSmrg# AC_PATH_MAGIC
3624266e564dSmrg# -------------
3625266e564dSmrg# find a file program which can recognise a shared library
3626266e564dSmrgAC_DEFUN([AC_PATH_MAGIC],
3627266e564dSmrg[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
3628266e564dSmrgif test -z "$lt_cv_path_MAGIC_CMD"; then
3629266e564dSmrg  if test -n "$ac_tool_prefix"; then
3630266e564dSmrg    AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
3631266e564dSmrg  else
3632266e564dSmrg    MAGIC_CMD=:
3633266e564dSmrg  fi
3634266e564dSmrgfi
3635266e564dSmrg])# AC_PATH_MAGIC
3636266e564dSmrg
3637266e564dSmrg
3638266e564dSmrg# AC_PROG_LD
3639266e564dSmrg# ----------
3640266e564dSmrg# find the pathname to the GNU or non-GNU linker
3641266e564dSmrgAC_DEFUN([AC_PROG_LD],
3642266e564dSmrg[AC_ARG_WITH([gnu-ld],
3643266e564dSmrg    [AC_HELP_STRING([--with-gnu-ld],
3644266e564dSmrg	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
3645266e564dSmrg    [test "$withval" = no || with_gnu_ld=yes],
3646266e564dSmrg    [with_gnu_ld=no])
3647266e564dSmrgAC_REQUIRE([LT_AC_PROG_SED])dnl
3648266e564dSmrgAC_REQUIRE([AC_PROG_CC])dnl
3649266e564dSmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl
3650266e564dSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl
3651266e564dSmrgac_prog=ld
3652266e564dSmrgif test "$GCC" = yes; then
3653266e564dSmrg  # Check if gcc -print-prog-name=ld gives a path.
3654266e564dSmrg  AC_MSG_CHECKING([for ld used by $CC])
3655266e564dSmrg  case $host in
3656266e564dSmrg  *-*-mingw*)
3657266e564dSmrg    # gcc leaves a trailing carriage return which upsets mingw
3658266e564dSmrg    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3659266e564dSmrg  *)
3660266e564dSmrg    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3661266e564dSmrg  esac
3662266e564dSmrg  case $ac_prog in
3663266e564dSmrg    # Accept absolute paths.
3664266e564dSmrg    [[\\/]]* | ?:[[\\/]]*)
3665266e564dSmrg      re_direlt='/[[^/]][[^/]]*/\.\./'
3666266e564dSmrg      # Canonicalize the pathname of ld
3667266e564dSmrg      ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
3668266e564dSmrg      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3669266e564dSmrg	ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
3670266e564dSmrg      done
3671266e564dSmrg      test -z "$LD" && LD="$ac_prog"
3672266e564dSmrg      ;;
3673266e564dSmrg  "")
3674266e564dSmrg    # If it fails, then pretend we aren't using GCC.
3675266e564dSmrg    ac_prog=ld
3676266e564dSmrg    ;;
3677266e564dSmrg  *)
3678266e564dSmrg    # If it is relative, then search for the first ld in PATH.
3679266e564dSmrg    with_gnu_ld=unknown
3680266e564dSmrg    ;;
3681266e564dSmrg  esac
3682266e564dSmrgelif test "$with_gnu_ld" = yes; then
3683266e564dSmrg  AC_MSG_CHECKING([for GNU ld])
3684266e564dSmrgelse
3685266e564dSmrg  AC_MSG_CHECKING([for non-GNU ld])
3686266e564dSmrgfi
3687266e564dSmrgAC_CACHE_VAL(lt_cv_path_LD,
3688266e564dSmrg[if test -z "$LD"; then
3689266e564dSmrg  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3690266e564dSmrg  for ac_dir in $PATH; do
3691266e564dSmrg    IFS="$lt_save_ifs"
3692266e564dSmrg    test -z "$ac_dir" && ac_dir=.
3693266e564dSmrg    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3694266e564dSmrg      lt_cv_path_LD="$ac_dir/$ac_prog"
3695266e564dSmrg      # Check to see if the program is GNU ld.  I'd rather use --version,
3696266e564dSmrg      # but apparently some variants of GNU ld only accept -v.
3697266e564dSmrg      # Break only if it was the GNU/non-GNU ld that we prefer.
3698266e564dSmrg      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
3699266e564dSmrg      *GNU* | *'with BFD'*)
3700266e564dSmrg	test "$with_gnu_ld" != no && break
3701266e564dSmrg	;;
3702266e564dSmrg      *)
3703266e564dSmrg	test "$with_gnu_ld" != yes && break
3704266e564dSmrg	;;
3705266e564dSmrg      esac
3706266e564dSmrg    fi
3707266e564dSmrg  done
3708266e564dSmrg  IFS="$lt_save_ifs"
3709266e564dSmrgelse
3710266e564dSmrg  lt_cv_path_LD="$LD" # Let the user override the test with a path.
3711266e564dSmrgfi])
3712266e564dSmrgLD="$lt_cv_path_LD"
3713266e564dSmrgif test -n "$LD"; then
3714266e564dSmrg  AC_MSG_RESULT($LD)
3715266e564dSmrgelse
3716266e564dSmrg  AC_MSG_RESULT(no)
3717266e564dSmrgfi
3718266e564dSmrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
3719266e564dSmrgAC_PROG_LD_GNU
3720266e564dSmrg])# AC_PROG_LD
3721266e564dSmrg
3722266e564dSmrg
3723266e564dSmrg# AC_PROG_LD_GNU
3724266e564dSmrg# --------------
3725266e564dSmrgAC_DEFUN([AC_PROG_LD_GNU],
3726266e564dSmrg[AC_REQUIRE([AC_PROG_EGREP])dnl
3727266e564dSmrgAC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
3728266e564dSmrg[# I'd rather use --version here, but apparently some GNU lds only accept -v.
3729266e564dSmrgcase `$LD -v 2>&1 </dev/null` in
3730266e564dSmrg*GNU* | *'with BFD'*)
3731266e564dSmrg  lt_cv_prog_gnu_ld=yes
3732266e564dSmrg  ;;
3733266e564dSmrg*)
3734266e564dSmrg  lt_cv_prog_gnu_ld=no
3735266e564dSmrg  ;;
3736266e564dSmrgesac])
3737266e564dSmrgwith_gnu_ld=$lt_cv_prog_gnu_ld
3738266e564dSmrg])# AC_PROG_LD_GNU
3739266e564dSmrg
3740266e564dSmrg
3741266e564dSmrg# AC_PROG_LD_RELOAD_FLAG
3742266e564dSmrg# ----------------------
3743266e564dSmrg# find reload flag for linker
3744266e564dSmrg#   -- PORTME Some linkers may need a different reload flag.
3745266e564dSmrgAC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
3746266e564dSmrg[AC_CACHE_CHECK([for $LD option to reload object files],
3747266e564dSmrg  lt_cv_ld_reload_flag,
3748266e564dSmrg  [lt_cv_ld_reload_flag='-r'])
3749266e564dSmrgreload_flag=$lt_cv_ld_reload_flag
3750266e564dSmrgcase $reload_flag in
3751266e564dSmrg"" | " "*) ;;
3752266e564dSmrg*) reload_flag=" $reload_flag" ;;
3753266e564dSmrgesac
3754266e564dSmrgreload_cmds='$LD$reload_flag -o $output$reload_objs'
3755266e564dSmrgcase $host_os in
3756266e564dSmrg  darwin*)
3757266e564dSmrg    if test "$GCC" = yes; then
3758266e564dSmrg      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
3759266e564dSmrg    else
3760266e564dSmrg      reload_cmds='$LD$reload_flag -o $output$reload_objs'
3761266e564dSmrg    fi
3762266e564dSmrg    ;;
3763266e564dSmrgesac
3764266e564dSmrg])# AC_PROG_LD_RELOAD_FLAG
3765266e564dSmrg
3766266e564dSmrg
3767266e564dSmrg# AC_DEPLIBS_CHECK_METHOD
3768266e564dSmrg# -----------------------
3769266e564dSmrg# how to check for library dependencies
3770266e564dSmrg#  -- PORTME fill in with the dynamic library characteristics
3771266e564dSmrgAC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
3772266e564dSmrg[AC_CACHE_CHECK([how to recognise dependent libraries],
3773266e564dSmrglt_cv_deplibs_check_method,
3774266e564dSmrg[lt_cv_file_magic_cmd='$MAGIC_CMD'
3775266e564dSmrglt_cv_file_magic_test_file=
3776266e564dSmrglt_cv_deplibs_check_method='unknown'
3777266e564dSmrg# Need to set the preceding variable on all platforms that support
3778266e564dSmrg# interlibrary dependencies.
3779266e564dSmrg# 'none' -- dependencies not supported.
3780266e564dSmrg# `unknown' -- same as none, but documents that we really don't know.
3781266e564dSmrg# 'pass_all' -- all dependencies passed with no checks.
3782266e564dSmrg# 'test_compile' -- check by making test program.
3783266e564dSmrg# 'file_magic [[regex]]' -- check by looking for files in library path
3784266e564dSmrg# which responds to the $file_magic_cmd with a given extended regex.
3785266e564dSmrg# If you have `file' or equivalent on your system and you're not sure
3786266e564dSmrg# whether `pass_all' will *always* work, you probably want this one.
3787266e564dSmrg
3788266e564dSmrgcase $host_os in
3789266e564dSmrgaix4* | aix5*)
3790266e564dSmrg  lt_cv_deplibs_check_method=pass_all
3791266e564dSmrg  ;;
3792266e564dSmrg
3793266e564dSmrgbeos*)
3794266e564dSmrg  lt_cv_deplibs_check_method=pass_all
3795266e564dSmrg  ;;
3796266e564dSmrg
3797266e564dSmrgbsdi[[45]]*)
3798266e564dSmrg  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
3799266e564dSmrg  lt_cv_file_magic_cmd='/usr/bin/file -L'
3800266e564dSmrg  lt_cv_file_magic_test_file=/shlib/libc.so
3801266e564dSmrg  ;;
3802266e564dSmrg
3803266e564dSmrgcygwin*)
3804266e564dSmrg  # func_win32_libid is a shell function defined in ltmain.sh
3805266e564dSmrg  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3806266e564dSmrg  lt_cv_file_magic_cmd='func_win32_libid'
3807266e564dSmrg  ;;
3808266e564dSmrg
3809266e564dSmrgmingw* | pw32*)
3810266e564dSmrg  # Base MSYS/MinGW do not provide the 'file' command needed by
3811266e564dSmrg  # func_win32_libid shell function, so use a weaker test based on 'objdump'.
3812266e564dSmrg  lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3813266e564dSmrg  lt_cv_file_magic_cmd='$OBJDUMP -f'
3814266e564dSmrg  ;;
3815266e564dSmrg
3816266e564dSmrgdarwin* | rhapsody*)
3817266e564dSmrg  lt_cv_deplibs_check_method=pass_all
3818266e564dSmrg  ;;
3819266e564dSmrg
3820266e564dSmrgfreebsd* | kfreebsd*-gnu | dragonfly*)
3821266e564dSmrg  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3822266e564dSmrg    case $host_cpu in
3823266e564dSmrg    i*86 )
3824266e564dSmrg      # Not sure whether the presence of OpenBSD here was a mistake.
3825266e564dSmrg      # Let's accept both of them until this is cleared up.
3826266e564dSmrg      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
3827266e564dSmrg      lt_cv_file_magic_cmd=/usr/bin/file
3828266e564dSmrg      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3829266e564dSmrg      ;;
3830266e564dSmrg    esac
3831266e564dSmrg  else
3832266e564dSmrg    lt_cv_deplibs_check_method=pass_all
3833266e564dSmrg  fi
3834266e564dSmrg  ;;
3835266e564dSmrg
3836266e564dSmrggnu*)
3837266e564dSmrg  lt_cv_deplibs_check_method=pass_all
3838266e564dSmrg  ;;
3839266e564dSmrg
3840266e564dSmrghpux10.20* | hpux11*)
3841266e564dSmrg  lt_cv_file_magic_cmd=/usr/bin/file
3842266e564dSmrg  case $host_cpu in
3843266e564dSmrg  ia64*)
3844266e564dSmrg    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
3845266e564dSmrg    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
3846266e564dSmrg    ;;
3847266e564dSmrg  hppa*64*)
3848266e564dSmrg    [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]']
3849266e564dSmrg    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
3850266e564dSmrg    ;;
3851266e564dSmrg  *)
3852266e564dSmrg    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
3853266e564dSmrg    lt_cv_file_magic_test_file=/usr/lib/libc.sl
3854266e564dSmrg    ;;
3855266e564dSmrg  esac
3856266e564dSmrg  ;;
3857266e564dSmrg
3858266e564dSmrginterix3*)
3859266e564dSmrg  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
3860266e564dSmrg  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
3861266e564dSmrg  ;;
3862266e564dSmrg
3863266e564dSmrgirix5* | irix6* | nonstopux*)
3864266e564dSmrg  case $LD in
3865266e564dSmrg  *-32|*"-32 ") libmagic=32-bit;;
3866266e564dSmrg  *-n32|*"-n32 ") libmagic=N32;;
3867266e564dSmrg  *-64|*"-64 ") libmagic=64-bit;;
3868266e564dSmrg  *) libmagic=never-match;;
3869266e564dSmrg  esac
3870266e564dSmrg  lt_cv_deplibs_check_method=pass_all
3871266e564dSmrg  ;;
3872266e564dSmrg
3873266e564dSmrg# This must be Linux ELF.
3874266e564dSmrglinux*)
3875266e564dSmrg  lt_cv_deplibs_check_method=pass_all
3876266e564dSmrg  ;;
3877266e564dSmrg
3878266e564dSmrgnetbsd*)
3879266e564dSmrg  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3880266e564dSmrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3881266e564dSmrg  else
3882266e564dSmrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
3883266e564dSmrg  fi
3884266e564dSmrg  ;;
3885266e564dSmrg
3886266e564dSmrgnewos6*)
3887266e564dSmrg  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
3888266e564dSmrg  lt_cv_file_magic_cmd=/usr/bin/file
3889266e564dSmrg  lt_cv_file_magic_test_file=/usr/lib/libnls.so
3890266e564dSmrg  ;;
3891266e564dSmrg
3892266e564dSmrgnto-qnx*)
3893266e564dSmrg  lt_cv_deplibs_check_method=unknown
3894266e564dSmrg  ;;
3895266e564dSmrg
3896266e564dSmrgopenbsd*)
3897266e564dSmrg  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3898266e564dSmrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
3899266e564dSmrg  else
3900266e564dSmrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3901266e564dSmrg  fi
3902266e564dSmrg  ;;
3903266e564dSmrg
3904266e564dSmrgosf3* | osf4* | osf5*)
3905266e564dSmrg  lt_cv_deplibs_check_method=pass_all
3906266e564dSmrg  ;;
3907266e564dSmrg
3908266e564dSmrgsolaris*)
3909266e564dSmrg  lt_cv_deplibs_check_method=pass_all
3910266e564dSmrg  ;;
3911266e564dSmrg
3912266e564dSmrgsysv4 | sysv4.3*)
3913266e564dSmrg  case $host_vendor in
3914266e564dSmrg  motorola)
3915266e564dSmrg    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]]'
3916266e564dSmrg    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3917266e564dSmrg    ;;
3918266e564dSmrg  ncr)
3919266e564dSmrg    lt_cv_deplibs_check_method=pass_all
3920266e564dSmrg    ;;
3921266e564dSmrg  sequent)
3922266e564dSmrg    lt_cv_file_magic_cmd='/bin/file'
3923266e564dSmrg    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
3924266e564dSmrg    ;;
3925266e564dSmrg  sni)
3926266e564dSmrg    lt_cv_file_magic_cmd='/bin/file'
3927266e564dSmrg    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
3928266e564dSmrg    lt_cv_file_magic_test_file=/lib/libc.so
3929266e564dSmrg    ;;
3930266e564dSmrg  siemens)
3931266e564dSmrg    lt_cv_deplibs_check_method=pass_all
3932266e564dSmrg    ;;
3933266e564dSmrg  pc)
3934266e564dSmrg    lt_cv_deplibs_check_method=pass_all
3935266e564dSmrg    ;;
3936266e564dSmrg  esac
3937266e564dSmrg  ;;
3938266e564dSmrg
3939266e564dSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3940266e564dSmrg  lt_cv_deplibs_check_method=pass_all
3941266e564dSmrg  ;;
3942266e564dSmrgesac
3943266e564dSmrg])
3944266e564dSmrgfile_magic_cmd=$lt_cv_file_magic_cmd
3945266e564dSmrgdeplibs_check_method=$lt_cv_deplibs_check_method
3946266e564dSmrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown
3947266e564dSmrg])# AC_DEPLIBS_CHECK_METHOD
3948266e564dSmrg
3949266e564dSmrg
3950266e564dSmrg# AC_PROG_NM
3951266e564dSmrg# ----------
3952266e564dSmrg# find the pathname to a BSD-compatible name lister
3953266e564dSmrgAC_DEFUN([AC_PROG_NM],
3954266e564dSmrg[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
3955266e564dSmrg[if test -n "$NM"; then
3956266e564dSmrg  # Let the user override the test.
3957266e564dSmrg  lt_cv_path_NM="$NM"
3958266e564dSmrgelse
3959266e564dSmrg  lt_nm_to_check="${ac_tool_prefix}nm"
3960266e564dSmrg  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 
3961266e564dSmrg    lt_nm_to_check="$lt_nm_to_check nm"
3962266e564dSmrg  fi
3963266e564dSmrg  for lt_tmp_nm in $lt_nm_to_check; do
3964266e564dSmrg    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3965266e564dSmrg    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
3966266e564dSmrg      IFS="$lt_save_ifs"
3967266e564dSmrg      test -z "$ac_dir" && ac_dir=.
3968266e564dSmrg      tmp_nm="$ac_dir/$lt_tmp_nm"
3969266e564dSmrg      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
3970266e564dSmrg	# Check to see if the nm accepts a BSD-compat flag.
3971266e564dSmrg	# Adding the `sed 1q' prevents false positives on HP-UX, which says:
3972266e564dSmrg	#   nm: unknown option "B" ignored
3973266e564dSmrg	# Tru64's nm complains that /dev/null is an invalid object file
3974266e564dSmrg	case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
3975266e564dSmrg	*/dev/null* | *'Invalid file or object type'*)
3976266e564dSmrg	  lt_cv_path_NM="$tmp_nm -B"
3977266e564dSmrg	  break
3978266e564dSmrg	  ;;
3979266e564dSmrg	*)
3980266e564dSmrg	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
3981266e564dSmrg	  */dev/null*)
3982266e564dSmrg	    lt_cv_path_NM="$tmp_nm -p"
3983266e564dSmrg	    break
3984266e564dSmrg	    ;;
3985266e564dSmrg	  *)
3986266e564dSmrg	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3987266e564dSmrg	    continue # so that we can try to find one that supports BSD flags
3988266e564dSmrg	    ;;
3989266e564dSmrg	  esac
3990266e564dSmrg	  ;;
3991266e564dSmrg	esac
3992266e564dSmrg      fi
3993266e564dSmrg    done
3994266e564dSmrg    IFS="$lt_save_ifs"
3995266e564dSmrg  done
3996266e564dSmrg  test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
3997266e564dSmrgfi])
3998266e564dSmrgNM="$lt_cv_path_NM"
3999266e564dSmrg])# AC_PROG_NM
4000266e564dSmrg
4001266e564dSmrg
4002266e564dSmrg# AC_CHECK_LIBM
4003266e564dSmrg# -------------
4004266e564dSmrg# check for math library
4005266e564dSmrgAC_DEFUN([AC_CHECK_LIBM],
4006266e564dSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
4007266e564dSmrgLIBM=
4008266e564dSmrgcase $host in
4009266e564dSmrg*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
4010266e564dSmrg  # These system don't have libm, or don't need it
4011266e564dSmrg  ;;
4012266e564dSmrg*-ncr-sysv4.3*)
4013266e564dSmrg  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
4014266e564dSmrg  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
4015266e564dSmrg  ;;
4016266e564dSmrg*)
4017266e564dSmrg  AC_CHECK_LIB(m, cos, LIBM="-lm")
4018266e564dSmrg  ;;
4019266e564dSmrgesac
4020266e564dSmrg])# AC_CHECK_LIBM
4021266e564dSmrg
4022266e564dSmrg
4023266e564dSmrg# AC_LIBLTDL_CONVENIENCE([DIRECTORY])
4024266e564dSmrg# -----------------------------------
4025266e564dSmrg# sets LIBLTDL to the link flags for the libltdl convenience library and
4026266e564dSmrg# LTDLINCL to the include flags for the libltdl header and adds
4027266e564dSmrg# --enable-ltdl-convenience to the configure arguments.  Note that
4028266e564dSmrg# AC_CONFIG_SUBDIRS is not called here.  If DIRECTORY is not provided,
4029266e564dSmrg# it is assumed to be `libltdl'.  LIBLTDL will be prefixed with
4030266e564dSmrg# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/'
4031266e564dSmrg# (note the single quotes!).  If your package is not flat and you're not
4032266e564dSmrg# using automake, define top_builddir and top_srcdir appropriately in
4033266e564dSmrg# the Makefiles.
4034266e564dSmrgAC_DEFUN([AC_LIBLTDL_CONVENIENCE],
4035266e564dSmrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
4036266e564dSmrg  case $enable_ltdl_convenience in
4037266e564dSmrg  no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
4038266e564dSmrg  "") enable_ltdl_convenience=yes
4039266e564dSmrg      ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
4040266e564dSmrg  esac
4041266e564dSmrg  LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
4042266e564dSmrg  LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
4043266e564dSmrg  # For backwards non-gettext consistent compatibility...
4044266e564dSmrg  INCLTDL="$LTDLINCL"
4045266e564dSmrg])# AC_LIBLTDL_CONVENIENCE
4046266e564dSmrg
4047266e564dSmrg
4048266e564dSmrg# AC_LIBLTDL_INSTALLABLE([DIRECTORY])
4049266e564dSmrg# -----------------------------------
4050266e564dSmrg# sets LIBLTDL to the link flags for the libltdl installable library and
4051266e564dSmrg# LTDLINCL to the include flags for the libltdl header and adds
4052266e564dSmrg# --enable-ltdl-install to the configure arguments.  Note that
4053266e564dSmrg# AC_CONFIG_SUBDIRS is not called here.  If DIRECTORY is not provided,
4054266e564dSmrg# and an installed libltdl is not found, it is assumed to be `libltdl'.
4055266e564dSmrg# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with
4056266e564dSmrg# '${top_srcdir}/' (note the single quotes!).  If your package is not
4057266e564dSmrg# flat and you're not using automake, define top_builddir and top_srcdir
4058266e564dSmrg# appropriately in the Makefiles.
4059266e564dSmrg# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
4060266e564dSmrgAC_DEFUN([AC_LIBLTDL_INSTALLABLE],
4061266e564dSmrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
4062266e564dSmrg  AC_CHECK_LIB(ltdl, lt_dlinit,
4063266e564dSmrg  [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
4064266e564dSmrg  [if test x"$enable_ltdl_install" = xno; then
4065266e564dSmrg     AC_MSG_WARN([libltdl not installed, but installation disabled])
4066266e564dSmrg   else
4067266e564dSmrg     enable_ltdl_install=yes
4068266e564dSmrg   fi
4069266e564dSmrg  ])
4070266e564dSmrg  if test x"$enable_ltdl_install" = x"yes"; then
4071266e564dSmrg    ac_configure_args="$ac_configure_args --enable-ltdl-install"
4072266e564dSmrg    LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
4073266e564dSmrg    LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
4074266e564dSmrg  else
4075266e564dSmrg    ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
4076266e564dSmrg    LIBLTDL="-lltdl"
4077266e564dSmrg    LTDLINCL=
4078266e564dSmrg  fi
4079266e564dSmrg  # For backwards non-gettext consistent compatibility...
4080266e564dSmrg  INCLTDL="$LTDLINCL"
4081266e564dSmrg])# AC_LIBLTDL_INSTALLABLE
4082266e564dSmrg
4083266e564dSmrg
4084266e564dSmrg# AC_LIBTOOL_CXX
4085266e564dSmrg# --------------
4086266e564dSmrg# enable support for C++ libraries
4087266e564dSmrgAC_DEFUN([AC_LIBTOOL_CXX],
4088266e564dSmrg[AC_REQUIRE([_LT_AC_LANG_CXX])
4089266e564dSmrg])# AC_LIBTOOL_CXX
4090266e564dSmrg
4091266e564dSmrg
4092266e564dSmrg# _LT_AC_LANG_CXX
4093266e564dSmrg# ---------------
4094266e564dSmrgAC_DEFUN([_LT_AC_LANG_CXX],
4095266e564dSmrg[AC_REQUIRE([AC_PROG_CXX])
4096266e564dSmrgAC_REQUIRE([_LT_AC_PROG_CXXCPP])
4097266e564dSmrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
4098266e564dSmrg])# _LT_AC_LANG_CXX
4099266e564dSmrg
4100266e564dSmrg# _LT_AC_PROG_CXXCPP
4101266e564dSmrg# ------------------
4102266e564dSmrgAC_DEFUN([_LT_AC_PROG_CXXCPP],
4103266e564dSmrg[
4104266e564dSmrgAC_REQUIRE([AC_PROG_CXX])
4105266e564dSmrgif test -n "$CXX" && ( test "X$CXX" != "Xno" &&
4106266e564dSmrg    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
4107266e564dSmrg    (test "X$CXX" != "Xg++"))) ; then
4108266e564dSmrg  AC_PROG_CXXCPP
4109266e564dSmrgfi
4110266e564dSmrg])# _LT_AC_PROG_CXXCPP
4111266e564dSmrg
4112266e564dSmrg# AC_LIBTOOL_F77
4113266e564dSmrg# --------------
4114266e564dSmrg# enable support for Fortran 77 libraries
4115266e564dSmrgAC_DEFUN([AC_LIBTOOL_F77],
4116266e564dSmrg[AC_REQUIRE([_LT_AC_LANG_F77])
4117266e564dSmrg])# AC_LIBTOOL_F77
4118266e564dSmrg
4119266e564dSmrg
4120266e564dSmrg# _LT_AC_LANG_F77
4121266e564dSmrg# ---------------
4122266e564dSmrgAC_DEFUN([_LT_AC_LANG_F77],
4123266e564dSmrg[AC_REQUIRE([AC_PROG_F77])
4124266e564dSmrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
4125266e564dSmrg])# _LT_AC_LANG_F77
4126266e564dSmrg
4127266e564dSmrg
4128266e564dSmrg# AC_LIBTOOL_GCJ
4129266e564dSmrg# --------------
4130266e564dSmrg# enable support for GCJ libraries
4131266e564dSmrgAC_DEFUN([AC_LIBTOOL_GCJ],
4132266e564dSmrg[AC_REQUIRE([_LT_AC_LANG_GCJ])
4133266e564dSmrg])# AC_LIBTOOL_GCJ
4134266e564dSmrg
4135266e564dSmrg
4136266e564dSmrg# _LT_AC_LANG_GCJ
4137266e564dSmrg# ---------------
4138266e564dSmrgAC_DEFUN([_LT_AC_LANG_GCJ],
4139266e564dSmrg[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
4140266e564dSmrg  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
4141266e564dSmrg    [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
4142266e564dSmrg      [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
4143266e564dSmrg	 [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
4144266e564dSmrg	   [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
4145266e564dSmrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
4146266e564dSmrg])# _LT_AC_LANG_GCJ
4147266e564dSmrg
4148266e564dSmrg
4149266e564dSmrg# AC_LIBTOOL_RC
4150266e564dSmrg# -------------
4151266e564dSmrg# enable support for Windows resource files
4152266e564dSmrgAC_DEFUN([AC_LIBTOOL_RC],
4153266e564dSmrg[AC_REQUIRE([LT_AC_PROG_RC])
4154266e564dSmrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
4155266e564dSmrg])# AC_LIBTOOL_RC
4156266e564dSmrg
4157266e564dSmrg
4158266e564dSmrg# AC_LIBTOOL_LANG_C_CONFIG
4159266e564dSmrg# ------------------------
4160266e564dSmrg# Ensure that the configuration vars for the C compiler are
4161266e564dSmrg# suitably defined.  Those variables are subsequently used by
4162266e564dSmrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4163266e564dSmrgAC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
4164266e564dSmrgAC_DEFUN([_LT_AC_LANG_C_CONFIG],
4165266e564dSmrg[lt_save_CC="$CC"
4166266e564dSmrgAC_LANG_PUSH(C)
4167266e564dSmrg
4168266e564dSmrg# Source file extension for C test sources.
4169266e564dSmrgac_ext=c
4170266e564dSmrg
4171266e564dSmrg# Object file extension for compiled C test sources.
4172266e564dSmrgobjext=o
4173266e564dSmrg_LT_AC_TAGVAR(objext, $1)=$objext
4174266e564dSmrg
4175266e564dSmrg# Code to be used in simple compile tests
4176266e564dSmrglt_simple_compile_test_code="int some_variable = 0;\n"
4177266e564dSmrg
4178266e564dSmrg# Code to be used in simple link tests
4179266e564dSmrglt_simple_link_test_code='int main(){return(0);}\n'
4180266e564dSmrg
4181266e564dSmrg_LT_AC_SYS_COMPILER
4182266e564dSmrg
4183266e564dSmrg# save warnings/boilerplate of simple test code
4184266e564dSmrg_LT_COMPILER_BOILERPLATE
4185266e564dSmrg_LT_LINKER_BOILERPLATE
4186266e564dSmrg
4187266e564dSmrgAC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
4188266e564dSmrgAC_LIBTOOL_PROG_COMPILER_PIC($1)
4189266e564dSmrgAC_LIBTOOL_PROG_CC_C_O($1)
4190266e564dSmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
4191266e564dSmrgAC_LIBTOOL_PROG_LD_SHLIBS($1)
4192266e564dSmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
4193266e564dSmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
4194266e564dSmrgAC_LIBTOOL_SYS_LIB_STRIP
4195266e564dSmrgAC_LIBTOOL_DLOPEN_SELF
4196266e564dSmrg
4197266e564dSmrg# Report which library types will actually be built
4198266e564dSmrgAC_MSG_CHECKING([if libtool supports shared libraries])
4199266e564dSmrgAC_MSG_RESULT([$can_build_shared])
4200266e564dSmrg
4201266e564dSmrgAC_MSG_CHECKING([whether to build shared libraries])
4202266e564dSmrgtest "$can_build_shared" = "no" && enable_shared=no
4203266e564dSmrg
4204266e564dSmrg# On AIX, shared libraries and static libraries use the same namespace, and
4205266e564dSmrg# are all built from PIC.
4206266e564dSmrgcase $host_os in
4207266e564dSmrgaix3*)
4208266e564dSmrg  test "$enable_shared" = yes && enable_static=no
4209266e564dSmrg  if test -n "$RANLIB"; then
4210266e564dSmrg    archive_cmds="$archive_cmds~\$RANLIB \$lib"
4211266e564dSmrg    postinstall_cmds='$RANLIB $lib'
4212266e564dSmrg  fi
4213266e564dSmrg  ;;
4214266e564dSmrg
4215266e564dSmrgaix4* | aix5*)
4216266e564dSmrg  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
4217266e564dSmrg    test "$enable_shared" = yes && enable_static=no
4218266e564dSmrg  fi
4219266e564dSmrg    ;;
4220266e564dSmrgesac
4221266e564dSmrgAC_MSG_RESULT([$enable_shared])
4222266e564dSmrg
4223266e564dSmrgAC_MSG_CHECKING([whether to build static libraries])
4224266e564dSmrg# Make sure either enable_shared or enable_static is yes.
4225266e564dSmrgtest "$enable_shared" = yes || enable_static=yes
4226266e564dSmrgAC_MSG_RESULT([$enable_static])
4227266e564dSmrg
4228266e564dSmrgAC_LIBTOOL_CONFIG($1)
4229266e564dSmrg
4230266e564dSmrgAC_LANG_POP
4231266e564dSmrgCC="$lt_save_CC"
4232266e564dSmrg])# AC_LIBTOOL_LANG_C_CONFIG
4233266e564dSmrg
4234266e564dSmrg
4235266e564dSmrg# AC_LIBTOOL_LANG_CXX_CONFIG
4236266e564dSmrg# --------------------------
4237266e564dSmrg# Ensure that the configuration vars for the C compiler are
4238266e564dSmrg# suitably defined.  Those variables are subsequently used by
4239266e564dSmrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4240266e564dSmrgAC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
4241266e564dSmrgAC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
4242266e564dSmrg[AC_LANG_PUSH(C++)
4243266e564dSmrgAC_REQUIRE([AC_PROG_CXX])
4244266e564dSmrgAC_REQUIRE([_LT_AC_PROG_CXXCPP])
4245266e564dSmrg
4246266e564dSmrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4247266e564dSmrg_LT_AC_TAGVAR(allow_undefined_flag, $1)=
4248266e564dSmrg_LT_AC_TAGVAR(always_export_symbols, $1)=no
4249266e564dSmrg_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
4250266e564dSmrg_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
4251266e564dSmrg_LT_AC_TAGVAR(hardcode_direct, $1)=no
4252266e564dSmrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
4253266e564dSmrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
4254266e564dSmrg_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
4255266e564dSmrg_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
4256266e564dSmrg_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
4257266e564dSmrg_LT_AC_TAGVAR(hardcode_automatic, $1)=no
4258266e564dSmrg_LT_AC_TAGVAR(module_cmds, $1)=
4259266e564dSmrg_LT_AC_TAGVAR(module_expsym_cmds, $1)=
4260266e564dSmrg_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
4261266e564dSmrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
4262266e564dSmrg_LT_AC_TAGVAR(no_undefined_flag, $1)=
4263266e564dSmrg_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
4264266e564dSmrg_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
4265266e564dSmrg
4266266e564dSmrg# Dependencies to place before and after the object being linked:
4267266e564dSmrg_LT_AC_TAGVAR(predep_objects, $1)=
4268266e564dSmrg_LT_AC_TAGVAR(postdep_objects, $1)=
4269266e564dSmrg_LT_AC_TAGVAR(predeps, $1)=
4270266e564dSmrg_LT_AC_TAGVAR(postdeps, $1)=
4271266e564dSmrg_LT_AC_TAGVAR(compiler_lib_search_path, $1)=
4272266e564dSmrg
4273266e564dSmrg# Source file extension for C++ test sources.
4274266e564dSmrgac_ext=cpp
4275266e564dSmrg
4276266e564dSmrg# Object file extension for compiled C++ test sources.
4277266e564dSmrgobjext=o
4278266e564dSmrg_LT_AC_TAGVAR(objext, $1)=$objext
4279266e564dSmrg
4280266e564dSmrg# Code to be used in simple compile tests
4281266e564dSmrglt_simple_compile_test_code="int some_variable = 0;\n"
4282266e564dSmrg
4283266e564dSmrg# Code to be used in simple link tests
4284266e564dSmrglt_simple_link_test_code='int main(int, char *[[]]) { return(0); }\n'
4285266e564dSmrg
4286266e564dSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
4287266e564dSmrg_LT_AC_SYS_COMPILER
4288266e564dSmrg
4289266e564dSmrg# save warnings/boilerplate of simple test code
4290266e564dSmrg_LT_COMPILER_BOILERPLATE
4291266e564dSmrg_LT_LINKER_BOILERPLATE
4292266e564dSmrg
4293266e564dSmrg# Allow CC to be a program name with arguments.
4294266e564dSmrglt_save_CC=$CC
4295266e564dSmrglt_save_LD=$LD
4296266e564dSmrglt_save_GCC=$GCC
4297266e564dSmrgGCC=$GXX
4298266e564dSmrglt_save_with_gnu_ld=$with_gnu_ld
4299266e564dSmrglt_save_path_LD=$lt_cv_path_LD
4300266e564dSmrgif test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
4301266e564dSmrg  lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
4302266e564dSmrgelse
4303266e564dSmrg  $as_unset lt_cv_prog_gnu_ld
4304266e564dSmrgfi
4305266e564dSmrgif test -n "${lt_cv_path_LDCXX+set}"; then
4306266e564dSmrg  lt_cv_path_LD=$lt_cv_path_LDCXX
4307266e564dSmrgelse
4308266e564dSmrg  $as_unset lt_cv_path_LD
4309266e564dSmrgfi
4310266e564dSmrgtest -z "${LDCXX+set}" || LD=$LDCXX
4311266e564dSmrgCC=${CXX-"c++"}
4312266e564dSmrgcompiler=$CC
4313266e564dSmrg_LT_AC_TAGVAR(compiler, $1)=$CC
4314266e564dSmrg_LT_CC_BASENAME([$compiler])
4315266e564dSmrg
4316266e564dSmrg# We don't want -fno-exception wen compiling C++ code, so set the
4317266e564dSmrg# no_builtin_flag separately
4318266e564dSmrgif test "$GXX" = yes; then
4319266e564dSmrg  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
4320266e564dSmrgelse
4321266e564dSmrg  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
4322266e564dSmrgfi
4323266e564dSmrg
4324266e564dSmrgif test "$GXX" = yes; then
4325266e564dSmrg  # Set up default GNU C++ configuration
4326266e564dSmrg
4327266e564dSmrg  AC_PROG_LD
4328266e564dSmrg
4329266e564dSmrg  # Check if GNU C++ uses GNU ld as the underlying linker, since the
4330266e564dSmrg  # archiving commands below assume that GNU ld is being used.
4331266e564dSmrg  if test "$with_gnu_ld" = yes; then
4332266e564dSmrg    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
4333266e564dSmrg    _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'
4334266e564dSmrg
4335266e564dSmrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
4336266e564dSmrg    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4337266e564dSmrg
4338266e564dSmrg    # If archive_cmds runs LD, not CC, wlarc should be empty
4339266e564dSmrg    # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
4340266e564dSmrg    #     investigate it a little bit more. (MM)
4341266e564dSmrg    wlarc='${wl}'
4342266e564dSmrg
4343266e564dSmrg    # ancient GNU ld didn't support --whole-archive et. al.
4344266e564dSmrg    if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
4345266e564dSmrg	grep 'no-whole-archive' > /dev/null; then
4346266e564dSmrg      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
4347266e564dSmrg    else
4348266e564dSmrg      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
4349266e564dSmrg    fi
4350266e564dSmrg  else
4351266e564dSmrg    with_gnu_ld=no
4352266e564dSmrg    wlarc=
4353266e564dSmrg
4354266e564dSmrg    # A generic and very simple default shared library creation
4355266e564dSmrg    # command for GNU C++ for the case where it uses the native
4356266e564dSmrg    # linker, instead of GNU ld.  If possible, this setting should
4357266e564dSmrg    # overridden to take advantage of the native linker features on
4358266e564dSmrg    # the platform it is being used on.
4359266e564dSmrg    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
4360266e564dSmrg  fi
4361266e564dSmrg
4362266e564dSmrg  # Commands to make compiler produce verbose output that lists
4363266e564dSmrg  # what "hidden" libraries, object files and flags are used when
4364266e564dSmrg  # linking a shared library.
4365266e564dSmrg  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
4366266e564dSmrg
4367266e564dSmrgelse
4368266e564dSmrg  GXX=no
4369266e564dSmrg  with_gnu_ld=no
4370266e564dSmrg  wlarc=
4371266e564dSmrgfi
4372266e564dSmrg
4373266e564dSmrg# PORTME: fill in a description of your system's C++ link characteristics
4374266e564dSmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
4375266e564dSmrg_LT_AC_TAGVAR(ld_shlibs, $1)=yes
4376266e564dSmrgcase $host_os in
4377266e564dSmrg  aix3*)
4378266e564dSmrg    # FIXME: insert proper C++ library support
4379266e564dSmrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
4380266e564dSmrg    ;;
4381266e564dSmrg  aix4* | aix5*)
4382266e564dSmrg    if test "$host_cpu" = ia64; then
4383266e564dSmrg      # On IA64, the linker does run time linking by default, so we don't
4384266e564dSmrg      # have to do anything special.
4385266e564dSmrg      aix_use_runtimelinking=no
4386266e564dSmrg      exp_sym_flag='-Bexport'
4387266e564dSmrg      no_entry_flag=""
4388266e564dSmrg    else
4389266e564dSmrg      aix_use_runtimelinking=no
4390266e564dSmrg
4391266e564dSmrg      # Test if we are trying to use run time linking or normal
4392266e564dSmrg      # AIX style linking. If -brtl is somewhere in LDFLAGS, we
4393266e564dSmrg      # need to do runtime linking.
4394266e564dSmrg      case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
4395266e564dSmrg	for ld_flag in $LDFLAGS; do
4396266e564dSmrg	  case $ld_flag in
4397266e564dSmrg	  *-brtl*)
4398266e564dSmrg	    aix_use_runtimelinking=yes
4399266e564dSmrg	    break
4400266e564dSmrg	    ;;
4401266e564dSmrg	  esac
4402266e564dSmrg	done
4403266e564dSmrg	;;
4404266e564dSmrg      esac
4405266e564dSmrg
4406266e564dSmrg      exp_sym_flag='-bexport'
4407266e564dSmrg      no_entry_flag='-bnoentry'
4408266e564dSmrg    fi
4409266e564dSmrg
4410266e564dSmrg    # When large executables or shared objects are built, AIX ld can
4411266e564dSmrg    # have problems creating the table of contents.  If linking a library
4412266e564dSmrg    # or program results in "error TOC overflow" add -mminimal-toc to
4413266e564dSmrg    # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
4414266e564dSmrg    # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
4415266e564dSmrg
4416266e564dSmrg    _LT_AC_TAGVAR(archive_cmds, $1)=''
4417266e564dSmrg    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4418266e564dSmrg    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
4419266e564dSmrg    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4420266e564dSmrg
4421266e564dSmrg    if test "$GXX" = yes; then
4422266e564dSmrg      case $host_os in aix4.[[012]]|aix4.[[012]].*)
4423266e564dSmrg      # We only want to do this on AIX 4.2 and lower, the check
4424266e564dSmrg      # below for broken collect2 doesn't work under 4.3+
4425266e564dSmrg	collect2name=`${CC} -print-prog-name=collect2`
4426266e564dSmrg	if test -f "$collect2name" && \
4427266e564dSmrg	   strings "$collect2name" | grep resolve_lib_name >/dev/null
4428266e564dSmrg	then
4429266e564dSmrg	  # We have reworked collect2
4430266e564dSmrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4431266e564dSmrg	else
4432266e564dSmrg	  # We have old collect2
4433266e564dSmrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
4434266e564dSmrg	  # It fails to find uninstalled libraries when the uninstalled
4435266e564dSmrg	  # path is not listed in the libpath.  Setting hardcode_minus_L
4436266e564dSmrg	  # to unsupported forces relinking
4437266e564dSmrg	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
4438266e564dSmrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4439266e564dSmrg	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
4440266e564dSmrg	fi
4441266e564dSmrg	;;
4442266e564dSmrg      esac
4443266e564dSmrg      shared_flag='-shared'
4444266e564dSmrg      if test "$aix_use_runtimelinking" = yes; then
4445266e564dSmrg	shared_flag="$shared_flag "'${wl}-G'
4446266e564dSmrg      fi
4447266e564dSmrg    else
4448266e564dSmrg      # not using gcc
4449266e564dSmrg      if test "$host_cpu" = ia64; then
4450266e564dSmrg	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
4451266e564dSmrg	# chokes on -Wl,-G. The following line is correct:
4452266e564dSmrg	shared_flag='-G'
4453266e564dSmrg      else
4454266e564dSmrg	if test "$aix_use_runtimelinking" = yes; then
4455266e564dSmrg	  shared_flag='${wl}-G'
4456266e564dSmrg	else
4457266e564dSmrg	  shared_flag='${wl}-bM:SRE'
4458266e564dSmrg	fi
4459266e564dSmrg      fi
4460266e564dSmrg    fi
4461266e564dSmrg
4462266e564dSmrg    # It seems that -bexpall does not export symbols beginning with
4463266e564dSmrg    # underscore (_), so it is better to generate a list of symbols to export.
4464266e564dSmrg    _LT_AC_TAGVAR(always_export_symbols, $1)=yes
4465266e564dSmrg    if test "$aix_use_runtimelinking" = yes; then
4466266e564dSmrg      # Warning - without using the other runtime loading flags (-brtl),
4467266e564dSmrg      # -berok will link without error, but may produce a broken library.
4468266e564dSmrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
4469266e564dSmrg      # Determine the default libpath from the value encoded in an empty executable.
4470266e564dSmrg      _LT_AC_SYS_LIBPATH_AIX
4471266e564dSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
4472266e564dSmrg
4473266e564dSmrg      _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"
4474266e564dSmrg     else
4475266e564dSmrg      if test "$host_cpu" = ia64; then
4476266e564dSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
4477266e564dSmrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
4478266e564dSmrg	_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"
4479266e564dSmrg      else
4480266e564dSmrg	# Determine the default libpath from the value encoded in an empty executable.
4481266e564dSmrg	_LT_AC_SYS_LIBPATH_AIX
4482266e564dSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
4483266e564dSmrg	# Warning - without using the other run time loading flags,
4484266e564dSmrg	# -berok will link without error, but may produce a broken library.
4485266e564dSmrg	_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
4486266e564dSmrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
4487266e564dSmrg	# Exported symbols can be pulled into shared objects from archives
4488266e564dSmrg	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
4489266e564dSmrg	_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
4490266e564dSmrg	# This is similar to how AIX traditionally builds its shared libraries.
4491266e564dSmrg	_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'
4492266e564dSmrg      fi
4493266e564dSmrg    fi
4494266e564dSmrg    ;;
4495266e564dSmrg
4496266e564dSmrg  beos*)
4497266e564dSmrg    if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
4498266e564dSmrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
4499266e564dSmrg      # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
4500266e564dSmrg      # support --undefined.  This deserves some investigation.  FIXME
4501266e564dSmrg      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4502266e564dSmrg    else
4503266e564dSmrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
4504266e564dSmrg    fi
4505266e564dSmrg    ;;
4506266e564dSmrg
4507266e564dSmrg  chorus*)
4508266e564dSmrg    case $cc_basename in
4509266e564dSmrg      *)
4510266e564dSmrg	# FIXME: insert proper C++ library support
4511266e564dSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
4512266e564dSmrg	;;
4513266e564dSmrg    esac
4514266e564dSmrg    ;;
4515266e564dSmrg
4516266e564dSmrg  cygwin* | mingw* | pw32*)
4517266e564dSmrg    # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
4518266e564dSmrg    # as there is no search path for DLLs.
4519266e564dSmrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4520266e564dSmrg    _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
4521266e564dSmrg    _LT_AC_TAGVAR(always_export_symbols, $1)=no
4522266e564dSmrg    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
4523266e564dSmrg
4524266e564dSmrg    if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
4525266e564dSmrg      _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'
4526266e564dSmrg      # If the export-symbols file already is a .def file (1st line
4527266e564dSmrg      # is EXPORTS), use it as is; otherwise, prepend...
4528266e564dSmrg      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
4529266e564dSmrg	cp $export_symbols $output_objdir/$soname.def;
4530266e564dSmrg      else
4531266e564dSmrg	echo EXPORTS > $output_objdir/$soname.def;
4532266e564dSmrg	cat $export_symbols >> $output_objdir/$soname.def;
4533266e564dSmrg      fi~
4534266e564dSmrg      $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'
4535266e564dSmrg    else
4536266e564dSmrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
4537266e564dSmrg    fi
4538266e564dSmrg  ;;
4539266e564dSmrg      darwin* | rhapsody*)
4540266e564dSmrg        case $host_os in
4541266e564dSmrg        rhapsody* | darwin1.[[012]])
4542266e564dSmrg         _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
4543266e564dSmrg         ;;
4544266e564dSmrg       *) # Darwin 1.3 on
4545266e564dSmrg         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
4546266e564dSmrg           _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
4547266e564dSmrg         else
4548266e564dSmrg           case ${MACOSX_DEPLOYMENT_TARGET} in
4549266e564dSmrg             10.[[012]])
4550266e564dSmrg               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
4551266e564dSmrg               ;;
4552266e564dSmrg             10.*)
4553266e564dSmrg               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
4554266e564dSmrg               ;;
4555266e564dSmrg           esac
4556266e564dSmrg         fi
4557266e564dSmrg         ;;
4558266e564dSmrg        esac
4559266e564dSmrg      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4560266e564dSmrg      _LT_AC_TAGVAR(hardcode_direct, $1)=no
4561266e564dSmrg      _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
4562266e564dSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
4563266e564dSmrg      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
4564266e564dSmrg      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4565266e564dSmrg
4566266e564dSmrg    if test "$GXX" = yes ; then
4567266e564dSmrg      lt_int_apple_cc_single_mod=no
4568266e564dSmrg      output_verbose_link_cmd='echo'
4569266e564dSmrg      if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then
4570266e564dSmrg       lt_int_apple_cc_single_mod=yes
4571266e564dSmrg      fi
4572266e564dSmrg      if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
4573266e564dSmrg       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
4574266e564dSmrg      else
4575266e564dSmrg          _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'
4576266e564dSmrg        fi
4577266e564dSmrg        _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
4578266e564dSmrg        # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
4579266e564dSmrg          if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
4580266e564dSmrg            _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}'
4581266e564dSmrg          else
4582266e564dSmrg            _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}'
4583266e564dSmrg          fi
4584266e564dSmrg            _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}'
4585266e564dSmrg      else
4586266e564dSmrg      case $cc_basename in
4587266e564dSmrg        xlc*)
4588266e564dSmrg         output_verbose_link_cmd='echo'
4589266e564dSmrg          _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'
4590266e564dSmrg          _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
4591266e564dSmrg          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
4592266e564dSmrg          _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}'
4593266e564dSmrg          _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}'
4594266e564dSmrg          ;;
4595266e564dSmrg       *)
4596266e564dSmrg         _LT_AC_TAGVAR(ld_shlibs, $1)=no
4597266e564dSmrg          ;;
4598266e564dSmrg      esac
4599266e564dSmrg      fi
4600266e564dSmrg        ;;
4601266e564dSmrg
4602266e564dSmrg  dgux*)
4603266e564dSmrg    case $cc_basename in
4604266e564dSmrg      ec++*)
4605266e564dSmrg	# FIXME: insert proper C++ library support
4606266e564dSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
4607266e564dSmrg	;;
4608266e564dSmrg      ghcx*)
4609266e564dSmrg	# Green Hills C++ Compiler
4610266e564dSmrg	# FIXME: insert proper C++ library support
4611266e564dSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
4612266e564dSmrg	;;
4613266e564dSmrg      *)
4614266e564dSmrg	# FIXME: insert proper C++ library support
4615266e564dSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
4616266e564dSmrg	;;
4617266e564dSmrg    esac
4618266e564dSmrg    ;;
4619266e564dSmrg  freebsd[[12]]*)
4620266e564dSmrg    # C++ shared libraries reported to be fairly broken before switch to ELF
4621266e564dSmrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
4622266e564dSmrg    ;;
4623266e564dSmrg  freebsd-elf*)
4624266e564dSmrg    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4625266e564dSmrg    ;;
4626266e564dSmrg  freebsd* | kfreebsd*-gnu | dragonfly*)
4627266e564dSmrg    # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
4628266e564dSmrg    # conventions
4629266e564dSmrg    _LT_AC_TAGVAR(ld_shlibs, $1)=yes
4630266e564dSmrg    ;;
4631266e564dSmrg  gnu*)
4632266e564dSmrg    ;;
4633266e564dSmrg  hpux9*)
4634266e564dSmrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
4635266e564dSmrg    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4636266e564dSmrg    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4637266e564dSmrg    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4638266e564dSmrg    _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
4639266e564dSmrg				# but as the default
4640266e564dSmrg				# location of the library.
4641266e564dSmrg
4642266e564dSmrg    case $cc_basename in
4643266e564dSmrg    CC*)
4644266e564dSmrg      # FIXME: insert proper C++ library support
4645266e564dSmrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
4646266e564dSmrg      ;;
4647266e564dSmrg    aCC*)
4648266e564dSmrg      _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'
4649266e564dSmrg      # Commands to make compiler produce verbose output that lists
4650266e564dSmrg      # what "hidden" libraries, object files and flags are used when
4651266e564dSmrg      # linking a shared library.
4652266e564dSmrg      #
4653266e564dSmrg      # There doesn't appear to be a way to prevent this compiler from
4654266e564dSmrg      # explicitly linking system object files so we need to strip them
4655266e564dSmrg      # from the output so that they don't get included in the library
4656266e564dSmrg      # dependencies.
4657266e564dSmrg      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'
4658266e564dSmrg      ;;
4659266e564dSmrg    *)
4660266e564dSmrg      if test "$GXX" = yes; then
4661266e564dSmrg        _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'
4662266e564dSmrg      else
4663266e564dSmrg        # FIXME: insert proper C++ library support
4664266e564dSmrg        _LT_AC_TAGVAR(ld_shlibs, $1)=no
4665266e564dSmrg      fi
4666266e564dSmrg      ;;
4667266e564dSmrg    esac
4668266e564dSmrg    ;;
4669266e564dSmrg  hpux10*|hpux11*)
4670266e564dSmrg    if test $with_gnu_ld = no; then
4671266e564dSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
4672266e564dSmrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4673266e564dSmrg
4674266e564dSmrg      case $host_cpu in
4675266e564dSmrg      hppa*64*|ia64*)
4676266e564dSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
4677266e564dSmrg        ;;
4678266e564dSmrg      *)
4679266e564dSmrg	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4680266e564dSmrg        ;;
4681266e564dSmrg      esac
4682266e564dSmrg    fi
4683266e564dSmrg    case $host_cpu in
4684266e564dSmrg    hppa*64*|ia64*)
4685266e564dSmrg      _LT_AC_TAGVAR(hardcode_direct, $1)=no
4686266e564dSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4687266e564dSmrg      ;;
4688266e564dSmrg    *)
4689266e564dSmrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4690266e564dSmrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
4691266e564dSmrg					      # but as the default
4692266e564dSmrg					      # location of the library.
4693266e564dSmrg      ;;
4694266e564dSmrg    esac
4695266e564dSmrg
4696266e564dSmrg    case $cc_basename in
4697266e564dSmrg      CC*)
4698266e564dSmrg	# FIXME: insert proper C++ library support
4699266e564dSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
4700266e564dSmrg	;;
4701266e564dSmrg      aCC*)
4702266e564dSmrg	case $host_cpu in
4703266e564dSmrg	hppa*64*)
4704266e564dSmrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
4705266e564dSmrg	  ;;
4706266e564dSmrg	ia64*)
4707266e564dSmrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
4708266e564dSmrg	  ;;
4709266e564dSmrg	*)
4710266e564dSmrg	  _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'
4711266e564dSmrg	  ;;
4712266e564dSmrg	esac
4713266e564dSmrg	# Commands to make compiler produce verbose output that lists
4714266e564dSmrg	# what "hidden" libraries, object files and flags are used when
4715266e564dSmrg	# linking a shared library.
4716266e564dSmrg	#
4717266e564dSmrg	# There doesn't appear to be a way to prevent this compiler from
4718266e564dSmrg	# explicitly linking system object files so we need to strip them
4719266e564dSmrg	# from the output so that they don't get included in the library
4720266e564dSmrg	# dependencies.
4721266e564dSmrg	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'
4722266e564dSmrg	;;
4723266e564dSmrg      *)
4724266e564dSmrg	if test "$GXX" = yes; then
4725266e564dSmrg	  if test $with_gnu_ld = no; then
4726266e564dSmrg	    case $host_cpu in
4727266e564dSmrg	    hppa*64*)
4728266e564dSmrg	      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
4729266e564dSmrg	      ;;
4730266e564dSmrg	    ia64*)
4731266e564dSmrg	      _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'
4732266e564dSmrg	      ;;
4733266e564dSmrg	    *)
4734266e564dSmrg	      _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'
4735266e564dSmrg	      ;;
4736266e564dSmrg	    esac
4737266e564dSmrg	  fi
4738266e564dSmrg	else
4739266e564dSmrg	  # FIXME: insert proper C++ library support
4740266e564dSmrg	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
4741266e564dSmrg	fi
4742266e564dSmrg	;;
4743266e564dSmrg    esac
4744266e564dSmrg    ;;
4745266e564dSmrg  interix3*)
4746266e564dSmrg    _LT_AC_TAGVAR(hardcode_direct, $1)=no
4747266e564dSmrg    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4748266e564dSmrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4749266e564dSmrg    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4750266e564dSmrg    # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
4751266e564dSmrg    # Instead, shared libraries are loaded at an image base (0x10000000 by
4752266e564dSmrg    # default) and relocated if they conflict, which is a slow very memory
4753266e564dSmrg    # consuming and fragmenting process.  To avoid this, we pick a random,
4754266e564dSmrg    # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
4755266e564dSmrg    # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
4756266e564dSmrg    _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'
4757266e564dSmrg    _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'
4758266e564dSmrg    ;;
4759266e564dSmrg  irix5* | irix6*)
4760266e564dSmrg    case $cc_basename in
4761266e564dSmrg      CC*)
4762266e564dSmrg	# SGI C++
4763266e564dSmrg	_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'
4764266e564dSmrg
4765266e564dSmrg	# Archives containing C++ object files must be created using
4766266e564dSmrg	# "CC -ar", where "CC" is the IRIX C++ compiler.  This is
4767266e564dSmrg	# necessary to make sure instantiated templates are included
4768266e564dSmrg	# in the archive.
4769266e564dSmrg	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
4770266e564dSmrg	;;
4771266e564dSmrg      *)
4772266e564dSmrg	if test "$GXX" = yes; then
4773266e564dSmrg	  if test "$with_gnu_ld" = no; then
4774266e564dSmrg	    _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'
4775266e564dSmrg	  else
4776266e564dSmrg	    _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'
4777266e564dSmrg	  fi
4778266e564dSmrg	fi
4779266e564dSmrg	_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4780266e564dSmrg	;;
4781266e564dSmrg    esac
4782266e564dSmrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4783266e564dSmrg    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4784266e564dSmrg    ;;
4785266e564dSmrg  linux*)
4786266e564dSmrg    case $cc_basename in
4787266e564dSmrg      KCC*)
4788266e564dSmrg	# Kuck and Associates, Inc. (KAI) C++ Compiler
4789266e564dSmrg
4790266e564dSmrg	# KCC will only create a shared library if the output file
4791266e564dSmrg	# ends with ".so" (or ".sl" for HP-UX), so rename the library
4792266e564dSmrg	# to its proper name (with version) after linking.
4793266e564dSmrg	_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'
4794266e564dSmrg	_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'
4795266e564dSmrg	# Commands to make compiler produce verbose output that lists
4796266e564dSmrg	# what "hidden" libraries, object files and flags are used when
4797266e564dSmrg	# linking a shared library.
4798266e564dSmrg	#
4799266e564dSmrg	# There doesn't appear to be a way to prevent this compiler from
4800266e564dSmrg	# explicitly linking system object files so we need to strip them
4801266e564dSmrg	# from the output so that they don't get included in the library
4802266e564dSmrg	# dependencies.
4803266e564dSmrg	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'
4804266e564dSmrg
4805266e564dSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
4806266e564dSmrg	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4807266e564dSmrg
4808266e564dSmrg	# Archives containing C++ object files must be created using
4809266e564dSmrg	# "CC -Bstatic", where "CC" is the KAI C++ compiler.
4810266e564dSmrg	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
4811266e564dSmrg	;;
4812266e564dSmrg      icpc*)
4813266e564dSmrg	# Intel C++
4814266e564dSmrg	with_gnu_ld=yes
4815266e564dSmrg	# version 8.0 and above of icpc choke on multiply defined symbols
4816266e564dSmrg	# if we add $predep_objects and $postdep_objects, however 7.1 and
4817266e564dSmrg	# earlier do not add the objects themselves.
4818266e564dSmrg	case `$CC -V 2>&1` in
4819266e564dSmrg	*"Version 7."*)
4820266e564dSmrg  	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
4821266e564dSmrg  	  _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'
4822266e564dSmrg	  ;;
4823266e564dSmrg	*)  # Version 8.0 or newer
4824266e564dSmrg	  tmp_idyn=
4825266e564dSmrg	  case $host_cpu in
4826266e564dSmrg	    ia64*) tmp_idyn=' -i_dynamic';;
4827266e564dSmrg	  esac
4828266e564dSmrg  	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4829266e564dSmrg	  _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'
4830266e564dSmrg	  ;;
4831266e564dSmrg	esac
4832266e564dSmrg	_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4833266e564dSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4834266e564dSmrg	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4835266e564dSmrg	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
4836266e564dSmrg	;;
4837266e564dSmrg      pgCC*)
4838266e564dSmrg        # Portland Group C++ compiler
4839266e564dSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
4840266e564dSmrg  	_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'
4841266e564dSmrg
4842266e564dSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
4843266e564dSmrg	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4844266e564dSmrg	_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'
4845266e564dSmrg        ;;
4846266e564dSmrg      cxx*)
4847266e564dSmrg	# Compaq C++
4848266e564dSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
4849266e564dSmrg	_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'
4850266e564dSmrg
4851266e564dSmrg	runpath_var=LD_RUN_PATH
4852266e564dSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
4853266e564dSmrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4854266e564dSmrg
4855266e564dSmrg	# Commands to make compiler produce verbose output that lists
4856266e564dSmrg	# what "hidden" libraries, object files and flags are used when
4857266e564dSmrg	# linking a shared library.
4858266e564dSmrg	#
4859266e564dSmrg	# There doesn't appear to be a way to prevent this compiler from
4860266e564dSmrg	# explicitly linking system object files so we need to strip them
4861266e564dSmrg	# from the output so that they don't get included in the library
4862266e564dSmrg	# dependencies.
4863266e564dSmrg	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'
4864266e564dSmrg	;;
4865266e564dSmrg    esac
4866266e564dSmrg    ;;
4867266e564dSmrg  lynxos*)
4868266e564dSmrg    # FIXME: insert proper C++ library support
4869266e564dSmrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
4870266e564dSmrg    ;;
4871266e564dSmrg  m88k*)
4872266e564dSmrg    # FIXME: insert proper C++ library support
4873266e564dSmrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
4874266e564dSmrg    ;;
4875266e564dSmrg  mvs*)
4876266e564dSmrg    case $cc_basename in
4877266e564dSmrg      cxx*)
4878266e564dSmrg	# FIXME: insert proper C++ library support
4879266e564dSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
4880266e564dSmrg	;;
4881266e564dSmrg      *)
4882266e564dSmrg	# FIXME: insert proper C++ library support
4883266e564dSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
4884266e564dSmrg	;;
4885266e564dSmrg    esac
4886266e564dSmrg    ;;
4887266e564dSmrg  netbsd*)
4888266e564dSmrg    if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
4889266e564dSmrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
4890266e564dSmrg      wlarc=
4891266e564dSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4892266e564dSmrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4893266e564dSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4894266e564dSmrg    fi
4895266e564dSmrg    # Workaround some broken pre-1.5 toolchains
4896266e564dSmrg    output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
4897266e564dSmrg    ;;
4898266e564dSmrg  openbsd2*)
4899266e564dSmrg    # C++ shared libraries are fairly broken
4900266e564dSmrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
4901266e564dSmrg    ;;
4902266e564dSmrg  openbsd*)
4903266e564dSmrg    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4904266e564dSmrg    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4905266e564dSmrg    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
4906266e564dSmrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4907266e564dSmrg    if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
4908266e564dSmrg      _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'
4909266e564dSmrg      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4910266e564dSmrg      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
4911266e564dSmrg    fi
4912266e564dSmrg    output_verbose_link_cmd='echo'
4913266e564dSmrg    ;;
4914266e564dSmrg  osf3*)
4915266e564dSmrg    case $cc_basename in
4916266e564dSmrg      KCC*)
4917266e564dSmrg	# Kuck and Associates, Inc. (KAI) C++ Compiler
4918266e564dSmrg
4919266e564dSmrg	# KCC will only create a shared library if the output file
4920266e564dSmrg	# ends with ".so" (or ".sl" for HP-UX), so rename the library
4921266e564dSmrg	# to its proper name (with version) after linking.
4922266e564dSmrg	_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'
4923266e564dSmrg
4924266e564dSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4925266e564dSmrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4926266e564dSmrg
4927266e564dSmrg	# Archives containing C++ object files must be created using
4928266e564dSmrg	# "CC -Bstatic", where "CC" is the KAI C++ compiler.
4929266e564dSmrg	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
4930266e564dSmrg
4931266e564dSmrg	;;
4932266e564dSmrg      RCC*)
4933266e564dSmrg	# Rational C++ 2.4.1
4934266e564dSmrg	# FIXME: insert proper C++ library support
4935266e564dSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
4936266e564dSmrg	;;
4937266e564dSmrg      cxx*)
4938266e564dSmrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4939266e564dSmrg	_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'
4940266e564dSmrg
4941266e564dSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4942266e564dSmrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4943266e564dSmrg
4944266e564dSmrg	# Commands to make compiler produce verbose output that lists
4945266e564dSmrg	# what "hidden" libraries, object files and flags are used when
4946266e564dSmrg	# linking a shared library.
4947266e564dSmrg	#
4948266e564dSmrg	# There doesn't appear to be a way to prevent this compiler from
4949266e564dSmrg	# explicitly linking system object files so we need to strip them
4950266e564dSmrg	# from the output so that they don't get included in the library
4951266e564dSmrg	# dependencies.
4952266e564dSmrg	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'
4953266e564dSmrg	;;
4954266e564dSmrg      *)
4955266e564dSmrg	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
4956266e564dSmrg	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4957266e564dSmrg	  _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'
4958266e564dSmrg
4959266e564dSmrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4960266e564dSmrg	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4961266e564dSmrg
4962266e564dSmrg	  # Commands to make compiler produce verbose output that lists
4963266e564dSmrg	  # what "hidden" libraries, object files and flags are used when
4964266e564dSmrg	  # linking a shared library.
4965266e564dSmrg	  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
4966266e564dSmrg
4967266e564dSmrg	else
4968266e564dSmrg	  # FIXME: insert proper C++ library support
4969266e564dSmrg	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
4970266e564dSmrg	fi
4971266e564dSmrg	;;
4972266e564dSmrg    esac
4973266e564dSmrg    ;;
4974266e564dSmrg  osf4* | osf5*)
4975266e564dSmrg    case $cc_basename in
4976266e564dSmrg      KCC*)
4977266e564dSmrg	# Kuck and Associates, Inc. (KAI) C++ Compiler
4978266e564dSmrg
4979266e564dSmrg	# KCC will only create a shared library if the output file
4980266e564dSmrg	# ends with ".so" (or ".sl" for HP-UX), so rename the library
4981266e564dSmrg	# to its proper name (with version) after linking.
4982266e564dSmrg	_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'
4983266e564dSmrg
4984266e564dSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4985266e564dSmrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4986266e564dSmrg
4987266e564dSmrg	# Archives containing C++ object files must be created using
4988266e564dSmrg	# the KAI C++ compiler.
4989266e564dSmrg	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
4990266e564dSmrg	;;
4991266e564dSmrg      RCC*)
4992266e564dSmrg	# Rational C++ 2.4.1
4993266e564dSmrg	# FIXME: insert proper C++ library support
4994266e564dSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
4995266e564dSmrg	;;
4996266e564dSmrg      cxx*)
4997266e564dSmrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
4998266e564dSmrg	_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'
4999266e564dSmrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
5000266e564dSmrg	  echo "-hidden">> $lib.exp~
5001266e564dSmrg	  $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~
5002266e564dSmrg	  $rm $lib.exp'
5003266e564dSmrg
5004266e564dSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
5005266e564dSmrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5006266e564dSmrg
5007266e564dSmrg	# Commands to make compiler produce verbose output that lists
5008266e564dSmrg	# what "hidden" libraries, object files and flags are used when
5009266e564dSmrg	# linking a shared library.
5010266e564dSmrg	#
5011266e564dSmrg	# There doesn't appear to be a way to prevent this compiler from
5012266e564dSmrg	# explicitly linking system object files so we need to strip them
5013266e564dSmrg	# from the output so that they don't get included in the library
5014266e564dSmrg	# dependencies.
5015266e564dSmrg	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'
5016266e564dSmrg	;;
5017266e564dSmrg      *)
5018266e564dSmrg	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
5019266e564dSmrg	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
5020266e564dSmrg	 _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'
5021266e564dSmrg
5022266e564dSmrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5023266e564dSmrg	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5024266e564dSmrg
5025266e564dSmrg	  # Commands to make compiler produce verbose output that lists
5026266e564dSmrg	  # what "hidden" libraries, object files and flags are used when
5027266e564dSmrg	  # linking a shared library.
5028266e564dSmrg	  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
5029266e564dSmrg
5030266e564dSmrg	else
5031266e564dSmrg	  # FIXME: insert proper C++ library support
5032266e564dSmrg	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
5033266e564dSmrg	fi
5034266e564dSmrg	;;
5035266e564dSmrg    esac
5036266e564dSmrg    ;;
5037266e564dSmrg  psos*)
5038266e564dSmrg    # FIXME: insert proper C++ library support
5039266e564dSmrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
5040266e564dSmrg    ;;
5041266e564dSmrg  sunos4*)
5042266e564dSmrg    case $cc_basename in
5043266e564dSmrg      CC*)
5044266e564dSmrg	# Sun C++ 4.x
5045266e564dSmrg	# FIXME: insert proper C++ library support
5046266e564dSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5047266e564dSmrg	;;
5048266e564dSmrg      lcc*)
5049266e564dSmrg	# Lucid
5050266e564dSmrg	# FIXME: insert proper C++ library support
5051266e564dSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5052266e564dSmrg	;;
5053266e564dSmrg      *)
5054266e564dSmrg	# FIXME: insert proper C++ library support
5055266e564dSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5056266e564dSmrg	;;
5057266e564dSmrg    esac
5058266e564dSmrg    ;;
5059266e564dSmrg  solaris*)
5060266e564dSmrg    case $cc_basename in
5061266e564dSmrg      CC*)
5062266e564dSmrg	# Sun C++ 4.2, 5.x and Centerline C++
5063266e564dSmrg        _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes
5064266e564dSmrg	_LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
5065266e564dSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
5066266e564dSmrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5067266e564dSmrg	$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'
5068266e564dSmrg
5069266e564dSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5070266e564dSmrg	_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5071266e564dSmrg	case $host_os in
5072266e564dSmrg	  solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
5073266e564dSmrg	  *)
5074266e564dSmrg	    # The C++ compiler is used as linker so we must use $wl
5075266e564dSmrg	    # flag to pass the commands to the underlying system
5076266e564dSmrg	    # linker. We must also pass each convience library through
5077266e564dSmrg	    # to the system linker between allextract/defaultextract.
5078266e564dSmrg	    # The C++ compiler will combine linker options so we
5079266e564dSmrg	    # cannot just pass the convience library names through
5080266e564dSmrg	    # without $wl.
5081266e564dSmrg	    # Supported since Solaris 2.6 (maybe 2.5.1?)
5082266e564dSmrg	    _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'
5083266e564dSmrg	    ;;
5084266e564dSmrg	esac
5085266e564dSmrg	_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
5086266e564dSmrg
5087266e564dSmrg	output_verbose_link_cmd='echo'
5088266e564dSmrg
5089266e564dSmrg	# Archives containing C++ object files must be created using
5090266e564dSmrg	# "CC -xar", where "CC" is the Sun C++ compiler.  This is
5091266e564dSmrg	# necessary to make sure instantiated templates are included
5092266e564dSmrg	# in the archive.
5093266e564dSmrg	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
5094266e564dSmrg	;;
5095266e564dSmrg      gcx*)
5096266e564dSmrg	# Green Hills C++ Compiler
5097266e564dSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
5098266e564dSmrg
5099266e564dSmrg	# The C++ compiler must be used to create the archive.
5100266e564dSmrg	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
5101266e564dSmrg	;;
5102266e564dSmrg      *)
5103266e564dSmrg	# GNU C++ compiler with Solaris linker
5104266e564dSmrg	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
5105266e564dSmrg	  _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
5106266e564dSmrg	  if $CC --version | grep -v '^2\.7' > /dev/null; then
5107266e564dSmrg	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
5108266e564dSmrg	    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5109266e564dSmrg		$CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
5110266e564dSmrg
5111266e564dSmrg	    # Commands to make compiler produce verbose output that lists
5112266e564dSmrg	    # what "hidden" libraries, object files and flags are used when
5113266e564dSmrg	    # linking a shared library.
5114266e564dSmrg	    output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
5115266e564dSmrg	  else
5116266e564dSmrg	    # g++ 2.7 appears to require `-G' NOT `-shared' on this
5117266e564dSmrg	    # platform.
5118266e564dSmrg	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
5119266e564dSmrg	    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5120266e564dSmrg		$CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
5121266e564dSmrg
5122266e564dSmrg	    # Commands to make compiler produce verbose output that lists
5123266e564dSmrg	    # what "hidden" libraries, object files and flags are used when
5124266e564dSmrg	    # linking a shared library.
5125266e564dSmrg	    output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
5126266e564dSmrg	  fi
5127266e564dSmrg
5128266e564dSmrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
5129266e564dSmrg	fi
5130266e564dSmrg	;;
5131266e564dSmrg    esac
5132266e564dSmrg    ;;
5133266e564dSmrg  sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
5134266e564dSmrg    _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
5135266e564dSmrg    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
5136266e564dSmrg    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5137266e564dSmrg    runpath_var='LD_RUN_PATH'
5138266e564dSmrg
5139266e564dSmrg    case $cc_basename in
5140266e564dSmrg      CC*)
5141266e564dSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5142266e564dSmrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5143266e564dSmrg	;;
5144266e564dSmrg      *)
5145266e564dSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5146266e564dSmrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5147266e564dSmrg	;;
5148266e564dSmrg    esac
5149266e564dSmrg    ;;
5150266e564dSmrg  sysv5* | sco3.2v5* | sco5v6*)
5151266e564dSmrg    # Note: We can NOT use -z defs as we might desire, because we do not
5152266e564dSmrg    # link with -lc, and that would cause any symbols used from libc to
5153266e564dSmrg    # always be unresolved, which means just about no library would
5154266e564dSmrg    # ever link correctly.  If we're not using GNU ld we use -z text
5155266e564dSmrg    # though, which does catch some bad symbols but isn't as heavy-handed
5156266e564dSmrg    # as -z defs.
5157266e564dSmrg    # For security reasons, it is highly recommended that you always
5158266e564dSmrg    # use absolute paths for naming shared libraries, and exclude the
5159266e564dSmrg    # DT_RUNPATH tag from executables and libraries.  But doing so
5160266e564dSmrg    # requires that you compile everything twice, which is a pain.
5161266e564dSmrg    # So that behaviour is only enabled if SCOABSPATH is set to a
5162266e564dSmrg    # non-empty value in the environment.  Most likely only useful for
5163266e564dSmrg    # creating official distributions of packages.
5164266e564dSmrg    # This is a hack until libtool officially supports absolute path
5165266e564dSmrg    # names for shared libraries.
5166266e564dSmrg    _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
5167266e564dSmrg    _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
5168266e564dSmrg    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
5169266e564dSmrg    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5170266e564dSmrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
5171266e564dSmrg    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
5172266e564dSmrg    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
5173266e564dSmrg    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
5174266e564dSmrg    runpath_var='LD_RUN_PATH'
5175266e564dSmrg
5176266e564dSmrg    case $cc_basename in
5177266e564dSmrg      CC*)
5178266e564dSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
5179266e564dSmrg	_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'
5180266e564dSmrg	;;
5181266e564dSmrg      *)
5182266e564dSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
5183266e564dSmrg	_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'
5184266e564dSmrg	;;
5185266e564dSmrg    esac
5186266e564dSmrg    ;;
5187266e564dSmrg  tandem*)
5188266e564dSmrg    case $cc_basename in
5189266e564dSmrg      NCC*)
5190266e564dSmrg	# NonStop-UX NCC 3.20
5191266e564dSmrg	# FIXME: insert proper C++ library support
5192266e564dSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5193266e564dSmrg	;;
5194266e564dSmrg      *)
5195266e564dSmrg	# FIXME: insert proper C++ library support
5196266e564dSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5197266e564dSmrg	;;
5198266e564dSmrg    esac
5199266e564dSmrg    ;;
5200266e564dSmrg  vxworks*)
5201266e564dSmrg    # FIXME: insert proper C++ library support
5202266e564dSmrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
5203266e564dSmrg    ;;
5204266e564dSmrg  *)
5205266e564dSmrg    # FIXME: insert proper C++ library support
5206266e564dSmrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
5207266e564dSmrg    ;;
5208266e564dSmrgesac
5209266e564dSmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
5210266e564dSmrgtest "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
5211266e564dSmrg
5212266e564dSmrg_LT_AC_TAGVAR(GCC, $1)="$GXX"
5213266e564dSmrg_LT_AC_TAGVAR(LD, $1)="$LD"
5214266e564dSmrg
5215266e564dSmrgAC_LIBTOOL_POSTDEP_PREDEP($1)
5216266e564dSmrgAC_LIBTOOL_PROG_COMPILER_PIC($1)
5217266e564dSmrgAC_LIBTOOL_PROG_CC_C_O($1)
5218266e564dSmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
5219266e564dSmrgAC_LIBTOOL_PROG_LD_SHLIBS($1)
5220266e564dSmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
5221266e564dSmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
5222266e564dSmrg
5223266e564dSmrgAC_LIBTOOL_CONFIG($1)
5224266e564dSmrg
5225266e564dSmrgAC_LANG_POP
5226266e564dSmrgCC=$lt_save_CC
5227266e564dSmrgLDCXX=$LD
5228266e564dSmrgLD=$lt_save_LD
5229266e564dSmrgGCC=$lt_save_GCC
5230266e564dSmrgwith_gnu_ldcxx=$with_gnu_ld
5231266e564dSmrgwith_gnu_ld=$lt_save_with_gnu_ld
5232266e564dSmrglt_cv_path_LDCXX=$lt_cv_path_LD
5233266e564dSmrglt_cv_path_LD=$lt_save_path_LD
5234266e564dSmrglt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
5235266e564dSmrglt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
5236266e564dSmrg])# AC_LIBTOOL_LANG_CXX_CONFIG
5237266e564dSmrg
5238266e564dSmrg# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
5239266e564dSmrg# ------------------------------------
5240266e564dSmrg# Figure out "hidden" library dependencies from verbose
5241266e564dSmrg# compiler output when linking a shared library.
5242266e564dSmrg# Parse the compiler output and extract the necessary
5243266e564dSmrg# objects, libraries and library flags.
5244266e564dSmrgAC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[
5245266e564dSmrgdnl we can't use the lt_simple_compile_test_code here,
5246266e564dSmrgdnl because it contains code intended for an executable,
5247266e564dSmrgdnl not a library.  It's possible we should let each
5248266e564dSmrgdnl tag define a new lt_????_link_test_code variable,
5249266e564dSmrgdnl but it's only used here...
5250266e564dSmrgifelse([$1],[],[cat > conftest.$ac_ext <<EOF
5251266e564dSmrgint a;
5252266e564dSmrgvoid foo (void) { a = 0; }
5253266e564dSmrgEOF
5254266e564dSmrg],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
5255266e564dSmrgclass Foo
5256266e564dSmrg{
5257266e564dSmrgpublic:
5258266e564dSmrg  Foo (void) { a = 0; }
5259266e564dSmrgprivate:
5260266e564dSmrg  int a;
5261266e564dSmrg};
5262266e564dSmrgEOF
5263266e564dSmrg],[$1],[F77],[cat > conftest.$ac_ext <<EOF
5264266e564dSmrg      subroutine foo
5265266e564dSmrg      implicit none
5266266e564dSmrg      integer*4 a
5267266e564dSmrg      a=0
5268266e564dSmrg      return
5269266e564dSmrg      end
5270266e564dSmrgEOF
5271266e564dSmrg],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
5272266e564dSmrgpublic class foo {
5273266e564dSmrg  private int a;
5274266e564dSmrg  public void bar (void) {
5275266e564dSmrg    a = 0;
5276266e564dSmrg  }
5277266e564dSmrg};
5278266e564dSmrgEOF
5279266e564dSmrg])
5280266e564dSmrgdnl Parse the compiler output and extract the necessary
5281266e564dSmrgdnl objects, libraries and library flags.
5282266e564dSmrgif AC_TRY_EVAL(ac_compile); then
5283266e564dSmrg  # Parse the compiler output and extract the necessary
5284266e564dSmrg  # objects, libraries and library flags.
5285266e564dSmrg
5286266e564dSmrg  # Sentinel used to keep track of whether or not we are before
5287266e564dSmrg  # the conftest object file.
5288266e564dSmrg  pre_test_object_deps_done=no
5289266e564dSmrg
5290266e564dSmrg  # The `*' in the case matches for architectures that use `case' in
5291266e564dSmrg  # $output_verbose_cmd can trigger glob expansion during the loop
5292266e564dSmrg  # eval without this substitution.
5293266e564dSmrg  output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"`
5294266e564dSmrg
5295266e564dSmrg  for p in `eval $output_verbose_link_cmd`; do
5296266e564dSmrg    case $p in
5297266e564dSmrg
5298266e564dSmrg    -L* | -R* | -l*)
5299266e564dSmrg       # Some compilers place space between "-{L,R}" and the path.
5300266e564dSmrg       # Remove the space.
5301266e564dSmrg       if test $p = "-L" \
5302266e564dSmrg	  || test $p = "-R"; then
5303266e564dSmrg	 prev=$p
5304266e564dSmrg	 continue
5305266e564dSmrg       else
5306266e564dSmrg	 prev=
5307266e564dSmrg       fi
5308266e564dSmrg
5309266e564dSmrg       if test "$pre_test_object_deps_done" = no; then
5310266e564dSmrg	 case $p in
5311266e564dSmrg	 -L* | -R*)
5312266e564dSmrg	   # Internal compiler library paths should come after those
5313266e564dSmrg	   # provided the user.  The postdeps already come after the
5314266e564dSmrg	   # user supplied libs so there is no need to process them.
5315266e564dSmrg	   if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
5316266e564dSmrg	     _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
5317266e564dSmrg	   else
5318266e564dSmrg	     _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
5319266e564dSmrg	   fi
5320266e564dSmrg	   ;;
5321266e564dSmrg	 # The "-l" case would never come before the object being
5322266e564dSmrg	 # linked, so don't bother handling this case.
5323266e564dSmrg	 esac
5324266e564dSmrg       else
5325266e564dSmrg	 if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
5326266e564dSmrg	   _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
5327266e564dSmrg	 else
5328266e564dSmrg	   _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
5329266e564dSmrg	 fi
5330266e564dSmrg       fi
5331266e564dSmrg       ;;
5332266e564dSmrg
5333266e564dSmrg    *.$objext)
5334266e564dSmrg       # This assumes that the test object file only shows up
5335266e564dSmrg       # once in the compiler output.
5336266e564dSmrg       if test "$p" = "conftest.$objext"; then
5337266e564dSmrg	 pre_test_object_deps_done=yes
5338266e564dSmrg	 continue
5339266e564dSmrg       fi
5340266e564dSmrg
5341266e564dSmrg       if test "$pre_test_object_deps_done" = no; then
5342266e564dSmrg	 if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
5343266e564dSmrg	   _LT_AC_TAGVAR(predep_objects, $1)="$p"
5344266e564dSmrg	 else
5345266e564dSmrg	   _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
5346266e564dSmrg	 fi
5347266e564dSmrg       else
5348266e564dSmrg	 if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
5349266e564dSmrg	   _LT_AC_TAGVAR(postdep_objects, $1)="$p"
5350266e564dSmrg	 else
5351266e564dSmrg	   _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
5352266e564dSmrg	 fi
5353266e564dSmrg       fi
5354266e564dSmrg       ;;
5355266e564dSmrg
5356266e564dSmrg    *) ;; # Ignore the rest.
5357266e564dSmrg
5358266e564dSmrg    esac
5359266e564dSmrg  done
5360266e564dSmrg
5361266e564dSmrg  # Clean up.
5362266e564dSmrg  rm -f a.out a.exe
5363266e564dSmrgelse
5364266e564dSmrg  echo "libtool.m4: error: problem compiling $1 test program"
5365266e564dSmrgfi
5366266e564dSmrg
5367266e564dSmrg$rm -f confest.$objext
5368266e564dSmrg
5369266e564dSmrg# PORTME: override above test on systems where it is broken
5370266e564dSmrgifelse([$1],[CXX],
5371266e564dSmrg[case $host_os in
5372266e564dSmrginterix3*)
5373266e564dSmrg  # Interix 3.5 installs completely hosed .la files for C++, so rather than
5374266e564dSmrg  # hack all around it, let's just trust "g++" to DTRT.
5375266e564dSmrg  _LT_AC_TAGVAR(predep_objects,$1)=
5376266e564dSmrg  _LT_AC_TAGVAR(postdep_objects,$1)=
5377266e564dSmrg  _LT_AC_TAGVAR(postdeps,$1)=
5378266e564dSmrg  ;;
5379266e564dSmrg
5380266e564dSmrgsolaris*)
5381266e564dSmrg  case $cc_basename in
5382266e564dSmrg  CC*)
5383266e564dSmrg    # Adding this requires a known-good setup of shared libraries for
5384266e564dSmrg    # Sun compiler versions before 5.6, else PIC objects from an old
5385266e564dSmrg    # archive will be linked into the output, leading to subtle bugs.
5386266e564dSmrg    _LT_AC_TAGVAR(postdeps,$1)='-lCstd -lCrun'
5387266e564dSmrg    ;;
5388266e564dSmrg  esac
5389266e564dSmrg  ;;
5390266e564dSmrgesac
5391266e564dSmrg])
5392266e564dSmrg
5393266e564dSmrgcase " $_LT_AC_TAGVAR(postdeps, $1) " in
5394266e564dSmrg*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
5395266e564dSmrgesac
5396266e564dSmrg])# AC_LIBTOOL_POSTDEP_PREDEP
5397266e564dSmrg
5398266e564dSmrg# AC_LIBTOOL_LANG_F77_CONFIG
5399266e564dSmrg# --------------------------
5400266e564dSmrg# Ensure that the configuration vars for the C compiler are
5401266e564dSmrg# suitably defined.  Those variables are subsequently used by
5402266e564dSmrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
5403266e564dSmrgAC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
5404266e564dSmrgAC_DEFUN([_LT_AC_LANG_F77_CONFIG],
5405266e564dSmrg[AC_REQUIRE([AC_PROG_F77])
5406266e564dSmrgAC_LANG_PUSH(Fortran 77)
5407266e564dSmrg
5408266e564dSmrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
5409266e564dSmrg_LT_AC_TAGVAR(allow_undefined_flag, $1)=
5410266e564dSmrg_LT_AC_TAGVAR(always_export_symbols, $1)=no
5411266e564dSmrg_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
5412266e564dSmrg_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
5413266e564dSmrg_LT_AC_TAGVAR(hardcode_direct, $1)=no
5414266e564dSmrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
5415266e564dSmrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
5416266e564dSmrg_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
5417266e564dSmrg_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
5418266e564dSmrg_LT_AC_TAGVAR(hardcode_automatic, $1)=no
5419266e564dSmrg_LT_AC_TAGVAR(module_cmds, $1)=
5420266e564dSmrg_LT_AC_TAGVAR(module_expsym_cmds, $1)=
5421266e564dSmrg_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
5422266e564dSmrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
5423266e564dSmrg_LT_AC_TAGVAR(no_undefined_flag, $1)=
5424266e564dSmrg_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5425266e564dSmrg_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5426266e564dSmrg
5427266e564dSmrg# Source file extension for f77 test sources.
5428266e564dSmrgac_ext=f
5429266e564dSmrg
5430266e564dSmrg# Object file extension for compiled f77 test sources.
5431266e564dSmrgobjext=o
5432266e564dSmrg_LT_AC_TAGVAR(objext, $1)=$objext
5433266e564dSmrg
5434266e564dSmrg# Code to be used in simple compile tests
5435266e564dSmrglt_simple_compile_test_code="      subroutine t\n      return\n      end\n"
5436266e564dSmrg
5437266e564dSmrg# Code to be used in simple link tests
5438266e564dSmrglt_simple_link_test_code="      program t\n      end\n"
5439266e564dSmrg
5440266e564dSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
5441266e564dSmrg_LT_AC_SYS_COMPILER
5442266e564dSmrg
5443266e564dSmrg# save warnings/boilerplate of simple test code
5444266e564dSmrg_LT_COMPILER_BOILERPLATE
5445266e564dSmrg_LT_LINKER_BOILERPLATE
5446266e564dSmrg
5447266e564dSmrg# Allow CC to be a program name with arguments.
5448266e564dSmrglt_save_CC="$CC"
5449266e564dSmrgCC=${F77-"f77"}
5450266e564dSmrgcompiler=$CC
5451266e564dSmrg_LT_AC_TAGVAR(compiler, $1)=$CC
5452266e564dSmrg_LT_CC_BASENAME([$compiler])
5453266e564dSmrg
5454266e564dSmrgAC_MSG_CHECKING([if libtool supports shared libraries])
5455266e564dSmrgAC_MSG_RESULT([$can_build_shared])
5456266e564dSmrg
5457266e564dSmrgAC_MSG_CHECKING([whether to build shared libraries])
5458266e564dSmrgtest "$can_build_shared" = "no" && enable_shared=no
5459266e564dSmrg
5460266e564dSmrg# On AIX, shared libraries and static libraries use the same namespace, and
5461266e564dSmrg# are all built from PIC.
5462266e564dSmrgcase $host_os in
5463266e564dSmrgaix3*)
5464266e564dSmrg  test "$enable_shared" = yes && enable_static=no
5465266e564dSmrg  if test -n "$RANLIB"; then
5466266e564dSmrg    archive_cmds="$archive_cmds~\$RANLIB \$lib"
5467266e564dSmrg    postinstall_cmds='$RANLIB $lib'
5468266e564dSmrg  fi
5469266e564dSmrg  ;;
5470266e564dSmrgaix4* | aix5*)
5471266e564dSmrg  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
5472266e564dSmrg    test "$enable_shared" = yes && enable_static=no
5473266e564dSmrg  fi
5474266e564dSmrg  ;;
5475266e564dSmrgesac
5476266e564dSmrgAC_MSG_RESULT([$enable_shared])
5477266e564dSmrg
5478266e564dSmrgAC_MSG_CHECKING([whether to build static libraries])
5479266e564dSmrg# Make sure either enable_shared or enable_static is yes.
5480266e564dSmrgtest "$enable_shared" = yes || enable_static=yes
5481266e564dSmrgAC_MSG_RESULT([$enable_static])
5482266e564dSmrg
5483266e564dSmrg_LT_AC_TAGVAR(GCC, $1)="$G77"
5484266e564dSmrg_LT_AC_TAGVAR(LD, $1)="$LD"
5485266e564dSmrg
5486266e564dSmrgAC_LIBTOOL_PROG_COMPILER_PIC($1)
5487266e564dSmrgAC_LIBTOOL_PROG_CC_C_O($1)
5488266e564dSmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
5489266e564dSmrgAC_LIBTOOL_PROG_LD_SHLIBS($1)
5490266e564dSmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
5491266e564dSmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
5492266e564dSmrg
5493266e564dSmrgAC_LIBTOOL_CONFIG($1)
5494266e564dSmrg
5495266e564dSmrgAC_LANG_POP
5496266e564dSmrgCC="$lt_save_CC"
5497266e564dSmrg])# AC_LIBTOOL_LANG_F77_CONFIG
5498266e564dSmrg
5499266e564dSmrg
5500266e564dSmrg# AC_LIBTOOL_LANG_GCJ_CONFIG
5501266e564dSmrg# --------------------------
5502266e564dSmrg# Ensure that the configuration vars for the C compiler are
5503266e564dSmrg# suitably defined.  Those variables are subsequently used by
5504266e564dSmrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
5505266e564dSmrgAC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
5506266e564dSmrgAC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
5507266e564dSmrg[AC_LANG_SAVE
5508266e564dSmrg
5509266e564dSmrg# Source file extension for Java test sources.
5510266e564dSmrgac_ext=java
5511266e564dSmrg
5512266e564dSmrg# Object file extension for compiled Java test sources.
5513266e564dSmrgobjext=o
5514266e564dSmrg_LT_AC_TAGVAR(objext, $1)=$objext
5515266e564dSmrg
5516266e564dSmrg# Code to be used in simple compile tests
5517266e564dSmrglt_simple_compile_test_code="class foo {}\n"
5518266e564dSmrg
5519266e564dSmrg# Code to be used in simple link tests
5520266e564dSmrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }\n'
5521266e564dSmrg
5522266e564dSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
5523266e564dSmrg_LT_AC_SYS_COMPILER
5524266e564dSmrg
5525266e564dSmrg# save warnings/boilerplate of simple test code
5526266e564dSmrg_LT_COMPILER_BOILERPLATE
5527266e564dSmrg_LT_LINKER_BOILERPLATE
5528266e564dSmrg
5529266e564dSmrg# Allow CC to be a program name with arguments.
5530266e564dSmrglt_save_CC="$CC"
5531266e564dSmrgCC=${GCJ-"gcj"}
5532266e564dSmrgcompiler=$CC
5533266e564dSmrg_LT_AC_TAGVAR(compiler, $1)=$CC
5534266e564dSmrg_LT_CC_BASENAME([$compiler])
5535266e564dSmrg
5536266e564dSmrg# GCJ did not exist at the time GCC didn't implicitly link libc in.
5537266e564dSmrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
5538266e564dSmrg
5539266e564dSmrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
5540266e564dSmrg
5541266e564dSmrgAC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
5542266e564dSmrgAC_LIBTOOL_PROG_COMPILER_PIC($1)
5543266e564dSmrgAC_LIBTOOL_PROG_CC_C_O($1)
5544266e564dSmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
5545266e564dSmrgAC_LIBTOOL_PROG_LD_SHLIBS($1)
5546266e564dSmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
5547266e564dSmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
5548266e564dSmrg
5549266e564dSmrgAC_LIBTOOL_CONFIG($1)
5550266e564dSmrg
5551266e564dSmrgAC_LANG_RESTORE
5552266e564dSmrgCC="$lt_save_CC"
5553266e564dSmrg])# AC_LIBTOOL_LANG_GCJ_CONFIG
5554266e564dSmrg
5555266e564dSmrg
5556266e564dSmrg# AC_LIBTOOL_LANG_RC_CONFIG
5557266e564dSmrg# -------------------------
5558266e564dSmrg# Ensure that the configuration vars for the Windows resource compiler are
5559266e564dSmrg# suitably defined.  Those variables are subsequently used by
5560266e564dSmrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
5561266e564dSmrgAC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
5562266e564dSmrgAC_DEFUN([_LT_AC_LANG_RC_CONFIG],
5563266e564dSmrg[AC_LANG_SAVE
5564266e564dSmrg
5565266e564dSmrg# Source file extension for RC test sources.
5566266e564dSmrgac_ext=rc
5567266e564dSmrg
5568266e564dSmrg# Object file extension for compiled RC test sources.
5569266e564dSmrgobjext=o
5570266e564dSmrg_LT_AC_TAGVAR(objext, $1)=$objext
5571266e564dSmrg
5572266e564dSmrg# Code to be used in simple compile tests
5573266e564dSmrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
5574266e564dSmrg
5575266e564dSmrg# Code to be used in simple link tests
5576266e564dSmrglt_simple_link_test_code="$lt_simple_compile_test_code"
5577266e564dSmrg
5578266e564dSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
5579266e564dSmrg_LT_AC_SYS_COMPILER
5580266e564dSmrg
5581266e564dSmrg# save warnings/boilerplate of simple test code
5582266e564dSmrg_LT_COMPILER_BOILERPLATE
5583266e564dSmrg_LT_LINKER_BOILERPLATE
5584266e564dSmrg
5585266e564dSmrg# Allow CC to be a program name with arguments.
5586266e564dSmrglt_save_CC="$CC"
5587266e564dSmrgCC=${RC-"windres"}
5588266e564dSmrgcompiler=$CC
5589266e564dSmrg_LT_AC_TAGVAR(compiler, $1)=$CC
5590266e564dSmrg_LT_CC_BASENAME([$compiler])
5591266e564dSmrg_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
5592266e564dSmrg
5593266e564dSmrgAC_LIBTOOL_CONFIG($1)
5594266e564dSmrg
5595266e564dSmrgAC_LANG_RESTORE
5596266e564dSmrgCC="$lt_save_CC"
5597266e564dSmrg])# AC_LIBTOOL_LANG_RC_CONFIG
5598266e564dSmrg
5599266e564dSmrg
5600266e564dSmrg# AC_LIBTOOL_CONFIG([TAGNAME])
5601266e564dSmrg# ----------------------------
5602266e564dSmrg# If TAGNAME is not passed, then create an initial libtool script
5603266e564dSmrg# with a default configuration from the untagged config vars.  Otherwise
5604266e564dSmrg# add code to config.status for appending the configuration named by
5605266e564dSmrg# TAGNAME from the matching tagged config vars.
5606266e564dSmrgAC_DEFUN([AC_LIBTOOL_CONFIG],
5607266e564dSmrg[# The else clause should only fire when bootstrapping the
5608266e564dSmrg# libtool distribution, otherwise you forgot to ship ltmain.sh
5609266e564dSmrg# with your package, and you will get complaints that there are
5610266e564dSmrg# no rules to generate ltmain.sh.
5611266e564dSmrgif test -f "$ltmain"; then
5612266e564dSmrg  # See if we are running on zsh, and set the options which allow our commands through
5613266e564dSmrg  # without removal of \ escapes.
5614266e564dSmrg  if test -n "${ZSH_VERSION+set}" ; then
5615266e564dSmrg    setopt NO_GLOB_SUBST
5616266e564dSmrg  fi
5617266e564dSmrg  # Now quote all the things that may contain metacharacters while being
5618266e564dSmrg  # careful not to overquote the AC_SUBSTed values.  We take copies of the
5619266e564dSmrg  # variables and quote the copies for generation of the libtool script.
5620266e564dSmrg  for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
5621266e564dSmrg    SED SHELL STRIP \
5622266e564dSmrg    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
5623266e564dSmrg    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
5624266e564dSmrg    deplibs_check_method reload_flag reload_cmds need_locks \
5625266e564dSmrg    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
5626266e564dSmrg    lt_cv_sys_global_symbol_to_c_name_address \
5627266e564dSmrg    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
5628266e564dSmrg    old_postinstall_cmds old_postuninstall_cmds \
5629266e564dSmrg    _LT_AC_TAGVAR(compiler, $1) \
5630266e564dSmrg    _LT_AC_TAGVAR(CC, $1) \
5631266e564dSmrg    _LT_AC_TAGVAR(LD, $1) \
5632266e564dSmrg    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
5633266e564dSmrg    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
5634266e564dSmrg    _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
5635266e564dSmrg    _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
5636266e564dSmrg    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
5637266e564dSmrg    _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
5638266e564dSmrg    _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
5639266e564dSmrg    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
5640266e564dSmrg    _LT_AC_TAGVAR(old_archive_cmds, $1) \
5641266e564dSmrg    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
5642266e564dSmrg    _LT_AC_TAGVAR(predep_objects, $1) \
5643266e564dSmrg    _LT_AC_TAGVAR(postdep_objects, $1) \
5644266e564dSmrg    _LT_AC_TAGVAR(predeps, $1) \
5645266e564dSmrg    _LT_AC_TAGVAR(postdeps, $1) \
5646266e564dSmrg    _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
5647266e564dSmrg    _LT_AC_TAGVAR(archive_cmds, $1) \
5648266e564dSmrg    _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
5649266e564dSmrg    _LT_AC_TAGVAR(postinstall_cmds, $1) \
5650266e564dSmrg    _LT_AC_TAGVAR(postuninstall_cmds, $1) \
5651266e564dSmrg    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
5652266e564dSmrg    _LT_AC_TAGVAR(allow_undefined_flag, $1) \
5653266e564dSmrg    _LT_AC_TAGVAR(no_undefined_flag, $1) \
5654266e564dSmrg    _LT_AC_TAGVAR(export_symbols_cmds, $1) \
5655266e564dSmrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
5656266e564dSmrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
5657266e564dSmrg    _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
5658266e564dSmrg    _LT_AC_TAGVAR(hardcode_automatic, $1) \
5659266e564dSmrg    _LT_AC_TAGVAR(module_cmds, $1) \
5660266e564dSmrg    _LT_AC_TAGVAR(module_expsym_cmds, $1) \
5661266e564dSmrg    _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
5662266e564dSmrg    _LT_AC_TAGVAR(exclude_expsyms, $1) \
5663266e564dSmrg    _LT_AC_TAGVAR(include_expsyms, $1); do
5664266e564dSmrg
5665266e564dSmrg    case $var in
5666266e564dSmrg    _LT_AC_TAGVAR(old_archive_cmds, $1) | \
5667266e564dSmrg    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
5668266e564dSmrg    _LT_AC_TAGVAR(archive_cmds, $1) | \
5669266e564dSmrg    _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
5670266e564dSmrg    _LT_AC_TAGVAR(module_cmds, $1) | \
5671266e564dSmrg    _LT_AC_TAGVAR(module_expsym_cmds, $1) | \
5672266e564dSmrg    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
5673266e564dSmrg    _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
5674266e564dSmrg    extract_expsyms_cmds | reload_cmds | finish_cmds | \
5675266e564dSmrg    postinstall_cmds | postuninstall_cmds | \
5676266e564dSmrg    old_postinstall_cmds | old_postuninstall_cmds | \
5677266e564dSmrg    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
5678266e564dSmrg      # Double-quote double-evaled strings.
5679266e564dSmrg      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
5680266e564dSmrg      ;;
5681266e564dSmrg    *)
5682266e564dSmrg      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
5683266e564dSmrg      ;;
5684266e564dSmrg    esac
5685266e564dSmrg  done
5686266e564dSmrg
5687266e564dSmrg  case $lt_echo in
5688266e564dSmrg  *'\[$]0 --fallback-echo"')
5689266e564dSmrg    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
5690266e564dSmrg    ;;
5691266e564dSmrg  esac
5692266e564dSmrg
5693266e564dSmrgifelse([$1], [],
5694266e564dSmrg  [cfgfile="${ofile}T"
5695266e564dSmrg  trap "$rm \"$cfgfile\"; exit 1" 1 2 15
5696266e564dSmrg  $rm -f "$cfgfile"
5697266e564dSmrg  AC_MSG_NOTICE([creating $ofile])],
5698266e564dSmrg  [cfgfile="$ofile"])
5699266e564dSmrg
5700266e564dSmrg  cat <<__EOF__ >> "$cfgfile"
5701266e564dSmrgifelse([$1], [],
5702266e564dSmrg[#! $SHELL
5703266e564dSmrg
5704266e564dSmrg# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
5705266e564dSmrg# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
5706266e564dSmrg# NOTE: Changes made to this file will be lost: look at ltmain.sh.
5707266e564dSmrg#
5708266e564dSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
5709266e564dSmrg# Free Software Foundation, Inc.
5710266e564dSmrg#
5711266e564dSmrg# This file is part of GNU Libtool:
5712266e564dSmrg# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
5713266e564dSmrg#
5714266e564dSmrg# This program is free software; you can redistribute it and/or modify
5715266e564dSmrg# it under the terms of the GNU General Public License as published by
5716266e564dSmrg# the Free Software Foundation; either version 2 of the License, or
5717266e564dSmrg# (at your option) any later version.
5718266e564dSmrg#
5719266e564dSmrg# This program is distributed in the hope that it will be useful, but
5720266e564dSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of
5721266e564dSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
5722266e564dSmrg# General Public License for more details.
5723266e564dSmrg#
5724266e564dSmrg# You should have received a copy of the GNU General Public License
5725266e564dSmrg# along with this program; if not, write to the Free Software
5726266e564dSmrg# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
5727266e564dSmrg#
5728266e564dSmrg# As a special exception to the GNU General Public License, if you
5729266e564dSmrg# distribute this file as part of a program that contains a
5730266e564dSmrg# configuration script generated by Autoconf, you may include it under
5731266e564dSmrg# the same distribution terms that you use for the rest of that program.
5732266e564dSmrg
5733266e564dSmrg# A sed program that does not truncate output.
5734266e564dSmrgSED=$lt_SED
5735266e564dSmrg
5736266e564dSmrg# Sed that helps us avoid accidentally triggering echo(1) options like -n.
5737266e564dSmrgXsed="$SED -e 1s/^X//"
5738266e564dSmrg
5739266e564dSmrg# The HP-UX ksh and POSIX shell print the target directory to stdout
5740266e564dSmrg# if CDPATH is set.
5741266e564dSmrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
5742266e564dSmrg
5743266e564dSmrg# The names of the tagged configurations supported by this script.
5744266e564dSmrgavailable_tags=
5745266e564dSmrg
5746266e564dSmrg# ### BEGIN LIBTOOL CONFIG],
5747266e564dSmrg[# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
5748266e564dSmrg
5749266e564dSmrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
5750266e564dSmrg
5751266e564dSmrg# Shell to use when invoking shell scripts.
5752266e564dSmrgSHELL=$lt_SHELL
5753266e564dSmrg
5754266e564dSmrg# Whether or not to build shared libraries.
5755266e564dSmrgbuild_libtool_libs=$enable_shared
5756266e564dSmrg
5757266e564dSmrg# Whether or not to build static libraries.
5758266e564dSmrgbuild_old_libs=$enable_static
5759266e564dSmrg
5760266e564dSmrg# Whether or not to add -lc for building shared libraries.
5761266e564dSmrgbuild_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
5762266e564dSmrg
5763266e564dSmrg# Whether or not to disallow shared libs when runtime libs are static
5764266e564dSmrgallow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
5765266e564dSmrg
5766266e564dSmrg# Whether or not to optimize for fast installation.
5767266e564dSmrgfast_install=$enable_fast_install
5768266e564dSmrg
5769266e564dSmrg# The host system.
5770266e564dSmrghost_alias=$host_alias
5771266e564dSmrghost=$host
5772266e564dSmrghost_os=$host_os
5773266e564dSmrg
5774266e564dSmrg# The build system.
5775266e564dSmrgbuild_alias=$build_alias
5776266e564dSmrgbuild=$build
5777266e564dSmrgbuild_os=$build_os
5778266e564dSmrg
5779266e564dSmrg# An echo program that does not interpret backslashes.
5780266e564dSmrgecho=$lt_echo
5781266e564dSmrg
5782266e564dSmrg# The archiver.
5783266e564dSmrgAR=$lt_AR
5784266e564dSmrgAR_FLAGS=$lt_AR_FLAGS
5785266e564dSmrg
5786266e564dSmrg# A C compiler.
5787266e564dSmrgLTCC=$lt_LTCC
5788266e564dSmrg
5789266e564dSmrg# LTCC compiler flags.
5790266e564dSmrgLTCFLAGS=$lt_LTCFLAGS
5791266e564dSmrg
5792266e564dSmrg# A language-specific compiler.
5793266e564dSmrgCC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
5794266e564dSmrg
5795266e564dSmrg# Is the compiler the GNU C compiler?
5796266e564dSmrgwith_gcc=$_LT_AC_TAGVAR(GCC, $1)
5797266e564dSmrg
5798266e564dSmrg# An ERE matcher.
5799266e564dSmrgEGREP=$lt_EGREP
5800266e564dSmrg
5801266e564dSmrg# The linker used to build libraries.
5802266e564dSmrgLD=$lt_[]_LT_AC_TAGVAR(LD, $1)
5803266e564dSmrg
5804266e564dSmrg# Whether we need hard or soft links.
5805266e564dSmrgLN_S=$lt_LN_S
5806266e564dSmrg
5807266e564dSmrg# A BSD-compatible nm program.
5808266e564dSmrgNM=$lt_NM
5809266e564dSmrg
5810266e564dSmrg# A symbol stripping program
5811266e564dSmrgSTRIP=$lt_STRIP
5812266e564dSmrg
5813266e564dSmrg# Used to examine libraries when file_magic_cmd begins "file"
5814266e564dSmrgMAGIC_CMD=$MAGIC_CMD
5815266e564dSmrg
5816266e564dSmrg# Used on cygwin: DLL creation program.
5817266e564dSmrgDLLTOOL="$DLLTOOL"
5818266e564dSmrg
5819266e564dSmrg# Used on cygwin: object dumper.
5820266e564dSmrgOBJDUMP="$OBJDUMP"
5821266e564dSmrg
5822266e564dSmrg# Used on cygwin: assembler.
5823266e564dSmrgAS="$AS"
5824266e564dSmrg
5825266e564dSmrg# The name of the directory that contains temporary libtool files.
5826266e564dSmrgobjdir=$objdir
5827266e564dSmrg
5828266e564dSmrg# How to create reloadable object files.
5829266e564dSmrgreload_flag=$lt_reload_flag
5830266e564dSmrgreload_cmds=$lt_reload_cmds
5831266e564dSmrg
5832266e564dSmrg# How to pass a linker flag through the compiler.
5833266e564dSmrgwl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
5834266e564dSmrg
5835266e564dSmrg# Object file suffix (normally "o").
5836266e564dSmrgobjext="$ac_objext"
5837266e564dSmrg
5838266e564dSmrg# Old archive suffix (normally "a").
5839266e564dSmrglibext="$libext"
5840266e564dSmrg
5841266e564dSmrg# Shared library suffix (normally ".so").
5842266e564dSmrgshrext_cmds='$shrext_cmds'
5843266e564dSmrg
5844266e564dSmrg# Executable file suffix (normally "").
5845266e564dSmrgexeext="$exeext"
5846266e564dSmrg
5847266e564dSmrg# Additional compiler flags for building library objects.
5848266e564dSmrgpic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
5849266e564dSmrgpic_mode=$pic_mode
5850266e564dSmrg
5851266e564dSmrg# What is the maximum length of a command?
5852266e564dSmrgmax_cmd_len=$lt_cv_sys_max_cmd_len
5853266e564dSmrg
5854266e564dSmrg# Does compiler simultaneously support -c and -o options?
5855266e564dSmrgcompiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
5856266e564dSmrg
5857266e564dSmrg# Must we lock files when doing compilation?
5858266e564dSmrgneed_locks=$lt_need_locks
5859266e564dSmrg
5860266e564dSmrg# Do we need the lib prefix for modules?
5861266e564dSmrgneed_lib_prefix=$need_lib_prefix
5862266e564dSmrg
5863266e564dSmrg# Do we need a version for libraries?
5864266e564dSmrgneed_version=$need_version
5865266e564dSmrg
5866266e564dSmrg# Whether dlopen is supported.
5867266e564dSmrgdlopen_support=$enable_dlopen
5868266e564dSmrg
5869266e564dSmrg# Whether dlopen of programs is supported.
5870266e564dSmrgdlopen_self=$enable_dlopen_self
5871266e564dSmrg
5872266e564dSmrg# Whether dlopen of statically linked programs is supported.
5873266e564dSmrgdlopen_self_static=$enable_dlopen_self_static
5874266e564dSmrg
5875266e564dSmrg# Compiler flag to prevent dynamic linking.
5876266e564dSmrglink_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
5877266e564dSmrg
5878266e564dSmrg# Compiler flag to turn off builtin functions.
5879266e564dSmrgno_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
5880266e564dSmrg
5881266e564dSmrg# Compiler flag to allow reflexive dlopens.
5882266e564dSmrgexport_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
5883266e564dSmrg
5884266e564dSmrg# Compiler flag to generate shared objects directly from archives.
5885266e564dSmrgwhole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
5886266e564dSmrg
5887266e564dSmrg# Compiler flag to generate thread-safe objects.
5888266e564dSmrgthread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
5889266e564dSmrg
5890266e564dSmrg# Library versioning type.
5891266e564dSmrgversion_type=$version_type
5892266e564dSmrg
5893266e564dSmrg# Format of library name prefix.
5894266e564dSmrglibname_spec=$lt_libname_spec
5895266e564dSmrg
5896266e564dSmrg# List of archive names.  First name is the real one, the rest are links.
5897266e564dSmrg# The last name is the one that the linker finds with -lNAME.
5898266e564dSmrglibrary_names_spec=$lt_library_names_spec
5899266e564dSmrg
5900266e564dSmrg# The coded name of the library, if different from the real name.
5901266e564dSmrgsoname_spec=$lt_soname_spec
5902266e564dSmrg
5903266e564dSmrg# Commands used to build and install an old-style archive.
5904266e564dSmrgRANLIB=$lt_RANLIB
5905266e564dSmrgold_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
5906266e564dSmrgold_postinstall_cmds=$lt_old_postinstall_cmds
5907266e564dSmrgold_postuninstall_cmds=$lt_old_postuninstall_cmds
5908266e564dSmrg
5909266e564dSmrg# Create an old-style archive from a shared archive.
5910266e564dSmrgold_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
5911266e564dSmrg
5912266e564dSmrg# Create a temporary old-style archive to link instead of a shared archive.
5913266e564dSmrgold_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
5914266e564dSmrg
5915266e564dSmrg# Commands used to build and install a shared archive.
5916266e564dSmrgarchive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
5917266e564dSmrgarchive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
5918266e564dSmrgpostinstall_cmds=$lt_postinstall_cmds
5919266e564dSmrgpostuninstall_cmds=$lt_postuninstall_cmds
5920266e564dSmrg
5921266e564dSmrg# Commands used to build a loadable module (assumed same as above if empty)
5922266e564dSmrgmodule_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
5923266e564dSmrgmodule_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
5924266e564dSmrg
5925266e564dSmrg# Commands to strip libraries.
5926266e564dSmrgold_striplib=$lt_old_striplib
5927266e564dSmrgstriplib=$lt_striplib
5928266e564dSmrg
5929266e564dSmrg# Dependencies to place before the objects being linked to create a
5930266e564dSmrg# shared library.
5931266e564dSmrgpredep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
5932266e564dSmrg
5933266e564dSmrg# Dependencies to place after the objects being linked to create a
5934266e564dSmrg# shared library.
5935266e564dSmrgpostdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
5936266e564dSmrg
5937266e564dSmrg# Dependencies to place before the objects being linked to create a
5938266e564dSmrg# shared library.
5939266e564dSmrgpredeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
5940266e564dSmrg
5941266e564dSmrg# Dependencies to place after the objects being linked to create a
5942266e564dSmrg# shared library.
5943266e564dSmrgpostdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
5944266e564dSmrg
5945266e564dSmrg# The library search path used internally by the compiler when linking
5946266e564dSmrg# a shared library.
5947266e564dSmrgcompiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
5948266e564dSmrg
5949266e564dSmrg# Method to check whether dependent libraries are shared objects.
5950266e564dSmrgdeplibs_check_method=$lt_deplibs_check_method
5951266e564dSmrg
5952266e564dSmrg# Command to use when deplibs_check_method == file_magic.
5953266e564dSmrgfile_magic_cmd=$lt_file_magic_cmd
5954266e564dSmrg
5955266e564dSmrg# Flag that allows shared libraries with undefined symbols to be built.
5956266e564dSmrgallow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
5957266e564dSmrg
5958266e564dSmrg# Flag that forces no undefined symbols.
5959266e564dSmrgno_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
5960266e564dSmrg
5961266e564dSmrg# Commands used to finish a libtool library installation in a directory.
5962266e564dSmrgfinish_cmds=$lt_finish_cmds
5963266e564dSmrg
5964266e564dSmrg# Same as above, but a single script fragment to be evaled but not shown.
5965266e564dSmrgfinish_eval=$lt_finish_eval
5966266e564dSmrg
5967266e564dSmrg# Take the output of nm and produce a listing of raw symbols and C names.
5968266e564dSmrgglobal_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
5969266e564dSmrg
5970266e564dSmrg# Transform the output of nm in a proper C declaration
5971266e564dSmrgglobal_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
5972266e564dSmrg
5973266e564dSmrg# Transform the output of nm in a C name address pair
5974266e564dSmrgglobal_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
5975266e564dSmrg
5976266e564dSmrg# This is the shared library runtime path variable.
5977266e564dSmrgrunpath_var=$runpath_var
5978266e564dSmrg
5979266e564dSmrg# This is the shared library path variable.
5980266e564dSmrgshlibpath_var=$shlibpath_var
5981266e564dSmrg
5982266e564dSmrg# Is shlibpath searched before the hard-coded library search path?
5983266e564dSmrgshlibpath_overrides_runpath=$shlibpath_overrides_runpath
5984266e564dSmrg
5985266e564dSmrg# How to hardcode a shared library path into an executable.
5986266e564dSmrghardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
5987266e564dSmrg
5988266e564dSmrg# Whether we should hardcode library paths into libraries.
5989266e564dSmrghardcode_into_libs=$hardcode_into_libs
5990266e564dSmrg
5991266e564dSmrg# Flag to hardcode \$libdir into a binary during linking.
5992266e564dSmrg# This must work even if \$libdir does not exist.
5993266e564dSmrghardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
5994266e564dSmrg
5995266e564dSmrg# If ld is used when linking, flag to hardcode \$libdir into
5996266e564dSmrg# a binary during linking. This must work even if \$libdir does
5997266e564dSmrg# not exist.
5998266e564dSmrghardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
5999266e564dSmrg
6000266e564dSmrg# Whether we need a single -rpath flag with a separated argument.
6001266e564dSmrghardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
6002266e564dSmrg
6003266e564dSmrg# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
6004266e564dSmrg# resulting binary.
6005266e564dSmrghardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
6006266e564dSmrg
6007266e564dSmrg# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
6008266e564dSmrg# resulting binary.
6009266e564dSmrghardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
6010266e564dSmrg
6011266e564dSmrg# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
6012266e564dSmrg# the resulting binary.
6013266e564dSmrghardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
6014266e564dSmrg
6015266e564dSmrg# Set to yes if building a shared library automatically hardcodes DIR into the library
6016266e564dSmrg# and all subsequent libraries and executables linked against it.
6017266e564dSmrghardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)
6018266e564dSmrg
6019266e564dSmrg# Variables whose values should be saved in libtool wrapper scripts and
6020266e564dSmrg# restored at relink time.
6021266e564dSmrgvariables_saved_for_relink="$variables_saved_for_relink"
6022266e564dSmrg
6023266e564dSmrg# Whether libtool must link a program against all its dependency libraries.
6024266e564dSmrglink_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
6025266e564dSmrg
6026266e564dSmrg# Compile-time system search path for libraries
6027266e564dSmrgsys_lib_search_path_spec=$lt_sys_lib_search_path_spec
6028266e564dSmrg
6029266e564dSmrg# Run-time system search path for libraries
6030266e564dSmrgsys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
6031266e564dSmrg
6032266e564dSmrg# Fix the shell variable \$srcfile for the compiler.
6033266e564dSmrgfix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)"
6034266e564dSmrg
6035266e564dSmrg# Set to yes if exported symbols are required.
6036266e564dSmrgalways_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
6037266e564dSmrg
6038266e564dSmrg# The commands to list exported symbols.
6039266e564dSmrgexport_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
6040266e564dSmrg
6041266e564dSmrg# The commands to extract the exported symbol list from a shared archive.
6042266e564dSmrgextract_expsyms_cmds=$lt_extract_expsyms_cmds
6043266e564dSmrg
6044266e564dSmrg# Symbols that should not be listed in the preloaded symbols.
6045266e564dSmrgexclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
6046266e564dSmrg
6047266e564dSmrg# Symbols that must always be exported.
6048266e564dSmrginclude_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
6049266e564dSmrg
6050266e564dSmrgifelse([$1],[],
6051266e564dSmrg[# ### END LIBTOOL CONFIG],
6052266e564dSmrg[# ### END LIBTOOL TAG CONFIG: $tagname])
6053266e564dSmrg
6054266e564dSmrg__EOF__
6055266e564dSmrg
6056266e564dSmrgifelse([$1],[], [
6057266e564dSmrg  case $host_os in
6058266e564dSmrg  aix3*)
6059266e564dSmrg    cat <<\EOF >> "$cfgfile"
6060266e564dSmrg
6061266e564dSmrg# AIX sometimes has problems with the GCC collect2 program.  For some
6062266e564dSmrg# reason, if we set the COLLECT_NAMES environment variable, the problems
6063266e564dSmrg# vanish in a puff of smoke.
6064266e564dSmrgif test "X${COLLECT_NAMES+set}" != Xset; then
6065266e564dSmrg  COLLECT_NAMES=
6066266e564dSmrg  export COLLECT_NAMES
6067266e564dSmrgfi
6068266e564dSmrgEOF
6069266e564dSmrg    ;;
6070266e564dSmrg  esac
6071266e564dSmrg
6072266e564dSmrg  # We use sed instead of cat because bash on DJGPP gets confused if
6073266e564dSmrg  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
6074266e564dSmrg  # text mode, it properly converts lines to CR/LF.  This bash problem
6075266e564dSmrg  # is reportedly fixed, but why not run on old versions too?
6076266e564dSmrg  sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
6077266e564dSmrg
6078266e564dSmrg  mv -f "$cfgfile" "$ofile" || \
6079266e564dSmrg    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
6080266e564dSmrg  chmod +x "$ofile"
6081266e564dSmrg])
6082266e564dSmrgelse
6083266e564dSmrg  # If there is no Makefile yet, we rely on a make rule to execute
6084266e564dSmrg  # `config.status --recheck' to rerun these tests and create the
6085266e564dSmrg  # libtool script then.
6086266e564dSmrg  ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
6087266e564dSmrg  if test -f "$ltmain_in"; then
6088266e564dSmrg    test -f Makefile && make "$ltmain"
6089266e564dSmrg  fi
6090266e564dSmrgfi
6091266e564dSmrg])# AC_LIBTOOL_CONFIG
6092266e564dSmrg
6093266e564dSmrg
6094266e564dSmrg# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
6095266e564dSmrg# -------------------------------------------
6096266e564dSmrgAC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
6097266e564dSmrg[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
6098266e564dSmrg
6099266e564dSmrg_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
6100266e564dSmrg
6101266e564dSmrgif test "$GCC" = yes; then
6102266e564dSmrg  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
6103266e564dSmrg
6104266e564dSmrg  AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
6105266e564dSmrg    lt_cv_prog_compiler_rtti_exceptions,
6106266e564dSmrg    [-fno-rtti -fno-exceptions], [],
6107266e564dSmrg    [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
6108266e564dSmrgfi
6109266e564dSmrg])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
6110266e564dSmrg
6111266e564dSmrg
6112266e564dSmrg# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
6113266e564dSmrg# ---------------------------------
6114266e564dSmrgAC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
6115266e564dSmrg[AC_REQUIRE([AC_CANONICAL_HOST])
6116266e564dSmrgAC_REQUIRE([AC_PROG_NM])
6117266e564dSmrgAC_REQUIRE([AC_OBJEXT])
6118266e564dSmrg# Check for command to grab the raw symbol name followed by C symbol from nm.
6119266e564dSmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object])
6120266e564dSmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
6121266e564dSmrg[
6122266e564dSmrg# These are sane defaults that work on at least a few old systems.
6123266e564dSmrg# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
6124266e564dSmrg
6125266e564dSmrg# Character class describing NM global symbol codes.
6126266e564dSmrgsymcode='[[BCDEGRST]]'
6127266e564dSmrg
6128266e564dSmrg# Regexp to match symbols that can be accessed directly from C.
6129266e564dSmrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
6130266e564dSmrg
6131266e564dSmrg# Transform an extracted symbol line into a proper C declaration
6132266e564dSmrglt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
6133266e564dSmrg
6134266e564dSmrg# Transform an extracted symbol line into symbol name and symbol address
6135266e564dSmrglt_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'"
6136266e564dSmrg
6137266e564dSmrg# Define system-specific variables.
6138266e564dSmrgcase $host_os in
6139266e564dSmrgaix*)
6140266e564dSmrg  symcode='[[BCDT]]'
6141266e564dSmrg  ;;
6142266e564dSmrgcygwin* | mingw* | pw32*)
6143266e564dSmrg  symcode='[[ABCDGISTW]]'
6144266e564dSmrg  ;;
6145266e564dSmrghpux*) # Its linker distinguishes data from code symbols
6146266e564dSmrg  if test "$host_cpu" = ia64; then
6147266e564dSmrg    symcode='[[ABCDEGRST]]'
6148266e564dSmrg  fi
6149266e564dSmrg  lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
6150266e564dSmrg  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'"
6151266e564dSmrg  ;;
6152266e564dSmrglinux*)
6153266e564dSmrg  if test "$host_cpu" = ia64; then
6154266e564dSmrg    symcode='[[ABCDGIRSTW]]'
6155266e564dSmrg    lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
6156266e564dSmrg    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'"
6157266e564dSmrg  fi
6158266e564dSmrg  ;;
6159266e564dSmrgirix* | nonstopux*)
6160266e564dSmrg  symcode='[[BCDEGRST]]'
6161266e564dSmrg  ;;
6162266e564dSmrgosf*)
6163266e564dSmrg  symcode='[[BCDEGQRST]]'
6164266e564dSmrg  ;;
6165266e564dSmrgsolaris*)
6166266e564dSmrg  symcode='[[BDRT]]'
6167266e564dSmrg  ;;
6168266e564dSmrgsco3.2v5*)
6169266e564dSmrg  symcode='[[DT]]'
6170266e564dSmrg  ;;
6171266e564dSmrgsysv4.2uw2*)
6172266e564dSmrg  symcode='[[DT]]'
6173266e564dSmrg  ;;
6174266e564dSmrgsysv5* | sco5v6* | unixware* | OpenUNIX*)
6175266e564dSmrg  symcode='[[ABDT]]'
6176266e564dSmrg  ;;
6177266e564dSmrgsysv4)
6178266e564dSmrg  symcode='[[DFNSTU]]'
6179266e564dSmrg  ;;
6180266e564dSmrgesac
6181266e564dSmrg
6182266e564dSmrg# Handle CRLF in mingw tool chain
6183266e564dSmrgopt_cr=
6184266e564dSmrgcase $build_os in
6185266e564dSmrgmingw*)
6186266e564dSmrg  opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
6187266e564dSmrg  ;;
6188266e564dSmrgesac
6189266e564dSmrg
6190266e564dSmrg# If we're using GNU nm, then use its standard symbol codes.
6191266e564dSmrgcase `$NM -V 2>&1` in
6192266e564dSmrg*GNU* | *'with BFD'*)
6193266e564dSmrg  symcode='[[ABCDGIRSTW]]' ;;
6194266e564dSmrgesac
6195266e564dSmrg
6196266e564dSmrg# Try without a prefix undercore, then with it.
6197266e564dSmrgfor ac_symprfx in "" "_"; do
6198266e564dSmrg
6199266e564dSmrg  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
6200266e564dSmrg  symxfrm="\\1 $ac_symprfx\\2 \\2"
6201266e564dSmrg
6202266e564dSmrg  # Write the raw and C identifiers.
6203266e564dSmrg  lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ 	]]\($symcode$symcode*\)[[ 	]][[ 	]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
6204266e564dSmrg
6205266e564dSmrg  # Check to see that the pipe works correctly.
6206266e564dSmrg  pipe_works=no
6207266e564dSmrg
6208266e564dSmrg  rm -f conftest*
6209266e564dSmrg  cat > conftest.$ac_ext <<EOF
6210266e564dSmrg#ifdef __cplusplus
6211266e564dSmrgextern "C" {
6212266e564dSmrg#endif
6213266e564dSmrgchar nm_test_var;
6214266e564dSmrgvoid nm_test_func(){}
6215266e564dSmrg#ifdef __cplusplus
6216266e564dSmrg}
6217266e564dSmrg#endif
6218266e564dSmrgint main(){nm_test_var='a';nm_test_func();return(0);}
6219266e564dSmrgEOF
6220266e564dSmrg
6221266e564dSmrg  if AC_TRY_EVAL(ac_compile); then
6222266e564dSmrg    # Now try to grab the symbols.
6223266e564dSmrg    nlist=conftest.nm
6224266e564dSmrg    if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
6225266e564dSmrg      # Try sorting and uniquifying the output.
6226266e564dSmrg      if sort "$nlist" | uniq > "$nlist"T; then
6227266e564dSmrg	mv -f "$nlist"T "$nlist"
6228266e564dSmrg      else
6229266e564dSmrg	rm -f "$nlist"T
6230266e564dSmrg      fi
6231266e564dSmrg
6232266e564dSmrg      # Make sure that we snagged all the symbols we need.
6233266e564dSmrg      if grep ' nm_test_var$' "$nlist" >/dev/null; then
6234266e564dSmrg	if grep ' nm_test_func$' "$nlist" >/dev/null; then
6235266e564dSmrg	  cat <<EOF > conftest.$ac_ext
6236266e564dSmrg#ifdef __cplusplus
6237266e564dSmrgextern "C" {
6238266e564dSmrg#endif
6239266e564dSmrg
6240266e564dSmrgEOF
6241266e564dSmrg	  # Now generate the symbol file.
6242266e564dSmrg	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
6243266e564dSmrg
6244266e564dSmrg	  cat <<EOF >> conftest.$ac_ext
6245266e564dSmrg#if defined (__STDC__) && __STDC__
6246266e564dSmrg# define lt_ptr_t void *
6247266e564dSmrg#else
6248266e564dSmrg# define lt_ptr_t char *
6249266e564dSmrg# define const
6250266e564dSmrg#endif
6251266e564dSmrg
6252266e564dSmrg/* The mapping between symbol names and symbols. */
6253266e564dSmrgconst struct {
6254266e564dSmrg  const char *name;
6255266e564dSmrg  lt_ptr_t address;
6256266e564dSmrg}
6257266e564dSmrglt_preloaded_symbols[[]] =
6258266e564dSmrg{
6259266e564dSmrgEOF
6260266e564dSmrg	  $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
6261266e564dSmrg	  cat <<\EOF >> conftest.$ac_ext
6262266e564dSmrg  {0, (lt_ptr_t) 0}
6263266e564dSmrg};
6264266e564dSmrg
6265266e564dSmrg#ifdef __cplusplus
6266266e564dSmrg}
6267266e564dSmrg#endif
6268266e564dSmrgEOF
6269266e564dSmrg	  # Now try linking the two files.
6270266e564dSmrg	  mv conftest.$ac_objext conftstm.$ac_objext
6271266e564dSmrg	  lt_save_LIBS="$LIBS"
6272266e564dSmrg	  lt_save_CFLAGS="$CFLAGS"
6273266e564dSmrg	  LIBS="conftstm.$ac_objext"
6274266e564dSmrg	  CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
6275266e564dSmrg	  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
6276266e564dSmrg	    pipe_works=yes
6277266e564dSmrg	  fi
6278266e564dSmrg	  LIBS="$lt_save_LIBS"
6279266e564dSmrg	  CFLAGS="$lt_save_CFLAGS"
6280266e564dSmrg	else
6281266e564dSmrg	  echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
6282266e564dSmrg	fi
6283266e564dSmrg      else
6284266e564dSmrg	echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
6285266e564dSmrg      fi
6286266e564dSmrg    else
6287266e564dSmrg      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
6288266e564dSmrg    fi
6289266e564dSmrg  else
6290266e564dSmrg    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
6291266e564dSmrg    cat conftest.$ac_ext >&5
6292266e564dSmrg  fi
6293266e564dSmrg  rm -f conftest* conftst*
6294266e564dSmrg
6295266e564dSmrg  # Do not use the global_symbol_pipe unless it works.
6296266e564dSmrg  if test "$pipe_works" = yes; then
6297266e564dSmrg    break
6298266e564dSmrg  else
6299266e564dSmrg    lt_cv_sys_global_symbol_pipe=
6300266e564dSmrg  fi
6301266e564dSmrgdone
6302266e564dSmrg])
6303266e564dSmrgif test -z "$lt_cv_sys_global_symbol_pipe"; then
6304266e564dSmrg  lt_cv_sys_global_symbol_to_cdecl=
6305266e564dSmrgfi
6306266e564dSmrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
6307266e564dSmrg  AC_MSG_RESULT(failed)
6308266e564dSmrgelse
6309266e564dSmrg  AC_MSG_RESULT(ok)
6310266e564dSmrgfi
6311266e564dSmrg]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
6312266e564dSmrg
6313266e564dSmrg
6314266e564dSmrg# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
6315266e564dSmrg# ---------------------------------------
6316266e564dSmrgAC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
6317266e564dSmrg[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
6318266e564dSmrg_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
6319266e564dSmrg_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
6320266e564dSmrg
6321266e564dSmrgAC_MSG_CHECKING([for $compiler option to produce PIC])
6322266e564dSmrg ifelse([$1],[CXX],[
6323266e564dSmrg  # C++ specific cases for pic, static, wl, etc.
6324266e564dSmrg  if test "$GXX" = yes; then
6325266e564dSmrg    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6326266e564dSmrg    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
6327266e564dSmrg
6328266e564dSmrg    case $host_os in
6329266e564dSmrg    aix*)
6330266e564dSmrg      # All AIX code is PIC.
6331266e564dSmrg      if test "$host_cpu" = ia64; then
6332266e564dSmrg	# AIX 5 now supports IA64 processor
6333266e564dSmrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6334266e564dSmrg      fi
6335266e564dSmrg      ;;
6336266e564dSmrg    amigaos*)
6337266e564dSmrg      # FIXME: we need at least 68020 code to build shared libraries, but
6338266e564dSmrg      # adding the `-m68020' flag to GCC prevents building anything better,
6339266e564dSmrg      # like `-m68040'.
6340266e564dSmrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
6341266e564dSmrg      ;;
6342266e564dSmrg    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
6343266e564dSmrg      # PIC is the default for these OSes.
6344266e564dSmrg      ;;
6345266e564dSmrg    mingw* | os2* | pw32*)
6346266e564dSmrg      # This hack is so that the source file can tell whether it is being
6347266e564dSmrg      # built for inclusion in a dll (and should export symbols for example).
6348266e564dSmrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
6349266e564dSmrg      ;;
6350266e564dSmrg    darwin* | rhapsody*)
6351266e564dSmrg      # PIC is the default on this platform
6352266e564dSmrg      # Common symbols not allowed in MH_DYLIB files
6353266e564dSmrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
6354266e564dSmrg      ;;
6355266e564dSmrg    *djgpp*)
6356266e564dSmrg      # DJGPP does not support shared libraries at all
6357266e564dSmrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
6358266e564dSmrg      ;;
6359266e564dSmrg    interix3*)
6360266e564dSmrg      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
6361266e564dSmrg      # Instead, we relocate shared libraries at runtime.
6362266e564dSmrg      ;;
6363266e564dSmrg    sysv4*MP*)
6364266e564dSmrg      if test -d /usr/nec; then
6365266e564dSmrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
6366266e564dSmrg      fi
6367266e564dSmrg      ;;
6368266e564dSmrg    hpux*)
6369266e564dSmrg      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
6370266e564dSmrg      # not for PA HP-UX.
6371266e564dSmrg      case $host_cpu in
6372266e564dSmrg      hppa*64*|ia64*)
6373266e564dSmrg	;;
6374266e564dSmrg      *)
6375266e564dSmrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6376266e564dSmrg	;;
6377266e564dSmrg      esac
6378266e564dSmrg      ;;
6379266e564dSmrg    *)
6380266e564dSmrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6381266e564dSmrg      ;;
6382266e564dSmrg    esac
6383266e564dSmrg  else
6384266e564dSmrg    case $host_os in
6385266e564dSmrg      aix4* | aix5*)
6386266e564dSmrg	# All AIX code is PIC.
6387266e564dSmrg	if test "$host_cpu" = ia64; then
6388266e564dSmrg	  # AIX 5 now supports IA64 processor
6389266e564dSmrg	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6390266e564dSmrg	else
6391266e564dSmrg	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
6392266e564dSmrg	fi
6393266e564dSmrg	;;
6394266e564dSmrg      chorus*)
6395266e564dSmrg	case $cc_basename in
6396266e564dSmrg	cxch68*)
6397266e564dSmrg	  # Green Hills C++ Compiler
6398266e564dSmrg	  # _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"
6399266e564dSmrg	  ;;
6400266e564dSmrg	esac
6401266e564dSmrg	;;
6402266e564dSmrg       darwin*)
6403266e564dSmrg         # PIC is the default on this platform
6404266e564dSmrg         # Common symbols not allowed in MH_DYLIB files
6405266e564dSmrg         case $cc_basename in
6406266e564dSmrg           xlc*)
6407266e564dSmrg           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
6408266e564dSmrg           _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6409266e564dSmrg           ;;
6410266e564dSmrg         esac
6411266e564dSmrg       ;;
6412266e564dSmrg      dgux*)
6413266e564dSmrg	case $cc_basename in
6414266e564dSmrg	  ec++*)
6415266e564dSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6416266e564dSmrg	    ;;
6417266e564dSmrg	  ghcx*)
6418266e564dSmrg	    # Green Hills C++ Compiler
6419266e564dSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6420266e564dSmrg	    ;;
6421266e564dSmrg	  *)
6422266e564dSmrg	    ;;
6423266e564dSmrg	esac
6424266e564dSmrg	;;
6425266e564dSmrg      freebsd* | kfreebsd*-gnu | dragonfly*)
6426266e564dSmrg	# FreeBSD uses GNU C++
6427266e564dSmrg	;;
6428266e564dSmrg      hpux9* | hpux10* | hpux11*)
6429266e564dSmrg	case $cc_basename in
6430266e564dSmrg	  CC*)
6431266e564dSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6432266e564dSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
6433266e564dSmrg	    if test "$host_cpu" != ia64; then
6434266e564dSmrg	      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
6435266e564dSmrg	    fi
6436266e564dSmrg	    ;;
6437266e564dSmrg	  aCC*)
6438266e564dSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6439266e564dSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
6440266e564dSmrg	    case $host_cpu in
6441266e564dSmrg	    hppa*64*|ia64*)
6442266e564dSmrg	      # +Z the default
6443266e564dSmrg	      ;;
6444266e564dSmrg	    *)
6445266e564dSmrg	      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
6446266e564dSmrg	      ;;
6447266e564dSmrg	    esac
6448266e564dSmrg	    ;;
6449266e564dSmrg	  *)
6450266e564dSmrg	    ;;
6451266e564dSmrg	esac
6452266e564dSmrg	;;
6453266e564dSmrg      interix*)
6454266e564dSmrg	# This is c89, which is MS Visual C++ (no shared libs)
6455266e564dSmrg	# Anyone wants to do a port?
6456266e564dSmrg	;;
6457266e564dSmrg      irix5* | irix6* | nonstopux*)
6458266e564dSmrg	case $cc_basename in
6459266e564dSmrg	  CC*)
6460266e564dSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6461266e564dSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6462266e564dSmrg	    # CC pic flag -KPIC is the default.
6463266e564dSmrg	    ;;
6464266e564dSmrg	  *)
6465266e564dSmrg	    ;;
6466266e564dSmrg	esac
6467266e564dSmrg	;;
6468266e564dSmrg      linux*)
6469266e564dSmrg	case $cc_basename in
6470266e564dSmrg	  KCC*)
6471266e564dSmrg	    # KAI C++ Compiler
6472266e564dSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
6473266e564dSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6474266e564dSmrg	    ;;
6475266e564dSmrg	  icpc* | ecpc*)
6476266e564dSmrg	    # Intel C++
6477266e564dSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6478266e564dSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6479266e564dSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
6480266e564dSmrg	    ;;
6481266e564dSmrg	  pgCC*)
6482266e564dSmrg	    # Portland Group C++ compiler.
6483266e564dSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6484266e564dSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
6485266e564dSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6486266e564dSmrg	    ;;
6487266e564dSmrg	  cxx*)
6488266e564dSmrg	    # Compaq C++
6489266e564dSmrg	    # Make sure the PIC flag is empty.  It appears that all Alpha
6490266e564dSmrg	    # Linux and Compaq Tru64 Unix objects are PIC.
6491266e564dSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
6492266e564dSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6493266e564dSmrg	    ;;
6494266e564dSmrg	  *)
6495266e564dSmrg	    ;;
6496266e564dSmrg	esac
6497266e564dSmrg	;;
6498266e564dSmrg      lynxos*)
6499266e564dSmrg	;;
6500266e564dSmrg      m88k*)
6501266e564dSmrg	;;
6502266e564dSmrg      mvs*)
6503266e564dSmrg	case $cc_basename in
6504266e564dSmrg	  cxx*)
6505266e564dSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
6506266e564dSmrg	    ;;
6507266e564dSmrg	  *)
6508266e564dSmrg	    ;;
6509266e564dSmrg	esac
6510266e564dSmrg	;;
6511266e564dSmrg      netbsd*)
6512266e564dSmrg	;;
6513266e564dSmrg      osf3* | osf4* | osf5*)
6514266e564dSmrg	case $cc_basename in
6515266e564dSmrg	  KCC*)
6516266e564dSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
6517266e564dSmrg	    ;;
6518266e564dSmrg	  RCC*)
6519266e564dSmrg	    # Rational C++ 2.4.1
6520266e564dSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6521266e564dSmrg	    ;;
6522266e564dSmrg	  cxx*)
6523266e564dSmrg	    # Digital/Compaq C++
6524266e564dSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6525266e564dSmrg	    # Make sure the PIC flag is empty.  It appears that all Alpha
6526266e564dSmrg	    # Linux and Compaq Tru64 Unix objects are PIC.
6527266e564dSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
6528266e564dSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6529266e564dSmrg	    ;;
6530266e564dSmrg	  *)
6531266e564dSmrg	    ;;
6532266e564dSmrg	esac
6533266e564dSmrg	;;
6534266e564dSmrg      psos*)
6535266e564dSmrg	;;
6536266e564dSmrg      solaris*)
6537266e564dSmrg	case $cc_basename in
6538266e564dSmrg	  CC*)
6539266e564dSmrg	    # Sun C++ 4.2, 5.x and Centerline C++
6540266e564dSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6541266e564dSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6542266e564dSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
6543266e564dSmrg	    ;;
6544266e564dSmrg	  gcx*)
6545266e564dSmrg	    # Green Hills C++ Compiler
6546266e564dSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
6547266e564dSmrg	    ;;
6548266e564dSmrg	  *)
6549266e564dSmrg	    ;;
6550266e564dSmrg	esac
6551266e564dSmrg	;;
6552266e564dSmrg      sunos4*)
6553266e564dSmrg	case $cc_basename in
6554266e564dSmrg	  CC*)
6555266e564dSmrg	    # Sun C++ 4.x
6556266e564dSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6557266e564dSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6558266e564dSmrg	    ;;
6559266e564dSmrg	  lcc*)
6560266e564dSmrg	    # Lucid
6561266e564dSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6562266e564dSmrg	    ;;
6563266e564dSmrg	  *)
6564266e564dSmrg	    ;;
6565266e564dSmrg	esac
6566266e564dSmrg	;;
6567266e564dSmrg      tandem*)
6568266e564dSmrg	case $cc_basename in
6569266e564dSmrg	  NCC*)
6570266e564dSmrg	    # NonStop-UX NCC 3.20
6571266e564dSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6572266e564dSmrg	    ;;
6573266e564dSmrg	  *)
6574266e564dSmrg	    ;;
6575266e564dSmrg	esac
6576266e564dSmrg	;;
6577266e564dSmrg      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
6578266e564dSmrg	case $cc_basename in
6579266e564dSmrg	  CC*)
6580266e564dSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6581266e564dSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6582266e564dSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6583266e564dSmrg	    ;;
6584266e564dSmrg	esac
6585266e564dSmrg	;;
6586266e564dSmrg      vxworks*)
6587266e564dSmrg	;;
6588266e564dSmrg      *)
6589266e564dSmrg	_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
6590266e564dSmrg	;;
6591266e564dSmrg    esac
6592266e564dSmrg  fi
6593266e564dSmrg],
6594266e564dSmrg[
6595266e564dSmrg  if test "$GCC" = yes; then
6596266e564dSmrg    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6597266e564dSmrg    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
6598266e564dSmrg
6599266e564dSmrg    case $host_os in
6600266e564dSmrg      aix*)
6601266e564dSmrg      # All AIX code is PIC.
6602266e564dSmrg      if test "$host_cpu" = ia64; then
6603266e564dSmrg	# AIX 5 now supports IA64 processor
6604266e564dSmrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6605266e564dSmrg      fi
6606266e564dSmrg      ;;
6607266e564dSmrg
6608266e564dSmrg    amigaos*)
6609266e564dSmrg      # FIXME: we need at least 68020 code to build shared libraries, but
6610266e564dSmrg      # adding the `-m68020' flag to GCC prevents building anything better,
6611266e564dSmrg      # like `-m68040'.
6612266e564dSmrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
6613266e564dSmrg      ;;
6614266e564dSmrg
6615266e564dSmrg    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
6616266e564dSmrg      # PIC is the default for these OSes.
6617266e564dSmrg      ;;
6618266e564dSmrg
6619266e564dSmrg    mingw* | pw32* | os2*)
6620266e564dSmrg      # This hack is so that the source file can tell whether it is being
6621266e564dSmrg      # built for inclusion in a dll (and should export symbols for example).
6622266e564dSmrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
6623266e564dSmrg      ;;
6624266e564dSmrg
6625266e564dSmrg    darwin* | rhapsody*)
6626266e564dSmrg      # PIC is the default on this platform
6627266e564dSmrg      # Common symbols not allowed in MH_DYLIB files
6628266e564dSmrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
6629266e564dSmrg      ;;
6630266e564dSmrg
6631266e564dSmrg    interix3*)
6632266e564dSmrg      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
6633266e564dSmrg      # Instead, we relocate shared libraries at runtime.
6634266e564dSmrg      ;;
6635266e564dSmrg
6636266e564dSmrg    msdosdjgpp*)
6637266e564dSmrg      # Just because we use GCC doesn't mean we suddenly get shared libraries
6638266e564dSmrg      # on systems that don't support them.
6639266e564dSmrg      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
6640266e564dSmrg      enable_shared=no
6641266e564dSmrg      ;;
6642266e564dSmrg
6643266e564dSmrg    sysv4*MP*)
6644266e564dSmrg      if test -d /usr/nec; then
6645266e564dSmrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
6646266e564dSmrg      fi
6647266e564dSmrg      ;;
6648266e564dSmrg
6649266e564dSmrg    hpux*)
6650266e564dSmrg      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
6651266e564dSmrg      # not for PA HP-UX.
6652266e564dSmrg      case $host_cpu in
6653266e564dSmrg      hppa*64*|ia64*)
6654266e564dSmrg	# +Z the default
6655266e564dSmrg	;;
6656266e564dSmrg      *)
6657266e564dSmrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6658266e564dSmrg	;;
6659266e564dSmrg      esac
6660266e564dSmrg      ;;
6661266e564dSmrg
6662266e564dSmrg    *)
6663266e564dSmrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6664266e564dSmrg      ;;
6665266e564dSmrg    esac
6666266e564dSmrg  else
6667266e564dSmrg    # PORTME Check for flag to pass linker flags through the system compiler.
6668266e564dSmrg    case $host_os in
6669266e564dSmrg    aix*)
6670266e564dSmrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6671266e564dSmrg      if test "$host_cpu" = ia64; then
6672266e564dSmrg	# AIX 5 now supports IA64 processor
6673266e564dSmrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6674266e564dSmrg      else
6675266e564dSmrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
6676266e564dSmrg      fi
6677266e564dSmrg      ;;
6678266e564dSmrg      darwin*)
6679266e564dSmrg        # PIC is the default on this platform
6680266e564dSmrg        # Common symbols not allowed in MH_DYLIB files
6681266e564dSmrg       case $cc_basename in
6682266e564dSmrg         xlc*)
6683266e564dSmrg         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
6684266e564dSmrg         _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6685266e564dSmrg         ;;
6686266e564dSmrg       esac
6687266e564dSmrg       ;;
6688266e564dSmrg
6689266e564dSmrg    mingw* | pw32* | os2*)
6690266e564dSmrg      # This hack is so that the source file can tell whether it is being
6691266e564dSmrg      # built for inclusion in a dll (and should export symbols for example).
6692266e564dSmrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
6693266e564dSmrg      ;;
6694266e564dSmrg
6695266e564dSmrg    hpux9* | hpux10* | hpux11*)
6696266e564dSmrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6697266e564dSmrg      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
6698266e564dSmrg      # not for PA HP-UX.
6699266e564dSmrg      case $host_cpu in
6700266e564dSmrg      hppa*64*|ia64*)
6701266e564dSmrg	# +Z the default
6702266e564dSmrg	;;
6703266e564dSmrg      *)
6704266e564dSmrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
6705266e564dSmrg	;;
6706266e564dSmrg      esac
6707266e564dSmrg      # Is there a better lt_prog_compiler_static that works with the bundled CC?
6708266e564dSmrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
6709266e564dSmrg      ;;
6710266e564dSmrg
6711266e564dSmrg    irix5* | irix6* | nonstopux*)
6712266e564dSmrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6713266e564dSmrg      # PIC (with -KPIC) is the default.
6714266e564dSmrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6715266e564dSmrg      ;;
6716266e564dSmrg
6717266e564dSmrg    newsos6)
6718266e564dSmrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6719266e564dSmrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6720266e564dSmrg      ;;
6721266e564dSmrg
6722266e564dSmrg    linux*)
6723266e564dSmrg      case $cc_basename in
6724266e564dSmrg      icc* | ecc*)
6725266e564dSmrg	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6726266e564dSmrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6727266e564dSmrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
6728266e564dSmrg        ;;
6729266e564dSmrg      pgcc* | pgf77* | pgf90* | pgf95*)
6730266e564dSmrg        # Portland Group compilers (*not* the Pentium gcc compiler,
6731266e564dSmrg	# which looks to be a dead project)
6732266e564dSmrg	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6733266e564dSmrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
6734266e564dSmrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6735266e564dSmrg        ;;
6736266e564dSmrg      ccc*)
6737266e564dSmrg        _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6738266e564dSmrg        # All Alpha code is PIC.
6739266e564dSmrg        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6740266e564dSmrg        ;;
6741266e564dSmrg      esac
6742266e564dSmrg      ;;
6743266e564dSmrg
6744266e564dSmrg    osf3* | osf4* | osf5*)
6745266e564dSmrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6746266e564dSmrg      # All OSF/1 code is PIC.
6747266e564dSmrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6748266e564dSmrg      ;;
6749266e564dSmrg
6750266e564dSmrg    solaris*)
6751266e564dSmrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6752266e564dSmrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6753266e564dSmrg      case $cc_basename in
6754266e564dSmrg      f77* | f90* | f95*)
6755266e564dSmrg	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
6756266e564dSmrg      *)
6757266e564dSmrg	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
6758266e564dSmrg      esac
6759266e564dSmrg      ;;
6760266e564dSmrg
6761266e564dSmrg    sunos4*)
6762266e564dSmrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
6763266e564dSmrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
6764266e564dSmrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6765266e564dSmrg      ;;
6766266e564dSmrg
6767266e564dSmrg    sysv4 | sysv4.2uw2* | sysv4.3*)
6768266e564dSmrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6769266e564dSmrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6770266e564dSmrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6771266e564dSmrg      ;;
6772266e564dSmrg
6773266e564dSmrg    sysv4*MP*)
6774266e564dSmrg      if test -d /usr/nec ;then
6775266e564dSmrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
6776266e564dSmrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6777266e564dSmrg      fi
6778266e564dSmrg      ;;
6779266e564dSmrg
6780266e564dSmrg    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
6781266e564dSmrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6782266e564dSmrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6783266e564dSmrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6784266e564dSmrg      ;;
6785266e564dSmrg
6786266e564dSmrg    unicos*)
6787266e564dSmrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6788266e564dSmrg      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
6789266e564dSmrg      ;;
6790266e564dSmrg
6791266e564dSmrg    uts4*)
6792266e564dSmrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6793266e564dSmrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6794266e564dSmrg      ;;
6795266e564dSmrg
6796266e564dSmrg    *)
6797266e564dSmrg      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
6798266e564dSmrg      ;;
6799266e564dSmrg    esac
6800266e564dSmrg  fi
6801266e564dSmrg])
6802266e564dSmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
6803266e564dSmrg
6804266e564dSmrg#
6805266e564dSmrg# Check to make sure the PIC flag actually works.
6806266e564dSmrg#
6807266e564dSmrgif test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
6808266e564dSmrg  AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
6809266e564dSmrg    _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
6810266e564dSmrg    [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
6811266e564dSmrg    [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
6812266e564dSmrg     "" | " "*) ;;
6813266e564dSmrg     *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
6814266e564dSmrg     esac],
6815266e564dSmrg    [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
6816266e564dSmrg     _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
6817266e564dSmrgfi
6818266e564dSmrgcase $host_os in
6819266e564dSmrg  # For platforms which do not support PIC, -DPIC is meaningless:
6820266e564dSmrg  *djgpp*)
6821266e564dSmrg    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
6822266e564dSmrg    ;;
6823266e564dSmrg  *)
6824266e564dSmrg    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
6825266e564dSmrg    ;;
6826266e564dSmrgesac
6827266e564dSmrg
6828266e564dSmrg#
6829266e564dSmrg# Check to make sure the static flag actually works.
6830266e564dSmrg#
6831266e564dSmrgwl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\"
6832266e564dSmrgAC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
6833266e564dSmrg  _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
6834266e564dSmrg  $lt_tmp_static_flag,
6835266e564dSmrg  [],
6836266e564dSmrg  [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
6837266e564dSmrg])
6838266e564dSmrg
6839266e564dSmrg
6840266e564dSmrg# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
6841266e564dSmrg# ------------------------------------
6842266e564dSmrg# See if the linker supports building shared libraries.
6843266e564dSmrgAC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
6844266e564dSmrg[AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
6845266e564dSmrgifelse([$1],[CXX],[
6846266e564dSmrg  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
6847266e564dSmrg  case $host_os in
6848266e564dSmrg  aix4* | aix5*)
6849266e564dSmrg    # If we're using GNU nm, then we don't want the "-C" option.
6850266e564dSmrg    # -C means demangle to AIX nm, but means don't demangle with GNU nm
6851266e564dSmrg    if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
6852266e564dSmrg      _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'
6853266e564dSmrg    else
6854266e564dSmrg      _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'
6855266e564dSmrg    fi
6856266e564dSmrg    ;;
6857266e564dSmrg  pw32*)
6858266e564dSmrg    _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
6859266e564dSmrg  ;;
6860266e564dSmrg  cygwin* | mingw*)
6861266e564dSmrg    _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'
6862266e564dSmrg  ;;
6863266e564dSmrg  *)
6864266e564dSmrg    _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
6865266e564dSmrg  ;;
6866266e564dSmrg  esac
6867266e564dSmrg],[
6868266e564dSmrg  runpath_var=
6869266e564dSmrg  _LT_AC_TAGVAR(allow_undefined_flag, $1)=
6870266e564dSmrg  _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
6871266e564dSmrg  _LT_AC_TAGVAR(archive_cmds, $1)=
6872266e564dSmrg  _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
6873266e564dSmrg  _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
6874266e564dSmrg  _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
6875266e564dSmrg  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
6876266e564dSmrg  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
6877266e564dSmrg  _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
6878266e564dSmrg  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
6879266e564dSmrg  _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
6880266e564dSmrg  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
6881266e564dSmrg  _LT_AC_TAGVAR(hardcode_direct, $1)=no
6882266e564dSmrg  _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
6883266e564dSmrg  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
6884266e564dSmrg  _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
6885266e564dSmrg  _LT_AC_TAGVAR(hardcode_automatic, $1)=no
6886266e564dSmrg  _LT_AC_TAGVAR(module_cmds, $1)=
6887266e564dSmrg  _LT_AC_TAGVAR(module_expsym_cmds, $1)=
6888266e564dSmrg  _LT_AC_TAGVAR(always_export_symbols, $1)=no
6889266e564dSmrg  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
6890266e564dSmrg  # include_expsyms should be a list of space-separated symbols to be *always*
6891266e564dSmrg  # included in the symbol list
6892266e564dSmrg  _LT_AC_TAGVAR(include_expsyms, $1)=
6893266e564dSmrg  # exclude_expsyms can be an extended regexp of symbols to exclude
6894266e564dSmrg  # it will be wrapped by ` (' and `)$', so one must not match beginning or
6895266e564dSmrg  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
6896266e564dSmrg  # as well as any symbol that contains `d'.
6897266e564dSmrg  _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
6898266e564dSmrg  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
6899266e564dSmrg  # platforms (ab)use it in PIC code, but their linkers get confused if
6900266e564dSmrg  # the symbol is explicitly referenced.  Since portable code cannot
6901266e564dSmrg  # rely on this symbol name, it's probably fine to never include it in
6902266e564dSmrg  # preloaded symbol tables.
6903266e564dSmrg  extract_expsyms_cmds=
6904266e564dSmrg  # Just being paranoid about ensuring that cc_basename is set.
6905266e564dSmrg  _LT_CC_BASENAME([$compiler])
6906266e564dSmrg  case $host_os in
6907266e564dSmrg  cygwin* | mingw* | pw32*)
6908266e564dSmrg    # FIXME: the MSVC++ port hasn't been tested in a loooong time
6909266e564dSmrg    # When not using gcc, we currently assume that we are using
6910266e564dSmrg    # Microsoft Visual C++.
6911266e564dSmrg    if test "$GCC" != yes; then
6912266e564dSmrg      with_gnu_ld=no
6913266e564dSmrg    fi
6914266e564dSmrg    ;;
6915266e564dSmrg  interix*)
6916266e564dSmrg    # we just hope/assume this is gcc and not c89 (= MSVC++)
6917266e564dSmrg    with_gnu_ld=yes
6918266e564dSmrg    ;;
6919266e564dSmrg  openbsd*)
6920266e564dSmrg    with_gnu_ld=no
6921266e564dSmrg    ;;
6922266e564dSmrg  esac
6923266e564dSmrg
6924266e564dSmrg  _LT_AC_TAGVAR(ld_shlibs, $1)=yes
6925266e564dSmrg  if test "$with_gnu_ld" = yes; then
6926266e564dSmrg    # If archive_cmds runs LD, not CC, wlarc should be empty
6927266e564dSmrg    wlarc='${wl}'
6928266e564dSmrg
6929266e564dSmrg    # Set some defaults for GNU ld with shared library support. These
6930266e564dSmrg    # are reset later if shared libraries are not supported. Putting them
6931266e564dSmrg    # here allows them to be overridden if necessary.
6932266e564dSmrg    runpath_var=LD_RUN_PATH
6933266e564dSmrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
6934266e564dSmrg    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6935266e564dSmrg    # ancient GNU ld didn't support --whole-archive et. al.
6936266e564dSmrg    if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
6937266e564dSmrg	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
6938266e564dSmrg      else
6939266e564dSmrg  	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
6940266e564dSmrg    fi
6941266e564dSmrg    supports_anon_versioning=no
6942266e564dSmrg    case `$LD -v 2>/dev/null` in
6943266e564dSmrg      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
6944266e564dSmrg      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
6945266e564dSmrg      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
6946266e564dSmrg      *\ 2.11.*) ;; # other 2.11 versions
6947266e564dSmrg      *) supports_anon_versioning=yes ;;
6948266e564dSmrg    esac
6949266e564dSmrg
6950266e564dSmrg    # See if GNU ld supports shared libraries.
6951266e564dSmrg    case $host_os in
6952266e564dSmrg    aix3* | aix4* | aix5*)
6953266e564dSmrg      # On AIX/PPC, the GNU linker is very broken
6954266e564dSmrg      if test "$host_cpu" != ia64; then
6955266e564dSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
6956266e564dSmrg	cat <<EOF 1>&2
6957266e564dSmrg
6958266e564dSmrg*** Warning: the GNU linker, at least up to release 2.9.1, is reported
6959266e564dSmrg*** to be unable to reliably create shared libraries on AIX.
6960266e564dSmrg*** Therefore, libtool is disabling shared libraries support.  If you
6961266e564dSmrg*** really care for shared libraries, you may want to modify your PATH
6962266e564dSmrg*** so that a non-GNU linker is found, and then restart.
6963266e564dSmrg
6964266e564dSmrgEOF
6965266e564dSmrg      fi
6966266e564dSmrg      ;;
6967266e564dSmrg
6968266e564dSmrg    amigaos*)
6969266e564dSmrg      _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)'
6970266e564dSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6971266e564dSmrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6972266e564dSmrg
6973266e564dSmrg      # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
6974266e564dSmrg      # that the semantics of dynamic libraries on AmigaOS, at least up
6975266e564dSmrg      # to version 4, is to share data among multiple programs linked
6976266e564dSmrg      # with the same dynamic library.  Since this doesn't match the
6977266e564dSmrg      # behavior of shared libraries on other platforms, we can't use
6978266e564dSmrg      # them.
6979266e564dSmrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
6980266e564dSmrg      ;;
6981266e564dSmrg
6982266e564dSmrg    beos*)
6983266e564dSmrg      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
6984266e564dSmrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6985266e564dSmrg	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
6986266e564dSmrg	# support --undefined.  This deserves some investigation.  FIXME
6987266e564dSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6988266e564dSmrg      else
6989266e564dSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
6990266e564dSmrg      fi
6991266e564dSmrg      ;;
6992266e564dSmrg
6993266e564dSmrg    cygwin* | mingw* | pw32*)
6994266e564dSmrg      # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
6995266e564dSmrg      # as there is no search path for DLLs.
6996266e564dSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6997266e564dSmrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6998266e564dSmrg      _LT_AC_TAGVAR(always_export_symbols, $1)=no
6999266e564dSmrg      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
7000266e564dSmrg      _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'
7001266e564dSmrg
7002266e564dSmrg      if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
7003266e564dSmrg        _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'
7004266e564dSmrg	# If the export-symbols file already is a .def file (1st line
7005266e564dSmrg	# is EXPORTS), use it as is; otherwise, prepend...
7006266e564dSmrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
7007266e564dSmrg	  cp $export_symbols $output_objdir/$soname.def;
7008266e564dSmrg	else
7009266e564dSmrg	  echo EXPORTS > $output_objdir/$soname.def;
7010266e564dSmrg	  cat $export_symbols >> $output_objdir/$soname.def;
7011266e564dSmrg	fi~
7012266e564dSmrg	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
7013266e564dSmrg      else
7014266e564dSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
7015266e564dSmrg      fi
7016266e564dSmrg      ;;
7017266e564dSmrg
7018266e564dSmrg    interix3*)
7019266e564dSmrg      _LT_AC_TAGVAR(hardcode_direct, $1)=no
7020266e564dSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7021266e564dSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7022266e564dSmrg      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7023266e564dSmrg      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
7024266e564dSmrg      # Instead, shared libraries are loaded at an image base (0x10000000 by
7025266e564dSmrg      # default) and relocated if they conflict, which is a slow very memory
7026266e564dSmrg      # consuming and fragmenting process.  To avoid this, we pick a random,
7027266e564dSmrg      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
7028266e564dSmrg      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
7029266e564dSmrg      _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'
7030266e564dSmrg      _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'
7031266e564dSmrg      ;;
7032266e564dSmrg
7033266e564dSmrg    linux*)
7034266e564dSmrg      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
7035266e564dSmrg	tmp_addflag=
7036266e564dSmrg	case $cc_basename,$host_cpu in
7037266e564dSmrg	pgcc*)				# Portland Group C compiler
7038266e564dSmrg	  _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'
7039266e564dSmrg	  tmp_addflag=' $pic_flag'
7040266e564dSmrg	  ;;
7041266e564dSmrg	pgf77* | pgf90* | pgf95*)	# Portland Group f77 and f90 compilers
7042266e564dSmrg	  _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'
7043266e564dSmrg	  tmp_addflag=' $pic_flag -Mnomain' ;;
7044266e564dSmrg	ecc*,ia64* | icc*,ia64*)		# Intel C compiler on ia64
7045266e564dSmrg	  tmp_addflag=' -i_dynamic' ;;
7046266e564dSmrg	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
7047266e564dSmrg	  tmp_addflag=' -i_dynamic -nofor_main' ;;
7048266e564dSmrg	ifc* | ifort*)			# Intel Fortran compiler
7049266e564dSmrg	  tmp_addflag=' -nofor_main' ;;
7050266e564dSmrg	esac
7051266e564dSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7052266e564dSmrg
7053266e564dSmrg	if test $supports_anon_versioning = yes; then
7054266e564dSmrg	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~
7055266e564dSmrg  cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
7056266e564dSmrg  $echo "local: *; };" >> $output_objdir/$libname.ver~
7057266e564dSmrg	  $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
7058266e564dSmrg	fi
7059266e564dSmrg      else
7060266e564dSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
7061266e564dSmrg      fi
7062266e564dSmrg      ;;
7063266e564dSmrg
7064266e564dSmrg    netbsd*)
7065266e564dSmrg      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
7066266e564dSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
7067266e564dSmrg	wlarc=
7068266e564dSmrg      else
7069266e564dSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7070266e564dSmrg	_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'
7071266e564dSmrg      fi
7072266e564dSmrg      ;;
7073266e564dSmrg
7074266e564dSmrg    solaris*)
7075266e564dSmrg      if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
7076266e564dSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
7077266e564dSmrg	cat <<EOF 1>&2
7078266e564dSmrg
7079266e564dSmrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably
7080266e564dSmrg*** create shared libraries on Solaris systems.  Therefore, libtool
7081266e564dSmrg*** is disabling shared libraries support.  We urge you to upgrade GNU
7082266e564dSmrg*** binutils to release 2.9.1 or newer.  Another option is to modify
7083266e564dSmrg*** your PATH or compiler configuration so that the native linker is
7084266e564dSmrg*** used, and then restart.
7085266e564dSmrg
7086266e564dSmrgEOF
7087266e564dSmrg      elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
7088266e564dSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7089266e564dSmrg	_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'
7090266e564dSmrg      else
7091266e564dSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
7092266e564dSmrg      fi
7093266e564dSmrg      ;;
7094266e564dSmrg
7095266e564dSmrg    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
7096266e564dSmrg      case `$LD -v 2>&1` in
7097266e564dSmrg        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 
7098266e564dSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
7099266e564dSmrg	cat <<_LT_EOF 1>&2
7100266e564dSmrg
7101266e564dSmrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
7102266e564dSmrg*** reliably create shared libraries on SCO systems.  Therefore, libtool
7103266e564dSmrg*** is disabling shared libraries support.  We urge you to upgrade GNU
7104266e564dSmrg*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
7105266e564dSmrg*** your PATH or compiler configuration so that the native linker is
7106266e564dSmrg*** used, and then restart.
7107266e564dSmrg
7108266e564dSmrg_LT_EOF
7109266e564dSmrg	;;
7110266e564dSmrg	*)
7111266e564dSmrg	  if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
7112266e564dSmrg	    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
7113266e564dSmrg	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib'
7114266e564dSmrg	    _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'
7115266e564dSmrg	  else
7116266e564dSmrg	    _LT_AC_TAGVAR(ld_shlibs, $1)=no
7117266e564dSmrg	  fi
7118266e564dSmrg	;;
7119266e564dSmrg      esac
7120266e564dSmrg      ;;
7121266e564dSmrg
7122266e564dSmrg    sunos4*)
7123266e564dSmrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
7124266e564dSmrg      wlarc=
7125266e564dSmrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
7126266e564dSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7127266e564dSmrg      ;;
7128266e564dSmrg
7129266e564dSmrg    *)
7130266e564dSmrg      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
7131266e564dSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7132266e564dSmrg	_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'
7133266e564dSmrg      else
7134266e564dSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
7135266e564dSmrg      fi
7136266e564dSmrg      ;;
7137266e564dSmrg    esac
7138266e564dSmrg
7139266e564dSmrg    if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then
7140266e564dSmrg      runpath_var=
7141266e564dSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
7142266e564dSmrg      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
7143266e564dSmrg      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
7144266e564dSmrg    fi
7145266e564dSmrg  else
7146266e564dSmrg    # PORTME fill in a description of your system's linker (not GNU ld)
7147266e564dSmrg    case $host_os in
7148266e564dSmrg    aix3*)
7149266e564dSmrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
7150266e564dSmrg      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
7151266e564dSmrg      _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'
7152266e564dSmrg      # Note: this linker hardcodes the directories in LIBPATH if there
7153266e564dSmrg      # are no directories specified by -L.
7154266e564dSmrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
7155266e564dSmrg      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
7156266e564dSmrg	# Neither direct hardcoding nor static linking is supported with a
7157266e564dSmrg	# broken collect2.
7158266e564dSmrg	_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
7159266e564dSmrg      fi
7160266e564dSmrg      ;;
7161266e564dSmrg
7162266e564dSmrg    aix4* | aix5*)
7163266e564dSmrg      if test "$host_cpu" = ia64; then
7164266e564dSmrg	# On IA64, the linker does run time linking by default, so we don't
7165266e564dSmrg	# have to do anything special.
7166266e564dSmrg	aix_use_runtimelinking=no
7167266e564dSmrg	exp_sym_flag='-Bexport'
7168266e564dSmrg	no_entry_flag=""
7169266e564dSmrg      else
7170266e564dSmrg	# If we're using GNU nm, then we don't want the "-C" option.
7171266e564dSmrg	# -C means demangle to AIX nm, but means don't demangle with GNU nm
7172266e564dSmrg	if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
7173266e564dSmrg	  _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'
7174266e564dSmrg	else
7175266e564dSmrg	  _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'
7176266e564dSmrg	fi
7177266e564dSmrg	aix_use_runtimelinking=no
7178266e564dSmrg
7179266e564dSmrg	# Test if we are trying to use run time linking or normal
7180266e564dSmrg	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
7181266e564dSmrg	# need to do runtime linking.
7182266e564dSmrg	case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
7183266e564dSmrg	  for ld_flag in $LDFLAGS; do
7184266e564dSmrg  	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
7185266e564dSmrg  	    aix_use_runtimelinking=yes
7186266e564dSmrg  	    break
7187266e564dSmrg  	  fi
7188266e564dSmrg	  done
7189266e564dSmrg	  ;;
7190266e564dSmrg	esac
7191266e564dSmrg
7192266e564dSmrg	exp_sym_flag='-bexport'
7193266e564dSmrg	no_entry_flag='-bnoentry'
7194266e564dSmrg      fi
7195266e564dSmrg
7196266e564dSmrg      # When large executables or shared objects are built, AIX ld can
7197266e564dSmrg      # have problems creating the table of contents.  If linking a library
7198266e564dSmrg      # or program results in "error TOC overflow" add -mminimal-toc to
7199266e564dSmrg      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
7200266e564dSmrg      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
7201266e564dSmrg
7202266e564dSmrg      _LT_AC_TAGVAR(archive_cmds, $1)=''
7203266e564dSmrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
7204266e564dSmrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
7205266e564dSmrg      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
7206266e564dSmrg
7207266e564dSmrg      if test "$GCC" = yes; then
7208266e564dSmrg	case $host_os in aix4.[[012]]|aix4.[[012]].*)
7209266e564dSmrg	# We only want to do this on AIX 4.2 and lower, the check
7210266e564dSmrg	# below for broken collect2 doesn't work under 4.3+
7211266e564dSmrg	  collect2name=`${CC} -print-prog-name=collect2`
7212266e564dSmrg	  if test -f "$collect2name" && \
7213266e564dSmrg  	   strings "$collect2name" | grep resolve_lib_name >/dev/null
7214266e564dSmrg	  then
7215266e564dSmrg  	  # We have reworked collect2
7216266e564dSmrg  	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes
7217266e564dSmrg	  else
7218266e564dSmrg  	  # We have old collect2
7219266e564dSmrg  	  _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
7220266e564dSmrg  	  # It fails to find uninstalled libraries when the uninstalled
7221266e564dSmrg  	  # path is not listed in the libpath.  Setting hardcode_minus_L
7222266e564dSmrg  	  # to unsupported forces relinking
7223266e564dSmrg  	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
7224266e564dSmrg  	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7225266e564dSmrg  	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
7226266e564dSmrg	  fi
7227266e564dSmrg	  ;;
7228266e564dSmrg	esac
7229266e564dSmrg	shared_flag='-shared'
7230266e564dSmrg	if test "$aix_use_runtimelinking" = yes; then
7231266e564dSmrg	  shared_flag="$shared_flag "'${wl}-G'
7232266e564dSmrg	fi
7233266e564dSmrg      else
7234266e564dSmrg	# not using gcc
7235266e564dSmrg	if test "$host_cpu" = ia64; then
7236266e564dSmrg  	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
7237266e564dSmrg  	# chokes on -Wl,-G. The following line is correct:
7238266e564dSmrg	  shared_flag='-G'
7239266e564dSmrg	else
7240266e564dSmrg	  if test "$aix_use_runtimelinking" = yes; then
7241266e564dSmrg	    shared_flag='${wl}-G'
7242266e564dSmrg	  else
7243266e564dSmrg	    shared_flag='${wl}-bM:SRE'
7244266e564dSmrg	  fi
7245266e564dSmrg	fi
7246266e564dSmrg      fi
7247266e564dSmrg
7248266e564dSmrg      # It seems that -bexpall does not export symbols beginning with
7249266e564dSmrg      # underscore (_), so it is better to generate a list of symbols to export.
7250266e564dSmrg      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
7251266e564dSmrg      if test "$aix_use_runtimelinking" = yes; then
7252266e564dSmrg	# Warning - without using the other runtime loading flags (-brtl),
7253266e564dSmrg	# -berok will link without error, but may produce a broken library.
7254266e564dSmrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
7255266e564dSmrg       # Determine the default libpath from the value encoded in an empty executable.
7256266e564dSmrg       _LT_AC_SYS_LIBPATH_AIX
7257266e564dSmrg       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
7258266e564dSmrg	_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"
7259266e564dSmrg       else
7260266e564dSmrg	if test "$host_cpu" = ia64; then
7261266e564dSmrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
7262266e564dSmrg	  _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
7263266e564dSmrg	  _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"
7264266e564dSmrg	else
7265266e564dSmrg	 # Determine the default libpath from the value encoded in an empty executable.
7266266e564dSmrg	 _LT_AC_SYS_LIBPATH_AIX
7267266e564dSmrg	 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
7268266e564dSmrg	  # Warning - without using the other run time loading flags,
7269266e564dSmrg	  # -berok will link without error, but may produce a broken library.
7270266e564dSmrg	  _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
7271266e564dSmrg	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
7272266e564dSmrg	  # Exported symbols can be pulled into shared objects from archives
7273266e564dSmrg	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
7274266e564dSmrg	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
7275266e564dSmrg	  # This is similar to how AIX traditionally builds its shared libraries.
7276266e564dSmrg	  _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'
7277266e564dSmrg	fi
7278266e564dSmrg      fi
7279266e564dSmrg      ;;
7280266e564dSmrg
7281266e564dSmrg    amigaos*)
7282266e564dSmrg      _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)'
7283266e564dSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7284266e564dSmrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
7285266e564dSmrg      # see comment about different semantics on the GNU ld section
7286266e564dSmrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
7287266e564dSmrg      ;;
7288266e564dSmrg
7289266e564dSmrg    bsdi[[45]]*)
7290266e564dSmrg      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
7291266e564dSmrg      ;;
7292266e564dSmrg
7293266e564dSmrg    cygwin* | mingw* | pw32*)
7294266e564dSmrg      # When not using gcc, we currently assume that we are using
7295266e564dSmrg      # Microsoft Visual C++.
7296266e564dSmrg      # hardcode_libdir_flag_spec is actually meaningless, as there is
7297266e564dSmrg      # no search path for DLLs.
7298266e564dSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
7299266e564dSmrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
7300266e564dSmrg      # Tell ltmain to make .lib files, not .a files.
7301266e564dSmrg      libext=lib
7302266e564dSmrg      # Tell ltmain to make .dll files, not .so files.
7303266e564dSmrg      shrext_cmds=".dll"
7304266e564dSmrg      # FIXME: Setting linknames here is a bad hack.
7305266e564dSmrg      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
7306266e564dSmrg      # The linker will automatically build a .lib file if we build a DLL.
7307266e564dSmrg      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
7308266e564dSmrg      # FIXME: Should let the user specify the lib program.
7309266e564dSmrg      _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
7310266e564dSmrg      _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
7311266e564dSmrg      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
7312266e564dSmrg      ;;
7313266e564dSmrg
7314266e564dSmrg    darwin* | rhapsody*)
7315266e564dSmrg      case $host_os in
7316266e564dSmrg        rhapsody* | darwin1.[[012]])
7317266e564dSmrg         _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
7318266e564dSmrg         ;;
7319266e564dSmrg       *) # Darwin 1.3 on
7320266e564dSmrg         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
7321266e564dSmrg           _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
7322266e564dSmrg         else
7323266e564dSmrg           case ${MACOSX_DEPLOYMENT_TARGET} in
7324266e564dSmrg             10.[[012]])
7325266e564dSmrg               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
7326266e564dSmrg               ;;
7327266e564dSmrg             10.*)
7328266e564dSmrg               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
7329266e564dSmrg               ;;
7330266e564dSmrg           esac
7331266e564dSmrg         fi
7332266e564dSmrg         ;;
7333266e564dSmrg      esac
7334266e564dSmrg      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
7335266e564dSmrg      _LT_AC_TAGVAR(hardcode_direct, $1)=no
7336266e564dSmrg      _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
7337266e564dSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
7338266e564dSmrg      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
7339266e564dSmrg      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
7340266e564dSmrg    if test "$GCC" = yes ; then
7341266e564dSmrg    	output_verbose_link_cmd='echo'
7342266e564dSmrg        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
7343266e564dSmrg      _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
7344266e564dSmrg      # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
7345266e564dSmrg      _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}'
7346266e564dSmrg      _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}'
7347266e564dSmrg    else
7348266e564dSmrg      case $cc_basename in
7349266e564dSmrg        xlc*)
7350266e564dSmrg         output_verbose_link_cmd='echo'
7351266e564dSmrg         _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'
7352266e564dSmrg         _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
7353266e564dSmrg          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
7354266e564dSmrg         _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}'
7355266e564dSmrg          _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}'
7356266e564dSmrg          ;;
7357266e564dSmrg       *)
7358266e564dSmrg         _LT_AC_TAGVAR(ld_shlibs, $1)=no
7359266e564dSmrg          ;;
7360266e564dSmrg      esac
7361266e564dSmrg    fi
7362266e564dSmrg      ;;
7363266e564dSmrg
7364266e564dSmrg    dgux*)
7365266e564dSmrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7366266e564dSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7367266e564dSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7368266e564dSmrg      ;;
7369266e564dSmrg
7370266e564dSmrg    freebsd1*)
7371266e564dSmrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
7372266e564dSmrg      ;;
7373266e564dSmrg
7374266e564dSmrg    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
7375266e564dSmrg    # support.  Future versions do this automatically, but an explicit c++rt0.o
7376266e564dSmrg    # does not break anything, and helps significantly (at the cost of a little
7377266e564dSmrg    # extra space).
7378266e564dSmrg    freebsd2.2*)
7379266e564dSmrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
7380266e564dSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7381266e564dSmrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
7382266e564dSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7383266e564dSmrg      ;;
7384266e564dSmrg
7385266e564dSmrg    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
7386266e564dSmrg    freebsd2*)
7387266e564dSmrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
7388266e564dSmrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
7389266e564dSmrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
7390266e564dSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7391266e564dSmrg      ;;
7392266e564dSmrg
7393266e564dSmrg    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
7394266e564dSmrg    freebsd* | kfreebsd*-gnu | dragonfly*)
7395266e564dSmrg      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
7396266e564dSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7397266e564dSmrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
7398266e564dSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7399266e564dSmrg      ;;
7400266e564dSmrg
7401266e564dSmrg    hpux9*)
7402266e564dSmrg      if test "$GCC" = yes; then
7403266e564dSmrg	_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'
7404266e564dSmrg      else
7405266e564dSmrg	_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'
7406266e564dSmrg      fi
7407266e564dSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
7408266e564dSmrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
7409266e564dSmrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
7410266e564dSmrg
7411266e564dSmrg      # hardcode_minus_L: Not really in the search PATH,
7412266e564dSmrg      # but as the default location of the library.
7413266e564dSmrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
7414266e564dSmrg      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7415266e564dSmrg      ;;
7416266e564dSmrg
7417266e564dSmrg    hpux10*)
7418266e564dSmrg      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
7419266e564dSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
7420266e564dSmrg      else
7421266e564dSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
7422266e564dSmrg      fi
7423266e564dSmrg      if test "$with_gnu_ld" = no; then
7424266e564dSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
7425266e564dSmrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
7426266e564dSmrg
7427266e564dSmrg	_LT_AC_TAGVAR(hardcode_direct, $1)=yes
7428266e564dSmrg	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7429266e564dSmrg
7430266e564dSmrg	# hardcode_minus_L: Not really in the search PATH,
7431266e564dSmrg	# but as the default location of the library.
7432266e564dSmrg	_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
7433266e564dSmrg      fi
7434266e564dSmrg      ;;
7435266e564dSmrg
7436266e564dSmrg    hpux11*)
7437266e564dSmrg      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
7438266e564dSmrg	case $host_cpu in
7439266e564dSmrg	hppa*64*)
7440266e564dSmrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
7441266e564dSmrg	  ;;
7442266e564dSmrg	ia64*)
7443266e564dSmrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
7444266e564dSmrg	  ;;
7445266e564dSmrg	*)
7446266e564dSmrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
7447266e564dSmrg	  ;;
7448266e564dSmrg	esac
7449266e564dSmrg      else
7450266e564dSmrg	case $host_cpu in
7451266e564dSmrg	hppa*64*)
7452266e564dSmrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
7453266e564dSmrg	  ;;
7454266e564dSmrg	ia64*)
7455266e564dSmrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
7456266e564dSmrg	  ;;
7457266e564dSmrg	*)
7458266e564dSmrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
7459266e564dSmrg	  ;;
7460266e564dSmrg	esac
7461266e564dSmrg      fi
7462266e564dSmrg      if test "$with_gnu_ld" = no; then
7463266e564dSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
7464266e564dSmrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
7465266e564dSmrg
7466266e564dSmrg	case $host_cpu in
7467266e564dSmrg	hppa*64*|ia64*)
7468266e564dSmrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
7469266e564dSmrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=no
7470266e564dSmrg	  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7471266e564dSmrg	  ;;
7472266e564dSmrg	*)
7473266e564dSmrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes
7474266e564dSmrg	  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7475266e564dSmrg
7476266e564dSmrg	  # hardcode_minus_L: Not really in the search PATH,
7477266e564dSmrg	  # but as the default location of the library.
7478266e564dSmrg	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
7479266e564dSmrg	  ;;
7480266e564dSmrg	esac
7481266e564dSmrg      fi
7482266e564dSmrg      ;;
7483266e564dSmrg
7484266e564dSmrg    irix5* | irix6* | nonstopux*)
7485266e564dSmrg      if test "$GCC" = yes; then
7486266e564dSmrg	_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'
7487266e564dSmrg      else
7488266e564dSmrg	_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'
7489266e564dSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
7490266e564dSmrg      fi
7491266e564dSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7492266e564dSmrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
7493266e564dSmrg      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
7494266e564dSmrg      ;;
7495266e564dSmrg
7496266e564dSmrg    netbsd*)
7497266e564dSmrg      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
7498266e564dSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
7499266e564dSmrg      else
7500266e564dSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
7501266e564dSmrg      fi
7502266e564dSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7503266e564dSmrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
7504266e564dSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7505266e564dSmrg      ;;
7506266e564dSmrg
7507266e564dSmrg    newsos6)
7508266e564dSmrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7509266e564dSmrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
7510266e564dSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7511266e564dSmrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
7512266e564dSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7513266e564dSmrg      ;;
7514266e564dSmrg
7515266e564dSmrg    openbsd*)
7516266e564dSmrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
7517266e564dSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7518266e564dSmrg      if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
7519266e564dSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
7520266e564dSmrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
7521266e564dSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7522266e564dSmrg	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7523266e564dSmrg      else
7524266e564dSmrg       case $host_os in
7525266e564dSmrg	 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
7526266e564dSmrg	   _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
7527266e564dSmrg	   _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7528266e564dSmrg	   ;;
7529266e564dSmrg	 *)
7530266e564dSmrg	   _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
7531266e564dSmrg	   _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7532266e564dSmrg	   ;;
7533266e564dSmrg       esac
7534266e564dSmrg      fi
7535266e564dSmrg      ;;
7536266e564dSmrg
7537266e564dSmrg    os2*)
7538266e564dSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7539266e564dSmrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
7540266e564dSmrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
7541266e564dSmrg      _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'
7542266e564dSmrg      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
7543266e564dSmrg      ;;
7544266e564dSmrg
7545266e564dSmrg    osf3*)
7546266e564dSmrg      if test "$GCC" = yes; then
7547266e564dSmrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
7548266e564dSmrg	_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'
7549266e564dSmrg      else
7550266e564dSmrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
7551266e564dSmrg	_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'
7552266e564dSmrg      fi
7553266e564dSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7554266e564dSmrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
7555266e564dSmrg      ;;
7556266e564dSmrg
7557266e564dSmrg    osf4* | osf5*)	# as osf3* with the addition of -msym flag
7558266e564dSmrg      if test "$GCC" = yes; then
7559266e564dSmrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
7560266e564dSmrg	_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'
7561266e564dSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7562266e564dSmrg      else
7563266e564dSmrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
7564266e564dSmrg	_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'
7565266e564dSmrg	_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~
7566266e564dSmrg	$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'
7567266e564dSmrg
7568266e564dSmrg	# Both c and cxx compiler support -rpath directly
7569266e564dSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
7570266e564dSmrg      fi
7571266e564dSmrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
7572266e564dSmrg      ;;
7573266e564dSmrg
7574266e564dSmrg    solaris*)
7575266e564dSmrg      _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
7576266e564dSmrg      if test "$GCC" = yes; then
7577266e564dSmrg	wlarc='${wl}'
7578266e564dSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
7579266e564dSmrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
7580266e564dSmrg	  $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
7581266e564dSmrg      else
7582266e564dSmrg	wlarc=''
7583266e564dSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
7584266e564dSmrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
7585266e564dSmrg  	$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
7586266e564dSmrg      fi
7587266e564dSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7588266e564dSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7589266e564dSmrg      case $host_os in
7590266e564dSmrg      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
7591266e564dSmrg      *)
7592266e564dSmrg 	# The compiler driver will combine linker options so we
7593266e564dSmrg 	# cannot just pass the convience library names through
7594266e564dSmrg 	# without $wl, iff we do not link with $LD.
7595266e564dSmrg 	# Luckily, gcc supports the same syntax we need for Sun Studio.
7596266e564dSmrg 	# Supported since Solaris 2.6 (maybe 2.5.1?)
7597266e564dSmrg 	case $wlarc in
7598266e564dSmrg 	'')
7599266e564dSmrg 	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
7600266e564dSmrg 	*)
7601266e564dSmrg 	  _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' ;;
7602266e564dSmrg 	esac ;;
7603266e564dSmrg      esac
7604266e564dSmrg      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
7605266e564dSmrg      ;;
7606266e564dSmrg
7607266e564dSmrg    sunos4*)
7608266e564dSmrg      if test "x$host_vendor" = xsequent; then
7609266e564dSmrg	# Use $CC to link under sequent, because it throws in some extra .o
7610266e564dSmrg	# files that make .init and .fini sections work.
7611266e564dSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
7612266e564dSmrg      else
7613266e564dSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
7614266e564dSmrg      fi
7615266e564dSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7616266e564dSmrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
7617266e564dSmrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
7618266e564dSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7619266e564dSmrg      ;;
7620266e564dSmrg
7621266e564dSmrg    sysv4)
7622266e564dSmrg      case $host_vendor in
7623266e564dSmrg	sni)
7624266e564dSmrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7625266e564dSmrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
7626266e564dSmrg	;;
7627266e564dSmrg	siemens)
7628266e564dSmrg	  ## LD is ld it makes a PLAMLIB
7629266e564dSmrg	  ## CC just makes a GrossModule.
7630266e564dSmrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
7631266e564dSmrg	  _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
7632266e564dSmrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=no
7633266e564dSmrg        ;;
7634266e564dSmrg	motorola)
7635266e564dSmrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7636266e564dSmrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
7637266e564dSmrg	;;
7638266e564dSmrg      esac
7639266e564dSmrg      runpath_var='LD_RUN_PATH'
7640266e564dSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7641266e564dSmrg      ;;
7642266e564dSmrg
7643266e564dSmrg    sysv4.3*)
7644266e564dSmrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7645266e564dSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7646266e564dSmrg      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
7647266e564dSmrg      ;;
7648266e564dSmrg
7649266e564dSmrg    sysv4*MP*)
7650266e564dSmrg      if test -d /usr/nec; then
7651266e564dSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7652266e564dSmrg	_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7653266e564dSmrg	runpath_var=LD_RUN_PATH
7654266e564dSmrg	hardcode_runpath_var=yes
7655266e564dSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=yes
7656266e564dSmrg      fi
7657266e564dSmrg      ;;
7658266e564dSmrg
7659266e564dSmrg    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7*)
7660266e564dSmrg      _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
7661266e564dSmrg      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
7662266e564dSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7663266e564dSmrg      runpath_var='LD_RUN_PATH'
7664266e564dSmrg
7665266e564dSmrg      if test "$GCC" = yes; then
7666266e564dSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7667266e564dSmrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7668266e564dSmrg      else
7669266e564dSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7670266e564dSmrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7671266e564dSmrg      fi
7672266e564dSmrg      ;;
7673266e564dSmrg
7674266e564dSmrg    sysv5* | sco3.2v5* | sco5v6*)
7675266e564dSmrg      # Note: We can NOT use -z defs as we might desire, because we do not
7676266e564dSmrg      # link with -lc, and that would cause any symbols used from libc to
7677266e564dSmrg      # always be unresolved, which means just about no library would
7678266e564dSmrg      # ever link correctly.  If we're not using GNU ld we use -z text
7679266e564dSmrg      # though, which does catch some bad symbols but isn't as heavy-handed
7680266e564dSmrg      # as -z defs.
7681266e564dSmrg      _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
7682266e564dSmrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
7683266e564dSmrg      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
7684266e564dSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7685266e564dSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
7686266e564dSmrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
7687266e564dSmrg      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
7688266e564dSmrg      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
7689266e564dSmrg      runpath_var='LD_RUN_PATH'
7690266e564dSmrg
7691266e564dSmrg      if test "$GCC" = yes; then
7692266e564dSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
7693266e564dSmrg	_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'
7694266e564dSmrg      else
7695266e564dSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
7696266e564dSmrg	_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'
7697266e564dSmrg      fi
7698266e564dSmrg      ;;
7699266e564dSmrg
7700266e564dSmrg    uts4*)
7701266e564dSmrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7702266e564dSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7703266e564dSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7704266e564dSmrg      ;;
7705266e564dSmrg
7706266e564dSmrg    *)
7707266e564dSmrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
7708266e564dSmrg      ;;
7709266e564dSmrg    esac
7710266e564dSmrg  fi
7711266e564dSmrg])
7712266e564dSmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
7713266e564dSmrgtest "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
7714266e564dSmrg
7715266e564dSmrg#
7716266e564dSmrg# Do we need to explicitly link libc?
7717266e564dSmrg#
7718266e564dSmrgcase "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
7719266e564dSmrgx|xyes)
7720266e564dSmrg  # Assume -lc should be added
7721266e564dSmrg  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
7722266e564dSmrg
7723266e564dSmrg  if test "$enable_shared" = yes && test "$GCC" = yes; then
7724266e564dSmrg    case $_LT_AC_TAGVAR(archive_cmds, $1) in
7725266e564dSmrg    *'~'*)
7726266e564dSmrg      # FIXME: we may have to deal with multi-command sequences.
7727266e564dSmrg      ;;
7728266e564dSmrg    '$CC '*)
7729266e564dSmrg      # Test whether the compiler implicitly links with -lc since on some
7730266e564dSmrg      # systems, -lgcc has to come before -lc. If gcc already passes -lc
7731266e564dSmrg      # to ld, don't add -lc before -lgcc.
7732266e564dSmrg      AC_MSG_CHECKING([whether -lc should be explicitly linked in])
7733266e564dSmrg      $rm conftest*
7734266e564dSmrg      printf "$lt_simple_compile_test_code" > conftest.$ac_ext
7735266e564dSmrg
7736266e564dSmrg      if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
7737266e564dSmrg        soname=conftest
7738266e564dSmrg        lib=conftest
7739266e564dSmrg        libobjs=conftest.$ac_objext
7740266e564dSmrg        deplibs=
7741266e564dSmrg        wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
7742266e564dSmrg	pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
7743266e564dSmrg        compiler_flags=-v
7744266e564dSmrg        linker_flags=-v
7745266e564dSmrg        verstring=
7746266e564dSmrg        output_objdir=.
7747266e564dSmrg        libname=conftest
7748266e564dSmrg        lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
7749266e564dSmrg        _LT_AC_TAGVAR(allow_undefined_flag, $1)=
7750266e564dSmrg        if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
7751266e564dSmrg        then
7752266e564dSmrg	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
7753266e564dSmrg        else
7754266e564dSmrg	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
7755266e564dSmrg        fi
7756266e564dSmrg        _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
7757266e564dSmrg      else
7758266e564dSmrg        cat conftest.err 1>&5
7759266e564dSmrg      fi
7760266e564dSmrg      $rm conftest*
7761266e564dSmrg      AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
7762266e564dSmrg      ;;
7763266e564dSmrg    esac
7764266e564dSmrg  fi
7765266e564dSmrg  ;;
7766266e564dSmrgesac
7767266e564dSmrg])# AC_LIBTOOL_PROG_LD_SHLIBS
7768266e564dSmrg
7769266e564dSmrg
7770266e564dSmrg# _LT_AC_FILE_LTDLL_C
7771266e564dSmrg# -------------------
7772266e564dSmrg# Be careful that the start marker always follows a newline.
7773266e564dSmrgAC_DEFUN([_LT_AC_FILE_LTDLL_C], [
7774266e564dSmrg# /* ltdll.c starts here */
7775266e564dSmrg# #define WIN32_LEAN_AND_MEAN
7776266e564dSmrg# #include <windows.h>
7777266e564dSmrg# #undef WIN32_LEAN_AND_MEAN
7778266e564dSmrg# #include <stdio.h>
7779266e564dSmrg#
7780266e564dSmrg# #ifndef __CYGWIN__
7781266e564dSmrg# #  ifdef __CYGWIN32__
7782266e564dSmrg# #    define __CYGWIN__ __CYGWIN32__
7783266e564dSmrg# #  endif
7784266e564dSmrg# #endif
7785266e564dSmrg#
7786266e564dSmrg# #ifdef __cplusplus
7787266e564dSmrg# extern "C" {
7788266e564dSmrg# #endif
7789266e564dSmrg# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
7790266e564dSmrg# #ifdef __cplusplus
7791266e564dSmrg# }
7792266e564dSmrg# #endif
7793266e564dSmrg#
7794266e564dSmrg# #ifdef __CYGWIN__
7795266e564dSmrg# #include <cygwin/cygwin_dll.h>
7796266e564dSmrg# DECLARE_CYGWIN_DLL( DllMain );
7797266e564dSmrg# #endif
7798266e564dSmrg# HINSTANCE __hDllInstance_base;
7799266e564dSmrg#
7800266e564dSmrg# BOOL APIENTRY
7801266e564dSmrg# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
7802266e564dSmrg# {
7803266e564dSmrg#   __hDllInstance_base = hInst;
7804266e564dSmrg#   return TRUE;
7805266e564dSmrg# }
7806266e564dSmrg# /* ltdll.c ends here */
7807266e564dSmrg])# _LT_AC_FILE_LTDLL_C
7808266e564dSmrg
7809266e564dSmrg
7810266e564dSmrg# _LT_AC_TAGVAR(VARNAME, [TAGNAME])
7811266e564dSmrg# ---------------------------------
7812266e564dSmrgAC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
7813266e564dSmrg
7814266e564dSmrg
7815266e564dSmrg# old names
7816266e564dSmrgAC_DEFUN([AM_PROG_LIBTOOL],   [AC_PROG_LIBTOOL])
7817266e564dSmrgAC_DEFUN([AM_ENABLE_SHARED],  [AC_ENABLE_SHARED($@)])
7818266e564dSmrgAC_DEFUN([AM_ENABLE_STATIC],  [AC_ENABLE_STATIC($@)])
7819266e564dSmrgAC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
7820266e564dSmrgAC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
7821266e564dSmrgAC_DEFUN([AM_PROG_LD],        [AC_PROG_LD])
7822266e564dSmrgAC_DEFUN([AM_PROG_NM],        [AC_PROG_NM])
7823266e564dSmrg
7824266e564dSmrg# This is just to silence aclocal about the macro not being used
7825266e564dSmrgifelse([AC_DISABLE_FAST_INSTALL])
7826266e564dSmrg
7827266e564dSmrgAC_DEFUN([LT_AC_PROG_GCJ],
7828266e564dSmrg[AC_CHECK_TOOL(GCJ, gcj, no)
7829266e564dSmrg  test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
7830266e564dSmrg  AC_SUBST(GCJFLAGS)
7831266e564dSmrg])
7832266e564dSmrg
7833266e564dSmrgAC_DEFUN([LT_AC_PROG_RC],
7834266e564dSmrg[AC_CHECK_TOOL(RC, windres, no)
7835266e564dSmrg])
7836266e564dSmrg
7837266e564dSmrg# NOTE: This macro has been submitted for inclusion into   #
7838266e564dSmrg#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
7839266e564dSmrg#  a released version of Autoconf we should remove this    #
7840266e564dSmrg#  macro and use it instead.                               #
7841266e564dSmrg# LT_AC_PROG_SED
7842266e564dSmrg# --------------
7843266e564dSmrg# Check for a fully-functional sed program, that truncates
7844266e564dSmrg# as few characters as possible.  Prefer GNU sed if found.
7845266e564dSmrgAC_DEFUN([LT_AC_PROG_SED],
7846266e564dSmrg[AC_MSG_CHECKING([for a sed that does not truncate output])
7847266e564dSmrgAC_CACHE_VAL(lt_cv_path_SED,
7848266e564dSmrg[# Loop through the user's path and test for sed and gsed.
7849266e564dSmrg# Then use that list of sed's as ones to test for truncation.
7850266e564dSmrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7851266e564dSmrgfor as_dir in $PATH
7852266e564dSmrgdo
7853266e564dSmrg  IFS=$as_save_IFS
7854266e564dSmrg  test -z "$as_dir" && as_dir=.
7855266e564dSmrg  for lt_ac_prog in sed gsed; do
7856266e564dSmrg    for ac_exec_ext in '' $ac_executable_extensions; do
7857266e564dSmrg      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
7858266e564dSmrg        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
7859266e564dSmrg      fi
7860266e564dSmrg    done
7861266e564dSmrg  done
7862266e564dSmrgdone
7863266e564dSmrglt_ac_max=0
7864266e564dSmrglt_ac_count=0
7865266e564dSmrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris
7866266e564dSmrg# along with /bin/sed that truncates output.
7867266e564dSmrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
7868266e564dSmrg  test ! -f $lt_ac_sed && continue
7869266e564dSmrg  cat /dev/null > conftest.in
7870266e564dSmrg  lt_ac_count=0
7871266e564dSmrg  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
7872266e564dSmrg  # Check for GNU sed and select it if it is found.
7873266e564dSmrg  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
7874266e564dSmrg    lt_cv_path_SED=$lt_ac_sed
7875266e564dSmrg    break
7876266e564dSmrg  fi
7877266e564dSmrg  while true; do
7878266e564dSmrg    cat conftest.in conftest.in >conftest.tmp
7879266e564dSmrg    mv conftest.tmp conftest.in
7880266e564dSmrg    cp conftest.in conftest.nl
7881266e564dSmrg    echo >>conftest.nl
7882266e564dSmrg    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
7883266e564dSmrg    cmp -s conftest.out conftest.nl || break
7884266e564dSmrg    # 10000 chars as input seems more than enough
7885266e564dSmrg    test $lt_ac_count -gt 10 && break
7886266e564dSmrg    lt_ac_count=`expr $lt_ac_count + 1`
7887266e564dSmrg    if test $lt_ac_count -gt $lt_ac_max; then
7888266e564dSmrg      lt_ac_max=$lt_ac_count
7889266e564dSmrg      lt_cv_path_SED=$lt_ac_sed
7890266e564dSmrg    fi
7891266e564dSmrg  done
7892266e564dSmrgdone
7893266e564dSmrg])
7894266e564dSmrgSED=$lt_cv_path_SED
7895266e564dSmrgAC_MSG_RESULT([$SED])
7896266e564dSmrg])
7897266e564dSmrg
7898266e564dSmrg# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
7899266e564dSmrg# 
7900266e564dSmrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
7901266e564dSmrg#
7902266e564dSmrg# This program is free software; you can redistribute it and/or modify
7903266e564dSmrg# it under the terms of the GNU General Public License as published by
7904266e564dSmrg# the Free Software Foundation; either version 2 of the License, or
7905266e564dSmrg# (at your option) any later version.
7906266e564dSmrg#
7907266e564dSmrg# This program is distributed in the hope that it will be useful, but
7908266e564dSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of
7909266e564dSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
7910266e564dSmrg# General Public License for more details.
7911266e564dSmrg#
7912266e564dSmrg# You should have received a copy of the GNU General Public License
7913266e564dSmrg# along with this program; if not, write to the Free Software
7914266e564dSmrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7915266e564dSmrg#
7916266e564dSmrg# As a special exception to the GNU General Public License, if you
7917266e564dSmrg# distribute this file as part of a program that contains a
7918266e564dSmrg# configuration script generated by Autoconf, you may include it under
7919266e564dSmrg# the same distribution terms that you use for the rest of that program.
7920266e564dSmrg
7921266e564dSmrg# PKG_PROG_PKG_CONFIG([MIN-VERSION])
7922266e564dSmrg# ----------------------------------
7923266e564dSmrgAC_DEFUN([PKG_PROG_PKG_CONFIG],
7924266e564dSmrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
7925266e564dSmrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$])
7926266e564dSmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
7927266e564dSmrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
7928266e564dSmrg	AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
7929266e564dSmrgfi
7930266e564dSmrgif test -n "$PKG_CONFIG"; then
7931266e564dSmrg	_pkg_min_version=m4_ifval([$1], [$1], [0.9.0])
7932266e564dSmrg	AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
7933266e564dSmrg	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
7934266e564dSmrg		AC_MSG_RESULT([yes])
7935266e564dSmrg	else
7936266e564dSmrg		AC_MSG_RESULT([no])
7937266e564dSmrg		PKG_CONFIG=""
7938266e564dSmrg	fi
7939266e564dSmrg		
7940266e564dSmrgfi[]dnl
7941266e564dSmrg])# PKG_PROG_PKG_CONFIG
7942266e564dSmrg
7943266e564dSmrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
7944266e564dSmrg#
7945266e564dSmrg# Check to see whether a particular set of modules exists.  Similar
7946266e564dSmrg# to PKG_CHECK_MODULES(), but does not set variables or print errors.
7947266e564dSmrg#
7948266e564dSmrg#
7949266e564dSmrg# Similar to PKG_CHECK_MODULES, make sure that the first instance of
7950266e564dSmrg# this or PKG_CHECK_MODULES is called, or make sure to call
7951266e564dSmrg# PKG_CHECK_EXISTS manually
7952266e564dSmrg# --------------------------------------------------------------
7953266e564dSmrgAC_DEFUN([PKG_CHECK_EXISTS],
7954266e564dSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
7955266e564dSmrgif test -n "$PKG_CONFIG" && \
7956266e564dSmrg    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
7957266e564dSmrg  m4_ifval([$2], [$2], [:])
7958266e564dSmrgm4_ifvaln([$3], [else
7959266e564dSmrg  $3])dnl
7960266e564dSmrgfi])
7961266e564dSmrg
7962266e564dSmrg
7963266e564dSmrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
7964266e564dSmrg# ---------------------------------------------
7965266e564dSmrgm4_define([_PKG_CONFIG],
7966266e564dSmrg[if test -n "$PKG_CONFIG"; then
7967266e564dSmrg        PKG_CHECK_EXISTS([$3],
7968266e564dSmrg                         [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
7969266e564dSmrg			 [pkg_failed=yes])
7970266e564dSmrgelse
7971266e564dSmrg	pkg_failed=untried
7972266e564dSmrgfi[]dnl
7973266e564dSmrg])# _PKG_CONFIG
7974266e564dSmrg
7975266e564dSmrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
7976266e564dSmrg# [ACTION-IF-NOT-FOUND])
7977266e564dSmrg#
7978266e564dSmrg#
7979266e564dSmrg# Note that if there is a possibility the first call to
7980266e564dSmrg# PKG_CHECK_MODULES might not happen, you should be sure to include an
7981266e564dSmrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
7982266e564dSmrg#
7983266e564dSmrg#
7984266e564dSmrg# --------------------------------------------------------------
7985266e564dSmrgAC_DEFUN([PKG_CHECK_MODULES],
7986266e564dSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
7987266e564dSmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
7988266e564dSmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
7989266e564dSmrg
7990266e564dSmrgpkg_failed=no
7991266e564dSmrgAC_MSG_CHECKING([for $1])
7992266e564dSmrg
7993266e564dSmrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
7994266e564dSmrg_PKG_CONFIG([$1][_LIBS], [libs], [$2])
7995266e564dSmrg
7996266e564dSmrgif test $pkg_failed = yes; then
7997266e564dSmrg	$1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
7998266e564dSmrg	# Put the nasty error message in config.log where it belongs
7999266e564dSmrg	echo "$$1[]_PKG_ERRORS" 1>&AS_MESSAGE_LOG_FD
8000266e564dSmrg
8001266e564dSmrg	ifelse([$4], , [AC_MSG_ERROR(dnl
8002266e564dSmrg[Package requirements ($2) were not met.
8003266e564dSmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you
8004266e564dSmrginstalled software in a non-standard prefix.
8005266e564dSmrg
8006266e564dSmrgAlternatively you may set the $1_CFLAGS and $1_LIBS environment variables
8007266e564dSmrgto avoid the need to call pkg-config.  See the pkg-config man page for
8008266e564dSmrgmore details.])],
8009266e564dSmrg		[$4])
8010266e564dSmrgelif test $pkg_failed = untried; then
8011266e564dSmrg	ifelse([$4], , [AC_MSG_FAILURE(dnl
8012266e564dSmrg[The pkg-config script could not be found or is too old.  Make sure it
8013266e564dSmrgis in your PATH or set the PKG_CONFIG environment variable to the full
8014266e564dSmrgpath to pkg-config.
8015266e564dSmrg
8016266e564dSmrgAlternatively you may set the $1_CFLAGS and $1_LIBS environment variables
8017266e564dSmrgto avoid the need to call pkg-config.  See the pkg-config man page for
8018266e564dSmrgmore details.
8019266e564dSmrg
8020266e564dSmrgTo get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.])],
8021266e564dSmrg		[$4])
8022266e564dSmrgelse
8023266e564dSmrg	$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
8024266e564dSmrg	$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
8025266e564dSmrg        AC_MSG_RESULT([yes])
8026266e564dSmrg	ifelse([$3], , :, [$3])
8027266e564dSmrgfi[]dnl
8028266e564dSmrg])# PKG_CHECK_MODULES
8029266e564dSmrg
8030