aclocal.m4 revision ff559fab
1ff559fabSmrg# generated automatically by aclocal 1.9.6 -*- Autoconf -*-
2ff559fabSmrg
3ff559fabSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4ff559fabSmrg# 2005  Free Software Foundation, Inc.
5ff559fabSmrg# This file is free software; the Free Software Foundation
6ff559fabSmrg# gives unlimited permission to copy and/or distribute it,
7ff559fabSmrg# with or without modifications, as long as this notice is preserved.
8ff559fabSmrg
9ff559fabSmrg# This program is distributed in the hope that it will be useful,
10ff559fabSmrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11ff559fabSmrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12ff559fabSmrg# PARTICULAR PURPOSE.
13ff559fabSmrg
14ff559fabSmrg# Copyright (C) 2002, 2003, 2005  Free Software Foundation, Inc.
15ff559fabSmrg#
16ff559fabSmrg# This file is free software; the Free Software Foundation
17ff559fabSmrg# gives unlimited permission to copy and/or distribute it,
18ff559fabSmrg# with or without modifications, as long as this notice is preserved.
19ff559fabSmrg
20ff559fabSmrg# AM_AUTOMAKE_VERSION(VERSION)
21ff559fabSmrg# ----------------------------
22ff559fabSmrg# Automake X.Y traces this macro to ensure aclocal.m4 has been
23ff559fabSmrg# generated from the m4 files accompanying Automake X.Y.
24ff559fabSmrgAC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])
25ff559fabSmrg
26ff559fabSmrg# AM_SET_CURRENT_AUTOMAKE_VERSION
27ff559fabSmrg# -------------------------------
28ff559fabSmrg# Call AM_AUTOMAKE_VERSION so it can be traced.
29ff559fabSmrg# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
30ff559fabSmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
31ff559fabSmrg	 [AM_AUTOMAKE_VERSION([1.9.6])])
32ff559fabSmrg
33ff559fabSmrg# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
34ff559fabSmrg
35ff559fabSmrg# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
36ff559fabSmrg#
37ff559fabSmrg# This file is free software; the Free Software Foundation
38ff559fabSmrg# gives unlimited permission to copy and/or distribute it,
39ff559fabSmrg# with or without modifications, as long as this notice is preserved.
40ff559fabSmrg
41ff559fabSmrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
42ff559fabSmrg# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
43ff559fabSmrg# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
44ff559fabSmrg#
45ff559fabSmrg# Of course, Automake must honor this variable whenever it calls a
46ff559fabSmrg# tool from the auxiliary directory.  The problem is that $srcdir (and
47ff559fabSmrg# therefore $ac_aux_dir as well) can be either absolute or relative,
48ff559fabSmrg# depending on how configure is run.  This is pretty annoying, since
49ff559fabSmrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top
50ff559fabSmrg# source directory, any form will work fine, but in subdirectories a
51ff559fabSmrg# relative path needs to be adjusted first.
52ff559fabSmrg#
53ff559fabSmrg# $ac_aux_dir/missing
54ff559fabSmrg#    fails when called from a subdirectory if $ac_aux_dir is relative
55ff559fabSmrg# $top_srcdir/$ac_aux_dir/missing
56ff559fabSmrg#    fails if $ac_aux_dir is absolute,
57ff559fabSmrg#    fails when called from a subdirectory in a VPATH build with
58ff559fabSmrg#          a relative $ac_aux_dir
59ff559fabSmrg#
60ff559fabSmrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
61ff559fabSmrg# are both prefixed by $srcdir.  In an in-source build this is usually
62ff559fabSmrg# harmless because $srcdir is `.', but things will broke when you
63ff559fabSmrg# start a VPATH build or use an absolute $srcdir.
64ff559fabSmrg#
65ff559fabSmrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
66ff559fabSmrg# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
67ff559fabSmrg#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
68ff559fabSmrg# and then we would define $MISSING as
69ff559fabSmrg#   MISSING="\${SHELL} $am_aux_dir/missing"
70ff559fabSmrg# This will work as long as MISSING is not called from configure, because
71ff559fabSmrg# unfortunately $(top_srcdir) has no meaning in configure.
72ff559fabSmrg# However there are other variables, like CC, which are often used in
73ff559fabSmrg# configure, and could therefore not use this "fixed" $ac_aux_dir.
74ff559fabSmrg#
75ff559fabSmrg# Another solution, used here, is to always expand $ac_aux_dir to an
76ff559fabSmrg# absolute PATH.  The drawback is that using absolute paths prevent a
77ff559fabSmrg# configured tree to be moved without reconfiguration.
78ff559fabSmrg
79ff559fabSmrgAC_DEFUN([AM_AUX_DIR_EXPAND],
80ff559fabSmrg[dnl Rely on autoconf to set up CDPATH properly.
81ff559fabSmrgAC_PREREQ([2.50])dnl
82ff559fabSmrg# expand $ac_aux_dir to an absolute path
83ff559fabSmrgam_aux_dir=`cd $ac_aux_dir && pwd`
84ff559fabSmrg])
85ff559fabSmrg
86ff559fabSmrg# AM_CONDITIONAL                                            -*- Autoconf -*-
87ff559fabSmrg
88ff559fabSmrg# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005
89ff559fabSmrg# Free Software Foundation, Inc.
90ff559fabSmrg#
91ff559fabSmrg# This file is free software; the Free Software Foundation
92ff559fabSmrg# gives unlimited permission to copy and/or distribute it,
93ff559fabSmrg# with or without modifications, as long as this notice is preserved.
94ff559fabSmrg
95ff559fabSmrg# serial 7
96ff559fabSmrg
97ff559fabSmrg# AM_CONDITIONAL(NAME, SHELL-CONDITION)
98ff559fabSmrg# -------------------------------------
99ff559fabSmrg# Define a conditional.
100ff559fabSmrgAC_DEFUN([AM_CONDITIONAL],
101ff559fabSmrg[AC_PREREQ(2.52)dnl
102ff559fabSmrg ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
103ff559fabSmrg	[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
104ff559fabSmrgAC_SUBST([$1_TRUE])
105ff559fabSmrgAC_SUBST([$1_FALSE])
106ff559fabSmrgif $2; then
107ff559fabSmrg  $1_TRUE=
108ff559fabSmrg  $1_FALSE='#'
109ff559fabSmrgelse
110ff559fabSmrg  $1_TRUE='#'
111ff559fabSmrg  $1_FALSE=
112ff559fabSmrgfi
113ff559fabSmrgAC_CONFIG_COMMANDS_PRE(
114ff559fabSmrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
115ff559fabSmrg  AC_MSG_ERROR([[conditional "$1" was never defined.
116ff559fabSmrgUsually this means the macro was only invoked conditionally.]])
117ff559fabSmrgfi])])
118ff559fabSmrg
119ff559fabSmrg
120ff559fabSmrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
121ff559fabSmrg# Free Software Foundation, Inc.
122ff559fabSmrg#
123ff559fabSmrg# This file is free software; the Free Software Foundation
124ff559fabSmrg# gives unlimited permission to copy and/or distribute it,
125ff559fabSmrg# with or without modifications, as long as this notice is preserved.
126ff559fabSmrg
127ff559fabSmrg# serial 8
128ff559fabSmrg
129ff559fabSmrg# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
130ff559fabSmrg# written in clear, in which case automake, when reading aclocal.m4,
131ff559fabSmrg# will think it sees a *use*, and therefore will trigger all it's
132ff559fabSmrg# C support machinery.  Also note that it means that autoscan, seeing
133ff559fabSmrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
134ff559fabSmrg
135ff559fabSmrg
136ff559fabSmrg# _AM_DEPENDENCIES(NAME)
137ff559fabSmrg# ----------------------
138ff559fabSmrg# See how the compiler implements dependency checking.
139ff559fabSmrg# NAME is "CC", "CXX", "GCJ", or "OBJC".
140ff559fabSmrg# We try a few techniques and use that to set a single cache variable.
141ff559fabSmrg#
142ff559fabSmrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
143ff559fabSmrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
144ff559fabSmrg# dependency, and given that the user is not expected to run this macro,
145ff559fabSmrg# just rely on AC_PROG_CC.
146ff559fabSmrgAC_DEFUN([_AM_DEPENDENCIES],
147ff559fabSmrg[AC_REQUIRE([AM_SET_DEPDIR])dnl
148ff559fabSmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
149ff559fabSmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl
150ff559fabSmrgAC_REQUIRE([AM_DEP_TRACK])dnl
151ff559fabSmrg
152ff559fabSmrgifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
153ff559fabSmrg       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
154ff559fabSmrg       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
155ff559fabSmrg       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
156ff559fabSmrg                   [depcc="$$1"   am_compiler_list=])
157ff559fabSmrg
158ff559fabSmrgAC_CACHE_CHECK([dependency style of $depcc],
159ff559fabSmrg               [am_cv_$1_dependencies_compiler_type],
160ff559fabSmrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
161ff559fabSmrg  # We make a subdir and do the tests there.  Otherwise we can end up
162ff559fabSmrg  # making bogus files that we don't know about and never remove.  For
163ff559fabSmrg  # instance it was reported that on HP-UX the gcc test will end up
164ff559fabSmrg  # making a dummy file named `D' -- because `-MD' means `put the output
165ff559fabSmrg  # in D'.
166ff559fabSmrg  mkdir conftest.dir
167ff559fabSmrg  # Copy depcomp to subdir because otherwise we won't find it if we're
168ff559fabSmrg  # using a relative directory.
169ff559fabSmrg  cp "$am_depcomp" conftest.dir
170ff559fabSmrg  cd conftest.dir
171ff559fabSmrg  # We will build objects and dependencies in a subdirectory because
172ff559fabSmrg  # it helps to detect inapplicable dependency modes.  For instance
173ff559fabSmrg  # both Tru64's cc and ICC support -MD to output dependencies as a
174ff559fabSmrg  # side effect of compilation, but ICC will put the dependencies in
175ff559fabSmrg  # the current directory while Tru64 will put them in the object
176ff559fabSmrg  # directory.
177ff559fabSmrg  mkdir sub
178ff559fabSmrg
179ff559fabSmrg  am_cv_$1_dependencies_compiler_type=none
180ff559fabSmrg  if test "$am_compiler_list" = ""; then
181ff559fabSmrg     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
182ff559fabSmrg  fi
183ff559fabSmrg  for depmode in $am_compiler_list; do
184ff559fabSmrg    # Setup a source with many dependencies, because some compilers
185ff559fabSmrg    # like to wrap large dependency lists on column 80 (with \), and
186ff559fabSmrg    # we should not choose a depcomp mode which is confused by this.
187ff559fabSmrg    #
188ff559fabSmrg    # We need to recreate these files for each test, as the compiler may
189ff559fabSmrg    # overwrite some of them when testing with obscure command lines.
190ff559fabSmrg    # This happens at least with the AIX C compiler.
191ff559fabSmrg    : > sub/conftest.c
192ff559fabSmrg    for i in 1 2 3 4 5 6; do
193ff559fabSmrg      echo '#include "conftst'$i'.h"' >> sub/conftest.c
194ff559fabSmrg      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
195ff559fabSmrg      # Solaris 8's {/usr,}/bin/sh.
196ff559fabSmrg      touch sub/conftst$i.h
197ff559fabSmrg    done
198ff559fabSmrg    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
199ff559fabSmrg
200ff559fabSmrg    case $depmode in
201ff559fabSmrg    nosideeffect)
202ff559fabSmrg      # after this tag, mechanisms are not by side-effect, so they'll
203ff559fabSmrg      # only be used when explicitly requested
204ff559fabSmrg      if test "x$enable_dependency_tracking" = xyes; then
205ff559fabSmrg	continue
206ff559fabSmrg      else
207ff559fabSmrg	break
208ff559fabSmrg      fi
209ff559fabSmrg      ;;
210ff559fabSmrg    none) break ;;
211ff559fabSmrg    esac
212ff559fabSmrg    # We check with `-c' and `-o' for the sake of the "dashmstdout"
213ff559fabSmrg    # mode.  It turns out that the SunPro C++ compiler does not properly
214ff559fabSmrg    # handle `-M -o', and we need to detect this.
215ff559fabSmrg    if depmode=$depmode \
216ff559fabSmrg       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
217ff559fabSmrg       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
218ff559fabSmrg       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
219ff559fabSmrg         >/dev/null 2>conftest.err &&
220ff559fabSmrg       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
221ff559fabSmrg       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
222ff559fabSmrg       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
223ff559fabSmrg      # icc doesn't choke on unknown options, it will just issue warnings
224ff559fabSmrg      # or remarks (even with -Werror).  So we grep stderr for any message
225ff559fabSmrg      # that says an option was ignored or not supported.
226ff559fabSmrg      # When given -MP, icc 7.0 and 7.1 complain thusly:
227ff559fabSmrg      #   icc: Command line warning: ignoring option '-M'; no argument required
228ff559fabSmrg      # The diagnosis changed in icc 8.0:
229ff559fabSmrg      #   icc: Command line remark: option '-MP' not supported
230ff559fabSmrg      if (grep 'ignoring option' conftest.err ||
231ff559fabSmrg          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
232ff559fabSmrg        am_cv_$1_dependencies_compiler_type=$depmode
233ff559fabSmrg        break
234ff559fabSmrg      fi
235ff559fabSmrg    fi
236ff559fabSmrg  done
237ff559fabSmrg
238ff559fabSmrg  cd ..
239ff559fabSmrg  rm -rf conftest.dir
240ff559fabSmrgelse
241ff559fabSmrg  am_cv_$1_dependencies_compiler_type=none
242ff559fabSmrgfi
243ff559fabSmrg])
244ff559fabSmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
245ff559fabSmrgAM_CONDITIONAL([am__fastdep$1], [
246ff559fabSmrg  test "x$enable_dependency_tracking" != xno \
247ff559fabSmrg  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
248ff559fabSmrg])
249ff559fabSmrg
250ff559fabSmrg
251ff559fabSmrg# AM_SET_DEPDIR
252ff559fabSmrg# -------------
253ff559fabSmrg# Choose a directory name for dependency files.
254ff559fabSmrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES
255ff559fabSmrgAC_DEFUN([AM_SET_DEPDIR],
256ff559fabSmrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
257ff559fabSmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
258ff559fabSmrg])
259ff559fabSmrg
260ff559fabSmrg
261ff559fabSmrg# AM_DEP_TRACK
262ff559fabSmrg# ------------
263ff559fabSmrgAC_DEFUN([AM_DEP_TRACK],
264ff559fabSmrg[AC_ARG_ENABLE(dependency-tracking,
265ff559fabSmrg[  --disable-dependency-tracking  speeds up one-time build
266ff559fabSmrg  --enable-dependency-tracking   do not reject slow dependency extractors])
267ff559fabSmrgif test "x$enable_dependency_tracking" != xno; then
268ff559fabSmrg  am_depcomp="$ac_aux_dir/depcomp"
269ff559fabSmrg  AMDEPBACKSLASH='\'
270ff559fabSmrgfi
271ff559fabSmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
272ff559fabSmrgAC_SUBST([AMDEPBACKSLASH])
273ff559fabSmrg])
274ff559fabSmrg
275ff559fabSmrg# Generate code to set up dependency tracking.              -*- Autoconf -*-
276ff559fabSmrg
277ff559fabSmrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
278ff559fabSmrg# Free Software Foundation, Inc.
279ff559fabSmrg#
280ff559fabSmrg# This file is free software; the Free Software Foundation
281ff559fabSmrg# gives unlimited permission to copy and/or distribute it,
282ff559fabSmrg# with or without modifications, as long as this notice is preserved.
283ff559fabSmrg
284ff559fabSmrg#serial 3
285ff559fabSmrg
286ff559fabSmrg# _AM_OUTPUT_DEPENDENCY_COMMANDS
287ff559fabSmrg# ------------------------------
288ff559fabSmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
289ff559fabSmrg[for mf in $CONFIG_FILES; do
290ff559fabSmrg  # Strip MF so we end up with the name of the file.
291ff559fabSmrg  mf=`echo "$mf" | sed -e 's/:.*$//'`
292ff559fabSmrg  # Check whether this is an Automake generated Makefile or not.
293ff559fabSmrg  # We used to match only the files named `Makefile.in', but
294ff559fabSmrg  # some people rename them; so instead we look at the file content.
295ff559fabSmrg  # Grep'ing the first line is not enough: some people post-process
296ff559fabSmrg  # each Makefile.in and add a new line on top of each file to say so.
297ff559fabSmrg  # So let's grep whole file.
298ff559fabSmrg  if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
299ff559fabSmrg    dirpart=`AS_DIRNAME("$mf")`
300ff559fabSmrg  else
301ff559fabSmrg    continue
302ff559fabSmrg  fi
303ff559fabSmrg  # Extract the definition of DEPDIR, am__include, and am__quote
304ff559fabSmrg  # from the Makefile without running `make'.
305ff559fabSmrg  DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
306ff559fabSmrg  test -z "$DEPDIR" && continue
307ff559fabSmrg  am__include=`sed -n 's/^am__include = //p' < "$mf"`
308ff559fabSmrg  test -z "am__include" && continue
309ff559fabSmrg  am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
310ff559fabSmrg  # When using ansi2knr, U may be empty or an underscore; expand it
311ff559fabSmrg  U=`sed -n 's/^U = //p' < "$mf"`
312ff559fabSmrg  # Find all dependency output files, they are included files with
313ff559fabSmrg  # $(DEPDIR) in their names.  We invoke sed twice because it is the
314ff559fabSmrg  # simplest approach to changing $(DEPDIR) to its actual value in the
315ff559fabSmrg  # expansion.
316ff559fabSmrg  for file in `sed -n "
317ff559fabSmrg    s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
318ff559fabSmrg       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
319ff559fabSmrg    # Make sure the directory exists.
320ff559fabSmrg    test -f "$dirpart/$file" && continue
321ff559fabSmrg    fdir=`AS_DIRNAME(["$file"])`
322ff559fabSmrg    AS_MKDIR_P([$dirpart/$fdir])
323ff559fabSmrg    # echo "creating $dirpart/$file"
324ff559fabSmrg    echo '# dummy' > "$dirpart/$file"
325ff559fabSmrg  done
326ff559fabSmrgdone
327ff559fabSmrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS
328ff559fabSmrg
329ff559fabSmrg
330ff559fabSmrg# AM_OUTPUT_DEPENDENCY_COMMANDS
331ff559fabSmrg# -----------------------------
332ff559fabSmrg# This macro should only be invoked once -- use via AC_REQUIRE.
333ff559fabSmrg#
334ff559fabSmrg# This code is only required when automatic dependency tracking
335ff559fabSmrg# is enabled.  FIXME.  This creates each `.P' file that we will
336ff559fabSmrg# need in order to bootstrap the dependency handling code.
337ff559fabSmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
338ff559fabSmrg[AC_CONFIG_COMMANDS([depfiles],
339ff559fabSmrg     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
340ff559fabSmrg     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
341ff559fabSmrg])
342ff559fabSmrg
343ff559fabSmrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
344ff559fabSmrg# Free Software Foundation, Inc.
345ff559fabSmrg#
346ff559fabSmrg# This file is free software; the Free Software Foundation
347ff559fabSmrg# gives unlimited permission to copy and/or distribute it,
348ff559fabSmrg# with or without modifications, as long as this notice is preserved.
349ff559fabSmrg
350ff559fabSmrg# serial 8
351ff559fabSmrg
352ff559fabSmrg# AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
353ff559fabSmrgAU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
354ff559fabSmrg
355ff559fabSmrg# Do all the work for Automake.                             -*- Autoconf -*-
356ff559fabSmrg
357ff559fabSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
358ff559fabSmrg# Free Software Foundation, Inc.
359ff559fabSmrg#
360ff559fabSmrg# This file is free software; the Free Software Foundation
361ff559fabSmrg# gives unlimited permission to copy and/or distribute it,
362ff559fabSmrg# with or without modifications, as long as this notice is preserved.
363ff559fabSmrg
364ff559fabSmrg# serial 12
365ff559fabSmrg
366ff559fabSmrg# This macro actually does too much.  Some checks are only needed if
367ff559fabSmrg# your package does certain things.  But this isn't really a big deal.
368ff559fabSmrg
369ff559fabSmrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
370ff559fabSmrg# AM_INIT_AUTOMAKE([OPTIONS])
371ff559fabSmrg# -----------------------------------------------
372ff559fabSmrg# The call with PACKAGE and VERSION arguments is the old style
373ff559fabSmrg# call (pre autoconf-2.50), which is being phased out.  PACKAGE
374ff559fabSmrg# and VERSION should now be passed to AC_INIT and removed from
375ff559fabSmrg# the call to AM_INIT_AUTOMAKE.
376ff559fabSmrg# We support both call styles for the transition.  After
377ff559fabSmrg# the next Automake release, Autoconf can make the AC_INIT
378ff559fabSmrg# arguments mandatory, and then we can depend on a new Autoconf
379ff559fabSmrg# release and drop the old call support.
380ff559fabSmrgAC_DEFUN([AM_INIT_AUTOMAKE],
381ff559fabSmrg[AC_PREREQ([2.58])dnl
382ff559fabSmrgdnl Autoconf wants to disallow AM_ names.  We explicitly allow
383ff559fabSmrgdnl the ones we care about.
384ff559fabSmrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
385ff559fabSmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
386ff559fabSmrgAC_REQUIRE([AC_PROG_INSTALL])dnl
387ff559fabSmrg# test to see if srcdir already configured
388ff559fabSmrgif test "`cd $srcdir && pwd`" != "`pwd`" &&
389ff559fabSmrg   test -f $srcdir/config.status; then
390ff559fabSmrg  AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
391ff559fabSmrgfi
392ff559fabSmrg
393ff559fabSmrg# test whether we have cygpath
394ff559fabSmrgif test -z "$CYGPATH_W"; then
395ff559fabSmrg  if (cygpath --version) >/dev/null 2>/dev/null; then
396ff559fabSmrg    CYGPATH_W='cygpath -w'
397ff559fabSmrg  else
398ff559fabSmrg    CYGPATH_W=echo
399ff559fabSmrg  fi
400ff559fabSmrgfi
401ff559fabSmrgAC_SUBST([CYGPATH_W])
402ff559fabSmrg
403ff559fabSmrg# Define the identity of the package.
404ff559fabSmrgdnl Distinguish between old-style and new-style calls.
405ff559fabSmrgm4_ifval([$2],
406ff559fabSmrg[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
407ff559fabSmrg AC_SUBST([PACKAGE], [$1])dnl
408ff559fabSmrg AC_SUBST([VERSION], [$2])],
409ff559fabSmrg[_AM_SET_OPTIONS([$1])dnl
410ff559fabSmrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
411ff559fabSmrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
412ff559fabSmrg
413ff559fabSmrg_AM_IF_OPTION([no-define],,
414ff559fabSmrg[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
415ff559fabSmrg AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
416ff559fabSmrg
417ff559fabSmrg# Some tools Automake needs.
418ff559fabSmrgAC_REQUIRE([AM_SANITY_CHECK])dnl
419ff559fabSmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl
420ff559fabSmrgAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
421ff559fabSmrgAM_MISSING_PROG(AUTOCONF, autoconf)
422ff559fabSmrgAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
423ff559fabSmrgAM_MISSING_PROG(AUTOHEADER, autoheader)
424ff559fabSmrgAM_MISSING_PROG(MAKEINFO, makeinfo)
425ff559fabSmrgAM_PROG_INSTALL_SH
426ff559fabSmrgAM_PROG_INSTALL_STRIP
427ff559fabSmrgAC_REQUIRE([AM_PROG_MKDIR_P])dnl
428ff559fabSmrg# We need awk for the "check" target.  The system "awk" is bad on
429ff559fabSmrg# some platforms.
430ff559fabSmrgAC_REQUIRE([AC_PROG_AWK])dnl
431ff559fabSmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl
432ff559fabSmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl
433ff559fabSmrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
434ff559fabSmrg              [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
435ff559fabSmrg	      		     [_AM_PROG_TAR([v7])])])
436ff559fabSmrg_AM_IF_OPTION([no-dependencies],,
437ff559fabSmrg[AC_PROVIDE_IFELSE([AC_PROG_CC],
438ff559fabSmrg                  [_AM_DEPENDENCIES(CC)],
439ff559fabSmrg                  [define([AC_PROG_CC],
440ff559fabSmrg                          defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
441ff559fabSmrgAC_PROVIDE_IFELSE([AC_PROG_CXX],
442ff559fabSmrg                  [_AM_DEPENDENCIES(CXX)],
443ff559fabSmrg                  [define([AC_PROG_CXX],
444ff559fabSmrg                          defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
445ff559fabSmrg])
446ff559fabSmrg])
447ff559fabSmrg
448ff559fabSmrg
449ff559fabSmrg# When config.status generates a header, we must update the stamp-h file.
450ff559fabSmrg# This file resides in the same directory as the config header
451ff559fabSmrg# that is generated.  The stamp files are numbered to have different names.
452ff559fabSmrg
453ff559fabSmrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
454ff559fabSmrg# loop where config.status creates the headers, so we can generate
455ff559fabSmrg# our stamp files there.
456ff559fabSmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
457ff559fabSmrg[# Compute $1's index in $config_headers.
458ff559fabSmrg_am_stamp_count=1
459ff559fabSmrgfor _am_header in $config_headers :; do
460ff559fabSmrg  case $_am_header in
461ff559fabSmrg    $1 | $1:* )
462ff559fabSmrg      break ;;
463ff559fabSmrg    * )
464ff559fabSmrg      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
465ff559fabSmrg  esac
466ff559fabSmrgdone
467ff559fabSmrgecho "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
468ff559fabSmrg
469ff559fabSmrg# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
470ff559fabSmrg#
471ff559fabSmrg# This file is free software; the Free Software Foundation
472ff559fabSmrg# gives unlimited permission to copy and/or distribute it,
473ff559fabSmrg# with or without modifications, as long as this notice is preserved.
474ff559fabSmrg
475ff559fabSmrg# AM_PROG_INSTALL_SH
476ff559fabSmrg# ------------------
477ff559fabSmrg# Define $install_sh.
478ff559fabSmrgAC_DEFUN([AM_PROG_INSTALL_SH],
479ff559fabSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
480ff559fabSmrginstall_sh=${install_sh-"$am_aux_dir/install-sh"}
481ff559fabSmrgAC_SUBST(install_sh)])
482ff559fabSmrg
483ff559fabSmrg# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
484ff559fabSmrg#
485ff559fabSmrg# This file is free software; the Free Software Foundation
486ff559fabSmrg# gives unlimited permission to copy and/or distribute it,
487ff559fabSmrg# with or without modifications, as long as this notice is preserved.
488ff559fabSmrg
489ff559fabSmrg# serial 2
490ff559fabSmrg
491ff559fabSmrg# Check whether the underlying file-system supports filenames
492ff559fabSmrg# with a leading dot.  For instance MS-DOS doesn't.
493ff559fabSmrgAC_DEFUN([AM_SET_LEADING_DOT],
494ff559fabSmrg[rm -rf .tst 2>/dev/null
495ff559fabSmrgmkdir .tst 2>/dev/null
496ff559fabSmrgif test -d .tst; then
497ff559fabSmrg  am__leading_dot=.
498ff559fabSmrgelse
499ff559fabSmrg  am__leading_dot=_
500ff559fabSmrgfi
501ff559fabSmrgrmdir .tst 2>/dev/null
502ff559fabSmrgAC_SUBST([am__leading_dot])])
503ff559fabSmrg
504ff559fabSmrg# Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
505ff559fabSmrg# From Jim Meyering
506ff559fabSmrg
507ff559fabSmrg# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005
508ff559fabSmrg# Free Software Foundation, Inc.
509ff559fabSmrg#
510ff559fabSmrg# This file is free software; the Free Software Foundation
511ff559fabSmrg# gives unlimited permission to copy and/or distribute it,
512ff559fabSmrg# with or without modifications, as long as this notice is preserved.
513ff559fabSmrg
514ff559fabSmrg# serial 4
515ff559fabSmrg
516ff559fabSmrgAC_DEFUN([AM_MAINTAINER_MODE],
517ff559fabSmrg[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
518ff559fabSmrg  dnl maintainer-mode is disabled by default
519ff559fabSmrg  AC_ARG_ENABLE(maintainer-mode,
520ff559fabSmrg[  --enable-maintainer-mode  enable make rules and dependencies not useful
521ff559fabSmrg			  (and sometimes confusing) to the casual installer],
522ff559fabSmrg      USE_MAINTAINER_MODE=$enableval,
523ff559fabSmrg      USE_MAINTAINER_MODE=no)
524ff559fabSmrg  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
525ff559fabSmrg  AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
526ff559fabSmrg  MAINT=$MAINTAINER_MODE_TRUE
527ff559fabSmrg  AC_SUBST(MAINT)dnl
528ff559fabSmrg]
529ff559fabSmrg)
530ff559fabSmrg
531ff559fabSmrgAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
532ff559fabSmrg
533ff559fabSmrg# Check to see how 'make' treats includes.	            -*- Autoconf -*-
534ff559fabSmrg
535ff559fabSmrg# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
536ff559fabSmrg#
537ff559fabSmrg# This file is free software; the Free Software Foundation
538ff559fabSmrg# gives unlimited permission to copy and/or distribute it,
539ff559fabSmrg# with or without modifications, as long as this notice is preserved.
540ff559fabSmrg
541ff559fabSmrg# serial 3
542ff559fabSmrg
543ff559fabSmrg# AM_MAKE_INCLUDE()
544ff559fabSmrg# -----------------
545ff559fabSmrg# Check to see how make treats includes.
546ff559fabSmrgAC_DEFUN([AM_MAKE_INCLUDE],
547ff559fabSmrg[am_make=${MAKE-make}
548ff559fabSmrgcat > confinc << 'END'
549ff559fabSmrgam__doit:
550ff559fabSmrg	@echo done
551ff559fabSmrg.PHONY: am__doit
552ff559fabSmrgEND
553ff559fabSmrg# If we don't find an include directive, just comment out the code.
554ff559fabSmrgAC_MSG_CHECKING([for style of include used by $am_make])
555ff559fabSmrgam__include="#"
556ff559fabSmrgam__quote=
557ff559fabSmrg_am_result=none
558ff559fabSmrg# First try GNU make style include.
559ff559fabSmrgecho "include confinc" > confmf
560ff559fabSmrg# We grep out `Entering directory' and `Leaving directory'
561ff559fabSmrg# messages which can occur if `w' ends up in MAKEFLAGS.
562ff559fabSmrg# In particular we don't look at `^make:' because GNU make might
563ff559fabSmrg# be invoked under some other name (usually "gmake"), in which
564ff559fabSmrg# case it prints its new name instead of `make'.
565ff559fabSmrgif test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
566ff559fabSmrg   am__include=include
567ff559fabSmrg   am__quote=
568ff559fabSmrg   _am_result=GNU
569ff559fabSmrgfi
570ff559fabSmrg# Now try BSD make style include.
571ff559fabSmrgif test "$am__include" = "#"; then
572ff559fabSmrg   echo '.include "confinc"' > confmf
573ff559fabSmrg   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
574ff559fabSmrg      am__include=.include
575ff559fabSmrg      am__quote="\""
576ff559fabSmrg      _am_result=BSD
577ff559fabSmrg   fi
578ff559fabSmrgfi
579ff559fabSmrgAC_SUBST([am__include])
580ff559fabSmrgAC_SUBST([am__quote])
581ff559fabSmrgAC_MSG_RESULT([$_am_result])
582ff559fabSmrgrm -f confinc confmf
583ff559fabSmrg])
584ff559fabSmrg
585ff559fabSmrg# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
586ff559fabSmrg
587ff559fabSmrg# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005
588ff559fabSmrg# Free Software Foundation, Inc.
589ff559fabSmrg#
590ff559fabSmrg# This file is free software; the Free Software Foundation
591ff559fabSmrg# gives unlimited permission to copy and/or distribute it,
592ff559fabSmrg# with or without modifications, as long as this notice is preserved.
593ff559fabSmrg
594ff559fabSmrg# serial 4
595ff559fabSmrg
596ff559fabSmrg# AM_MISSING_PROG(NAME, PROGRAM)
597ff559fabSmrg# ------------------------------
598ff559fabSmrgAC_DEFUN([AM_MISSING_PROG],
599ff559fabSmrg[AC_REQUIRE([AM_MISSING_HAS_RUN])
600ff559fabSmrg$1=${$1-"${am_missing_run}$2"}
601ff559fabSmrgAC_SUBST($1)])
602ff559fabSmrg
603ff559fabSmrg
604ff559fabSmrg# AM_MISSING_HAS_RUN
605ff559fabSmrg# ------------------
606ff559fabSmrg# Define MISSING if not defined so far and test if it supports --run.
607ff559fabSmrg# If it does, set am_missing_run to use it, otherwise, to nothing.
608ff559fabSmrgAC_DEFUN([AM_MISSING_HAS_RUN],
609ff559fabSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
610ff559fabSmrgtest x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
611ff559fabSmrg# Use eval to expand $SHELL
612ff559fabSmrgif eval "$MISSING --run true"; then
613ff559fabSmrg  am_missing_run="$MISSING --run "
614ff559fabSmrgelse
615ff559fabSmrg  am_missing_run=
616ff559fabSmrg  AC_MSG_WARN([`missing' script is too old or missing])
617ff559fabSmrgfi
618ff559fabSmrg])
619ff559fabSmrg
620ff559fabSmrg# Copyright (C) 2003, 2004, 2005  Free Software Foundation, Inc.
621ff559fabSmrg#
622ff559fabSmrg# This file is free software; the Free Software Foundation
623ff559fabSmrg# gives unlimited permission to copy and/or distribute it,
624ff559fabSmrg# with or without modifications, as long as this notice is preserved.
625ff559fabSmrg
626ff559fabSmrg# AM_PROG_MKDIR_P
627ff559fabSmrg# ---------------
628ff559fabSmrg# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
629ff559fabSmrg#
630ff559fabSmrg# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
631ff559fabSmrg# created by `make install' are always world readable, even if the
632ff559fabSmrg# installer happens to have an overly restrictive umask (e.g. 077).
633ff559fabSmrg# This was a mistake.  There are at least two reasons why we must not
634ff559fabSmrg# use `-m 0755':
635ff559fabSmrg#   - it causes special bits like SGID to be ignored,
636ff559fabSmrg#   - it may be too restrictive (some setups expect 775 directories).
637ff559fabSmrg#
638ff559fabSmrg# Do not use -m 0755 and let people choose whatever they expect by
639ff559fabSmrg# setting umask.
640ff559fabSmrg#
641ff559fabSmrg# We cannot accept any implementation of `mkdir' that recognizes `-p'.
642ff559fabSmrg# Some implementations (such as Solaris 8's) are not thread-safe: if a
643ff559fabSmrg# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
644ff559fabSmrg# concurrently, both version can detect that a/ is missing, but only
645ff559fabSmrg# one can create it and the other will error out.  Consequently we
646ff559fabSmrg# restrict ourselves to GNU make (using the --version option ensures
647ff559fabSmrg# this.)
648ff559fabSmrgAC_DEFUN([AM_PROG_MKDIR_P],
649ff559fabSmrg[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
650ff559fabSmrg  # We used to keeping the `.' as first argument, in order to
651ff559fabSmrg  # allow $(mkdir_p) to be used without argument.  As in
652ff559fabSmrg  #   $(mkdir_p) $(somedir)
653ff559fabSmrg  # where $(somedir) is conditionally defined.  However this is wrong
654ff559fabSmrg  # for two reasons:
655ff559fabSmrg  #  1. if the package is installed by a user who cannot write `.'
656ff559fabSmrg  #     make install will fail,
657ff559fabSmrg  #  2. the above comment should most certainly read
658ff559fabSmrg  #     $(mkdir_p) $(DESTDIR)$(somedir)
659ff559fabSmrg  #     so it does not work when $(somedir) is undefined and
660ff559fabSmrg  #     $(DESTDIR) is not.
661ff559fabSmrg  #  To support the latter case, we have to write
662ff559fabSmrg  #     test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
663ff559fabSmrg  #  so the `.' trick is pointless.
664ff559fabSmrg  mkdir_p='mkdir -p --'
665ff559fabSmrgelse
666ff559fabSmrg  # On NextStep and OpenStep, the `mkdir' command does not
667ff559fabSmrg  # recognize any option.  It will interpret all options as
668ff559fabSmrg  # directories to create, and then abort because `.' already
669ff559fabSmrg  # exists.
670ff559fabSmrg  for d in ./-p ./--version;
671ff559fabSmrg  do
672ff559fabSmrg    test -d $d && rmdir $d
673ff559fabSmrg  done
674ff559fabSmrg  # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
675ff559fabSmrg  if test -f "$ac_aux_dir/mkinstalldirs"; then
676ff559fabSmrg    mkdir_p='$(mkinstalldirs)'
677ff559fabSmrg  else
678ff559fabSmrg    mkdir_p='$(install_sh) -d'
679ff559fabSmrg  fi
680ff559fabSmrgfi
681ff559fabSmrgAC_SUBST([mkdir_p])])
682ff559fabSmrg
683ff559fabSmrg# Helper functions for option handling.                     -*- Autoconf -*-
684ff559fabSmrg
685ff559fabSmrg# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
686ff559fabSmrg#
687ff559fabSmrg# This file is free software; the Free Software Foundation
688ff559fabSmrg# gives unlimited permission to copy and/or distribute it,
689ff559fabSmrg# with or without modifications, as long as this notice is preserved.
690ff559fabSmrg
691ff559fabSmrg# serial 3
692ff559fabSmrg
693ff559fabSmrg# _AM_MANGLE_OPTION(NAME)
694ff559fabSmrg# -----------------------
695ff559fabSmrgAC_DEFUN([_AM_MANGLE_OPTION],
696ff559fabSmrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
697ff559fabSmrg
698ff559fabSmrg# _AM_SET_OPTION(NAME)
699ff559fabSmrg# ------------------------------
700ff559fabSmrg# Set option NAME.  Presently that only means defining a flag for this option.
701ff559fabSmrgAC_DEFUN([_AM_SET_OPTION],
702ff559fabSmrg[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
703ff559fabSmrg
704ff559fabSmrg# _AM_SET_OPTIONS(OPTIONS)
705ff559fabSmrg# ----------------------------------
706ff559fabSmrg# OPTIONS is a space-separated list of Automake options.
707ff559fabSmrgAC_DEFUN([_AM_SET_OPTIONS],
708ff559fabSmrg[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
709ff559fabSmrg
710ff559fabSmrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
711ff559fabSmrg# -------------------------------------------
712ff559fabSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
713ff559fabSmrgAC_DEFUN([_AM_IF_OPTION],
714ff559fabSmrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
715ff559fabSmrg
716ff559fabSmrg# Check to make sure that the build environment is sane.    -*- Autoconf -*-
717ff559fabSmrg
718ff559fabSmrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
719ff559fabSmrg# Free Software Foundation, Inc.
720ff559fabSmrg#
721ff559fabSmrg# This file is free software; the Free Software Foundation
722ff559fabSmrg# gives unlimited permission to copy and/or distribute it,
723ff559fabSmrg# with or without modifications, as long as this notice is preserved.
724ff559fabSmrg
725ff559fabSmrg# serial 4
726ff559fabSmrg
727ff559fabSmrg# AM_SANITY_CHECK
728ff559fabSmrg# ---------------
729ff559fabSmrgAC_DEFUN([AM_SANITY_CHECK],
730ff559fabSmrg[AC_MSG_CHECKING([whether build environment is sane])
731ff559fabSmrg# Just in case
732ff559fabSmrgsleep 1
733ff559fabSmrgecho timestamp > conftest.file
734ff559fabSmrg# Do `set' in a subshell so we don't clobber the current shell's
735ff559fabSmrg# arguments.  Must try -L first in case configure is actually a
736ff559fabSmrg# symlink; some systems play weird games with the mod time of symlinks
737ff559fabSmrg# (eg FreeBSD returns the mod time of the symlink's containing
738ff559fabSmrg# directory).
739ff559fabSmrgif (
740ff559fabSmrg   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
741ff559fabSmrg   if test "$[*]" = "X"; then
742ff559fabSmrg      # -L didn't work.
743ff559fabSmrg      set X `ls -t $srcdir/configure conftest.file`
744ff559fabSmrg   fi
745ff559fabSmrg   rm -f conftest.file
746ff559fabSmrg   if test "$[*]" != "X $srcdir/configure conftest.file" \
747ff559fabSmrg      && test "$[*]" != "X conftest.file $srcdir/configure"; then
748ff559fabSmrg
749ff559fabSmrg      # If neither matched, then we have a broken ls.  This can happen
750ff559fabSmrg      # if, for instance, CONFIG_SHELL is bash and it inherits a
751ff559fabSmrg      # broken ls alias from the environment.  This has actually
752ff559fabSmrg      # happened.  Such a system could not be considered "sane".
753ff559fabSmrg      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
754ff559fabSmrgalias in your environment])
755ff559fabSmrg   fi
756ff559fabSmrg
757ff559fabSmrg   test "$[2]" = conftest.file
758ff559fabSmrg   )
759ff559fabSmrgthen
760ff559fabSmrg   # Ok.
761ff559fabSmrg   :
762ff559fabSmrgelse
763ff559fabSmrg   AC_MSG_ERROR([newly created file is older than distributed files!
764ff559fabSmrgCheck your system clock])
765ff559fabSmrgfi
766ff559fabSmrgAC_MSG_RESULT(yes)])
767ff559fabSmrg
768ff559fabSmrg# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
769ff559fabSmrg#
770ff559fabSmrg# This file is free software; the Free Software Foundation
771ff559fabSmrg# gives unlimited permission to copy and/or distribute it,
772ff559fabSmrg# with or without modifications, as long as this notice is preserved.
773ff559fabSmrg
774ff559fabSmrg# AM_PROG_INSTALL_STRIP
775ff559fabSmrg# ---------------------
776ff559fabSmrg# One issue with vendor `install' (even GNU) is that you can't
777ff559fabSmrg# specify the program used to strip binaries.  This is especially
778ff559fabSmrg# annoying in cross-compiling environments, where the build's strip
779ff559fabSmrg# is unlikely to handle the host's binaries.
780ff559fabSmrg# Fortunately install-sh will honor a STRIPPROG variable, so we
781ff559fabSmrg# always use install-sh in `make install-strip', and initialize
782ff559fabSmrg# STRIPPROG with the value of the STRIP variable (set by the user).
783ff559fabSmrgAC_DEFUN([AM_PROG_INSTALL_STRIP],
784ff559fabSmrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
785ff559fabSmrg# Installed binaries are usually stripped using `strip' when the user
786ff559fabSmrg# run `make install-strip'.  However `strip' might not be the right
787ff559fabSmrg# tool to use in cross-compilation environments, therefore Automake
788ff559fabSmrg# will honor the `STRIP' environment variable to overrule this program.
789ff559fabSmrgdnl Don't test for $cross_compiling = yes, because it might be `maybe'.
790ff559fabSmrgif test "$cross_compiling" != no; then
791ff559fabSmrg  AC_CHECK_TOOL([STRIP], [strip], :)
792ff559fabSmrgfi
793ff559fabSmrgINSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
794ff559fabSmrgAC_SUBST([INSTALL_STRIP_PROGRAM])])
795ff559fabSmrg
796ff559fabSmrg# Check how to create a tarball.                            -*- Autoconf -*-
797ff559fabSmrg
798ff559fabSmrg# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
799ff559fabSmrg#
800ff559fabSmrg# This file is free software; the Free Software Foundation
801ff559fabSmrg# gives unlimited permission to copy and/or distribute it,
802ff559fabSmrg# with or without modifications, as long as this notice is preserved.
803ff559fabSmrg
804ff559fabSmrg# serial 2
805ff559fabSmrg
806ff559fabSmrg# _AM_PROG_TAR(FORMAT)
807ff559fabSmrg# --------------------
808ff559fabSmrg# Check how to create a tarball in format FORMAT.
809ff559fabSmrg# FORMAT should be one of `v7', `ustar', or `pax'.
810ff559fabSmrg#
811ff559fabSmrg# Substitute a variable $(am__tar) that is a command
812ff559fabSmrg# writing to stdout a FORMAT-tarball containing the directory
813ff559fabSmrg# $tardir.
814ff559fabSmrg#     tardir=directory && $(am__tar) > result.tar
815ff559fabSmrg#
816ff559fabSmrg# Substitute a variable $(am__untar) that extract such
817ff559fabSmrg# a tarball read from stdin.
818ff559fabSmrg#     $(am__untar) < result.tar
819ff559fabSmrgAC_DEFUN([_AM_PROG_TAR],
820ff559fabSmrg[# Always define AMTAR for backward compatibility.
821ff559fabSmrgAM_MISSING_PROG([AMTAR], [tar])
822ff559fabSmrgm4_if([$1], [v7],
823ff559fabSmrg     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
824ff559fabSmrg     [m4_case([$1], [ustar],, [pax],,
825ff559fabSmrg              [m4_fatal([Unknown tar format])])
826ff559fabSmrgAC_MSG_CHECKING([how to create a $1 tar archive])
827ff559fabSmrg# Loop over all known methods to create a tar archive until one works.
828ff559fabSmrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
829ff559fabSmrg_am_tools=${am_cv_prog_tar_$1-$_am_tools}
830ff559fabSmrg# Do not fold the above two line into one, because Tru64 sh and
831ff559fabSmrg# Solaris sh will not grok spaces in the rhs of `-'.
832ff559fabSmrgfor _am_tool in $_am_tools
833ff559fabSmrgdo
834ff559fabSmrg  case $_am_tool in
835ff559fabSmrg  gnutar)
836ff559fabSmrg    for _am_tar in tar gnutar gtar;
837ff559fabSmrg    do
838ff559fabSmrg      AM_RUN_LOG([$_am_tar --version]) && break
839ff559fabSmrg    done
840ff559fabSmrg    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
841ff559fabSmrg    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
842ff559fabSmrg    am__untar="$_am_tar -xf -"
843ff559fabSmrg    ;;
844ff559fabSmrg  plaintar)
845ff559fabSmrg    # Must skip GNU tar: if it does not support --format= it doesn't create
846ff559fabSmrg    # ustar tarball either.
847ff559fabSmrg    (tar --version) >/dev/null 2>&1 && continue
848ff559fabSmrg    am__tar='tar chf - "$$tardir"'
849ff559fabSmrg    am__tar_='tar chf - "$tardir"'
850ff559fabSmrg    am__untar='tar xf -'
851ff559fabSmrg    ;;
852ff559fabSmrg  pax)
853ff559fabSmrg    am__tar='pax -L -x $1 -w "$$tardir"'
854ff559fabSmrg    am__tar_='pax -L -x $1 -w "$tardir"'
855ff559fabSmrg    am__untar='pax -r'
856ff559fabSmrg    ;;
857ff559fabSmrg  cpio)
858ff559fabSmrg    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
859ff559fabSmrg    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
860ff559fabSmrg    am__untar='cpio -i -H $1 -d'
861ff559fabSmrg    ;;
862ff559fabSmrg  none)
863ff559fabSmrg    am__tar=false
864ff559fabSmrg    am__tar_=false
865ff559fabSmrg    am__untar=false
866ff559fabSmrg    ;;
867ff559fabSmrg  esac
868ff559fabSmrg
869ff559fabSmrg  # If the value was cached, stop now.  We just wanted to have am__tar
870ff559fabSmrg  # and am__untar set.
871ff559fabSmrg  test -n "${am_cv_prog_tar_$1}" && break
872ff559fabSmrg
873ff559fabSmrg  # tar/untar a dummy directory, and stop if the command works
874ff559fabSmrg  rm -rf conftest.dir
875ff559fabSmrg  mkdir conftest.dir
876ff559fabSmrg  echo GrepMe > conftest.dir/file
877ff559fabSmrg  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
878ff559fabSmrg  rm -rf conftest.dir
879ff559fabSmrg  if test -s conftest.tar; then
880ff559fabSmrg    AM_RUN_LOG([$am__untar <conftest.tar])
881ff559fabSmrg    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
882ff559fabSmrg  fi
883ff559fabSmrgdone
884ff559fabSmrgrm -rf conftest.dir
885ff559fabSmrg
886ff559fabSmrgAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
887ff559fabSmrgAC_MSG_RESULT([$am_cv_prog_tar_$1])])
888ff559fabSmrgAC_SUBST([am__tar])
889ff559fabSmrgAC_SUBST([am__untar])
890ff559fabSmrg]) # _AM_PROG_TAR
891ff559fabSmrg
892ff559fabSmrgdnl
893ff559fabSmrgdnl Copyright 2005-2006 Sun Microsystems, Inc.  All rights reserved.
894ff559fabSmrgdnl 
895ff559fabSmrgdnl Permission is hereby granted, free of charge, to any person obtaining a
896ff559fabSmrgdnl copy of this software and associated documentation files (the
897ff559fabSmrgdnl "Software"), to deal in the Software without restriction, including
898ff559fabSmrgdnl without limitation the rights to use, copy, modify, merge, publish,
899ff559fabSmrgdnl distribute, and/or sell copies of the Software, and to permit persons
900ff559fabSmrgdnl to whom the Software is furnished to do so, provided that the above
901ff559fabSmrgdnl copyright notice(s) and this permission notice appear in all copies of
902ff559fabSmrgdnl the Software and that both the above copyright notice(s) and this
903ff559fabSmrgdnl permission notice appear in supporting documentation.
904ff559fabSmrgdnl
905ff559fabSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
906ff559fabSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
907ff559fabSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
908ff559fabSmrgdnl OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
909ff559fabSmrgdnl HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
910ff559fabSmrgdnl INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
911ff559fabSmrgdnl FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
912ff559fabSmrgdnl NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
913ff559fabSmrgdnl WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
914ff559fabSmrgdnl
915ff559fabSmrgdnl Except as contained in this notice, the name of a copyright holder
916ff559fabSmrgdnl shall not be used in advertising or otherwise to promote the sale, use
917ff559fabSmrgdnl or other dealings in this Software without prior written authorization
918ff559fabSmrgdnl of the copyright holder.
919ff559fabSmrg
920ff559fabSmrg# XORG_MACROS_VERSION(required-version)
921ff559fabSmrg# -------------------------------------
922ff559fabSmrg# Minimum version: 1.1.0
923ff559fabSmrg#
924ff559fabSmrg# If you're using a macro added in Version 1.1 or newer, include this in
925ff559fabSmrg# your configure.ac with the minimum required version, such as:
926ff559fabSmrg# XORG_MACROS_VERSION(1.1)
927ff559fabSmrg#
928ff559fabSmrg# To force at least a version with this macro defined, also add:
929ff559fabSmrg# m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.1 or later before running autoconf/autogen])])
930ff559fabSmrg#
931ff559fabSmrg#
932ff559fabSmrg# See the "minimum version" comment for each macro you use to see what 
933ff559fabSmrg# version you require.
934ff559fabSmrgAC_DEFUN([XORG_MACROS_VERSION],[
935ff559fabSmrg	[XORG_MACROS_needed_version=$1
936ff559fabSmrg	XORG_MACROS_needed_major=`echo $XORG_MACROS_needed_version | sed 's/\..*$//'`
937ff559fabSmrg	XORG_MACROS_needed_minor=`echo $XORG_MACROS_needed_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`]
938ff559fabSmrg	AC_MSG_CHECKING([if xorg-macros used to generate configure is at least ${XORG_MACROS_needed_major}.${XORG_MACROS_needed_minor}])
939ff559fabSmrg	[XORG_MACROS_version=1.1.0
940ff559fabSmrg	XORG_MACROS_major=`echo $XORG_MACROS_version | sed 's/\..*$//'`
941ff559fabSmrg	XORG_MACROS_minor=`echo $XORG_MACROS_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`]
942ff559fabSmrg	if test $XORG_MACROS_major -ne $XORG_MACROS_needed_major ; then
943ff559fabSmrg		AC_MSG_ERROR([configure built with incompatible version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.x])
944ff559fabSmrg	fi
945ff559fabSmrg	if test $XORG_MACROS_minor -lt $XORG_MACROS_needed_minor ; then
946ff559fabSmrg		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])
947ff559fabSmrg	fi
948ff559fabSmrg	AC_MSG_RESULT([yes, $XORG_MACROS_version])
949ff559fabSmrg]) # XORG_MACROS_VERSION
950ff559fabSmrg
951ff559fabSmrg# XORG_PROG_RAWCPP()
952ff559fabSmrg# ------------------
953ff559fabSmrg# Minimum version: 1.0.0
954ff559fabSmrg#
955ff559fabSmrg# Find cpp program and necessary flags for use in pre-processing text files
956ff559fabSmrg# such as man pages and config files
957ff559fabSmrgAC_DEFUN([XORG_PROG_RAWCPP],[
958ff559fabSmrgAC_REQUIRE([AC_PROG_CPP])
959ff559fabSmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 
960ff559fabSmrg   [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib])
961ff559fabSmrg
962ff559fabSmrg# Check for flag to avoid builtin definitions - assumes unix is predefined,
963ff559fabSmrg# which is not the best choice for supporting other OS'es, but covers most
964ff559fabSmrg# of the ones we need for now.
965ff559fabSmrgAC_MSG_CHECKING([if $RAWCPP requires -undef])
966ff559fabSmrgAC_LANG_CONFTEST([Does cpp redefine unix ?])
967ff559fabSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
968ff559fabSmrg	AC_MSG_RESULT([no])
969ff559fabSmrgelse
970ff559fabSmrg	if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
971ff559fabSmrg		RAWCPPFLAGS=-undef
972ff559fabSmrg		AC_MSG_RESULT([yes])
973ff559fabSmrg	else
974ff559fabSmrg		AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef.  I don't know what to do.])
975ff559fabSmrg	fi
976ff559fabSmrgfi
977ff559fabSmrgrm -f conftest.$ac_ext
978ff559fabSmrg
979ff559fabSmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional])
980ff559fabSmrgAC_LANG_CONFTEST([Does cpp preserve   "whitespace"?])
981ff559fabSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
982ff559fabSmrg	AC_MSG_RESULT([no])
983ff559fabSmrgelse
984ff559fabSmrg	if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
985ff559fabSmrg		RAWCPPFLAGS="${RAWCPPFLAGS} -traditional"
986ff559fabSmrg		AC_MSG_RESULT([yes])
987ff559fabSmrg	else
988ff559fabSmrg		AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional.  I don't know what to do.])
989ff559fabSmrg	fi
990ff559fabSmrgfi
991ff559fabSmrgrm -f conftest.$ac_ext
992ff559fabSmrgAC_SUBST(RAWCPPFLAGS)
993ff559fabSmrg]) # XORG_PROG_RAWCPP
994ff559fabSmrg
995ff559fabSmrg# XORG_MANPAGE_SECTIONS()
996ff559fabSmrg# -----------------------
997ff559fabSmrg# Minimum version: 1.0.0
998ff559fabSmrg#
999ff559fabSmrg# Determine which sections man pages go in for the different man page types
1000ff559fabSmrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files.
1001ff559fabSmrg# Not sure if there's any better way than just hardcoding by OS name.
1002ff559fabSmrg# Override default settings by setting environment variables
1003ff559fabSmrg
1004ff559fabSmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[
1005ff559fabSmrgAC_REQUIRE([AC_CANONICAL_HOST])
1006ff559fabSmrg
1007ff559fabSmrgif test x$APP_MAN_SUFFIX = x    ; then
1008ff559fabSmrg    case $host_os in
1009ff559fabSmrg	linux* | gnu* | k*bsd*-gnu)	APP_MAN_SUFFIX=1x ;;
1010ff559fabSmrg	*)	APP_MAN_SUFFIX=1  ;;
1011ff559fabSmrg    esac
1012ff559fabSmrgfi
1013ff559fabSmrgif test x$APP_MAN_DIR = x    ; then
1014ff559fabSmrg    case $host_os in
1015ff559fabSmrg	linux* | gnu* | k*bsd*-gnu)	APP_MAN_DIR='$(mandir)/man1' ;;
1016ff559fabSmrg	*)	APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' ;;
1017ff559fabSmrg    esac
1018ff559fabSmrgfi
1019ff559fabSmrg
1020ff559fabSmrgif test x$LIB_MAN_SUFFIX = x    ; then
1021ff559fabSmrg    case $host_os in
1022ff559fabSmrg	linux* | gnu* | k*bsd*-gnu)	LIB_MAN_SUFFIX=3x ;;
1023ff559fabSmrg	*)	LIB_MAN_SUFFIX=3  ;;
1024ff559fabSmrg    esac
1025ff559fabSmrgfi
1026ff559fabSmrgif test x$LIB_MAN_DIR = x    ; then
1027ff559fabSmrg    case $host_os in
1028ff559fabSmrg	linux* | gnu* | k*bsd*-gnu)	LIB_MAN_DIR='$(mandir)/man3' ;;
1029ff559fabSmrg	*)	LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' ;;
1030ff559fabSmrg    esac
1031ff559fabSmrgfi
1032ff559fabSmrg
1033ff559fabSmrgif test x$FILE_MAN_SUFFIX = x    ; then
1034ff559fabSmrg    case $host_os in
1035ff559fabSmrg	linux* | gnu* | k*bsd*-gnu)		FILE_MAN_SUFFIX=5x ;;
1036ff559fabSmrg	solaris*)	FILE_MAN_SUFFIX=4  ;;
1037ff559fabSmrg	*)		FILE_MAN_SUFFIX=5  ;;
1038ff559fabSmrg    esac
1039ff559fabSmrgfi
1040ff559fabSmrgif test x$FILE_MAN_DIR = x    ; then
1041ff559fabSmrg    case $host_os in
1042ff559fabSmrg	linux* | gnu* | k*bsd*-gnu)	FILE_MAN_DIR='$(mandir)/man5' ;;
1043ff559fabSmrg	*)	FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' ;;
1044ff559fabSmrg    esac
1045ff559fabSmrgfi
1046ff559fabSmrg
1047ff559fabSmrg# In Imake's linux.cf, the misc man suffix & dir was only changed for 
1048ff559fabSmrg# LinuxDebian, not other Linuxes, so we leave it unchanged here
1049ff559fabSmrgif test x$MISC_MAN_SUFFIX = x    ; then
1050ff559fabSmrg    case $host_os in
1051ff559fabSmrg#	linux* | gnu* | k*bsd*-gnu)		MISC_MAN_SUFFIX=7x ;;
1052ff559fabSmrg	solaris*)	MISC_MAN_SUFFIX=5  ;;
1053ff559fabSmrg	*)		MISC_MAN_SUFFIX=7  ;;
1054ff559fabSmrg    esac
1055ff559fabSmrgfi
1056ff559fabSmrgif test x$MISC_MAN_DIR = x    ; then
1057ff559fabSmrg    case $host_os in
1058ff559fabSmrg#	linux* | gnu* | k*bsd*-gnu)	MISC_MAN_DIR='$(mandir)/man7' ;;
1059ff559fabSmrg	*)	MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' ;;
1060ff559fabSmrg    esac
1061ff559fabSmrgfi
1062ff559fabSmrg
1063ff559fabSmrg# In Imake's linux.cf, the driver man suffix & dir was only changed for 
1064ff559fabSmrg# LinuxDebian, not other Linuxes, so we leave it unchanged here
1065ff559fabSmrgif test x$DRIVER_MAN_SUFFIX = x    ; then
1066ff559fabSmrg    case $host_os in
1067ff559fabSmrg#	linux* | gnu* | k*bsd*-gnu)		DRIVER_MAN_SUFFIX=4x ;;
1068ff559fabSmrg	solaris*)	DRIVER_MAN_SUFFIX=7  ;;
1069ff559fabSmrg	*)		DRIVER_MAN_SUFFIX=4  ;;
1070ff559fabSmrg    esac
1071ff559fabSmrgfi
1072ff559fabSmrgif test x$DRIVER_MAN_DIR = x    ; then
1073ff559fabSmrg    case $host_os in
1074ff559fabSmrg#	linux* | gnu* | k*bsd*-gnu)	DRIVER_MAN_DIR='$(mandir)/man4' ;;
1075ff559fabSmrg	*)	DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' ;;
1076ff559fabSmrg    esac
1077ff559fabSmrgfi
1078ff559fabSmrg
1079ff559fabSmrgif test x$ADMIN_MAN_SUFFIX = x    ; then
1080ff559fabSmrg    case $host_os in
1081ff559fabSmrg	solaris*)	ADMIN_MAN_SUFFIX=1m ;;
1082ff559fabSmrg	*)		ADMIN_MAN_SUFFIX=8  ;;
1083ff559fabSmrg    esac
1084ff559fabSmrgfi
1085ff559fabSmrgif test x$ADMIN_MAN_DIR = x    ; then
1086ff559fabSmrg    ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)'
1087ff559fabSmrgfi
1088ff559fabSmrg
1089ff559fabSmrg
1090ff559fabSmrgAC_SUBST([APP_MAN_SUFFIX])
1091ff559fabSmrgAC_SUBST([LIB_MAN_SUFFIX])
1092ff559fabSmrgAC_SUBST([FILE_MAN_SUFFIX])
1093ff559fabSmrgAC_SUBST([MISC_MAN_SUFFIX])
1094ff559fabSmrgAC_SUBST([DRIVER_MAN_SUFFIX])
1095ff559fabSmrgAC_SUBST([ADMIN_MAN_SUFFIX])
1096ff559fabSmrgAC_SUBST([APP_MAN_DIR])
1097ff559fabSmrgAC_SUBST([LIB_MAN_DIR])
1098ff559fabSmrgAC_SUBST([FILE_MAN_DIR])
1099ff559fabSmrgAC_SUBST([MISC_MAN_DIR])
1100ff559fabSmrgAC_SUBST([DRIVER_MAN_DIR])
1101ff559fabSmrgAC_SUBST([ADMIN_MAN_DIR])
1102ff559fabSmrg]) # XORG_MANPAGE_SECTIONS
1103ff559fabSmrg
1104ff559fabSmrg# XORG_CHECK_LINUXDOC
1105ff559fabSmrg# -------------------
1106ff559fabSmrg# Minimum version: 1.0.0
1107ff559fabSmrg#
1108ff559fabSmrg# Defines the variable MAKE_TEXT if the necessary tools and
1109ff559fabSmrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt.
1110ff559fabSmrg# Whether or not the necessary tools and files are found can be checked
1111ff559fabSmrg# with the AM_CONDITIONAL "BUILD_LINUXDOC"
1112ff559fabSmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[
1113ff559fabSmrgAC_CHECK_FILE(
1114ff559fabSmrg	[$prefix/share/X11/sgml/defs.ent], 
1115ff559fabSmrg	[DEFS_ENT_PATH=$prefix/share/X11/sgml],
1116ff559fabSmrg	[DEFS_ENT_PATH=]
1117ff559fabSmrg)
1118ff559fabSmrg
1119ff559fabSmrgAC_PATH_PROG(LINUXDOC, linuxdoc)
1120ff559fabSmrgAC_PATH_PROG(PS2PDF, ps2pdf)
1121ff559fabSmrg
1122ff559fabSmrgAC_MSG_CHECKING([Whether to build documentation])
1123ff559fabSmrg
1124ff559fabSmrgif test x$DEFS_ENT_PATH != x && test x$LINUXDOC != x ; then
1125ff559fabSmrg   BUILDDOC=yes
1126ff559fabSmrgelse
1127ff559fabSmrg   BUILDDOC=no
1128ff559fabSmrgfi
1129ff559fabSmrg
1130ff559fabSmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes])
1131ff559fabSmrg
1132ff559fabSmrgAC_MSG_RESULT([$BUILDDOC])
1133ff559fabSmrg
1134ff559fabSmrgAC_MSG_CHECKING([Whether to build pdf documentation])
1135ff559fabSmrg
1136ff559fabSmrgif test x$PS2PDF != x ; then
1137ff559fabSmrg   BUILDPDFDOC=yes
1138ff559fabSmrgelse
1139ff559fabSmrg   BUILDPDFDOC=no
1140ff559fabSmrgfi
1141ff559fabSmrg
1142ff559fabSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
1143ff559fabSmrg
1144ff559fabSmrgAC_MSG_RESULT([$BUILDPDFDOC])
1145ff559fabSmrg
1146ff559fabSmrgMAKE_TEXT="SGML_SEARCH_PATH=$DEFS_ENT_PATH GROFF_NO_SGR=y $LINUXDOC -B txt"
1147ff559fabSmrgMAKE_PS="SGML_SEARCH_PATH=$DEFS_ENT_PATH $LINUXDOC -B latex --papersize=letter --output=ps"
1148ff559fabSmrgMAKE_PDF="$PS2PDF"
1149ff559fabSmrgMAKE_HTML="SGML_SEARCH_PATH=$DEFS_ENT_PATH $LINUXDOC  -B html --split=0"
1150ff559fabSmrg
1151ff559fabSmrgAC_SUBST(MAKE_TEXT)
1152ff559fabSmrgAC_SUBST(MAKE_PS)
1153ff559fabSmrgAC_SUBST(MAKE_PDF)
1154ff559fabSmrgAC_SUBST(MAKE_HTML)
1155ff559fabSmrg]) # XORG_CHECK_LINUXDOC
1156ff559fabSmrg
1157ff559fabSmrg# XORG_CHECK_MALLOC_ZERO
1158ff559fabSmrg# ----------------------
1159ff559fabSmrg# Minimum version: 1.0.0
1160ff559fabSmrg#
1161ff559fabSmrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if
1162ff559fabSmrg# malloc(0) returns NULL.  Packages should add one of these cflags to
1163ff559fabSmrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them.
1164ff559fabSmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[
1165ff559fabSmrgAC_ARG_ENABLE(malloc0returnsnull,
1166ff559fabSmrg	AC_HELP_STRING([--enable-malloc0returnsnull],
1167ff559fabSmrg		       [malloc(0) returns NULL (default: auto)]),
1168ff559fabSmrg	[MALLOC_ZERO_RETURNS_NULL=$enableval],
1169ff559fabSmrg	[MALLOC_ZERO_RETURNS_NULL=auto])
1170ff559fabSmrg
1171ff559fabSmrgAC_MSG_CHECKING([whether malloc(0) returns NULL])
1172ff559fabSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then
1173ff559fabSmrg	AC_RUN_IFELSE([
1174ff559fabSmrgchar *malloc();
1175ff559fabSmrgchar *realloc();
1176ff559fabSmrgchar *calloc();
1177ff559fabSmrgmain() {
1178ff559fabSmrg    char *m0, *r0, *c0, *p;
1179ff559fabSmrg    m0 = malloc(0);
1180ff559fabSmrg    p = malloc(10);
1181ff559fabSmrg    r0 = realloc(p,0);
1182ff559fabSmrg    c0 = calloc(0);
1183ff559fabSmrg    exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1);
1184ff559fabSmrg}],
1185ff559fabSmrg		[MALLOC_ZERO_RETURNS_NULL=yes],
1186ff559fabSmrg		[MALLOC_ZERO_RETURNS_NULL=no])
1187ff559fabSmrgfi
1188ff559fabSmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL])
1189ff559fabSmrg
1190ff559fabSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then
1191ff559fabSmrg	MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL"
1192ff559fabSmrg	XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS
1193ff559fabSmrg	XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC"
1194ff559fabSmrgelse
1195ff559fabSmrg	MALLOC_ZERO_CFLAGS=""
1196ff559fabSmrg	XMALLOC_ZERO_CFLAGS=""
1197ff559fabSmrg	XTMALLOC_ZERO_CFLAGS=""
1198ff559fabSmrgfi
1199ff559fabSmrg
1200ff559fabSmrgAC_SUBST([MALLOC_ZERO_CFLAGS])
1201ff559fabSmrgAC_SUBST([XMALLOC_ZERO_CFLAGS])
1202ff559fabSmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS])
1203ff559fabSmrg]) # XORG_CHECK_MALLOC_ZERO
1204ff559fabSmrg
1205ff559fabSmrg# XORG_WITH_LINT()
1206ff559fabSmrg# ----------------
1207ff559fabSmrg# Minimum version: 1.1.0
1208ff559fabSmrg#
1209ff559fabSmrg# Sets up flags for source checkers such as lint and sparse if --with-lint
1210ff559fabSmrg# is specified.   (Use --with-lint=sparse for sparse.)
1211ff559fabSmrg# Sets $LINT to name of source checker passed with --with-lint (default: lint)
1212ff559fabSmrg# Sets $LINT_FLAGS to flags to pass to source checker
1213ff559fabSmrg# Sets LINT automake conditional if enabled (default: disabled)
1214ff559fabSmrg#
1215ff559fabSmrgAC_DEFUN([XORG_WITH_LINT],[
1216ff559fabSmrg
1217ff559fabSmrg# Allow checking code with lint, sparse, etc.
1218ff559fabSmrgAC_ARG_WITH(lint, [AC_HELP_STRING([--with-lint],
1219ff559fabSmrg		[Use a lint-style source code checker (default: disabled)])],
1220ff559fabSmrg		[use_lint=$withval], [use_lint=no])
1221ff559fabSmrgif test "x$use_lint" = "xyes" ; then
1222ff559fabSmrg	LINT="lint"
1223ff559fabSmrgelse
1224ff559fabSmrg	LINT="$use_lint"
1225ff559fabSmrgfi
1226ff559fabSmrgif test "x$LINT_FLAGS" = "x" -a "x$LINT" != "xno" ; then
1227ff559fabSmrg    case $LINT in
1228ff559fabSmrg	lint|*/lint)
1229ff559fabSmrg	    case $host_os in
1230ff559fabSmrg		solaris*)
1231ff559fabSmrg			LINT_FLAGS="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2"
1232ff559fabSmrg			;;
1233ff559fabSmrg	    esac
1234ff559fabSmrg	    ;;
1235ff559fabSmrg    esac
1236ff559fabSmrgfi
1237ff559fabSmrg
1238ff559fabSmrgAC_SUBST(LINT)
1239ff559fabSmrgAC_SUBST(LINT_FLAGS)
1240ff559fabSmrgAM_CONDITIONAL(LINT, [test x$LINT != xno])
1241ff559fabSmrg
1242ff559fabSmrg]) # XORG_WITH_LINT
1243ff559fabSmrg
1244ff559fabSmrg# XORG_LINT_LIBRARY(LIBNAME)
1245ff559fabSmrg# --------------------------
1246ff559fabSmrg# Minimum version: 1.1.0
1247ff559fabSmrg#
1248ff559fabSmrg# Sets up flags for building lint libraries for checking programs that call
1249ff559fabSmrg# functions in the library.
1250ff559fabSmrg# Disabled by default, enable with --enable-lint-library
1251ff559fabSmrg# Sets: 
1252ff559fabSmrg#	@LINTLIB@		- name of lint library file to make
1253ff559fabSmrg#	MAKE_LINT_LIB		- automake conditional
1254ff559fabSmrg#
1255ff559fabSmrg
1256ff559fabSmrgAC_DEFUN([XORG_LINT_LIBRARY],[
1257ff559fabSmrgAC_REQUIRE([XORG_WITH_LINT])
1258ff559fabSmrg# Build lint "library" for more indepth checks of programs calling this library
1259ff559fabSmrgAC_ARG_ENABLE(lint-library, [AC_HELP_STRING([--enable-lint-library],
1260ff559fabSmrg	[Create lint library (default: disabled)])],
1261ff559fabSmrg	[make_lint_lib=$enableval], [make_lint_lib=no])
1262ff559fabSmrgif test "x$make_lint_lib" != "xno" ; then
1263ff559fabSmrg	if test "x$LINT" = "xno" ; then
1264ff559fabSmrg		AC_MSG_ERROR([Cannot make lint library without --with-lint])
1265ff559fabSmrg	fi
1266ff559fabSmrg	if test "x$make_lint_lib" = "xyes" ; then
1267ff559fabSmrg		LINTLIB=llib-l$1.ln
1268ff559fabSmrg	else
1269ff559fabSmrg		LINTLIB=$make_lint_lib
1270ff559fabSmrg	fi
1271ff559fabSmrgfi
1272ff559fabSmrgAC_SUBST(LINTLIB)
1273ff559fabSmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno])
1274ff559fabSmrg
1275ff559fabSmrg]) # XORG_LINT_LIBRARY
1276ff559fabSmrg
1277ff559fabSmrgdnl Copyright 2005 Red Hat, Inc
1278ff559fabSmrgdnl
1279ff559fabSmrgdnl Permission to use, copy, modify, distribute, and sell this software and its
1280ff559fabSmrgdnl documentation for any purpose is hereby granted without fee, provided that
1281ff559fabSmrgdnl the above copyright notice appear in all copies and that both that
1282ff559fabSmrgdnl copyright notice and this permission notice appear in supporting
1283ff559fabSmrgdnl documentation.
1284ff559fabSmrgdnl
1285ff559fabSmrgdnl The above copyright notice and this permission notice shall be included
1286ff559fabSmrgdnl in all copies or substantial portions of the Software.
1287ff559fabSmrgdnl
1288ff559fabSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
1289ff559fabSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
1290ff559fabSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
1291ff559fabSmrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
1292ff559fabSmrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
1293ff559fabSmrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
1294ff559fabSmrgdnl OTHER DEALINGS IN THE SOFTWARE.
1295ff559fabSmrgdnl
1296ff559fabSmrgdnl Except as contained in this notice, the name of the copyright holders shall
1297ff559fabSmrgdnl not be used in advertising or otherwise to promote the sale, use or
1298ff559fabSmrgdnl other dealings in this Software without prior written authorization
1299ff559fabSmrgdnl from the copyright holders.
1300ff559fabSmrgdnl
1301ff559fabSmrg
1302ff559fabSmrg# XORG_RELEASE_VERSION
1303ff559fabSmrg# --------------------
1304ff559fabSmrg# Adds --with/without-release-string and changes the PACKAGE and
1305ff559fabSmrg# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION".  If
1306ff559fabSmrg# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged.
1307ff559fabSmrg 
1308ff559fabSmrgAC_DEFUN([XORG_RELEASE_VERSION],[
1309ff559fabSmrg	AC_ARG_WITH(release-version,
1310ff559fabSmrg			AC_HELP_STRING([--with-release-version=STRING],
1311ff559fabSmrg				[Use release version string in package name]),
1312ff559fabSmrg			[RELEASE_VERSION="$withval"],
1313ff559fabSmrg			[RELEASE_VERSION=""])
1314ff559fabSmrg	if test "x$RELEASE_VERSION" != "x"; then
1315ff559fabSmrg		PACKAGE="$PACKAGE-$RELEASE_VERSION"
1316ff559fabSmrg		PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION"
1317ff559fabSmrg		AC_MSG_NOTICE([Building with package name set to $PACKAGE])
1318ff559fabSmrg	fi
1319ff559fabSmrg])
1320ff559fabSmrg
1321ff559fabSmrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
1322ff559fabSmrg
1323ff559fabSmrg# serial 48 AC_PROG_LIBTOOL
1324ff559fabSmrg
1325ff559fabSmrg
1326ff559fabSmrg# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
1327ff559fabSmrg# -----------------------------------------------------------
1328ff559fabSmrg# If this macro is not defined by Autoconf, define it here.
1329ff559fabSmrgm4_ifdef([AC_PROVIDE_IFELSE],
1330ff559fabSmrg         [],
1331ff559fabSmrg         [m4_define([AC_PROVIDE_IFELSE],
1332ff559fabSmrg	         [m4_ifdef([AC_PROVIDE_$1],
1333ff559fabSmrg		           [$2], [$3])])])
1334ff559fabSmrg
1335ff559fabSmrg
1336ff559fabSmrg# AC_PROG_LIBTOOL
1337ff559fabSmrg# ---------------
1338ff559fabSmrgAC_DEFUN([AC_PROG_LIBTOOL],
1339ff559fabSmrg[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
1340ff559fabSmrgdnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
1341ff559fabSmrgdnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
1342ff559fabSmrg  AC_PROVIDE_IFELSE([AC_PROG_CXX],
1343ff559fabSmrg    [AC_LIBTOOL_CXX],
1344ff559fabSmrg    [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
1345ff559fabSmrg  ])])
1346ff559fabSmrgdnl And a similar setup for Fortran 77 support
1347ff559fabSmrg  AC_PROVIDE_IFELSE([AC_PROG_F77],
1348ff559fabSmrg    [AC_LIBTOOL_F77],
1349ff559fabSmrg    [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
1350ff559fabSmrg])])
1351ff559fabSmrg
1352ff559fabSmrgdnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
1353ff559fabSmrgdnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
1354ff559fabSmrgdnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
1355ff559fabSmrg  AC_PROVIDE_IFELSE([AC_PROG_GCJ],
1356ff559fabSmrg    [AC_LIBTOOL_GCJ],
1357ff559fabSmrg    [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
1358ff559fabSmrg      [AC_LIBTOOL_GCJ],
1359ff559fabSmrg      [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
1360ff559fabSmrg	[AC_LIBTOOL_GCJ],
1361ff559fabSmrg      [ifdef([AC_PROG_GCJ],
1362ff559fabSmrg	     [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
1363ff559fabSmrg       ifdef([A][M_PROG_GCJ],
1364ff559fabSmrg	     [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
1365ff559fabSmrg       ifdef([LT_AC_PROG_GCJ],
1366ff559fabSmrg	     [define([LT_AC_PROG_GCJ],
1367ff559fabSmrg		defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
1368ff559fabSmrg])])# AC_PROG_LIBTOOL
1369ff559fabSmrg
1370ff559fabSmrg
1371ff559fabSmrg# _AC_PROG_LIBTOOL
1372ff559fabSmrg# ----------------
1373ff559fabSmrgAC_DEFUN([_AC_PROG_LIBTOOL],
1374ff559fabSmrg[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
1375ff559fabSmrgAC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
1376ff559fabSmrgAC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
1377ff559fabSmrgAC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
1378ff559fabSmrg
1379ff559fabSmrg# This can be used to rebuild libtool when needed
1380ff559fabSmrgLIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
1381ff559fabSmrg
1382ff559fabSmrg# Always use our own libtool.
1383ff559fabSmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool'
1384ff559fabSmrgAC_SUBST(LIBTOOL)dnl
1385ff559fabSmrg
1386ff559fabSmrg# Prevent multiple expansion
1387ff559fabSmrgdefine([AC_PROG_LIBTOOL], [])
1388ff559fabSmrg])# _AC_PROG_LIBTOOL
1389ff559fabSmrg
1390ff559fabSmrg
1391ff559fabSmrg# AC_LIBTOOL_SETUP
1392ff559fabSmrg# ----------------
1393ff559fabSmrgAC_DEFUN([AC_LIBTOOL_SETUP],
1394ff559fabSmrg[AC_PREREQ(2.50)dnl
1395ff559fabSmrgAC_REQUIRE([AC_ENABLE_SHARED])dnl
1396ff559fabSmrgAC_REQUIRE([AC_ENABLE_STATIC])dnl
1397ff559fabSmrgAC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
1398ff559fabSmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl
1399ff559fabSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl
1400ff559fabSmrgAC_REQUIRE([AC_PROG_CC])dnl
1401ff559fabSmrgAC_REQUIRE([AC_PROG_LD])dnl
1402ff559fabSmrgAC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
1403ff559fabSmrgAC_REQUIRE([AC_PROG_NM])dnl
1404ff559fabSmrg
1405ff559fabSmrgAC_REQUIRE([AC_PROG_LN_S])dnl
1406ff559fabSmrgAC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
1407ff559fabSmrg# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
1408ff559fabSmrgAC_REQUIRE([AC_OBJEXT])dnl
1409ff559fabSmrgAC_REQUIRE([AC_EXEEXT])dnl
1410ff559fabSmrgdnl
1411ff559fabSmrg
1412ff559fabSmrgAC_LIBTOOL_SYS_MAX_CMD_LEN
1413ff559fabSmrgAC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
1414ff559fabSmrgAC_LIBTOOL_OBJDIR
1415ff559fabSmrg
1416ff559fabSmrgAC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
1417ff559fabSmrg_LT_AC_PROG_ECHO_BACKSLASH
1418ff559fabSmrg
1419ff559fabSmrgcase $host_os in
1420ff559fabSmrgaix3*)
1421ff559fabSmrg  # AIX sometimes has problems with the GCC collect2 program.  For some
1422ff559fabSmrg  # reason, if we set the COLLECT_NAMES environment variable, the problems
1423ff559fabSmrg  # vanish in a puff of smoke.
1424ff559fabSmrg  if test "X${COLLECT_NAMES+set}" != Xset; then
1425ff559fabSmrg    COLLECT_NAMES=
1426ff559fabSmrg    export COLLECT_NAMES
1427ff559fabSmrg  fi
1428ff559fabSmrg  ;;
1429ff559fabSmrgesac
1430ff559fabSmrg
1431ff559fabSmrg# Sed substitution that helps us do robust quoting.  It backslashifies
1432ff559fabSmrg# metacharacters that are still active within double-quoted strings.
1433ff559fabSmrgXsed='sed -e 1s/^X//'
1434ff559fabSmrg[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
1435ff559fabSmrg
1436ff559fabSmrg# Same as above, but do not quote variable references.
1437ff559fabSmrg[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
1438ff559fabSmrg
1439ff559fabSmrg# Sed substitution to delay expansion of an escaped shell variable in a
1440ff559fabSmrg# double_quote_subst'ed string.
1441ff559fabSmrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
1442ff559fabSmrg
1443ff559fabSmrg# Sed substitution to avoid accidental globbing in evaled expressions
1444ff559fabSmrgno_glob_subst='s/\*/\\\*/g'
1445ff559fabSmrg
1446ff559fabSmrg# Constants:
1447ff559fabSmrgrm="rm -f"
1448ff559fabSmrg
1449ff559fabSmrg# Global variables:
1450ff559fabSmrgdefault_ofile=libtool
1451ff559fabSmrgcan_build_shared=yes
1452ff559fabSmrg
1453ff559fabSmrg# All known linkers require a `.a' archive for static linking (except MSVC,
1454ff559fabSmrg# which needs '.lib').
1455ff559fabSmrglibext=a
1456ff559fabSmrgltmain="$ac_aux_dir/ltmain.sh"
1457ff559fabSmrgofile="$default_ofile"
1458ff559fabSmrgwith_gnu_ld="$lt_cv_prog_gnu_ld"
1459ff559fabSmrg
1460ff559fabSmrgAC_CHECK_TOOL(AR, ar, false)
1461ff559fabSmrgAC_CHECK_TOOL(RANLIB, ranlib, :)
1462ff559fabSmrgAC_CHECK_TOOL(STRIP, strip, :)
1463ff559fabSmrg
1464ff559fabSmrgold_CC="$CC"
1465ff559fabSmrgold_CFLAGS="$CFLAGS"
1466ff559fabSmrg
1467ff559fabSmrg# Set sane defaults for various variables
1468ff559fabSmrgtest -z "$AR" && AR=ar
1469ff559fabSmrgtest -z "$AR_FLAGS" && AR_FLAGS=cru
1470ff559fabSmrgtest -z "$AS" && AS=as
1471ff559fabSmrgtest -z "$CC" && CC=cc
1472ff559fabSmrgtest -z "$LTCC" && LTCC=$CC
1473ff559fabSmrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
1474ff559fabSmrgtest -z "$DLLTOOL" && DLLTOOL=dlltool
1475ff559fabSmrgtest -z "$LD" && LD=ld
1476ff559fabSmrgtest -z "$LN_S" && LN_S="ln -s"
1477ff559fabSmrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file
1478ff559fabSmrgtest -z "$NM" && NM=nm
1479ff559fabSmrgtest -z "$SED" && SED=sed
1480ff559fabSmrgtest -z "$OBJDUMP" && OBJDUMP=objdump
1481ff559fabSmrgtest -z "$RANLIB" && RANLIB=:
1482ff559fabSmrgtest -z "$STRIP" && STRIP=:
1483ff559fabSmrgtest -z "$ac_objext" && ac_objext=o
1484ff559fabSmrg
1485ff559fabSmrg# Determine commands to create old-style static archives.
1486ff559fabSmrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
1487ff559fabSmrgold_postinstall_cmds='chmod 644 $oldlib'
1488ff559fabSmrgold_postuninstall_cmds=
1489ff559fabSmrg
1490ff559fabSmrgif test -n "$RANLIB"; then
1491ff559fabSmrg  case $host_os in
1492ff559fabSmrg  openbsd*)
1493ff559fabSmrg    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
1494ff559fabSmrg    ;;
1495ff559fabSmrg  *)
1496ff559fabSmrg    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
1497ff559fabSmrg    ;;
1498ff559fabSmrg  esac
1499ff559fabSmrg  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
1500ff559fabSmrgfi
1501ff559fabSmrg
1502ff559fabSmrg_LT_CC_BASENAME([$compiler])
1503ff559fabSmrg
1504ff559fabSmrg# Only perform the check for file, if the check method requires it
1505ff559fabSmrgcase $deplibs_check_method in
1506ff559fabSmrgfile_magic*)
1507ff559fabSmrg  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
1508ff559fabSmrg    AC_PATH_MAGIC
1509ff559fabSmrg  fi
1510ff559fabSmrg  ;;
1511ff559fabSmrgesac
1512ff559fabSmrg
1513ff559fabSmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
1514ff559fabSmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
1515ff559fabSmrgenable_win32_dll=yes, enable_win32_dll=no)
1516ff559fabSmrg
1517ff559fabSmrgAC_ARG_ENABLE([libtool-lock],
1518ff559fabSmrg    [AC_HELP_STRING([--disable-libtool-lock],
1519ff559fabSmrg	[avoid locking (might break parallel builds)])])
1520ff559fabSmrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
1521ff559fabSmrg
1522ff559fabSmrgAC_ARG_WITH([pic],
1523ff559fabSmrg    [AC_HELP_STRING([--with-pic],
1524ff559fabSmrg	[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
1525ff559fabSmrg    [pic_mode="$withval"],
1526ff559fabSmrg    [pic_mode=default])
1527ff559fabSmrgtest -z "$pic_mode" && pic_mode=default
1528ff559fabSmrg
1529ff559fabSmrg# Use C for the default configuration in the libtool script
1530ff559fabSmrgtagname=
1531ff559fabSmrgAC_LIBTOOL_LANG_C_CONFIG
1532ff559fabSmrg_LT_AC_TAGCONFIG
1533ff559fabSmrg])# AC_LIBTOOL_SETUP
1534ff559fabSmrg
1535ff559fabSmrg
1536ff559fabSmrg# _LT_AC_SYS_COMPILER
1537ff559fabSmrg# -------------------
1538ff559fabSmrgAC_DEFUN([_LT_AC_SYS_COMPILER],
1539ff559fabSmrg[AC_REQUIRE([AC_PROG_CC])dnl
1540ff559fabSmrg
1541ff559fabSmrg# If no C compiler was specified, use CC.
1542ff559fabSmrgLTCC=${LTCC-"$CC"}
1543ff559fabSmrg
1544ff559fabSmrg# If no C compiler flags were specified, use CFLAGS.
1545ff559fabSmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"}
1546ff559fabSmrg
1547ff559fabSmrg# Allow CC to be a program name with arguments.
1548ff559fabSmrgcompiler=$CC
1549ff559fabSmrg])# _LT_AC_SYS_COMPILER
1550ff559fabSmrg
1551ff559fabSmrg
1552ff559fabSmrg# _LT_CC_BASENAME(CC)
1553ff559fabSmrg# -------------------
1554ff559fabSmrg# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
1555ff559fabSmrgAC_DEFUN([_LT_CC_BASENAME],
1556ff559fabSmrg[for cc_temp in $1""; do
1557ff559fabSmrg  case $cc_temp in
1558ff559fabSmrg    compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
1559ff559fabSmrg    distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
1560ff559fabSmrg    \-*) ;;
1561ff559fabSmrg    *) break;;
1562ff559fabSmrg  esac
1563ff559fabSmrgdone
1564ff559fabSmrgcc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
1565ff559fabSmrg])
1566ff559fabSmrg
1567ff559fabSmrg
1568ff559fabSmrg# _LT_COMPILER_BOILERPLATE
1569ff559fabSmrg# ------------------------
1570ff559fabSmrg# Check for compiler boilerplate output or warnings with
1571ff559fabSmrg# the simple compiler test code.
1572ff559fabSmrgAC_DEFUN([_LT_COMPILER_BOILERPLATE],
1573ff559fabSmrg[ac_outfile=conftest.$ac_objext
1574ff559fabSmrgprintf "$lt_simple_compile_test_code" >conftest.$ac_ext
1575ff559fabSmrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
1576ff559fabSmrg_lt_compiler_boilerplate=`cat conftest.err`
1577ff559fabSmrg$rm conftest*
1578ff559fabSmrg])# _LT_COMPILER_BOILERPLATE
1579ff559fabSmrg
1580ff559fabSmrg
1581ff559fabSmrg# _LT_LINKER_BOILERPLATE
1582ff559fabSmrg# ----------------------
1583ff559fabSmrg# Check for linker boilerplate output or warnings with
1584ff559fabSmrg# the simple link test code.
1585ff559fabSmrgAC_DEFUN([_LT_LINKER_BOILERPLATE],
1586ff559fabSmrg[ac_outfile=conftest.$ac_objext
1587ff559fabSmrgprintf "$lt_simple_link_test_code" >conftest.$ac_ext
1588ff559fabSmrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
1589ff559fabSmrg_lt_linker_boilerplate=`cat conftest.err`
1590ff559fabSmrg$rm conftest*
1591ff559fabSmrg])# _LT_LINKER_BOILERPLATE
1592ff559fabSmrg
1593ff559fabSmrg
1594ff559fabSmrg# _LT_AC_SYS_LIBPATH_AIX
1595ff559fabSmrg# ----------------------
1596ff559fabSmrg# Links a minimal program and checks the executable
1597ff559fabSmrg# for the system default hardcoded library path. In most cases,
1598ff559fabSmrg# this is /usr/lib:/lib, but when the MPI compilers are used
1599ff559fabSmrg# the location of the communication and MPI libs are included too.
1600ff559fabSmrg# If we don't find anything, use the default library path according
1601ff559fabSmrg# to the aix ld manual.
1602ff559fabSmrgAC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
1603ff559fabSmrg[AC_LINK_IFELSE(AC_LANG_PROGRAM,[
1604ff559fabSmrgaix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
1605ff559fabSmrg}'`
1606ff559fabSmrg# Check for a 64-bit object if we didn't find anything.
1607ff559fabSmrgif 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; }
1608ff559fabSmrg}'`; fi],[])
1609ff559fabSmrgif test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
1610ff559fabSmrg])# _LT_AC_SYS_LIBPATH_AIX
1611ff559fabSmrg
1612ff559fabSmrg
1613ff559fabSmrg# _LT_AC_SHELL_INIT(ARG)
1614ff559fabSmrg# ----------------------
1615ff559fabSmrgAC_DEFUN([_LT_AC_SHELL_INIT],
1616ff559fabSmrg[ifdef([AC_DIVERSION_NOTICE],
1617ff559fabSmrg	     [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
1618ff559fabSmrg	 [AC_DIVERT_PUSH(NOTICE)])
1619ff559fabSmrg$1
1620ff559fabSmrgAC_DIVERT_POP
1621ff559fabSmrg])# _LT_AC_SHELL_INIT
1622ff559fabSmrg
1623ff559fabSmrg
1624ff559fabSmrg# _LT_AC_PROG_ECHO_BACKSLASH
1625ff559fabSmrg# --------------------------
1626ff559fabSmrg# Add some code to the start of the generated configure script which
1627ff559fabSmrg# will find an echo command which doesn't interpret backslashes.
1628ff559fabSmrgAC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
1629ff559fabSmrg[_LT_AC_SHELL_INIT([
1630ff559fabSmrg# Check that we are running under the correct shell.
1631ff559fabSmrgSHELL=${CONFIG_SHELL-/bin/sh}
1632ff559fabSmrg
1633ff559fabSmrgcase X$ECHO in
1634ff559fabSmrgX*--fallback-echo)
1635ff559fabSmrg  # Remove one level of quotation (which was required for Make).
1636ff559fabSmrg  ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
1637ff559fabSmrg  ;;
1638ff559fabSmrgesac
1639ff559fabSmrg
1640ff559fabSmrgecho=${ECHO-echo}
1641ff559fabSmrgif test "X[$]1" = X--no-reexec; then
1642ff559fabSmrg  # Discard the --no-reexec flag, and continue.
1643ff559fabSmrg  shift
1644ff559fabSmrgelif test "X[$]1" = X--fallback-echo; then
1645ff559fabSmrg  # Avoid inline document here, it may be left over
1646ff559fabSmrg  :
1647ff559fabSmrgelif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
1648ff559fabSmrg  # Yippee, $echo works!
1649ff559fabSmrg  :
1650ff559fabSmrgelse
1651ff559fabSmrg  # Restart under the correct shell.
1652ff559fabSmrg  exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
1653ff559fabSmrgfi
1654ff559fabSmrg
1655ff559fabSmrgif test "X[$]1" = X--fallback-echo; then
1656ff559fabSmrg  # used as fallback echo
1657ff559fabSmrg  shift
1658ff559fabSmrg  cat <<EOF
1659ff559fabSmrg[$]*
1660ff559fabSmrgEOF
1661ff559fabSmrg  exit 0
1662ff559fabSmrgfi
1663ff559fabSmrg
1664ff559fabSmrg# The HP-UX ksh and POSIX shell print the target directory to stdout
1665ff559fabSmrg# if CDPATH is set.
1666ff559fabSmrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
1667ff559fabSmrg
1668ff559fabSmrgif test -z "$ECHO"; then
1669ff559fabSmrgif test "X${echo_test_string+set}" != Xset; then
1670ff559fabSmrg# find a string as large as possible, as long as the shell can cope with it
1671ff559fabSmrg  for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
1672ff559fabSmrg    # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
1673ff559fabSmrg    if (echo_test_string=`eval $cmd`) 2>/dev/null &&
1674ff559fabSmrg       echo_test_string=`eval $cmd` &&
1675ff559fabSmrg       (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
1676ff559fabSmrg    then
1677ff559fabSmrg      break
1678ff559fabSmrg    fi
1679ff559fabSmrg  done
1680ff559fabSmrgfi
1681ff559fabSmrg
1682ff559fabSmrgif test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
1683ff559fabSmrg   echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
1684ff559fabSmrg   test "X$echo_testing_string" = "X$echo_test_string"; then
1685ff559fabSmrg  :
1686ff559fabSmrgelse
1687ff559fabSmrg  # The Solaris, AIX, and Digital Unix default echo programs unquote
1688ff559fabSmrg  # backslashes.  This makes it impossible to quote backslashes using
1689ff559fabSmrg  #   echo "$something" | sed 's/\\/\\\\/g'
1690ff559fabSmrg  #
1691ff559fabSmrg  # So, first we look for a working echo in the user's PATH.
1692ff559fabSmrg
1693ff559fabSmrg  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
1694ff559fabSmrg  for dir in $PATH /usr/ucb; do
1695ff559fabSmrg    IFS="$lt_save_ifs"
1696ff559fabSmrg    if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
1697ff559fabSmrg       test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
1698ff559fabSmrg       echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
1699ff559fabSmrg       test "X$echo_testing_string" = "X$echo_test_string"; then
1700ff559fabSmrg      echo="$dir/echo"
1701ff559fabSmrg      break
1702ff559fabSmrg    fi
1703ff559fabSmrg  done
1704ff559fabSmrg  IFS="$lt_save_ifs"
1705ff559fabSmrg
1706ff559fabSmrg  if test "X$echo" = Xecho; then
1707ff559fabSmrg    # We didn't find a better echo, so look for alternatives.
1708ff559fabSmrg    if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
1709ff559fabSmrg       echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
1710ff559fabSmrg       test "X$echo_testing_string" = "X$echo_test_string"; then
1711ff559fabSmrg      # This shell has a builtin print -r that does the trick.
1712ff559fabSmrg      echo='print -r'
1713ff559fabSmrg    elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
1714ff559fabSmrg	 test "X$CONFIG_SHELL" != X/bin/ksh; then
1715ff559fabSmrg      # If we have ksh, try running configure again with it.
1716ff559fabSmrg      ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
1717ff559fabSmrg      export ORIGINAL_CONFIG_SHELL
1718ff559fabSmrg      CONFIG_SHELL=/bin/ksh
1719ff559fabSmrg      export CONFIG_SHELL
1720ff559fabSmrg      exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
1721ff559fabSmrg    else
1722ff559fabSmrg      # Try using printf.
1723ff559fabSmrg      echo='printf %s\n'
1724ff559fabSmrg      if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
1725ff559fabSmrg	 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
1726ff559fabSmrg	 test "X$echo_testing_string" = "X$echo_test_string"; then
1727ff559fabSmrg	# Cool, printf works
1728ff559fabSmrg	:
1729ff559fabSmrg      elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1730ff559fabSmrg	   test "X$echo_testing_string" = 'X\t' &&
1731ff559fabSmrg	   echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1732ff559fabSmrg	   test "X$echo_testing_string" = "X$echo_test_string"; then
1733ff559fabSmrg	CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
1734ff559fabSmrg	export CONFIG_SHELL
1735ff559fabSmrg	SHELL="$CONFIG_SHELL"
1736ff559fabSmrg	export SHELL
1737ff559fabSmrg	echo="$CONFIG_SHELL [$]0 --fallback-echo"
1738ff559fabSmrg      elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1739ff559fabSmrg	   test "X$echo_testing_string" = 'X\t' &&
1740ff559fabSmrg	   echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1741ff559fabSmrg	   test "X$echo_testing_string" = "X$echo_test_string"; then
1742ff559fabSmrg	echo="$CONFIG_SHELL [$]0 --fallback-echo"
1743ff559fabSmrg      else
1744ff559fabSmrg	# maybe with a smaller string...
1745ff559fabSmrg	prev=:
1746ff559fabSmrg
1747ff559fabSmrg	for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
1748ff559fabSmrg	  if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
1749ff559fabSmrg	  then
1750ff559fabSmrg	    break
1751ff559fabSmrg	  fi
1752ff559fabSmrg	  prev="$cmd"
1753ff559fabSmrg	done
1754ff559fabSmrg
1755ff559fabSmrg	if test "$prev" != 'sed 50q "[$]0"'; then
1756ff559fabSmrg	  echo_test_string=`eval $prev`
1757ff559fabSmrg	  export echo_test_string
1758ff559fabSmrg	  exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
1759ff559fabSmrg	else
1760ff559fabSmrg	  # Oops.  We lost completely, so just stick with echo.
1761ff559fabSmrg	  echo=echo
1762ff559fabSmrg	fi
1763ff559fabSmrg      fi
1764ff559fabSmrg    fi
1765ff559fabSmrg  fi
1766ff559fabSmrgfi
1767ff559fabSmrgfi
1768ff559fabSmrg
1769ff559fabSmrg# Copy echo and quote the copy suitably for passing to libtool from
1770ff559fabSmrg# the Makefile, instead of quoting the original, which is used later.
1771ff559fabSmrgECHO=$echo
1772ff559fabSmrgif test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
1773ff559fabSmrg   ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
1774ff559fabSmrgfi
1775ff559fabSmrg
1776ff559fabSmrgAC_SUBST(ECHO)
1777ff559fabSmrg])])# _LT_AC_PROG_ECHO_BACKSLASH
1778ff559fabSmrg
1779ff559fabSmrg
1780ff559fabSmrg# _LT_AC_LOCK
1781ff559fabSmrg# -----------
1782ff559fabSmrgAC_DEFUN([_LT_AC_LOCK],
1783ff559fabSmrg[AC_ARG_ENABLE([libtool-lock],
1784ff559fabSmrg    [AC_HELP_STRING([--disable-libtool-lock],
1785ff559fabSmrg	[avoid locking (might break parallel builds)])])
1786ff559fabSmrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
1787ff559fabSmrg
1788ff559fabSmrg# Some flags need to be propagated to the compiler or linker for good
1789ff559fabSmrg# libtool support.
1790ff559fabSmrgcase $host in
1791ff559fabSmrgia64-*-hpux*)
1792ff559fabSmrg  # Find out which ABI we are using.
1793ff559fabSmrg  echo 'int i;' > conftest.$ac_ext
1794ff559fabSmrg  if AC_TRY_EVAL(ac_compile); then
1795ff559fabSmrg    case `/usr/bin/file conftest.$ac_objext` in
1796ff559fabSmrg    *ELF-32*)
1797ff559fabSmrg      HPUX_IA64_MODE="32"
1798ff559fabSmrg      ;;
1799ff559fabSmrg    *ELF-64*)
1800ff559fabSmrg      HPUX_IA64_MODE="64"
1801ff559fabSmrg      ;;
1802ff559fabSmrg    esac
1803ff559fabSmrg  fi
1804ff559fabSmrg  rm -rf conftest*
1805ff559fabSmrg  ;;
1806ff559fabSmrg*-*-irix6*)
1807ff559fabSmrg  # Find out which ABI we are using.
1808ff559fabSmrg  echo '[#]line __oline__ "configure"' > conftest.$ac_ext
1809ff559fabSmrg  if AC_TRY_EVAL(ac_compile); then
1810ff559fabSmrg   if test "$lt_cv_prog_gnu_ld" = yes; then
1811ff559fabSmrg    case `/usr/bin/file conftest.$ac_objext` in
1812ff559fabSmrg    *32-bit*)
1813ff559fabSmrg      LD="${LD-ld} -melf32bsmip"
1814ff559fabSmrg      ;;
1815ff559fabSmrg    *N32*)
1816ff559fabSmrg      LD="${LD-ld} -melf32bmipn32"
1817ff559fabSmrg      ;;
1818ff559fabSmrg    *64-bit*)
1819ff559fabSmrg      LD="${LD-ld} -melf64bmip"
1820ff559fabSmrg      ;;
1821ff559fabSmrg    esac
1822ff559fabSmrg   else
1823ff559fabSmrg    case `/usr/bin/file conftest.$ac_objext` in
1824ff559fabSmrg    *32-bit*)
1825ff559fabSmrg      LD="${LD-ld} -32"
1826ff559fabSmrg      ;;
1827ff559fabSmrg    *N32*)
1828ff559fabSmrg      LD="${LD-ld} -n32"
1829ff559fabSmrg      ;;
1830ff559fabSmrg    *64-bit*)
1831ff559fabSmrg      LD="${LD-ld} -64"
1832ff559fabSmrg      ;;
1833ff559fabSmrg    esac
1834ff559fabSmrg   fi
1835ff559fabSmrg  fi
1836ff559fabSmrg  rm -rf conftest*
1837ff559fabSmrg  ;;
1838ff559fabSmrg
1839ff559fabSmrgx86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
1840ff559fabSmrg  # Find out which ABI we are using.
1841ff559fabSmrg  echo 'int i;' > conftest.$ac_ext
1842ff559fabSmrg  if AC_TRY_EVAL(ac_compile); then
1843ff559fabSmrg    case `/usr/bin/file conftest.o` in
1844ff559fabSmrg    *32-bit*)
1845ff559fabSmrg      case $host in
1846ff559fabSmrg        x86_64-*linux*)
1847ff559fabSmrg          LD="${LD-ld} -m elf_i386"
1848ff559fabSmrg          ;;
1849ff559fabSmrg        ppc64-*linux*|powerpc64-*linux*)
1850ff559fabSmrg          LD="${LD-ld} -m elf32ppclinux"
1851ff559fabSmrg          ;;
1852ff559fabSmrg        s390x-*linux*)
1853ff559fabSmrg          LD="${LD-ld} -m elf_s390"
1854ff559fabSmrg          ;;
1855ff559fabSmrg        sparc64-*linux*)
1856ff559fabSmrg          LD="${LD-ld} -m elf32_sparc"
1857ff559fabSmrg          ;;
1858ff559fabSmrg      esac
1859ff559fabSmrg      ;;
1860ff559fabSmrg    *64-bit*)
1861ff559fabSmrg      case $host in
1862ff559fabSmrg        x86_64-*linux*)
1863ff559fabSmrg          LD="${LD-ld} -m elf_x86_64"
1864ff559fabSmrg          ;;
1865ff559fabSmrg        ppc*-*linux*|powerpc*-*linux*)
1866ff559fabSmrg          LD="${LD-ld} -m elf64ppc"
1867ff559fabSmrg          ;;
1868ff559fabSmrg        s390*-*linux*)
1869ff559fabSmrg          LD="${LD-ld} -m elf64_s390"
1870ff559fabSmrg          ;;
1871ff559fabSmrg        sparc*-*linux*)
1872ff559fabSmrg          LD="${LD-ld} -m elf64_sparc"
1873ff559fabSmrg          ;;
1874ff559fabSmrg      esac
1875ff559fabSmrg      ;;
1876ff559fabSmrg    esac
1877ff559fabSmrg  fi
1878ff559fabSmrg  rm -rf conftest*
1879ff559fabSmrg  ;;
1880ff559fabSmrg
1881ff559fabSmrg*-*-sco3.2v5*)
1882ff559fabSmrg  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1883ff559fabSmrg  SAVE_CFLAGS="$CFLAGS"
1884ff559fabSmrg  CFLAGS="$CFLAGS -belf"
1885ff559fabSmrg  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
1886ff559fabSmrg    [AC_LANG_PUSH(C)
1887ff559fabSmrg     AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
1888ff559fabSmrg     AC_LANG_POP])
1889ff559fabSmrg  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
1890ff559fabSmrg    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1891ff559fabSmrg    CFLAGS="$SAVE_CFLAGS"
1892ff559fabSmrg  fi
1893ff559fabSmrg  ;;
1894ff559fabSmrgsparc*-*solaris*)
1895ff559fabSmrg  # Find out which ABI we are using.
1896ff559fabSmrg  echo 'int i;' > conftest.$ac_ext
1897ff559fabSmrg  if AC_TRY_EVAL(ac_compile); then
1898ff559fabSmrg    case `/usr/bin/file conftest.o` in
1899ff559fabSmrg    *64-bit*)
1900ff559fabSmrg      case $lt_cv_prog_gnu_ld in
1901ff559fabSmrg      yes*) LD="${LD-ld} -m elf64_sparc" ;;
1902ff559fabSmrg      *)    LD="${LD-ld} -64" ;;
1903ff559fabSmrg      esac
1904ff559fabSmrg      ;;
1905ff559fabSmrg    esac
1906ff559fabSmrg  fi
1907ff559fabSmrg  rm -rf conftest*
1908ff559fabSmrg  ;;
1909ff559fabSmrg
1910ff559fabSmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
1911ff559fabSmrg[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
1912ff559fabSmrg  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
1913ff559fabSmrg  AC_CHECK_TOOL(AS, as, false)
1914ff559fabSmrg  AC_CHECK_TOOL(OBJDUMP, objdump, false)
1915ff559fabSmrg  ;;
1916ff559fabSmrg  ])
1917ff559fabSmrgesac
1918ff559fabSmrg
1919ff559fabSmrgneed_locks="$enable_libtool_lock"
1920ff559fabSmrg
1921ff559fabSmrg])# _LT_AC_LOCK
1922ff559fabSmrg
1923ff559fabSmrg
1924ff559fabSmrg# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1925ff559fabSmrg#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
1926ff559fabSmrg# ----------------------------------------------------------------
1927ff559fabSmrg# Check whether the given compiler option works
1928ff559fabSmrgAC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
1929ff559fabSmrg[AC_REQUIRE([LT_AC_PROG_SED])
1930ff559fabSmrgAC_CACHE_CHECK([$1], [$2],
1931ff559fabSmrg  [$2=no
1932ff559fabSmrg  ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
1933ff559fabSmrg   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
1934ff559fabSmrg   lt_compiler_flag="$3"
1935ff559fabSmrg   # Insert the option either (1) after the last *FLAGS variable, or
1936ff559fabSmrg   # (2) before a word containing "conftest.", or (3) at the end.
1937ff559fabSmrg   # Note that $ac_compile itself does not contain backslashes and begins
1938ff559fabSmrg   # with a dollar sign (not a hyphen), so the echo should work correctly.
1939ff559fabSmrg   # The option is referenced via a variable to avoid confusing sed.
1940ff559fabSmrg   lt_compile=`echo "$ac_compile" | $SED \
1941ff559fabSmrg   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1942ff559fabSmrg   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1943ff559fabSmrg   -e 's:$: $lt_compiler_flag:'`
1944ff559fabSmrg   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1945ff559fabSmrg   (eval "$lt_compile" 2>conftest.err)
1946ff559fabSmrg   ac_status=$?
1947ff559fabSmrg   cat conftest.err >&AS_MESSAGE_LOG_FD
1948ff559fabSmrg   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1949ff559fabSmrg   if (exit $ac_status) && test -s "$ac_outfile"; then
1950ff559fabSmrg     # The compiler can only warn and ignore the option if not recognized
1951ff559fabSmrg     # So say no if there are warnings other than the usual output.
1952ff559fabSmrg     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
1953ff559fabSmrg     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1954ff559fabSmrg     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
1955ff559fabSmrg       $2=yes
1956ff559fabSmrg     fi
1957ff559fabSmrg   fi
1958ff559fabSmrg   $rm conftest*
1959ff559fabSmrg])
1960ff559fabSmrg
1961ff559fabSmrgif test x"[$]$2" = xyes; then
1962ff559fabSmrg    ifelse([$5], , :, [$5])
1963ff559fabSmrgelse
1964ff559fabSmrg    ifelse([$6], , :, [$6])
1965ff559fabSmrgfi
1966ff559fabSmrg])# AC_LIBTOOL_COMPILER_OPTION
1967ff559fabSmrg
1968ff559fabSmrg
1969ff559fabSmrg# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1970ff559fabSmrg#                          [ACTION-SUCCESS], [ACTION-FAILURE])
1971ff559fabSmrg# ------------------------------------------------------------
1972ff559fabSmrg# Check whether the given compiler option works
1973ff559fabSmrgAC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
1974ff559fabSmrg[AC_CACHE_CHECK([$1], [$2],
1975ff559fabSmrg  [$2=no
1976ff559fabSmrg   save_LDFLAGS="$LDFLAGS"
1977ff559fabSmrg   LDFLAGS="$LDFLAGS $3"
1978ff559fabSmrg   printf "$lt_simple_link_test_code" > conftest.$ac_ext
1979ff559fabSmrg   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
1980ff559fabSmrg     # The linker can only warn and ignore the option if not recognized
1981ff559fabSmrg     # So say no if there are warnings
1982ff559fabSmrg     if test -s conftest.err; then
1983ff559fabSmrg       # Append any errors to the config.log.
1984ff559fabSmrg       cat conftest.err 1>&AS_MESSAGE_LOG_FD
1985ff559fabSmrg       $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
1986ff559fabSmrg       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1987ff559fabSmrg       if diff conftest.exp conftest.er2 >/dev/null; then
1988ff559fabSmrg         $2=yes
1989ff559fabSmrg       fi
1990ff559fabSmrg     else
1991ff559fabSmrg       $2=yes
1992ff559fabSmrg     fi
1993ff559fabSmrg   fi
1994ff559fabSmrg   $rm conftest*
1995ff559fabSmrg   LDFLAGS="$save_LDFLAGS"
1996ff559fabSmrg])
1997ff559fabSmrg
1998ff559fabSmrgif test x"[$]$2" = xyes; then
1999ff559fabSmrg    ifelse([$4], , :, [$4])
2000ff559fabSmrgelse
2001ff559fabSmrg    ifelse([$5], , :, [$5])
2002ff559fabSmrgfi
2003ff559fabSmrg])# AC_LIBTOOL_LINKER_OPTION
2004ff559fabSmrg
2005ff559fabSmrg
2006ff559fabSmrg# AC_LIBTOOL_SYS_MAX_CMD_LEN
2007ff559fabSmrg# --------------------------
2008ff559fabSmrgAC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
2009ff559fabSmrg[# find the maximum length of command line arguments
2010ff559fabSmrgAC_MSG_CHECKING([the maximum length of command line arguments])
2011ff559fabSmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
2012ff559fabSmrg  i=0
2013ff559fabSmrg  teststring="ABCD"
2014ff559fabSmrg
2015ff559fabSmrg  case $build_os in
2016ff559fabSmrg  msdosdjgpp*)
2017ff559fabSmrg    # On DJGPP, this test can blow up pretty badly due to problems in libc
2018ff559fabSmrg    # (any single argument exceeding 2000 bytes causes a buffer overrun
2019ff559fabSmrg    # during glob expansion).  Even if it were fixed, the result of this
2020ff559fabSmrg    # check would be larger than it should be.
2021ff559fabSmrg    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
2022ff559fabSmrg    ;;
2023ff559fabSmrg
2024ff559fabSmrg  gnu*)
2025ff559fabSmrg    # Under GNU Hurd, this test is not required because there is
2026ff559fabSmrg    # no limit to the length of command line arguments.
2027ff559fabSmrg    # Libtool will interpret -1 as no limit whatsoever
2028ff559fabSmrg    lt_cv_sys_max_cmd_len=-1;
2029ff559fabSmrg    ;;
2030ff559fabSmrg
2031ff559fabSmrg  cygwin* | mingw*)
2032ff559fabSmrg    # On Win9x/ME, this test blows up -- it succeeds, but takes
2033ff559fabSmrg    # about 5 minutes as the teststring grows exponentially.
2034ff559fabSmrg    # Worse, since 9x/ME are not pre-emptively multitasking,
2035ff559fabSmrg    # you end up with a "frozen" computer, even though with patience
2036ff559fabSmrg    # the test eventually succeeds (with a max line length of 256k).
2037ff559fabSmrg    # Instead, let's just punt: use the minimum linelength reported by
2038ff559fabSmrg    # all of the supported platforms: 8192 (on NT/2K/XP).
2039ff559fabSmrg    lt_cv_sys_max_cmd_len=8192;
2040ff559fabSmrg    ;;
2041ff559fabSmrg
2042ff559fabSmrg  amigaos*)
2043ff559fabSmrg    # On AmigaOS with pdksh, this test takes hours, literally.
2044ff559fabSmrg    # So we just punt and use a minimum line length of 8192.
2045ff559fabSmrg    lt_cv_sys_max_cmd_len=8192;
2046ff559fabSmrg    ;;
2047ff559fabSmrg
2048ff559fabSmrg  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
2049ff559fabSmrg    # This has been around since 386BSD, at least.  Likely further.
2050ff559fabSmrg    if test -x /sbin/sysctl; then
2051ff559fabSmrg      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
2052ff559fabSmrg    elif test -x /usr/sbin/sysctl; then
2053ff559fabSmrg      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
2054ff559fabSmrg    else
2055ff559fabSmrg      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
2056ff559fabSmrg    fi
2057ff559fabSmrg    # And add a safety zone
2058ff559fabSmrg    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
2059ff559fabSmrg    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
2060ff559fabSmrg    ;;
2061ff559fabSmrg
2062ff559fabSmrg  interix*)
2063ff559fabSmrg    # We know the value 262144 and hardcode it with a safety zone (like BSD)
2064ff559fabSmrg    lt_cv_sys_max_cmd_len=196608
2065ff559fabSmrg    ;;
2066ff559fabSmrg
2067ff559fabSmrg  osf*)
2068ff559fabSmrg    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
2069ff559fabSmrg    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
2070ff559fabSmrg    # nice to cause kernel panics so lets avoid the loop below.
2071ff559fabSmrg    # First set a reasonable default.
2072ff559fabSmrg    lt_cv_sys_max_cmd_len=16384
2073ff559fabSmrg    #
2074ff559fabSmrg    if test -x /sbin/sysconfig; then
2075ff559fabSmrg      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
2076ff559fabSmrg        *1*) lt_cv_sys_max_cmd_len=-1 ;;
2077ff559fabSmrg      esac
2078ff559fabSmrg    fi
2079ff559fabSmrg    ;;
2080ff559fabSmrg  sco3.2v5*)
2081ff559fabSmrg    lt_cv_sys_max_cmd_len=102400
2082ff559fabSmrg    ;;
2083ff559fabSmrg  sysv5* | sco5v6* | sysv4.2uw2*)
2084ff559fabSmrg    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
2085ff559fabSmrg    if test -n "$kargmax"; then
2086ff559fabSmrg      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ 	]]//'`
2087ff559fabSmrg    else
2088ff559fabSmrg      lt_cv_sys_max_cmd_len=32768
2089ff559fabSmrg    fi
2090ff559fabSmrg    ;;
2091ff559fabSmrg  *)
2092ff559fabSmrg    # If test is not a shell built-in, we'll probably end up computing a
2093ff559fabSmrg    # maximum length that is only half of the actual maximum length, but
2094ff559fabSmrg    # we can't tell.
2095ff559fabSmrg    SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
2096ff559fabSmrg    while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
2097ff559fabSmrg	       = "XX$teststring") >/dev/null 2>&1 &&
2098ff559fabSmrg	    new_result=`expr "X$teststring" : ".*" 2>&1` &&
2099ff559fabSmrg	    lt_cv_sys_max_cmd_len=$new_result &&
2100ff559fabSmrg	    test $i != 17 # 1/2 MB should be enough
2101ff559fabSmrg    do
2102ff559fabSmrg      i=`expr $i + 1`
2103ff559fabSmrg      teststring=$teststring$teststring
2104ff559fabSmrg    done
2105ff559fabSmrg    teststring=
2106ff559fabSmrg    # Add a significant safety factor because C++ compilers can tack on massive
2107ff559fabSmrg    # amounts of additional arguments before passing them to the linker.
2108ff559fabSmrg    # It appears as though 1/2 is a usable value.
2109ff559fabSmrg    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
2110ff559fabSmrg    ;;
2111ff559fabSmrg  esac
2112ff559fabSmrg])
2113ff559fabSmrgif test -n $lt_cv_sys_max_cmd_len ; then
2114ff559fabSmrg  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
2115ff559fabSmrgelse
2116ff559fabSmrg  AC_MSG_RESULT(none)
2117ff559fabSmrgfi
2118ff559fabSmrg])# AC_LIBTOOL_SYS_MAX_CMD_LEN
2119ff559fabSmrg
2120ff559fabSmrg
2121ff559fabSmrg# _LT_AC_CHECK_DLFCN
2122ff559fabSmrg# ------------------
2123ff559fabSmrgAC_DEFUN([_LT_AC_CHECK_DLFCN],
2124ff559fabSmrg[AC_CHECK_HEADERS(dlfcn.h)dnl
2125ff559fabSmrg])# _LT_AC_CHECK_DLFCN
2126ff559fabSmrg
2127ff559fabSmrg
2128ff559fabSmrg# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
2129ff559fabSmrg#                           ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
2130ff559fabSmrg# ---------------------------------------------------------------------
2131ff559fabSmrgAC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
2132ff559fabSmrg[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
2133ff559fabSmrgif test "$cross_compiling" = yes; then :
2134ff559fabSmrg  [$4]
2135ff559fabSmrgelse
2136ff559fabSmrg  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
2137ff559fabSmrg  lt_status=$lt_dlunknown
2138ff559fabSmrg  cat > conftest.$ac_ext <<EOF
2139ff559fabSmrg[#line __oline__ "configure"
2140ff559fabSmrg#include "confdefs.h"
2141ff559fabSmrg
2142ff559fabSmrg#if HAVE_DLFCN_H
2143ff559fabSmrg#include <dlfcn.h>
2144ff559fabSmrg#endif
2145ff559fabSmrg
2146ff559fabSmrg#include <stdio.h>
2147ff559fabSmrg
2148ff559fabSmrg#ifdef RTLD_GLOBAL
2149ff559fabSmrg#  define LT_DLGLOBAL		RTLD_GLOBAL
2150ff559fabSmrg#else
2151ff559fabSmrg#  ifdef DL_GLOBAL
2152ff559fabSmrg#    define LT_DLGLOBAL		DL_GLOBAL
2153ff559fabSmrg#  else
2154ff559fabSmrg#    define LT_DLGLOBAL		0
2155ff559fabSmrg#  endif
2156ff559fabSmrg#endif
2157ff559fabSmrg
2158ff559fabSmrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
2159ff559fabSmrg   find out it does not work in some platform. */
2160ff559fabSmrg#ifndef LT_DLLAZY_OR_NOW
2161ff559fabSmrg#  ifdef RTLD_LAZY
2162ff559fabSmrg#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
2163ff559fabSmrg#  else
2164ff559fabSmrg#    ifdef DL_LAZY
2165ff559fabSmrg#      define LT_DLLAZY_OR_NOW		DL_LAZY
2166ff559fabSmrg#    else
2167ff559fabSmrg#      ifdef RTLD_NOW
2168ff559fabSmrg#        define LT_DLLAZY_OR_NOW	RTLD_NOW
2169ff559fabSmrg#      else
2170ff559fabSmrg#        ifdef DL_NOW
2171ff559fabSmrg#          define LT_DLLAZY_OR_NOW	DL_NOW
2172ff559fabSmrg#        else
2173ff559fabSmrg#          define LT_DLLAZY_OR_NOW	0
2174ff559fabSmrg#        endif
2175ff559fabSmrg#      endif
2176ff559fabSmrg#    endif
2177ff559fabSmrg#  endif
2178ff559fabSmrg#endif
2179ff559fabSmrg
2180ff559fabSmrg#ifdef __cplusplus
2181ff559fabSmrgextern "C" void exit (int);
2182ff559fabSmrg#endif
2183ff559fabSmrg
2184ff559fabSmrgvoid fnord() { int i=42;}
2185ff559fabSmrgint main ()
2186ff559fabSmrg{
2187ff559fabSmrg  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
2188ff559fabSmrg  int status = $lt_dlunknown;
2189ff559fabSmrg
2190ff559fabSmrg  if (self)
2191ff559fabSmrg    {
2192ff559fabSmrg      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
2193ff559fabSmrg      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
2194ff559fabSmrg      /* dlclose (self); */
2195ff559fabSmrg    }
2196ff559fabSmrg  else
2197ff559fabSmrg    puts (dlerror ());
2198ff559fabSmrg
2199ff559fabSmrg    exit (status);
2200ff559fabSmrg}]
2201ff559fabSmrgEOF
2202ff559fabSmrg  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
2203ff559fabSmrg    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
2204ff559fabSmrg    lt_status=$?
2205ff559fabSmrg    case x$lt_status in
2206ff559fabSmrg      x$lt_dlno_uscore) $1 ;;
2207ff559fabSmrg      x$lt_dlneed_uscore) $2 ;;
2208ff559fabSmrg      x$lt_dlunknown|x*) $3 ;;
2209ff559fabSmrg    esac
2210ff559fabSmrg  else :
2211ff559fabSmrg    # compilation failed
2212ff559fabSmrg    $3
2213ff559fabSmrg  fi
2214ff559fabSmrgfi
2215ff559fabSmrgrm -fr conftest*
2216ff559fabSmrg])# _LT_AC_TRY_DLOPEN_SELF
2217ff559fabSmrg
2218ff559fabSmrg
2219ff559fabSmrg# AC_LIBTOOL_DLOPEN_SELF
2220ff559fabSmrg# ----------------------
2221ff559fabSmrgAC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
2222ff559fabSmrg[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
2223ff559fabSmrgif test "x$enable_dlopen" != xyes; then
2224ff559fabSmrg  enable_dlopen=unknown
2225ff559fabSmrg  enable_dlopen_self=unknown
2226ff559fabSmrg  enable_dlopen_self_static=unknown
2227ff559fabSmrgelse
2228ff559fabSmrg  lt_cv_dlopen=no
2229ff559fabSmrg  lt_cv_dlopen_libs=
2230ff559fabSmrg
2231ff559fabSmrg  case $host_os in
2232ff559fabSmrg  beos*)
2233ff559fabSmrg    lt_cv_dlopen="load_add_on"
2234ff559fabSmrg    lt_cv_dlopen_libs=
2235ff559fabSmrg    lt_cv_dlopen_self=yes
2236ff559fabSmrg    ;;
2237ff559fabSmrg
2238ff559fabSmrg  mingw* | pw32*)
2239ff559fabSmrg    lt_cv_dlopen="LoadLibrary"
2240ff559fabSmrg    lt_cv_dlopen_libs=
2241ff559fabSmrg   ;;
2242ff559fabSmrg
2243ff559fabSmrg  cygwin*)
2244ff559fabSmrg    lt_cv_dlopen="dlopen"
2245ff559fabSmrg    lt_cv_dlopen_libs=
2246ff559fabSmrg   ;;
2247ff559fabSmrg
2248ff559fabSmrg  darwin*)
2249ff559fabSmrg  # if libdl is installed we need to link against it
2250ff559fabSmrg    AC_CHECK_LIB([dl], [dlopen],
2251ff559fabSmrg		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
2252ff559fabSmrg    lt_cv_dlopen="dyld"
2253ff559fabSmrg    lt_cv_dlopen_libs=
2254ff559fabSmrg    lt_cv_dlopen_self=yes
2255ff559fabSmrg    ])
2256ff559fabSmrg   ;;
2257ff559fabSmrg
2258ff559fabSmrg  *)
2259ff559fabSmrg    AC_CHECK_FUNC([shl_load],
2260ff559fabSmrg	  [lt_cv_dlopen="shl_load"],
2261ff559fabSmrg      [AC_CHECK_LIB([dld], [shl_load],
2262ff559fabSmrg	    [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
2263ff559fabSmrg	[AC_CHECK_FUNC([dlopen],
2264ff559fabSmrg	      [lt_cv_dlopen="dlopen"],
2265ff559fabSmrg	  [AC_CHECK_LIB([dl], [dlopen],
2266ff559fabSmrg		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
2267ff559fabSmrg	    [AC_CHECK_LIB([svld], [dlopen],
2268ff559fabSmrg		  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
2269ff559fabSmrg	      [AC_CHECK_LIB([dld], [dld_link],
2270ff559fabSmrg		    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
2271ff559fabSmrg	      ])
2272ff559fabSmrg	    ])
2273ff559fabSmrg	  ])
2274ff559fabSmrg	])
2275ff559fabSmrg      ])
2276ff559fabSmrg    ;;
2277ff559fabSmrg  esac
2278ff559fabSmrg
2279ff559fabSmrg  if test "x$lt_cv_dlopen" != xno; then
2280ff559fabSmrg    enable_dlopen=yes
2281ff559fabSmrg  else
2282ff559fabSmrg    enable_dlopen=no
2283ff559fabSmrg  fi
2284ff559fabSmrg
2285ff559fabSmrg  case $lt_cv_dlopen in
2286ff559fabSmrg  dlopen)
2287ff559fabSmrg    save_CPPFLAGS="$CPPFLAGS"
2288ff559fabSmrg    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
2289ff559fabSmrg
2290ff559fabSmrg    save_LDFLAGS="$LDFLAGS"
2291ff559fabSmrg    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
2292ff559fabSmrg
2293ff559fabSmrg    save_LIBS="$LIBS"
2294ff559fabSmrg    LIBS="$lt_cv_dlopen_libs $LIBS"
2295ff559fabSmrg
2296ff559fabSmrg    AC_CACHE_CHECK([whether a program can dlopen itself],
2297ff559fabSmrg	  lt_cv_dlopen_self, [dnl
2298ff559fabSmrg	  _LT_AC_TRY_DLOPEN_SELF(
2299ff559fabSmrg	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
2300ff559fabSmrg	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
2301ff559fabSmrg    ])
2302ff559fabSmrg
2303ff559fabSmrg    if test "x$lt_cv_dlopen_self" = xyes; then
2304ff559fabSmrg      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
2305ff559fabSmrg      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
2306ff559fabSmrg    	  lt_cv_dlopen_self_static, [dnl
2307ff559fabSmrg	  _LT_AC_TRY_DLOPEN_SELF(
2308ff559fabSmrg	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
2309ff559fabSmrg	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
2310ff559fabSmrg      ])
2311ff559fabSmrg    fi
2312ff559fabSmrg
2313ff559fabSmrg    CPPFLAGS="$save_CPPFLAGS"
2314ff559fabSmrg    LDFLAGS="$save_LDFLAGS"
2315ff559fabSmrg    LIBS="$save_LIBS"
2316ff559fabSmrg    ;;
2317ff559fabSmrg  esac
2318ff559fabSmrg
2319ff559fabSmrg  case $lt_cv_dlopen_self in
2320ff559fabSmrg  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
2321ff559fabSmrg  *) enable_dlopen_self=unknown ;;
2322ff559fabSmrg  esac
2323ff559fabSmrg
2324ff559fabSmrg  case $lt_cv_dlopen_self_static in
2325ff559fabSmrg  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
2326ff559fabSmrg  *) enable_dlopen_self_static=unknown ;;
2327ff559fabSmrg  esac
2328ff559fabSmrgfi
2329ff559fabSmrg])# AC_LIBTOOL_DLOPEN_SELF
2330ff559fabSmrg
2331ff559fabSmrg
2332ff559fabSmrg# AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
2333ff559fabSmrg# ---------------------------------
2334ff559fabSmrg# Check to see if options -c and -o are simultaneously supported by compiler
2335ff559fabSmrgAC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
2336ff559fabSmrg[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
2337ff559fabSmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
2338ff559fabSmrg  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
2339ff559fabSmrg  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
2340ff559fabSmrg   $rm -r conftest 2>/dev/null
2341ff559fabSmrg   mkdir conftest
2342ff559fabSmrg   cd conftest
2343ff559fabSmrg   mkdir out
2344ff559fabSmrg   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
2345ff559fabSmrg
2346ff559fabSmrg   lt_compiler_flag="-o out/conftest2.$ac_objext"
2347ff559fabSmrg   # Insert the option either (1) after the last *FLAGS variable, or
2348ff559fabSmrg   # (2) before a word containing "conftest.", or (3) at the end.
2349ff559fabSmrg   # Note that $ac_compile itself does not contain backslashes and begins
2350ff559fabSmrg   # with a dollar sign (not a hyphen), so the echo should work correctly.
2351ff559fabSmrg   lt_compile=`echo "$ac_compile" | $SED \
2352ff559fabSmrg   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
2353ff559fabSmrg   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
2354ff559fabSmrg   -e 's:$: $lt_compiler_flag:'`
2355ff559fabSmrg   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
2356ff559fabSmrg   (eval "$lt_compile" 2>out/conftest.err)
2357ff559fabSmrg   ac_status=$?
2358ff559fabSmrg   cat out/conftest.err >&AS_MESSAGE_LOG_FD
2359ff559fabSmrg   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
2360ff559fabSmrg   if (exit $ac_status) && test -s out/conftest2.$ac_objext
2361ff559fabSmrg   then
2362ff559fabSmrg     # The compiler can only warn and ignore the option if not recognized
2363ff559fabSmrg     # So say no if there are warnings
2364ff559fabSmrg     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
2365ff559fabSmrg     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
2366ff559fabSmrg     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
2367ff559fabSmrg       _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
2368ff559fabSmrg     fi
2369ff559fabSmrg   fi
2370ff559fabSmrg   chmod u+w . 2>&AS_MESSAGE_LOG_FD
2371ff559fabSmrg   $rm conftest*
2372ff559fabSmrg   # SGI C++ compiler will create directory out/ii_files/ for
2373ff559fabSmrg   # template instantiation
2374ff559fabSmrg   test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
2375ff559fabSmrg   $rm out/* && rmdir out
2376ff559fabSmrg   cd ..
2377ff559fabSmrg   rmdir conftest
2378ff559fabSmrg   $rm conftest*
2379ff559fabSmrg])
2380ff559fabSmrg])# AC_LIBTOOL_PROG_CC_C_O
2381ff559fabSmrg
2382ff559fabSmrg
2383ff559fabSmrg# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
2384ff559fabSmrg# -----------------------------------------
2385ff559fabSmrg# Check to see if we can do hard links to lock some files if needed
2386ff559fabSmrgAC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
2387ff559fabSmrg[AC_REQUIRE([_LT_AC_LOCK])dnl
2388ff559fabSmrg
2389ff559fabSmrghard_links="nottested"
2390ff559fabSmrgif test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
2391ff559fabSmrg  # do not overwrite the value of need_locks provided by the user
2392ff559fabSmrg  AC_MSG_CHECKING([if we can lock with hard links])
2393ff559fabSmrg  hard_links=yes
2394ff559fabSmrg  $rm conftest*
2395ff559fabSmrg  ln conftest.a conftest.b 2>/dev/null && hard_links=no
2396ff559fabSmrg  touch conftest.a
2397ff559fabSmrg  ln conftest.a conftest.b 2>&5 || hard_links=no
2398ff559fabSmrg  ln conftest.a conftest.b 2>/dev/null && hard_links=no
2399ff559fabSmrg  AC_MSG_RESULT([$hard_links])
2400ff559fabSmrg  if test "$hard_links" = no; then
2401ff559fabSmrg    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
2402ff559fabSmrg    need_locks=warn
2403ff559fabSmrg  fi
2404ff559fabSmrgelse
2405ff559fabSmrg  need_locks=no
2406ff559fabSmrgfi
2407ff559fabSmrg])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
2408ff559fabSmrg
2409ff559fabSmrg
2410ff559fabSmrg# AC_LIBTOOL_OBJDIR
2411ff559fabSmrg# -----------------
2412ff559fabSmrgAC_DEFUN([AC_LIBTOOL_OBJDIR],
2413ff559fabSmrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
2414ff559fabSmrg[rm -f .libs 2>/dev/null
2415ff559fabSmrgmkdir .libs 2>/dev/null
2416ff559fabSmrgif test -d .libs; then
2417ff559fabSmrg  lt_cv_objdir=.libs
2418ff559fabSmrgelse
2419ff559fabSmrg  # MS-DOS does not allow filenames that begin with a dot.
2420ff559fabSmrg  lt_cv_objdir=_libs
2421ff559fabSmrgfi
2422ff559fabSmrgrmdir .libs 2>/dev/null])
2423ff559fabSmrgobjdir=$lt_cv_objdir
2424ff559fabSmrg])# AC_LIBTOOL_OBJDIR
2425ff559fabSmrg
2426ff559fabSmrg
2427ff559fabSmrg# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
2428ff559fabSmrg# ----------------------------------------------
2429ff559fabSmrg# Check hardcoding attributes.
2430ff559fabSmrgAC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
2431ff559fabSmrg[AC_MSG_CHECKING([how to hardcode library paths into programs])
2432ff559fabSmrg_LT_AC_TAGVAR(hardcode_action, $1)=
2433ff559fabSmrgif test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
2434ff559fabSmrg   test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \
2435ff559fabSmrg   test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
2436ff559fabSmrg
2437ff559fabSmrg  # We can hardcode non-existant directories.
2438ff559fabSmrg  if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
2439ff559fabSmrg     # If the only mechanism to avoid hardcoding is shlibpath_var, we
2440ff559fabSmrg     # have to relink, otherwise we might link with an installed library
2441ff559fabSmrg     # when we should be linking with a yet-to-be-installed one
2442ff559fabSmrg     ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
2443ff559fabSmrg     test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
2444ff559fabSmrg    # Linking always hardcodes the temporary library directory.
2445ff559fabSmrg    _LT_AC_TAGVAR(hardcode_action, $1)=relink
2446ff559fabSmrg  else
2447ff559fabSmrg    # We can link without hardcoding, and we can hardcode nonexisting dirs.
2448ff559fabSmrg    _LT_AC_TAGVAR(hardcode_action, $1)=immediate
2449ff559fabSmrg  fi
2450ff559fabSmrgelse
2451ff559fabSmrg  # We cannot hardcode anything, or else we can only hardcode existing
2452ff559fabSmrg  # directories.
2453ff559fabSmrg  _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
2454ff559fabSmrgfi
2455ff559fabSmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
2456ff559fabSmrg
2457ff559fabSmrgif test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
2458ff559fabSmrg  # Fast installation is not supported
2459ff559fabSmrg  enable_fast_install=no
2460ff559fabSmrgelif test "$shlibpath_overrides_runpath" = yes ||
2461ff559fabSmrg     test "$enable_shared" = no; then
2462ff559fabSmrg  # Fast installation is not necessary
2463ff559fabSmrg  enable_fast_install=needless
2464ff559fabSmrgfi
2465ff559fabSmrg])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
2466ff559fabSmrg
2467ff559fabSmrg
2468ff559fabSmrg# AC_LIBTOOL_SYS_LIB_STRIP
2469ff559fabSmrg# ------------------------
2470ff559fabSmrgAC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
2471ff559fabSmrg[striplib=
2472ff559fabSmrgold_striplib=
2473ff559fabSmrgAC_MSG_CHECKING([whether stripping libraries is possible])
2474ff559fabSmrgif test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
2475ff559fabSmrg  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
2476ff559fabSmrg  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
2477ff559fabSmrg  AC_MSG_RESULT([yes])
2478ff559fabSmrgelse
2479ff559fabSmrg# FIXME - insert some real tests, host_os isn't really good enough
2480ff559fabSmrg  case $host_os in
2481ff559fabSmrg   darwin*)
2482ff559fabSmrg       if test -n "$STRIP" ; then
2483ff559fabSmrg         striplib="$STRIP -x"
2484ff559fabSmrg         AC_MSG_RESULT([yes])
2485ff559fabSmrg       else
2486ff559fabSmrg  AC_MSG_RESULT([no])
2487ff559fabSmrgfi
2488ff559fabSmrg       ;;
2489ff559fabSmrg   *)
2490ff559fabSmrg  AC_MSG_RESULT([no])
2491ff559fabSmrg    ;;
2492ff559fabSmrg  esac
2493ff559fabSmrgfi
2494ff559fabSmrg])# AC_LIBTOOL_SYS_LIB_STRIP
2495ff559fabSmrg
2496ff559fabSmrg
2497ff559fabSmrg# AC_LIBTOOL_SYS_DYNAMIC_LINKER
2498ff559fabSmrg# -----------------------------
2499ff559fabSmrg# PORTME Fill in your ld.so characteristics
2500ff559fabSmrgAC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
2501ff559fabSmrg[AC_MSG_CHECKING([dynamic linker characteristics])
2502ff559fabSmrglibrary_names_spec=
2503ff559fabSmrglibname_spec='lib$name'
2504ff559fabSmrgsoname_spec=
2505ff559fabSmrgshrext_cmds=".so"
2506ff559fabSmrgpostinstall_cmds=
2507ff559fabSmrgpostuninstall_cmds=
2508ff559fabSmrgfinish_cmds=
2509ff559fabSmrgfinish_eval=
2510ff559fabSmrgshlibpath_var=
2511ff559fabSmrgshlibpath_overrides_runpath=unknown
2512ff559fabSmrgversion_type=none
2513ff559fabSmrgdynamic_linker="$host_os ld.so"
2514ff559fabSmrgsys_lib_dlsearch_path_spec="/lib /usr/lib"
2515ff559fabSmrgif test "$GCC" = yes; then
2516ff559fabSmrg  sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
2517ff559fabSmrg  if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
2518ff559fabSmrg    # if the path contains ";" then we assume it to be the separator
2519ff559fabSmrg    # otherwise default to the standard path separator (i.e. ":") - it is
2520ff559fabSmrg    # assumed that no part of a normal pathname contains ";" but that should
2521ff559fabSmrg    # okay in the real world where ";" in dirpaths is itself problematic.
2522ff559fabSmrg    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
2523ff559fabSmrg  else
2524ff559fabSmrg    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
2525ff559fabSmrg  fi
2526ff559fabSmrgelse
2527ff559fabSmrg  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2528ff559fabSmrgfi
2529ff559fabSmrgneed_lib_prefix=unknown
2530ff559fabSmrghardcode_into_libs=no
2531ff559fabSmrg
2532ff559fabSmrg# when you set need_version to no, make sure it does not cause -set_version
2533ff559fabSmrg# flags to be left without arguments
2534ff559fabSmrgneed_version=unknown
2535ff559fabSmrg
2536ff559fabSmrgcase $host_os in
2537ff559fabSmrgaix3*)
2538ff559fabSmrg  version_type=linux
2539ff559fabSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
2540ff559fabSmrg  shlibpath_var=LIBPATH
2541ff559fabSmrg
2542ff559fabSmrg  # AIX 3 has no versioning support, so we append a major version to the name.
2543ff559fabSmrg  soname_spec='${libname}${release}${shared_ext}$major'
2544ff559fabSmrg  ;;
2545ff559fabSmrg
2546ff559fabSmrgaix4* | aix5*)
2547ff559fabSmrg  version_type=linux
2548ff559fabSmrg  need_lib_prefix=no
2549ff559fabSmrg  need_version=no
2550ff559fabSmrg  hardcode_into_libs=yes
2551ff559fabSmrg  if test "$host_cpu" = ia64; then
2552ff559fabSmrg    # AIX 5 supports IA64
2553ff559fabSmrg    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
2554ff559fabSmrg    shlibpath_var=LD_LIBRARY_PATH
2555ff559fabSmrg  else
2556ff559fabSmrg    # With GCC up to 2.95.x, collect2 would create an import file
2557ff559fabSmrg    # for dependence libraries.  The import file would start with
2558ff559fabSmrg    # the line `#! .'.  This would cause the generated library to
2559ff559fabSmrg    # depend on `.', always an invalid library.  This was fixed in
2560ff559fabSmrg    # development snapshots of GCC prior to 3.0.
2561ff559fabSmrg    case $host_os in
2562ff559fabSmrg      aix4 | aix4.[[01]] | aix4.[[01]].*)
2563ff559fabSmrg      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
2564ff559fabSmrg	   echo ' yes '
2565ff559fabSmrg	   echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
2566ff559fabSmrg	:
2567ff559fabSmrg      else
2568ff559fabSmrg	can_build_shared=no
2569ff559fabSmrg      fi
2570ff559fabSmrg      ;;
2571ff559fabSmrg    esac
2572ff559fabSmrg    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
2573ff559fabSmrg    # soname into executable. Probably we can add versioning support to
2574ff559fabSmrg    # collect2, so additional links can be useful in future.
2575ff559fabSmrg    if test "$aix_use_runtimelinking" = yes; then
2576ff559fabSmrg      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
2577ff559fabSmrg      # instead of lib<name>.a to let people know that these are not
2578ff559fabSmrg      # typical AIX shared libraries.
2579ff559fabSmrg      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2580ff559fabSmrg    else
2581ff559fabSmrg      # We preserve .a as extension for shared libraries through AIX4.2
2582ff559fabSmrg      # and later when we are not doing run time linking.
2583ff559fabSmrg      library_names_spec='${libname}${release}.a $libname.a'
2584ff559fabSmrg      soname_spec='${libname}${release}${shared_ext}$major'
2585ff559fabSmrg    fi
2586ff559fabSmrg    shlibpath_var=LIBPATH
2587ff559fabSmrg  fi
2588ff559fabSmrg  ;;
2589ff559fabSmrg
2590ff559fabSmrgamigaos*)
2591ff559fabSmrg  library_names_spec='$libname.ixlibrary $libname.a'
2592ff559fabSmrg  # Create ${libname}_ixlibrary.a entries in /sys/libs.
2593ff559fabSmrg  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'
2594ff559fabSmrg  ;;
2595ff559fabSmrg
2596ff559fabSmrgbeos*)
2597ff559fabSmrg  library_names_spec='${libname}${shared_ext}'
2598ff559fabSmrg  dynamic_linker="$host_os ld.so"
2599ff559fabSmrg  shlibpath_var=LIBRARY_PATH
2600ff559fabSmrg  ;;
2601ff559fabSmrg
2602ff559fabSmrgbsdi[[45]]*)
2603ff559fabSmrg  version_type=linux
2604ff559fabSmrg  need_version=no
2605ff559fabSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2606ff559fabSmrg  soname_spec='${libname}${release}${shared_ext}$major'
2607ff559fabSmrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
2608ff559fabSmrg  shlibpath_var=LD_LIBRARY_PATH
2609ff559fabSmrg  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
2610ff559fabSmrg  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
2611ff559fabSmrg  # the default ld.so.conf also contains /usr/contrib/lib and
2612ff559fabSmrg  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
2613ff559fabSmrg  # libtool to hard-code these into programs
2614ff559fabSmrg  ;;
2615ff559fabSmrg
2616ff559fabSmrgcygwin* | mingw* | pw32*)
2617ff559fabSmrg  version_type=windows
2618ff559fabSmrg  shrext_cmds=".dll"
2619ff559fabSmrg  need_version=no
2620ff559fabSmrg  need_lib_prefix=no
2621ff559fabSmrg
2622ff559fabSmrg  case $GCC,$host_os in
2623ff559fabSmrg  yes,cygwin* | yes,mingw* | yes,pw32*)
2624ff559fabSmrg    library_names_spec='$libname.dll.a'
2625ff559fabSmrg    # DLL is installed to $(libdir)/../bin by postinstall_cmds
2626ff559fabSmrg    postinstall_cmds='base_file=`basename \${file}`~
2627ff559fabSmrg      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
2628ff559fabSmrg      dldir=$destdir/`dirname \$dlpath`~
2629ff559fabSmrg      test -d \$dldir || mkdir -p \$dldir~
2630ff559fabSmrg      $install_prog $dir/$dlname \$dldir/$dlname~
2631ff559fabSmrg      chmod a+x \$dldir/$dlname'
2632ff559fabSmrg    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
2633ff559fabSmrg      dlpath=$dir/\$dldll~
2634ff559fabSmrg       $rm \$dlpath'
2635ff559fabSmrg    shlibpath_overrides_runpath=yes
2636ff559fabSmrg
2637ff559fabSmrg    case $host_os in
2638ff559fabSmrg    cygwin*)
2639ff559fabSmrg      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
2640ff559fabSmrg      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2641ff559fabSmrg      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
2642ff559fabSmrg      ;;
2643ff559fabSmrg    mingw*)
2644ff559fabSmrg      # MinGW DLLs use traditional 'lib' prefix
2645ff559fabSmrg      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2646ff559fabSmrg      sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
2647ff559fabSmrg      if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
2648ff559fabSmrg        # It is most probably a Windows format PATH printed by
2649ff559fabSmrg        # mingw gcc, but we are running on Cygwin. Gcc prints its search
2650ff559fabSmrg        # path with ; separators, and with drive letters. We can handle the
2651ff559fabSmrg        # drive letters (cygwin fileutils understands them), so leave them,
2652ff559fabSmrg        # especially as we might pass files found there to a mingw objdump,
2653ff559fabSmrg        # which wouldn't understand a cygwinified path. Ahh.
2654ff559fabSmrg        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
2655ff559fabSmrg      else
2656ff559fabSmrg        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
2657ff559fabSmrg      fi
2658ff559fabSmrg      ;;
2659ff559fabSmrg    pw32*)
2660ff559fabSmrg      # pw32 DLLs use 'pw' prefix rather than 'lib'
2661ff559fabSmrg      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2662ff559fabSmrg      ;;
2663ff559fabSmrg    esac
2664ff559fabSmrg    ;;
2665ff559fabSmrg
2666ff559fabSmrg  *)
2667ff559fabSmrg    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
2668ff559fabSmrg    ;;
2669ff559fabSmrg  esac
2670ff559fabSmrg  dynamic_linker='Win32 ld.exe'
2671ff559fabSmrg  # FIXME: first we should search . and the directory the executable is in
2672ff559fabSmrg  shlibpath_var=PATH
2673ff559fabSmrg  ;;
2674ff559fabSmrg
2675ff559fabSmrgdarwin* | rhapsody*)
2676ff559fabSmrg  dynamic_linker="$host_os dyld"
2677ff559fabSmrg  version_type=darwin
2678ff559fabSmrg  need_lib_prefix=no
2679ff559fabSmrg  need_version=no
2680ff559fabSmrg  library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
2681ff559fabSmrg  soname_spec='${libname}${release}${major}$shared_ext'
2682ff559fabSmrg  shlibpath_overrides_runpath=yes
2683ff559fabSmrg  shlibpath_var=DYLD_LIBRARY_PATH
2684ff559fabSmrg  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
2685ff559fabSmrg  # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
2686ff559fabSmrg  if test "$GCC" = yes; then
2687ff559fabSmrg    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"`
2688ff559fabSmrg  else
2689ff559fabSmrg    sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
2690ff559fabSmrg  fi
2691ff559fabSmrg  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
2692ff559fabSmrg  ;;
2693ff559fabSmrg
2694ff559fabSmrgdgux*)
2695ff559fabSmrg  version_type=linux
2696ff559fabSmrg  need_lib_prefix=no
2697ff559fabSmrg  need_version=no
2698ff559fabSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
2699ff559fabSmrg  soname_spec='${libname}${release}${shared_ext}$major'
2700ff559fabSmrg  shlibpath_var=LD_LIBRARY_PATH
2701ff559fabSmrg  ;;
2702ff559fabSmrg
2703ff559fabSmrgfreebsd1*)
2704ff559fabSmrg  dynamic_linker=no
2705ff559fabSmrg  ;;
2706ff559fabSmrg
2707ff559fabSmrgkfreebsd*-gnu)
2708ff559fabSmrg  version_type=linux
2709ff559fabSmrg  need_lib_prefix=no
2710ff559fabSmrg  need_version=no
2711ff559fabSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2712ff559fabSmrg  soname_spec='${libname}${release}${shared_ext}$major'
2713ff559fabSmrg  shlibpath_var=LD_LIBRARY_PATH
2714ff559fabSmrg  shlibpath_overrides_runpath=no
2715ff559fabSmrg  hardcode_into_libs=yes
2716ff559fabSmrg  dynamic_linker='GNU ld.so'
2717ff559fabSmrg  ;;
2718ff559fabSmrg
2719ff559fabSmrgfreebsd* | dragonfly*)
2720ff559fabSmrg  # DragonFly does not have aout.  When/if they implement a new
2721ff559fabSmrg  # versioning mechanism, adjust this.
2722ff559fabSmrg  if test -x /usr/bin/objformat; then
2723ff559fabSmrg    objformat=`/usr/bin/objformat`
2724ff559fabSmrg  else
2725ff559fabSmrg    case $host_os in
2726ff559fabSmrg    freebsd[[123]]*) objformat=aout ;;
2727ff559fabSmrg    *) objformat=elf ;;
2728ff559fabSmrg    esac
2729ff559fabSmrg  fi
2730ff559fabSmrg  version_type=freebsd-$objformat
2731ff559fabSmrg  case $version_type in
2732ff559fabSmrg    freebsd-elf*)
2733ff559fabSmrg      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
2734ff559fabSmrg      need_version=no
2735ff559fabSmrg      need_lib_prefix=no
2736ff559fabSmrg      ;;
2737ff559fabSmrg    freebsd-*)
2738ff559fabSmrg      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
2739ff559fabSmrg      need_version=yes
2740ff559fabSmrg      ;;
2741ff559fabSmrg  esac
2742ff559fabSmrg  shlibpath_var=LD_LIBRARY_PATH
2743ff559fabSmrg  case $host_os in
2744ff559fabSmrg  freebsd2*)
2745ff559fabSmrg    shlibpath_overrides_runpath=yes
2746ff559fabSmrg    ;;
2747ff559fabSmrg  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
2748ff559fabSmrg    shlibpath_overrides_runpath=yes
2749ff559fabSmrg    hardcode_into_libs=yes
2750ff559fabSmrg    ;;
2751ff559fabSmrg  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
2752ff559fabSmrg  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
2753ff559fabSmrg    shlibpath_overrides_runpath=no
2754ff559fabSmrg    hardcode_into_libs=yes
2755ff559fabSmrg    ;;
2756ff559fabSmrg  freebsd*) # from 4.6 on
2757ff559fabSmrg    shlibpath_overrides_runpath=yes
2758ff559fabSmrg    hardcode_into_libs=yes
2759ff559fabSmrg    ;;
2760ff559fabSmrg  esac
2761ff559fabSmrg  ;;
2762ff559fabSmrg
2763ff559fabSmrggnu*)
2764ff559fabSmrg  version_type=linux
2765ff559fabSmrg  need_lib_prefix=no
2766ff559fabSmrg  need_version=no
2767ff559fabSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
2768ff559fabSmrg  soname_spec='${libname}${release}${shared_ext}$major'
2769ff559fabSmrg  shlibpath_var=LD_LIBRARY_PATH
2770ff559fabSmrg  hardcode_into_libs=yes
2771ff559fabSmrg  ;;
2772ff559fabSmrg
2773ff559fabSmrghpux9* | hpux10* | hpux11*)
2774ff559fabSmrg  # Give a soname corresponding to the major version so that dld.sl refuses to
2775ff559fabSmrg  # link against other versions.
2776ff559fabSmrg  version_type=sunos
2777ff559fabSmrg  need_lib_prefix=no
2778ff559fabSmrg  need_version=no
2779ff559fabSmrg  case $host_cpu in
2780ff559fabSmrg  ia64*)
2781ff559fabSmrg    shrext_cmds='.so'
2782ff559fabSmrg    hardcode_into_libs=yes
2783ff559fabSmrg    dynamic_linker="$host_os dld.so"
2784ff559fabSmrg    shlibpath_var=LD_LIBRARY_PATH
2785ff559fabSmrg    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2786ff559fabSmrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2787ff559fabSmrg    soname_spec='${libname}${release}${shared_ext}$major'
2788ff559fabSmrg    if test "X$HPUX_IA64_MODE" = X32; then
2789ff559fabSmrg      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
2790ff559fabSmrg    else
2791ff559fabSmrg      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
2792ff559fabSmrg    fi
2793ff559fabSmrg    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2794ff559fabSmrg    ;;
2795ff559fabSmrg   hppa*64*)
2796ff559fabSmrg     shrext_cmds='.sl'
2797ff559fabSmrg     hardcode_into_libs=yes
2798ff559fabSmrg     dynamic_linker="$host_os dld.sl"
2799ff559fabSmrg     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
2800ff559fabSmrg     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2801ff559fabSmrg     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2802ff559fabSmrg     soname_spec='${libname}${release}${shared_ext}$major'
2803ff559fabSmrg     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
2804ff559fabSmrg     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2805ff559fabSmrg     ;;
2806ff559fabSmrg   *)
2807ff559fabSmrg    shrext_cmds='.sl'
2808ff559fabSmrg    dynamic_linker="$host_os dld.sl"
2809ff559fabSmrg    shlibpath_var=SHLIB_PATH
2810ff559fabSmrg    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
2811ff559fabSmrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2812ff559fabSmrg    soname_spec='${libname}${release}${shared_ext}$major'
2813ff559fabSmrg    ;;
2814ff559fabSmrg  esac
2815ff559fabSmrg  # HP-UX runs *really* slowly unless shared libraries are mode 555.
2816ff559fabSmrg  postinstall_cmds='chmod 555 $lib'
2817ff559fabSmrg  ;;
2818ff559fabSmrg
2819ff559fabSmrginterix3*)
2820ff559fabSmrg  version_type=linux
2821ff559fabSmrg  need_lib_prefix=no
2822ff559fabSmrg  need_version=no
2823ff559fabSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2824ff559fabSmrg  soname_spec='${libname}${release}${shared_ext}$major'
2825ff559fabSmrg  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
2826ff559fabSmrg  shlibpath_var=LD_LIBRARY_PATH
2827ff559fabSmrg  shlibpath_overrides_runpath=no
2828ff559fabSmrg  hardcode_into_libs=yes
2829ff559fabSmrg  ;;
2830ff559fabSmrg
2831ff559fabSmrgirix5* | irix6* | nonstopux*)
2832ff559fabSmrg  case $host_os in
2833ff559fabSmrg    nonstopux*) version_type=nonstopux ;;
2834ff559fabSmrg    *)
2835ff559fabSmrg	if test "$lt_cv_prog_gnu_ld" = yes; then
2836ff559fabSmrg		version_type=linux
2837ff559fabSmrg	else
2838ff559fabSmrg		version_type=irix
2839ff559fabSmrg	fi ;;
2840ff559fabSmrg  esac
2841ff559fabSmrg  need_lib_prefix=no
2842ff559fabSmrg  need_version=no
2843ff559fabSmrg  soname_spec='${libname}${release}${shared_ext}$major'
2844ff559fabSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
2845ff559fabSmrg  case $host_os in
2846ff559fabSmrg  irix5* | nonstopux*)
2847ff559fabSmrg    libsuff= shlibsuff=
2848ff559fabSmrg    ;;
2849ff559fabSmrg  *)
2850ff559fabSmrg    case $LD in # libtool.m4 will add one of these switches to LD
2851ff559fabSmrg    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
2852ff559fabSmrg      libsuff= shlibsuff= libmagic=32-bit;;
2853ff559fabSmrg    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
2854ff559fabSmrg      libsuff=32 shlibsuff=N32 libmagic=N32;;
2855ff559fabSmrg    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
2856ff559fabSmrg      libsuff=64 shlibsuff=64 libmagic=64-bit;;
2857ff559fabSmrg    *) libsuff= shlibsuff= libmagic=never-match;;
2858ff559fabSmrg    esac
2859ff559fabSmrg    ;;
2860ff559fabSmrg  esac
2861ff559fabSmrg  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
2862ff559fabSmrg  shlibpath_overrides_runpath=no
2863ff559fabSmrg  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
2864ff559fabSmrg  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
2865ff559fabSmrg  hardcode_into_libs=yes
2866ff559fabSmrg  ;;
2867ff559fabSmrg
2868ff559fabSmrg# No shared lib support for Linux oldld, aout, or coff.
2869ff559fabSmrglinux*oldld* | linux*aout* | linux*coff*)
2870ff559fabSmrg  dynamic_linker=no
2871ff559fabSmrg  ;;
2872ff559fabSmrg
2873ff559fabSmrg# This must be Linux ELF.
2874ff559fabSmrglinux*)
2875ff559fabSmrg  version_type=linux
2876ff559fabSmrg  need_lib_prefix=no
2877ff559fabSmrg  need_version=no
2878ff559fabSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2879ff559fabSmrg  soname_spec='${libname}${release}${shared_ext}$major'
2880ff559fabSmrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
2881ff559fabSmrg  shlibpath_var=LD_LIBRARY_PATH
2882ff559fabSmrg  shlibpath_overrides_runpath=no
2883ff559fabSmrg  # This implies no fast_install, which is unacceptable.
2884ff559fabSmrg  # Some rework will be needed to allow for fast_install
2885ff559fabSmrg  # before this can be enabled.
2886ff559fabSmrg  hardcode_into_libs=yes
2887ff559fabSmrg
2888ff559fabSmrg  # Append ld.so.conf contents to the search path
2889ff559fabSmrg  if test -f /etc/ld.so.conf; then
2890ff559fabSmrg    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' ' '`
2891ff559fabSmrg    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
2892ff559fabSmrg  fi
2893ff559fabSmrg
2894ff559fabSmrg  # We used to test for /lib/ld.so.1 and disable shared libraries on
2895ff559fabSmrg  # powerpc, because MkLinux only supported shared libraries with the
2896ff559fabSmrg  # GNU dynamic linker.  Since this was broken with cross compilers,
2897ff559fabSmrg  # most powerpc-linux boxes support dynamic linking these days and
2898ff559fabSmrg  # people can always --disable-shared, the test was removed, and we
2899ff559fabSmrg  # assume the GNU/Linux dynamic linker is in use.
2900ff559fabSmrg  dynamic_linker='GNU/Linux ld.so'
2901ff559fabSmrg  ;;
2902ff559fabSmrg
2903ff559fabSmrgknetbsd*-gnu)
2904ff559fabSmrg  version_type=linux
2905ff559fabSmrg  need_lib_prefix=no
2906ff559fabSmrg  need_version=no
2907ff559fabSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2908ff559fabSmrg  soname_spec='${libname}${release}${shared_ext}$major'
2909ff559fabSmrg  shlibpath_var=LD_LIBRARY_PATH
2910ff559fabSmrg  shlibpath_overrides_runpath=no
2911ff559fabSmrg  hardcode_into_libs=yes
2912ff559fabSmrg  dynamic_linker='GNU ld.so'
2913ff559fabSmrg  ;;
2914ff559fabSmrg
2915ff559fabSmrgnetbsd*)
2916ff559fabSmrg  version_type=sunos
2917ff559fabSmrg  need_lib_prefix=no
2918ff559fabSmrg  need_version=no
2919ff559fabSmrg  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
2920ff559fabSmrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2921ff559fabSmrg    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2922ff559fabSmrg    dynamic_linker='NetBSD (a.out) ld.so'
2923ff559fabSmrg  else
2924ff559fabSmrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2925ff559fabSmrg    soname_spec='${libname}${release}${shared_ext}$major'
2926ff559fabSmrg    dynamic_linker='NetBSD ld.elf_so'
2927ff559fabSmrg  fi
2928ff559fabSmrg  shlibpath_var=LD_LIBRARY_PATH
2929ff559fabSmrg  shlibpath_overrides_runpath=yes
2930ff559fabSmrg  hardcode_into_libs=yes
2931ff559fabSmrg  ;;
2932ff559fabSmrg
2933ff559fabSmrgnewsos6)
2934ff559fabSmrg  version_type=linux
2935ff559fabSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2936ff559fabSmrg  shlibpath_var=LD_LIBRARY_PATH
2937ff559fabSmrg  shlibpath_overrides_runpath=yes
2938ff559fabSmrg  ;;
2939ff559fabSmrg
2940ff559fabSmrgnto-qnx*)
2941ff559fabSmrg  version_type=linux
2942ff559fabSmrg  need_lib_prefix=no
2943ff559fabSmrg  need_version=no
2944ff559fabSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2945ff559fabSmrg  soname_spec='${libname}${release}${shared_ext}$major'
2946ff559fabSmrg  shlibpath_var=LD_LIBRARY_PATH
2947ff559fabSmrg  shlibpath_overrides_runpath=yes
2948ff559fabSmrg  ;;
2949ff559fabSmrg
2950ff559fabSmrgopenbsd*)
2951ff559fabSmrg  version_type=sunos
2952ff559fabSmrg  sys_lib_dlsearch_path_spec="/usr/lib"
2953ff559fabSmrg  need_lib_prefix=no
2954ff559fabSmrg  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
2955ff559fabSmrg  case $host_os in
2956ff559fabSmrg    openbsd3.3 | openbsd3.3.*) need_version=yes ;;
2957ff559fabSmrg    *)                         need_version=no  ;;
2958ff559fabSmrg  esac
2959ff559fabSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2960ff559fabSmrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2961ff559fabSmrg  shlibpath_var=LD_LIBRARY_PATH
2962ff559fabSmrg  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2963ff559fabSmrg    case $host_os in
2964ff559fabSmrg      openbsd2.[[89]] | openbsd2.[[89]].*)
2965ff559fabSmrg	shlibpath_overrides_runpath=no
2966ff559fabSmrg	;;
2967ff559fabSmrg      *)
2968ff559fabSmrg	shlibpath_overrides_runpath=yes
2969ff559fabSmrg	;;
2970ff559fabSmrg      esac
2971ff559fabSmrg  else
2972ff559fabSmrg    shlibpath_overrides_runpath=yes
2973ff559fabSmrg  fi
2974ff559fabSmrg  ;;
2975ff559fabSmrg
2976ff559fabSmrgos2*)
2977ff559fabSmrg  libname_spec='$name'
2978ff559fabSmrg  shrext_cmds=".dll"
2979ff559fabSmrg  need_lib_prefix=no
2980ff559fabSmrg  library_names_spec='$libname${shared_ext} $libname.a'
2981ff559fabSmrg  dynamic_linker='OS/2 ld.exe'
2982ff559fabSmrg  shlibpath_var=LIBPATH
2983ff559fabSmrg  ;;
2984ff559fabSmrg
2985ff559fabSmrgosf3* | osf4* | osf5*)
2986ff559fabSmrg  version_type=osf
2987ff559fabSmrg  need_lib_prefix=no
2988ff559fabSmrg  need_version=no
2989ff559fabSmrg  soname_spec='${libname}${release}${shared_ext}$major'
2990ff559fabSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2991ff559fabSmrg  shlibpath_var=LD_LIBRARY_PATH
2992ff559fabSmrg  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
2993ff559fabSmrg  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
2994ff559fabSmrg  ;;
2995ff559fabSmrg
2996ff559fabSmrgsolaris*)
2997ff559fabSmrg  version_type=linux
2998ff559fabSmrg  need_lib_prefix=no
2999ff559fabSmrg  need_version=no
3000ff559fabSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3001ff559fabSmrg  soname_spec='${libname}${release}${shared_ext}$major'
3002ff559fabSmrg  shlibpath_var=LD_LIBRARY_PATH
3003ff559fabSmrg  shlibpath_overrides_runpath=yes
3004ff559fabSmrg  hardcode_into_libs=yes
3005ff559fabSmrg  # ldd complains unless libraries are executable
3006ff559fabSmrg  postinstall_cmds='chmod +x $lib'
3007ff559fabSmrg  ;;
3008ff559fabSmrg
3009ff559fabSmrgsunos4*)
3010ff559fabSmrg  version_type=sunos
3011ff559fabSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
3012ff559fabSmrg  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
3013ff559fabSmrg  shlibpath_var=LD_LIBRARY_PATH
3014ff559fabSmrg  shlibpath_overrides_runpath=yes
3015ff559fabSmrg  if test "$with_gnu_ld" = yes; then
3016ff559fabSmrg    need_lib_prefix=no
3017ff559fabSmrg  fi
3018ff559fabSmrg  need_version=yes
3019ff559fabSmrg  ;;
3020ff559fabSmrg
3021ff559fabSmrgsysv4 | sysv4.3*)
3022ff559fabSmrg  version_type=linux
3023ff559fabSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3024ff559fabSmrg  soname_spec='${libname}${release}${shared_ext}$major'
3025ff559fabSmrg  shlibpath_var=LD_LIBRARY_PATH
3026ff559fabSmrg  case $host_vendor in
3027ff559fabSmrg    sni)
3028ff559fabSmrg      shlibpath_overrides_runpath=no
3029ff559fabSmrg      need_lib_prefix=no
3030ff559fabSmrg      export_dynamic_flag_spec='${wl}-Blargedynsym'
3031ff559fabSmrg      runpath_var=LD_RUN_PATH
3032ff559fabSmrg      ;;
3033ff559fabSmrg    siemens)
3034ff559fabSmrg      need_lib_prefix=no
3035ff559fabSmrg      ;;
3036ff559fabSmrg    motorola)
3037ff559fabSmrg      need_lib_prefix=no
3038ff559fabSmrg      need_version=no
3039ff559fabSmrg      shlibpath_overrides_runpath=no
3040ff559fabSmrg      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
3041ff559fabSmrg      ;;
3042ff559fabSmrg  esac
3043ff559fabSmrg  ;;
3044ff559fabSmrg
3045ff559fabSmrgsysv4*MP*)
3046ff559fabSmrg  if test -d /usr/nec ;then
3047ff559fabSmrg    version_type=linux
3048ff559fabSmrg    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
3049ff559fabSmrg    soname_spec='$libname${shared_ext}.$major'
3050ff559fabSmrg    shlibpath_var=LD_LIBRARY_PATH
3051ff559fabSmrg  fi
3052ff559fabSmrg  ;;
3053ff559fabSmrg
3054ff559fabSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3055ff559fabSmrg  version_type=freebsd-elf
3056ff559fabSmrg  need_lib_prefix=no
3057ff559fabSmrg  need_version=no
3058ff559fabSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
3059ff559fabSmrg  soname_spec='${libname}${release}${shared_ext}$major'
3060ff559fabSmrg  shlibpath_var=LD_LIBRARY_PATH
3061ff559fabSmrg  hardcode_into_libs=yes
3062ff559fabSmrg  if test "$with_gnu_ld" = yes; then
3063ff559fabSmrg    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
3064ff559fabSmrg    shlibpath_overrides_runpath=no
3065ff559fabSmrg  else
3066ff559fabSmrg    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
3067ff559fabSmrg    shlibpath_overrides_runpath=yes
3068ff559fabSmrg    case $host_os in
3069ff559fabSmrg      sco3.2v5*)
3070ff559fabSmrg        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
3071ff559fabSmrg	;;
3072ff559fabSmrg    esac
3073ff559fabSmrg  fi
3074ff559fabSmrg  sys_lib_dlsearch_path_spec='/usr/lib'
3075ff559fabSmrg  ;;
3076ff559fabSmrg
3077ff559fabSmrguts4*)
3078ff559fabSmrg  version_type=linux
3079ff559fabSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3080ff559fabSmrg  soname_spec='${libname}${release}${shared_ext}$major'
3081ff559fabSmrg  shlibpath_var=LD_LIBRARY_PATH
3082ff559fabSmrg  ;;
3083ff559fabSmrg
3084ff559fabSmrg*)
3085ff559fabSmrg  dynamic_linker=no
3086ff559fabSmrg  ;;
3087ff559fabSmrgesac
3088ff559fabSmrgAC_MSG_RESULT([$dynamic_linker])
3089ff559fabSmrgtest "$dynamic_linker" = no && can_build_shared=no
3090ff559fabSmrg
3091ff559fabSmrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var"
3092ff559fabSmrgif test "$GCC" = yes; then
3093ff559fabSmrg  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
3094ff559fabSmrgfi
3095ff559fabSmrg])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
3096ff559fabSmrg
3097ff559fabSmrg
3098ff559fabSmrg# _LT_AC_TAGCONFIG
3099ff559fabSmrg# ----------------
3100ff559fabSmrgAC_DEFUN([_LT_AC_TAGCONFIG],
3101ff559fabSmrg[AC_ARG_WITH([tags],
3102ff559fabSmrg    [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
3103ff559fabSmrg        [include additional configurations @<:@automatic@:>@])],
3104ff559fabSmrg    [tagnames="$withval"])
3105ff559fabSmrg
3106ff559fabSmrgif test -f "$ltmain" && test -n "$tagnames"; then
3107ff559fabSmrg  if test ! -f "${ofile}"; then
3108ff559fabSmrg    AC_MSG_WARN([output file `$ofile' does not exist])
3109ff559fabSmrg  fi
3110ff559fabSmrg
3111ff559fabSmrg  if test -z "$LTCC"; then
3112ff559fabSmrg    eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
3113ff559fabSmrg    if test -z "$LTCC"; then
3114ff559fabSmrg      AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
3115ff559fabSmrg    else
3116ff559fabSmrg      AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
3117ff559fabSmrg    fi
3118ff559fabSmrg  fi
3119ff559fabSmrg  if test -z "$LTCFLAGS"; then
3120ff559fabSmrg    eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`"
3121ff559fabSmrg  fi
3122ff559fabSmrg
3123ff559fabSmrg  # Extract list of available tagged configurations in $ofile.
3124ff559fabSmrg  # Note that this assumes the entire list is on one line.
3125ff559fabSmrg  available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
3126ff559fabSmrg
3127ff559fabSmrg  lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
3128ff559fabSmrg  for tagname in $tagnames; do
3129ff559fabSmrg    IFS="$lt_save_ifs"
3130ff559fabSmrg    # Check whether tagname contains only valid characters
3131ff559fabSmrg    case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
3132ff559fabSmrg    "") ;;
3133ff559fabSmrg    *)  AC_MSG_ERROR([invalid tag name: $tagname])
3134ff559fabSmrg	;;
3135ff559fabSmrg    esac
3136ff559fabSmrg
3137ff559fabSmrg    if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
3138ff559fabSmrg    then
3139ff559fabSmrg      AC_MSG_ERROR([tag name \"$tagname\" already exists])
3140ff559fabSmrg    fi
3141ff559fabSmrg
3142ff559fabSmrg    # Update the list of available tags.
3143ff559fabSmrg    if test -n "$tagname"; then
3144ff559fabSmrg      echo appending configuration tag \"$tagname\" to $ofile
3145ff559fabSmrg
3146ff559fabSmrg      case $tagname in
3147ff559fabSmrg      CXX)
3148ff559fabSmrg	if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
3149ff559fabSmrg	    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
3150ff559fabSmrg	    (test "X$CXX" != "Xg++"))) ; then
3151ff559fabSmrg	  AC_LIBTOOL_LANG_CXX_CONFIG
3152ff559fabSmrg	else
3153ff559fabSmrg	  tagname=""
3154ff559fabSmrg	fi
3155ff559fabSmrg	;;
3156ff559fabSmrg
3157ff559fabSmrg      F77)
3158ff559fabSmrg	if test -n "$F77" && test "X$F77" != "Xno"; then
3159ff559fabSmrg	  AC_LIBTOOL_LANG_F77_CONFIG
3160ff559fabSmrg	else
3161ff559fabSmrg	  tagname=""
3162ff559fabSmrg	fi
3163ff559fabSmrg	;;
3164ff559fabSmrg
3165ff559fabSmrg      GCJ)
3166ff559fabSmrg	if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
3167ff559fabSmrg	  AC_LIBTOOL_LANG_GCJ_CONFIG
3168ff559fabSmrg	else
3169ff559fabSmrg	  tagname=""
3170ff559fabSmrg	fi
3171ff559fabSmrg	;;
3172ff559fabSmrg
3173ff559fabSmrg      RC)
3174ff559fabSmrg	AC_LIBTOOL_LANG_RC_CONFIG
3175ff559fabSmrg	;;
3176ff559fabSmrg
3177ff559fabSmrg      *)
3178ff559fabSmrg	AC_MSG_ERROR([Unsupported tag name: $tagname])
3179ff559fabSmrg	;;
3180ff559fabSmrg      esac
3181ff559fabSmrg
3182ff559fabSmrg      # Append the new tag name to the list of available tags.
3183ff559fabSmrg      if test -n "$tagname" ; then
3184ff559fabSmrg      available_tags="$available_tags $tagname"
3185ff559fabSmrg    fi
3186ff559fabSmrg    fi
3187ff559fabSmrg  done
3188ff559fabSmrg  IFS="$lt_save_ifs"
3189ff559fabSmrg
3190ff559fabSmrg  # Now substitute the updated list of available tags.
3191ff559fabSmrg  if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
3192ff559fabSmrg    mv "${ofile}T" "$ofile"
3193ff559fabSmrg    chmod +x "$ofile"
3194ff559fabSmrg  else
3195ff559fabSmrg    rm -f "${ofile}T"
3196ff559fabSmrg    AC_MSG_ERROR([unable to update list of available tagged configurations.])
3197ff559fabSmrg  fi
3198ff559fabSmrgfi
3199ff559fabSmrg])# _LT_AC_TAGCONFIG
3200ff559fabSmrg
3201ff559fabSmrg
3202ff559fabSmrg# AC_LIBTOOL_DLOPEN
3203ff559fabSmrg# -----------------
3204ff559fabSmrg# enable checks for dlopen support
3205ff559fabSmrgAC_DEFUN([AC_LIBTOOL_DLOPEN],
3206ff559fabSmrg [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
3207ff559fabSmrg])# AC_LIBTOOL_DLOPEN
3208ff559fabSmrg
3209ff559fabSmrg
3210ff559fabSmrg# AC_LIBTOOL_WIN32_DLL
3211ff559fabSmrg# --------------------
3212ff559fabSmrg# declare package support for building win32 DLLs
3213ff559fabSmrgAC_DEFUN([AC_LIBTOOL_WIN32_DLL],
3214ff559fabSmrg[AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
3215ff559fabSmrg])# AC_LIBTOOL_WIN32_DLL
3216ff559fabSmrg
3217ff559fabSmrg
3218ff559fabSmrg# AC_ENABLE_SHARED([DEFAULT])
3219ff559fabSmrg# ---------------------------
3220ff559fabSmrg# implement the --enable-shared flag
3221ff559fabSmrg# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
3222ff559fabSmrgAC_DEFUN([AC_ENABLE_SHARED],
3223ff559fabSmrg[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
3224ff559fabSmrgAC_ARG_ENABLE([shared],
3225ff559fabSmrg    [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
3226ff559fabSmrg	[build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
3227ff559fabSmrg    [p=${PACKAGE-default}
3228ff559fabSmrg    case $enableval in
3229ff559fabSmrg    yes) enable_shared=yes ;;
3230ff559fabSmrg    no) enable_shared=no ;;
3231ff559fabSmrg    *)
3232ff559fabSmrg      enable_shared=no
3233ff559fabSmrg      # Look at the argument we got.  We use all the common list separators.
3234ff559fabSmrg      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
3235ff559fabSmrg      for pkg in $enableval; do
3236ff559fabSmrg	IFS="$lt_save_ifs"
3237ff559fabSmrg	if test "X$pkg" = "X$p"; then
3238ff559fabSmrg	  enable_shared=yes
3239ff559fabSmrg	fi
3240ff559fabSmrg      done
3241ff559fabSmrg      IFS="$lt_save_ifs"
3242ff559fabSmrg      ;;
3243ff559fabSmrg    esac],
3244ff559fabSmrg    [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
3245ff559fabSmrg])# AC_ENABLE_SHARED
3246ff559fabSmrg
3247ff559fabSmrg
3248ff559fabSmrg# AC_DISABLE_SHARED
3249ff559fabSmrg# -----------------
3250ff559fabSmrg# set the default shared flag to --disable-shared
3251ff559fabSmrgAC_DEFUN([AC_DISABLE_SHARED],
3252ff559fabSmrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3253ff559fabSmrgAC_ENABLE_SHARED(no)
3254ff559fabSmrg])# AC_DISABLE_SHARED
3255ff559fabSmrg
3256ff559fabSmrg
3257ff559fabSmrg# AC_ENABLE_STATIC([DEFAULT])
3258ff559fabSmrg# ---------------------------
3259ff559fabSmrg# implement the --enable-static flag
3260ff559fabSmrg# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
3261ff559fabSmrgAC_DEFUN([AC_ENABLE_STATIC],
3262ff559fabSmrg[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
3263ff559fabSmrgAC_ARG_ENABLE([static],
3264ff559fabSmrg    [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
3265ff559fabSmrg	[build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
3266ff559fabSmrg    [p=${PACKAGE-default}
3267ff559fabSmrg    case $enableval in
3268ff559fabSmrg    yes) enable_static=yes ;;
3269ff559fabSmrg    no) enable_static=no ;;
3270ff559fabSmrg    *)
3271ff559fabSmrg     enable_static=no
3272ff559fabSmrg      # Look at the argument we got.  We use all the common list separators.
3273ff559fabSmrg      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
3274ff559fabSmrg      for pkg in $enableval; do
3275ff559fabSmrg	IFS="$lt_save_ifs"
3276ff559fabSmrg	if test "X$pkg" = "X$p"; then
3277ff559fabSmrg	  enable_static=yes
3278ff559fabSmrg	fi
3279ff559fabSmrg      done
3280ff559fabSmrg      IFS="$lt_save_ifs"
3281ff559fabSmrg      ;;
3282ff559fabSmrg    esac],
3283ff559fabSmrg    [enable_static=]AC_ENABLE_STATIC_DEFAULT)
3284ff559fabSmrg])# AC_ENABLE_STATIC
3285ff559fabSmrg
3286ff559fabSmrg
3287ff559fabSmrg# AC_DISABLE_STATIC
3288ff559fabSmrg# -----------------
3289ff559fabSmrg# set the default static flag to --disable-static
3290ff559fabSmrgAC_DEFUN([AC_DISABLE_STATIC],
3291ff559fabSmrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3292ff559fabSmrgAC_ENABLE_STATIC(no)
3293ff559fabSmrg])# AC_DISABLE_STATIC
3294ff559fabSmrg
3295ff559fabSmrg
3296ff559fabSmrg# AC_ENABLE_FAST_INSTALL([DEFAULT])
3297ff559fabSmrg# ---------------------------------
3298ff559fabSmrg# implement the --enable-fast-install flag
3299ff559fabSmrg# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
3300ff559fabSmrgAC_DEFUN([AC_ENABLE_FAST_INSTALL],
3301ff559fabSmrg[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
3302ff559fabSmrgAC_ARG_ENABLE([fast-install],
3303ff559fabSmrg    [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
3304ff559fabSmrg    [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
3305ff559fabSmrg    [p=${PACKAGE-default}
3306ff559fabSmrg    case $enableval in
3307ff559fabSmrg    yes) enable_fast_install=yes ;;
3308ff559fabSmrg    no) enable_fast_install=no ;;
3309ff559fabSmrg    *)
3310ff559fabSmrg      enable_fast_install=no
3311ff559fabSmrg      # Look at the argument we got.  We use all the common list separators.
3312ff559fabSmrg      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
3313ff559fabSmrg      for pkg in $enableval; do
3314ff559fabSmrg	IFS="$lt_save_ifs"
3315ff559fabSmrg	if test "X$pkg" = "X$p"; then
3316ff559fabSmrg	  enable_fast_install=yes
3317ff559fabSmrg	fi
3318ff559fabSmrg      done
3319ff559fabSmrg      IFS="$lt_save_ifs"
3320ff559fabSmrg      ;;
3321ff559fabSmrg    esac],
3322ff559fabSmrg    [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
3323ff559fabSmrg])# AC_ENABLE_FAST_INSTALL
3324ff559fabSmrg
3325ff559fabSmrg
3326ff559fabSmrg# AC_DISABLE_FAST_INSTALL
3327ff559fabSmrg# -----------------------
3328ff559fabSmrg# set the default to --disable-fast-install
3329ff559fabSmrgAC_DEFUN([AC_DISABLE_FAST_INSTALL],
3330ff559fabSmrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3331ff559fabSmrgAC_ENABLE_FAST_INSTALL(no)
3332ff559fabSmrg])# AC_DISABLE_FAST_INSTALL
3333ff559fabSmrg
3334ff559fabSmrg
3335ff559fabSmrg# AC_LIBTOOL_PICMODE([MODE])
3336ff559fabSmrg# --------------------------
3337ff559fabSmrg# implement the --with-pic flag
3338ff559fabSmrg# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
3339ff559fabSmrgAC_DEFUN([AC_LIBTOOL_PICMODE],
3340ff559fabSmrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3341ff559fabSmrgpic_mode=ifelse($#,1,$1,default)
3342ff559fabSmrg])# AC_LIBTOOL_PICMODE
3343ff559fabSmrg
3344ff559fabSmrg
3345ff559fabSmrg# AC_PROG_EGREP
3346ff559fabSmrg# -------------
3347ff559fabSmrg# This is predefined starting with Autoconf 2.54, so this conditional
3348ff559fabSmrg# definition can be removed once we require Autoconf 2.54 or later.
3349ff559fabSmrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
3350ff559fabSmrg[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
3351ff559fabSmrg   [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3352ff559fabSmrg    then ac_cv_prog_egrep='grep -E'
3353ff559fabSmrg    else ac_cv_prog_egrep='egrep'
3354ff559fabSmrg    fi])
3355ff559fabSmrg EGREP=$ac_cv_prog_egrep
3356ff559fabSmrg AC_SUBST([EGREP])
3357ff559fabSmrg])])
3358ff559fabSmrg
3359ff559fabSmrg
3360ff559fabSmrg# AC_PATH_TOOL_PREFIX
3361ff559fabSmrg# -------------------
3362ff559fabSmrg# find a file program which can recognise shared library
3363ff559fabSmrgAC_DEFUN([AC_PATH_TOOL_PREFIX],
3364ff559fabSmrg[AC_REQUIRE([AC_PROG_EGREP])dnl
3365ff559fabSmrgAC_MSG_CHECKING([for $1])
3366ff559fabSmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
3367ff559fabSmrg[case $MAGIC_CMD in
3368ff559fabSmrg[[\\/*] |  ?:[\\/]*])
3369ff559fabSmrg  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
3370ff559fabSmrg  ;;
3371ff559fabSmrg*)
3372ff559fabSmrg  lt_save_MAGIC_CMD="$MAGIC_CMD"
3373ff559fabSmrg  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3374ff559fabSmrgdnl $ac_dummy forces splitting on constant user-supplied paths.
3375ff559fabSmrgdnl POSIX.2 word splitting is done only on the output of word expansions,
3376ff559fabSmrgdnl not every word.  This closes a longstanding sh security hole.
3377ff559fabSmrg  ac_dummy="ifelse([$2], , $PATH, [$2])"
3378ff559fabSmrg  for ac_dir in $ac_dummy; do
3379ff559fabSmrg    IFS="$lt_save_ifs"
3380ff559fabSmrg    test -z "$ac_dir" && ac_dir=.
3381ff559fabSmrg    if test -f $ac_dir/$1; then
3382ff559fabSmrg      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
3383ff559fabSmrg      if test -n "$file_magic_test_file"; then
3384ff559fabSmrg	case $deplibs_check_method in
3385ff559fabSmrg	"file_magic "*)
3386ff559fabSmrg	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
3387ff559fabSmrg	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3388ff559fabSmrg	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
3389ff559fabSmrg	    $EGREP "$file_magic_regex" > /dev/null; then
3390ff559fabSmrg	    :
3391ff559fabSmrg	  else
3392ff559fabSmrg	    cat <<EOF 1>&2
3393ff559fabSmrg
3394ff559fabSmrg*** Warning: the command libtool uses to detect shared libraries,
3395ff559fabSmrg*** $file_magic_cmd, produces output that libtool cannot recognize.
3396ff559fabSmrg*** The result is that libtool may fail to recognize shared libraries
3397ff559fabSmrg*** as such.  This will affect the creation of libtool libraries that
3398ff559fabSmrg*** depend on shared libraries, but programs linked with such libtool
3399ff559fabSmrg*** libraries will work regardless of this problem.  Nevertheless, you
3400ff559fabSmrg*** may want to report the problem to your system manager and/or to
3401ff559fabSmrg*** bug-libtool@gnu.org
3402ff559fabSmrg
3403ff559fabSmrgEOF
3404ff559fabSmrg	  fi ;;
3405ff559fabSmrg	esac
3406ff559fabSmrg      fi
3407ff559fabSmrg      break
3408ff559fabSmrg    fi
3409ff559fabSmrg  done
3410ff559fabSmrg  IFS="$lt_save_ifs"
3411ff559fabSmrg  MAGIC_CMD="$lt_save_MAGIC_CMD"
3412ff559fabSmrg  ;;
3413ff559fabSmrgesac])
3414ff559fabSmrgMAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3415ff559fabSmrgif test -n "$MAGIC_CMD"; then
3416ff559fabSmrg  AC_MSG_RESULT($MAGIC_CMD)
3417ff559fabSmrgelse
3418ff559fabSmrg  AC_MSG_RESULT(no)
3419ff559fabSmrgfi
3420ff559fabSmrg])# AC_PATH_TOOL_PREFIX
3421ff559fabSmrg
3422ff559fabSmrg
3423ff559fabSmrg# AC_PATH_MAGIC
3424ff559fabSmrg# -------------
3425ff559fabSmrg# find a file program which can recognise a shared library
3426ff559fabSmrgAC_DEFUN([AC_PATH_MAGIC],
3427ff559fabSmrg[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
3428ff559fabSmrgif test -z "$lt_cv_path_MAGIC_CMD"; then
3429ff559fabSmrg  if test -n "$ac_tool_prefix"; then
3430ff559fabSmrg    AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
3431ff559fabSmrg  else
3432ff559fabSmrg    MAGIC_CMD=:
3433ff559fabSmrg  fi
3434ff559fabSmrgfi
3435ff559fabSmrg])# AC_PATH_MAGIC
3436ff559fabSmrg
3437ff559fabSmrg
3438ff559fabSmrg# AC_PROG_LD
3439ff559fabSmrg# ----------
3440ff559fabSmrg# find the pathname to the GNU or non-GNU linker
3441ff559fabSmrgAC_DEFUN([AC_PROG_LD],
3442ff559fabSmrg[AC_ARG_WITH([gnu-ld],
3443ff559fabSmrg    [AC_HELP_STRING([--with-gnu-ld],
3444ff559fabSmrg	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
3445ff559fabSmrg    [test "$withval" = no || with_gnu_ld=yes],
3446ff559fabSmrg    [with_gnu_ld=no])
3447ff559fabSmrgAC_REQUIRE([LT_AC_PROG_SED])dnl
3448ff559fabSmrgAC_REQUIRE([AC_PROG_CC])dnl
3449ff559fabSmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl
3450ff559fabSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl
3451ff559fabSmrgac_prog=ld
3452ff559fabSmrgif test "$GCC" = yes; then
3453ff559fabSmrg  # Check if gcc -print-prog-name=ld gives a path.
3454ff559fabSmrg  AC_MSG_CHECKING([for ld used by $CC])
3455ff559fabSmrg  case $host in
3456ff559fabSmrg  *-*-mingw*)
3457ff559fabSmrg    # gcc leaves a trailing carriage return which upsets mingw
3458ff559fabSmrg    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3459ff559fabSmrg  *)
3460ff559fabSmrg    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3461ff559fabSmrg  esac
3462ff559fabSmrg  case $ac_prog in
3463ff559fabSmrg    # Accept absolute paths.
3464ff559fabSmrg    [[\\/]]* | ?:[[\\/]]*)
3465ff559fabSmrg      re_direlt='/[[^/]][[^/]]*/\.\./'
3466ff559fabSmrg      # Canonicalize the pathname of ld
3467ff559fabSmrg      ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
3468ff559fabSmrg      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3469ff559fabSmrg	ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
3470ff559fabSmrg      done
3471ff559fabSmrg      test -z "$LD" && LD="$ac_prog"
3472ff559fabSmrg      ;;
3473ff559fabSmrg  "")
3474ff559fabSmrg    # If it fails, then pretend we aren't using GCC.
3475ff559fabSmrg    ac_prog=ld
3476ff559fabSmrg    ;;
3477ff559fabSmrg  *)
3478ff559fabSmrg    # If it is relative, then search for the first ld in PATH.
3479ff559fabSmrg    with_gnu_ld=unknown
3480ff559fabSmrg    ;;
3481ff559fabSmrg  esac
3482ff559fabSmrgelif test "$with_gnu_ld" = yes; then
3483ff559fabSmrg  AC_MSG_CHECKING([for GNU ld])
3484ff559fabSmrgelse
3485ff559fabSmrg  AC_MSG_CHECKING([for non-GNU ld])
3486ff559fabSmrgfi
3487ff559fabSmrgAC_CACHE_VAL(lt_cv_path_LD,
3488ff559fabSmrg[if test -z "$LD"; then
3489ff559fabSmrg  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3490ff559fabSmrg  for ac_dir in $PATH; do
3491ff559fabSmrg    IFS="$lt_save_ifs"
3492ff559fabSmrg    test -z "$ac_dir" && ac_dir=.
3493ff559fabSmrg    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3494ff559fabSmrg      lt_cv_path_LD="$ac_dir/$ac_prog"
3495ff559fabSmrg      # Check to see if the program is GNU ld.  I'd rather use --version,
3496ff559fabSmrg      # but apparently some variants of GNU ld only accept -v.
3497ff559fabSmrg      # Break only if it was the GNU/non-GNU ld that we prefer.
3498ff559fabSmrg      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
3499ff559fabSmrg      *GNU* | *'with BFD'*)
3500ff559fabSmrg	test "$with_gnu_ld" != no && break
3501ff559fabSmrg	;;
3502ff559fabSmrg      *)
3503ff559fabSmrg	test "$with_gnu_ld" != yes && break
3504ff559fabSmrg	;;
3505ff559fabSmrg      esac
3506ff559fabSmrg    fi
3507ff559fabSmrg  done
3508ff559fabSmrg  IFS="$lt_save_ifs"
3509ff559fabSmrgelse
3510ff559fabSmrg  lt_cv_path_LD="$LD" # Let the user override the test with a path.
3511ff559fabSmrgfi])
3512ff559fabSmrgLD="$lt_cv_path_LD"
3513ff559fabSmrgif test -n "$LD"; then
3514ff559fabSmrg  AC_MSG_RESULT($LD)
3515ff559fabSmrgelse
3516ff559fabSmrg  AC_MSG_RESULT(no)
3517ff559fabSmrgfi
3518ff559fabSmrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
3519ff559fabSmrgAC_PROG_LD_GNU
3520ff559fabSmrg])# AC_PROG_LD
3521ff559fabSmrg
3522ff559fabSmrg
3523ff559fabSmrg# AC_PROG_LD_GNU
3524ff559fabSmrg# --------------
3525ff559fabSmrgAC_DEFUN([AC_PROG_LD_GNU],
3526ff559fabSmrg[AC_REQUIRE([AC_PROG_EGREP])dnl
3527ff559fabSmrgAC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
3528ff559fabSmrg[# I'd rather use --version here, but apparently some GNU lds only accept -v.
3529ff559fabSmrgcase `$LD -v 2>&1 </dev/null` in
3530ff559fabSmrg*GNU* | *'with BFD'*)
3531ff559fabSmrg  lt_cv_prog_gnu_ld=yes
3532ff559fabSmrg  ;;
3533ff559fabSmrg*)
3534ff559fabSmrg  lt_cv_prog_gnu_ld=no
3535ff559fabSmrg  ;;
3536ff559fabSmrgesac])
3537ff559fabSmrgwith_gnu_ld=$lt_cv_prog_gnu_ld
3538ff559fabSmrg])# AC_PROG_LD_GNU
3539ff559fabSmrg
3540ff559fabSmrg
3541ff559fabSmrg# AC_PROG_LD_RELOAD_FLAG
3542ff559fabSmrg# ----------------------
3543ff559fabSmrg# find reload flag for linker
3544ff559fabSmrg#   -- PORTME Some linkers may need a different reload flag.
3545ff559fabSmrgAC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
3546ff559fabSmrg[AC_CACHE_CHECK([for $LD option to reload object files],
3547ff559fabSmrg  lt_cv_ld_reload_flag,
3548ff559fabSmrg  [lt_cv_ld_reload_flag='-r'])
3549ff559fabSmrgreload_flag=$lt_cv_ld_reload_flag
3550ff559fabSmrgcase $reload_flag in
3551ff559fabSmrg"" | " "*) ;;
3552ff559fabSmrg*) reload_flag=" $reload_flag" ;;
3553ff559fabSmrgesac
3554ff559fabSmrgreload_cmds='$LD$reload_flag -o $output$reload_objs'
3555ff559fabSmrgcase $host_os in
3556ff559fabSmrg  darwin*)
3557ff559fabSmrg    if test "$GCC" = yes; then
3558ff559fabSmrg      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
3559ff559fabSmrg    else
3560ff559fabSmrg      reload_cmds='$LD$reload_flag -o $output$reload_objs'
3561ff559fabSmrg    fi
3562ff559fabSmrg    ;;
3563ff559fabSmrgesac
3564ff559fabSmrg])# AC_PROG_LD_RELOAD_FLAG
3565ff559fabSmrg
3566ff559fabSmrg
3567ff559fabSmrg# AC_DEPLIBS_CHECK_METHOD
3568ff559fabSmrg# -----------------------
3569ff559fabSmrg# how to check for library dependencies
3570ff559fabSmrg#  -- PORTME fill in with the dynamic library characteristics
3571ff559fabSmrgAC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
3572ff559fabSmrg[AC_CACHE_CHECK([how to recognise dependent libraries],
3573ff559fabSmrglt_cv_deplibs_check_method,
3574ff559fabSmrg[lt_cv_file_magic_cmd='$MAGIC_CMD'
3575ff559fabSmrglt_cv_file_magic_test_file=
3576ff559fabSmrglt_cv_deplibs_check_method='unknown'
3577ff559fabSmrg# Need to set the preceding variable on all platforms that support
3578ff559fabSmrg# interlibrary dependencies.
3579ff559fabSmrg# 'none' -- dependencies not supported.
3580ff559fabSmrg# `unknown' -- same as none, but documents that we really don't know.
3581ff559fabSmrg# 'pass_all' -- all dependencies passed with no checks.
3582ff559fabSmrg# 'test_compile' -- check by making test program.
3583ff559fabSmrg# 'file_magic [[regex]]' -- check by looking for files in library path
3584ff559fabSmrg# which responds to the $file_magic_cmd with a given extended regex.
3585ff559fabSmrg# If you have `file' or equivalent on your system and you're not sure
3586ff559fabSmrg# whether `pass_all' will *always* work, you probably want this one.
3587ff559fabSmrg
3588ff559fabSmrgcase $host_os in
3589ff559fabSmrgaix4* | aix5*)
3590ff559fabSmrg  lt_cv_deplibs_check_method=pass_all
3591ff559fabSmrg  ;;
3592ff559fabSmrg
3593ff559fabSmrgbeos*)
3594ff559fabSmrg  lt_cv_deplibs_check_method=pass_all
3595ff559fabSmrg  ;;
3596ff559fabSmrg
3597ff559fabSmrgbsdi[[45]]*)
3598ff559fabSmrg  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
3599ff559fabSmrg  lt_cv_file_magic_cmd='/usr/bin/file -L'
3600ff559fabSmrg  lt_cv_file_magic_test_file=/shlib/libc.so
3601ff559fabSmrg  ;;
3602ff559fabSmrg
3603ff559fabSmrgcygwin*)
3604ff559fabSmrg  # func_win32_libid is a shell function defined in ltmain.sh
3605ff559fabSmrg  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3606ff559fabSmrg  lt_cv_file_magic_cmd='func_win32_libid'
3607ff559fabSmrg  ;;
3608ff559fabSmrg
3609ff559fabSmrgmingw* | pw32*)
3610ff559fabSmrg  # Base MSYS/MinGW do not provide the 'file' command needed by
3611ff559fabSmrg  # func_win32_libid shell function, so use a weaker test based on 'objdump'.
3612ff559fabSmrg  lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3613ff559fabSmrg  lt_cv_file_magic_cmd='$OBJDUMP -f'
3614ff559fabSmrg  ;;
3615ff559fabSmrg
3616ff559fabSmrgdarwin* | rhapsody*)
3617ff559fabSmrg  lt_cv_deplibs_check_method=pass_all
3618ff559fabSmrg  ;;
3619ff559fabSmrg
3620ff559fabSmrgfreebsd* | kfreebsd*-gnu | dragonfly*)
3621ff559fabSmrg  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3622ff559fabSmrg    case $host_cpu in
3623ff559fabSmrg    i*86 )
3624ff559fabSmrg      # Not sure whether the presence of OpenBSD here was a mistake.
3625ff559fabSmrg      # Let's accept both of them until this is cleared up.
3626ff559fabSmrg      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
3627ff559fabSmrg      lt_cv_file_magic_cmd=/usr/bin/file
3628ff559fabSmrg      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3629ff559fabSmrg      ;;
3630ff559fabSmrg    esac
3631ff559fabSmrg  else
3632ff559fabSmrg    lt_cv_deplibs_check_method=pass_all
3633ff559fabSmrg  fi
3634ff559fabSmrg  ;;
3635ff559fabSmrg
3636ff559fabSmrggnu*)
3637ff559fabSmrg  lt_cv_deplibs_check_method=pass_all
3638ff559fabSmrg  ;;
3639ff559fabSmrg
3640ff559fabSmrghpux10.20* | hpux11*)
3641ff559fabSmrg  lt_cv_file_magic_cmd=/usr/bin/file
3642ff559fabSmrg  case $host_cpu in
3643ff559fabSmrg  ia64*)
3644ff559fabSmrg    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
3645ff559fabSmrg    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
3646ff559fabSmrg    ;;
3647ff559fabSmrg  hppa*64*)
3648ff559fabSmrg    [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]']
3649ff559fabSmrg    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
3650ff559fabSmrg    ;;
3651ff559fabSmrg  *)
3652ff559fabSmrg    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
3653ff559fabSmrg    lt_cv_file_magic_test_file=/usr/lib/libc.sl
3654ff559fabSmrg    ;;
3655ff559fabSmrg  esac
3656ff559fabSmrg  ;;
3657ff559fabSmrg
3658ff559fabSmrginterix3*)
3659ff559fabSmrg  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
3660ff559fabSmrg  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
3661ff559fabSmrg  ;;
3662ff559fabSmrg
3663ff559fabSmrgirix5* | irix6* | nonstopux*)
3664ff559fabSmrg  case $LD in
3665ff559fabSmrg  *-32|*"-32 ") libmagic=32-bit;;
3666ff559fabSmrg  *-n32|*"-n32 ") libmagic=N32;;
3667ff559fabSmrg  *-64|*"-64 ") libmagic=64-bit;;
3668ff559fabSmrg  *) libmagic=never-match;;
3669ff559fabSmrg  esac
3670ff559fabSmrg  lt_cv_deplibs_check_method=pass_all
3671ff559fabSmrg  ;;
3672ff559fabSmrg
3673ff559fabSmrg# This must be Linux ELF.
3674ff559fabSmrglinux*)
3675ff559fabSmrg  lt_cv_deplibs_check_method=pass_all
3676ff559fabSmrg  ;;
3677ff559fabSmrg
3678ff559fabSmrgnetbsd*)
3679ff559fabSmrg  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3680ff559fabSmrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3681ff559fabSmrg  else
3682ff559fabSmrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
3683ff559fabSmrg  fi
3684ff559fabSmrg  ;;
3685ff559fabSmrg
3686ff559fabSmrgnewos6*)
3687ff559fabSmrg  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
3688ff559fabSmrg  lt_cv_file_magic_cmd=/usr/bin/file
3689ff559fabSmrg  lt_cv_file_magic_test_file=/usr/lib/libnls.so
3690ff559fabSmrg  ;;
3691ff559fabSmrg
3692ff559fabSmrgnto-qnx*)
3693ff559fabSmrg  lt_cv_deplibs_check_method=unknown
3694ff559fabSmrg  ;;
3695ff559fabSmrg
3696ff559fabSmrgopenbsd*)
3697ff559fabSmrg  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3698ff559fabSmrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
3699ff559fabSmrg  else
3700ff559fabSmrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3701ff559fabSmrg  fi
3702ff559fabSmrg  ;;
3703ff559fabSmrg
3704ff559fabSmrgosf3* | osf4* | osf5*)
3705ff559fabSmrg  lt_cv_deplibs_check_method=pass_all
3706ff559fabSmrg  ;;
3707ff559fabSmrg
3708ff559fabSmrgsolaris*)
3709ff559fabSmrg  lt_cv_deplibs_check_method=pass_all
3710ff559fabSmrg  ;;
3711ff559fabSmrg
3712ff559fabSmrgsysv4 | sysv4.3*)
3713ff559fabSmrg  case $host_vendor in
3714ff559fabSmrg  motorola)
3715ff559fabSmrg    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]]'
3716ff559fabSmrg    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3717ff559fabSmrg    ;;
3718ff559fabSmrg  ncr)
3719ff559fabSmrg    lt_cv_deplibs_check_method=pass_all
3720ff559fabSmrg    ;;
3721ff559fabSmrg  sequent)
3722ff559fabSmrg    lt_cv_file_magic_cmd='/bin/file'
3723ff559fabSmrg    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
3724ff559fabSmrg    ;;
3725ff559fabSmrg  sni)
3726ff559fabSmrg    lt_cv_file_magic_cmd='/bin/file'
3727ff559fabSmrg    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
3728ff559fabSmrg    lt_cv_file_magic_test_file=/lib/libc.so
3729ff559fabSmrg    ;;
3730ff559fabSmrg  siemens)
3731ff559fabSmrg    lt_cv_deplibs_check_method=pass_all
3732ff559fabSmrg    ;;
3733ff559fabSmrg  pc)
3734ff559fabSmrg    lt_cv_deplibs_check_method=pass_all
3735ff559fabSmrg    ;;
3736ff559fabSmrg  esac
3737ff559fabSmrg  ;;
3738ff559fabSmrg
3739ff559fabSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3740ff559fabSmrg  lt_cv_deplibs_check_method=pass_all
3741ff559fabSmrg  ;;
3742ff559fabSmrgesac
3743ff559fabSmrg])
3744ff559fabSmrgfile_magic_cmd=$lt_cv_file_magic_cmd
3745ff559fabSmrgdeplibs_check_method=$lt_cv_deplibs_check_method
3746ff559fabSmrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown
3747ff559fabSmrg])# AC_DEPLIBS_CHECK_METHOD
3748ff559fabSmrg
3749ff559fabSmrg
3750ff559fabSmrg# AC_PROG_NM
3751ff559fabSmrg# ----------
3752ff559fabSmrg# find the pathname to a BSD-compatible name lister
3753ff559fabSmrgAC_DEFUN([AC_PROG_NM],
3754ff559fabSmrg[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
3755ff559fabSmrg[if test -n "$NM"; then
3756ff559fabSmrg  # Let the user override the test.
3757ff559fabSmrg  lt_cv_path_NM="$NM"
3758ff559fabSmrgelse
3759ff559fabSmrg  lt_nm_to_check="${ac_tool_prefix}nm"
3760ff559fabSmrg  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 
3761ff559fabSmrg    lt_nm_to_check="$lt_nm_to_check nm"
3762ff559fabSmrg  fi
3763ff559fabSmrg  for lt_tmp_nm in $lt_nm_to_check; do
3764ff559fabSmrg    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3765ff559fabSmrg    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
3766ff559fabSmrg      IFS="$lt_save_ifs"
3767ff559fabSmrg      test -z "$ac_dir" && ac_dir=.
3768ff559fabSmrg      tmp_nm="$ac_dir/$lt_tmp_nm"
3769ff559fabSmrg      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
3770ff559fabSmrg	# Check to see if the nm accepts a BSD-compat flag.
3771ff559fabSmrg	# Adding the `sed 1q' prevents false positives on HP-UX, which says:
3772ff559fabSmrg	#   nm: unknown option "B" ignored
3773ff559fabSmrg	# Tru64's nm complains that /dev/null is an invalid object file
3774ff559fabSmrg	case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
3775ff559fabSmrg	*/dev/null* | *'Invalid file or object type'*)
3776ff559fabSmrg	  lt_cv_path_NM="$tmp_nm -B"
3777ff559fabSmrg	  break
3778ff559fabSmrg	  ;;
3779ff559fabSmrg	*)
3780ff559fabSmrg	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
3781ff559fabSmrg	  */dev/null*)
3782ff559fabSmrg	    lt_cv_path_NM="$tmp_nm -p"
3783ff559fabSmrg	    break
3784ff559fabSmrg	    ;;
3785ff559fabSmrg	  *)
3786ff559fabSmrg	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3787ff559fabSmrg	    continue # so that we can try to find one that supports BSD flags
3788ff559fabSmrg	    ;;
3789ff559fabSmrg	  esac
3790ff559fabSmrg	  ;;
3791ff559fabSmrg	esac
3792ff559fabSmrg      fi
3793ff559fabSmrg    done
3794ff559fabSmrg    IFS="$lt_save_ifs"
3795ff559fabSmrg  done
3796ff559fabSmrg  test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
3797ff559fabSmrgfi])
3798ff559fabSmrgNM="$lt_cv_path_NM"
3799ff559fabSmrg])# AC_PROG_NM
3800ff559fabSmrg
3801ff559fabSmrg
3802ff559fabSmrg# AC_CHECK_LIBM
3803ff559fabSmrg# -------------
3804ff559fabSmrg# check for math library
3805ff559fabSmrgAC_DEFUN([AC_CHECK_LIBM],
3806ff559fabSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
3807ff559fabSmrgLIBM=
3808ff559fabSmrgcase $host in
3809ff559fabSmrg*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
3810ff559fabSmrg  # These system don't have libm, or don't need it
3811ff559fabSmrg  ;;
3812ff559fabSmrg*-ncr-sysv4.3*)
3813ff559fabSmrg  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
3814ff559fabSmrg  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
3815ff559fabSmrg  ;;
3816ff559fabSmrg*)
3817ff559fabSmrg  AC_CHECK_LIB(m, cos, LIBM="-lm")
3818ff559fabSmrg  ;;
3819ff559fabSmrgesac
3820ff559fabSmrg])# AC_CHECK_LIBM
3821ff559fabSmrg
3822ff559fabSmrg
3823ff559fabSmrg# AC_LIBLTDL_CONVENIENCE([DIRECTORY])
3824ff559fabSmrg# -----------------------------------
3825ff559fabSmrg# sets LIBLTDL to the link flags for the libltdl convenience library and
3826ff559fabSmrg# LTDLINCL to the include flags for the libltdl header and adds
3827ff559fabSmrg# --enable-ltdl-convenience to the configure arguments.  Note that
3828ff559fabSmrg# AC_CONFIG_SUBDIRS is not called here.  If DIRECTORY is not provided,
3829ff559fabSmrg# it is assumed to be `libltdl'.  LIBLTDL will be prefixed with
3830ff559fabSmrg# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/'
3831ff559fabSmrg# (note the single quotes!).  If your package is not flat and you're not
3832ff559fabSmrg# using automake, define top_builddir and top_srcdir appropriately in
3833ff559fabSmrg# the Makefiles.
3834ff559fabSmrgAC_DEFUN([AC_LIBLTDL_CONVENIENCE],
3835ff559fabSmrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3836ff559fabSmrg  case $enable_ltdl_convenience in
3837ff559fabSmrg  no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
3838ff559fabSmrg  "") enable_ltdl_convenience=yes
3839ff559fabSmrg      ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
3840ff559fabSmrg  esac
3841ff559fabSmrg  LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
3842ff559fabSmrg  LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
3843ff559fabSmrg  # For backwards non-gettext consistent compatibility...
3844ff559fabSmrg  INCLTDL="$LTDLINCL"
3845ff559fabSmrg])# AC_LIBLTDL_CONVENIENCE
3846ff559fabSmrg
3847ff559fabSmrg
3848ff559fabSmrg# AC_LIBLTDL_INSTALLABLE([DIRECTORY])
3849ff559fabSmrg# -----------------------------------
3850ff559fabSmrg# sets LIBLTDL to the link flags for the libltdl installable library and
3851ff559fabSmrg# LTDLINCL to the include flags for the libltdl header and adds
3852ff559fabSmrg# --enable-ltdl-install to the configure arguments.  Note that
3853ff559fabSmrg# AC_CONFIG_SUBDIRS is not called here.  If DIRECTORY is not provided,
3854ff559fabSmrg# and an installed libltdl is not found, it is assumed to be `libltdl'.
3855ff559fabSmrg# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with
3856ff559fabSmrg# '${top_srcdir}/' (note the single quotes!).  If your package is not
3857ff559fabSmrg# flat and you're not using automake, define top_builddir and top_srcdir
3858ff559fabSmrg# appropriately in the Makefiles.
3859ff559fabSmrg# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
3860ff559fabSmrgAC_DEFUN([AC_LIBLTDL_INSTALLABLE],
3861ff559fabSmrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3862ff559fabSmrg  AC_CHECK_LIB(ltdl, lt_dlinit,
3863ff559fabSmrg  [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
3864ff559fabSmrg  [if test x"$enable_ltdl_install" = xno; then
3865ff559fabSmrg     AC_MSG_WARN([libltdl not installed, but installation disabled])
3866ff559fabSmrg   else
3867ff559fabSmrg     enable_ltdl_install=yes
3868ff559fabSmrg   fi
3869ff559fabSmrg  ])
3870ff559fabSmrg  if test x"$enable_ltdl_install" = x"yes"; then
3871ff559fabSmrg    ac_configure_args="$ac_configure_args --enable-ltdl-install"
3872ff559fabSmrg    LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
3873ff559fabSmrg    LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
3874ff559fabSmrg  else
3875ff559fabSmrg    ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
3876ff559fabSmrg    LIBLTDL="-lltdl"
3877ff559fabSmrg    LTDLINCL=
3878ff559fabSmrg  fi
3879ff559fabSmrg  # For backwards non-gettext consistent compatibility...
3880ff559fabSmrg  INCLTDL="$LTDLINCL"
3881ff559fabSmrg])# AC_LIBLTDL_INSTALLABLE
3882ff559fabSmrg
3883ff559fabSmrg
3884ff559fabSmrg# AC_LIBTOOL_CXX
3885ff559fabSmrg# --------------
3886ff559fabSmrg# enable support for C++ libraries
3887ff559fabSmrgAC_DEFUN([AC_LIBTOOL_CXX],
3888ff559fabSmrg[AC_REQUIRE([_LT_AC_LANG_CXX])
3889ff559fabSmrg])# AC_LIBTOOL_CXX
3890ff559fabSmrg
3891ff559fabSmrg
3892ff559fabSmrg# _LT_AC_LANG_CXX
3893ff559fabSmrg# ---------------
3894ff559fabSmrgAC_DEFUN([_LT_AC_LANG_CXX],
3895ff559fabSmrg[AC_REQUIRE([AC_PROG_CXX])
3896ff559fabSmrgAC_REQUIRE([_LT_AC_PROG_CXXCPP])
3897ff559fabSmrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
3898ff559fabSmrg])# _LT_AC_LANG_CXX
3899ff559fabSmrg
3900ff559fabSmrg# _LT_AC_PROG_CXXCPP
3901ff559fabSmrg# ------------------
3902ff559fabSmrgAC_DEFUN([_LT_AC_PROG_CXXCPP],
3903ff559fabSmrg[
3904ff559fabSmrgAC_REQUIRE([AC_PROG_CXX])
3905ff559fabSmrgif test -n "$CXX" && ( test "X$CXX" != "Xno" &&
3906ff559fabSmrg    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
3907ff559fabSmrg    (test "X$CXX" != "Xg++"))) ; then
3908ff559fabSmrg  AC_PROG_CXXCPP
3909ff559fabSmrgfi
3910ff559fabSmrg])# _LT_AC_PROG_CXXCPP
3911ff559fabSmrg
3912ff559fabSmrg# AC_LIBTOOL_F77
3913ff559fabSmrg# --------------
3914ff559fabSmrg# enable support for Fortran 77 libraries
3915ff559fabSmrgAC_DEFUN([AC_LIBTOOL_F77],
3916ff559fabSmrg[AC_REQUIRE([_LT_AC_LANG_F77])
3917ff559fabSmrg])# AC_LIBTOOL_F77
3918ff559fabSmrg
3919ff559fabSmrg
3920ff559fabSmrg# _LT_AC_LANG_F77
3921ff559fabSmrg# ---------------
3922ff559fabSmrgAC_DEFUN([_LT_AC_LANG_F77],
3923ff559fabSmrg[AC_REQUIRE([AC_PROG_F77])
3924ff559fabSmrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
3925ff559fabSmrg])# _LT_AC_LANG_F77
3926ff559fabSmrg
3927ff559fabSmrg
3928ff559fabSmrg# AC_LIBTOOL_GCJ
3929ff559fabSmrg# --------------
3930ff559fabSmrg# enable support for GCJ libraries
3931ff559fabSmrgAC_DEFUN([AC_LIBTOOL_GCJ],
3932ff559fabSmrg[AC_REQUIRE([_LT_AC_LANG_GCJ])
3933ff559fabSmrg])# AC_LIBTOOL_GCJ
3934ff559fabSmrg
3935ff559fabSmrg
3936ff559fabSmrg# _LT_AC_LANG_GCJ
3937ff559fabSmrg# ---------------
3938ff559fabSmrgAC_DEFUN([_LT_AC_LANG_GCJ],
3939ff559fabSmrg[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
3940ff559fabSmrg  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
3941ff559fabSmrg    [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
3942ff559fabSmrg      [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
3943ff559fabSmrg	 [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
3944ff559fabSmrg	   [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
3945ff559fabSmrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
3946ff559fabSmrg])# _LT_AC_LANG_GCJ
3947ff559fabSmrg
3948ff559fabSmrg
3949ff559fabSmrg# AC_LIBTOOL_RC
3950ff559fabSmrg# -------------
3951ff559fabSmrg# enable support for Windows resource files
3952ff559fabSmrgAC_DEFUN([AC_LIBTOOL_RC],
3953ff559fabSmrg[AC_REQUIRE([LT_AC_PROG_RC])
3954ff559fabSmrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
3955ff559fabSmrg])# AC_LIBTOOL_RC
3956ff559fabSmrg
3957ff559fabSmrg
3958ff559fabSmrg# AC_LIBTOOL_LANG_C_CONFIG
3959ff559fabSmrg# ------------------------
3960ff559fabSmrg# Ensure that the configuration vars for the C compiler are
3961ff559fabSmrg# suitably defined.  Those variables are subsequently used by
3962ff559fabSmrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3963ff559fabSmrgAC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
3964ff559fabSmrgAC_DEFUN([_LT_AC_LANG_C_CONFIG],
3965ff559fabSmrg[lt_save_CC="$CC"
3966ff559fabSmrgAC_LANG_PUSH(C)
3967ff559fabSmrg
3968ff559fabSmrg# Source file extension for C test sources.
3969ff559fabSmrgac_ext=c
3970ff559fabSmrg
3971ff559fabSmrg# Object file extension for compiled C test sources.
3972ff559fabSmrgobjext=o
3973ff559fabSmrg_LT_AC_TAGVAR(objext, $1)=$objext
3974ff559fabSmrg
3975ff559fabSmrg# Code to be used in simple compile tests
3976ff559fabSmrglt_simple_compile_test_code="int some_variable = 0;\n"
3977ff559fabSmrg
3978ff559fabSmrg# Code to be used in simple link tests
3979ff559fabSmrglt_simple_link_test_code='int main(){return(0);}\n'
3980ff559fabSmrg
3981ff559fabSmrg_LT_AC_SYS_COMPILER
3982ff559fabSmrg
3983ff559fabSmrg# save warnings/boilerplate of simple test code
3984ff559fabSmrg_LT_COMPILER_BOILERPLATE
3985ff559fabSmrg_LT_LINKER_BOILERPLATE
3986ff559fabSmrg
3987ff559fabSmrgAC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
3988ff559fabSmrgAC_LIBTOOL_PROG_COMPILER_PIC($1)
3989ff559fabSmrgAC_LIBTOOL_PROG_CC_C_O($1)
3990ff559fabSmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
3991ff559fabSmrgAC_LIBTOOL_PROG_LD_SHLIBS($1)
3992ff559fabSmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
3993ff559fabSmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
3994ff559fabSmrgAC_LIBTOOL_SYS_LIB_STRIP
3995ff559fabSmrgAC_LIBTOOL_DLOPEN_SELF
3996ff559fabSmrg
3997ff559fabSmrg# Report which library types will actually be built
3998ff559fabSmrgAC_MSG_CHECKING([if libtool supports shared libraries])
3999ff559fabSmrgAC_MSG_RESULT([$can_build_shared])
4000ff559fabSmrg
4001ff559fabSmrgAC_MSG_CHECKING([whether to build shared libraries])
4002ff559fabSmrgtest "$can_build_shared" = "no" && enable_shared=no
4003ff559fabSmrg
4004ff559fabSmrg# On AIX, shared libraries and static libraries use the same namespace, and
4005ff559fabSmrg# are all built from PIC.
4006ff559fabSmrgcase $host_os in
4007ff559fabSmrgaix3*)
4008ff559fabSmrg  test "$enable_shared" = yes && enable_static=no
4009ff559fabSmrg  if test -n "$RANLIB"; then
4010ff559fabSmrg    archive_cmds="$archive_cmds~\$RANLIB \$lib"
4011ff559fabSmrg    postinstall_cmds='$RANLIB $lib'
4012ff559fabSmrg  fi
4013ff559fabSmrg  ;;
4014ff559fabSmrg
4015ff559fabSmrgaix4* | aix5*)
4016ff559fabSmrg  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
4017ff559fabSmrg    test "$enable_shared" = yes && enable_static=no
4018ff559fabSmrg  fi
4019ff559fabSmrg    ;;
4020ff559fabSmrgesac
4021ff559fabSmrgAC_MSG_RESULT([$enable_shared])
4022ff559fabSmrg
4023ff559fabSmrgAC_MSG_CHECKING([whether to build static libraries])
4024ff559fabSmrg# Make sure either enable_shared or enable_static is yes.
4025ff559fabSmrgtest "$enable_shared" = yes || enable_static=yes
4026ff559fabSmrgAC_MSG_RESULT([$enable_static])
4027ff559fabSmrg
4028ff559fabSmrgAC_LIBTOOL_CONFIG($1)
4029ff559fabSmrg
4030ff559fabSmrgAC_LANG_POP
4031ff559fabSmrgCC="$lt_save_CC"
4032ff559fabSmrg])# AC_LIBTOOL_LANG_C_CONFIG
4033ff559fabSmrg
4034ff559fabSmrg
4035ff559fabSmrg# AC_LIBTOOL_LANG_CXX_CONFIG
4036ff559fabSmrg# --------------------------
4037ff559fabSmrg# Ensure that the configuration vars for the C compiler are
4038ff559fabSmrg# suitably defined.  Those variables are subsequently used by
4039ff559fabSmrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4040ff559fabSmrgAC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
4041ff559fabSmrgAC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
4042ff559fabSmrg[AC_LANG_PUSH(C++)
4043ff559fabSmrgAC_REQUIRE([AC_PROG_CXX])
4044ff559fabSmrgAC_REQUIRE([_LT_AC_PROG_CXXCPP])
4045ff559fabSmrg
4046ff559fabSmrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4047ff559fabSmrg_LT_AC_TAGVAR(allow_undefined_flag, $1)=
4048ff559fabSmrg_LT_AC_TAGVAR(always_export_symbols, $1)=no
4049ff559fabSmrg_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
4050ff559fabSmrg_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
4051ff559fabSmrg_LT_AC_TAGVAR(hardcode_direct, $1)=no
4052ff559fabSmrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
4053ff559fabSmrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
4054ff559fabSmrg_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
4055ff559fabSmrg_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
4056ff559fabSmrg_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
4057ff559fabSmrg_LT_AC_TAGVAR(hardcode_automatic, $1)=no
4058ff559fabSmrg_LT_AC_TAGVAR(module_cmds, $1)=
4059ff559fabSmrg_LT_AC_TAGVAR(module_expsym_cmds, $1)=
4060ff559fabSmrg_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
4061ff559fabSmrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
4062ff559fabSmrg_LT_AC_TAGVAR(no_undefined_flag, $1)=
4063ff559fabSmrg_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
4064ff559fabSmrg_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
4065ff559fabSmrg
4066ff559fabSmrg# Dependencies to place before and after the object being linked:
4067ff559fabSmrg_LT_AC_TAGVAR(predep_objects, $1)=
4068ff559fabSmrg_LT_AC_TAGVAR(postdep_objects, $1)=
4069ff559fabSmrg_LT_AC_TAGVAR(predeps, $1)=
4070ff559fabSmrg_LT_AC_TAGVAR(postdeps, $1)=
4071ff559fabSmrg_LT_AC_TAGVAR(compiler_lib_search_path, $1)=
4072ff559fabSmrg
4073ff559fabSmrg# Source file extension for C++ test sources.
4074ff559fabSmrgac_ext=cpp
4075ff559fabSmrg
4076ff559fabSmrg# Object file extension for compiled C++ test sources.
4077ff559fabSmrgobjext=o
4078ff559fabSmrg_LT_AC_TAGVAR(objext, $1)=$objext
4079ff559fabSmrg
4080ff559fabSmrg# Code to be used in simple compile tests
4081ff559fabSmrglt_simple_compile_test_code="int some_variable = 0;\n"
4082ff559fabSmrg
4083ff559fabSmrg# Code to be used in simple link tests
4084ff559fabSmrglt_simple_link_test_code='int main(int, char *[[]]) { return(0); }\n'
4085ff559fabSmrg
4086ff559fabSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
4087ff559fabSmrg_LT_AC_SYS_COMPILER
4088ff559fabSmrg
4089ff559fabSmrg# save warnings/boilerplate of simple test code
4090ff559fabSmrg_LT_COMPILER_BOILERPLATE
4091ff559fabSmrg_LT_LINKER_BOILERPLATE
4092ff559fabSmrg
4093ff559fabSmrg# Allow CC to be a program name with arguments.
4094ff559fabSmrglt_save_CC=$CC
4095ff559fabSmrglt_save_LD=$LD
4096ff559fabSmrglt_save_GCC=$GCC
4097ff559fabSmrgGCC=$GXX
4098ff559fabSmrglt_save_with_gnu_ld=$with_gnu_ld
4099ff559fabSmrglt_save_path_LD=$lt_cv_path_LD
4100ff559fabSmrgif test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
4101ff559fabSmrg  lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
4102ff559fabSmrgelse
4103ff559fabSmrg  $as_unset lt_cv_prog_gnu_ld
4104ff559fabSmrgfi
4105ff559fabSmrgif test -n "${lt_cv_path_LDCXX+set}"; then
4106ff559fabSmrg  lt_cv_path_LD=$lt_cv_path_LDCXX
4107ff559fabSmrgelse
4108ff559fabSmrg  $as_unset lt_cv_path_LD
4109ff559fabSmrgfi
4110ff559fabSmrgtest -z "${LDCXX+set}" || LD=$LDCXX
4111ff559fabSmrgCC=${CXX-"c++"}
4112ff559fabSmrgcompiler=$CC
4113ff559fabSmrg_LT_AC_TAGVAR(compiler, $1)=$CC
4114ff559fabSmrg_LT_CC_BASENAME([$compiler])
4115ff559fabSmrg
4116ff559fabSmrg# We don't want -fno-exception wen compiling C++ code, so set the
4117ff559fabSmrg# no_builtin_flag separately
4118ff559fabSmrgif test "$GXX" = yes; then
4119ff559fabSmrg  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
4120ff559fabSmrgelse
4121ff559fabSmrg  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
4122ff559fabSmrgfi
4123ff559fabSmrg
4124ff559fabSmrgif test "$GXX" = yes; then
4125ff559fabSmrg  # Set up default GNU C++ configuration
4126ff559fabSmrg
4127ff559fabSmrg  AC_PROG_LD
4128ff559fabSmrg
4129ff559fabSmrg  # Check if GNU C++ uses GNU ld as the underlying linker, since the
4130ff559fabSmrg  # archiving commands below assume that GNU ld is being used.
4131ff559fabSmrg  if test "$with_gnu_ld" = yes; then
4132ff559fabSmrg    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
4133ff559fabSmrg    _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'
4134ff559fabSmrg
4135ff559fabSmrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
4136ff559fabSmrg    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4137ff559fabSmrg
4138ff559fabSmrg    # If archive_cmds runs LD, not CC, wlarc should be empty
4139ff559fabSmrg    # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
4140ff559fabSmrg    #     investigate it a little bit more. (MM)
4141ff559fabSmrg    wlarc='${wl}'
4142ff559fabSmrg
4143ff559fabSmrg    # ancient GNU ld didn't support --whole-archive et. al.
4144ff559fabSmrg    if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
4145ff559fabSmrg	grep 'no-whole-archive' > /dev/null; then
4146ff559fabSmrg      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
4147ff559fabSmrg    else
4148ff559fabSmrg      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
4149ff559fabSmrg    fi
4150ff559fabSmrg  else
4151ff559fabSmrg    with_gnu_ld=no
4152ff559fabSmrg    wlarc=
4153ff559fabSmrg
4154ff559fabSmrg    # A generic and very simple default shared library creation
4155ff559fabSmrg    # command for GNU C++ for the case where it uses the native
4156ff559fabSmrg    # linker, instead of GNU ld.  If possible, this setting should
4157ff559fabSmrg    # overridden to take advantage of the native linker features on
4158ff559fabSmrg    # the platform it is being used on.
4159ff559fabSmrg    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
4160ff559fabSmrg  fi
4161ff559fabSmrg
4162ff559fabSmrg  # Commands to make compiler produce verbose output that lists
4163ff559fabSmrg  # what "hidden" libraries, object files and flags are used when
4164ff559fabSmrg  # linking a shared library.
4165ff559fabSmrg  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
4166ff559fabSmrg
4167ff559fabSmrgelse
4168ff559fabSmrg  GXX=no
4169ff559fabSmrg  with_gnu_ld=no
4170ff559fabSmrg  wlarc=
4171ff559fabSmrgfi
4172ff559fabSmrg
4173ff559fabSmrg# PORTME: fill in a description of your system's C++ link characteristics
4174ff559fabSmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
4175ff559fabSmrg_LT_AC_TAGVAR(ld_shlibs, $1)=yes
4176ff559fabSmrgcase $host_os in
4177ff559fabSmrg  aix3*)
4178ff559fabSmrg    # FIXME: insert proper C++ library support
4179ff559fabSmrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
4180ff559fabSmrg    ;;
4181ff559fabSmrg  aix4* | aix5*)
4182ff559fabSmrg    if test "$host_cpu" = ia64; then
4183ff559fabSmrg      # On IA64, the linker does run time linking by default, so we don't
4184ff559fabSmrg      # have to do anything special.
4185ff559fabSmrg      aix_use_runtimelinking=no
4186ff559fabSmrg      exp_sym_flag='-Bexport'
4187ff559fabSmrg      no_entry_flag=""
4188ff559fabSmrg    else
4189ff559fabSmrg      aix_use_runtimelinking=no
4190ff559fabSmrg
4191ff559fabSmrg      # Test if we are trying to use run time linking or normal
4192ff559fabSmrg      # AIX style linking. If -brtl is somewhere in LDFLAGS, we
4193ff559fabSmrg      # need to do runtime linking.
4194ff559fabSmrg      case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
4195ff559fabSmrg	for ld_flag in $LDFLAGS; do
4196ff559fabSmrg	  case $ld_flag in
4197ff559fabSmrg	  *-brtl*)
4198ff559fabSmrg	    aix_use_runtimelinking=yes
4199ff559fabSmrg	    break
4200ff559fabSmrg	    ;;
4201ff559fabSmrg	  esac
4202ff559fabSmrg	done
4203ff559fabSmrg	;;
4204ff559fabSmrg      esac
4205ff559fabSmrg
4206ff559fabSmrg      exp_sym_flag='-bexport'
4207ff559fabSmrg      no_entry_flag='-bnoentry'
4208ff559fabSmrg    fi
4209ff559fabSmrg
4210ff559fabSmrg    # When large executables or shared objects are built, AIX ld can
4211ff559fabSmrg    # have problems creating the table of contents.  If linking a library
4212ff559fabSmrg    # or program results in "error TOC overflow" add -mminimal-toc to
4213ff559fabSmrg    # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
4214ff559fabSmrg    # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
4215ff559fabSmrg
4216ff559fabSmrg    _LT_AC_TAGVAR(archive_cmds, $1)=''
4217ff559fabSmrg    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4218ff559fabSmrg    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
4219ff559fabSmrg    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4220ff559fabSmrg
4221ff559fabSmrg    if test "$GXX" = yes; then
4222ff559fabSmrg      case $host_os in aix4.[[012]]|aix4.[[012]].*)
4223ff559fabSmrg      # We only want to do this on AIX 4.2 and lower, the check
4224ff559fabSmrg      # below for broken collect2 doesn't work under 4.3+
4225ff559fabSmrg	collect2name=`${CC} -print-prog-name=collect2`
4226ff559fabSmrg	if test -f "$collect2name" && \
4227ff559fabSmrg	   strings "$collect2name" | grep resolve_lib_name >/dev/null
4228ff559fabSmrg	then
4229ff559fabSmrg	  # We have reworked collect2
4230ff559fabSmrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4231ff559fabSmrg	else
4232ff559fabSmrg	  # We have old collect2
4233ff559fabSmrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
4234ff559fabSmrg	  # It fails to find uninstalled libraries when the uninstalled
4235ff559fabSmrg	  # path is not listed in the libpath.  Setting hardcode_minus_L
4236ff559fabSmrg	  # to unsupported forces relinking
4237ff559fabSmrg	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
4238ff559fabSmrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4239ff559fabSmrg	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
4240ff559fabSmrg	fi
4241ff559fabSmrg	;;
4242ff559fabSmrg      esac
4243ff559fabSmrg      shared_flag='-shared'
4244ff559fabSmrg      if test "$aix_use_runtimelinking" = yes; then
4245ff559fabSmrg	shared_flag="$shared_flag "'${wl}-G'
4246ff559fabSmrg      fi
4247ff559fabSmrg    else
4248ff559fabSmrg      # not using gcc
4249ff559fabSmrg      if test "$host_cpu" = ia64; then
4250ff559fabSmrg	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
4251ff559fabSmrg	# chokes on -Wl,-G. The following line is correct:
4252ff559fabSmrg	shared_flag='-G'
4253ff559fabSmrg      else
4254ff559fabSmrg	if test "$aix_use_runtimelinking" = yes; then
4255ff559fabSmrg	  shared_flag='${wl}-G'
4256ff559fabSmrg	else
4257ff559fabSmrg	  shared_flag='${wl}-bM:SRE'
4258ff559fabSmrg	fi
4259ff559fabSmrg      fi
4260ff559fabSmrg    fi
4261ff559fabSmrg
4262ff559fabSmrg    # It seems that -bexpall does not export symbols beginning with
4263ff559fabSmrg    # underscore (_), so it is better to generate a list of symbols to export.
4264ff559fabSmrg    _LT_AC_TAGVAR(always_export_symbols, $1)=yes
4265ff559fabSmrg    if test "$aix_use_runtimelinking" = yes; then
4266ff559fabSmrg      # Warning - without using the other runtime loading flags (-brtl),
4267ff559fabSmrg      # -berok will link without error, but may produce a broken library.
4268ff559fabSmrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
4269ff559fabSmrg      # Determine the default libpath from the value encoded in an empty executable.
4270ff559fabSmrg      _LT_AC_SYS_LIBPATH_AIX
4271ff559fabSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
4272ff559fabSmrg
4273ff559fabSmrg      _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"
4274ff559fabSmrg     else
4275ff559fabSmrg      if test "$host_cpu" = ia64; then
4276ff559fabSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
4277ff559fabSmrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
4278ff559fabSmrg	_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"
4279ff559fabSmrg      else
4280ff559fabSmrg	# Determine the default libpath from the value encoded in an empty executable.
4281ff559fabSmrg	_LT_AC_SYS_LIBPATH_AIX
4282ff559fabSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
4283ff559fabSmrg	# Warning - without using the other run time loading flags,
4284ff559fabSmrg	# -berok will link without error, but may produce a broken library.
4285ff559fabSmrg	_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
4286ff559fabSmrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
4287ff559fabSmrg	# Exported symbols can be pulled into shared objects from archives
4288ff559fabSmrg	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
4289ff559fabSmrg	_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
4290ff559fabSmrg	# This is similar to how AIX traditionally builds its shared libraries.
4291ff559fabSmrg	_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'
4292ff559fabSmrg      fi
4293ff559fabSmrg    fi
4294ff559fabSmrg    ;;
4295ff559fabSmrg
4296ff559fabSmrg  beos*)
4297ff559fabSmrg    if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
4298ff559fabSmrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
4299ff559fabSmrg      # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
4300ff559fabSmrg      # support --undefined.  This deserves some investigation.  FIXME
4301ff559fabSmrg      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4302ff559fabSmrg    else
4303ff559fabSmrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
4304ff559fabSmrg    fi
4305ff559fabSmrg    ;;
4306ff559fabSmrg
4307ff559fabSmrg  chorus*)
4308ff559fabSmrg    case $cc_basename in
4309ff559fabSmrg      *)
4310ff559fabSmrg	# FIXME: insert proper C++ library support
4311ff559fabSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
4312ff559fabSmrg	;;
4313ff559fabSmrg    esac
4314ff559fabSmrg    ;;
4315ff559fabSmrg
4316ff559fabSmrg  cygwin* | mingw* | pw32*)
4317ff559fabSmrg    # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
4318ff559fabSmrg    # as there is no search path for DLLs.
4319ff559fabSmrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4320ff559fabSmrg    _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
4321ff559fabSmrg    _LT_AC_TAGVAR(always_export_symbols, $1)=no
4322ff559fabSmrg    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
4323ff559fabSmrg
4324ff559fabSmrg    if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
4325ff559fabSmrg      _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'
4326ff559fabSmrg      # If the export-symbols file already is a .def file (1st line
4327ff559fabSmrg      # is EXPORTS), use it as is; otherwise, prepend...
4328ff559fabSmrg      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
4329ff559fabSmrg	cp $export_symbols $output_objdir/$soname.def;
4330ff559fabSmrg      else
4331ff559fabSmrg	echo EXPORTS > $output_objdir/$soname.def;
4332ff559fabSmrg	cat $export_symbols >> $output_objdir/$soname.def;
4333ff559fabSmrg      fi~
4334ff559fabSmrg      $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'
4335ff559fabSmrg    else
4336ff559fabSmrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
4337ff559fabSmrg    fi
4338ff559fabSmrg  ;;
4339ff559fabSmrg      darwin* | rhapsody*)
4340ff559fabSmrg        case $host_os in
4341ff559fabSmrg        rhapsody* | darwin1.[[012]])
4342ff559fabSmrg         _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
4343ff559fabSmrg         ;;
4344ff559fabSmrg       *) # Darwin 1.3 on
4345ff559fabSmrg         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
4346ff559fabSmrg           _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
4347ff559fabSmrg         else
4348ff559fabSmrg           case ${MACOSX_DEPLOYMENT_TARGET} in
4349ff559fabSmrg             10.[[012]])
4350ff559fabSmrg               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
4351ff559fabSmrg               ;;
4352ff559fabSmrg             10.*)
4353ff559fabSmrg               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
4354ff559fabSmrg               ;;
4355ff559fabSmrg           esac
4356ff559fabSmrg         fi
4357ff559fabSmrg         ;;
4358ff559fabSmrg        esac
4359ff559fabSmrg      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4360ff559fabSmrg      _LT_AC_TAGVAR(hardcode_direct, $1)=no
4361ff559fabSmrg      _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
4362ff559fabSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
4363ff559fabSmrg      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
4364ff559fabSmrg      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4365ff559fabSmrg
4366ff559fabSmrg    if test "$GXX" = yes ; then
4367ff559fabSmrg      lt_int_apple_cc_single_mod=no
4368ff559fabSmrg      output_verbose_link_cmd='echo'
4369ff559fabSmrg      if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then
4370ff559fabSmrg       lt_int_apple_cc_single_mod=yes
4371ff559fabSmrg      fi
4372ff559fabSmrg      if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
4373ff559fabSmrg       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
4374ff559fabSmrg      else
4375ff559fabSmrg          _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'
4376ff559fabSmrg        fi
4377ff559fabSmrg        _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
4378ff559fabSmrg        # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
4379ff559fabSmrg          if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
4380ff559fabSmrg            _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}'
4381ff559fabSmrg          else
4382ff559fabSmrg            _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}'
4383ff559fabSmrg          fi
4384ff559fabSmrg            _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}'
4385ff559fabSmrg      else
4386ff559fabSmrg      case $cc_basename in
4387ff559fabSmrg        xlc*)
4388ff559fabSmrg         output_verbose_link_cmd='echo'
4389ff559fabSmrg          _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'
4390ff559fabSmrg          _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
4391ff559fabSmrg          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
4392ff559fabSmrg          _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}'
4393ff559fabSmrg          _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}'
4394ff559fabSmrg          ;;
4395ff559fabSmrg       *)
4396ff559fabSmrg         _LT_AC_TAGVAR(ld_shlibs, $1)=no
4397ff559fabSmrg          ;;
4398ff559fabSmrg      esac
4399ff559fabSmrg      fi
4400ff559fabSmrg        ;;
4401ff559fabSmrg
4402ff559fabSmrg  dgux*)
4403ff559fabSmrg    case $cc_basename in
4404ff559fabSmrg      ec++*)
4405ff559fabSmrg	# FIXME: insert proper C++ library support
4406ff559fabSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
4407ff559fabSmrg	;;
4408ff559fabSmrg      ghcx*)
4409ff559fabSmrg	# Green Hills C++ Compiler
4410ff559fabSmrg	# FIXME: insert proper C++ library support
4411ff559fabSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
4412ff559fabSmrg	;;
4413ff559fabSmrg      *)
4414ff559fabSmrg	# FIXME: insert proper C++ library support
4415ff559fabSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
4416ff559fabSmrg	;;
4417ff559fabSmrg    esac
4418ff559fabSmrg    ;;
4419ff559fabSmrg  freebsd[[12]]*)
4420ff559fabSmrg    # C++ shared libraries reported to be fairly broken before switch to ELF
4421ff559fabSmrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
4422ff559fabSmrg    ;;
4423ff559fabSmrg  freebsd-elf*)
4424ff559fabSmrg    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4425ff559fabSmrg    ;;
4426ff559fabSmrg  freebsd* | kfreebsd*-gnu | dragonfly*)
4427ff559fabSmrg    # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
4428ff559fabSmrg    # conventions
4429ff559fabSmrg    _LT_AC_TAGVAR(ld_shlibs, $1)=yes
4430ff559fabSmrg    ;;
4431ff559fabSmrg  gnu*)
4432ff559fabSmrg    ;;
4433ff559fabSmrg  hpux9*)
4434ff559fabSmrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
4435ff559fabSmrg    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4436ff559fabSmrg    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4437ff559fabSmrg    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4438ff559fabSmrg    _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
4439ff559fabSmrg				# but as the default
4440ff559fabSmrg				# location of the library.
4441ff559fabSmrg
4442ff559fabSmrg    case $cc_basename in
4443ff559fabSmrg    CC*)
4444ff559fabSmrg      # FIXME: insert proper C++ library support
4445ff559fabSmrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
4446ff559fabSmrg      ;;
4447ff559fabSmrg    aCC*)
4448ff559fabSmrg      _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'
4449ff559fabSmrg      # Commands to make compiler produce verbose output that lists
4450ff559fabSmrg      # what "hidden" libraries, object files and flags are used when
4451ff559fabSmrg      # linking a shared library.
4452ff559fabSmrg      #
4453ff559fabSmrg      # There doesn't appear to be a way to prevent this compiler from
4454ff559fabSmrg      # explicitly linking system object files so we need to strip them
4455ff559fabSmrg      # from the output so that they don't get included in the library
4456ff559fabSmrg      # dependencies.
4457ff559fabSmrg      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'
4458ff559fabSmrg      ;;
4459ff559fabSmrg    *)
4460ff559fabSmrg      if test "$GXX" = yes; then
4461ff559fabSmrg        _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'
4462ff559fabSmrg      else
4463ff559fabSmrg        # FIXME: insert proper C++ library support
4464ff559fabSmrg        _LT_AC_TAGVAR(ld_shlibs, $1)=no
4465ff559fabSmrg      fi
4466ff559fabSmrg      ;;
4467ff559fabSmrg    esac
4468ff559fabSmrg    ;;
4469ff559fabSmrg  hpux10*|hpux11*)
4470ff559fabSmrg    if test $with_gnu_ld = no; then
4471ff559fabSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
4472ff559fabSmrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4473ff559fabSmrg
4474ff559fabSmrg      case $host_cpu in
4475ff559fabSmrg      hppa*64*|ia64*)
4476ff559fabSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
4477ff559fabSmrg        ;;
4478ff559fabSmrg      *)
4479ff559fabSmrg	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4480ff559fabSmrg        ;;
4481ff559fabSmrg      esac
4482ff559fabSmrg    fi
4483ff559fabSmrg    case $host_cpu in
4484ff559fabSmrg    hppa*64*|ia64*)
4485ff559fabSmrg      _LT_AC_TAGVAR(hardcode_direct, $1)=no
4486ff559fabSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4487ff559fabSmrg      ;;
4488ff559fabSmrg    *)
4489ff559fabSmrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4490ff559fabSmrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
4491ff559fabSmrg					      # but as the default
4492ff559fabSmrg					      # location of the library.
4493ff559fabSmrg      ;;
4494ff559fabSmrg    esac
4495ff559fabSmrg
4496ff559fabSmrg    case $cc_basename in
4497ff559fabSmrg      CC*)
4498ff559fabSmrg	# FIXME: insert proper C++ library support
4499ff559fabSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
4500ff559fabSmrg	;;
4501ff559fabSmrg      aCC*)
4502ff559fabSmrg	case $host_cpu in
4503ff559fabSmrg	hppa*64*)
4504ff559fabSmrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
4505ff559fabSmrg	  ;;
4506ff559fabSmrg	ia64*)
4507ff559fabSmrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
4508ff559fabSmrg	  ;;
4509ff559fabSmrg	*)
4510ff559fabSmrg	  _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'
4511ff559fabSmrg	  ;;
4512ff559fabSmrg	esac
4513ff559fabSmrg	# Commands to make compiler produce verbose output that lists
4514ff559fabSmrg	# what "hidden" libraries, object files and flags are used when
4515ff559fabSmrg	# linking a shared library.
4516ff559fabSmrg	#
4517ff559fabSmrg	# There doesn't appear to be a way to prevent this compiler from
4518ff559fabSmrg	# explicitly linking system object files so we need to strip them
4519ff559fabSmrg	# from the output so that they don't get included in the library
4520ff559fabSmrg	# dependencies.
4521ff559fabSmrg	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'
4522ff559fabSmrg	;;
4523ff559fabSmrg      *)
4524ff559fabSmrg	if test "$GXX" = yes; then
4525ff559fabSmrg	  if test $with_gnu_ld = no; then
4526ff559fabSmrg	    case $host_cpu in
4527ff559fabSmrg	    hppa*64*)
4528ff559fabSmrg	      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
4529ff559fabSmrg	      ;;
4530ff559fabSmrg	    ia64*)
4531ff559fabSmrg	      _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'
4532ff559fabSmrg	      ;;
4533ff559fabSmrg	    *)
4534ff559fabSmrg	      _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'
4535ff559fabSmrg	      ;;
4536ff559fabSmrg	    esac
4537ff559fabSmrg	  fi
4538ff559fabSmrg	else
4539ff559fabSmrg	  # FIXME: insert proper C++ library support
4540ff559fabSmrg	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
4541ff559fabSmrg	fi
4542ff559fabSmrg	;;
4543ff559fabSmrg    esac
4544ff559fabSmrg    ;;
4545ff559fabSmrg  interix3*)
4546ff559fabSmrg    _LT_AC_TAGVAR(hardcode_direct, $1)=no
4547ff559fabSmrg    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4548ff559fabSmrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4549ff559fabSmrg    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4550ff559fabSmrg    # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
4551ff559fabSmrg    # Instead, shared libraries are loaded at an image base (0x10000000 by
4552ff559fabSmrg    # default) and relocated if they conflict, which is a slow very memory
4553ff559fabSmrg    # consuming and fragmenting process.  To avoid this, we pick a random,
4554ff559fabSmrg    # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
4555ff559fabSmrg    # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
4556ff559fabSmrg    _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'
4557ff559fabSmrg    _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'
4558ff559fabSmrg    ;;
4559ff559fabSmrg  irix5* | irix6*)
4560ff559fabSmrg    case $cc_basename in
4561ff559fabSmrg      CC*)
4562ff559fabSmrg	# SGI C++
4563ff559fabSmrg	_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'
4564ff559fabSmrg
4565ff559fabSmrg	# Archives containing C++ object files must be created using
4566ff559fabSmrg	# "CC -ar", where "CC" is the IRIX C++ compiler.  This is
4567ff559fabSmrg	# necessary to make sure instantiated templates are included
4568ff559fabSmrg	# in the archive.
4569ff559fabSmrg	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
4570ff559fabSmrg	;;
4571ff559fabSmrg      *)
4572ff559fabSmrg	if test "$GXX" = yes; then
4573ff559fabSmrg	  if test "$with_gnu_ld" = no; then
4574ff559fabSmrg	    _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'
4575ff559fabSmrg	  else
4576ff559fabSmrg	    _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'
4577ff559fabSmrg	  fi
4578ff559fabSmrg	fi
4579ff559fabSmrg	_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4580ff559fabSmrg	;;
4581ff559fabSmrg    esac
4582ff559fabSmrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4583ff559fabSmrg    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4584ff559fabSmrg    ;;
4585ff559fabSmrg  linux*)
4586ff559fabSmrg    case $cc_basename in
4587ff559fabSmrg      KCC*)
4588ff559fabSmrg	# Kuck and Associates, Inc. (KAI) C++ Compiler
4589ff559fabSmrg
4590ff559fabSmrg	# KCC will only create a shared library if the output file
4591ff559fabSmrg	# ends with ".so" (or ".sl" for HP-UX), so rename the library
4592ff559fabSmrg	# to its proper name (with version) after linking.
4593ff559fabSmrg	_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'
4594ff559fabSmrg	_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'
4595ff559fabSmrg	# Commands to make compiler produce verbose output that lists
4596ff559fabSmrg	# what "hidden" libraries, object files and flags are used when
4597ff559fabSmrg	# linking a shared library.
4598ff559fabSmrg	#
4599ff559fabSmrg	# There doesn't appear to be a way to prevent this compiler from
4600ff559fabSmrg	# explicitly linking system object files so we need to strip them
4601ff559fabSmrg	# from the output so that they don't get included in the library
4602ff559fabSmrg	# dependencies.
4603ff559fabSmrg	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'
4604ff559fabSmrg
4605ff559fabSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
4606ff559fabSmrg	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4607ff559fabSmrg
4608ff559fabSmrg	# Archives containing C++ object files must be created using
4609ff559fabSmrg	# "CC -Bstatic", where "CC" is the KAI C++ compiler.
4610ff559fabSmrg	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
4611ff559fabSmrg	;;
4612ff559fabSmrg      icpc*)
4613ff559fabSmrg	# Intel C++
4614ff559fabSmrg	with_gnu_ld=yes
4615ff559fabSmrg	# version 8.0 and above of icpc choke on multiply defined symbols
4616ff559fabSmrg	# if we add $predep_objects and $postdep_objects, however 7.1 and
4617ff559fabSmrg	# earlier do not add the objects themselves.
4618ff559fabSmrg	case `$CC -V 2>&1` in
4619ff559fabSmrg	*"Version 7."*)
4620ff559fabSmrg  	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
4621ff559fabSmrg  	  _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'
4622ff559fabSmrg	  ;;
4623ff559fabSmrg	*)  # Version 8.0 or newer
4624ff559fabSmrg	  tmp_idyn=
4625ff559fabSmrg	  case $host_cpu in
4626ff559fabSmrg	    ia64*) tmp_idyn=' -i_dynamic';;
4627ff559fabSmrg	  esac
4628ff559fabSmrg  	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4629ff559fabSmrg	  _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'
4630ff559fabSmrg	  ;;
4631ff559fabSmrg	esac
4632ff559fabSmrg	_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4633ff559fabSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4634ff559fabSmrg	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4635ff559fabSmrg	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
4636ff559fabSmrg	;;
4637ff559fabSmrg      pgCC*)
4638ff559fabSmrg        # Portland Group C++ compiler
4639ff559fabSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
4640ff559fabSmrg  	_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'
4641ff559fabSmrg
4642ff559fabSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
4643ff559fabSmrg	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4644ff559fabSmrg	_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'
4645ff559fabSmrg        ;;
4646ff559fabSmrg      cxx*)
4647ff559fabSmrg	# Compaq C++
4648ff559fabSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
4649ff559fabSmrg	_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'
4650ff559fabSmrg
4651ff559fabSmrg	runpath_var=LD_RUN_PATH
4652ff559fabSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
4653ff559fabSmrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4654ff559fabSmrg
4655ff559fabSmrg	# Commands to make compiler produce verbose output that lists
4656ff559fabSmrg	# what "hidden" libraries, object files and flags are used when
4657ff559fabSmrg	# linking a shared library.
4658ff559fabSmrg	#
4659ff559fabSmrg	# There doesn't appear to be a way to prevent this compiler from
4660ff559fabSmrg	# explicitly linking system object files so we need to strip them
4661ff559fabSmrg	# from the output so that they don't get included in the library
4662ff559fabSmrg	# dependencies.
4663ff559fabSmrg	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'
4664ff559fabSmrg	;;
4665ff559fabSmrg    esac
4666ff559fabSmrg    ;;
4667ff559fabSmrg  lynxos*)
4668ff559fabSmrg    # FIXME: insert proper C++ library support
4669ff559fabSmrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
4670ff559fabSmrg    ;;
4671ff559fabSmrg  m88k*)
4672ff559fabSmrg    # FIXME: insert proper C++ library support
4673ff559fabSmrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
4674ff559fabSmrg    ;;
4675ff559fabSmrg  mvs*)
4676ff559fabSmrg    case $cc_basename in
4677ff559fabSmrg      cxx*)
4678ff559fabSmrg	# FIXME: insert proper C++ library support
4679ff559fabSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
4680ff559fabSmrg	;;
4681ff559fabSmrg      *)
4682ff559fabSmrg	# FIXME: insert proper C++ library support
4683ff559fabSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
4684ff559fabSmrg	;;
4685ff559fabSmrg    esac
4686ff559fabSmrg    ;;
4687ff559fabSmrg  netbsd*)
4688ff559fabSmrg    if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
4689ff559fabSmrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
4690ff559fabSmrg      wlarc=
4691ff559fabSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4692ff559fabSmrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4693ff559fabSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4694ff559fabSmrg    fi
4695ff559fabSmrg    # Workaround some broken pre-1.5 toolchains
4696ff559fabSmrg    output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
4697ff559fabSmrg    ;;
4698ff559fabSmrg  openbsd2*)
4699ff559fabSmrg    # C++ shared libraries are fairly broken
4700ff559fabSmrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
4701ff559fabSmrg    ;;
4702ff559fabSmrg  openbsd*)
4703ff559fabSmrg    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4704ff559fabSmrg    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4705ff559fabSmrg    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
4706ff559fabSmrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4707ff559fabSmrg    if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
4708ff559fabSmrg      _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'
4709ff559fabSmrg      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4710ff559fabSmrg      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
4711ff559fabSmrg    fi
4712ff559fabSmrg    output_verbose_link_cmd='echo'
4713ff559fabSmrg    ;;
4714ff559fabSmrg  osf3*)
4715ff559fabSmrg    case $cc_basename in
4716ff559fabSmrg      KCC*)
4717ff559fabSmrg	# Kuck and Associates, Inc. (KAI) C++ Compiler
4718ff559fabSmrg
4719ff559fabSmrg	# KCC will only create a shared library if the output file
4720ff559fabSmrg	# ends with ".so" (or ".sl" for HP-UX), so rename the library
4721ff559fabSmrg	# to its proper name (with version) after linking.
4722ff559fabSmrg	_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'
4723ff559fabSmrg
4724ff559fabSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4725ff559fabSmrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4726ff559fabSmrg
4727ff559fabSmrg	# Archives containing C++ object files must be created using
4728ff559fabSmrg	# "CC -Bstatic", where "CC" is the KAI C++ compiler.
4729ff559fabSmrg	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
4730ff559fabSmrg
4731ff559fabSmrg	;;
4732ff559fabSmrg      RCC*)
4733ff559fabSmrg	# Rational C++ 2.4.1
4734ff559fabSmrg	# FIXME: insert proper C++ library support
4735ff559fabSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
4736ff559fabSmrg	;;
4737ff559fabSmrg      cxx*)
4738ff559fabSmrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4739ff559fabSmrg	_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'
4740ff559fabSmrg
4741ff559fabSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4742ff559fabSmrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4743ff559fabSmrg
4744ff559fabSmrg	# Commands to make compiler produce verbose output that lists
4745ff559fabSmrg	# what "hidden" libraries, object files and flags are used when
4746ff559fabSmrg	# linking a shared library.
4747ff559fabSmrg	#
4748ff559fabSmrg	# There doesn't appear to be a way to prevent this compiler from
4749ff559fabSmrg	# explicitly linking system object files so we need to strip them
4750ff559fabSmrg	# from the output so that they don't get included in the library
4751ff559fabSmrg	# dependencies.
4752ff559fabSmrg	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'
4753ff559fabSmrg	;;
4754ff559fabSmrg      *)
4755ff559fabSmrg	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
4756ff559fabSmrg	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4757ff559fabSmrg	  _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'
4758ff559fabSmrg
4759ff559fabSmrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4760ff559fabSmrg	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4761ff559fabSmrg
4762ff559fabSmrg	  # Commands to make compiler produce verbose output that lists
4763ff559fabSmrg	  # what "hidden" libraries, object files and flags are used when
4764ff559fabSmrg	  # linking a shared library.
4765ff559fabSmrg	  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
4766ff559fabSmrg
4767ff559fabSmrg	else
4768ff559fabSmrg	  # FIXME: insert proper C++ library support
4769ff559fabSmrg	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
4770ff559fabSmrg	fi
4771ff559fabSmrg	;;
4772ff559fabSmrg    esac
4773ff559fabSmrg    ;;
4774ff559fabSmrg  osf4* | osf5*)
4775ff559fabSmrg    case $cc_basename in
4776ff559fabSmrg      KCC*)
4777ff559fabSmrg	# Kuck and Associates, Inc. (KAI) C++ Compiler
4778ff559fabSmrg
4779ff559fabSmrg	# KCC will only create a shared library if the output file
4780ff559fabSmrg	# ends with ".so" (or ".sl" for HP-UX), so rename the library
4781ff559fabSmrg	# to its proper name (with version) after linking.
4782ff559fabSmrg	_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'
4783ff559fabSmrg
4784ff559fabSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4785ff559fabSmrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4786ff559fabSmrg
4787ff559fabSmrg	# Archives containing C++ object files must be created using
4788ff559fabSmrg	# the KAI C++ compiler.
4789ff559fabSmrg	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
4790ff559fabSmrg	;;
4791ff559fabSmrg      RCC*)
4792ff559fabSmrg	# Rational C++ 2.4.1
4793ff559fabSmrg	# FIXME: insert proper C++ library support
4794ff559fabSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
4795ff559fabSmrg	;;
4796ff559fabSmrg      cxx*)
4797ff559fabSmrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
4798ff559fabSmrg	_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'
4799ff559fabSmrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
4800ff559fabSmrg	  echo "-hidden">> $lib.exp~
4801ff559fabSmrg	  $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~
4802ff559fabSmrg	  $rm $lib.exp'
4803ff559fabSmrg
4804ff559fabSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
4805ff559fabSmrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4806ff559fabSmrg
4807ff559fabSmrg	# Commands to make compiler produce verbose output that lists
4808ff559fabSmrg	# what "hidden" libraries, object files and flags are used when
4809ff559fabSmrg	# linking a shared library.
4810ff559fabSmrg	#
4811ff559fabSmrg	# There doesn't appear to be a way to prevent this compiler from
4812ff559fabSmrg	# explicitly linking system object files so we need to strip them
4813ff559fabSmrg	# from the output so that they don't get included in the library
4814ff559fabSmrg	# dependencies.
4815ff559fabSmrg	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'
4816ff559fabSmrg	;;
4817ff559fabSmrg      *)
4818ff559fabSmrg	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
4819ff559fabSmrg	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4820ff559fabSmrg	 _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'
4821ff559fabSmrg
4822ff559fabSmrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4823ff559fabSmrg	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4824ff559fabSmrg
4825ff559fabSmrg	  # Commands to make compiler produce verbose output that lists
4826ff559fabSmrg	  # what "hidden" libraries, object files and flags are used when
4827ff559fabSmrg	  # linking a shared library.
4828ff559fabSmrg	  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
4829ff559fabSmrg
4830ff559fabSmrg	else
4831ff559fabSmrg	  # FIXME: insert proper C++ library support
4832ff559fabSmrg	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
4833ff559fabSmrg	fi
4834ff559fabSmrg	;;
4835ff559fabSmrg    esac
4836ff559fabSmrg    ;;
4837ff559fabSmrg  psos*)
4838ff559fabSmrg    # FIXME: insert proper C++ library support
4839ff559fabSmrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
4840ff559fabSmrg    ;;
4841ff559fabSmrg  sunos4*)
4842ff559fabSmrg    case $cc_basename in
4843ff559fabSmrg      CC*)
4844ff559fabSmrg	# Sun C++ 4.x
4845ff559fabSmrg	# FIXME: insert proper C++ library support
4846ff559fabSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
4847ff559fabSmrg	;;
4848ff559fabSmrg      lcc*)
4849ff559fabSmrg	# Lucid
4850ff559fabSmrg	# FIXME: insert proper C++ library support
4851ff559fabSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
4852ff559fabSmrg	;;
4853ff559fabSmrg      *)
4854ff559fabSmrg	# FIXME: insert proper C++ library support
4855ff559fabSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
4856ff559fabSmrg	;;
4857ff559fabSmrg    esac
4858ff559fabSmrg    ;;
4859ff559fabSmrg  solaris*)
4860ff559fabSmrg    case $cc_basename in
4861ff559fabSmrg      CC*)
4862ff559fabSmrg	# Sun C++ 4.2, 5.x and Centerline C++
4863ff559fabSmrg        _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes
4864ff559fabSmrg	_LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
4865ff559fabSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
4866ff559fabSmrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
4867ff559fabSmrg	$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'
4868ff559fabSmrg
4869ff559fabSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4870ff559fabSmrg	_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4871ff559fabSmrg	case $host_os in
4872ff559fabSmrg	  solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
4873ff559fabSmrg	  *)
4874ff559fabSmrg	    # The C++ compiler is used as linker so we must use $wl
4875ff559fabSmrg	    # flag to pass the commands to the underlying system
4876ff559fabSmrg	    # linker. We must also pass each convience library through
4877ff559fabSmrg	    # to the system linker between allextract/defaultextract.
4878ff559fabSmrg	    # The C++ compiler will combine linker options so we
4879ff559fabSmrg	    # cannot just pass the convience library names through
4880ff559fabSmrg	    # without $wl.
4881ff559fabSmrg	    # Supported since Solaris 2.6 (maybe 2.5.1?)
4882ff559fabSmrg	    _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'
4883ff559fabSmrg	    ;;
4884ff559fabSmrg	esac
4885ff559fabSmrg	_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4886ff559fabSmrg
4887ff559fabSmrg	output_verbose_link_cmd='echo'
4888ff559fabSmrg
4889ff559fabSmrg	# Archives containing C++ object files must be created using
4890ff559fabSmrg	# "CC -xar", where "CC" is the Sun C++ compiler.  This is
4891ff559fabSmrg	# necessary to make sure instantiated templates are included
4892ff559fabSmrg	# in the archive.
4893ff559fabSmrg	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
4894ff559fabSmrg	;;
4895ff559fabSmrg      gcx*)
4896ff559fabSmrg	# Green Hills C++ Compiler
4897ff559fabSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
4898ff559fabSmrg
4899ff559fabSmrg	# The C++ compiler must be used to create the archive.
4900ff559fabSmrg	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
4901ff559fabSmrg	;;
4902ff559fabSmrg      *)
4903ff559fabSmrg	# GNU C++ compiler with Solaris linker
4904ff559fabSmrg	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
4905ff559fabSmrg	  _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
4906ff559fabSmrg	  if $CC --version | grep -v '^2\.7' > /dev/null; then
4907ff559fabSmrg	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
4908ff559fabSmrg	    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
4909ff559fabSmrg		$CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
4910ff559fabSmrg
4911ff559fabSmrg	    # Commands to make compiler produce verbose output that lists
4912ff559fabSmrg	    # what "hidden" libraries, object files and flags are used when
4913ff559fabSmrg	    # linking a shared library.
4914ff559fabSmrg	    output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
4915ff559fabSmrg	  else
4916ff559fabSmrg	    # g++ 2.7 appears to require `-G' NOT `-shared' on this
4917ff559fabSmrg	    # platform.
4918ff559fabSmrg	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
4919ff559fabSmrg	    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
4920ff559fabSmrg		$CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
4921ff559fabSmrg
4922ff559fabSmrg	    # Commands to make compiler produce verbose output that lists
4923ff559fabSmrg	    # what "hidden" libraries, object files and flags are used when
4924ff559fabSmrg	    # linking a shared library.
4925ff559fabSmrg	    output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
4926ff559fabSmrg	  fi
4927ff559fabSmrg
4928ff559fabSmrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
4929ff559fabSmrg	fi
4930ff559fabSmrg	;;
4931ff559fabSmrg    esac
4932ff559fabSmrg    ;;
4933ff559fabSmrg  sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
4934ff559fabSmrg    _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
4935ff559fabSmrg    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4936ff559fabSmrg    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4937ff559fabSmrg    runpath_var='LD_RUN_PATH'
4938ff559fabSmrg
4939ff559fabSmrg    case $cc_basename in
4940ff559fabSmrg      CC*)
4941ff559fabSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
4942ff559fabSmrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
4943ff559fabSmrg	;;
4944ff559fabSmrg      *)
4945ff559fabSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
4946ff559fabSmrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
4947ff559fabSmrg	;;
4948ff559fabSmrg    esac
4949ff559fabSmrg    ;;
4950ff559fabSmrg  sysv5* | sco3.2v5* | sco5v6*)
4951ff559fabSmrg    # Note: We can NOT use -z defs as we might desire, because we do not
4952ff559fabSmrg    # link with -lc, and that would cause any symbols used from libc to
4953ff559fabSmrg    # always be unresolved, which means just about no library would
4954ff559fabSmrg    # ever link correctly.  If we're not using GNU ld we use -z text
4955ff559fabSmrg    # though, which does catch some bad symbols but isn't as heavy-handed
4956ff559fabSmrg    # as -z defs.
4957ff559fabSmrg    # For security reasons, it is highly recommended that you always
4958ff559fabSmrg    # use absolute paths for naming shared libraries, and exclude the
4959ff559fabSmrg    # DT_RUNPATH tag from executables and libraries.  But doing so
4960ff559fabSmrg    # requires that you compile everything twice, which is a pain.
4961ff559fabSmrg    # So that behaviour is only enabled if SCOABSPATH is set to a
4962ff559fabSmrg    # non-empty value in the environment.  Most likely only useful for
4963ff559fabSmrg    # creating official distributions of packages.
4964ff559fabSmrg    # This is a hack until libtool officially supports absolute path
4965ff559fabSmrg    # names for shared libraries.
4966ff559fabSmrg    _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
4967ff559fabSmrg    _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
4968ff559fabSmrg    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4969ff559fabSmrg    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4970ff559fabSmrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
4971ff559fabSmrg    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
4972ff559fabSmrg    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4973ff559fabSmrg    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
4974ff559fabSmrg    runpath_var='LD_RUN_PATH'
4975ff559fabSmrg
4976ff559fabSmrg    case $cc_basename in
4977ff559fabSmrg      CC*)
4978ff559fabSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
4979ff559fabSmrg	_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'
4980ff559fabSmrg	;;
4981ff559fabSmrg      *)
4982ff559fabSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
4983ff559fabSmrg	_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'
4984ff559fabSmrg	;;
4985ff559fabSmrg    esac
4986ff559fabSmrg    ;;
4987ff559fabSmrg  tandem*)
4988ff559fabSmrg    case $cc_basename in
4989ff559fabSmrg      NCC*)
4990ff559fabSmrg	# NonStop-UX NCC 3.20
4991ff559fabSmrg	# FIXME: insert proper C++ library support
4992ff559fabSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
4993ff559fabSmrg	;;
4994ff559fabSmrg      *)
4995ff559fabSmrg	# FIXME: insert proper C++ library support
4996ff559fabSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
4997ff559fabSmrg	;;
4998ff559fabSmrg    esac
4999ff559fabSmrg    ;;
5000ff559fabSmrg  vxworks*)
5001ff559fabSmrg    # FIXME: insert proper C++ library support
5002ff559fabSmrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
5003ff559fabSmrg    ;;
5004ff559fabSmrg  *)
5005ff559fabSmrg    # FIXME: insert proper C++ library support
5006ff559fabSmrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
5007ff559fabSmrg    ;;
5008ff559fabSmrgesac
5009ff559fabSmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
5010ff559fabSmrgtest "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
5011ff559fabSmrg
5012ff559fabSmrg_LT_AC_TAGVAR(GCC, $1)="$GXX"
5013ff559fabSmrg_LT_AC_TAGVAR(LD, $1)="$LD"
5014ff559fabSmrg
5015ff559fabSmrgAC_LIBTOOL_POSTDEP_PREDEP($1)
5016ff559fabSmrgAC_LIBTOOL_PROG_COMPILER_PIC($1)
5017ff559fabSmrgAC_LIBTOOL_PROG_CC_C_O($1)
5018ff559fabSmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
5019ff559fabSmrgAC_LIBTOOL_PROG_LD_SHLIBS($1)
5020ff559fabSmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
5021ff559fabSmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
5022ff559fabSmrg
5023ff559fabSmrgAC_LIBTOOL_CONFIG($1)
5024ff559fabSmrg
5025ff559fabSmrgAC_LANG_POP
5026ff559fabSmrgCC=$lt_save_CC
5027ff559fabSmrgLDCXX=$LD
5028ff559fabSmrgLD=$lt_save_LD
5029ff559fabSmrgGCC=$lt_save_GCC
5030ff559fabSmrgwith_gnu_ldcxx=$with_gnu_ld
5031ff559fabSmrgwith_gnu_ld=$lt_save_with_gnu_ld
5032ff559fabSmrglt_cv_path_LDCXX=$lt_cv_path_LD
5033ff559fabSmrglt_cv_path_LD=$lt_save_path_LD
5034ff559fabSmrglt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
5035ff559fabSmrglt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
5036ff559fabSmrg])# AC_LIBTOOL_LANG_CXX_CONFIG
5037ff559fabSmrg
5038ff559fabSmrg# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
5039ff559fabSmrg# ------------------------------------
5040ff559fabSmrg# Figure out "hidden" library dependencies from verbose
5041ff559fabSmrg# compiler output when linking a shared library.
5042ff559fabSmrg# Parse the compiler output and extract the necessary
5043ff559fabSmrg# objects, libraries and library flags.
5044ff559fabSmrgAC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[
5045ff559fabSmrgdnl we can't use the lt_simple_compile_test_code here,
5046ff559fabSmrgdnl because it contains code intended for an executable,
5047ff559fabSmrgdnl not a library.  It's possible we should let each
5048ff559fabSmrgdnl tag define a new lt_????_link_test_code variable,
5049ff559fabSmrgdnl but it's only used here...
5050ff559fabSmrgifelse([$1],[],[cat > conftest.$ac_ext <<EOF
5051ff559fabSmrgint a;
5052ff559fabSmrgvoid foo (void) { a = 0; }
5053ff559fabSmrgEOF
5054ff559fabSmrg],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
5055ff559fabSmrgclass Foo
5056ff559fabSmrg{
5057ff559fabSmrgpublic:
5058ff559fabSmrg  Foo (void) { a = 0; }
5059ff559fabSmrgprivate:
5060ff559fabSmrg  int a;
5061ff559fabSmrg};
5062ff559fabSmrgEOF
5063ff559fabSmrg],[$1],[F77],[cat > conftest.$ac_ext <<EOF
5064ff559fabSmrg      subroutine foo
5065ff559fabSmrg      implicit none
5066ff559fabSmrg      integer*4 a
5067ff559fabSmrg      a=0
5068ff559fabSmrg      return
5069ff559fabSmrg      end
5070ff559fabSmrgEOF
5071ff559fabSmrg],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
5072ff559fabSmrgpublic class foo {
5073ff559fabSmrg  private int a;
5074ff559fabSmrg  public void bar (void) {
5075ff559fabSmrg    a = 0;
5076ff559fabSmrg  }
5077ff559fabSmrg};
5078ff559fabSmrgEOF
5079ff559fabSmrg])
5080ff559fabSmrgdnl Parse the compiler output and extract the necessary
5081ff559fabSmrgdnl objects, libraries and library flags.
5082ff559fabSmrgif AC_TRY_EVAL(ac_compile); then
5083ff559fabSmrg  # Parse the compiler output and extract the necessary
5084ff559fabSmrg  # objects, libraries and library flags.
5085ff559fabSmrg
5086ff559fabSmrg  # Sentinel used to keep track of whether or not we are before
5087ff559fabSmrg  # the conftest object file.
5088ff559fabSmrg  pre_test_object_deps_done=no
5089ff559fabSmrg
5090ff559fabSmrg  # The `*' in the case matches for architectures that use `case' in
5091ff559fabSmrg  # $output_verbose_cmd can trigger glob expansion during the loop
5092ff559fabSmrg  # eval without this substitution.
5093ff559fabSmrg  output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"`
5094ff559fabSmrg
5095ff559fabSmrg  for p in `eval $output_verbose_link_cmd`; do
5096ff559fabSmrg    case $p in
5097ff559fabSmrg
5098ff559fabSmrg    -L* | -R* | -l*)
5099ff559fabSmrg       # Some compilers place space between "-{L,R}" and the path.
5100ff559fabSmrg       # Remove the space.
5101ff559fabSmrg       if test $p = "-L" \
5102ff559fabSmrg	  || test $p = "-R"; then
5103ff559fabSmrg	 prev=$p
5104ff559fabSmrg	 continue
5105ff559fabSmrg       else
5106ff559fabSmrg	 prev=
5107ff559fabSmrg       fi
5108ff559fabSmrg
5109ff559fabSmrg       if test "$pre_test_object_deps_done" = no; then
5110ff559fabSmrg	 case $p in
5111ff559fabSmrg	 -L* | -R*)
5112ff559fabSmrg	   # Internal compiler library paths should come after those
5113ff559fabSmrg	   # provided the user.  The postdeps already come after the
5114ff559fabSmrg	   # user supplied libs so there is no need to process them.
5115ff559fabSmrg	   if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
5116ff559fabSmrg	     _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
5117ff559fabSmrg	   else
5118ff559fabSmrg	     _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
5119ff559fabSmrg	   fi
5120ff559fabSmrg	   ;;
5121ff559fabSmrg	 # The "-l" case would never come before the object being
5122ff559fabSmrg	 # linked, so don't bother handling this case.
5123ff559fabSmrg	 esac
5124ff559fabSmrg       else
5125ff559fabSmrg	 if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
5126ff559fabSmrg	   _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
5127ff559fabSmrg	 else
5128ff559fabSmrg	   _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
5129ff559fabSmrg	 fi
5130ff559fabSmrg       fi
5131ff559fabSmrg       ;;
5132ff559fabSmrg
5133ff559fabSmrg    *.$objext)
5134ff559fabSmrg       # This assumes that the test object file only shows up
5135ff559fabSmrg       # once in the compiler output.
5136ff559fabSmrg       if test "$p" = "conftest.$objext"; then
5137ff559fabSmrg	 pre_test_object_deps_done=yes
5138ff559fabSmrg	 continue
5139ff559fabSmrg       fi
5140ff559fabSmrg
5141ff559fabSmrg       if test "$pre_test_object_deps_done" = no; then
5142ff559fabSmrg	 if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
5143ff559fabSmrg	   _LT_AC_TAGVAR(predep_objects, $1)="$p"
5144ff559fabSmrg	 else
5145ff559fabSmrg	   _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
5146ff559fabSmrg	 fi
5147ff559fabSmrg       else
5148ff559fabSmrg	 if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
5149ff559fabSmrg	   _LT_AC_TAGVAR(postdep_objects, $1)="$p"
5150ff559fabSmrg	 else
5151ff559fabSmrg	   _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
5152ff559fabSmrg	 fi
5153ff559fabSmrg       fi
5154ff559fabSmrg       ;;
5155ff559fabSmrg
5156ff559fabSmrg    *) ;; # Ignore the rest.
5157ff559fabSmrg
5158ff559fabSmrg    esac
5159ff559fabSmrg  done
5160ff559fabSmrg
5161ff559fabSmrg  # Clean up.
5162ff559fabSmrg  rm -f a.out a.exe
5163ff559fabSmrgelse
5164ff559fabSmrg  echo "libtool.m4: error: problem compiling $1 test program"
5165ff559fabSmrgfi
5166ff559fabSmrg
5167ff559fabSmrg$rm -f confest.$objext
5168ff559fabSmrg
5169ff559fabSmrg# PORTME: override above test on systems where it is broken
5170ff559fabSmrgifelse([$1],[CXX],
5171ff559fabSmrg[case $host_os in
5172ff559fabSmrginterix3*)
5173ff559fabSmrg  # Interix 3.5 installs completely hosed .la files for C++, so rather than
5174ff559fabSmrg  # hack all around it, let's just trust "g++" to DTRT.
5175ff559fabSmrg  _LT_AC_TAGVAR(predep_objects,$1)=
5176ff559fabSmrg  _LT_AC_TAGVAR(postdep_objects,$1)=
5177ff559fabSmrg  _LT_AC_TAGVAR(postdeps,$1)=
5178ff559fabSmrg  ;;
5179ff559fabSmrg
5180ff559fabSmrgsolaris*)
5181ff559fabSmrg  case $cc_basename in
5182ff559fabSmrg  CC*)
5183ff559fabSmrg    # Adding this requires a known-good setup of shared libraries for
5184ff559fabSmrg    # Sun compiler versions before 5.6, else PIC objects from an old
5185ff559fabSmrg    # archive will be linked into the output, leading to subtle bugs.
5186ff559fabSmrg    _LT_AC_TAGVAR(postdeps,$1)='-lCstd -lCrun'
5187ff559fabSmrg    ;;
5188ff559fabSmrg  esac
5189ff559fabSmrg  ;;
5190ff559fabSmrgesac
5191ff559fabSmrg])
5192ff559fabSmrg
5193ff559fabSmrgcase " $_LT_AC_TAGVAR(postdeps, $1) " in
5194ff559fabSmrg*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
5195ff559fabSmrgesac
5196ff559fabSmrg])# AC_LIBTOOL_POSTDEP_PREDEP
5197ff559fabSmrg
5198ff559fabSmrg# AC_LIBTOOL_LANG_F77_CONFIG
5199ff559fabSmrg# --------------------------
5200ff559fabSmrg# Ensure that the configuration vars for the C compiler are
5201ff559fabSmrg# suitably defined.  Those variables are subsequently used by
5202ff559fabSmrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
5203ff559fabSmrgAC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
5204ff559fabSmrgAC_DEFUN([_LT_AC_LANG_F77_CONFIG],
5205ff559fabSmrg[AC_REQUIRE([AC_PROG_F77])
5206ff559fabSmrgAC_LANG_PUSH(Fortran 77)
5207ff559fabSmrg
5208ff559fabSmrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
5209ff559fabSmrg_LT_AC_TAGVAR(allow_undefined_flag, $1)=
5210ff559fabSmrg_LT_AC_TAGVAR(always_export_symbols, $1)=no
5211ff559fabSmrg_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
5212ff559fabSmrg_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
5213ff559fabSmrg_LT_AC_TAGVAR(hardcode_direct, $1)=no
5214ff559fabSmrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
5215ff559fabSmrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
5216ff559fabSmrg_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
5217ff559fabSmrg_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
5218ff559fabSmrg_LT_AC_TAGVAR(hardcode_automatic, $1)=no
5219ff559fabSmrg_LT_AC_TAGVAR(module_cmds, $1)=
5220ff559fabSmrg_LT_AC_TAGVAR(module_expsym_cmds, $1)=
5221ff559fabSmrg_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
5222ff559fabSmrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
5223ff559fabSmrg_LT_AC_TAGVAR(no_undefined_flag, $1)=
5224ff559fabSmrg_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5225ff559fabSmrg_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5226ff559fabSmrg
5227ff559fabSmrg# Source file extension for f77 test sources.
5228ff559fabSmrgac_ext=f
5229ff559fabSmrg
5230ff559fabSmrg# Object file extension for compiled f77 test sources.
5231ff559fabSmrgobjext=o
5232ff559fabSmrg_LT_AC_TAGVAR(objext, $1)=$objext
5233ff559fabSmrg
5234ff559fabSmrg# Code to be used in simple compile tests
5235ff559fabSmrglt_simple_compile_test_code="      subroutine t\n      return\n      end\n"
5236ff559fabSmrg
5237ff559fabSmrg# Code to be used in simple link tests
5238ff559fabSmrglt_simple_link_test_code="      program t\n      end\n"
5239ff559fabSmrg
5240ff559fabSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
5241ff559fabSmrg_LT_AC_SYS_COMPILER
5242ff559fabSmrg
5243ff559fabSmrg# save warnings/boilerplate of simple test code
5244ff559fabSmrg_LT_COMPILER_BOILERPLATE
5245ff559fabSmrg_LT_LINKER_BOILERPLATE
5246ff559fabSmrg
5247ff559fabSmrg# Allow CC to be a program name with arguments.
5248ff559fabSmrglt_save_CC="$CC"
5249ff559fabSmrgCC=${F77-"f77"}
5250ff559fabSmrgcompiler=$CC
5251ff559fabSmrg_LT_AC_TAGVAR(compiler, $1)=$CC
5252ff559fabSmrg_LT_CC_BASENAME([$compiler])
5253ff559fabSmrg
5254ff559fabSmrgAC_MSG_CHECKING([if libtool supports shared libraries])
5255ff559fabSmrgAC_MSG_RESULT([$can_build_shared])
5256ff559fabSmrg
5257ff559fabSmrgAC_MSG_CHECKING([whether to build shared libraries])
5258ff559fabSmrgtest "$can_build_shared" = "no" && enable_shared=no
5259ff559fabSmrg
5260ff559fabSmrg# On AIX, shared libraries and static libraries use the same namespace, and
5261ff559fabSmrg# are all built from PIC.
5262ff559fabSmrgcase $host_os in
5263ff559fabSmrgaix3*)
5264ff559fabSmrg  test "$enable_shared" = yes && enable_static=no
5265ff559fabSmrg  if test -n "$RANLIB"; then
5266ff559fabSmrg    archive_cmds="$archive_cmds~\$RANLIB \$lib"
5267ff559fabSmrg    postinstall_cmds='$RANLIB $lib'
5268ff559fabSmrg  fi
5269ff559fabSmrg  ;;
5270ff559fabSmrgaix4* | aix5*)
5271ff559fabSmrg  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
5272ff559fabSmrg    test "$enable_shared" = yes && enable_static=no
5273ff559fabSmrg  fi
5274ff559fabSmrg  ;;
5275ff559fabSmrgesac
5276ff559fabSmrgAC_MSG_RESULT([$enable_shared])
5277ff559fabSmrg
5278ff559fabSmrgAC_MSG_CHECKING([whether to build static libraries])
5279ff559fabSmrg# Make sure either enable_shared or enable_static is yes.
5280ff559fabSmrgtest "$enable_shared" = yes || enable_static=yes
5281ff559fabSmrgAC_MSG_RESULT([$enable_static])
5282ff559fabSmrg
5283ff559fabSmrg_LT_AC_TAGVAR(GCC, $1)="$G77"
5284ff559fabSmrg_LT_AC_TAGVAR(LD, $1)="$LD"
5285ff559fabSmrg
5286ff559fabSmrgAC_LIBTOOL_PROG_COMPILER_PIC($1)
5287ff559fabSmrgAC_LIBTOOL_PROG_CC_C_O($1)
5288ff559fabSmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
5289ff559fabSmrgAC_LIBTOOL_PROG_LD_SHLIBS($1)
5290ff559fabSmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
5291ff559fabSmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
5292ff559fabSmrg
5293ff559fabSmrgAC_LIBTOOL_CONFIG($1)
5294ff559fabSmrg
5295ff559fabSmrgAC_LANG_POP
5296ff559fabSmrgCC="$lt_save_CC"
5297ff559fabSmrg])# AC_LIBTOOL_LANG_F77_CONFIG
5298ff559fabSmrg
5299ff559fabSmrg
5300ff559fabSmrg# AC_LIBTOOL_LANG_GCJ_CONFIG
5301ff559fabSmrg# --------------------------
5302ff559fabSmrg# Ensure that the configuration vars for the C compiler are
5303ff559fabSmrg# suitably defined.  Those variables are subsequently used by
5304ff559fabSmrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
5305ff559fabSmrgAC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
5306ff559fabSmrgAC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
5307ff559fabSmrg[AC_LANG_SAVE
5308ff559fabSmrg
5309ff559fabSmrg# Source file extension for Java test sources.
5310ff559fabSmrgac_ext=java
5311ff559fabSmrg
5312ff559fabSmrg# Object file extension for compiled Java test sources.
5313ff559fabSmrgobjext=o
5314ff559fabSmrg_LT_AC_TAGVAR(objext, $1)=$objext
5315ff559fabSmrg
5316ff559fabSmrg# Code to be used in simple compile tests
5317ff559fabSmrglt_simple_compile_test_code="class foo {}\n"
5318ff559fabSmrg
5319ff559fabSmrg# Code to be used in simple link tests
5320ff559fabSmrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }\n'
5321ff559fabSmrg
5322ff559fabSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
5323ff559fabSmrg_LT_AC_SYS_COMPILER
5324ff559fabSmrg
5325ff559fabSmrg# save warnings/boilerplate of simple test code
5326ff559fabSmrg_LT_COMPILER_BOILERPLATE
5327ff559fabSmrg_LT_LINKER_BOILERPLATE
5328ff559fabSmrg
5329ff559fabSmrg# Allow CC to be a program name with arguments.
5330ff559fabSmrglt_save_CC="$CC"
5331ff559fabSmrgCC=${GCJ-"gcj"}
5332ff559fabSmrgcompiler=$CC
5333ff559fabSmrg_LT_AC_TAGVAR(compiler, $1)=$CC
5334ff559fabSmrg_LT_CC_BASENAME([$compiler])
5335ff559fabSmrg
5336ff559fabSmrg# GCJ did not exist at the time GCC didn't implicitly link libc in.
5337ff559fabSmrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
5338ff559fabSmrg
5339ff559fabSmrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
5340ff559fabSmrg
5341ff559fabSmrgAC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
5342ff559fabSmrgAC_LIBTOOL_PROG_COMPILER_PIC($1)
5343ff559fabSmrgAC_LIBTOOL_PROG_CC_C_O($1)
5344ff559fabSmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
5345ff559fabSmrgAC_LIBTOOL_PROG_LD_SHLIBS($1)
5346ff559fabSmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
5347ff559fabSmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
5348ff559fabSmrg
5349ff559fabSmrgAC_LIBTOOL_CONFIG($1)
5350ff559fabSmrg
5351ff559fabSmrgAC_LANG_RESTORE
5352ff559fabSmrgCC="$lt_save_CC"
5353ff559fabSmrg])# AC_LIBTOOL_LANG_GCJ_CONFIG
5354ff559fabSmrg
5355ff559fabSmrg
5356ff559fabSmrg# AC_LIBTOOL_LANG_RC_CONFIG
5357ff559fabSmrg# -------------------------
5358ff559fabSmrg# Ensure that the configuration vars for the Windows resource compiler are
5359ff559fabSmrg# suitably defined.  Those variables are subsequently used by
5360ff559fabSmrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
5361ff559fabSmrgAC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
5362ff559fabSmrgAC_DEFUN([_LT_AC_LANG_RC_CONFIG],
5363ff559fabSmrg[AC_LANG_SAVE
5364ff559fabSmrg
5365ff559fabSmrg# Source file extension for RC test sources.
5366ff559fabSmrgac_ext=rc
5367ff559fabSmrg
5368ff559fabSmrg# Object file extension for compiled RC test sources.
5369ff559fabSmrgobjext=o
5370ff559fabSmrg_LT_AC_TAGVAR(objext, $1)=$objext
5371ff559fabSmrg
5372ff559fabSmrg# Code to be used in simple compile tests
5373ff559fabSmrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
5374ff559fabSmrg
5375ff559fabSmrg# Code to be used in simple link tests
5376ff559fabSmrglt_simple_link_test_code="$lt_simple_compile_test_code"
5377ff559fabSmrg
5378ff559fabSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
5379ff559fabSmrg_LT_AC_SYS_COMPILER
5380ff559fabSmrg
5381ff559fabSmrg# save warnings/boilerplate of simple test code
5382ff559fabSmrg_LT_COMPILER_BOILERPLATE
5383ff559fabSmrg_LT_LINKER_BOILERPLATE
5384ff559fabSmrg
5385ff559fabSmrg# Allow CC to be a program name with arguments.
5386ff559fabSmrglt_save_CC="$CC"
5387ff559fabSmrgCC=${RC-"windres"}
5388ff559fabSmrgcompiler=$CC
5389ff559fabSmrg_LT_AC_TAGVAR(compiler, $1)=$CC
5390ff559fabSmrg_LT_CC_BASENAME([$compiler])
5391ff559fabSmrg_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
5392ff559fabSmrg
5393ff559fabSmrgAC_LIBTOOL_CONFIG($1)
5394ff559fabSmrg
5395ff559fabSmrgAC_LANG_RESTORE
5396ff559fabSmrgCC="$lt_save_CC"
5397ff559fabSmrg])# AC_LIBTOOL_LANG_RC_CONFIG
5398ff559fabSmrg
5399ff559fabSmrg
5400ff559fabSmrg# AC_LIBTOOL_CONFIG([TAGNAME])
5401ff559fabSmrg# ----------------------------
5402ff559fabSmrg# If TAGNAME is not passed, then create an initial libtool script
5403ff559fabSmrg# with a default configuration from the untagged config vars.  Otherwise
5404ff559fabSmrg# add code to config.status for appending the configuration named by
5405ff559fabSmrg# TAGNAME from the matching tagged config vars.
5406ff559fabSmrgAC_DEFUN([AC_LIBTOOL_CONFIG],
5407ff559fabSmrg[# The else clause should only fire when bootstrapping the
5408ff559fabSmrg# libtool distribution, otherwise you forgot to ship ltmain.sh
5409ff559fabSmrg# with your package, and you will get complaints that there are
5410ff559fabSmrg# no rules to generate ltmain.sh.
5411ff559fabSmrgif test -f "$ltmain"; then
5412ff559fabSmrg  # See if we are running on zsh, and set the options which allow our commands through
5413ff559fabSmrg  # without removal of \ escapes.
5414ff559fabSmrg  if test -n "${ZSH_VERSION+set}" ; then
5415ff559fabSmrg    setopt NO_GLOB_SUBST
5416ff559fabSmrg  fi
5417ff559fabSmrg  # Now quote all the things that may contain metacharacters while being
5418ff559fabSmrg  # careful not to overquote the AC_SUBSTed values.  We take copies of the
5419ff559fabSmrg  # variables and quote the copies for generation of the libtool script.
5420ff559fabSmrg  for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
5421ff559fabSmrg    SED SHELL STRIP \
5422ff559fabSmrg    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
5423ff559fabSmrg    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
5424ff559fabSmrg    deplibs_check_method reload_flag reload_cmds need_locks \
5425ff559fabSmrg    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
5426ff559fabSmrg    lt_cv_sys_global_symbol_to_c_name_address \
5427ff559fabSmrg    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
5428ff559fabSmrg    old_postinstall_cmds old_postuninstall_cmds \
5429ff559fabSmrg    _LT_AC_TAGVAR(compiler, $1) \
5430ff559fabSmrg    _LT_AC_TAGVAR(CC, $1) \
5431ff559fabSmrg    _LT_AC_TAGVAR(LD, $1) \
5432ff559fabSmrg    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
5433ff559fabSmrg    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
5434ff559fabSmrg    _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
5435ff559fabSmrg    _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
5436ff559fabSmrg    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
5437ff559fabSmrg    _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
5438ff559fabSmrg    _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
5439ff559fabSmrg    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
5440ff559fabSmrg    _LT_AC_TAGVAR(old_archive_cmds, $1) \
5441ff559fabSmrg    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
5442ff559fabSmrg    _LT_AC_TAGVAR(predep_objects, $1) \
5443ff559fabSmrg    _LT_AC_TAGVAR(postdep_objects, $1) \
5444ff559fabSmrg    _LT_AC_TAGVAR(predeps, $1) \
5445ff559fabSmrg    _LT_AC_TAGVAR(postdeps, $1) \
5446ff559fabSmrg    _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
5447ff559fabSmrg    _LT_AC_TAGVAR(archive_cmds, $1) \
5448ff559fabSmrg    _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
5449ff559fabSmrg    _LT_AC_TAGVAR(postinstall_cmds, $1) \
5450ff559fabSmrg    _LT_AC_TAGVAR(postuninstall_cmds, $1) \
5451ff559fabSmrg    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
5452ff559fabSmrg    _LT_AC_TAGVAR(allow_undefined_flag, $1) \
5453ff559fabSmrg    _LT_AC_TAGVAR(no_undefined_flag, $1) \
5454ff559fabSmrg    _LT_AC_TAGVAR(export_symbols_cmds, $1) \
5455ff559fabSmrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
5456ff559fabSmrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
5457ff559fabSmrg    _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
5458ff559fabSmrg    _LT_AC_TAGVAR(hardcode_automatic, $1) \
5459ff559fabSmrg    _LT_AC_TAGVAR(module_cmds, $1) \
5460ff559fabSmrg    _LT_AC_TAGVAR(module_expsym_cmds, $1) \
5461ff559fabSmrg    _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
5462ff559fabSmrg    _LT_AC_TAGVAR(exclude_expsyms, $1) \
5463ff559fabSmrg    _LT_AC_TAGVAR(include_expsyms, $1); do
5464ff559fabSmrg
5465ff559fabSmrg    case $var in
5466ff559fabSmrg    _LT_AC_TAGVAR(old_archive_cmds, $1) | \
5467ff559fabSmrg    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
5468ff559fabSmrg    _LT_AC_TAGVAR(archive_cmds, $1) | \
5469ff559fabSmrg    _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
5470ff559fabSmrg    _LT_AC_TAGVAR(module_cmds, $1) | \
5471ff559fabSmrg    _LT_AC_TAGVAR(module_expsym_cmds, $1) | \
5472ff559fabSmrg    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
5473ff559fabSmrg    _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
5474ff559fabSmrg    extract_expsyms_cmds | reload_cmds | finish_cmds | \
5475ff559fabSmrg    postinstall_cmds | postuninstall_cmds | \
5476ff559fabSmrg    old_postinstall_cmds | old_postuninstall_cmds | \
5477ff559fabSmrg    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
5478ff559fabSmrg      # Double-quote double-evaled strings.
5479ff559fabSmrg      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
5480ff559fabSmrg      ;;
5481ff559fabSmrg    *)
5482ff559fabSmrg      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
5483ff559fabSmrg      ;;
5484ff559fabSmrg    esac
5485ff559fabSmrg  done
5486ff559fabSmrg
5487ff559fabSmrg  case $lt_echo in
5488ff559fabSmrg  *'\[$]0 --fallback-echo"')
5489ff559fabSmrg    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
5490ff559fabSmrg    ;;
5491ff559fabSmrg  esac
5492ff559fabSmrg
5493ff559fabSmrgifelse([$1], [],
5494ff559fabSmrg  [cfgfile="${ofile}T"
5495ff559fabSmrg  trap "$rm \"$cfgfile\"; exit 1" 1 2 15
5496ff559fabSmrg  $rm -f "$cfgfile"
5497ff559fabSmrg  AC_MSG_NOTICE([creating $ofile])],
5498ff559fabSmrg  [cfgfile="$ofile"])
5499ff559fabSmrg
5500ff559fabSmrg  cat <<__EOF__ >> "$cfgfile"
5501ff559fabSmrgifelse([$1], [],
5502ff559fabSmrg[#! $SHELL
5503ff559fabSmrg
5504ff559fabSmrg# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
5505ff559fabSmrg# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
5506ff559fabSmrg# NOTE: Changes made to this file will be lost: look at ltmain.sh.
5507ff559fabSmrg#
5508ff559fabSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
5509ff559fabSmrg# Free Software Foundation, Inc.
5510ff559fabSmrg#
5511ff559fabSmrg# This file is part of GNU Libtool:
5512ff559fabSmrg# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
5513ff559fabSmrg#
5514ff559fabSmrg# This program is free software; you can redistribute it and/or modify
5515ff559fabSmrg# it under the terms of the GNU General Public License as published by
5516ff559fabSmrg# the Free Software Foundation; either version 2 of the License, or
5517ff559fabSmrg# (at your option) any later version.
5518ff559fabSmrg#
5519ff559fabSmrg# This program is distributed in the hope that it will be useful, but
5520ff559fabSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of
5521ff559fabSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
5522ff559fabSmrg# General Public License for more details.
5523ff559fabSmrg#
5524ff559fabSmrg# You should have received a copy of the GNU General Public License
5525ff559fabSmrg# along with this program; if not, write to the Free Software
5526ff559fabSmrg# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
5527ff559fabSmrg#
5528ff559fabSmrg# As a special exception to the GNU General Public License, if you
5529ff559fabSmrg# distribute this file as part of a program that contains a
5530ff559fabSmrg# configuration script generated by Autoconf, you may include it under
5531ff559fabSmrg# the same distribution terms that you use for the rest of that program.
5532ff559fabSmrg
5533ff559fabSmrg# A sed program that does not truncate output.
5534ff559fabSmrgSED=$lt_SED
5535ff559fabSmrg
5536ff559fabSmrg# Sed that helps us avoid accidentally triggering echo(1) options like -n.
5537ff559fabSmrgXsed="$SED -e 1s/^X//"
5538ff559fabSmrg
5539ff559fabSmrg# The HP-UX ksh and POSIX shell print the target directory to stdout
5540ff559fabSmrg# if CDPATH is set.
5541ff559fabSmrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
5542ff559fabSmrg
5543ff559fabSmrg# The names of the tagged configurations supported by this script.
5544ff559fabSmrgavailable_tags=
5545ff559fabSmrg
5546ff559fabSmrg# ### BEGIN LIBTOOL CONFIG],
5547ff559fabSmrg[# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
5548ff559fabSmrg
5549ff559fabSmrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
5550ff559fabSmrg
5551ff559fabSmrg# Shell to use when invoking shell scripts.
5552ff559fabSmrgSHELL=$lt_SHELL
5553ff559fabSmrg
5554ff559fabSmrg# Whether or not to build shared libraries.
5555ff559fabSmrgbuild_libtool_libs=$enable_shared
5556ff559fabSmrg
5557ff559fabSmrg# Whether or not to build static libraries.
5558ff559fabSmrgbuild_old_libs=$enable_static
5559ff559fabSmrg
5560ff559fabSmrg# Whether or not to add -lc for building shared libraries.
5561ff559fabSmrgbuild_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
5562ff559fabSmrg
5563ff559fabSmrg# Whether or not to disallow shared libs when runtime libs are static
5564ff559fabSmrgallow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
5565ff559fabSmrg
5566ff559fabSmrg# Whether or not to optimize for fast installation.
5567ff559fabSmrgfast_install=$enable_fast_install
5568ff559fabSmrg
5569ff559fabSmrg# The host system.
5570ff559fabSmrghost_alias=$host_alias
5571ff559fabSmrghost=$host
5572ff559fabSmrghost_os=$host_os
5573ff559fabSmrg
5574ff559fabSmrg# The build system.
5575ff559fabSmrgbuild_alias=$build_alias
5576ff559fabSmrgbuild=$build
5577ff559fabSmrgbuild_os=$build_os
5578ff559fabSmrg
5579ff559fabSmrg# An echo program that does not interpret backslashes.
5580ff559fabSmrgecho=$lt_echo
5581ff559fabSmrg
5582ff559fabSmrg# The archiver.
5583ff559fabSmrgAR=$lt_AR
5584ff559fabSmrgAR_FLAGS=$lt_AR_FLAGS
5585ff559fabSmrg
5586ff559fabSmrg# A C compiler.
5587ff559fabSmrgLTCC=$lt_LTCC
5588ff559fabSmrg
5589ff559fabSmrg# LTCC compiler flags.
5590ff559fabSmrgLTCFLAGS=$lt_LTCFLAGS
5591ff559fabSmrg
5592ff559fabSmrg# A language-specific compiler.
5593ff559fabSmrgCC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
5594ff559fabSmrg
5595ff559fabSmrg# Is the compiler the GNU C compiler?
5596ff559fabSmrgwith_gcc=$_LT_AC_TAGVAR(GCC, $1)
5597ff559fabSmrg
5598ff559fabSmrg# An ERE matcher.
5599ff559fabSmrgEGREP=$lt_EGREP
5600ff559fabSmrg
5601ff559fabSmrg# The linker used to build libraries.
5602ff559fabSmrgLD=$lt_[]_LT_AC_TAGVAR(LD, $1)
5603ff559fabSmrg
5604ff559fabSmrg# Whether we need hard or soft links.
5605ff559fabSmrgLN_S=$lt_LN_S
5606ff559fabSmrg
5607ff559fabSmrg# A BSD-compatible nm program.
5608ff559fabSmrgNM=$lt_NM
5609ff559fabSmrg
5610ff559fabSmrg# A symbol stripping program
5611ff559fabSmrgSTRIP=$lt_STRIP
5612ff559fabSmrg
5613ff559fabSmrg# Used to examine libraries when file_magic_cmd begins "file"
5614ff559fabSmrgMAGIC_CMD=$MAGIC_CMD
5615ff559fabSmrg
5616ff559fabSmrg# Used on cygwin: DLL creation program.
5617ff559fabSmrgDLLTOOL="$DLLTOOL"
5618ff559fabSmrg
5619ff559fabSmrg# Used on cygwin: object dumper.
5620ff559fabSmrgOBJDUMP="$OBJDUMP"
5621ff559fabSmrg
5622ff559fabSmrg# Used on cygwin: assembler.
5623ff559fabSmrgAS="$AS"
5624ff559fabSmrg
5625ff559fabSmrg# The name of the directory that contains temporary libtool files.
5626ff559fabSmrgobjdir=$objdir
5627ff559fabSmrg
5628ff559fabSmrg# How to create reloadable object files.
5629ff559fabSmrgreload_flag=$lt_reload_flag
5630ff559fabSmrgreload_cmds=$lt_reload_cmds
5631ff559fabSmrg
5632ff559fabSmrg# How to pass a linker flag through the compiler.
5633ff559fabSmrgwl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
5634ff559fabSmrg
5635ff559fabSmrg# Object file suffix (normally "o").
5636ff559fabSmrgobjext="$ac_objext"
5637ff559fabSmrg
5638ff559fabSmrg# Old archive suffix (normally "a").
5639ff559fabSmrglibext="$libext"
5640ff559fabSmrg
5641ff559fabSmrg# Shared library suffix (normally ".so").
5642ff559fabSmrgshrext_cmds='$shrext_cmds'
5643ff559fabSmrg
5644ff559fabSmrg# Executable file suffix (normally "").
5645ff559fabSmrgexeext="$exeext"
5646ff559fabSmrg
5647ff559fabSmrg# Additional compiler flags for building library objects.
5648ff559fabSmrgpic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
5649ff559fabSmrgpic_mode=$pic_mode
5650ff559fabSmrg
5651ff559fabSmrg# What is the maximum length of a command?
5652ff559fabSmrgmax_cmd_len=$lt_cv_sys_max_cmd_len
5653ff559fabSmrg
5654ff559fabSmrg# Does compiler simultaneously support -c and -o options?
5655ff559fabSmrgcompiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
5656ff559fabSmrg
5657ff559fabSmrg# Must we lock files when doing compilation?
5658ff559fabSmrgneed_locks=$lt_need_locks
5659ff559fabSmrg
5660ff559fabSmrg# Do we need the lib prefix for modules?
5661ff559fabSmrgneed_lib_prefix=$need_lib_prefix
5662ff559fabSmrg
5663ff559fabSmrg# Do we need a version for libraries?
5664ff559fabSmrgneed_version=$need_version
5665ff559fabSmrg
5666ff559fabSmrg# Whether dlopen is supported.
5667ff559fabSmrgdlopen_support=$enable_dlopen
5668ff559fabSmrg
5669ff559fabSmrg# Whether dlopen of programs is supported.
5670ff559fabSmrgdlopen_self=$enable_dlopen_self
5671ff559fabSmrg
5672ff559fabSmrg# Whether dlopen of statically linked programs is supported.
5673ff559fabSmrgdlopen_self_static=$enable_dlopen_self_static
5674ff559fabSmrg
5675ff559fabSmrg# Compiler flag to prevent dynamic linking.
5676ff559fabSmrglink_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
5677ff559fabSmrg
5678ff559fabSmrg# Compiler flag to turn off builtin functions.
5679ff559fabSmrgno_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
5680ff559fabSmrg
5681ff559fabSmrg# Compiler flag to allow reflexive dlopens.
5682ff559fabSmrgexport_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
5683ff559fabSmrg
5684ff559fabSmrg# Compiler flag to generate shared objects directly from archives.
5685ff559fabSmrgwhole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
5686ff559fabSmrg
5687ff559fabSmrg# Compiler flag to generate thread-safe objects.
5688ff559fabSmrgthread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
5689ff559fabSmrg
5690ff559fabSmrg# Library versioning type.
5691ff559fabSmrgversion_type=$version_type
5692ff559fabSmrg
5693ff559fabSmrg# Format of library name prefix.
5694ff559fabSmrglibname_spec=$lt_libname_spec
5695ff559fabSmrg
5696ff559fabSmrg# List of archive names.  First name is the real one, the rest are links.
5697ff559fabSmrg# The last name is the one that the linker finds with -lNAME.
5698ff559fabSmrglibrary_names_spec=$lt_library_names_spec
5699ff559fabSmrg
5700ff559fabSmrg# The coded name of the library, if different from the real name.
5701ff559fabSmrgsoname_spec=$lt_soname_spec
5702ff559fabSmrg
5703ff559fabSmrg# Commands used to build and install an old-style archive.
5704ff559fabSmrgRANLIB=$lt_RANLIB
5705ff559fabSmrgold_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
5706ff559fabSmrgold_postinstall_cmds=$lt_old_postinstall_cmds
5707ff559fabSmrgold_postuninstall_cmds=$lt_old_postuninstall_cmds
5708ff559fabSmrg
5709ff559fabSmrg# Create an old-style archive from a shared archive.
5710ff559fabSmrgold_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
5711ff559fabSmrg
5712ff559fabSmrg# Create a temporary old-style archive to link instead of a shared archive.
5713ff559fabSmrgold_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
5714ff559fabSmrg
5715ff559fabSmrg# Commands used to build and install a shared archive.
5716ff559fabSmrgarchive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
5717ff559fabSmrgarchive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
5718ff559fabSmrgpostinstall_cmds=$lt_postinstall_cmds
5719ff559fabSmrgpostuninstall_cmds=$lt_postuninstall_cmds
5720ff559fabSmrg
5721ff559fabSmrg# Commands used to build a loadable module (assumed same as above if empty)
5722ff559fabSmrgmodule_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
5723ff559fabSmrgmodule_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
5724ff559fabSmrg
5725ff559fabSmrg# Commands to strip libraries.
5726ff559fabSmrgold_striplib=$lt_old_striplib
5727ff559fabSmrgstriplib=$lt_striplib
5728ff559fabSmrg
5729ff559fabSmrg# Dependencies to place before the objects being linked to create a
5730ff559fabSmrg# shared library.
5731ff559fabSmrgpredep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
5732ff559fabSmrg
5733ff559fabSmrg# Dependencies to place after the objects being linked to create a
5734ff559fabSmrg# shared library.
5735ff559fabSmrgpostdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
5736ff559fabSmrg
5737ff559fabSmrg# Dependencies to place before the objects being linked to create a
5738ff559fabSmrg# shared library.
5739ff559fabSmrgpredeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
5740ff559fabSmrg
5741ff559fabSmrg# Dependencies to place after the objects being linked to create a
5742ff559fabSmrg# shared library.
5743ff559fabSmrgpostdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
5744ff559fabSmrg
5745ff559fabSmrg# The library search path used internally by the compiler when linking
5746ff559fabSmrg# a shared library.
5747ff559fabSmrgcompiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
5748ff559fabSmrg
5749ff559fabSmrg# Method to check whether dependent libraries are shared objects.
5750ff559fabSmrgdeplibs_check_method=$lt_deplibs_check_method
5751ff559fabSmrg
5752ff559fabSmrg# Command to use when deplibs_check_method == file_magic.
5753ff559fabSmrgfile_magic_cmd=$lt_file_magic_cmd
5754ff559fabSmrg
5755ff559fabSmrg# Flag that allows shared libraries with undefined symbols to be built.
5756ff559fabSmrgallow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
5757ff559fabSmrg
5758ff559fabSmrg# Flag that forces no undefined symbols.
5759ff559fabSmrgno_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
5760ff559fabSmrg
5761ff559fabSmrg# Commands used to finish a libtool library installation in a directory.
5762ff559fabSmrgfinish_cmds=$lt_finish_cmds
5763ff559fabSmrg
5764ff559fabSmrg# Same as above, but a single script fragment to be evaled but not shown.
5765ff559fabSmrgfinish_eval=$lt_finish_eval
5766ff559fabSmrg
5767ff559fabSmrg# Take the output of nm and produce a listing of raw symbols and C names.
5768ff559fabSmrgglobal_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
5769ff559fabSmrg
5770ff559fabSmrg# Transform the output of nm in a proper C declaration
5771ff559fabSmrgglobal_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
5772ff559fabSmrg
5773ff559fabSmrg# Transform the output of nm in a C name address pair
5774ff559fabSmrgglobal_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
5775ff559fabSmrg
5776ff559fabSmrg# This is the shared library runtime path variable.
5777ff559fabSmrgrunpath_var=$runpath_var
5778ff559fabSmrg
5779ff559fabSmrg# This is the shared library path variable.
5780ff559fabSmrgshlibpath_var=$shlibpath_var
5781ff559fabSmrg
5782ff559fabSmrg# Is shlibpath searched before the hard-coded library search path?
5783ff559fabSmrgshlibpath_overrides_runpath=$shlibpath_overrides_runpath
5784ff559fabSmrg
5785ff559fabSmrg# How to hardcode a shared library path into an executable.
5786ff559fabSmrghardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
5787ff559fabSmrg
5788ff559fabSmrg# Whether we should hardcode library paths into libraries.
5789ff559fabSmrghardcode_into_libs=$hardcode_into_libs
5790ff559fabSmrg
5791ff559fabSmrg# Flag to hardcode \$libdir into a binary during linking.
5792ff559fabSmrg# This must work even if \$libdir does not exist.
5793ff559fabSmrghardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
5794ff559fabSmrg
5795ff559fabSmrg# If ld is used when linking, flag to hardcode \$libdir into
5796ff559fabSmrg# a binary during linking. This must work even if \$libdir does
5797ff559fabSmrg# not exist.
5798ff559fabSmrghardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
5799ff559fabSmrg
5800ff559fabSmrg# Whether we need a single -rpath flag with a separated argument.
5801ff559fabSmrghardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
5802ff559fabSmrg
5803ff559fabSmrg# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
5804ff559fabSmrg# resulting binary.
5805ff559fabSmrghardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
5806ff559fabSmrg
5807ff559fabSmrg# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
5808ff559fabSmrg# resulting binary.
5809ff559fabSmrghardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
5810ff559fabSmrg
5811ff559fabSmrg# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
5812ff559fabSmrg# the resulting binary.
5813ff559fabSmrghardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
5814ff559fabSmrg
5815ff559fabSmrg# Set to yes if building a shared library automatically hardcodes DIR into the library
5816ff559fabSmrg# and all subsequent libraries and executables linked against it.
5817ff559fabSmrghardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)
5818ff559fabSmrg
5819ff559fabSmrg# Variables whose values should be saved in libtool wrapper scripts and
5820ff559fabSmrg# restored at relink time.
5821ff559fabSmrgvariables_saved_for_relink="$variables_saved_for_relink"
5822ff559fabSmrg
5823ff559fabSmrg# Whether libtool must link a program against all its dependency libraries.
5824ff559fabSmrglink_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
5825ff559fabSmrg
5826ff559fabSmrg# Compile-time system search path for libraries
5827ff559fabSmrgsys_lib_search_path_spec=$lt_sys_lib_search_path_spec
5828ff559fabSmrg
5829ff559fabSmrg# Run-time system search path for libraries
5830ff559fabSmrgsys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
5831ff559fabSmrg
5832ff559fabSmrg# Fix the shell variable \$srcfile for the compiler.
5833ff559fabSmrgfix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)"
5834ff559fabSmrg
5835ff559fabSmrg# Set to yes if exported symbols are required.
5836ff559fabSmrgalways_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
5837ff559fabSmrg
5838ff559fabSmrg# The commands to list exported symbols.
5839ff559fabSmrgexport_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
5840ff559fabSmrg
5841ff559fabSmrg# The commands to extract the exported symbol list from a shared archive.
5842ff559fabSmrgextract_expsyms_cmds=$lt_extract_expsyms_cmds
5843ff559fabSmrg
5844ff559fabSmrg# Symbols that should not be listed in the preloaded symbols.
5845ff559fabSmrgexclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
5846ff559fabSmrg
5847ff559fabSmrg# Symbols that must always be exported.
5848ff559fabSmrginclude_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
5849ff559fabSmrg
5850ff559fabSmrgifelse([$1],[],
5851ff559fabSmrg[# ### END LIBTOOL CONFIG],
5852ff559fabSmrg[# ### END LIBTOOL TAG CONFIG: $tagname])
5853ff559fabSmrg
5854ff559fabSmrg__EOF__
5855ff559fabSmrg
5856ff559fabSmrgifelse([$1],[], [
5857ff559fabSmrg  case $host_os in
5858ff559fabSmrg  aix3*)
5859ff559fabSmrg    cat <<\EOF >> "$cfgfile"
5860ff559fabSmrg
5861ff559fabSmrg# AIX sometimes has problems with the GCC collect2 program.  For some
5862ff559fabSmrg# reason, if we set the COLLECT_NAMES environment variable, the problems
5863ff559fabSmrg# vanish in a puff of smoke.
5864ff559fabSmrgif test "X${COLLECT_NAMES+set}" != Xset; then
5865ff559fabSmrg  COLLECT_NAMES=
5866ff559fabSmrg  export COLLECT_NAMES
5867ff559fabSmrgfi
5868ff559fabSmrgEOF
5869ff559fabSmrg    ;;
5870ff559fabSmrg  esac
5871ff559fabSmrg
5872ff559fabSmrg  # We use sed instead of cat because bash on DJGPP gets confused if
5873ff559fabSmrg  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
5874ff559fabSmrg  # text mode, it properly converts lines to CR/LF.  This bash problem
5875ff559fabSmrg  # is reportedly fixed, but why not run on old versions too?
5876ff559fabSmrg  sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
5877ff559fabSmrg
5878ff559fabSmrg  mv -f "$cfgfile" "$ofile" || \
5879ff559fabSmrg    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
5880ff559fabSmrg  chmod +x "$ofile"
5881ff559fabSmrg])
5882ff559fabSmrgelse
5883ff559fabSmrg  # If there is no Makefile yet, we rely on a make rule to execute
5884ff559fabSmrg  # `config.status --recheck' to rerun these tests and create the
5885ff559fabSmrg  # libtool script then.
5886ff559fabSmrg  ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
5887ff559fabSmrg  if test -f "$ltmain_in"; then
5888ff559fabSmrg    test -f Makefile && make "$ltmain"
5889ff559fabSmrg  fi
5890ff559fabSmrgfi
5891ff559fabSmrg])# AC_LIBTOOL_CONFIG
5892ff559fabSmrg
5893ff559fabSmrg
5894ff559fabSmrg# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
5895ff559fabSmrg# -------------------------------------------
5896ff559fabSmrgAC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
5897ff559fabSmrg[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
5898ff559fabSmrg
5899ff559fabSmrg_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
5900ff559fabSmrg
5901ff559fabSmrgif test "$GCC" = yes; then
5902ff559fabSmrg  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
5903ff559fabSmrg
5904ff559fabSmrg  AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
5905ff559fabSmrg    lt_cv_prog_compiler_rtti_exceptions,
5906ff559fabSmrg    [-fno-rtti -fno-exceptions], [],
5907ff559fabSmrg    [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
5908ff559fabSmrgfi
5909ff559fabSmrg])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
5910ff559fabSmrg
5911ff559fabSmrg
5912ff559fabSmrg# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
5913ff559fabSmrg# ---------------------------------
5914ff559fabSmrgAC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
5915ff559fabSmrg[AC_REQUIRE([AC_CANONICAL_HOST])
5916ff559fabSmrgAC_REQUIRE([AC_PROG_NM])
5917ff559fabSmrgAC_REQUIRE([AC_OBJEXT])
5918ff559fabSmrg# Check for command to grab the raw symbol name followed by C symbol from nm.
5919ff559fabSmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object])
5920ff559fabSmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
5921ff559fabSmrg[
5922ff559fabSmrg# These are sane defaults that work on at least a few old systems.
5923ff559fabSmrg# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
5924ff559fabSmrg
5925ff559fabSmrg# Character class describing NM global symbol codes.
5926ff559fabSmrgsymcode='[[BCDEGRST]]'
5927ff559fabSmrg
5928ff559fabSmrg# Regexp to match symbols that can be accessed directly from C.
5929ff559fabSmrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
5930ff559fabSmrg
5931ff559fabSmrg# Transform an extracted symbol line into a proper C declaration
5932ff559fabSmrglt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
5933ff559fabSmrg
5934ff559fabSmrg# Transform an extracted symbol line into symbol name and symbol address
5935ff559fabSmrglt_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'"
5936ff559fabSmrg
5937ff559fabSmrg# Define system-specific variables.
5938ff559fabSmrgcase $host_os in
5939ff559fabSmrgaix*)
5940ff559fabSmrg  symcode='[[BCDT]]'
5941ff559fabSmrg  ;;
5942ff559fabSmrgcygwin* | mingw* | pw32*)
5943ff559fabSmrg  symcode='[[ABCDGISTW]]'
5944ff559fabSmrg  ;;
5945ff559fabSmrghpux*) # Its linker distinguishes data from code symbols
5946ff559fabSmrg  if test "$host_cpu" = ia64; then
5947ff559fabSmrg    symcode='[[ABCDEGRST]]'
5948ff559fabSmrg  fi
5949ff559fabSmrg  lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
5950ff559fabSmrg  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'"
5951ff559fabSmrg  ;;
5952ff559fabSmrglinux*)
5953ff559fabSmrg  if test "$host_cpu" = ia64; then
5954ff559fabSmrg    symcode='[[ABCDGIRSTW]]'
5955ff559fabSmrg    lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
5956ff559fabSmrg    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'"
5957ff559fabSmrg  fi
5958ff559fabSmrg  ;;
5959ff559fabSmrgirix* | nonstopux*)
5960ff559fabSmrg  symcode='[[BCDEGRST]]'
5961ff559fabSmrg  ;;
5962ff559fabSmrgosf*)
5963ff559fabSmrg  symcode='[[BCDEGQRST]]'
5964ff559fabSmrg  ;;
5965ff559fabSmrgsolaris*)
5966ff559fabSmrg  symcode='[[BDRT]]'
5967ff559fabSmrg  ;;
5968ff559fabSmrgsco3.2v5*)
5969ff559fabSmrg  symcode='[[DT]]'
5970ff559fabSmrg  ;;
5971ff559fabSmrgsysv4.2uw2*)
5972ff559fabSmrg  symcode='[[DT]]'
5973ff559fabSmrg  ;;
5974ff559fabSmrgsysv5* | sco5v6* | unixware* | OpenUNIX*)
5975ff559fabSmrg  symcode='[[ABDT]]'
5976ff559fabSmrg  ;;
5977ff559fabSmrgsysv4)
5978ff559fabSmrg  symcode='[[DFNSTU]]'
5979ff559fabSmrg  ;;
5980ff559fabSmrgesac
5981ff559fabSmrg
5982ff559fabSmrg# Handle CRLF in mingw tool chain
5983ff559fabSmrgopt_cr=
5984ff559fabSmrgcase $build_os in
5985ff559fabSmrgmingw*)
5986ff559fabSmrg  opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
5987ff559fabSmrg  ;;
5988ff559fabSmrgesac
5989ff559fabSmrg
5990ff559fabSmrg# If we're using GNU nm, then use its standard symbol codes.
5991ff559fabSmrgcase `$NM -V 2>&1` in
5992ff559fabSmrg*GNU* | *'with BFD'*)
5993ff559fabSmrg  symcode='[[ABCDGIRSTW]]' ;;
5994ff559fabSmrgesac
5995ff559fabSmrg
5996ff559fabSmrg# Try without a prefix undercore, then with it.
5997ff559fabSmrgfor ac_symprfx in "" "_"; do
5998ff559fabSmrg
5999ff559fabSmrg  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
6000ff559fabSmrg  symxfrm="\\1 $ac_symprfx\\2 \\2"
6001ff559fabSmrg
6002ff559fabSmrg  # Write the raw and C identifiers.
6003ff559fabSmrg  lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ 	]]\($symcode$symcode*\)[[ 	]][[ 	]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
6004ff559fabSmrg
6005ff559fabSmrg  # Check to see that the pipe works correctly.
6006ff559fabSmrg  pipe_works=no
6007ff559fabSmrg
6008ff559fabSmrg  rm -f conftest*
6009ff559fabSmrg  cat > conftest.$ac_ext <<EOF
6010ff559fabSmrg#ifdef __cplusplus
6011ff559fabSmrgextern "C" {
6012ff559fabSmrg#endif
6013ff559fabSmrgchar nm_test_var;
6014ff559fabSmrgvoid nm_test_func(){}
6015ff559fabSmrg#ifdef __cplusplus
6016ff559fabSmrg}
6017ff559fabSmrg#endif
6018ff559fabSmrgint main(){nm_test_var='a';nm_test_func();return(0);}
6019ff559fabSmrgEOF
6020ff559fabSmrg
6021ff559fabSmrg  if AC_TRY_EVAL(ac_compile); then
6022ff559fabSmrg    # Now try to grab the symbols.
6023ff559fabSmrg    nlist=conftest.nm
6024ff559fabSmrg    if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
6025ff559fabSmrg      # Try sorting and uniquifying the output.
6026ff559fabSmrg      if sort "$nlist" | uniq > "$nlist"T; then
6027ff559fabSmrg	mv -f "$nlist"T "$nlist"
6028ff559fabSmrg      else
6029ff559fabSmrg	rm -f "$nlist"T
6030ff559fabSmrg      fi
6031ff559fabSmrg
6032ff559fabSmrg      # Make sure that we snagged all the symbols we need.
6033ff559fabSmrg      if grep ' nm_test_var$' "$nlist" >/dev/null; then
6034ff559fabSmrg	if grep ' nm_test_func$' "$nlist" >/dev/null; then
6035ff559fabSmrg	  cat <<EOF > conftest.$ac_ext
6036ff559fabSmrg#ifdef __cplusplus
6037ff559fabSmrgextern "C" {
6038ff559fabSmrg#endif
6039ff559fabSmrg
6040ff559fabSmrgEOF
6041ff559fabSmrg	  # Now generate the symbol file.
6042ff559fabSmrg	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
6043ff559fabSmrg
6044ff559fabSmrg	  cat <<EOF >> conftest.$ac_ext
6045ff559fabSmrg#if defined (__STDC__) && __STDC__
6046ff559fabSmrg# define lt_ptr_t void *
6047ff559fabSmrg#else
6048ff559fabSmrg# define lt_ptr_t char *
6049ff559fabSmrg# define const
6050ff559fabSmrg#endif
6051ff559fabSmrg
6052ff559fabSmrg/* The mapping between symbol names and symbols. */
6053ff559fabSmrgconst struct {
6054ff559fabSmrg  const char *name;
6055ff559fabSmrg  lt_ptr_t address;
6056ff559fabSmrg}
6057ff559fabSmrglt_preloaded_symbols[[]] =
6058ff559fabSmrg{
6059ff559fabSmrgEOF
6060ff559fabSmrg	  $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
6061ff559fabSmrg	  cat <<\EOF >> conftest.$ac_ext
6062ff559fabSmrg  {0, (lt_ptr_t) 0}
6063ff559fabSmrg};
6064ff559fabSmrg
6065ff559fabSmrg#ifdef __cplusplus
6066ff559fabSmrg}
6067ff559fabSmrg#endif
6068ff559fabSmrgEOF
6069ff559fabSmrg	  # Now try linking the two files.
6070ff559fabSmrg	  mv conftest.$ac_objext conftstm.$ac_objext
6071ff559fabSmrg	  lt_save_LIBS="$LIBS"
6072ff559fabSmrg	  lt_save_CFLAGS="$CFLAGS"
6073ff559fabSmrg	  LIBS="conftstm.$ac_objext"
6074ff559fabSmrg	  CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
6075ff559fabSmrg	  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
6076ff559fabSmrg	    pipe_works=yes
6077ff559fabSmrg	  fi
6078ff559fabSmrg	  LIBS="$lt_save_LIBS"
6079ff559fabSmrg	  CFLAGS="$lt_save_CFLAGS"
6080ff559fabSmrg	else
6081ff559fabSmrg	  echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
6082ff559fabSmrg	fi
6083ff559fabSmrg      else
6084ff559fabSmrg	echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
6085ff559fabSmrg      fi
6086ff559fabSmrg    else
6087ff559fabSmrg      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
6088ff559fabSmrg    fi
6089ff559fabSmrg  else
6090ff559fabSmrg    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
6091ff559fabSmrg    cat conftest.$ac_ext >&5
6092ff559fabSmrg  fi
6093ff559fabSmrg  rm -f conftest* conftst*
6094ff559fabSmrg
6095ff559fabSmrg  # Do not use the global_symbol_pipe unless it works.
6096ff559fabSmrg  if test "$pipe_works" = yes; then
6097ff559fabSmrg    break
6098ff559fabSmrg  else
6099ff559fabSmrg    lt_cv_sys_global_symbol_pipe=
6100ff559fabSmrg  fi
6101ff559fabSmrgdone
6102ff559fabSmrg])
6103ff559fabSmrgif test -z "$lt_cv_sys_global_symbol_pipe"; then
6104ff559fabSmrg  lt_cv_sys_global_symbol_to_cdecl=
6105ff559fabSmrgfi
6106ff559fabSmrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
6107ff559fabSmrg  AC_MSG_RESULT(failed)
6108ff559fabSmrgelse
6109ff559fabSmrg  AC_MSG_RESULT(ok)
6110ff559fabSmrgfi
6111ff559fabSmrg]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
6112ff559fabSmrg
6113ff559fabSmrg
6114ff559fabSmrg# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
6115ff559fabSmrg# ---------------------------------------
6116ff559fabSmrgAC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
6117ff559fabSmrg[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
6118ff559fabSmrg_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
6119ff559fabSmrg_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
6120ff559fabSmrg
6121ff559fabSmrgAC_MSG_CHECKING([for $compiler option to produce PIC])
6122ff559fabSmrg ifelse([$1],[CXX],[
6123ff559fabSmrg  # C++ specific cases for pic, static, wl, etc.
6124ff559fabSmrg  if test "$GXX" = yes; then
6125ff559fabSmrg    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6126ff559fabSmrg    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
6127ff559fabSmrg
6128ff559fabSmrg    case $host_os in
6129ff559fabSmrg    aix*)
6130ff559fabSmrg      # All AIX code is PIC.
6131ff559fabSmrg      if test "$host_cpu" = ia64; then
6132ff559fabSmrg	# AIX 5 now supports IA64 processor
6133ff559fabSmrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6134ff559fabSmrg      fi
6135ff559fabSmrg      ;;
6136ff559fabSmrg    amigaos*)
6137ff559fabSmrg      # FIXME: we need at least 68020 code to build shared libraries, but
6138ff559fabSmrg      # adding the `-m68020' flag to GCC prevents building anything better,
6139ff559fabSmrg      # like `-m68040'.
6140ff559fabSmrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
6141ff559fabSmrg      ;;
6142ff559fabSmrg    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
6143ff559fabSmrg      # PIC is the default for these OSes.
6144ff559fabSmrg      ;;
6145ff559fabSmrg    mingw* | os2* | pw32*)
6146ff559fabSmrg      # This hack is so that the source file can tell whether it is being
6147ff559fabSmrg      # built for inclusion in a dll (and should export symbols for example).
6148ff559fabSmrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
6149ff559fabSmrg      ;;
6150ff559fabSmrg    darwin* | rhapsody*)
6151ff559fabSmrg      # PIC is the default on this platform
6152ff559fabSmrg      # Common symbols not allowed in MH_DYLIB files
6153ff559fabSmrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
6154ff559fabSmrg      ;;
6155ff559fabSmrg    *djgpp*)
6156ff559fabSmrg      # DJGPP does not support shared libraries at all
6157ff559fabSmrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
6158ff559fabSmrg      ;;
6159ff559fabSmrg    interix3*)
6160ff559fabSmrg      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
6161ff559fabSmrg      # Instead, we relocate shared libraries at runtime.
6162ff559fabSmrg      ;;
6163ff559fabSmrg    sysv4*MP*)
6164ff559fabSmrg      if test -d /usr/nec; then
6165ff559fabSmrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
6166ff559fabSmrg      fi
6167ff559fabSmrg      ;;
6168ff559fabSmrg    hpux*)
6169ff559fabSmrg      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
6170ff559fabSmrg      # not for PA HP-UX.
6171ff559fabSmrg      case $host_cpu in
6172ff559fabSmrg      hppa*64*|ia64*)
6173ff559fabSmrg	;;
6174ff559fabSmrg      *)
6175ff559fabSmrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6176ff559fabSmrg	;;
6177ff559fabSmrg      esac
6178ff559fabSmrg      ;;
6179ff559fabSmrg    *)
6180ff559fabSmrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6181ff559fabSmrg      ;;
6182ff559fabSmrg    esac
6183ff559fabSmrg  else
6184ff559fabSmrg    case $host_os in
6185ff559fabSmrg      aix4* | aix5*)
6186ff559fabSmrg	# All AIX code is PIC.
6187ff559fabSmrg	if test "$host_cpu" = ia64; then
6188ff559fabSmrg	  # AIX 5 now supports IA64 processor
6189ff559fabSmrg	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6190ff559fabSmrg	else
6191ff559fabSmrg	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
6192ff559fabSmrg	fi
6193ff559fabSmrg	;;
6194ff559fabSmrg      chorus*)
6195ff559fabSmrg	case $cc_basename in
6196ff559fabSmrg	cxch68*)
6197ff559fabSmrg	  # Green Hills C++ Compiler
6198ff559fabSmrg	  # _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"
6199ff559fabSmrg	  ;;
6200ff559fabSmrg	esac
6201ff559fabSmrg	;;
6202ff559fabSmrg       darwin*)
6203ff559fabSmrg         # PIC is the default on this platform
6204ff559fabSmrg         # Common symbols not allowed in MH_DYLIB files
6205ff559fabSmrg         case $cc_basename in
6206ff559fabSmrg           xlc*)
6207ff559fabSmrg           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
6208ff559fabSmrg           _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6209ff559fabSmrg           ;;
6210ff559fabSmrg         esac
6211ff559fabSmrg       ;;
6212ff559fabSmrg      dgux*)
6213ff559fabSmrg	case $cc_basename in
6214ff559fabSmrg	  ec++*)
6215ff559fabSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6216ff559fabSmrg	    ;;
6217ff559fabSmrg	  ghcx*)
6218ff559fabSmrg	    # Green Hills C++ Compiler
6219ff559fabSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6220ff559fabSmrg	    ;;
6221ff559fabSmrg	  *)
6222ff559fabSmrg	    ;;
6223ff559fabSmrg	esac
6224ff559fabSmrg	;;
6225ff559fabSmrg      freebsd* | kfreebsd*-gnu | dragonfly*)
6226ff559fabSmrg	# FreeBSD uses GNU C++
6227ff559fabSmrg	;;
6228ff559fabSmrg      hpux9* | hpux10* | hpux11*)
6229ff559fabSmrg	case $cc_basename in
6230ff559fabSmrg	  CC*)
6231ff559fabSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6232ff559fabSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
6233ff559fabSmrg	    if test "$host_cpu" != ia64; then
6234ff559fabSmrg	      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
6235ff559fabSmrg	    fi
6236ff559fabSmrg	    ;;
6237ff559fabSmrg	  aCC*)
6238ff559fabSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6239ff559fabSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
6240ff559fabSmrg	    case $host_cpu in
6241ff559fabSmrg	    hppa*64*|ia64*)
6242ff559fabSmrg	      # +Z the default
6243ff559fabSmrg	      ;;
6244ff559fabSmrg	    *)
6245ff559fabSmrg	      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
6246ff559fabSmrg	      ;;
6247ff559fabSmrg	    esac
6248ff559fabSmrg	    ;;
6249ff559fabSmrg	  *)
6250ff559fabSmrg	    ;;
6251ff559fabSmrg	esac
6252ff559fabSmrg	;;
6253ff559fabSmrg      interix*)
6254ff559fabSmrg	# This is c89, which is MS Visual C++ (no shared libs)
6255ff559fabSmrg	# Anyone wants to do a port?
6256ff559fabSmrg	;;
6257ff559fabSmrg      irix5* | irix6* | nonstopux*)
6258ff559fabSmrg	case $cc_basename in
6259ff559fabSmrg	  CC*)
6260ff559fabSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6261ff559fabSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6262ff559fabSmrg	    # CC pic flag -KPIC is the default.
6263ff559fabSmrg	    ;;
6264ff559fabSmrg	  *)
6265ff559fabSmrg	    ;;
6266ff559fabSmrg	esac
6267ff559fabSmrg	;;
6268ff559fabSmrg      linux*)
6269ff559fabSmrg	case $cc_basename in
6270ff559fabSmrg	  KCC*)
6271ff559fabSmrg	    # KAI C++ Compiler
6272ff559fabSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
6273ff559fabSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6274ff559fabSmrg	    ;;
6275ff559fabSmrg	  icpc* | ecpc*)
6276ff559fabSmrg	    # Intel C++
6277ff559fabSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6278ff559fabSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6279ff559fabSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
6280ff559fabSmrg	    ;;
6281ff559fabSmrg	  pgCC*)
6282ff559fabSmrg	    # Portland Group C++ compiler.
6283ff559fabSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6284ff559fabSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
6285ff559fabSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6286ff559fabSmrg	    ;;
6287ff559fabSmrg	  cxx*)
6288ff559fabSmrg	    # Compaq C++
6289ff559fabSmrg	    # Make sure the PIC flag is empty.  It appears that all Alpha
6290ff559fabSmrg	    # Linux and Compaq Tru64 Unix objects are PIC.
6291ff559fabSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
6292ff559fabSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6293ff559fabSmrg	    ;;
6294ff559fabSmrg	  *)
6295ff559fabSmrg	    ;;
6296ff559fabSmrg	esac
6297ff559fabSmrg	;;
6298ff559fabSmrg      lynxos*)
6299ff559fabSmrg	;;
6300ff559fabSmrg      m88k*)
6301ff559fabSmrg	;;
6302ff559fabSmrg      mvs*)
6303ff559fabSmrg	case $cc_basename in
6304ff559fabSmrg	  cxx*)
6305ff559fabSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
6306ff559fabSmrg	    ;;
6307ff559fabSmrg	  *)
6308ff559fabSmrg	    ;;
6309ff559fabSmrg	esac
6310ff559fabSmrg	;;
6311ff559fabSmrg      netbsd*)
6312ff559fabSmrg	;;
6313ff559fabSmrg      osf3* | osf4* | osf5*)
6314ff559fabSmrg	case $cc_basename in
6315ff559fabSmrg	  KCC*)
6316ff559fabSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
6317ff559fabSmrg	    ;;
6318ff559fabSmrg	  RCC*)
6319ff559fabSmrg	    # Rational C++ 2.4.1
6320ff559fabSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6321ff559fabSmrg	    ;;
6322ff559fabSmrg	  cxx*)
6323ff559fabSmrg	    # Digital/Compaq C++
6324ff559fabSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6325ff559fabSmrg	    # Make sure the PIC flag is empty.  It appears that all Alpha
6326ff559fabSmrg	    # Linux and Compaq Tru64 Unix objects are PIC.
6327ff559fabSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
6328ff559fabSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6329ff559fabSmrg	    ;;
6330ff559fabSmrg	  *)
6331ff559fabSmrg	    ;;
6332ff559fabSmrg	esac
6333ff559fabSmrg	;;
6334ff559fabSmrg      psos*)
6335ff559fabSmrg	;;
6336ff559fabSmrg      solaris*)
6337ff559fabSmrg	case $cc_basename in
6338ff559fabSmrg	  CC*)
6339ff559fabSmrg	    # Sun C++ 4.2, 5.x and Centerline C++
6340ff559fabSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6341ff559fabSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6342ff559fabSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
6343ff559fabSmrg	    ;;
6344ff559fabSmrg	  gcx*)
6345ff559fabSmrg	    # Green Hills C++ Compiler
6346ff559fabSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
6347ff559fabSmrg	    ;;
6348ff559fabSmrg	  *)
6349ff559fabSmrg	    ;;
6350ff559fabSmrg	esac
6351ff559fabSmrg	;;
6352ff559fabSmrg      sunos4*)
6353ff559fabSmrg	case $cc_basename in
6354ff559fabSmrg	  CC*)
6355ff559fabSmrg	    # Sun C++ 4.x
6356ff559fabSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6357ff559fabSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6358ff559fabSmrg	    ;;
6359ff559fabSmrg	  lcc*)
6360ff559fabSmrg	    # Lucid
6361ff559fabSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6362ff559fabSmrg	    ;;
6363ff559fabSmrg	  *)
6364ff559fabSmrg	    ;;
6365ff559fabSmrg	esac
6366ff559fabSmrg	;;
6367ff559fabSmrg      tandem*)
6368ff559fabSmrg	case $cc_basename in
6369ff559fabSmrg	  NCC*)
6370ff559fabSmrg	    # NonStop-UX NCC 3.20
6371ff559fabSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6372ff559fabSmrg	    ;;
6373ff559fabSmrg	  *)
6374ff559fabSmrg	    ;;
6375ff559fabSmrg	esac
6376ff559fabSmrg	;;
6377ff559fabSmrg      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
6378ff559fabSmrg	case $cc_basename in
6379ff559fabSmrg	  CC*)
6380ff559fabSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6381ff559fabSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6382ff559fabSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6383ff559fabSmrg	    ;;
6384ff559fabSmrg	esac
6385ff559fabSmrg	;;
6386ff559fabSmrg      vxworks*)
6387ff559fabSmrg	;;
6388ff559fabSmrg      *)
6389ff559fabSmrg	_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
6390ff559fabSmrg	;;
6391ff559fabSmrg    esac
6392ff559fabSmrg  fi
6393ff559fabSmrg],
6394ff559fabSmrg[
6395ff559fabSmrg  if test "$GCC" = yes; then
6396ff559fabSmrg    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6397ff559fabSmrg    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
6398ff559fabSmrg
6399ff559fabSmrg    case $host_os in
6400ff559fabSmrg      aix*)
6401ff559fabSmrg      # All AIX code is PIC.
6402ff559fabSmrg      if test "$host_cpu" = ia64; then
6403ff559fabSmrg	# AIX 5 now supports IA64 processor
6404ff559fabSmrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6405ff559fabSmrg      fi
6406ff559fabSmrg      ;;
6407ff559fabSmrg
6408ff559fabSmrg    amigaos*)
6409ff559fabSmrg      # FIXME: we need at least 68020 code to build shared libraries, but
6410ff559fabSmrg      # adding the `-m68020' flag to GCC prevents building anything better,
6411ff559fabSmrg      # like `-m68040'.
6412ff559fabSmrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
6413ff559fabSmrg      ;;
6414ff559fabSmrg
6415ff559fabSmrg    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
6416ff559fabSmrg      # PIC is the default for these OSes.
6417ff559fabSmrg      ;;
6418ff559fabSmrg
6419ff559fabSmrg    mingw* | pw32* | os2*)
6420ff559fabSmrg      # This hack is so that the source file can tell whether it is being
6421ff559fabSmrg      # built for inclusion in a dll (and should export symbols for example).
6422ff559fabSmrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
6423ff559fabSmrg      ;;
6424ff559fabSmrg
6425ff559fabSmrg    darwin* | rhapsody*)
6426ff559fabSmrg      # PIC is the default on this platform
6427ff559fabSmrg      # Common symbols not allowed in MH_DYLIB files
6428ff559fabSmrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
6429ff559fabSmrg      ;;
6430ff559fabSmrg
6431ff559fabSmrg    interix3*)
6432ff559fabSmrg      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
6433ff559fabSmrg      # Instead, we relocate shared libraries at runtime.
6434ff559fabSmrg      ;;
6435ff559fabSmrg
6436ff559fabSmrg    msdosdjgpp*)
6437ff559fabSmrg      # Just because we use GCC doesn't mean we suddenly get shared libraries
6438ff559fabSmrg      # on systems that don't support them.
6439ff559fabSmrg      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
6440ff559fabSmrg      enable_shared=no
6441ff559fabSmrg      ;;
6442ff559fabSmrg
6443ff559fabSmrg    sysv4*MP*)
6444ff559fabSmrg      if test -d /usr/nec; then
6445ff559fabSmrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
6446ff559fabSmrg      fi
6447ff559fabSmrg      ;;
6448ff559fabSmrg
6449ff559fabSmrg    hpux*)
6450ff559fabSmrg      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
6451ff559fabSmrg      # not for PA HP-UX.
6452ff559fabSmrg      case $host_cpu in
6453ff559fabSmrg      hppa*64*|ia64*)
6454ff559fabSmrg	# +Z the default
6455ff559fabSmrg	;;
6456ff559fabSmrg      *)
6457ff559fabSmrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6458ff559fabSmrg	;;
6459ff559fabSmrg      esac
6460ff559fabSmrg      ;;
6461ff559fabSmrg
6462ff559fabSmrg    *)
6463ff559fabSmrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6464ff559fabSmrg      ;;
6465ff559fabSmrg    esac
6466ff559fabSmrg  else
6467ff559fabSmrg    # PORTME Check for flag to pass linker flags through the system compiler.
6468ff559fabSmrg    case $host_os in
6469ff559fabSmrg    aix*)
6470ff559fabSmrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6471ff559fabSmrg      if test "$host_cpu" = ia64; then
6472ff559fabSmrg	# AIX 5 now supports IA64 processor
6473ff559fabSmrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6474ff559fabSmrg      else
6475ff559fabSmrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
6476ff559fabSmrg      fi
6477ff559fabSmrg      ;;
6478ff559fabSmrg      darwin*)
6479ff559fabSmrg        # PIC is the default on this platform
6480ff559fabSmrg        # Common symbols not allowed in MH_DYLIB files
6481ff559fabSmrg       case $cc_basename in
6482ff559fabSmrg         xlc*)
6483ff559fabSmrg         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
6484ff559fabSmrg         _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6485ff559fabSmrg         ;;
6486ff559fabSmrg       esac
6487ff559fabSmrg       ;;
6488ff559fabSmrg
6489ff559fabSmrg    mingw* | pw32* | os2*)
6490ff559fabSmrg      # This hack is so that the source file can tell whether it is being
6491ff559fabSmrg      # built for inclusion in a dll (and should export symbols for example).
6492ff559fabSmrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
6493ff559fabSmrg      ;;
6494ff559fabSmrg
6495ff559fabSmrg    hpux9* | hpux10* | hpux11*)
6496ff559fabSmrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6497ff559fabSmrg      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
6498ff559fabSmrg      # not for PA HP-UX.
6499ff559fabSmrg      case $host_cpu in
6500ff559fabSmrg      hppa*64*|ia64*)
6501ff559fabSmrg	# +Z the default
6502ff559fabSmrg	;;
6503ff559fabSmrg      *)
6504ff559fabSmrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
6505ff559fabSmrg	;;
6506ff559fabSmrg      esac
6507ff559fabSmrg      # Is there a better lt_prog_compiler_static that works with the bundled CC?
6508ff559fabSmrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
6509ff559fabSmrg      ;;
6510ff559fabSmrg
6511ff559fabSmrg    irix5* | irix6* | nonstopux*)
6512ff559fabSmrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6513ff559fabSmrg      # PIC (with -KPIC) is the default.
6514ff559fabSmrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6515ff559fabSmrg      ;;
6516ff559fabSmrg
6517ff559fabSmrg    newsos6)
6518ff559fabSmrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6519ff559fabSmrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6520ff559fabSmrg      ;;
6521ff559fabSmrg
6522ff559fabSmrg    linux*)
6523ff559fabSmrg      case $cc_basename in
6524ff559fabSmrg      icc* | ecc*)
6525ff559fabSmrg	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6526ff559fabSmrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6527ff559fabSmrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
6528ff559fabSmrg        ;;
6529ff559fabSmrg      pgcc* | pgf77* | pgf90* | pgf95*)
6530ff559fabSmrg        # Portland Group compilers (*not* the Pentium gcc compiler,
6531ff559fabSmrg	# which looks to be a dead project)
6532ff559fabSmrg	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6533ff559fabSmrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
6534ff559fabSmrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6535ff559fabSmrg        ;;
6536ff559fabSmrg      ccc*)
6537ff559fabSmrg        _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6538ff559fabSmrg        # All Alpha code is PIC.
6539ff559fabSmrg        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6540ff559fabSmrg        ;;
6541ff559fabSmrg      esac
6542ff559fabSmrg      ;;
6543ff559fabSmrg
6544ff559fabSmrg    osf3* | osf4* | osf5*)
6545ff559fabSmrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6546ff559fabSmrg      # All OSF/1 code is PIC.
6547ff559fabSmrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6548ff559fabSmrg      ;;
6549ff559fabSmrg
6550ff559fabSmrg    solaris*)
6551ff559fabSmrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6552ff559fabSmrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6553ff559fabSmrg      case $cc_basename in
6554ff559fabSmrg      f77* | f90* | f95*)
6555ff559fabSmrg	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
6556ff559fabSmrg      *)
6557ff559fabSmrg	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
6558ff559fabSmrg      esac
6559ff559fabSmrg      ;;
6560ff559fabSmrg
6561ff559fabSmrg    sunos4*)
6562ff559fabSmrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
6563ff559fabSmrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
6564ff559fabSmrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6565ff559fabSmrg      ;;
6566ff559fabSmrg
6567ff559fabSmrg    sysv4 | sysv4.2uw2* | sysv4.3*)
6568ff559fabSmrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6569ff559fabSmrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6570ff559fabSmrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6571ff559fabSmrg      ;;
6572ff559fabSmrg
6573ff559fabSmrg    sysv4*MP*)
6574ff559fabSmrg      if test -d /usr/nec ;then
6575ff559fabSmrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
6576ff559fabSmrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6577ff559fabSmrg      fi
6578ff559fabSmrg      ;;
6579ff559fabSmrg
6580ff559fabSmrg    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
6581ff559fabSmrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6582ff559fabSmrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6583ff559fabSmrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6584ff559fabSmrg      ;;
6585ff559fabSmrg
6586ff559fabSmrg    unicos*)
6587ff559fabSmrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6588ff559fabSmrg      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
6589ff559fabSmrg      ;;
6590ff559fabSmrg
6591ff559fabSmrg    uts4*)
6592ff559fabSmrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6593ff559fabSmrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6594ff559fabSmrg      ;;
6595ff559fabSmrg
6596ff559fabSmrg    *)
6597ff559fabSmrg      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
6598ff559fabSmrg      ;;
6599ff559fabSmrg    esac
6600ff559fabSmrg  fi
6601ff559fabSmrg])
6602ff559fabSmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
6603ff559fabSmrg
6604ff559fabSmrg#
6605ff559fabSmrg# Check to make sure the PIC flag actually works.
6606ff559fabSmrg#
6607ff559fabSmrgif test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
6608ff559fabSmrg  AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
6609ff559fabSmrg    _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
6610ff559fabSmrg    [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
6611ff559fabSmrg    [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
6612ff559fabSmrg     "" | " "*) ;;
6613ff559fabSmrg     *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
6614ff559fabSmrg     esac],
6615ff559fabSmrg    [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
6616ff559fabSmrg     _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
6617ff559fabSmrgfi
6618ff559fabSmrgcase $host_os in
6619ff559fabSmrg  # For platforms which do not support PIC, -DPIC is meaningless:
6620ff559fabSmrg  *djgpp*)
6621ff559fabSmrg    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
6622ff559fabSmrg    ;;
6623ff559fabSmrg  *)
6624ff559fabSmrg    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
6625ff559fabSmrg    ;;
6626ff559fabSmrgesac
6627ff559fabSmrg
6628ff559fabSmrg#
6629ff559fabSmrg# Check to make sure the static flag actually works.
6630ff559fabSmrg#
6631ff559fabSmrgwl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\"
6632ff559fabSmrgAC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
6633ff559fabSmrg  _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
6634ff559fabSmrg  $lt_tmp_static_flag,
6635ff559fabSmrg  [],
6636ff559fabSmrg  [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
6637ff559fabSmrg])
6638ff559fabSmrg
6639ff559fabSmrg
6640ff559fabSmrg# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
6641ff559fabSmrg# ------------------------------------
6642ff559fabSmrg# See if the linker supports building shared libraries.
6643ff559fabSmrgAC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
6644ff559fabSmrg[AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
6645ff559fabSmrgifelse([$1],[CXX],[
6646ff559fabSmrg  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
6647ff559fabSmrg  case $host_os in
6648ff559fabSmrg  aix4* | aix5*)
6649ff559fabSmrg    # If we're using GNU nm, then we don't want the "-C" option.
6650ff559fabSmrg    # -C means demangle to AIX nm, but means don't demangle with GNU nm
6651ff559fabSmrg    if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
6652ff559fabSmrg      _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'
6653ff559fabSmrg    else
6654ff559fabSmrg      _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'
6655ff559fabSmrg    fi
6656ff559fabSmrg    ;;
6657ff559fabSmrg  pw32*)
6658ff559fabSmrg    _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
6659ff559fabSmrg  ;;
6660ff559fabSmrg  cygwin* | mingw*)
6661ff559fabSmrg    _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'
6662ff559fabSmrg  ;;
6663ff559fabSmrg  *)
6664ff559fabSmrg    _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
6665ff559fabSmrg  ;;
6666ff559fabSmrg  esac
6667ff559fabSmrg],[
6668ff559fabSmrg  runpath_var=
6669ff559fabSmrg  _LT_AC_TAGVAR(allow_undefined_flag, $1)=
6670ff559fabSmrg  _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
6671ff559fabSmrg  _LT_AC_TAGVAR(archive_cmds, $1)=
6672ff559fabSmrg  _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
6673ff559fabSmrg  _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
6674ff559fabSmrg  _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
6675ff559fabSmrg  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
6676ff559fabSmrg  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
6677ff559fabSmrg  _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
6678ff559fabSmrg  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
6679ff559fabSmrg  _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
6680ff559fabSmrg  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
6681ff559fabSmrg  _LT_AC_TAGVAR(hardcode_direct, $1)=no
6682ff559fabSmrg  _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
6683ff559fabSmrg  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
6684ff559fabSmrg  _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
6685ff559fabSmrg  _LT_AC_TAGVAR(hardcode_automatic, $1)=no
6686ff559fabSmrg  _LT_AC_TAGVAR(module_cmds, $1)=
6687ff559fabSmrg  _LT_AC_TAGVAR(module_expsym_cmds, $1)=
6688ff559fabSmrg  _LT_AC_TAGVAR(always_export_symbols, $1)=no
6689ff559fabSmrg  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
6690ff559fabSmrg  # include_expsyms should be a list of space-separated symbols to be *always*
6691ff559fabSmrg  # included in the symbol list
6692ff559fabSmrg  _LT_AC_TAGVAR(include_expsyms, $1)=
6693ff559fabSmrg  # exclude_expsyms can be an extended regexp of symbols to exclude
6694ff559fabSmrg  # it will be wrapped by ` (' and `)$', so one must not match beginning or
6695ff559fabSmrg  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
6696ff559fabSmrg  # as well as any symbol that contains `d'.
6697ff559fabSmrg  _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
6698ff559fabSmrg  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
6699ff559fabSmrg  # platforms (ab)use it in PIC code, but their linkers get confused if
6700ff559fabSmrg  # the symbol is explicitly referenced.  Since portable code cannot
6701ff559fabSmrg  # rely on this symbol name, it's probably fine to never include it in
6702ff559fabSmrg  # preloaded symbol tables.
6703ff559fabSmrg  extract_expsyms_cmds=
6704ff559fabSmrg  # Just being paranoid about ensuring that cc_basename is set.
6705ff559fabSmrg  _LT_CC_BASENAME([$compiler])
6706ff559fabSmrg  case $host_os in
6707ff559fabSmrg  cygwin* | mingw* | pw32*)
6708ff559fabSmrg    # FIXME: the MSVC++ port hasn't been tested in a loooong time
6709ff559fabSmrg    # When not using gcc, we currently assume that we are using
6710ff559fabSmrg    # Microsoft Visual C++.
6711ff559fabSmrg    if test "$GCC" != yes; then
6712ff559fabSmrg      with_gnu_ld=no
6713ff559fabSmrg    fi
6714ff559fabSmrg    ;;
6715ff559fabSmrg  interix*)
6716ff559fabSmrg    # we just hope/assume this is gcc and not c89 (= MSVC++)
6717ff559fabSmrg    with_gnu_ld=yes
6718ff559fabSmrg    ;;
6719ff559fabSmrg  openbsd*)
6720ff559fabSmrg    with_gnu_ld=no
6721ff559fabSmrg    ;;
6722ff559fabSmrg  esac
6723ff559fabSmrg
6724ff559fabSmrg  _LT_AC_TAGVAR(ld_shlibs, $1)=yes
6725ff559fabSmrg  if test "$with_gnu_ld" = yes; then
6726ff559fabSmrg    # If archive_cmds runs LD, not CC, wlarc should be empty
6727ff559fabSmrg    wlarc='${wl}'
6728ff559fabSmrg
6729ff559fabSmrg    # Set some defaults for GNU ld with shared library support. These
6730ff559fabSmrg    # are reset later if shared libraries are not supported. Putting them
6731ff559fabSmrg    # here allows them to be overridden if necessary.
6732ff559fabSmrg    runpath_var=LD_RUN_PATH
6733ff559fabSmrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
6734ff559fabSmrg    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6735ff559fabSmrg    # ancient GNU ld didn't support --whole-archive et. al.
6736ff559fabSmrg    if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
6737ff559fabSmrg	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
6738ff559fabSmrg      else
6739ff559fabSmrg  	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
6740ff559fabSmrg    fi
6741ff559fabSmrg    supports_anon_versioning=no
6742ff559fabSmrg    case `$LD -v 2>/dev/null` in
6743ff559fabSmrg      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
6744ff559fabSmrg      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
6745ff559fabSmrg      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
6746ff559fabSmrg      *\ 2.11.*) ;; # other 2.11 versions
6747ff559fabSmrg      *) supports_anon_versioning=yes ;;
6748ff559fabSmrg    esac
6749ff559fabSmrg
6750ff559fabSmrg    # See if GNU ld supports shared libraries.
6751ff559fabSmrg    case $host_os in
6752ff559fabSmrg    aix3* | aix4* | aix5*)
6753ff559fabSmrg      # On AIX/PPC, the GNU linker is very broken
6754ff559fabSmrg      if test "$host_cpu" != ia64; then
6755ff559fabSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
6756ff559fabSmrg	cat <<EOF 1>&2
6757ff559fabSmrg
6758ff559fabSmrg*** Warning: the GNU linker, at least up to release 2.9.1, is reported
6759ff559fabSmrg*** to be unable to reliably create shared libraries on AIX.
6760ff559fabSmrg*** Therefore, libtool is disabling shared libraries support.  If you
6761ff559fabSmrg*** really care for shared libraries, you may want to modify your PATH
6762ff559fabSmrg*** so that a non-GNU linker is found, and then restart.
6763ff559fabSmrg
6764ff559fabSmrgEOF
6765ff559fabSmrg      fi
6766ff559fabSmrg      ;;
6767ff559fabSmrg
6768ff559fabSmrg    amigaos*)
6769ff559fabSmrg      _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)'
6770ff559fabSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6771ff559fabSmrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6772ff559fabSmrg
6773ff559fabSmrg      # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
6774ff559fabSmrg      # that the semantics of dynamic libraries on AmigaOS, at least up
6775ff559fabSmrg      # to version 4, is to share data among multiple programs linked
6776ff559fabSmrg      # with the same dynamic library.  Since this doesn't match the
6777ff559fabSmrg      # behavior of shared libraries on other platforms, we can't use
6778ff559fabSmrg      # them.
6779ff559fabSmrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
6780ff559fabSmrg      ;;
6781ff559fabSmrg
6782ff559fabSmrg    beos*)
6783ff559fabSmrg      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
6784ff559fabSmrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6785ff559fabSmrg	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
6786ff559fabSmrg	# support --undefined.  This deserves some investigation.  FIXME
6787ff559fabSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6788ff559fabSmrg      else
6789ff559fabSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
6790ff559fabSmrg      fi
6791ff559fabSmrg      ;;
6792ff559fabSmrg
6793ff559fabSmrg    cygwin* | mingw* | pw32*)
6794ff559fabSmrg      # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
6795ff559fabSmrg      # as there is no search path for DLLs.
6796ff559fabSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6797ff559fabSmrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6798ff559fabSmrg      _LT_AC_TAGVAR(always_export_symbols, $1)=no
6799ff559fabSmrg      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6800ff559fabSmrg      _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'
6801ff559fabSmrg
6802ff559fabSmrg      if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
6803ff559fabSmrg        _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'
6804ff559fabSmrg	# If the export-symbols file already is a .def file (1st line
6805ff559fabSmrg	# is EXPORTS), use it as is; otherwise, prepend...
6806ff559fabSmrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6807ff559fabSmrg	  cp $export_symbols $output_objdir/$soname.def;
6808ff559fabSmrg	else
6809ff559fabSmrg	  echo EXPORTS > $output_objdir/$soname.def;
6810ff559fabSmrg	  cat $export_symbols >> $output_objdir/$soname.def;
6811ff559fabSmrg	fi~
6812ff559fabSmrg	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
6813ff559fabSmrg      else
6814ff559fabSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
6815ff559fabSmrg      fi
6816ff559fabSmrg      ;;
6817ff559fabSmrg
6818ff559fabSmrg    interix3*)
6819ff559fabSmrg      _LT_AC_TAGVAR(hardcode_direct, $1)=no
6820ff559fabSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6821ff559fabSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6822ff559fabSmrg      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6823ff559fabSmrg      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
6824ff559fabSmrg      # Instead, shared libraries are loaded at an image base (0x10000000 by
6825ff559fabSmrg      # default) and relocated if they conflict, which is a slow very memory
6826ff559fabSmrg      # consuming and fragmenting process.  To avoid this, we pick a random,
6827ff559fabSmrg      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
6828ff559fabSmrg      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
6829ff559fabSmrg      _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'
6830ff559fabSmrg      _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'
6831ff559fabSmrg      ;;
6832ff559fabSmrg
6833ff559fabSmrg    linux*)
6834ff559fabSmrg      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
6835ff559fabSmrg	tmp_addflag=
6836ff559fabSmrg	case $cc_basename,$host_cpu in
6837ff559fabSmrg	pgcc*)				# Portland Group C compiler
6838ff559fabSmrg	  _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'
6839ff559fabSmrg	  tmp_addflag=' $pic_flag'
6840ff559fabSmrg	  ;;
6841ff559fabSmrg	pgf77* | pgf90* | pgf95*)	# Portland Group f77 and f90 compilers
6842ff559fabSmrg	  _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'
6843ff559fabSmrg	  tmp_addflag=' $pic_flag -Mnomain' ;;
6844ff559fabSmrg	ecc*,ia64* | icc*,ia64*)		# Intel C compiler on ia64
6845ff559fabSmrg	  tmp_addflag=' -i_dynamic' ;;
6846ff559fabSmrg	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
6847ff559fabSmrg	  tmp_addflag=' -i_dynamic -nofor_main' ;;
6848ff559fabSmrg	ifc* | ifort*)			# Intel Fortran compiler
6849ff559fabSmrg	  tmp_addflag=' -nofor_main' ;;
6850ff559fabSmrg	esac
6851ff559fabSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6852ff559fabSmrg
6853ff559fabSmrg	if test $supports_anon_versioning = yes; then
6854ff559fabSmrg	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~
6855ff559fabSmrg  cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
6856ff559fabSmrg  $echo "local: *; };" >> $output_objdir/$libname.ver~
6857ff559fabSmrg	  $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
6858ff559fabSmrg	fi
6859ff559fabSmrg      else
6860ff559fabSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
6861ff559fabSmrg      fi
6862ff559fabSmrg      ;;
6863ff559fabSmrg
6864ff559fabSmrg    netbsd*)
6865ff559fabSmrg      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6866ff559fabSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
6867ff559fabSmrg	wlarc=
6868ff559fabSmrg      else
6869ff559fabSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6870ff559fabSmrg	_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'
6871ff559fabSmrg      fi
6872ff559fabSmrg      ;;
6873ff559fabSmrg
6874ff559fabSmrg    solaris*)
6875ff559fabSmrg      if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
6876ff559fabSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
6877ff559fabSmrg	cat <<EOF 1>&2
6878ff559fabSmrg
6879ff559fabSmrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably
6880ff559fabSmrg*** create shared libraries on Solaris systems.  Therefore, libtool
6881ff559fabSmrg*** is disabling shared libraries support.  We urge you to upgrade GNU
6882ff559fabSmrg*** binutils to release 2.9.1 or newer.  Another option is to modify
6883ff559fabSmrg*** your PATH or compiler configuration so that the native linker is
6884ff559fabSmrg*** used, and then restart.
6885ff559fabSmrg
6886ff559fabSmrgEOF
6887ff559fabSmrg      elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
6888ff559fabSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6889ff559fabSmrg	_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'
6890ff559fabSmrg      else
6891ff559fabSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
6892ff559fabSmrg      fi
6893ff559fabSmrg      ;;
6894ff559fabSmrg
6895ff559fabSmrg    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
6896ff559fabSmrg      case `$LD -v 2>&1` in
6897ff559fabSmrg        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 
6898ff559fabSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
6899ff559fabSmrg	cat <<_LT_EOF 1>&2
6900ff559fabSmrg
6901ff559fabSmrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
6902ff559fabSmrg*** reliably create shared libraries on SCO systems.  Therefore, libtool
6903ff559fabSmrg*** is disabling shared libraries support.  We urge you to upgrade GNU
6904ff559fabSmrg*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
6905ff559fabSmrg*** your PATH or compiler configuration so that the native linker is
6906ff559fabSmrg*** used, and then restart.
6907ff559fabSmrg
6908ff559fabSmrg_LT_EOF
6909ff559fabSmrg	;;
6910ff559fabSmrg	*)
6911ff559fabSmrg	  if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
6912ff559fabSmrg	    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
6913ff559fabSmrg	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib'
6914ff559fabSmrg	    _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'
6915ff559fabSmrg	  else
6916ff559fabSmrg	    _LT_AC_TAGVAR(ld_shlibs, $1)=no
6917ff559fabSmrg	  fi
6918ff559fabSmrg	;;
6919ff559fabSmrg      esac
6920ff559fabSmrg      ;;
6921ff559fabSmrg
6922ff559fabSmrg    sunos4*)
6923ff559fabSmrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6924ff559fabSmrg      wlarc=
6925ff559fabSmrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6926ff559fabSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6927ff559fabSmrg      ;;
6928ff559fabSmrg
6929ff559fabSmrg    *)
6930ff559fabSmrg      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
6931ff559fabSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6932ff559fabSmrg	_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'
6933ff559fabSmrg      else
6934ff559fabSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
6935ff559fabSmrg      fi
6936ff559fabSmrg      ;;
6937ff559fabSmrg    esac
6938ff559fabSmrg
6939ff559fabSmrg    if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then
6940ff559fabSmrg      runpath_var=
6941ff559fabSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
6942ff559fabSmrg      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
6943ff559fabSmrg      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
6944ff559fabSmrg    fi
6945ff559fabSmrg  else
6946ff559fabSmrg    # PORTME fill in a description of your system's linker (not GNU ld)
6947ff559fabSmrg    case $host_os in
6948ff559fabSmrg    aix3*)
6949ff559fabSmrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6950ff559fabSmrg      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
6951ff559fabSmrg      _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'
6952ff559fabSmrg      # Note: this linker hardcodes the directories in LIBPATH if there
6953ff559fabSmrg      # are no directories specified by -L.
6954ff559fabSmrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6955ff559fabSmrg      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
6956ff559fabSmrg	# Neither direct hardcoding nor static linking is supported with a
6957ff559fabSmrg	# broken collect2.
6958ff559fabSmrg	_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
6959ff559fabSmrg      fi
6960ff559fabSmrg      ;;
6961ff559fabSmrg
6962ff559fabSmrg    aix4* | aix5*)
6963ff559fabSmrg      if test "$host_cpu" = ia64; then
6964ff559fabSmrg	# On IA64, the linker does run time linking by default, so we don't
6965ff559fabSmrg	# have to do anything special.
6966ff559fabSmrg	aix_use_runtimelinking=no
6967ff559fabSmrg	exp_sym_flag='-Bexport'
6968ff559fabSmrg	no_entry_flag=""
6969ff559fabSmrg      else
6970ff559fabSmrg	# If we're using GNU nm, then we don't want the "-C" option.
6971ff559fabSmrg	# -C means demangle to AIX nm, but means don't demangle with GNU nm
6972ff559fabSmrg	if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
6973ff559fabSmrg	  _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'
6974ff559fabSmrg	else
6975ff559fabSmrg	  _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'
6976ff559fabSmrg	fi
6977ff559fabSmrg	aix_use_runtimelinking=no
6978ff559fabSmrg
6979ff559fabSmrg	# Test if we are trying to use run time linking or normal
6980ff559fabSmrg	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
6981ff559fabSmrg	# need to do runtime linking.
6982ff559fabSmrg	case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
6983ff559fabSmrg	  for ld_flag in $LDFLAGS; do
6984ff559fabSmrg  	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
6985ff559fabSmrg  	    aix_use_runtimelinking=yes
6986ff559fabSmrg  	    break
6987ff559fabSmrg  	  fi
6988ff559fabSmrg	  done
6989ff559fabSmrg	  ;;
6990ff559fabSmrg	esac
6991ff559fabSmrg
6992ff559fabSmrg	exp_sym_flag='-bexport'
6993ff559fabSmrg	no_entry_flag='-bnoentry'
6994ff559fabSmrg      fi
6995ff559fabSmrg
6996ff559fabSmrg      # When large executables or shared objects are built, AIX ld can
6997ff559fabSmrg      # have problems creating the table of contents.  If linking a library
6998ff559fabSmrg      # or program results in "error TOC overflow" add -mminimal-toc to
6999ff559fabSmrg      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
7000ff559fabSmrg      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
7001ff559fabSmrg
7002ff559fabSmrg      _LT_AC_TAGVAR(archive_cmds, $1)=''
7003ff559fabSmrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
7004ff559fabSmrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
7005ff559fabSmrg      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
7006ff559fabSmrg
7007ff559fabSmrg      if test "$GCC" = yes; then
7008ff559fabSmrg	case $host_os in aix4.[[012]]|aix4.[[012]].*)
7009ff559fabSmrg	# We only want to do this on AIX 4.2 and lower, the check
7010ff559fabSmrg	# below for broken collect2 doesn't work under 4.3+
7011ff559fabSmrg	  collect2name=`${CC} -print-prog-name=collect2`
7012ff559fabSmrg	  if test -f "$collect2name" && \
7013ff559fabSmrg  	   strings "$collect2name" | grep resolve_lib_name >/dev/null
7014ff559fabSmrg	  then
7015ff559fabSmrg  	  # We have reworked collect2
7016ff559fabSmrg  	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes
7017ff559fabSmrg	  else
7018ff559fabSmrg  	  # We have old collect2
7019ff559fabSmrg  	  _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
7020ff559fabSmrg  	  # It fails to find uninstalled libraries when the uninstalled
7021ff559fabSmrg  	  # path is not listed in the libpath.  Setting hardcode_minus_L
7022ff559fabSmrg  	  # to unsupported forces relinking
7023ff559fabSmrg  	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
7024ff559fabSmrg  	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7025ff559fabSmrg  	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
7026ff559fabSmrg	  fi
7027ff559fabSmrg	  ;;
7028ff559fabSmrg	esac
7029ff559fabSmrg	shared_flag='-shared'
7030ff559fabSmrg	if test "$aix_use_runtimelinking" = yes; then
7031ff559fabSmrg	  shared_flag="$shared_flag "'${wl}-G'
7032ff559fabSmrg	fi
7033ff559fabSmrg      else
7034ff559fabSmrg	# not using gcc
7035ff559fabSmrg	if test "$host_cpu" = ia64; then
7036ff559fabSmrg  	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
7037ff559fabSmrg  	# chokes on -Wl,-G. The following line is correct:
7038ff559fabSmrg	  shared_flag='-G'
7039ff559fabSmrg	else
7040ff559fabSmrg	  if test "$aix_use_runtimelinking" = yes; then
7041ff559fabSmrg	    shared_flag='${wl}-G'
7042ff559fabSmrg	  else
7043ff559fabSmrg	    shared_flag='${wl}-bM:SRE'
7044ff559fabSmrg	  fi
7045ff559fabSmrg	fi
7046ff559fabSmrg      fi
7047ff559fabSmrg
7048ff559fabSmrg      # It seems that -bexpall does not export symbols beginning with
7049ff559fabSmrg      # underscore (_), so it is better to generate a list of symbols to export.
7050ff559fabSmrg      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
7051ff559fabSmrg      if test "$aix_use_runtimelinking" = yes; then
7052ff559fabSmrg	# Warning - without using the other runtime loading flags (-brtl),
7053ff559fabSmrg	# -berok will link without error, but may produce a broken library.
7054ff559fabSmrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
7055ff559fabSmrg       # Determine the default libpath from the value encoded in an empty executable.
7056ff559fabSmrg       _LT_AC_SYS_LIBPATH_AIX
7057ff559fabSmrg       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
7058ff559fabSmrg	_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"
7059ff559fabSmrg       else
7060ff559fabSmrg	if test "$host_cpu" = ia64; then
7061ff559fabSmrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
7062ff559fabSmrg	  _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
7063ff559fabSmrg	  _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"
7064ff559fabSmrg	else
7065ff559fabSmrg	 # Determine the default libpath from the value encoded in an empty executable.
7066ff559fabSmrg	 _LT_AC_SYS_LIBPATH_AIX
7067ff559fabSmrg	 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
7068ff559fabSmrg	  # Warning - without using the other run time loading flags,
7069ff559fabSmrg	  # -berok will link without error, but may produce a broken library.
7070ff559fabSmrg	  _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
7071ff559fabSmrg	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
7072ff559fabSmrg	  # Exported symbols can be pulled into shared objects from archives
7073ff559fabSmrg	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
7074ff559fabSmrg	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
7075ff559fabSmrg	  # This is similar to how AIX traditionally builds its shared libraries.
7076ff559fabSmrg	  _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'
7077ff559fabSmrg	fi
7078ff559fabSmrg      fi
7079ff559fabSmrg      ;;
7080ff559fabSmrg
7081ff559fabSmrg    amigaos*)
7082ff559fabSmrg      _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)'
7083ff559fabSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7084ff559fabSmrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
7085ff559fabSmrg      # see comment about different semantics on the GNU ld section
7086ff559fabSmrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
7087ff559fabSmrg      ;;
7088ff559fabSmrg
7089ff559fabSmrg    bsdi[[45]]*)
7090ff559fabSmrg      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
7091ff559fabSmrg      ;;
7092ff559fabSmrg
7093ff559fabSmrg    cygwin* | mingw* | pw32*)
7094ff559fabSmrg      # When not using gcc, we currently assume that we are using
7095ff559fabSmrg      # Microsoft Visual C++.
7096ff559fabSmrg      # hardcode_libdir_flag_spec is actually meaningless, as there is
7097ff559fabSmrg      # no search path for DLLs.
7098ff559fabSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
7099ff559fabSmrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
7100ff559fabSmrg      # Tell ltmain to make .lib files, not .a files.
7101ff559fabSmrg      libext=lib
7102ff559fabSmrg      # Tell ltmain to make .dll files, not .so files.
7103ff559fabSmrg      shrext_cmds=".dll"
7104ff559fabSmrg      # FIXME: Setting linknames here is a bad hack.
7105ff559fabSmrg      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
7106ff559fabSmrg      # The linker will automatically build a .lib file if we build a DLL.
7107ff559fabSmrg      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
7108ff559fabSmrg      # FIXME: Should let the user specify the lib program.
7109ff559fabSmrg      _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
7110ff559fabSmrg      _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
7111ff559fabSmrg      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
7112ff559fabSmrg      ;;
7113ff559fabSmrg
7114ff559fabSmrg    darwin* | rhapsody*)
7115ff559fabSmrg      case $host_os in
7116ff559fabSmrg        rhapsody* | darwin1.[[012]])
7117ff559fabSmrg         _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
7118ff559fabSmrg         ;;
7119ff559fabSmrg       *) # Darwin 1.3 on
7120ff559fabSmrg         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
7121ff559fabSmrg           _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
7122ff559fabSmrg         else
7123ff559fabSmrg           case ${MACOSX_DEPLOYMENT_TARGET} in
7124ff559fabSmrg             10.[[012]])
7125ff559fabSmrg               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
7126ff559fabSmrg               ;;
7127ff559fabSmrg             10.*)
7128ff559fabSmrg               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
7129ff559fabSmrg               ;;
7130ff559fabSmrg           esac
7131ff559fabSmrg         fi
7132ff559fabSmrg         ;;
7133ff559fabSmrg      esac
7134ff559fabSmrg      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
7135ff559fabSmrg      _LT_AC_TAGVAR(hardcode_direct, $1)=no
7136ff559fabSmrg      _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
7137ff559fabSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
7138ff559fabSmrg      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
7139ff559fabSmrg      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
7140ff559fabSmrg    if test "$GCC" = yes ; then
7141ff559fabSmrg    	output_verbose_link_cmd='echo'
7142ff559fabSmrg        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
7143ff559fabSmrg      _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
7144ff559fabSmrg      # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
7145ff559fabSmrg      _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}'
7146ff559fabSmrg      _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}'
7147ff559fabSmrg    else
7148ff559fabSmrg      case $cc_basename in
7149ff559fabSmrg        xlc*)
7150ff559fabSmrg         output_verbose_link_cmd='echo'
7151ff559fabSmrg         _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'
7152ff559fabSmrg         _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
7153ff559fabSmrg          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
7154ff559fabSmrg         _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}'
7155ff559fabSmrg          _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}'
7156ff559fabSmrg          ;;
7157ff559fabSmrg       *)
7158ff559fabSmrg         _LT_AC_TAGVAR(ld_shlibs, $1)=no
7159ff559fabSmrg          ;;
7160ff559fabSmrg      esac
7161ff559fabSmrg    fi
7162ff559fabSmrg      ;;
7163ff559fabSmrg
7164ff559fabSmrg    dgux*)
7165ff559fabSmrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7166ff559fabSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7167ff559fabSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7168ff559fabSmrg      ;;
7169ff559fabSmrg
7170ff559fabSmrg    freebsd1*)
7171ff559fabSmrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
7172ff559fabSmrg      ;;
7173ff559fabSmrg
7174ff559fabSmrg    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
7175ff559fabSmrg    # support.  Future versions do this automatically, but an explicit c++rt0.o
7176ff559fabSmrg    # does not break anything, and helps significantly (at the cost of a little
7177ff559fabSmrg    # extra space).
7178ff559fabSmrg    freebsd2.2*)
7179ff559fabSmrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
7180ff559fabSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7181ff559fabSmrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
7182ff559fabSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7183ff559fabSmrg      ;;
7184ff559fabSmrg
7185ff559fabSmrg    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
7186ff559fabSmrg    freebsd2*)
7187ff559fabSmrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
7188ff559fabSmrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
7189ff559fabSmrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
7190ff559fabSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7191ff559fabSmrg      ;;
7192ff559fabSmrg
7193ff559fabSmrg    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
7194ff559fabSmrg    freebsd* | kfreebsd*-gnu | dragonfly*)
7195ff559fabSmrg      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
7196ff559fabSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7197ff559fabSmrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
7198ff559fabSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7199ff559fabSmrg      ;;
7200ff559fabSmrg
7201ff559fabSmrg    hpux9*)
7202ff559fabSmrg      if test "$GCC" = yes; then
7203ff559fabSmrg	_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'
7204ff559fabSmrg      else
7205ff559fabSmrg	_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'
7206ff559fabSmrg      fi
7207ff559fabSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
7208ff559fabSmrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
7209ff559fabSmrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
7210ff559fabSmrg
7211ff559fabSmrg      # hardcode_minus_L: Not really in the search PATH,
7212ff559fabSmrg      # but as the default location of the library.
7213ff559fabSmrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
7214ff559fabSmrg      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7215ff559fabSmrg      ;;
7216ff559fabSmrg
7217ff559fabSmrg    hpux10*)
7218ff559fabSmrg      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
7219ff559fabSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
7220ff559fabSmrg      else
7221ff559fabSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
7222ff559fabSmrg      fi
7223ff559fabSmrg      if test "$with_gnu_ld" = no; then
7224ff559fabSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
7225ff559fabSmrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
7226ff559fabSmrg
7227ff559fabSmrg	_LT_AC_TAGVAR(hardcode_direct, $1)=yes
7228ff559fabSmrg	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7229ff559fabSmrg
7230ff559fabSmrg	# hardcode_minus_L: Not really in the search PATH,
7231ff559fabSmrg	# but as the default location of the library.
7232ff559fabSmrg	_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
7233ff559fabSmrg      fi
7234ff559fabSmrg      ;;
7235ff559fabSmrg
7236ff559fabSmrg    hpux11*)
7237ff559fabSmrg      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
7238ff559fabSmrg	case $host_cpu in
7239ff559fabSmrg	hppa*64*)
7240ff559fabSmrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
7241ff559fabSmrg	  ;;
7242ff559fabSmrg	ia64*)
7243ff559fabSmrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
7244ff559fabSmrg	  ;;
7245ff559fabSmrg	*)
7246ff559fabSmrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
7247ff559fabSmrg	  ;;
7248ff559fabSmrg	esac
7249ff559fabSmrg      else
7250ff559fabSmrg	case $host_cpu in
7251ff559fabSmrg	hppa*64*)
7252ff559fabSmrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
7253ff559fabSmrg	  ;;
7254ff559fabSmrg	ia64*)
7255ff559fabSmrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
7256ff559fabSmrg	  ;;
7257ff559fabSmrg	*)
7258ff559fabSmrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
7259ff559fabSmrg	  ;;
7260ff559fabSmrg	esac
7261ff559fabSmrg      fi
7262ff559fabSmrg      if test "$with_gnu_ld" = no; then
7263ff559fabSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
7264ff559fabSmrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
7265ff559fabSmrg
7266ff559fabSmrg	case $host_cpu in
7267ff559fabSmrg	hppa*64*|ia64*)
7268ff559fabSmrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
7269ff559fabSmrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=no
7270ff559fabSmrg	  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7271ff559fabSmrg	  ;;
7272ff559fabSmrg	*)
7273ff559fabSmrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes
7274ff559fabSmrg	  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7275ff559fabSmrg
7276ff559fabSmrg	  # hardcode_minus_L: Not really in the search PATH,
7277ff559fabSmrg	  # but as the default location of the library.
7278ff559fabSmrg	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
7279ff559fabSmrg	  ;;
7280ff559fabSmrg	esac
7281ff559fabSmrg      fi
7282ff559fabSmrg      ;;
7283ff559fabSmrg
7284ff559fabSmrg    irix5* | irix6* | nonstopux*)
7285ff559fabSmrg      if test "$GCC" = yes; then
7286ff559fabSmrg	_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'
7287ff559fabSmrg      else
7288ff559fabSmrg	_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'
7289ff559fabSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
7290ff559fabSmrg      fi
7291ff559fabSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7292ff559fabSmrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
7293ff559fabSmrg      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
7294ff559fabSmrg      ;;
7295ff559fabSmrg
7296ff559fabSmrg    netbsd*)
7297ff559fabSmrg      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
7298ff559fabSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
7299ff559fabSmrg      else
7300ff559fabSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
7301ff559fabSmrg      fi
7302ff559fabSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7303ff559fabSmrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
7304ff559fabSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7305ff559fabSmrg      ;;
7306ff559fabSmrg
7307ff559fabSmrg    newsos6)
7308ff559fabSmrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7309ff559fabSmrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
7310ff559fabSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7311ff559fabSmrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
7312ff559fabSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7313ff559fabSmrg      ;;
7314ff559fabSmrg
7315ff559fabSmrg    openbsd*)
7316ff559fabSmrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
7317ff559fabSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7318ff559fabSmrg      if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
7319ff559fabSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
7320ff559fabSmrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
7321ff559fabSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7322ff559fabSmrg	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7323ff559fabSmrg      else
7324ff559fabSmrg       case $host_os in
7325ff559fabSmrg	 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
7326ff559fabSmrg	   _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
7327ff559fabSmrg	   _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7328ff559fabSmrg	   ;;
7329ff559fabSmrg	 *)
7330ff559fabSmrg	   _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
7331ff559fabSmrg	   _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7332ff559fabSmrg	   ;;
7333ff559fabSmrg       esac
7334ff559fabSmrg      fi
7335ff559fabSmrg      ;;
7336ff559fabSmrg
7337ff559fabSmrg    os2*)
7338ff559fabSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7339ff559fabSmrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
7340ff559fabSmrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
7341ff559fabSmrg      _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'
7342ff559fabSmrg      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
7343ff559fabSmrg      ;;
7344ff559fabSmrg
7345ff559fabSmrg    osf3*)
7346ff559fabSmrg      if test "$GCC" = yes; then
7347ff559fabSmrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
7348ff559fabSmrg	_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'
7349ff559fabSmrg      else
7350ff559fabSmrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
7351ff559fabSmrg	_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'
7352ff559fabSmrg      fi
7353ff559fabSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7354ff559fabSmrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
7355ff559fabSmrg      ;;
7356ff559fabSmrg
7357ff559fabSmrg    osf4* | osf5*)	# as osf3* with the addition of -msym flag
7358ff559fabSmrg      if test "$GCC" = yes; then
7359ff559fabSmrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
7360ff559fabSmrg	_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'
7361ff559fabSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7362ff559fabSmrg      else
7363ff559fabSmrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
7364ff559fabSmrg	_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'
7365ff559fabSmrg	_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~
7366ff559fabSmrg	$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'
7367ff559fabSmrg
7368ff559fabSmrg	# Both c and cxx compiler support -rpath directly
7369ff559fabSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
7370ff559fabSmrg      fi
7371ff559fabSmrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
7372ff559fabSmrg      ;;
7373ff559fabSmrg
7374ff559fabSmrg    solaris*)
7375ff559fabSmrg      _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
7376ff559fabSmrg      if test "$GCC" = yes; then
7377ff559fabSmrg	wlarc='${wl}'
7378ff559fabSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
7379ff559fabSmrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
7380ff559fabSmrg	  $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
7381ff559fabSmrg      else
7382ff559fabSmrg	wlarc=''
7383ff559fabSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
7384ff559fabSmrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
7385ff559fabSmrg  	$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
7386ff559fabSmrg      fi
7387ff559fabSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7388ff559fabSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7389ff559fabSmrg      case $host_os in
7390ff559fabSmrg      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
7391ff559fabSmrg      *)
7392ff559fabSmrg 	# The compiler driver will combine linker options so we
7393ff559fabSmrg 	# cannot just pass the convience library names through
7394ff559fabSmrg 	# without $wl, iff we do not link with $LD.
7395ff559fabSmrg 	# Luckily, gcc supports the same syntax we need for Sun Studio.
7396ff559fabSmrg 	# Supported since Solaris 2.6 (maybe 2.5.1?)
7397ff559fabSmrg 	case $wlarc in
7398ff559fabSmrg 	'')
7399ff559fabSmrg 	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
7400ff559fabSmrg 	*)
7401ff559fabSmrg 	  _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' ;;
7402ff559fabSmrg 	esac ;;
7403ff559fabSmrg      esac
7404ff559fabSmrg      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
7405ff559fabSmrg      ;;
7406ff559fabSmrg
7407ff559fabSmrg    sunos4*)
7408ff559fabSmrg      if test "x$host_vendor" = xsequent; then
7409ff559fabSmrg	# Use $CC to link under sequent, because it throws in some extra .o
7410ff559fabSmrg	# files that make .init and .fini sections work.
7411ff559fabSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
7412ff559fabSmrg      else
7413ff559fabSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
7414ff559fabSmrg      fi
7415ff559fabSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7416ff559fabSmrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
7417ff559fabSmrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
7418ff559fabSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7419ff559fabSmrg      ;;
7420ff559fabSmrg
7421ff559fabSmrg    sysv4)
7422ff559fabSmrg      case $host_vendor in
7423ff559fabSmrg	sni)
7424ff559fabSmrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7425ff559fabSmrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
7426ff559fabSmrg	;;
7427ff559fabSmrg	siemens)
7428ff559fabSmrg	  ## LD is ld it makes a PLAMLIB
7429ff559fabSmrg	  ## CC just makes a GrossModule.
7430ff559fabSmrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
7431ff559fabSmrg	  _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
7432ff559fabSmrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=no
7433ff559fabSmrg        ;;
7434ff559fabSmrg	motorola)
7435ff559fabSmrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7436ff559fabSmrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
7437ff559fabSmrg	;;
7438ff559fabSmrg      esac
7439ff559fabSmrg      runpath_var='LD_RUN_PATH'
7440ff559fabSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7441ff559fabSmrg      ;;
7442ff559fabSmrg
7443ff559fabSmrg    sysv4.3*)
7444ff559fabSmrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7445ff559fabSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7446ff559fabSmrg      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
7447ff559fabSmrg      ;;
7448ff559fabSmrg
7449ff559fabSmrg    sysv4*MP*)
7450ff559fabSmrg      if test -d /usr/nec; then
7451ff559fabSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7452ff559fabSmrg	_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7453ff559fabSmrg	runpath_var=LD_RUN_PATH
7454ff559fabSmrg	hardcode_runpath_var=yes
7455ff559fabSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=yes
7456ff559fabSmrg      fi
7457ff559fabSmrg      ;;
7458ff559fabSmrg
7459ff559fabSmrg    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7*)
7460ff559fabSmrg      _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
7461ff559fabSmrg      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
7462ff559fabSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7463ff559fabSmrg      runpath_var='LD_RUN_PATH'
7464ff559fabSmrg
7465ff559fabSmrg      if test "$GCC" = yes; then
7466ff559fabSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7467ff559fabSmrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7468ff559fabSmrg      else
7469ff559fabSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7470ff559fabSmrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7471ff559fabSmrg      fi
7472ff559fabSmrg      ;;
7473ff559fabSmrg
7474ff559fabSmrg    sysv5* | sco3.2v5* | sco5v6*)
7475ff559fabSmrg      # Note: We can NOT use -z defs as we might desire, because we do not
7476ff559fabSmrg      # link with -lc, and that would cause any symbols used from libc to
7477ff559fabSmrg      # always be unresolved, which means just about no library would
7478ff559fabSmrg      # ever link correctly.  If we're not using GNU ld we use -z text
7479ff559fabSmrg      # though, which does catch some bad symbols but isn't as heavy-handed
7480ff559fabSmrg      # as -z defs.
7481ff559fabSmrg      _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
7482ff559fabSmrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
7483ff559fabSmrg      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
7484ff559fabSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7485ff559fabSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
7486ff559fabSmrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
7487ff559fabSmrg      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
7488ff559fabSmrg      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
7489ff559fabSmrg      runpath_var='LD_RUN_PATH'
7490ff559fabSmrg
7491ff559fabSmrg      if test "$GCC" = yes; then
7492ff559fabSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
7493ff559fabSmrg	_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'
7494ff559fabSmrg      else
7495ff559fabSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
7496ff559fabSmrg	_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'
7497ff559fabSmrg      fi
7498ff559fabSmrg      ;;
7499ff559fabSmrg
7500ff559fabSmrg    uts4*)
7501ff559fabSmrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7502ff559fabSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7503ff559fabSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7504ff559fabSmrg      ;;
7505ff559fabSmrg
7506ff559fabSmrg    *)
7507ff559fabSmrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
7508ff559fabSmrg      ;;
7509ff559fabSmrg    esac
7510ff559fabSmrg  fi
7511ff559fabSmrg])
7512ff559fabSmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
7513ff559fabSmrgtest "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
7514ff559fabSmrg
7515ff559fabSmrg#
7516ff559fabSmrg# Do we need to explicitly link libc?
7517ff559fabSmrg#
7518ff559fabSmrgcase "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
7519ff559fabSmrgx|xyes)
7520ff559fabSmrg  # Assume -lc should be added
7521ff559fabSmrg  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
7522ff559fabSmrg
7523ff559fabSmrg  if test "$enable_shared" = yes && test "$GCC" = yes; then
7524ff559fabSmrg    case $_LT_AC_TAGVAR(archive_cmds, $1) in
7525ff559fabSmrg    *'~'*)
7526ff559fabSmrg      # FIXME: we may have to deal with multi-command sequences.
7527ff559fabSmrg      ;;
7528ff559fabSmrg    '$CC '*)
7529ff559fabSmrg      # Test whether the compiler implicitly links with -lc since on some
7530ff559fabSmrg      # systems, -lgcc has to come before -lc. If gcc already passes -lc
7531ff559fabSmrg      # to ld, don't add -lc before -lgcc.
7532ff559fabSmrg      AC_MSG_CHECKING([whether -lc should be explicitly linked in])
7533ff559fabSmrg      $rm conftest*
7534ff559fabSmrg      printf "$lt_simple_compile_test_code" > conftest.$ac_ext
7535ff559fabSmrg
7536ff559fabSmrg      if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
7537ff559fabSmrg        soname=conftest
7538ff559fabSmrg        lib=conftest
7539ff559fabSmrg        libobjs=conftest.$ac_objext
7540ff559fabSmrg        deplibs=
7541ff559fabSmrg        wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
7542ff559fabSmrg	pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
7543ff559fabSmrg        compiler_flags=-v
7544ff559fabSmrg        linker_flags=-v
7545ff559fabSmrg        verstring=
7546ff559fabSmrg        output_objdir=.
7547ff559fabSmrg        libname=conftest
7548ff559fabSmrg        lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
7549ff559fabSmrg        _LT_AC_TAGVAR(allow_undefined_flag, $1)=
7550ff559fabSmrg        if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
7551ff559fabSmrg        then
7552ff559fabSmrg	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
7553ff559fabSmrg        else
7554ff559fabSmrg	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
7555ff559fabSmrg        fi
7556ff559fabSmrg        _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
7557ff559fabSmrg      else
7558ff559fabSmrg        cat conftest.err 1>&5
7559ff559fabSmrg      fi
7560ff559fabSmrg      $rm conftest*
7561ff559fabSmrg      AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
7562ff559fabSmrg      ;;
7563ff559fabSmrg    esac
7564ff559fabSmrg  fi
7565ff559fabSmrg  ;;
7566ff559fabSmrgesac
7567ff559fabSmrg])# AC_LIBTOOL_PROG_LD_SHLIBS
7568ff559fabSmrg
7569ff559fabSmrg
7570ff559fabSmrg# _LT_AC_FILE_LTDLL_C
7571ff559fabSmrg# -------------------
7572ff559fabSmrg# Be careful that the start marker always follows a newline.
7573ff559fabSmrgAC_DEFUN([_LT_AC_FILE_LTDLL_C], [
7574ff559fabSmrg# /* ltdll.c starts here */
7575ff559fabSmrg# #define WIN32_LEAN_AND_MEAN
7576ff559fabSmrg# #include <windows.h>
7577ff559fabSmrg# #undef WIN32_LEAN_AND_MEAN
7578ff559fabSmrg# #include <stdio.h>
7579ff559fabSmrg#
7580ff559fabSmrg# #ifndef __CYGWIN__
7581ff559fabSmrg# #  ifdef __CYGWIN32__
7582ff559fabSmrg# #    define __CYGWIN__ __CYGWIN32__
7583ff559fabSmrg# #  endif
7584ff559fabSmrg# #endif
7585ff559fabSmrg#
7586ff559fabSmrg# #ifdef __cplusplus
7587ff559fabSmrg# extern "C" {
7588ff559fabSmrg# #endif
7589ff559fabSmrg# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
7590ff559fabSmrg# #ifdef __cplusplus
7591ff559fabSmrg# }
7592ff559fabSmrg# #endif
7593ff559fabSmrg#
7594ff559fabSmrg# #ifdef __CYGWIN__
7595ff559fabSmrg# #include <cygwin/cygwin_dll.h>
7596ff559fabSmrg# DECLARE_CYGWIN_DLL( DllMain );
7597ff559fabSmrg# #endif
7598ff559fabSmrg# HINSTANCE __hDllInstance_base;
7599ff559fabSmrg#
7600ff559fabSmrg# BOOL APIENTRY
7601ff559fabSmrg# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
7602ff559fabSmrg# {
7603ff559fabSmrg#   __hDllInstance_base = hInst;
7604ff559fabSmrg#   return TRUE;
7605ff559fabSmrg# }
7606ff559fabSmrg# /* ltdll.c ends here */
7607ff559fabSmrg])# _LT_AC_FILE_LTDLL_C
7608ff559fabSmrg
7609ff559fabSmrg
7610ff559fabSmrg# _LT_AC_TAGVAR(VARNAME, [TAGNAME])
7611ff559fabSmrg# ---------------------------------
7612ff559fabSmrgAC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
7613ff559fabSmrg
7614ff559fabSmrg
7615ff559fabSmrg# old names
7616ff559fabSmrgAC_DEFUN([AM_PROG_LIBTOOL],   [AC_PROG_LIBTOOL])
7617ff559fabSmrgAC_DEFUN([AM_ENABLE_SHARED],  [AC_ENABLE_SHARED($@)])
7618ff559fabSmrgAC_DEFUN([AM_ENABLE_STATIC],  [AC_ENABLE_STATIC($@)])
7619ff559fabSmrgAC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
7620ff559fabSmrgAC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
7621ff559fabSmrgAC_DEFUN([AM_PROG_LD],        [AC_PROG_LD])
7622ff559fabSmrgAC_DEFUN([AM_PROG_NM],        [AC_PROG_NM])
7623ff559fabSmrg
7624ff559fabSmrg# This is just to silence aclocal about the macro not being used
7625ff559fabSmrgifelse([AC_DISABLE_FAST_INSTALL])
7626ff559fabSmrg
7627ff559fabSmrgAC_DEFUN([LT_AC_PROG_GCJ],
7628ff559fabSmrg[AC_CHECK_TOOL(GCJ, gcj, no)
7629ff559fabSmrg  test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
7630ff559fabSmrg  AC_SUBST(GCJFLAGS)
7631ff559fabSmrg])
7632ff559fabSmrg
7633ff559fabSmrgAC_DEFUN([LT_AC_PROG_RC],
7634ff559fabSmrg[AC_CHECK_TOOL(RC, windres, no)
7635ff559fabSmrg])
7636ff559fabSmrg
7637ff559fabSmrg# NOTE: This macro has been submitted for inclusion into   #
7638ff559fabSmrg#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
7639ff559fabSmrg#  a released version of Autoconf we should remove this    #
7640ff559fabSmrg#  macro and use it instead.                               #
7641ff559fabSmrg# LT_AC_PROG_SED
7642ff559fabSmrg# --------------
7643ff559fabSmrg# Check for a fully-functional sed program, that truncates
7644ff559fabSmrg# as few characters as possible.  Prefer GNU sed if found.
7645ff559fabSmrgAC_DEFUN([LT_AC_PROG_SED],
7646ff559fabSmrg[AC_MSG_CHECKING([for a sed that does not truncate output])
7647ff559fabSmrgAC_CACHE_VAL(lt_cv_path_SED,
7648ff559fabSmrg[# Loop through the user's path and test for sed and gsed.
7649ff559fabSmrg# Then use that list of sed's as ones to test for truncation.
7650ff559fabSmrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7651ff559fabSmrgfor as_dir in $PATH
7652ff559fabSmrgdo
7653ff559fabSmrg  IFS=$as_save_IFS
7654ff559fabSmrg  test -z "$as_dir" && as_dir=.
7655ff559fabSmrg  for lt_ac_prog in sed gsed; do
7656ff559fabSmrg    for ac_exec_ext in '' $ac_executable_extensions; do
7657ff559fabSmrg      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
7658ff559fabSmrg        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
7659ff559fabSmrg      fi
7660ff559fabSmrg    done
7661ff559fabSmrg  done
7662ff559fabSmrgdone
7663ff559fabSmrglt_ac_max=0
7664ff559fabSmrglt_ac_count=0
7665ff559fabSmrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris
7666ff559fabSmrg# along with /bin/sed that truncates output.
7667ff559fabSmrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
7668ff559fabSmrg  test ! -f $lt_ac_sed && continue
7669ff559fabSmrg  cat /dev/null > conftest.in
7670ff559fabSmrg  lt_ac_count=0
7671ff559fabSmrg  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
7672ff559fabSmrg  # Check for GNU sed and select it if it is found.
7673ff559fabSmrg  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
7674ff559fabSmrg    lt_cv_path_SED=$lt_ac_sed
7675ff559fabSmrg    break
7676ff559fabSmrg  fi
7677ff559fabSmrg  while true; do
7678ff559fabSmrg    cat conftest.in conftest.in >conftest.tmp
7679ff559fabSmrg    mv conftest.tmp conftest.in
7680ff559fabSmrg    cp conftest.in conftest.nl
7681ff559fabSmrg    echo >>conftest.nl
7682ff559fabSmrg    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
7683ff559fabSmrg    cmp -s conftest.out conftest.nl || break
7684ff559fabSmrg    # 10000 chars as input seems more than enough
7685ff559fabSmrg    test $lt_ac_count -gt 10 && break
7686ff559fabSmrg    lt_ac_count=`expr $lt_ac_count + 1`
7687ff559fabSmrg    if test $lt_ac_count -gt $lt_ac_max; then
7688ff559fabSmrg      lt_ac_max=$lt_ac_count
7689ff559fabSmrg      lt_cv_path_SED=$lt_ac_sed
7690ff559fabSmrg    fi
7691ff559fabSmrg  done
7692ff559fabSmrgdone
7693ff559fabSmrg])
7694ff559fabSmrgSED=$lt_cv_path_SED
7695ff559fabSmrgAC_MSG_RESULT([$SED])
7696ff559fabSmrg])
7697ff559fabSmrg
7698ff559fabSmrg# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
7699ff559fabSmrg# 
7700ff559fabSmrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
7701ff559fabSmrg#
7702ff559fabSmrg# This program is free software; you can redistribute it and/or modify
7703ff559fabSmrg# it under the terms of the GNU General Public License as published by
7704ff559fabSmrg# the Free Software Foundation; either version 2 of the License, or
7705ff559fabSmrg# (at your option) any later version.
7706ff559fabSmrg#
7707ff559fabSmrg# This program is distributed in the hope that it will be useful, but
7708ff559fabSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of
7709ff559fabSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
7710ff559fabSmrg# General Public License for more details.
7711ff559fabSmrg#
7712ff559fabSmrg# You should have received a copy of the GNU General Public License
7713ff559fabSmrg# along with this program; if not, write to the Free Software
7714ff559fabSmrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7715ff559fabSmrg#
7716ff559fabSmrg# As a special exception to the GNU General Public License, if you
7717ff559fabSmrg# distribute this file as part of a program that contains a
7718ff559fabSmrg# configuration script generated by Autoconf, you may include it under
7719ff559fabSmrg# the same distribution terms that you use for the rest of that program.
7720ff559fabSmrg
7721ff559fabSmrg# PKG_PROG_PKG_CONFIG([MIN-VERSION])
7722ff559fabSmrg# ----------------------------------
7723ff559fabSmrgAC_DEFUN([PKG_PROG_PKG_CONFIG],
7724ff559fabSmrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
7725ff559fabSmrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$])
7726ff559fabSmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
7727ff559fabSmrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
7728ff559fabSmrg	AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
7729ff559fabSmrgfi
7730ff559fabSmrgif test -n "$PKG_CONFIG"; then
7731ff559fabSmrg	_pkg_min_version=m4_ifval([$1], [$1], [0.9.0])
7732ff559fabSmrg	AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
7733ff559fabSmrg	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
7734ff559fabSmrg		AC_MSG_RESULT([yes])
7735ff559fabSmrg	else
7736ff559fabSmrg		AC_MSG_RESULT([no])
7737ff559fabSmrg		PKG_CONFIG=""
7738ff559fabSmrg	fi
7739ff559fabSmrg		
7740ff559fabSmrgfi[]dnl
7741ff559fabSmrg])# PKG_PROG_PKG_CONFIG
7742ff559fabSmrg
7743ff559fabSmrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
7744ff559fabSmrg#
7745ff559fabSmrg# Check to see whether a particular set of modules exists.  Similar
7746ff559fabSmrg# to PKG_CHECK_MODULES(), but does not set variables or print errors.
7747ff559fabSmrg#
7748ff559fabSmrg#
7749ff559fabSmrg# Similar to PKG_CHECK_MODULES, make sure that the first instance of
7750ff559fabSmrg# this or PKG_CHECK_MODULES is called, or make sure to call
7751ff559fabSmrg# PKG_CHECK_EXISTS manually
7752ff559fabSmrg# --------------------------------------------------------------
7753ff559fabSmrgAC_DEFUN([PKG_CHECK_EXISTS],
7754ff559fabSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
7755ff559fabSmrgif test -n "$PKG_CONFIG" && \
7756ff559fabSmrg    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
7757ff559fabSmrg  m4_ifval([$2], [$2], [:])
7758ff559fabSmrgm4_ifvaln([$3], [else
7759ff559fabSmrg  $3])dnl
7760ff559fabSmrgfi])
7761ff559fabSmrg
7762ff559fabSmrg
7763ff559fabSmrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
7764ff559fabSmrg# ---------------------------------------------
7765ff559fabSmrgm4_define([_PKG_CONFIG],
7766ff559fabSmrg[if test -n "$PKG_CONFIG"; then
7767ff559fabSmrg        PKG_CHECK_EXISTS([$3],
7768ff559fabSmrg                         [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
7769ff559fabSmrg			 [pkg_failed=yes])
7770ff559fabSmrgelse
7771ff559fabSmrg	pkg_failed=untried
7772ff559fabSmrgfi[]dnl
7773ff559fabSmrg])# _PKG_CONFIG
7774ff559fabSmrg
7775ff559fabSmrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
7776ff559fabSmrg# [ACTION-IF-NOT-FOUND])
7777ff559fabSmrg#
7778ff559fabSmrg#
7779ff559fabSmrg# Note that if there is a possibility the first call to
7780ff559fabSmrg# PKG_CHECK_MODULES might not happen, you should be sure to include an
7781ff559fabSmrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
7782ff559fabSmrg#
7783ff559fabSmrg#
7784ff559fabSmrg# --------------------------------------------------------------
7785ff559fabSmrgAC_DEFUN([PKG_CHECK_MODULES],
7786ff559fabSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
7787ff559fabSmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
7788ff559fabSmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
7789ff559fabSmrg
7790ff559fabSmrgpkg_failed=no
7791ff559fabSmrgAC_MSG_CHECKING([for $1])
7792ff559fabSmrg
7793ff559fabSmrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
7794ff559fabSmrg_PKG_CONFIG([$1][_LIBS], [libs], [$2])
7795ff559fabSmrg
7796ff559fabSmrgif test $pkg_failed = yes; then
7797ff559fabSmrg	$1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
7798ff559fabSmrg	# Put the nasty error message in config.log where it belongs
7799ff559fabSmrg	echo "$$1[]_PKG_ERRORS" 1>&AS_MESSAGE_LOG_FD
7800ff559fabSmrg
7801ff559fabSmrg	ifelse([$4], , [AC_MSG_ERROR(dnl
7802ff559fabSmrg[Package requirements ($2) were not met.
7803ff559fabSmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you
7804ff559fabSmrginstalled software in a non-standard prefix.
7805ff559fabSmrg
7806ff559fabSmrgAlternatively you may set the $1_CFLAGS and $1_LIBS environment variables
7807ff559fabSmrgto avoid the need to call pkg-config.  See the pkg-config man page for
7808ff559fabSmrgmore details.])],
7809ff559fabSmrg		[$4])
7810ff559fabSmrgelif test $pkg_failed = untried; then
7811ff559fabSmrg	ifelse([$4], , [AC_MSG_FAILURE(dnl
7812ff559fabSmrg[The pkg-config script could not be found or is too old.  Make sure it
7813ff559fabSmrgis in your PATH or set the PKG_CONFIG environment variable to the full
7814ff559fabSmrgpath to pkg-config.
7815ff559fabSmrg
7816ff559fabSmrgAlternatively you may set the $1_CFLAGS and $1_LIBS environment variables
7817ff559fabSmrgto avoid the need to call pkg-config.  See the pkg-config man page for
7818ff559fabSmrgmore details.
7819ff559fabSmrg
7820ff559fabSmrgTo get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.])],
7821ff559fabSmrg		[$4])
7822ff559fabSmrgelse
7823ff559fabSmrg	$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
7824ff559fabSmrg	$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
7825ff559fabSmrg        AC_MSG_RESULT([yes])
7826ff559fabSmrg	ifelse([$3], , :, [$3])
7827ff559fabSmrgfi[]dnl
7828ff559fabSmrg])# PKG_CHECK_MODULES
7829ff559fabSmrg
7830