source: aclocal.m4 @ dea6547

4.0.1-hotfixescachetimestampsdevelopdpdk-ndagetsilivegetfragoffhelplibtrace4ndag_formatpfringrc-4.0.1rc-4.0.2rc-4.0.3rc-4.0.4ringdecrementfixringperformanceringtimestampfixes
Last change on this file since dea6547 was dea6547, checked in by Daniel Lawson <dlawson@…>, 16 years ago

configure time checks for pcpa-bpf.h/ net/bpf.h

  • Property mode set to 100644
File size: 224.2 KB
Line 
1# aclocal.m4 generated automatically by aclocal 1.5
2
3# Copyright 1996, 1997, 1998, 1999, 2000, 2001
4# Free Software Foundation, Inc.
5# This file is free software; the Free Software Foundation
6# gives unlimited permission to copy and/or distribute it,
7# with or without modifications, as long as this notice is preserved.
8
9# This program is distributed in the hope that it will be useful,
10# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12# PARTICULAR PURPOSE.
13
14# Do all the work for Automake.  This macro actually does too much --
15# some checks are only needed if your package does certain things.
16# But this isn't really a big deal.
17
18# serial 5
19
20# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
21# written in clear, in which case automake, when reading aclocal.m4,
22# will think it sees a *use*, and therefore will trigger all it's
23# C support machinery.  Also note that it means that autoscan, seeing
24# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
25
26
27# We require 2.13 because we rely on SHELL being computed by configure.
28AC_PREREQ([2.13])
29
30# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
31# -----------------------------------------------------------
32# If MACRO-NAME is provided do IF-PROVIDED, else IF-NOT-PROVIDED.
33# The purpose of this macro is to provide the user with a means to
34# check macros which are provided without letting her know how the
35# information is coded.
36# If this macro is not defined by Autoconf, define it here.
37ifdef([AC_PROVIDE_IFELSE],
38      [],
39      [define([AC_PROVIDE_IFELSE],
40              [ifdef([AC_PROVIDE_$1],
41                     [$2], [$3])])])
42
43
44# AM_INIT_AUTOMAKE(PACKAGE,VERSION, [NO-DEFINE])
45# ----------------------------------------------
46AC_DEFUN([AM_INIT_AUTOMAKE],
47[AC_REQUIRE([AC_PROG_INSTALL])dnl
48# test to see if srcdir already configured
49if test "`CDPATH=:; cd $srcdir && pwd`" != "`pwd`" &&
50   test -f $srcdir/config.status; then
51  AC_MSG_ERROR([source directory already configured; run \"make distclean\" there first])
52fi
53
54# Define the identity of the package.
55PACKAGE=$1
56AC_SUBST(PACKAGE)dnl
57VERSION=$2
58AC_SUBST(VERSION)dnl
59ifelse([$3],,
60[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
61AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])
62
63# Autoconf 2.50 wants to disallow AM_ names.  We explicitly allow
64# the ones we care about.
65ifdef([m4_pattern_allow],
66      [m4_pattern_allow([^AM_[A-Z]+FLAGS])])dnl
67
68# Autoconf 2.50 always computes EXEEXT.  However we need to be
69# compatible with 2.13, for now.  So we always define EXEEXT, but we
70# don't compute it.
71AC_SUBST(EXEEXT)
72# Similar for OBJEXT -- only we only use OBJEXT if the user actually
73# requests that it be used.  This is a bit dumb.
74: ${OBJEXT=o}
75AC_SUBST(OBJEXT)
76
77# Some tools Automake needs.
78AC_REQUIRE([AM_SANITY_CHECK])dnl
79AC_REQUIRE([AC_ARG_PROGRAM])dnl
80AM_MISSING_PROG(ACLOCAL, aclocal)
81AM_MISSING_PROG(AUTOCONF, autoconf)
82AM_MISSING_PROG(AUTOMAKE, automake)
83AM_MISSING_PROG(AUTOHEADER, autoheader)
84AM_MISSING_PROG(MAKEINFO, makeinfo)
85AM_MISSING_PROG(AMTAR, tar)
86AM_PROG_INSTALL_SH
87AM_PROG_INSTALL_STRIP
88# We need awk for the "check" target.  The system "awk" is bad on
89# some platforms.
90AC_REQUIRE([AC_PROG_AWK])dnl
91AC_REQUIRE([AC_PROG_MAKE_SET])dnl
92AC_REQUIRE([AM_DEP_TRACK])dnl
93AC_REQUIRE([AM_SET_DEPDIR])dnl
94AC_PROVIDE_IFELSE([AC_PROG_][CC],
95                  [_AM_DEPENDENCIES(CC)],
96                  [define([AC_PROG_][CC],
97                          defn([AC_PROG_][CC])[_AM_DEPENDENCIES(CC)])])dnl
98AC_PROVIDE_IFELSE([AC_PROG_][CXX],
99                  [_AM_DEPENDENCIES(CXX)],
100                  [define([AC_PROG_][CXX],
101                          defn([AC_PROG_][CXX])[_AM_DEPENDENCIES(CXX)])])dnl
102])
103
104#
105# Check to make sure that the build environment is sane.
106#
107
108# serial 3
109
110# AM_SANITY_CHECK
111# ---------------
112AC_DEFUN([AM_SANITY_CHECK],
113[AC_MSG_CHECKING([whether build environment is sane])
114# Just in case
115sleep 1
116echo timestamp > conftest.file
117# Do `set' in a subshell so we don't clobber the current shell's
118# arguments.  Must try -L first in case configure is actually a
119# symlink; some systems play weird games with the mod time of symlinks
120# (eg FreeBSD returns the mod time of the symlink's containing
121# directory).
122if (
123   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
124   if test "$[*]" = "X"; then
125      # -L didn't work.
126      set X `ls -t $srcdir/configure conftest.file`
127   fi
128   rm -f conftest.file
129   if test "$[*]" != "X $srcdir/configure conftest.file" \
130      && test "$[*]" != "X conftest.file $srcdir/configure"; then
131
132      # If neither matched, then we have a broken ls.  This can happen
133      # if, for instance, CONFIG_SHELL is bash and it inherits a
134      # broken ls alias from the environment.  This has actually
135      # happened.  Such a system could not be considered "sane".
136      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
137alias in your environment])
138   fi
139
140   test "$[2]" = conftest.file
141   )
142then
143   # Ok.
144   :
145else
146   AC_MSG_ERROR([newly created file is older than distributed files!
147Check your system clock])
148fi
149AC_MSG_RESULT(yes)])
150
151
152# serial 2
153
154# AM_MISSING_PROG(NAME, PROGRAM)
155# ------------------------------
156AC_DEFUN([AM_MISSING_PROG],
157[AC_REQUIRE([AM_MISSING_HAS_RUN])
158$1=${$1-"${am_missing_run}$2"}
159AC_SUBST($1)])
160
161
162# AM_MISSING_HAS_RUN
163# ------------------
164# Define MISSING if not defined so far and test if it supports --run.
165# If it does, set am_missing_run to use it, otherwise, to nothing.
166AC_DEFUN([AM_MISSING_HAS_RUN],
167[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
168test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
169# Use eval to expand $SHELL
170if eval "$MISSING --run true"; then
171  am_missing_run="$MISSING --run "
172else
173  am_missing_run=
174  am_backtick='`'
175  AC_MSG_WARN([${am_backtick}missing' script is too old or missing])
176fi
177])
178
179# AM_AUX_DIR_EXPAND
180
181# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
182# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
183# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
184#
185# Of course, Automake must honor this variable whenever it calls a
186# tool from the auxiliary directory.  The problem is that $srcdir (and
187# therefore $ac_aux_dir as well) can be either absolute or relative,
188# depending on how configure is run.  This is pretty annoying, since
189# it makes $ac_aux_dir quite unusable in subdirectories: in the top
190# source directory, any form will work fine, but in subdirectories a
191# relative path needs to be adjusted first.
192#
193# $ac_aux_dir/missing
194#    fails when called from a subdirectory if $ac_aux_dir is relative
195# $top_srcdir/$ac_aux_dir/missing
196#    fails if $ac_aux_dir is absolute,
197#    fails when called from a subdirectory in a VPATH build with
198#          a relative $ac_aux_dir
199#
200# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
201# are both prefixed by $srcdir.  In an in-source build this is usually
202# harmless because $srcdir is `.', but things will broke when you
203# start a VPATH build or use an absolute $srcdir.
204#
205# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
206# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
207#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
208# and then we would define $MISSING as
209#   MISSING="\${SHELL} $am_aux_dir/missing"
210# This will work as long as MISSING is not called from configure, because
211# unfortunately $(top_srcdir) has no meaning in configure.
212# However there are other variables, like CC, which are often used in
213# configure, and could therefore not use this "fixed" $ac_aux_dir.
214#
215# Another solution, used here, is to always expand $ac_aux_dir to an
216# absolute PATH.  The drawback is that using absolute paths prevent a
217# configured tree to be moved without reconfiguration.
218
219AC_DEFUN([AM_AUX_DIR_EXPAND], [
220# expand $ac_aux_dir to an absolute path
221am_aux_dir=`CDPATH=:; cd $ac_aux_dir && pwd`
222])
223
224# AM_PROG_INSTALL_SH
225# ------------------
226# Define $install_sh.
227AC_DEFUN([AM_PROG_INSTALL_SH],
228[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
229install_sh=${install_sh-"$am_aux_dir/install-sh"}
230AC_SUBST(install_sh)])
231
232# One issue with vendor `install' (even GNU) is that you can't
233# specify the program used to strip binaries.  This is especially
234# annoying in cross-compiling environments, where the build's strip
235# is unlikely to handle the host's binaries.
236# Fortunately install-sh will honor a STRIPPROG variable, so we
237# always use install-sh in `make install-strip', and initialize
238# STRIPPROG with the value of the STRIP variable (set by the user).
239AC_DEFUN([AM_PROG_INSTALL_STRIP],
240[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
241INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
242AC_SUBST([INSTALL_STRIP_PROGRAM])])
243
244# serial 4                                              -*- Autoconf -*-
245
246
247
248# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
249# written in clear, in which case automake, when reading aclocal.m4,
250# will think it sees a *use*, and therefore will trigger all it's
251# C support machinery.  Also note that it means that autoscan, seeing
252# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
253
254
255
256# _AM_DEPENDENCIES(NAME)
257# ---------------------
258# See how the compiler implements dependency checking.
259# NAME is "CC", "CXX" or "OBJC".
260# We try a few techniques and use that to set a single cache variable.
261#
262# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
263# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
264# dependency, and given that the user is not expected to run this macro,
265# just rely on AC_PROG_CC.
266AC_DEFUN([_AM_DEPENDENCIES],
267[AC_REQUIRE([AM_SET_DEPDIR])dnl
268AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
269AC_REQUIRE([AM_MAKE_INCLUDE])dnl
270AC_REQUIRE([AM_DEP_TRACK])dnl
271
272ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
273       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
274       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc']
275       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
276                   [depcc="$$1"   am_compiler_list=])
277
278AC_CACHE_CHECK([dependency style of $depcc],
279               [am_cv_$1_dependencies_compiler_type],
280[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
281  # We make a subdir and do the tests there.  Otherwise we can end up
282  # making bogus files that we don't know about and never remove.  For
283  # instance it was reported that on HP-UX the gcc test will end up
284  # making a dummy file named `D' -- because `-MD' means `put the output
285  # in D'.
286  mkdir conftest.dir
287  # Copy depcomp to subdir because otherwise we won't find it if we're
288  # using a relative directory.
289  cp "$am_depcomp" conftest.dir
290  cd conftest.dir
291
292  am_cv_$1_dependencies_compiler_type=none
293  if test "$am_compiler_list" = ""; then
294     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
295  fi
296  for depmode in $am_compiler_list; do
297    # We need to recreate these files for each test, as the compiler may
298    # overwrite some of them when testing with obscure command lines.
299    # This happens at least with the AIX C compiler.
300    echo '#include "conftest.h"' > conftest.c
301    echo 'int i;' > conftest.h
302    echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf
303
304    case $depmode in
305    nosideeffect)
306      # after this tag, mechanisms are not by side-effect, so they'll
307      # only be used when explicitly requested
308      if test "x$enable_dependency_tracking" = xyes; then
309        continue
310      else
311        break
312      fi
313      ;;
314    none) break ;;
315    esac
316    # We check with `-c' and `-o' for the sake of the "dashmstdout"
317    # mode.  It turns out that the SunPro C++ compiler does not properly
318    # handle `-M -o', and we need to detect this.
319    if depmode=$depmode \
320       source=conftest.c object=conftest.o \
321       depfile=conftest.Po tmpdepfile=conftest.TPo \
322       $SHELL ./depcomp $depcc -c conftest.c -o conftest.o >/dev/null 2>&1 &&
323       grep conftest.h conftest.Po > /dev/null 2>&1 &&
324       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
325      am_cv_$1_dependencies_compiler_type=$depmode
326      break
327    fi
328  done
329
330  cd ..
331  rm -rf conftest.dir
332else
333  am_cv_$1_dependencies_compiler_type=none
334fi
335])
336$1DEPMODE="depmode=$am_cv_$1_dependencies_compiler_type"
337AC_SUBST([$1DEPMODE])
338])
339
340
341# AM_SET_DEPDIR
342# -------------
343# Choose a directory name for dependency files.
344# This macro is AC_REQUIREd in _AM_DEPENDENCIES
345AC_DEFUN([AM_SET_DEPDIR],
346[rm -f .deps 2>/dev/null
347mkdir .deps 2>/dev/null
348if test -d .deps; then
349  DEPDIR=.deps
350else
351  # MS-DOS does not allow filenames that begin with a dot.
352  DEPDIR=_deps
353fi
354rmdir .deps 2>/dev/null
355AC_SUBST(DEPDIR)
356])
357
358
359# AM_DEP_TRACK
360# ------------
361AC_DEFUN([AM_DEP_TRACK],
362[AC_ARG_ENABLE(dependency-tracking,
363[  --disable-dependency-tracking Speeds up one-time builds
364  --enable-dependency-tracking  Do not reject slow dependency extractors])
365if test "x$enable_dependency_tracking" != xno; then
366  am_depcomp="$ac_aux_dir/depcomp"
367  AMDEPBACKSLASH='\'
368fi
369AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
370pushdef([subst], defn([AC_SUBST]))
371subst(AMDEPBACKSLASH)
372popdef([subst])
373])
374
375# Generate code to set up dependency tracking.
376# This macro should only be invoked once -- use via AC_REQUIRE.
377# Usage:
378# AM_OUTPUT_DEPENDENCY_COMMANDS
379
380#
381# This code is only required when automatic dependency tracking
382# is enabled.  FIXME.  This creates each `.P' file that we will
383# need in order to bootstrap the dependency handling code.
384AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],[
385AC_OUTPUT_COMMANDS([
386test x"$AMDEP_TRUE" != x"" ||
387for mf in $CONFIG_FILES; do
388  case "$mf" in
389  Makefile|GNUmakefile) dirpart=.;;
390  */Makefile|*/GNUmakefile) dirpart=`echo "$mf" | sed -e 's|/[^/]*$||'`;;
391  *) continue;;
392  esac
393  grep '^DEP_FILES *= *[^ #]' < "$mf" > /dev/null || continue
394  # Extract the definition of DEP_FILES from the Makefile without
395  # running `make'.
396  DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
397  test -z "$DEPDIR" && continue
398  # When using ansi2knr, U may be empty or an underscore; expand it
399  U=`sed -n -e '/^U = / s///p' < "$mf"`
400  test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
401  # We invoke sed twice because it is the simplest approach to
402  # changing $(DEPDIR) to its actual value in the expansion.
403  for file in `sed -n -e '
404    /^DEP_FILES = .*\\\\$/ {
405      s/^DEP_FILES = //
406      :loop
407        s/\\\\$//
408        p
409        n
410        /\\\\$/ b loop
411      p
412    }
413    /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
414       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
415    # Make sure the directory exists.
416    test -f "$dirpart/$file" && continue
417    fdir=`echo "$file" | sed -e 's|/[^/]*$||'`
418    $ac_aux_dir/mkinstalldirs "$dirpart/$fdir" > /dev/null 2>&1
419    # echo "creating $dirpart/$file"
420    echo '# dummy' > "$dirpart/$file"
421  done
422done
423], [AMDEP_TRUE="$AMDEP_TRUE"
424ac_aux_dir="$ac_aux_dir"])])
425
426# AM_MAKE_INCLUDE()
427# -----------------
428# Check to see how make treats includes.
429AC_DEFUN([AM_MAKE_INCLUDE],
430[am_make=${MAKE-make}
431cat > confinc << 'END'
432doit:
433        @echo done
434END
435# If we don't find an include directive, just comment out the code.
436AC_MSG_CHECKING([for style of include used by $am_make])
437am__include='#'
438am__quote=
439_am_result=none
440# First try GNU make style include.
441echo "include confinc" > confmf
442# We grep out `Entering directory' and `Leaving directory'
443# messages which can occur if `w' ends up in MAKEFLAGS.
444# In particular we don't look at `^make:' because GNU make might
445# be invoked under some other name (usually "gmake"), in which
446# case it prints its new name instead of `make'.
447if test "`$am_make -s -f confmf 2> /dev/null | fgrep -v 'ing directory'`" = "done"; then
448   am__include=include
449   am__quote=
450   _am_result=GNU
451fi
452# Now try BSD make style include.
453if test "$am__include" = "#"; then
454   echo '.include "confinc"' > confmf
455   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
456      am__include=.include
457      am__quote='"'
458      _am_result=BSD
459   fi
460fi
461AC_SUBST(am__include)
462AC_SUBST(am__quote)
463AC_MSG_RESULT($_am_result)
464rm -f confinc confmf
465])
466
467# serial 3
468
469# AM_CONDITIONAL(NAME, SHELL-CONDITION)
470# -------------------------------------
471# Define a conditional.
472#
473# FIXME: Once using 2.50, use this:
474# m4_match([$1], [^TRUE\|FALSE$], [AC_FATAL([$0: invalid condition: $1])])dnl
475AC_DEFUN([AM_CONDITIONAL],
476[ifelse([$1], [TRUE],
477        [errprint(__file__:__line__: [$0: invalid condition: $1
478])dnl
479m4exit(1)])dnl
480ifelse([$1], [FALSE],
481       [errprint(__file__:__line__: [$0: invalid condition: $1
482])dnl
483m4exit(1)])dnl
484AC_SUBST([$1_TRUE])
485AC_SUBST([$1_FALSE])
486if $2; then
487  $1_TRUE=
488  $1_FALSE='#'
489else
490  $1_TRUE='#'
491  $1_FALSE=
492fi])
493
494# Like AC_CONFIG_HEADER, but automatically create stamp file.
495
496# serial 3
497
498# When config.status generates a header, we must update the stamp-h file.
499# This file resides in the same directory as the config header
500# that is generated.  We must strip everything past the first ":",
501# and everything past the last "/".
502
503AC_PREREQ([2.12])
504
505AC_DEFUN([AM_CONFIG_HEADER],
506[ifdef([AC_FOREACH],dnl
507         [dnl init our file count if it isn't already
508         m4_ifndef([_AM_Config_Header_Index], m4_define([_AM_Config_Header_Index], [0]))
509         dnl prepare to store our destination file list for use in config.status
510         AC_FOREACH([_AM_File], [$1],
511                    [m4_pushdef([_AM_Dest], m4_patsubst(_AM_File, [:.*]))
512                    m4_define([_AM_Config_Header_Index], m4_incr(_AM_Config_Header_Index))
513                    dnl and add it to the list of files AC keeps track of, along
514                    dnl with our hook
515                    AC_CONFIG_HEADERS(_AM_File,
516dnl COMMANDS, [, INIT-CMDS]
517[# update the timestamp
518echo timestamp >"AS_ESCAPE(_AM_DIRNAME(]_AM_Dest[))/stamp-h]_AM_Config_Header_Index["
519][$2]m4_ifval([$3], [, [$3]]))dnl AC_CONFIG_HEADERS
520                    m4_popdef([_AM_Dest])])],dnl
521[AC_CONFIG_HEADER([$1])
522  AC_OUTPUT_COMMANDS(
523   ifelse(patsubst([$1], [[^ ]], []),
524          [],
525          [test -z "$CONFIG_HEADERS" || echo timestamp >dnl
526           patsubst([$1], [^\([^:]*/\)?.*], [\1])stamp-h]),dnl
527[am_indx=1
528for am_file in $1; do
529  case " \$CONFIG_HEADERS " in
530  *" \$am_file "*)
531    am_dir=\`echo \$am_file |sed 's%:.*%%;s%[^/]*\$%%'\`
532    if test -n "\$am_dir"; then
533      am_tmpdir=\`echo \$am_dir |sed 's%^\(/*\).*\$%\1%'\`
534      for am_subdir in \`echo \$am_dir |sed 's%/% %'\`; do
535        am_tmpdir=\$am_tmpdir\$am_subdir/
536        if test ! -d \$am_tmpdir; then
537          mkdir \$am_tmpdir
538        fi
539      done
540    fi
541    echo timestamp > "\$am_dir"stamp-h\$am_indx
542    ;;
543  esac
544  am_indx=\`expr \$am_indx + 1\`
545done])
546])]) # AM_CONFIG_HEADER
547
548# _AM_DIRNAME(PATH)
549# -----------------
550# Like AS_DIRNAME, only do it during macro expansion
551AC_DEFUN([_AM_DIRNAME],
552       [m4_if(m4_regexp([$1], [^.*[^/]//*[^/][^/]*/*$]), -1,
553              m4_if(m4_regexp([$1], [^//\([^/]\|$\)]), -1,
554                    m4_if(m4_regexp([$1], [^/.*]), -1,
555                          [.],
556                          m4_patsubst([$1], [^\(/\).*], [\1])),
557                    m4_patsubst([$1], [^\(//\)\([^/].*\|$\)], [\1])),
558              m4_patsubst([$1], [^\(.*[^/]\)//*[^/][^/]*/*$], [\1]))[]dnl
559]) # _AM_DIRNAME
560
561# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
562
563# serial 47 AC_PROG_LIBTOOL
564
565
566# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
567# -----------------------------------------------------------
568# If this macro is not defined by Autoconf, define it here.
569m4_ifdef([AC_PROVIDE_IFELSE],
570         [],
571         [m4_define([AC_PROVIDE_IFELSE],
572                 [m4_ifdef([AC_PROVIDE_$1],
573                           [$2], [$3])])])
574
575
576# AC_PROG_LIBTOOL
577# ---------------
578AC_DEFUN([AC_PROG_LIBTOOL],
579[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
580dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
581dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
582  AC_PROVIDE_IFELSE([AC_PROG_CXX],
583    [AC_LIBTOOL_CXX],
584    [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
585  ])])
586dnl And a similar setup for Fortran 77 support
587  AC_PROVIDE_IFELSE([AC_PROG_F77],
588    [AC_LIBTOOL_F77],
589    [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
590])])
591
592dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
593dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
594dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
595  AC_PROVIDE_IFELSE([AC_PROG_GCJ],
596    [AC_LIBTOOL_GCJ],
597    [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
598      [AC_LIBTOOL_GCJ],
599      [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
600        [AC_LIBTOOL_GCJ],
601      [ifdef([AC_PROG_GCJ],
602             [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
603       ifdef([A][M_PROG_GCJ],
604             [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
605       ifdef([LT_AC_PROG_GCJ],
606             [define([LT_AC_PROG_GCJ],
607                defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
608])])# AC_PROG_LIBTOOL
609
610
611# _AC_PROG_LIBTOOL
612# ----------------
613AC_DEFUN([_AC_PROG_LIBTOOL],
614[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
615AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
616AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
617AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
618
619# This can be used to rebuild libtool when needed
620LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
621
622# Always use our own libtool.
623LIBTOOL='$(SHELL) $(top_builddir)/libtool'
624AC_SUBST(LIBTOOL)dnl
625
626# Prevent multiple expansion
627define([AC_PROG_LIBTOOL], [])
628])# _AC_PROG_LIBTOOL
629
630
631# AC_LIBTOOL_SETUP
632# ----------------
633AC_DEFUN([AC_LIBTOOL_SETUP],
634[AC_PREREQ(2.50)dnl
635AC_REQUIRE([AC_ENABLE_SHARED])dnl
636AC_REQUIRE([AC_ENABLE_STATIC])dnl
637AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
638AC_REQUIRE([AC_CANONICAL_HOST])dnl
639AC_REQUIRE([AC_CANONICAL_BUILD])dnl
640AC_REQUIRE([AC_PROG_CC])dnl
641AC_REQUIRE([AC_PROG_LD])dnl
642AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
643AC_REQUIRE([AC_PROG_NM])dnl
644
645AC_REQUIRE([AC_PROG_LN_S])dnl
646AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
647# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
648AC_REQUIRE([AC_OBJEXT])dnl
649AC_REQUIRE([AC_EXEEXT])dnl
650dnl
651
652AC_LIBTOOL_SYS_MAX_CMD_LEN
653AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
654AC_LIBTOOL_OBJDIR
655
656AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
657_LT_AC_PROG_ECHO_BACKSLASH
658
659case $host_os in
660aix3*)
661  # AIX sometimes has problems with the GCC collect2 program.  For some
662  # reason, if we set the COLLECT_NAMES environment variable, the problems
663  # vanish in a puff of smoke.
664  if test "X${COLLECT_NAMES+set}" != Xset; then
665    COLLECT_NAMES=
666    export COLLECT_NAMES
667  fi
668  ;;
669esac
670
671# Sed substitution that helps us do robust quoting.  It backslashifies
672# metacharacters that are still active within double-quoted strings.
673Xsed='sed -e s/^X//'
674[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
675
676# Same as above, but do not quote variable references.
677[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
678
679# Sed substitution to delay expansion of an escaped shell variable in a
680# double_quote_subst'ed string.
681delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
682
683# Sed substitution to avoid accidental globbing in evaled expressions
684no_glob_subst='s/\*/\\\*/g'
685
686# Constants:
687rm="rm -f"
688
689# Global variables:
690default_ofile=libtool
691can_build_shared=yes
692
693# All known linkers require a `.a' archive for static linking (except M$VC,
694# which needs '.lib').
695libext=a
696ltmain="$ac_aux_dir/ltmain.sh"
697ofile="$default_ofile"
698with_gnu_ld="$lt_cv_prog_gnu_ld"
699
700AC_CHECK_TOOL(AR, ar, false)
701AC_CHECK_TOOL(RANLIB, ranlib, :)
702AC_CHECK_TOOL(STRIP, strip, :)
703
704old_CC="$CC"
705old_CFLAGS="$CFLAGS"
706
707# Set sane defaults for various variables
708test -z "$AR" && AR=ar
709test -z "$AR_FLAGS" && AR_FLAGS=cru
710test -z "$AS" && AS=as
711test -z "$CC" && CC=cc
712test -z "$LTCC" && LTCC=$CC
713test -z "$DLLTOOL" && DLLTOOL=dlltool
714test -z "$LD" && LD=ld
715test -z "$LN_S" && LN_S="ln -s"
716test -z "$MAGIC_CMD" && MAGIC_CMD=file
717test -z "$NM" && NM=nm
718test -z "$SED" && SED=sed
719test -z "$OBJDUMP" && OBJDUMP=objdump
720test -z "$RANLIB" && RANLIB=:
721test -z "$STRIP" && STRIP=:
722test -z "$ac_objext" && ac_objext=o
723
724# Determine commands to create old-style static archives.
725old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
726old_postinstall_cmds='chmod 644 $oldlib'
727old_postuninstall_cmds=
728
729if test -n "$RANLIB"; then
730  case $host_os in
731  openbsd*)
732    old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
733    ;;
734  *)
735    old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
736    ;;
737  esac
738  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
739fi
740
741# Only perform the check for file, if the check method requires it
742case $deplibs_check_method in
743file_magic*)
744  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
745    AC_PATH_MAGIC
746  fi
747  ;;
748esac
749
750AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
751AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
752enable_win32_dll=yes, enable_win32_dll=no)
753
754AC_ARG_ENABLE([libtool-lock],
755    [AC_HELP_STRING([--disable-libtool-lock],
756        [avoid locking (might break parallel builds)])])
757test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
758
759AC_ARG_WITH([pic],
760    [AC_HELP_STRING([--with-pic],
761        [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
762    [pic_mode="$withval"],
763    [pic_mode=default])
764test -z "$pic_mode" && pic_mode=default
765
766# Use C for the default configuration in the libtool script
767tagname=
768AC_LIBTOOL_LANG_C_CONFIG
769_LT_AC_TAGCONFIG
770_LT_AC_SHARED_EXT
771])# AC_LIBTOOL_SETUP
772
773
774# _LT_AC_SYS_COMPILER
775# -------------------
776AC_DEFUN([_LT_AC_SYS_COMPILER],
777[AC_REQUIRE([AC_PROG_CC])dnl
778
779# If no C compiler was specified, use CC.
780LTCC=${LTCC-"$CC"}
781
782# Allow CC to be a program name with arguments.
783compiler=$CC
784])# _LT_AC_SYS_COMPILER
785
786
787# _LT_AC_SYS_LIBPATH_AIX
788# ----------------------
789# Links a minimal program and checks the executable
790# for the system default hardcoded library path. In most cases,
791# this is /usr/lib:/lib, but when the MPI compilers are used
792# the location of the communication and MPI libs are included too.
793# If we don't find anything, use the default library path according
794# to the aix ld manual.
795AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
796[AC_LINK_IFELSE(AC_LANG_PROGRAM,[
797aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
798}'`
799# Check for a 64-bit object if we didn't find anything.
800if 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; }
801}'`; fi],[])
802if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
803])# _LT_AC_SYS_LIBPATH_AIX
804
805
806# _LT_AC_SHELL_INIT(ARG)
807# ----------------------
808AC_DEFUN([_LT_AC_SHELL_INIT],
809[ifdef([AC_DIVERSION_NOTICE],
810             [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
811         [AC_DIVERT_PUSH(NOTICE)])
812$1
813AC_DIVERT_POP
814])# _LT_AC_SHELL_INIT
815
816
817# _LT_AC_PROG_ECHO_BACKSLASH
818# --------------------------
819# Add some code to the start of the generated configure script which
820# will find an echo command which doesn't interpret backslashes.
821AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
822[_LT_AC_SHELL_INIT([
823# Check that we are running under the correct shell.
824SHELL=${CONFIG_SHELL-/bin/sh}
825
826case X$ECHO in
827X*--fallback-echo)
828  # Remove one level of quotation (which was required for Make).
829  ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
830  ;;
831esac
832
833echo=${ECHO-echo}
834if test "X[$]1" = X--no-reexec; then
835  # Discard the --no-reexec flag, and continue.
836  shift
837elif test "X[$]1" = X--fallback-echo; then
838  # Avoid inline document here, it may be left over
839  :
840elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
841  # Yippee, $echo works!
842  :
843else
844  # Restart under the correct shell.
845  exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
846fi
847
848if test "X[$]1" = X--fallback-echo; then
849  # used as fallback echo
850  shift
851  cat <<EOF
852[$]*
853EOF
854  exit 0
855fi
856
857# The HP-UX ksh and POSIX shell print the target directory to stdout
858# if CDPATH is set.
859if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
860
861if test -z "$ECHO"; then
862if test "X${echo_test_string+set}" != Xset; then
863# find a string as large as possible, as long as the shell can cope with it
864  for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
865    # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
866    if (echo_test_string="`eval $cmd`") 2>/dev/null &&
867       echo_test_string="`eval $cmd`" &&
868       (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
869    then
870      break
871    fi
872  done
873fi
874
875if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
876   echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
877   test "X$echo_testing_string" = "X$echo_test_string"; then
878  :
879else
880  # The Solaris, AIX, and Digital Unix default echo programs unquote
881  # backslashes.  This makes it impossible to quote backslashes using
882  #   echo "$something" | sed 's/\\/\\\\/g'
883  #
884  # So, first we look for a working echo in the user's PATH.
885
886  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
887  for dir in $PATH /usr/ucb; do
888    IFS="$lt_save_ifs"
889    if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
890       test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
891       echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
892       test "X$echo_testing_string" = "X$echo_test_string"; then
893      echo="$dir/echo"
894      break
895    fi
896  done
897  IFS="$lt_save_ifs"
898
899  if test "X$echo" = Xecho; then
900    # We didn't find a better echo, so look for alternatives.
901    if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
902       echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
903       test "X$echo_testing_string" = "X$echo_test_string"; then
904      # This shell has a builtin print -r that does the trick.
905      echo='print -r'
906    elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
907         test "X$CONFIG_SHELL" != X/bin/ksh; then
908      # If we have ksh, try running configure again with it.
909      ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
910      export ORIGINAL_CONFIG_SHELL
911      CONFIG_SHELL=/bin/ksh
912      export CONFIG_SHELL
913      exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
914    else
915      # Try using printf.
916      echo='printf %s\n'
917      if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
918         echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
919         test "X$echo_testing_string" = "X$echo_test_string"; then
920        # Cool, printf works
921        :
922      elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
923           test "X$echo_testing_string" = 'X\t' &&
924           echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
925           test "X$echo_testing_string" = "X$echo_test_string"; then
926        CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
927        export CONFIG_SHELL
928        SHELL="$CONFIG_SHELL"
929        export SHELL
930        echo="$CONFIG_SHELL [$]0 --fallback-echo"
931      elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
932           test "X$echo_testing_string" = 'X\t' &&
933           echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
934           test "X$echo_testing_string" = "X$echo_test_string"; then
935        echo="$CONFIG_SHELL [$]0 --fallback-echo"
936      else
937        # maybe with a smaller string...
938        prev=:
939
940        for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
941          if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
942          then
943            break
944          fi
945          prev="$cmd"
946        done
947
948        if test "$prev" != 'sed 50q "[$]0"'; then
949          echo_test_string=`eval $prev`
950          export echo_test_string
951          exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
952        else
953          # Oops.  We lost completely, so just stick with echo.
954          echo=echo
955        fi
956      fi
957    fi
958  fi
959fi
960fi
961
962# Copy echo and quote the copy suitably for passing to libtool from
963# the Makefile, instead of quoting the original, which is used later.
964ECHO=$echo
965if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
966   ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
967fi
968
969AC_SUBST(ECHO)
970])])# _LT_AC_PROG_ECHO_BACKSLASH
971
972
973# _LT_AC_LOCK
974# -----------
975AC_DEFUN([_LT_AC_LOCK],
976[AC_ARG_ENABLE([libtool-lock],
977    [AC_HELP_STRING([--disable-libtool-lock],
978        [avoid locking (might break parallel builds)])])
979test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
980
981# Some flags need to be propagated to the compiler or linker for good
982# libtool support.
983case $host in
984ia64-*-hpux*)
985  # Find out which ABI we are using.
986  echo 'int i;' > conftest.$ac_ext
987  if AC_TRY_EVAL(ac_compile); then
988    case `/usr/bin/file conftest.$ac_objext` in
989    *ELF-32*)
990      HPUX_IA64_MODE="32"
991      ;;
992    *ELF-64*)
993      HPUX_IA64_MODE="64"
994      ;;
995    esac
996  fi
997  rm -rf conftest*
998  ;;
999*-*-irix6*)
1000  # Find out which ABI we are using.
1001  echo '[#]line __oline__ "configure"' > conftest.$ac_ext
1002  if AC_TRY_EVAL(ac_compile); then
1003   if test "$lt_cv_prog_gnu_ld" = yes; then
1004    case `/usr/bin/file conftest.$ac_objext` in
1005    *32-bit*)
1006      LD="${LD-ld} -melf32bsmip"
1007      ;;
1008    *N32*)
1009      LD="${LD-ld} -melf32bmipn32"
1010      ;;
1011    *64-bit*)
1012      LD="${LD-ld} -melf64bmip"
1013      ;;
1014    esac
1015   else
1016    case `/usr/bin/file conftest.$ac_objext` in
1017    *32-bit*)
1018      LD="${LD-ld} -32"
1019      ;;
1020    *N32*)
1021      LD="${LD-ld} -n32"
1022      ;;
1023    *64-bit*)
1024      LD="${LD-ld} -64"
1025      ;;
1026    esac
1027   fi
1028  fi
1029  rm -rf conftest*
1030  ;;
1031
1032x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
1033  # Find out which ABI we are using.
1034  echo 'int i;' > conftest.$ac_ext
1035  if AC_TRY_EVAL(ac_compile); then
1036    case "`/usr/bin/file conftest.o`" in
1037    *32-bit*)
1038      case $host in
1039        x86_64-*linux*)
1040          LD="${LD-ld} -m elf_i386"
1041          ;;
1042        ppc64-*linux*|powerpc64-*linux*)
1043          LD="${LD-ld} -m elf32ppclinux"
1044          ;;
1045        s390x-*linux*)
1046          LD="${LD-ld} -m elf_s390"
1047          ;;
1048        sparc64-*linux*)
1049          LD="${LD-ld} -m elf32_sparc"
1050          ;;
1051      esac
1052      ;;
1053    *64-bit*)
1054      case $host in
1055        x86_64-*linux*)
1056          LD="${LD-ld} -m elf_x86_64"
1057          ;;
1058        ppc*-*linux*|powerpc*-*linux*)
1059          LD="${LD-ld} -m elf64ppc"
1060          ;;
1061        s390*-*linux*)
1062          LD="${LD-ld} -m elf64_s390"
1063          ;;
1064        sparc*-*linux*)
1065          LD="${LD-ld} -m elf64_sparc"
1066          ;;
1067      esac
1068      ;;
1069    esac
1070  fi
1071  rm -rf conftest*
1072  ;;
1073
1074*-*-linux*)
1075  # Test if the compiler is 64bit
1076  echo 'int i;' > conftest.$ac_ext
1077  lt_cv_cc_64bit_output=no
1078  if AC_TRY_EVAL(ac_compile); then
1079    case `/usr/bin/file conftest.$ac_objext` in
1080    *"ELF 64"*)
1081      lt_cv_cc_64bit_output=yes
1082      ;;
1083    esac
1084  fi
1085  rm -rf conftest*
1086  ;;
1087 
1088*-*-sco3.2v5*)
1089  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1090  SAVE_CFLAGS="$CFLAGS"
1091  CFLAGS="$CFLAGS -belf"
1092  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
1093    [AC_LANG_PUSH(C)
1094     AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
1095     AC_LANG_POP])
1096  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
1097    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1098    CFLAGS="$SAVE_CFLAGS"
1099  fi
1100  ;;
1101AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
1102[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
1103  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
1104  AC_CHECK_TOOL(AS, as, false)
1105  AC_CHECK_TOOL(OBJDUMP, objdump, false)
1106  ;;
1107  ])
1108esac
1109
1110need_locks="$enable_libtool_lock"
1111
1112])# _LT_AC_LOCK
1113
1114
1115# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1116#               [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
1117# ----------------------------------------------------------------
1118# Check whether the given compiler option works
1119AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
1120[AC_REQUIRE([LT_AC_PROG_SED])
1121AC_CACHE_CHECK([$1], [$2],
1122  [$2=no
1123  ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
1124   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
1125   lt_compiler_flag="$3"
1126   # Insert the option either (1) after the last *FLAGS variable, or
1127   # (2) before a word containing "conftest.", or (3) at the end.
1128   # Note that $ac_compile itself does not contain backslashes and begins
1129   # with a dollar sign (not a hyphen), so the echo should work correctly.
1130   # The option is referenced via a variable to avoid confusing sed.
1131   lt_compile=`echo "$ac_compile" | $SED \
1132   -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
1133   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1134   -e 's:$: $lt_compiler_flag:'`
1135   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1136   (eval "$lt_compile" 2>conftest.err)
1137   ac_status=$?
1138   cat conftest.err >&AS_MESSAGE_LOG_FD
1139   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1140   if (exit $ac_status) && test -s "$ac_outfile"; then
1141     # The compiler can only warn and ignore the option if not recognized
1142     # So say no if there are warnings
1143     if test ! -s conftest.err; then
1144       $2=yes
1145     fi
1146   fi
1147   $rm conftest*
1148])
1149
1150if test x"[$]$2" = xyes; then
1151    ifelse([$5], , :, [$5])
1152else
1153    ifelse([$6], , :, [$6])
1154fi
1155])# AC_LIBTOOL_COMPILER_OPTION
1156
1157
1158# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1159#                          [ACTION-SUCCESS], [ACTION-FAILURE])
1160# ------------------------------------------------------------
1161# Check whether the given compiler option works
1162AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
1163[AC_CACHE_CHECK([$1], [$2],
1164  [$2=no
1165   save_LDFLAGS="$LDFLAGS"
1166   LDFLAGS="$LDFLAGS $3"
1167   printf "$lt_simple_link_test_code" > conftest.$ac_ext
1168   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
1169     # The compiler can only warn and ignore the option if not recognized
1170     # So say no if there are warnings
1171     if test -s conftest.err; then
1172       # Append any errors to the config.log.
1173       cat conftest.err 1>&AS_MESSAGE_LOG_FD
1174     else
1175       $2=yes
1176     fi
1177   fi
1178   $rm conftest*
1179   LDFLAGS="$save_LDFLAGS"
1180])
1181
1182if test x"[$]$2" = xyes; then
1183    ifelse([$4], , :, [$4])
1184else
1185    ifelse([$5], , :, [$5])
1186fi
1187])# AC_LIBTOOL_LINKER_OPTION
1188
1189
1190# AC_LIBTOOL_SYS_MAX_CMD_LEN
1191# --------------------------
1192AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
1193[# find the maximum length of command line arguments
1194AC_MSG_CHECKING([the maximum length of command line arguments])
1195AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
1196  i=0
1197  testring="ABCD"
1198
1199  case $build_os in
1200  msdosdjgpp*)
1201    # On DJGPP, this test can blow up pretty badly due to problems in libc
1202    # (any single argument exceeding 2000 bytes causes a buffer overrun
1203    # during glob expansion).  Even if it were fixed, the result of this
1204    # check would be larger than it should be.
1205    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
1206    ;;
1207
1208  gnu*)
1209    # Under GNU Hurd, this test is not required because there is
1210    # no limit to the length of command line arguments.
1211    # Libtool will interpret -1 as no limit whatsoever
1212    lt_cv_sys_max_cmd_len=-1;
1213    ;;
1214
1215  cygwin* | mingw*)
1216    # On Win9x/ME, this test blows up -- it succeeds, but takes
1217    # about 5 minutes as the teststring grows exponentially.
1218    # Worse, since 9x/ME are not pre-emptively multitasking,
1219    # you end up with a "frozen" computer, even though with patience
1220    # the test eventually succeeds (with a max line length of 256k).
1221    # Instead, let's just punt: use the minimum linelength reported by
1222    # all of the supported platforms: 8192 (on NT/2K/XP).
1223    lt_cv_sys_max_cmd_len=8192;
1224    ;;
1225
1226  amigaos*)
1227    # On AmigaOS with pdksh, this test takes hours, literally.
1228    # So we just punt and use a minimum line length of 8192.
1229    lt_cv_sys_max_cmd_len=8192;
1230    ;;
1231
1232 *)
1233    # If test is not a shell built-in, we'll probably end up computing a
1234    # maximum length that is only half of the actual maximum length, but
1235    # we can't tell.
1236    while (test "X"`$CONFIG_SHELL [$]0 --fallback-echo "X$testring" 2>/dev/null` \
1237               = "XX$testring") >/dev/null 2>&1 &&
1238            new_result=`expr "X$testring" : ".*" 2>&1` &&
1239            lt_cv_sys_max_cmd_len=$new_result &&
1240            test $i != 17 # 1/2 MB should be enough
1241    do
1242      i=`expr $i + 1`
1243      testring=$testring$testring
1244    done
1245    testring=
1246    # Add a significant safety factor because C++ compilers can tack on massive
1247    # amounts of additional arguments before passing them to the linker.
1248    # It appears as though 1/2 is a usable value.
1249    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
1250    ;;
1251  esac
1252])
1253if test -n $lt_cv_sys_max_cmd_len ; then
1254  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
1255else
1256  AC_MSG_RESULT(none)
1257fi
1258])# AC_LIBTOOL_SYS_MAX_CMD_LEN
1259
1260
1261# _LT_AC_CHECK_DLFCN
1262# --------------------
1263AC_DEFUN([_LT_AC_CHECK_DLFCN],
1264[AC_CHECK_HEADERS(dlfcn.h)dnl
1265])# _LT_AC_CHECK_DLFCN
1266
1267
1268# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
1269#                           ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
1270# ------------------------------------------------------------------
1271AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
1272[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
1273if test "$cross_compiling" = yes; then :
1274  [$4]
1275else
1276  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1277  lt_status=$lt_dlunknown
1278  cat > conftest.$ac_ext <<EOF
1279[#line __oline__ "configure"
1280#include "confdefs.h"
1281
1282#if HAVE_DLFCN_H
1283#include <dlfcn.h>
1284#endif
1285
1286#include <stdio.h>
1287
1288#ifdef RTLD_GLOBAL
1289#  define LT_DLGLOBAL           RTLD_GLOBAL
1290#else
1291#  ifdef DL_GLOBAL
1292#    define LT_DLGLOBAL         DL_GLOBAL
1293#  else
1294#    define LT_DLGLOBAL         0
1295#  endif
1296#endif
1297
1298/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
1299   find out it does not work in some platform. */
1300#ifndef LT_DLLAZY_OR_NOW
1301#  ifdef RTLD_LAZY
1302#    define LT_DLLAZY_OR_NOW            RTLD_LAZY
1303#  else
1304#    ifdef DL_LAZY
1305#      define LT_DLLAZY_OR_NOW          DL_LAZY
1306#    else
1307#      ifdef RTLD_NOW
1308#        define LT_DLLAZY_OR_NOW        RTLD_NOW
1309#      else
1310#        ifdef DL_NOW
1311#          define LT_DLLAZY_OR_NOW      DL_NOW
1312#        else
1313#          define LT_DLLAZY_OR_NOW      0
1314#        endif
1315#      endif
1316#    endif
1317#  endif
1318#endif
1319
1320#ifdef __cplusplus
1321extern "C" void exit (int);
1322#endif
1323
1324void fnord() { int i=42;}
1325int main ()
1326{
1327  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
1328  int status = $lt_dlunknown;
1329
1330  if (self)
1331    {
1332      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
1333      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
1334      /* dlclose (self); */
1335    }
1336
1337    exit (status);
1338}]
1339EOF
1340  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
1341    (./conftest; exit; ) 2>/dev/null
1342    lt_status=$?
1343    case x$lt_status in
1344      x$lt_dlno_uscore) $1 ;;
1345      x$lt_dlneed_uscore) $2 ;;
1346      x$lt_unknown|x*) $3 ;;
1347    esac
1348  else :
1349    # compilation failed
1350    $3
1351  fi
1352fi
1353rm -fr conftest*
1354])# _LT_AC_TRY_DLOPEN_SELF
1355
1356
1357# AC_LIBTOOL_DLOPEN_SELF
1358# -------------------
1359AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
1360[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
1361if test "x$enable_dlopen" != xyes; then
1362  enable_dlopen=unknown
1363  enable_dlopen_self=unknown
1364  enable_dlopen_self_static=unknown
1365else
1366  lt_cv_dlopen=no
1367  lt_cv_dlopen_libs=
1368
1369  case $host_os in
1370  beos*)
1371    lt_cv_dlopen="load_add_on"
1372    lt_cv_dlopen_libs=
1373    lt_cv_dlopen_self=yes
1374    ;;
1375
1376  mingw* | pw32*)
1377    lt_cv_dlopen="LoadLibrary"
1378    lt_cv_dlopen_libs=
1379   ;;
1380
1381  cygwin*)
1382    lt_cv_dlopen="dlopen"
1383    lt_cv_dlopen_libs=
1384   ;;
1385
1386  darwin*)
1387  # if libdl is installed we need to link against it
1388    AC_CHECK_LIB([dl], [dlopen],
1389                [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
1390    lt_cv_dlopen="dyld"
1391    lt_cv_dlopen_libs=
1392    lt_cv_dlopen_self=yes
1393    ])
1394   ;;
1395
1396  *)
1397    AC_CHECK_FUNC([shl_load],
1398          [lt_cv_dlopen="shl_load"],
1399      [AC_CHECK_LIB([dld], [shl_load],
1400            [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
1401        [AC_CHECK_FUNC([dlopen],
1402              [lt_cv_dlopen="dlopen"],
1403          [AC_CHECK_LIB([dl], [dlopen],
1404                [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
1405            [AC_CHECK_LIB([svld], [dlopen],
1406                  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
1407              [AC_CHECK_LIB([dld], [dld_link],
1408                    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
1409              ])
1410            ])
1411          ])
1412        ])
1413      ])
1414    ;;
1415  esac
1416
1417  if test "x$lt_cv_dlopen" != xno; then
1418    enable_dlopen=yes
1419  else
1420    enable_dlopen=no
1421  fi
1422
1423  case $lt_cv_dlopen in
1424  dlopen)
1425    save_CPPFLAGS="$CPPFLAGS"
1426    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
1427
1428    save_LDFLAGS="$LDFLAGS"
1429    eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
1430
1431    save_LIBS="$LIBS"
1432    LIBS="$lt_cv_dlopen_libs $LIBS"
1433
1434    AC_CACHE_CHECK([whether a program can dlopen itself],
1435          lt_cv_dlopen_self, [dnl
1436          _LT_AC_TRY_DLOPEN_SELF(
1437            lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
1438            lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
1439    ])
1440
1441    if test "x$lt_cv_dlopen_self" = xyes; then
1442      LDFLAGS="$LDFLAGS $link_static_flag"
1443      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
1444          lt_cv_dlopen_self_static, [dnl
1445          _LT_AC_TRY_DLOPEN_SELF(
1446            lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
1447            lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
1448      ])
1449    fi
1450
1451    CPPFLAGS="$save_CPPFLAGS"
1452    LDFLAGS="$save_LDFLAGS"
1453    LIBS="$save_LIBS"
1454    ;;
1455  esac
1456
1457  case $lt_cv_dlopen_self in
1458  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
1459  *) enable_dlopen_self=unknown ;;
1460  esac
1461
1462  case $lt_cv_dlopen_self_static in
1463  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
1464  *) enable_dlopen_self_static=unknown ;;
1465  esac
1466fi
1467])# AC_LIBTOOL_DLOPEN_SELF
1468
1469
1470# AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
1471# ---------------------------------
1472# Check to see if options -c and -o are simultaneously supported by compiler
1473AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
1474[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
1475AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
1476  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
1477  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
1478   $rm -r conftest 2>/dev/null
1479   mkdir conftest
1480   cd conftest
1481   mkdir out
1482   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
1483
1484   lt_compiler_flag="-o out/conftest2.$ac_objext"
1485   # Insert the option either (1) after the last *FLAGS variable, or
1486   # (2) before a word containing "conftest.", or (3) at the end.
1487   # Note that $ac_compile itself does not contain backslashes and begins
1488   # with a dollar sign (not a hyphen), so the echo should work correctly.
1489   lt_compile=`echo "$ac_compile" | $SED \
1490   -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
1491   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1492   -e 's:$: $lt_compiler_flag:'`
1493   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1494   (eval "$lt_compile" 2>out/conftest.err)
1495   ac_status=$?
1496   cat out/conftest.err >&AS_MESSAGE_LOG_FD
1497   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1498   if (exit $ac_status) && test -s out/conftest2.$ac_objext
1499   then
1500     # The compiler can only warn and ignore the option if not recognized
1501     # So say no if there are warnings
1502     if test ! -s out/conftest.err; then
1503       _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
1504     fi
1505   fi
1506   chmod u+w .
1507   $rm conftest*
1508   # SGI C++ compiler will create directory out/ii_files/ for
1509   # template instantiation
1510   test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
1511   $rm out/* && rmdir out
1512   cd ..
1513   rmdir conftest
1514   $rm conftest*
1515])
1516])# AC_LIBTOOL_PROG_CC_C_O
1517
1518
1519# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
1520# -----------------------------------------
1521# Check to see if we can do hard links to lock some files if needed
1522AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
1523[AC_REQUIRE([_LT_AC_LOCK])dnl
1524
1525hard_links="nottested"
1526if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
1527  # do not overwrite the value of need_locks provided by the user
1528  AC_MSG_CHECKING([if we can lock with hard links])
1529  hard_links=yes
1530  $rm conftest*
1531  ln conftest.a conftest.b 2>/dev/null && hard_links=no
1532  touch conftest.a
1533  ln conftest.a conftest.b 2>&5 || hard_links=no
1534  ln conftest.a conftest.b 2>/dev/null && hard_links=no
1535  AC_MSG_RESULT([$hard_links])
1536  if test "$hard_links" = no; then
1537    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
1538    need_locks=warn
1539  fi
1540else
1541  need_locks=no
1542fi
1543])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
1544
1545
1546# AC_LIBTOOL_OBJDIR
1547# -----------------
1548AC_DEFUN([AC_LIBTOOL_OBJDIR],
1549[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
1550[rm -f .libs 2>/dev/null
1551mkdir .libs 2>/dev/null
1552if test -d .libs; then
1553  lt_cv_objdir=.libs
1554else
1555  # MS-DOS does not allow filenames that begin with a dot.
1556  lt_cv_objdir=_libs
1557fi
1558rmdir .libs 2>/dev/null])
1559objdir=$lt_cv_objdir
1560])# AC_LIBTOOL_OBJDIR
1561
1562
1563# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
1564# ----------------------------------------------
1565# Check hardcoding attributes.
1566AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
1567[AC_MSG_CHECKING([how to hardcode library paths into programs])
1568_LT_AC_TAGVAR(hardcode_action, $1)=
1569if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
1570   test -n "$_LT_AC_TAGVAR(runpath_var $1)" || \
1571   test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)"="Xyes" ; then
1572
1573  # We can hardcode non-existant directories.
1574  if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
1575     # If the only mechanism to avoid hardcoding is shlibpath_var, we
1576     # have to relink, otherwise we might link with an installed library
1577     # when we should be linking with a yet-to-be-installed one
1578     ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
1579     test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
1580    # Linking always hardcodes the temporary library directory.
1581    _LT_AC_TAGVAR(hardcode_action, $1)=relink
1582  else
1583    # We can link without hardcoding, and we can hardcode nonexisting dirs.
1584    _LT_AC_TAGVAR(hardcode_action, $1)=immediate
1585  fi
1586else
1587  # We cannot hardcode anything, or else we can only hardcode existing
1588  # directories.
1589  _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
1590fi
1591AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
1592
1593if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
1594  # Fast installation is not supported
1595  enable_fast_install=no
1596elif test "$shlibpath_overrides_runpath" = yes ||
1597     test "$enable_shared" = no; then
1598  # Fast installation is not necessary
1599  enable_fast_install=needless
1600fi
1601])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
1602
1603
1604# AC_LIBTOOL_SYS_LIB_STRIP
1605# ------------------------
1606AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
1607[striplib=
1608old_striplib=
1609AC_MSG_CHECKING([whether stripping libraries is possible])
1610if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
1611  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
1612  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
1613  AC_MSG_RESULT([yes])
1614else
1615# FIXME - insert some real tests, host_os isn't really good enough
1616  case $host_os in
1617   darwin*)
1618       if test -n "$STRIP" ; then
1619         striplib="$STRIP -x"
1620         AC_MSG_RESULT([yes])
1621       else
1622  AC_MSG_RESULT([no])
1623fi
1624       ;;
1625   *)
1626  AC_MSG_RESULT([no])
1627    ;;
1628  esac
1629fi
1630])# AC_LIBTOOL_SYS_LIB_STRIP
1631
1632
1633# AC_LIBTOOL_SYS_DYNAMIC_LINKER
1634# -----------------------------
1635# PORTME Fill in your ld.so characteristics
1636AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
1637[AC_MSG_CHECKING([dynamic linker characteristics])
1638library_names_spec=
1639libname_spec='lib$name'
1640soname_spec=
1641shrext=".so"
1642postinstall_cmds=
1643postuninstall_cmds=
1644finish_cmds=
1645finish_eval=
1646shlibpath_var=
1647shlibpath_overrides_runpath=unknown
1648version_type=none
1649dynamic_linker="$host_os ld.so"
1650sys_lib_dlsearch_path_spec="/lib /usr/lib"
1651if test "$GCC" = yes; then
1652  sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
1653  if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
1654    # if the path contains ";" then we assume it to be the separator
1655    # otherwise default to the standard path separator (i.e. ":") - it is
1656    # assumed that no part of a normal pathname contains ";" but that should
1657    # okay in the real world where ";" in dirpaths is itself problematic.
1658    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
1659  else
1660    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
1661  fi
1662else
1663  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
1664fi
1665need_lib_prefix=unknown
1666hardcode_into_libs=no
1667
1668# when you set need_version to no, make sure it does not cause -set_version
1669# flags to be left without arguments
1670need_version=unknown
1671
1672case $host_os in
1673aix3*)
1674  version_type=linux
1675  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
1676  shlibpath_var=LIBPATH
1677
1678  # AIX 3 has no versioning support, so we append a major version to the name.
1679  soname_spec='${libname}${release}${shared_ext}$major'
1680  ;;
1681
1682aix4* | aix5*)
1683  version_type=linux
1684  need_lib_prefix=no
1685  need_version=no
1686  hardcode_into_libs=yes
1687  if test "$host_cpu" = ia64; then
1688    # AIX 5 supports IA64
1689    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
1690    shlibpath_var=LD_LIBRARY_PATH
1691  else
1692    # With GCC up to 2.95.x, collect2 would create an import file
1693    # for dependence libraries.  The import file would start with
1694    # the line `#! .'.  This would cause the generated library to
1695    # depend on `.', always an invalid library.  This was fixed in
1696    # development snapshots of GCC prior to 3.0.
1697    case $host_os in
1698      aix4 | aix4.[[01]] | aix4.[[01]].*)
1699      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
1700           echo ' yes '
1701           echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
1702        :
1703      else
1704        can_build_shared=no
1705      fi
1706      ;;
1707    esac
1708    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
1709    # soname into executable. Probably we can add versioning support to
1710    # collect2, so additional links can be useful in future.
1711    if test "$aix_use_runtimelinking" = yes; then
1712      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
1713      # instead of lib<name>.a to let people know that these are not
1714      # typical AIX shared libraries.
1715      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1716    else
1717      # We preserve .a as extension for shared libraries through AIX4.2
1718      # and later when we are not doing run time linking.
1719      library_names_spec='${libname}${release}.a $libname.a'
1720      soname_spec='${libname}${release}${shared_ext}$major'
1721    fi
1722    shlibpath_var=LIBPATH
1723  fi
1724  ;;
1725
1726amigaos*)
1727  library_names_spec='$libname.ixlibrary $libname.a'
1728  # Create ${libname}_ixlibrary.a entries in /sys/libs.
1729  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'
1730  ;;
1731
1732beos*)
1733  library_names_spec='${libname}${shared_ext}'
1734  dynamic_linker="$host_os ld.so"
1735  shlibpath_var=LIBRARY_PATH
1736  ;;
1737
1738bsdi4*)
1739  version_type=linux
1740  need_version=no
1741  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1742  soname_spec='${libname}${release}${shared_ext}$major'
1743  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
1744  shlibpath_var=LD_LIBRARY_PATH
1745  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
1746  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
1747  # the default ld.so.conf also contains /usr/contrib/lib and
1748  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
1749  # libtool to hard-code these into programs
1750  ;;
1751
1752cygwin* | mingw* | pw32*)
1753  version_type=windows
1754  shrext=".dll"
1755  need_version=no
1756  need_lib_prefix=no
1757
1758  case $GCC,$host_os in
1759  yes,cygwin* | yes,mingw* | yes,pw32*)
1760    library_names_spec='$libname.dll.a'
1761    # DLL is installed to $(libdir)/../bin by postinstall_cmds
1762    postinstall_cmds='base_file=`basename \${file}`~
1763      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
1764      dldir=$destdir/`dirname \$dlpath`~
1765      test -d \$dldir || mkdir -p \$dldir~
1766      $install_prog $dir/$dlname \$dldir/$dlname'
1767    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
1768      dlpath=$dir/\$dldll~
1769       $rm \$dlpath'
1770    shlibpath_overrides_runpath=yes
1771
1772    case $host_os in
1773    cygwin*)
1774      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
1775      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
1776      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
1777      ;;
1778    mingw*)
1779      # MinGW DLLs use traditional 'lib' prefix
1780      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
1781      sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
1782      if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
1783        # It is most probably a Windows format PATH printed by
1784        # mingw gcc, but we are running on Cygwin. Gcc prints its search
1785        # path with ; separators, and with drive letters. We can handle the
1786        # drive letters (cygwin fileutils understands them), so leave them,
1787        # especially as we might pass files found there to a mingw objdump,
1788        # which wouldn't understand a cygwinified path. Ahh.
1789        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
1790      else
1791        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
1792      fi
1793      ;;
1794    pw32*)
1795      # pw32 DLLs use 'pw' prefix rather than 'lib'
1796      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
1797      ;;
1798    esac
1799    ;;
1800
1801  linux*)
1802    if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
1803      archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
1804      supports_anon_versioning=no
1805      case `$LD -v 2>/dev/null` in
1806        *\ [01].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
1807        *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
1808        *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
1809        *\ 2.11.*) ;; # other 2.11 versions
1810        *) supports_anon_versioning=yes ;;
1811      esac
1812      if test $supports_anon_versioning = yes; then
1813        archive_expsym_cmds='$echo "{ global:" > $output_objdir/$libname.ver~
1814cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
1815$echo "local: *; };" >> $output_objdir/$libname.ver~
1816        $CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
1817      else
1818        $archive_expsym_cmds="$archive_cmds"
1819      fi
1820    else
1821      ld_shlibs=no
1822    fi
1823    ;;
1824
1825  *)
1826    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
1827    ;;
1828  esac
1829  dynamic_linker='Win32 ld.exe'
1830  # FIXME: first we should search . and the directory the executable is in
1831  shlibpath_var=PATH
1832  ;;
1833
1834darwin* | rhapsody*)
1835  dynamic_linker="$host_os dyld"
1836  version_type=darwin
1837  need_lib_prefix=no
1838  need_version=no
1839  library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
1840  soname_spec='${libname}${release}${major}$shared_ext'
1841  shlibpath_overrides_runpath=yes
1842  shlibpath_var=DYLD_LIBRARY_PATH
1843  shrext='$(test .$module = .yes && echo .so || echo .dylib)'
1844  # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
1845  if test "$GCC" = yes; then
1846    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"`
1847  else
1848    sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
1849  fi
1850  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
1851  ;;
1852
1853dgux*)
1854  version_type=linux
1855  need_lib_prefix=no
1856  need_version=no
1857  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
1858  soname_spec='${libname}${release}${shared_ext}$major'
1859  shlibpath_var=LD_LIBRARY_PATH
1860  ;;
1861
1862freebsd1*)
1863  dynamic_linker=no
1864  ;;
1865
1866kfreebsd*-gnu)
1867  version_type=linux
1868  need_lib_prefix=no
1869  need_version=no
1870  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
1871  soname_spec='${libname}${release}${shared_ext}$major'
1872  shlibpath_var=LD_LIBRARY_PATH
1873  shlibpath_overrides_runpath=no
1874  hardcode_into_libs=yes
1875  dynamic_linker='GNU ld.so'
1876  ;;
1877
1878freebsd*)
1879  objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
1880  version_type=freebsd-$objformat
1881  case $version_type in
1882    freebsd-elf*)
1883      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
1884      need_version=no
1885      need_lib_prefix=no
1886      ;;
1887    freebsd-*)
1888      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
1889      need_version=yes
1890      ;;
1891  esac
1892  shlibpath_var=LD_LIBRARY_PATH
1893  case $host_os in
1894  freebsd2*)
1895    shlibpath_overrides_runpath=yes
1896    ;;
1897  freebsd3.[01]* | freebsdelf3.[01]*)
1898    shlibpath_overrides_runpath=yes
1899    hardcode_into_libs=yes
1900    ;;
1901  *) # from 3.2 on
1902    shlibpath_overrides_runpath=no
1903    hardcode_into_libs=yes
1904    ;;
1905  esac
1906  ;;
1907
1908gnu*)
1909  version_type=linux
1910  need_lib_prefix=no
1911  need_version=no
1912  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
1913  soname_spec='${libname}${release}${shared_ext}$major'
1914  shlibpath_var=LD_LIBRARY_PATH
1915  hardcode_into_libs=yes
1916  ;;
1917
1918hpux9* | hpux10* | hpux11*)
1919  # Give a soname corresponding to the major version so that dld.sl refuses to
1920  # link against other versions.
1921  version_type=sunos
1922  need_lib_prefix=no
1923  need_version=no
1924  case "$host_cpu" in
1925  ia64*)
1926    shrext='.so'
1927    hardcode_into_libs=yes
1928    dynamic_linker="$host_os dld.so"
1929    shlibpath_var=LD_LIBRARY_PATH
1930    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
1931    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1932    soname_spec='${libname}${release}${shared_ext}$major'
1933    if test "X$HPUX_IA64_MODE" = X32; then
1934      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
1935    else
1936      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
1937    fi
1938    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
1939    ;;
1940   hppa*64*)
1941     shrext='.sl'
1942     hardcode_into_libs=yes
1943     dynamic_linker="$host_os dld.sl"
1944     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
1945     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
1946     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1947     soname_spec='${libname}${release}${shared_ext}$major'
1948     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
1949     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
1950     ;;
1951   *)
1952    shrext='.sl'
1953    dynamic_linker="$host_os dld.sl"
1954    shlibpath_var=SHLIB_PATH
1955    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
1956    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1957    soname_spec='${libname}${release}${shared_ext}$major'
1958    ;;
1959  esac
1960  # HP-UX runs *really* slowly unless shared libraries are mode 555.
1961  postinstall_cmds='chmod 555 $lib'
1962  ;;
1963
1964irix5* | irix6* | nonstopux*)
1965  case $host_os in
1966    nonstopux*) version_type=nonstopux ;;
1967    *)
1968        if test "$lt_cv_prog_gnu_ld" = yes; then
1969                version_type=linux
1970        else
1971                version_type=irix
1972        fi ;;
1973  esac
1974  need_lib_prefix=no
1975  need_version=no
1976  soname_spec='${libname}${release}${shared_ext}$major'
1977  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
1978  case $host_os in
1979  irix5* | nonstopux*)
1980    libsuff= shlibsuff=
1981    ;;
1982  *)
1983    case $LD in # libtool.m4 will add one of these switches to LD
1984    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
1985      libsuff= shlibsuff= libmagic=32-bit;;
1986    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
1987      libsuff=32 shlibsuff=N32 libmagic=N32;;
1988    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
1989      libsuff=64 shlibsuff=64 libmagic=64-bit;;
1990    *) libsuff= shlibsuff= libmagic=never-match;;
1991    esac
1992    ;;
1993  esac
1994  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
1995  shlibpath_overrides_runpath=no
1996  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
1997  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
1998  hardcode_into_libs=yes
1999  ;;
2000
2001# No shared lib support for Linux oldld, aout, or coff.
2002linux*oldld* | linux*aout* | linux*coff*)
2003  dynamic_linker=no
2004  ;;
2005
2006# This must be Linux ELF.
2007linux*)
2008  version_type=linux
2009  need_lib_prefix=no
2010  need_version=no
2011  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2012  soname_spec='${libname}${release}${shared_ext}$major'
2013  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
2014  shlibpath_var=LD_LIBRARY_PATH
2015  shlibpath_overrides_runpath=no
2016  # This implies no fast_install, which is unacceptable.
2017  # Some rework will be needed to allow for fast_install
2018  # before this can be enabled.
2019  hardcode_into_libs=yes
2020
2021  # Append ld.so.conf contents to the search path
2022  if test -f /etc/ld.so.conf; then
2023    ld_extra=`$SED -e 's/[:,\t]/ /g;s/=[^=]*$//;s/=[^= ]* / /g' /etc/ld.so.conf`
2024    sys_lib_dlsearch_path_spec="/lib /usr/lib $ld_extra"
2025  fi
2026
2027  case $host_cpu:$lt_cv_cc_64bit_output in
2028  powerpc64:yes | s390x:yes | sparc64:yes | x86_64:yes)
2029    sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /usr/X11R6/lib64"
2030    sys_lib_search_path_spec="/lib64 /usr/lib64 /usr/local/lib64 /usr/X11R6/lib64"
2031    ;;
2032  esac
2033
2034  # We used to test for /lib/ld.so.1 and disable shared libraries on
2035  # powerpc, because MkLinux only supported shared libraries with the
2036  # GNU dynamic linker.  Since this was broken with cross compilers,
2037  # most powerpc-linux boxes support dynamic linking these days and
2038  # people can always --disable-shared, the test was removed, and we
2039  # assume the GNU/Linux dynamic linker is in use.
2040  dynamic_linker='GNU/Linux ld.so'
2041
2042  # Find out which ABI we are using (multilib Linux x86_64 hack).
2043  libsuff=
2044  case "$host_cpu" in
2045  x86_64*)
2046    echo '[#]line __oline__ "configure"' > conftest.$ac_ext
2047    if AC_TRY_EVAL(ac_compile); then
2048      case `/usr/bin/file conftest.$ac_objext` in
2049      *64-bit*)
2050        libsuff=64
2051        ;;
2052      esac
2053    fi
2054    rm -rf conftest*
2055    ;;
2056  *)
2057    ;;
2058  esac
2059  sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff}"
2060  sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
2061  ;;
2062
2063knetbsd*-gnu)
2064  version_type=linux
2065  need_lib_prefix=no
2066  need_version=no
2067  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2068  soname_spec='${libname}${release}${shared_ext}$major'
2069  shlibpath_var=LD_LIBRARY_PATH
2070  shlibpath_overrides_runpath=no
2071  hardcode_into_libs=yes
2072  dynamic_linker='GNU ld.so'
2073  ;;
2074
2075netbsd*)
2076  version_type=sunos
2077  need_lib_prefix=no
2078  need_version=no
2079  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
2080    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2081    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2082    dynamic_linker='NetBSD (a.out) ld.so'
2083  else
2084    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2085    soname_spec='${libname}${release}${shared_ext}$major'
2086    dynamic_linker='NetBSD ld.elf_so'
2087  fi
2088  shlibpath_var=LD_LIBRARY_PATH
2089  shlibpath_overrides_runpath=yes
2090  hardcode_into_libs=yes
2091  ;;
2092
2093newsos6)
2094  version_type=linux
2095  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2096  shlibpath_var=LD_LIBRARY_PATH
2097  shlibpath_overrides_runpath=yes
2098  ;;
2099
2100nto-qnx*)
2101  version_type=linux
2102  need_lib_prefix=no
2103  need_version=no
2104  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2105  soname_spec='${libname}${release}${shared_ext}$major'
2106  shlibpath_var=LD_LIBRARY_PATH
2107  shlibpath_overrides_runpath=yes
2108  ;;
2109
2110openbsd*)
2111  version_type=sunos
2112  need_lib_prefix=no
2113  need_version=yes
2114  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2115  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2116  shlibpath_var=LD_LIBRARY_PATH
2117  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2118    case $host_os in
2119      openbsd2.[[89]] | openbsd2.[[89]].*)
2120        shlibpath_overrides_runpath=no
2121        ;;
2122      *)
2123        shlibpath_overrides_runpath=yes
2124        ;;
2125      esac
2126  else
2127    shlibpath_overrides_runpath=yes
2128  fi
2129  ;;
2130
2131os2*)
2132  libname_spec='$name'
2133  shrext=".dll"
2134  need_lib_prefix=no
2135  library_names_spec='$libname${shared_ext} $libname.a'
2136  dynamic_linker='OS/2 ld.exe'
2137  shlibpath_var=LIBPATH
2138  ;;
2139
2140osf3* | osf4* | osf5*)
2141  version_type=osf
2142  need_lib_prefix=no
2143  need_version=no
2144  soname_spec='${libname}${release}${shared_ext}$major'
2145  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2146  shlibpath_var=LD_LIBRARY_PATH
2147  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
2148  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
2149  ;;
2150
2151sco3.2v5*)
2152  version_type=osf
2153  soname_spec='${libname}${release}${shared_ext}$major'
2154  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2155  shlibpath_var=LD_LIBRARY_PATH
2156  ;;
2157
2158solaris*)
2159  version_type=linux
2160  need_lib_prefix=no
2161  need_version=no
2162  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2163  soname_spec='${libname}${release}${shared_ext}$major'
2164  shlibpath_var=LD_LIBRARY_PATH
2165  shlibpath_overrides_runpath=yes
2166  hardcode_into_libs=yes
2167  # ldd complains unless libraries are executable
2168  postinstall_cmds='chmod +x $lib'
2169  ;;
2170
2171sunos4*)
2172  version_type=sunos
2173  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2174  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
2175  shlibpath_var=LD_LIBRARY_PATH
2176  shlibpath_overrides_runpath=yes
2177  if test "$with_gnu_ld" = yes; then
2178    need_lib_prefix=no
2179  fi
2180  need_version=yes
2181  ;;
2182
2183sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
2184  version_type=linux
2185  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2186  soname_spec='${libname}${release}${shared_ext}$major'
2187  shlibpath_var=LD_LIBRARY_PATH
2188  case $host_vendor in
2189    sni)
2190      shlibpath_overrides_runpath=no
2191      need_lib_prefix=no
2192      export_dynamic_flag_spec='${wl}-Blargedynsym'
2193      runpath_var=LD_RUN_PATH
2194      ;;
2195    siemens)
2196      need_lib_prefix=no
2197      ;;
2198    motorola)
2199      need_lib_prefix=no
2200      need_version=no
2201      shlibpath_overrides_runpath=no
2202      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
2203      ;;
2204  esac
2205  ;;
2206
2207sysv4*MP*)
2208  if test -d /usr/nec ;then
2209    version_type=linux
2210    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
2211    soname_spec='$libname${shared_ext}.$major'
2212    shlibpath_var=LD_LIBRARY_PATH
2213  fi
2214  ;;
2215
2216uts4*)
2217  version_type=linux
2218  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2219  soname_spec='${libname}${release}${shared_ext}$major'
2220  shlibpath_var=LD_LIBRARY_PATH
2221  ;;
2222
2223*)
2224  dynamic_linker=no
2225  ;;
2226esac
2227AC_MSG_RESULT([$dynamic_linker])
2228test "$dynamic_linker" = no && can_build_shared=no
2229])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
2230
2231
2232# _LT_AC_TAGCONFIG
2233# ----------------
2234AC_DEFUN([_LT_AC_TAGCONFIG],
2235[AC_ARG_WITH([tags],
2236    [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
2237        [include additional configurations @<:@automatic@:>@])],
2238    [tagnames="$withval"])
2239
2240if test -f "$ltmain" && test -n "$tagnames"; then
2241  if test ! -f "${ofile}"; then
2242    AC_MSG_WARN([output file `$ofile' does not exist])
2243  fi
2244
2245  if test -z "$LTCC"; then
2246    eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
2247    if test -z "$LTCC"; then
2248      AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
2249    else
2250      AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
2251    fi
2252  fi
2253
2254  # Extract list of available tagged configurations in $ofile.
2255  # Note that this assumes the entire list is on one line.
2256  available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
2257
2258  lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2259  for tagname in $tagnames; do
2260    IFS="$lt_save_ifs"
2261    # Check whether tagname contains only valid characters
2262    case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
2263    "") ;;
2264    *)  AC_MSG_ERROR([invalid tag name: $tagname])
2265        ;;
2266    esac
2267
2268    if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
2269    then
2270      AC_MSG_ERROR([tag name \"$tagname\" already exists])
2271    fi
2272
2273    # Update the list of available tags.
2274    if test -n "$tagname"; then
2275      echo appending configuration tag \"$tagname\" to $ofile
2276
2277      case $tagname in
2278      CXX)
2279        if test -n "$CXX" && test "X$CXX" != "Xno"; then
2280          AC_LIBTOOL_LANG_CXX_CONFIG
2281        else
2282          tagname=""
2283        fi
2284        ;;
2285
2286      F77)
2287        if test -n "$F77" && test "X$F77" != "Xno"; then
2288          AC_LIBTOOL_LANG_F77_CONFIG
2289        else
2290          tagname=""
2291        fi
2292        ;;
2293
2294      GCJ)
2295        if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
2296          AC_LIBTOOL_LANG_GCJ_CONFIG
2297        else
2298          tagname=""
2299        fi
2300        ;;
2301
2302      RC)
2303        AC_LIBTOOL_LANG_RC_CONFIG
2304        ;;
2305
2306      *)
2307        AC_MSG_ERROR([Unsupported tag name: $tagname])
2308        ;;
2309      esac
2310
2311      # Append the new tag name to the list of available tags.
2312      if test -n "$tagname" ; then
2313      available_tags="$available_tags $tagname"
2314    fi
2315    fi
2316  done
2317  IFS="$lt_save_ifs"
2318
2319  # Now substitute the updated list of available tags.
2320  if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
2321    mv "${ofile}T" "$ofile"
2322    chmod +x "$ofile"
2323  else
2324    rm -f "${ofile}T"
2325    AC_MSG_ERROR([unable to update list of available tagged configurations.])
2326  fi
2327fi
2328])# _LT_AC_TAGCONFIG
2329
2330# _LT_AC_SHARED_EXT
2331# ----------------
2332AC_DEFUN([_LT_AC_SHARED_EXT],[
2333  if test ! -f "${ofile}"; then
2334    AC_MSG_WARN([output file `$ofile' does not exist])
2335  fi
2336  if test -z `grep -e 'shared_ext.*shrext' $ofile`; then
2337    # Make sure $shared_ext gets set to $shrext
2338    if sed -e 's/shared_ext/shrext/g' "$ofile" > "${ofile}T"; then
2339      mv "${ofile}T" "$ofile"
2340      chmod +x "$ofile"
2341    else
2342      rm -f "${ofile}T"
2343      AC_MSG_ERROR([unable to update shared_ext.])
2344    fi
2345  fi
2346])# _LT_AC_SHARED_EXT
2347
2348
2349# AC_LIBTOOL_DLOPEN
2350# -----------------
2351# enable checks for dlopen support
2352AC_DEFUN([AC_LIBTOOL_DLOPEN],
2353 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
2354])# AC_LIBTOOL_DLOPEN
2355
2356
2357# AC_LIBTOOL_WIN32_DLL
2358# --------------------
2359# declare package support for building win32 dll's
2360AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
2361[AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
2362])# AC_LIBTOOL_WIN32_DLL
2363
2364
2365# AC_ENABLE_SHARED([DEFAULT])
2366# ---------------------------
2367# implement the --enable-shared flag
2368# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
2369AC_DEFUN([AC_ENABLE_SHARED],
2370[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
2371AC_ARG_ENABLE([shared],
2372    [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
2373        [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
2374    [p=${PACKAGE-default}
2375    case $enableval in
2376    yes) enable_shared=yes ;;
2377    no) enable_shared=no ;;
2378    *)
2379      enable_shared=no
2380      # Look at the argument we got.  We use all the common list separators.
2381      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2382      for pkg in $enableval; do
2383        IFS="$lt_save_ifs"
2384        if test "X$pkg" = "X$p"; then
2385          enable_shared=yes
2386        fi
2387      done
2388      IFS="$lt_save_ifs"
2389      ;;
2390    esac],
2391    [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
2392])# AC_ENABLE_SHARED
2393
2394
2395# AC_DISABLE_SHARED
2396# -----------------
2397#- set the default shared flag to --disable-shared
2398AC_DEFUN([AC_DISABLE_SHARED],
2399[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2400AC_ENABLE_SHARED(no)
2401])# AC_DISABLE_SHARED
2402
2403
2404# AC_ENABLE_STATIC([DEFAULT])
2405# ---------------------------
2406# implement the --enable-static flag
2407# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
2408AC_DEFUN([AC_ENABLE_STATIC],
2409[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
2410AC_ARG_ENABLE([static],
2411    [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
2412        [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
2413    [p=${PACKAGE-default}
2414    case $enableval in
2415    yes) enable_static=yes ;;
2416    no) enable_static=no ;;
2417    *)
2418     enable_static=no
2419      # Look at the argument we got.  We use all the common list separators.
2420      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2421      for pkg in $enableval; do
2422        IFS="$lt_save_ifs"
2423        if test "X$pkg" = "X$p"; then
2424          enable_static=yes
2425        fi
2426      done
2427      IFS="$lt_save_ifs"
2428      ;;
2429    esac],
2430    [enable_static=]AC_ENABLE_STATIC_DEFAULT)
2431])# AC_ENABLE_STATIC
2432
2433
2434# AC_DISABLE_STATIC
2435# -----------------
2436# set the default static flag to --disable-static
2437AC_DEFUN([AC_DISABLE_STATIC],
2438[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2439AC_ENABLE_STATIC(no)
2440])# AC_DISABLE_STATIC
2441
2442
2443# AC_ENABLE_FAST_INSTALL([DEFAULT])
2444# ---------------------------------
2445# implement the --enable-fast-install flag
2446# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
2447AC_DEFUN([AC_ENABLE_FAST_INSTALL],
2448[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
2449AC_ARG_ENABLE([fast-install],
2450    [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
2451    [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
2452    [p=${PACKAGE-default}
2453    case $enableval in
2454    yes) enable_fast_install=yes ;;
2455    no) enable_fast_install=no ;;
2456    *)
2457      enable_fast_install=no
2458      # Look at the argument we got.  We use all the common list separators.
2459      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2460      for pkg in $enableval; do
2461        IFS="$lt_save_ifs"
2462        if test "X$pkg" = "X$p"; then
2463          enable_fast_install=yes
2464        fi
2465      done
2466      IFS="$lt_save_ifs"
2467      ;;
2468    esac],
2469    [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
2470])# AC_ENABLE_FAST_INSTALL
2471
2472
2473# AC_DISABLE_FAST_INSTALL
2474# -----------------------
2475# set the default to --disable-fast-install
2476AC_DEFUN([AC_DISABLE_FAST_INSTALL],
2477[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2478AC_ENABLE_FAST_INSTALL(no)
2479])# AC_DISABLE_FAST_INSTALL
2480
2481
2482# AC_LIBTOOL_PICMODE([MODE])
2483# --------------------------
2484# implement the --with-pic flag
2485# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
2486AC_DEFUN([AC_LIBTOOL_PICMODE],
2487[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2488pic_mode=ifelse($#,1,$1,default)
2489])# AC_LIBTOOL_PICMODE
2490
2491
2492# AC_PROG_EGREP
2493# -------------
2494# This is predefined starting with Autoconf 2.54, so this conditional
2495# definition can be removed once we require Autoconf 2.54 or later.
2496m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
2497[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
2498   [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
2499    then ac_cv_prog_egrep='grep -E'
2500    else ac_cv_prog_egrep='egrep'
2501    fi])
2502 EGREP=$ac_cv_prog_egrep
2503 AC_SUBST([EGREP])
2504])])
2505
2506
2507# AC_PATH_TOOL_PREFIX
2508# -------------------
2509# find a file program which can recognise shared library
2510AC_DEFUN([AC_PATH_TOOL_PREFIX],
2511[AC_REQUIRE([AC_PROG_EGREP])dnl
2512AC_MSG_CHECKING([for $1])
2513AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
2514[case $MAGIC_CMD in
2515[[\\/*] |  ?:[\\/]*])
2516  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
2517  ;;
2518*)
2519  lt_save_MAGIC_CMD="$MAGIC_CMD"
2520  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2521dnl $ac_dummy forces splitting on constant user-supplied paths.
2522dnl POSIX.2 word splitting is done only on the output of word expansions,
2523dnl not every word.  This closes a longstanding sh security hole.
2524  ac_dummy="ifelse([$2], , $PATH, [$2])"
2525  for ac_dir in $ac_dummy; do
2526    IFS="$lt_save_ifs"
2527    test -z "$ac_dir" && ac_dir=.
2528    if test -f $ac_dir/$1; then
2529      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
2530      if test -n "$file_magic_test_file"; then
2531        case $deplibs_check_method in
2532        "file_magic "*)
2533          file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
2534          MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2535          if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
2536            $EGREP "$file_magic_regex" > /dev/null; then
2537            :
2538          else
2539            cat <<EOF 1>&2
2540
2541*** Warning: the command libtool uses to detect shared libraries,
2542*** $file_magic_cmd, produces output that libtool cannot recognize.
2543*** The result is that libtool may fail to recognize shared libraries
2544*** as such.  This will affect the creation of libtool libraries that
2545*** depend on shared libraries, but programs linked with such libtool
2546*** libraries will work regardless of this problem.  Nevertheless, you
2547*** may want to report the problem to your system manager and/or to
2548*** bug-libtool@gnu.org
2549
2550EOF
2551          fi ;;
2552        esac
2553      fi
2554      break
2555    fi
2556  done
2557  IFS="$lt_save_ifs"
2558  MAGIC_CMD="$lt_save_MAGIC_CMD"
2559  ;;
2560esac])
2561MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2562if test -n "$MAGIC_CMD"; then
2563  AC_MSG_RESULT($MAGIC_CMD)
2564else
2565  AC_MSG_RESULT(no)
2566fi
2567])# AC_PATH_TOOL_PREFIX
2568
2569
2570# AC_PATH_MAGIC
2571# -------------
2572# find a file program which can recognise a shared library
2573AC_DEFUN([AC_PATH_MAGIC],
2574[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
2575if test -z "$lt_cv_path_MAGIC_CMD"; then
2576  if test -n "$ac_tool_prefix"; then
2577    AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
2578  else
2579    MAGIC_CMD=:
2580  fi
2581fi
2582])# AC_PATH_MAGIC
2583
2584
2585# AC_PROG_LD
2586# ----------
2587# find the pathname to the GNU or non-GNU linker
2588AC_DEFUN([AC_PROG_LD],
2589[AC_ARG_WITH([gnu-ld],
2590    [AC_HELP_STRING([--with-gnu-ld],
2591        [assume the C compiler uses GNU ld @<:@default=no@:>@])],
2592    [test "$withval" = no || with_gnu_ld=yes],
2593    [with_gnu_ld=no])
2594AC_REQUIRE([LT_AC_PROG_SED])dnl
2595AC_REQUIRE([AC_PROG_CC])dnl
2596AC_REQUIRE([AC_CANONICAL_HOST])dnl
2597AC_REQUIRE([AC_CANONICAL_BUILD])dnl
2598ac_prog=ld
2599if test "$GCC" = yes; then
2600  # Check if gcc -print-prog-name=ld gives a path.
2601  AC_MSG_CHECKING([for ld used by $CC])
2602  case $host in
2603  *-*-mingw*)
2604    # gcc leaves a trailing carriage return which upsets mingw
2605    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
2606  *)
2607    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
2608  esac
2609  case $ac_prog in
2610    # Accept absolute paths.
2611    [[\\/]]* | ?:[[\\/]]*)
2612      re_direlt='/[[^/]][[^/]]*/\.\./'
2613      # Canonicalize the pathname of ld
2614      ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
2615      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
2616        ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
2617      done
2618      test -z "$LD" && LD="$ac_prog"
2619      ;;
2620  "")
2621    # If it fails, then pretend we aren't using GCC.
2622    ac_prog=ld
2623    ;;
2624  *)
2625    # If it is relative, then search for the first ld in PATH.
2626    with_gnu_ld=unknown
2627    ;;
2628  esac
2629elif test "$with_gnu_ld" = yes; then
2630  AC_MSG_CHECKING([for GNU ld])
2631else
2632  AC_MSG_CHECKING([for non-GNU ld])
2633fi
2634AC_CACHE_VAL(lt_cv_path_LD,
2635[if test -z "$LD"; then
2636  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2637  for ac_dir in $PATH; do
2638    IFS="$lt_save_ifs"
2639    test -z "$ac_dir" && ac_dir=.
2640    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2641      lt_cv_path_LD="$ac_dir/$ac_prog"
2642      # Check to see if the program is GNU ld.  I'd rather use --version,
2643      # but apparently some GNU ld's only accept -v.
2644      # Break only if it was the GNU/non-GNU ld that we prefer.
2645      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
2646      *GNU* | *'with BFD'*)
2647        test "$with_gnu_ld" != no && break
2648        ;;
2649      *)
2650        test "$with_gnu_ld" != yes && break
2651        ;;
2652      esac
2653    fi
2654  done
2655  IFS="$lt_save_ifs"
2656else
2657  lt_cv_path_LD="$LD" # Let the user override the test with a path.
2658fi])
2659LD="$lt_cv_path_LD"
2660if test -n "$LD"; then
2661  AC_MSG_RESULT($LD)
2662else
2663  AC_MSG_RESULT(no)
2664fi
2665test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
2666AC_PROG_LD_GNU
2667])# AC_PROG_LD
2668
2669
2670# AC_PROG_LD_GNU
2671# --------------
2672AC_DEFUN([AC_PROG_LD_GNU],
2673[AC_REQUIRE([AC_PROG_EGREP])dnl
2674AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
2675[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
2676case `$LD -v 2>&1 </dev/null` in
2677*GNU* | *'with BFD'*)
2678  lt_cv_prog_gnu_ld=yes
2679  ;;
2680*)
2681  lt_cv_prog_gnu_ld=no
2682  ;;
2683esac])
2684with_gnu_ld=$lt_cv_prog_gnu_ld
2685])# AC_PROG_LD_GNU
2686
2687
2688# AC_PROG_LD_RELOAD_FLAG
2689# ----------------------
2690# find reload flag for linker
2691#   -- PORTME Some linkers may need a different reload flag.
2692AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
2693[AC_CACHE_CHECK([for $LD option to reload object files],
2694  lt_cv_ld_reload_flag,
2695  [lt_cv_ld_reload_flag='-r'])
2696reload_flag=$lt_cv_ld_reload_flag
2697case $reload_flag in
2698"" | " "*) ;;
2699*) reload_flag=" $reload_flag" ;;
2700esac
2701reload_cmds='$LD$reload_flag -o $output$reload_objs'
2702])# AC_PROG_LD_RELOAD_FLAG
2703
2704
2705# AC_DEPLIBS_CHECK_METHOD
2706# -----------------------
2707# how to check for library dependencies
2708#  -- PORTME fill in with the dynamic library characteristics
2709AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
2710[AC_CACHE_CHECK([how to recognise dependent libraries],
2711lt_cv_deplibs_check_method,
2712[lt_cv_file_magic_cmd='$MAGIC_CMD'
2713lt_cv_file_magic_test_file=
2714lt_cv_deplibs_check_method='unknown'
2715# Need to set the preceding variable on all platforms that support
2716# interlibrary dependencies.
2717# 'none' -- dependencies not supported.
2718# `unknown' -- same as none, but documents that we really don't know.
2719# 'pass_all' -- all dependencies passed with no checks.
2720# 'test_compile' -- check by making test program.
2721# 'file_magic [[regex]]' -- check by looking for files in library path
2722# which responds to the $file_magic_cmd with a given extended regex.
2723# If you have `file' or equivalent on your system and you're not sure
2724# whether `pass_all' will *always* work, you probably want this one.
2725
2726case $host_os in
2727aix4* | aix5*)
2728  lt_cv_deplibs_check_method=pass_all
2729  ;;
2730
2731beos*)
2732  lt_cv_deplibs_check_method=pass_all
2733  ;;
2734
2735bsdi4*)
2736  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
2737  lt_cv_file_magic_cmd='/usr/bin/file -L'
2738  lt_cv_file_magic_test_file=/shlib/libc.so
2739  ;;
2740
2741cygwin*)
2742  # win32_libid is a shell function defined in ltmain.sh
2743  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
2744  lt_cv_file_magic_cmd='win32_libid'
2745  ;;
2746
2747mingw* | pw32*)
2748  # Base MSYS/MinGW do not provide the 'file' command needed by
2749  # win32_libid shell function, so use a weaker test based on 'objdump'.
2750  lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
2751  lt_cv_file_magic_cmd='$OBJDUMP -f'
2752  ;;
2753
2754darwin* | rhapsody*)
2755  lt_cv_deplibs_check_method=pass_all
2756  ;;
2757
2758freebsd* | kfreebsd*-gnu)
2759  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
2760    case $host_cpu in
2761    i*86 )
2762      # Not sure whether the presence of OpenBSD here was a mistake.
2763      # Let's accept both of them until this is cleared up.
2764      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library'
2765      lt_cv_file_magic_cmd=/usr/bin/file
2766      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
2767      ;;
2768    esac
2769  else
2770    lt_cv_deplibs_check_method=pass_all
2771  fi
2772  ;;
2773
2774gnu*)
2775  lt_cv_deplibs_check_method=pass_all
2776  ;;
2777
2778hpux10.20* | hpux11*)
2779  lt_cv_file_magic_cmd=/usr/bin/file
2780  case "$host_cpu" in
2781  ia64*)
2782    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
2783    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
2784    ;;
2785  hppa*64*)
2786    [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]']
2787    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
2788    ;;
2789  *)
2790    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
2791    lt_cv_file_magic_test_file=/usr/lib/libc.sl
2792    ;;
2793  esac
2794  ;;
2795
2796irix5* | irix6* | nonstopux*)
2797  case $LD in
2798  *-32|*"-32 ") libmagic=32-bit;;
2799  *-n32|*"-n32 ") libmagic=N32;;
2800  *-64|*"-64 ") libmagic=64-bit;;
2801  *) libmagic=never-match;;
2802  esac
2803  lt_cv_deplibs_check_method=pass_all
2804  ;;
2805
2806# This must be Linux ELF.
2807linux*)
2808  case $host_cpu in
2809  alpha*|hppa*|i*86|ia64*|m68*|mips*|powerpc*|sparc*|s390*|sh*|x86_64*)
2810    lt_cv_deplibs_check_method=pass_all ;;
2811  *)
2812    # glibc up to 2.1.1 does not perform some relocations on ARM
2813    # this will be overridden with pass_all, but let us keep it just in case
2814    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;;
2815  esac
2816  lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
2817  lt_cv_deplibs_check_method=pass_all
2818  ;;
2819
2820netbsd*)
2821  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
2822    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
2823  else
2824    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
2825  fi
2826  ;;
2827
2828newos6*)
2829  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
2830  lt_cv_file_magic_cmd=/usr/bin/file
2831  lt_cv_file_magic_test_file=/usr/lib/libnls.so
2832  ;;
2833
2834nto-qnx*)
2835  lt_cv_deplibs_check_method=unknown
2836  ;;
2837
2838openbsd*)
2839  lt_cv_file_magic_cmd=/usr/bin/file
2840  lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
2841  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2842    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object'
2843  else
2844    lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
2845  fi
2846  ;;
2847
2848osf3* | osf4* | osf5*)
2849  lt_cv_deplibs_check_method=pass_all
2850  ;;
2851
2852sco3.2v5*)
2853  lt_cv_deplibs_check_method=pass_all
2854  ;;
2855
2856solaris*)
2857  lt_cv_deplibs_check_method=pass_all
2858  ;;
2859
2860sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
2861  case $host_vendor in
2862  motorola)
2863    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]]'
2864    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
2865    ;;
2866  ncr)
2867    lt_cv_deplibs_check_method=pass_all
2868    ;;
2869  sequent)
2870    lt_cv_file_magic_cmd='/bin/file'
2871    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
2872    ;;
2873  sni)
2874    lt_cv_file_magic_cmd='/bin/file'
2875    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
2876    lt_cv_file_magic_test_file=/lib/libc.so
2877    ;;
2878  siemens)
2879    lt_cv_deplibs_check_method=pass_all
2880    ;;
2881  esac
2882  ;;
2883
2884sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7* | sysv4*uw2*)
2885  lt_cv_deplibs_check_method=pass_all
2886  ;;
2887esac
2888])
2889file_magic_cmd=$lt_cv_file_magic_cmd
2890deplibs_check_method=$lt_cv_deplibs_check_method
2891test -z "$deplibs_check_method" && deplibs_check_method=unknown
2892])# AC_DEPLIBS_CHECK_METHOD
2893
2894
2895# AC_PROG_NM
2896# ----------
2897# find the pathname to a BSD-compatible name lister
2898AC_DEFUN([AC_PROG_NM],
2899[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
2900[if test -n "$NM"; then
2901  # Let the user override the test.
2902  lt_cv_path_NM="$NM"
2903else
2904  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2905  for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
2906    IFS="$lt_save_ifs"
2907    test -z "$ac_dir" && ac_dir=.
2908    tmp_nm="$ac_dir/${ac_tool_prefix}nm"
2909    if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
2910      # Check to see if the nm accepts a BSD-compat flag.
2911      # Adding the `sed 1q' prevents false positives on HP-UX, which says:
2912      #   nm: unknown option "B" ignored
2913      # Tru64's nm complains that /dev/null is an invalid object file
2914      case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
2915      */dev/null* | *'Invalid file or object type'*)
2916        lt_cv_path_NM="$tmp_nm -B"
2917        break
2918        ;;
2919      *)
2920        case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
2921        */dev/null*)
2922          lt_cv_path_NM="$tmp_nm -p"
2923          break
2924          ;;
2925        *)
2926          lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
2927          continue # so that we can try to find one that supports BSD flags
2928          ;;
2929        esac
2930      esac
2931    fi
2932  done
2933  IFS="$lt_save_ifs"
2934  test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
2935fi])
2936NM="$lt_cv_path_NM"
2937])# AC_PROG_NM
2938
2939
2940# AC_CHECK_LIBM
2941# -------------
2942# check for math library
2943AC_DEFUN([AC_CHECK_LIBM],
2944[AC_REQUIRE([AC_CANONICAL_HOST])dnl
2945LIBM=
2946case $host in
2947*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
2948  # These system don't have libm, or don't need it
2949  ;;
2950*-ncr-sysv4.3*)
2951  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
2952  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
2953  ;;
2954*)
2955  AC_CHECK_LIB(m, cos, LIBM="-lm")
2956  ;;
2957esac
2958])# AC_CHECK_LIBM
2959
2960
2961# AC_LIBLTDL_CONVENIENCE([DIRECTORY])
2962# -----------------------------------
2963# sets LIBLTDL to the link flags for the libltdl convenience library and
2964# LTDLINCL to the include flags for the libltdl header and adds
2965# --enable-ltdl-convenience to the configure arguments.  Note that LIBLTDL
2966# and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called.  If
2967# DIRECTORY is not provided, it is assumed to be `libltdl'.  LIBLTDL will
2968# be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed with
2969# '${top_srcdir}/' (note the single quotes!).  If your package is not
2970# flat and you're not using automake, define top_builddir and
2971# top_srcdir appropriately in the Makefiles.
2972AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
2973[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2974  case $enable_ltdl_convenience in
2975  no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
2976  "") enable_ltdl_convenience=yes
2977      ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
2978  esac
2979  LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
2980  LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
2981  # For backwards non-gettext consistent compatibility...
2982  INCLTDL="$LTDLINCL"
2983])# AC_LIBLTDL_CONVENIENCE
2984
2985
2986# AC_LIBLTDL_INSTALLABLE([DIRECTORY])
2987# -----------------------------------
2988# sets LIBLTDL to the link flags for the libltdl installable library and
2989# LTDLINCL to the include flags for the libltdl header and adds
2990# --enable-ltdl-install to the configure arguments.  Note that LIBLTDL
2991# and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called.  If
2992# DIRECTORY is not provided and an installed libltdl is not found, it is
2993# assumed to be `libltdl'.  LIBLTDL will be prefixed with '${top_builddir}/'
2994# and LTDLINCL will be prefixed with '${top_srcdir}/' (note the single
2995# quotes!).  If your package is not flat and you're not using automake,
2996# define top_builddir and top_srcdir appropriately in the Makefiles.
2997# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
2998AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
2999[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3000  AC_CHECK_LIB(ltdl, lt_dlinit,
3001  [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
3002  [if test x"$enable_ltdl_install" = xno; then
3003     AC_MSG_WARN([libltdl not installed, but installation disabled])
3004   else
3005     enable_ltdl_install=yes
3006   fi
3007  ])
3008  if test x"$enable_ltdl_install" = x"yes"; then
3009    ac_configure_args="$ac_configure_args --enable-ltdl-install"
3010    LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
3011    LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
3012  else
3013    ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
3014    LIBLTDL="-lltdl"
3015    LTDLINCL=
3016  fi
3017  # For backwards non-gettext consistent compatibility...
3018  INCLTDL="$LTDLINCL"
3019])# AC_LIBLTDL_INSTALLABLE
3020
3021
3022# AC_LIBTOOL_CXX
3023# --------------
3024# enable support for C++ libraries
3025AC_DEFUN([AC_LIBTOOL_CXX],
3026[AC_REQUIRE([_LT_AC_LANG_CXX])
3027])# AC_LIBTOOL_CXX
3028
3029
3030# _LT_AC_LANG_CXX
3031# ---------------
3032AC_DEFUN([_LT_AC_LANG_CXX],
3033[AC_REQUIRE([AC_PROG_CXX])
3034AC_REQUIRE([AC_PROG_CXXCPP])
3035_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
3036])# _LT_AC_LANG_CXX
3037
3038
3039# AC_LIBTOOL_F77
3040# --------------
3041# enable support for Fortran 77 libraries
3042AC_DEFUN([AC_LIBTOOL_F77],
3043[AC_REQUIRE([_LT_AC_LANG_F77])
3044])# AC_LIBTOOL_F77
3045
3046
3047# _LT_AC_LANG_F77
3048# ---------------
3049AC_DEFUN([_LT_AC_LANG_F77],
3050[AC_REQUIRE([AC_PROG_F77])
3051_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
3052])# _LT_AC_LANG_F77
3053
3054
3055# AC_LIBTOOL_GCJ
3056# --------------
3057# enable support for GCJ libraries
3058AC_DEFUN([AC_LIBTOOL_GCJ],
3059[AC_REQUIRE([_LT_AC_LANG_GCJ])
3060])# AC_LIBTOOL_GCJ
3061
3062
3063# _LT_AC_LANG_GCJ
3064# ---------------
3065AC_DEFUN([_LT_AC_LANG_GCJ],
3066[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
3067  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
3068    [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
3069      [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
3070         [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
3071           [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
3072_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
3073])# _LT_AC_LANG_GCJ
3074
3075
3076# AC_LIBTOOL_RC
3077# --------------
3078# enable support for Windows resource files
3079AC_DEFUN([AC_LIBTOOL_RC],
3080[AC_REQUIRE([LT_AC_PROG_RC])
3081_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
3082])# AC_LIBTOOL_RC
3083
3084
3085# AC_LIBTOOL_LANG_C_CONFIG
3086# ------------------------
3087# Ensure that the configuration vars for the C compiler are
3088# suitably defined.  Those variables are subsequently used by
3089# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3090AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
3091AC_DEFUN([_LT_AC_LANG_C_CONFIG],
3092[lt_save_CC="$CC"
3093AC_LANG_PUSH(C)
3094
3095# Source file extension for C test sources.
3096ac_ext=c
3097
3098# Object file extension for compiled C test sources.
3099objext=o
3100_LT_AC_TAGVAR(objext, $1)=$objext
3101
3102# Code to be used in simple compile tests
3103lt_simple_compile_test_code="int some_variable = 0;\n"
3104
3105# Code to be used in simple link tests
3106lt_simple_link_test_code='int main(){return(0);}\n'
3107
3108_LT_AC_SYS_COMPILER
3109
3110#
3111# Check for any special shared library compilation flags.
3112#
3113_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)=
3114if test "$GCC" = no; then
3115  case $host_os in
3116  sco3.2v5*)
3117    _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)='-belf'
3118    ;;
3119  esac
3120fi
3121if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then
3122  AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries])
3123  if echo "$old_CC $old_CFLAGS " | grep "[[     ]]$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[        ]]" >/dev/null; then :
3124  else
3125    AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure])
3126    _LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no
3127  fi
3128fi
3129
3130
3131#
3132# Check to make sure the static flag actually works.
3133#
3134AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works],
3135  _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
3136  $_LT_AC_TAGVAR(lt_prog_compiler_static, $1),
3137  [],
3138  [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
3139
3140
3141AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
3142AC_LIBTOOL_PROG_COMPILER_PIC($1)
3143AC_LIBTOOL_PROG_CC_C_O($1)
3144AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
3145AC_LIBTOOL_PROG_LD_SHLIBS($1)
3146AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
3147AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
3148AC_LIBTOOL_SYS_LIB_STRIP
3149AC_LIBTOOL_DLOPEN_SELF($1)
3150
3151# Report which librarie types wil actually be built
3152AC_MSG_CHECKING([if libtool supports shared libraries])
3153AC_MSG_RESULT([$can_build_shared])
3154
3155AC_MSG_CHECKING([whether to build shared libraries])
3156test "$can_build_shared" = "no" && enable_shared=no
3157
3158# On AIX, shared libraries and static libraries use the same namespace, and
3159# are all built from PIC.
3160case "$host_os" in
3161aix3*)
3162  test "$enable_shared" = yes && enable_static=no
3163  if test -n "$RANLIB"; then
3164    archive_cmds="$archive_cmds~\$RANLIB \$lib"
3165    postinstall_cmds='$RANLIB $lib'
3166  fi
3167  ;;
3168
3169aix4*)
3170  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
3171    test "$enable_shared" = yes && enable_static=no
3172  fi
3173  ;;
3174  darwin* | rhapsody*)
3175  if test "$GCC" = yes; then
3176    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3177    case "$host_os" in
3178    rhapsody* | darwin1.[[012]])
3179      _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
3180      ;;
3181    *) # Darwin 1.3 on
3182      if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
3183        _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
3184      else
3185        case ${MACOSX_DEPLOYMENT_TARGET} in
3186          10.[[012]])
3187            _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
3188            ;;
3189          10.*)
3190            _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined dynamic_lookup'
3191            ;;
3192        esac
3193      fi
3194      ;;
3195    esac
3196    output_verbose_link_cmd='echo'
3197    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags -install_name $rpath/$soname $verstring'
3198    _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
3199    # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
3200    _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}'
3201    _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}'
3202    _LT_AC_TAGVAR(hardcode_direct, $1)=no
3203    _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
3204    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
3205    _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
3206    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3207  else
3208    _LT_AC_TAGVAR(ld_shlibs, $1)=no
3209  fi
3210    ;;
3211esac
3212AC_MSG_RESULT([$enable_shared])
3213
3214AC_MSG_CHECKING([whether to build static libraries])
3215# Make sure either enable_shared or enable_static is yes.
3216test "$enable_shared" = yes || enable_static=yes
3217AC_MSG_RESULT([$enable_static])
3218
3219AC_LIBTOOL_CONFIG($1)
3220
3221AC_LANG_POP
3222CC="$lt_save_CC"
3223])# AC_LIBTOOL_LANG_C_CONFIG
3224
3225
3226# AC_LIBTOOL_LANG_CXX_CONFIG
3227# --------------------------
3228# Ensure that the configuration vars for the C compiler are
3229# suitably defined.  Those variables are subsequently used by
3230# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3231AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
3232AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
3233[AC_LANG_PUSH(C++)
3234AC_REQUIRE([AC_PROG_CXX])
3235AC_REQUIRE([AC_PROG_CXXCPP])
3236
3237_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3238_LT_AC_TAGVAR(allow_undefined_flag, $1)=
3239_LT_AC_TAGVAR(always_export_symbols, $1)=no
3240_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
3241_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
3242_LT_AC_TAGVAR(hardcode_direct, $1)=no
3243_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
3244_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
3245_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
3246_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
3247_LT_AC_TAGVAR(hardcode_automatic, $1)=no
3248_LT_AC_TAGVAR(module_cmds, $1)=
3249_LT_AC_TAGVAR(module_expsym_cmds, $1)=
3250_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
3251_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
3252_LT_AC_TAGVAR(no_undefined_flag, $1)=
3253_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
3254_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
3255
3256# Dependencies to place before and after the object being linked:
3257_LT_AC_TAGVAR(predep_objects, $1)=
3258_LT_AC_TAGVAR(postdep_objects, $1)=
3259_LT_AC_TAGVAR(predeps, $1)=
3260_LT_AC_TAGVAR(postdeps, $1)=
3261_LT_AC_TAGVAR(compiler_lib_search_path, $1)=
3262
3263# Source file extension for C++ test sources.
3264ac_ext=cc
3265
3266# Object file extension for compiled C++ test sources.
3267objext=o
3268_LT_AC_TAGVAR(objext, $1)=$objext
3269
3270# Code to be used in simple compile tests
3271lt_simple_compile_test_code="int some_variable = 0;\n"
3272
3273# Code to be used in simple link tests
3274lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n'
3275
3276# ltmain only uses $CC for tagged configurations so make sure $CC is set.
3277_LT_AC_SYS_COMPILER
3278
3279# Allow CC to be a program name with arguments.
3280lt_save_CC=$CC
3281lt_save_LD=$LD
3282lt_save_GCC=$GCC
3283GCC=$GXX
3284lt_save_with_gnu_ld=$with_gnu_ld
3285lt_save_path_LD=$lt_cv_path_LD
3286if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
3287  lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
3288else
3289  unset lt_cv_prog_gnu_ld
3290fi
3291if test -n "${lt_cv_path_LDCXX+set}"; then
3292  lt_cv_path_LD=$lt_cv_path_LDCXX
3293else
3294  unset lt_cv_path_LD
3295fi
3296test -z "${LDCXX+set}" || LD=$LDCXX
3297CC=${CXX-"c++"}
3298compiler=$CC
3299_LT_AC_TAGVAR(compiler, $1)=$CC
3300cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
3301
3302# We don't want -fno-exception wen compiling C++ code, so set the
3303# no_builtin_flag separately
3304if test "$GXX" = yes; then
3305  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
3306else
3307  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
3308fi
3309
3310if test "$GXX" = yes; then
3311  # Set up default GNU C++ configuration
3312
3313  AC_PROG_LD
3314
3315  # Check if GNU C++ uses GNU ld as the underlying linker, since the
3316  # archiving commands below assume that GNU ld is being used.
3317  if test "$with_gnu_ld" = yes; then
3318    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
3319    _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'
3320
3321    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
3322    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3323
3324    # If archive_cmds runs LD, not CC, wlarc should be empty
3325    # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
3326    #     investigate it a little bit more. (MM)
3327    wlarc='${wl}'
3328
3329    # ancient GNU ld didn't support --whole-archive et. al.
3330    if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
3331        grep 'no-whole-archive' > /dev/null; then
3332      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
3333    else
3334      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
3335    fi
3336  else
3337    with_gnu_ld=no
3338    wlarc=
3339
3340    # A generic and very simple default shared library creation
3341    # command for GNU C++ for the case where it uses the native
3342    # linker, instead of GNU ld.  If possible, this setting should
3343    # overridden to take advantage of the native linker features on
3344    # the platform it is being used on.
3345    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
3346  fi
3347
3348  # Commands to make compiler produce verbose output that lists
3349  # what "hidden" libraries, object files and flags are used when
3350  # linking a shared library.
3351  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
3352
3353else
3354  GXX=no
3355  with_gnu_ld=no
3356  wlarc=
3357fi
3358
3359# PORTME: fill in a description of your system's C++ link characteristics
3360AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
3361_LT_AC_TAGVAR(ld_shlibs, $1)=yes
3362case $host_os in
3363  aix3*)
3364    # FIXME: insert proper C++ library support
3365    _LT_AC_TAGVAR(ld_shlibs, $1)=no
3366    ;;
3367  aix4* | aix5*)
3368    if test "$host_cpu" = ia64; then
3369      # On IA64, the linker does run time linking by default, so we don't
3370      # have to do anything special.
3371      aix_use_runtimelinking=no
3372      exp_sym_flag='-Bexport'
3373      no_entry_flag=""
3374    else
3375      aix_use_runtimelinking=no
3376
3377      # Test if we are trying to use run time linking or normal
3378      # AIX style linking. If -brtl is somewhere in LDFLAGS, we
3379      # need to do runtime linking.
3380      case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
3381        for ld_flag in $LDFLAGS; do
3382          case $ld_flag in
3383          *-brtl*)
3384            aix_use_runtimelinking=yes
3385            break
3386            ;;
3387          esac
3388        done
3389      esac
3390
3391      exp_sym_flag='-bexport'
3392      no_entry_flag='-bnoentry'
3393    fi
3394
3395    # When large executables or shared objects are built, AIX ld can
3396    # have problems creating the table of contents.  If linking a library
3397    # or program results in "error TOC overflow" add -mminimal-toc to
3398    # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
3399    # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
3400
3401    _LT_AC_TAGVAR(archive_cmds, $1)=''
3402    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3403    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
3404    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3405
3406    if test "$GXX" = yes; then
3407      case $host_os in aix4.[012]|aix4.[012].*)
3408      # We only want to do this on AIX 4.2 and lower, the check
3409      # below for broken collect2 doesn't work under 4.3+
3410        collect2name=`${CC} -print-prog-name=collect2`
3411        if test -f "$collect2name" && \
3412           strings "$collect2name" | grep resolve_lib_name >/dev/null
3413        then
3414          # We have reworked collect2
3415          _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3416        else
3417          # We have old collect2
3418          _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
3419          # It fails to find uninstalled libraries when the uninstalled
3420          # path is not listed in the libpath.  Setting hardcode_minus_L
3421          # to unsupported forces relinking
3422          _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
3423          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3424          _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
3425        fi
3426      esac
3427      shared_flag='-shared'
3428    else
3429      # not using gcc
3430      if test "$host_cpu" = ia64; then
3431        # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
3432        # chokes on -Wl,-G. The following line is correct:
3433        shared_flag='-G'
3434      else
3435        if test "$aix_use_runtimelinking" = yes; then
3436          shared_flag='${wl}-G'
3437        else
3438          shared_flag='${wl}-bM:SRE'
3439        fi
3440      fi
3441    fi
3442
3443    # It seems that -bexpall does not export symbols beginning with
3444    # underscore (_), so it is better to generate a list of symbols to export.
3445    _LT_AC_TAGVAR(always_export_symbols, $1)=yes
3446    if test "$aix_use_runtimelinking" = yes; then
3447      # Warning - without using the other runtime loading flags (-brtl),
3448      # -berok will link without error, but may produce a broken library.
3449      _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
3450      # Determine the default libpath from the value encoded in an empty executable.
3451      _LT_AC_SYS_LIBPATH_AIX
3452      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
3453
3454      _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
3455     else
3456      if test "$host_cpu" = ia64; then
3457        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
3458        _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
3459        _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
3460      else
3461        # Determine the default libpath from the value encoded in an empty executable.
3462        _LT_AC_SYS_LIBPATH_AIX
3463        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
3464        # Warning - without using the other run time loading flags,
3465        # -berok will link without error, but may produce a broken library.
3466        _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
3467        _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
3468        # -bexpall does not export symbols beginning with underscore (_)
3469        _LT_AC_TAGVAR(always_export_symbols, $1)=yes
3470        # Exported symbols can be pulled into shared objects from archives
3471        _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
3472        _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
3473        # This is similar to how AIX traditionally builds it's shared libraries.
3474        _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
3475      fi
3476    fi
3477    ;;
3478  chorus*)
3479    case $cc_basename in
3480      *)
3481        # FIXME: insert proper C++ library support
3482        _LT_AC_TAGVAR(ld_shlibs, $1)=no
3483        ;;
3484    esac
3485    ;;
3486
3487  cygwin* | mingw* | pw32*)
3488    # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
3489    # as there is no search path for DLLs.
3490    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3491    _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
3492    _LT_AC_TAGVAR(always_export_symbols, $1)=no
3493    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
3494
3495    if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
3496      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
3497      # If the export-symbols file already is a .def file (1st line
3498      # is EXPORTS), use it as is; otherwise, prepend...
3499      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
3500        cp $export_symbols $output_objdir/$soname.def;
3501      else
3502        echo EXPORTS > $output_objdir/$soname.def;
3503        cat $export_symbols >> $output_objdir/$soname.def;
3504      fi~
3505      $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
3506    else
3507      _LT_AC_TAGVAR(ld_shlibs, $1)=no
3508    fi
3509  ;;
3510
3511  darwin* | rhapsody*)
3512  if test "$GXX" = yes; then
3513    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3514    case "$host_os" in
3515    rhapsody* | darwin1.[[012]])
3516      _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
3517      ;;
3518    *) # Darwin 1.3 on
3519      if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
3520        _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
3521      else
3522        case ${MACOSX_DEPLOYMENT_TARGET} in
3523          10.[[012]])
3524            _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
3525            ;;
3526          10.*)
3527            _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined dynamic_lookup'
3528            ;;
3529        esac
3530      fi
3531      ;;
3532    esac
3533    lt_int_apple_cc_single_mod=no
3534    output_verbose_link_cmd='echo'
3535    if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then
3536      lt_int_apple_cc_single_mod=yes
3537    fi
3538    if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
3539      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
3540    else
3541      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r ${wl}-bind_at_load -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'
3542    fi
3543    _LT_AC_TAGVAR(module_cmds, $1)='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
3544
3545    # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
3546    if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
3547      _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}'
3548    else
3549      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -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}'
3550    fi
3551    _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}'
3552    _LT_AC_TAGVAR(hardcode_direct, $1)=no
3553    _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
3554    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
3555    _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
3556    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3557  else
3558    _LT_AC_TAGVAR(ld_shlibs, $1)=no
3559  fi
3560    ;;
3561
3562  dgux*)
3563    case $cc_basename in
3564      ec++)
3565        # FIXME: insert proper C++ library support
3566        _LT_AC_TAGVAR(ld_shlibs, $1)=no
3567        ;;
3568      ghcx)
3569        # Green Hills C++ Compiler
3570        # FIXME: insert proper C++ library support
3571        _LT_AC_TAGVAR(ld_shlibs, $1)=no
3572        ;;
3573      *)
3574        # FIXME: insert proper C++ library support
3575        _LT_AC_TAGVAR(ld_shlibs, $1)=no
3576        ;;
3577    esac
3578    ;;
3579  freebsd[12]*)
3580    # C++ shared libraries reported to be fairly broken before switch to ELF
3581    _LT_AC_TAGVAR(ld_shlibs, $1)=no
3582    ;;
3583  freebsd-elf*)
3584    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3585    ;;
3586  freebsd* | kfreebsd*-gnu)
3587    # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
3588    # conventions
3589    _LT_AC_TAGVAR(ld_shlibs, $1)=yes
3590    ;;
3591  gnu*)
3592    ;;
3593  hpux9*)
3594    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3595    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3596    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3597    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3598    _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
3599                                # but as the default
3600                                # location of the library.
3601
3602    case $cc_basename in
3603    CC)
3604      # FIXME: insert proper C++ library support
3605      _LT_AC_TAGVAR(ld_shlibs, $1)=no
3606      ;;
3607    aCC)
3608      _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'
3609      # Commands to make compiler produce verbose output that lists
3610      # what "hidden" libraries, object files and flags are used when
3611      # linking a shared library.
3612      #
3613      # There doesn't appear to be a way to prevent this compiler from
3614      # explicitly linking system object files so we need to strip them
3615      # from the output so that they don't get included in the library
3616      # dependencies.
3617      output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | egrep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
3618      ;;
3619    *)
3620      if test "$GXX" = yes; then
3621        _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'
3622      else
3623        # FIXME: insert proper C++ library support
3624        _LT_AC_TAGVAR(ld_shlibs, $1)=no
3625      fi
3626      ;;
3627    esac
3628    ;;
3629  hpux10*|hpux11*)
3630    if test $with_gnu_ld = no; then
3631      case "$host_cpu" in
3632      hppa*64*)
3633        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3634        _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
3635        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3636        ;;
3637      ia64*)
3638        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3639        ;;
3640      *)
3641        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3642        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3643        _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3644        ;;
3645      esac
3646    fi
3647    case "$host_cpu" in
3648    hppa*64*)
3649      _LT_AC_TAGVAR(hardcode_direct, $1)=no
3650      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3651      ;;
3652    ia64*)
3653      _LT_AC_TAGVAR(hardcode_direct, $1)=no
3654      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3655      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
3656                                              # but as the default
3657                                              # location of the library.
3658      ;;
3659    *)
3660      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3661      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
3662                                              # but as the default
3663                                              # location of the library.
3664      ;;
3665    esac
3666
3667    case $cc_basename in
3668      CC)
3669        # FIXME: insert proper C++ library support
3670        _LT_AC_TAGVAR(ld_shlibs, $1)=no
3671        ;;
3672      aCC)
3673        case "$host_cpu" in
3674        hppa*64*|ia64*)
3675          _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
3676          ;;
3677        *)
3678          _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'
3679          ;;
3680        esac
3681        # Commands to make compiler produce verbose output that lists
3682        # what "hidden" libraries, object files and flags are used when
3683        # linking a shared library.
3684        #
3685        # There doesn't appear to be a way to prevent this compiler from
3686        # explicitly linking system object files so we need to strip them
3687        # from the output so that they don't get included in the library
3688        # dependencies.
3689        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'
3690        ;;
3691      *)
3692        if test "$GXX" = yes; then
3693          if test $with_gnu_ld = no; then
3694            case "$host_cpu" in
3695            ia64*|hppa*64*)
3696              _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
3697              ;;
3698            *)
3699              _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'
3700              ;;
3701            esac
3702          fi
3703        else
3704          # FIXME: insert proper C++ library support
3705          _LT_AC_TAGVAR(ld_shlibs, $1)=no
3706        fi
3707        ;;
3708    esac
3709    ;;
3710  irix5* | irix6*)
3711    case $cc_basename in
3712      CC)
3713        # SGI C++
3714        _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 ${objdir}/so_locations -o $lib'
3715
3716        # Archives containing C++ object files must be created using
3717        # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
3718        # necessary to make sure instantiated templates are included
3719        # in the archive.
3720        _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
3721        ;;
3722      *)
3723        if test "$GXX" = yes; then
3724          if test "$with_gnu_ld" = no; then
3725            _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}${objdir}/so_locations -o $lib'
3726          else
3727            _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'
3728          fi
3729        fi
3730        _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3731        ;;
3732    esac
3733    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3734    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3735    ;;
3736  linux*)
3737    case $cc_basename in
3738      KCC)
3739        # Kuck and Associates, Inc. (KAI) C++ Compiler
3740
3741        # KCC will only create a shared library if the output file
3742        # ends with ".so" (or ".sl" for HP-UX), so rename the library
3743        # to its proper name (with version) after linking.
3744        _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'
3745        _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'
3746        # Commands to make compiler produce verbose output that lists
3747        # what "hidden" libraries, object files and flags are used when
3748        # linking a shared library.
3749        #
3750        # There doesn't appear to be a way to prevent this compiler from
3751        # explicitly linking system object files so we need to strip them
3752        # from the output so that they don't get included in the library
3753        # dependencies.
3754        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'
3755
3756        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
3757        _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3758
3759        # Archives containing C++ object files must be created using
3760        # "CC -Bstatic", where "CC" is the KAI C++ compiler.
3761        _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
3762        ;;
3763      icpc)
3764        # Intel C++
3765        with_gnu_ld=yes
3766        _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3767        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
3768        _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'
3769        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3770        _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3771        _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
3772        ;;
3773      cxx)
3774        # Compaq C++
3775        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
3776        _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'
3777
3778        runpath_var=LD_RUN_PATH
3779        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
3780        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3781
3782        # Commands to make compiler produce verbose output that lists
3783        # what "hidden" libraries, object files and flags are used when
3784        # linking a shared library.
3785        #
3786        # There doesn't appear to be a way to prevent this compiler from
3787        # explicitly linking system object files so we need to strip them
3788        # from the output so that they don't get included in the library
3789        # dependencies.
3790        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'
3791        ;;
3792    esac
3793    ;;
3794  lynxos*)
3795    # FIXME: insert proper C++ library support
3796    _LT_AC_TAGVAR(ld_shlibs, $1)=no
3797    ;;
3798  m88k*)
3799    # FIXME: insert proper C++ library support
3800    _LT_AC_TAGVAR(ld_shlibs, $1)=no
3801    ;;
3802  mvs*)
3803    case $cc_basename in
3804      cxx)
3805        # FIXME: insert proper C++ library support
3806        _LT_AC_TAGVAR(ld_shlibs, $1)=no
3807        ;;
3808      *)
3809        # FIXME: insert proper C++ library support
3810        _LT_AC_TAGVAR(ld_shlibs, $1)=no
3811        ;;
3812    esac
3813    ;;
3814  netbsd*)
3815    if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
3816      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
3817      wlarc=
3818      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
3819      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3820      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3821    fi
3822    # Workaround some broken pre-1.5 toolchains
3823    output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
3824    ;;
3825  osf3*)
3826    case $cc_basename in
3827      KCC)
3828        # Kuck and Associates, Inc. (KAI) C++ Compiler
3829
3830        # KCC will only create a shared library if the output file
3831        # ends with ".so" (or ".sl" for HP-UX), so rename the library
3832        # to its proper name (with version) after linking.
3833        _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'
3834
3835        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3836        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3837
3838        # Archives containing C++ object files must be created using
3839        # "CC -Bstatic", where "CC" is the KAI C++ compiler.
3840        _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
3841
3842        ;;
3843      RCC)
3844        # Rational C++ 2.4.1
3845        # FIXME: insert proper C++ library support
3846        _LT_AC_TAGVAR(ld_shlibs, $1)=no
3847        ;;
3848      cxx)
3849        _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
3850        _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 ${objdir}/so_locations -o $lib'
3851
3852        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3853        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3854
3855        # Commands to make compiler produce verbose output that lists
3856        # what "hidden" libraries, object files and flags are used when
3857        # linking a shared library.
3858        #
3859        # There doesn't appear to be a way to prevent this compiler from
3860        # explicitly linking system object files so we need to strip them
3861        # from the output so that they don't get included in the library
3862        # dependencies.
3863        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'
3864        ;;
3865      *)
3866        if test "$GXX" = yes && test "$with_gnu_ld" = no; then
3867          _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
3868          _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}${objdir}/so_locations -o $lib'
3869
3870          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3871          _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3872
3873          # Commands to make compiler produce verbose output that lists
3874          # what "hidden" libraries, object files and flags are used when
3875          # linking a shared library.
3876          output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
3877
3878        else
3879          # FIXME: insert proper C++ library support
3880          _LT_AC_TAGVAR(ld_shlibs, $1)=no
3881        fi
3882        ;;
3883    esac
3884    ;;
3885  osf4* | osf5*)
3886    case $cc_basename in
3887      KCC)
3888        # Kuck and Associates, Inc. (KAI) C++ Compiler
3889
3890        # KCC will only create a shared library if the output file
3891        # ends with ".so" (or ".sl" for HP-UX), so rename the library
3892        # to its proper name (with version) after linking.
3893        _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'
3894
3895        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3896        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3897
3898        # Archives containing C++ object files must be created using
3899        # the KAI C++ compiler.
3900        _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
3901        ;;
3902      RCC)
3903        # Rational C++ 2.4.1
3904        # FIXME: insert proper C++ library support
3905        _LT_AC_TAGVAR(ld_shlibs, $1)=no
3906        ;;
3907      cxx)
3908        _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
3909        _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 ${objdir}/so_locations -o $lib'
3910        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
3911          echo "-hidden">> $lib.exp~
3912          $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 $objdir/so_locations -o $lib~
3913          $rm $lib.exp'
3914
3915        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
3916        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3917
3918        # Commands to make compiler produce verbose output that lists
3919        # what "hidden" libraries, object files and flags are used when
3920        # linking a shared library.
3921        #
3922        # There doesn't appear to be a way to prevent this compiler from
3923        # explicitly linking system object files so we need to strip them
3924        # from the output so that they don't get included in the library
3925        # dependencies.
3926        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'
3927        ;;
3928      *)
3929        if test "$GXX" = yes && test "$with_gnu_ld" = no; then
3930          _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
3931         _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}${objdir}/so_locations -o $lib'
3932
3933          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3934          _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3935
3936          # Commands to make compiler produce verbose output that lists
3937          # what "hidden" libraries, object files and flags are used when
3938          # linking a shared library.
3939          output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
3940
3941        else
3942          # FIXME: insert proper C++ library support
3943          _LT_AC_TAGVAR(ld_shlibs, $1)=no
3944        fi
3945        ;;
3946    esac
3947    ;;
3948  psos*)
3949    # FIXME: insert proper C++ library support
3950    _LT_AC_TAGVAR(ld_shlibs, $1)=no
3951    ;;
3952  sco*)
3953    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3954    case $cc_basename in
3955      CC)
3956        # FIXME: insert proper C++ library support
3957        _LT_AC_TAGVAR(ld_shlibs, $1)=no
3958        ;;
3959      *)
3960        # FIXME: insert proper C++ library support
3961        _LT_AC_TAGVAR(ld_shlibs, $1)=no
3962        ;;
3963    esac
3964    ;;
3965  sunos4*)
3966    case $cc_basename in
3967      CC)
3968        # Sun C++ 4.x
3969        # FIXME: insert proper C++ library support
3970        _LT_AC_TAGVAR(ld_shlibs, $1)=no
3971        ;;
3972      lcc)
3973        # Lucid
3974        # FIXME: insert proper C++ library support
3975        _LT_AC_TAGVAR(ld_shlibs, $1)=no
3976        ;;
3977      *)
3978        # FIXME: insert proper C++ library support
3979        _LT_AC_TAGVAR(ld_shlibs, $1)=no
3980        ;;
3981    esac
3982    ;;
3983  solaris*)
3984    case $cc_basename in
3985      CC)
3986        # Sun C++ 4.2, 5.x and Centerline C++
3987        _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
3988        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3989        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
3990        $CC -G${allow_undefined_flag} -nolib ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
3991
3992        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
3993        _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3994        case $host_os in
3995          solaris2.[0-5] | solaris2.[0-5].*) ;;
3996          *)
3997            # The C++ compiler is used as linker so we must use $wl
3998            # flag to pass the commands to the underlying system
3999            # linker.
4000            # Supported since Solaris 2.6 (maybe 2.5.1?)
4001            _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
4002            ;;
4003        esac
4004        _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4005
4006        # Commands to make compiler produce verbose output that lists
4007        # what "hidden" libraries, object files and flags are used when
4008        # linking a shared library.
4009        #
4010        # There doesn't appear to be a way to prevent this compiler from
4011        # explicitly linking system object files so we need to strip them
4012        # from the output so that they don't get included in the library
4013        # dependencies.
4014        output_verbose_link_cmd='templist=`$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep "\-[[LR]]"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
4015
4016        # Archives containing C++ object files must be created using
4017        # "CC -xar", where "CC" is the Sun C++ compiler.  This is
4018        # necessary to make sure instantiated templates are included
4019        # in the archive.
4020        _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
4021        ;;
4022      gcx)
4023        # Green Hills C++ Compiler
4024        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
4025
4026        # The C++ compiler must be used to create the archive.
4027        _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
4028        ;;
4029      *)
4030        # GNU C++ compiler with Solaris linker
4031        if test "$GXX" = yes && test "$with_gnu_ld" = no; then
4032          _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
4033          if $CC --version | grep -v '^2\.7' > /dev/null; then
4034            _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
4035            _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
4036                $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
4037
4038            # Commands to make compiler produce verbose output that lists
4039            # what "hidden" libraries, object files and flags are used when
4040            # linking a shared library.
4041            output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
4042          else
4043            # g++ 2.7 appears to require `-G' NOT `-shared' on this
4044            # platform.
4045            _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
4046            _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
4047                $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
4048
4049            # Commands to make compiler produce verbose output that lists
4050            # what "hidden" libraries, object files and flags are used when
4051            # linking a shared library.
4052            output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
4053          fi
4054
4055          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
4056        fi
4057        ;;
4058    esac
4059    ;;
4060  sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
4061    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4062    ;;
4063  tandem*)
4064    case $cc_basename in
4065      NCC)
4066        # NonStop-UX NCC 3.20
4067        # FIXME: insert proper C++ library support
4068        _LT_AC_TAGVAR(ld_shlibs, $1)=no
4069        ;;
4070      *)
4071        # FIXME: insert proper C++ library support
4072        _LT_AC_TAGVAR(ld_shlibs, $1)=no
4073        ;;
4074    esac
4075    ;;
4076  vxworks*)
4077    # FIXME: insert proper C++ library support
4078    _LT_AC_TAGVAR(ld_shlibs, $1)=no
4079    ;;
4080  *)
4081    # FIXME: insert proper C++ library support
4082    _LT_AC_TAGVAR(ld_shlibs, $1)=no
4083    ;;
4084esac
4085AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
4086test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
4087
4088_LT_AC_TAGVAR(GCC, $1)="$GXX"
4089_LT_AC_TAGVAR(LD, $1)="$LD"
4090
4091AC_LIBTOOL_POSTDEP_PREDEP($1)
4092AC_LIBTOOL_PROG_COMPILER_PIC($1)
4093AC_LIBTOOL_PROG_CC_C_O($1)
4094AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
4095AC_LIBTOOL_PROG_LD_SHLIBS($1)
4096AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
4097AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
4098AC_LIBTOOL_SYS_LIB_STRIP
4099AC_LIBTOOL_DLOPEN_SELF($1)
4100
4101AC_LIBTOOL_CONFIG($1)
4102
4103AC_LANG_POP
4104CC=$lt_save_CC
4105LDCXX=$LD
4106LD=$lt_save_LD
4107GCC=$lt_save_GCC
4108with_gnu_ldcxx=$with_gnu_ld
4109with_gnu_ld=$lt_save_with_gnu_ld
4110lt_cv_path_LDCXX=$lt_cv_path_LD
4111lt_cv_path_LD=$lt_save_path_LD
4112lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
4113lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
4114])# AC_LIBTOOL_LANG_CXX_CONFIG
4115
4116# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
4117# ------------------------
4118# Figure out "hidden" library dependencies from verbose
4119# compiler output when linking a shared library.
4120# Parse the compiler output and extract the necessary
4121# objects, libraries and library flags.
4122AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[
4123dnl we can't use the lt_simple_compile_test_code here,
4124dnl because it contains code intended for an executable,
4125dnl not a library.  It's possible we should let each
4126dnl tag define a new lt_????_link_test_code variable,
4127dnl but it's only used here...
4128ifelse([$1],[],[cat > conftest.$ac_ext <<EOF
4129int a;
4130void foo (void) { a = 0; }
4131EOF
4132],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
4133class Foo
4134{
4135public:
4136  Foo (void) { a = 0; }
4137private:
4138  int a;
4139};
4140EOF
4141],[$1],[F77],[cat > conftest.$ac_ext <<EOF
4142      subroutine foo
4143      implicit none
4144      integer*4 a
4145      a=0
4146      return
4147      end
4148EOF
4149],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
4150public class foo {
4151  private int a;
4152  public void bar (void) {
4153    a = 0;
4154  }
4155};
4156EOF
4157])
4158dnl Parse the compiler output and extract the necessary
4159dnl objects, libraries and library flags.
4160if AC_TRY_EVAL(ac_compile); then
4161  # Parse the compiler output and extract the necessary
4162  # objects, libraries and library flags.
4163
4164  # Sentinel used to keep track of whether or not we are before
4165  # the conftest object file.
4166  pre_test_object_deps_done=no
4167
4168  # The `*' in the case matches for architectures that use `case' in
4169  # $output_verbose_cmd can trigger glob expansion during the loop
4170  # eval without this substitution.
4171  output_verbose_link_cmd="`$echo \"X$output_verbose_link_cmd\" | $Xsed -e \"$no_glob_subst\"`"
4172
4173  for p in `eval $output_verbose_link_cmd`; do
4174    case $p in
4175
4176    -L* | -R* | -l*)
4177       # Some compilers place space between "-{L,R}" and the path.
4178       # Remove the space.
4179       if test $p = "-L" \
4180          || test $p = "-R"; then
4181         prev=$p
4182         continue
4183       else
4184         prev=
4185       fi
4186
4187       if test "$pre_test_object_deps_done" = no; then
4188         case $p in
4189         -L* | -R*)
4190           # Internal compiler library paths should come after those
4191           # provided the user.  The postdeps already come after the
4192           # user supplied libs so there is no need to process them.
4193           if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
4194             _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
4195           else
4196             _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
4197           fi
4198           ;;
4199         # The "-l" case would never come before the object being
4200         # linked, so don't bother handling this case.
4201         esac
4202       else
4203         if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
4204           _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
4205         else
4206           _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
4207         fi
4208       fi
4209       ;;
4210
4211    *.$objext)
4212       # This assumes that the test object file only shows up
4213       # once in the compiler output.
4214       if test "$p" = "conftest.$objext"; then
4215         pre_test_object_deps_done=yes
4216         continue
4217       fi
4218
4219       if test "$pre_test_object_deps_done" = no; then
4220         if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
4221           _LT_AC_TAGVAR(predep_objects, $1)="$p"
4222         else
4223           _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
4224         fi
4225       else
4226         if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
4227           _LT_AC_TAGVAR(postdep_objects, $1)="$p"
4228         else
4229           _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
4230         fi
4231       fi
4232       ;;
4233
4234    *) ;; # Ignore the rest.
4235
4236    esac
4237  done
4238
4239  # Clean up.
4240  rm -f a.out a.exe
4241else
4242  echo "libtool.m4: error: problem compiling $1 test program"
4243fi
4244
4245$rm -f confest.$objext
4246
4247case " $_LT_AC_TAGVAR(postdeps, $1) " in
4248*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
4249esac
4250])# AC_LIBTOOL_POSTDEP_PREDEP
4251
4252# AC_LIBTOOL_LANG_F77_CONFIG
4253# ------------------------
4254# Ensure that the configuration vars for the C compiler are
4255# suitably defined.  Those variables are subsequently used by
4256# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4257AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
4258AC_DEFUN([_LT_AC_LANG_F77_CONFIG],
4259[AC_REQUIRE([AC_PROG_F77])
4260AC_LANG_PUSH(Fortran 77)
4261
4262_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4263_LT_AC_TAGVAR(allow_undefined_flag, $1)=
4264_LT_AC_TAGVAR(always_export_symbols, $1)=no
4265_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
4266_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
4267_LT_AC_TAGVAR(hardcode_direct, $1)=no
4268_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
4269_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
4270_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
4271_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
4272_LT_AC_TAGVAR(hardcode_automatic, $1)=no
4273_LT_AC_TAGVAR(module_cmds, $1)=
4274_LT_AC_TAGVAR(module_expsym_cmds, $1)=
4275_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
4276_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
4277_LT_AC_TAGVAR(no_undefined_flag, $1)=
4278_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
4279_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
4280
4281# Source file extension for f77 test sources.
4282ac_ext=f
4283
4284# Object file extension for compiled f77 test sources.
4285objext=o
4286_LT_AC_TAGVAR(objext, $1)=$objext
4287
4288# Code to be used in simple compile tests
4289lt_simple_compile_test_code="      subroutine t\n      return\n      end\n"
4290
4291# Code to be used in simple link tests
4292lt_simple_link_test_code="      program t\n      end\n"
4293
4294# ltmain only uses $CC for tagged configurations so make sure $CC is set.
4295_LT_AC_SYS_COMPILER
4296
4297# Allow CC to be a program name with arguments.
4298lt_save_CC="$CC"
4299CC=${F77-"f77"}
4300compiler=$CC
4301_LT_AC_TAGVAR(compiler, $1)=$CC
4302cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
4303
4304AC_MSG_CHECKING([if libtool supports shared libraries])
4305AC_MSG_RESULT([$can_build_shared])
4306
4307AC_MSG_CHECKING([whether to build shared libraries])
4308test "$can_build_shared" = "no" && enable_shared=no
4309
4310# On AIX, shared libraries and static libraries use the same namespace, and
4311# are all built from PIC.
4312case "$host_os" in
4313aix3*)
4314  test "$enable_shared" = yes && enable_static=no
4315  if test -n "$RANLIB"; then
4316    archive_cmds="$archive_cmds~\$RANLIB \$lib"
4317    postinstall_cmds='$RANLIB $lib'
4318  fi
4319  ;;
4320aix4*)
4321  test "$enable_shared" = yes && enable_static=no
4322  ;;
4323esac
4324AC_MSG_RESULT([$enable_shared])
4325
4326AC_MSG_CHECKING([whether to build static libraries])
4327# Make sure either enable_shared or enable_static is yes.
4328test "$enable_shared" = yes || enable_static=yes
4329AC_MSG_RESULT([$enable_static])
4330
4331test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
4332
4333_LT_AC_TAGVAR(GCC, $1)="$G77"
4334_LT_AC_TAGVAR(LD, $1)="$LD"
4335
4336AC_LIBTOOL_PROG_COMPILER_PIC($1)
4337AC_LIBTOOL_PROG_CC_C_O($1)
4338AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
4339AC_LIBTOOL_PROG_LD_SHLIBS($1)
4340AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
4341AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
4342AC_LIBTOOL_SYS_LIB_STRIP
4343
4344
4345AC_LIBTOOL_CONFIG($1)
4346
4347AC_LANG_POP
4348CC="$lt_save_CC"
4349])# AC_LIBTOOL_LANG_F77_CONFIG
4350
4351
4352# AC_LIBTOOL_LANG_GCJ_CONFIG
4353# --------------------------
4354# Ensure that the configuration vars for the C compiler are
4355# suitably defined.  Those variables are subsequently used by
4356# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4357AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
4358AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
4359[AC_LANG_SAVE
4360
4361# Source file extension for Java test sources.
4362ac_ext=java
4363
4364# Object file extension for compiled Java test sources.
4365objext=o
4366_LT_AC_TAGVAR(objext, $1)=$objext
4367
4368# Code to be used in simple compile tests
4369lt_simple_compile_test_code="class foo {}\n"
4370
4371# Code to be used in simple link tests
4372lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }\n'
4373
4374# ltmain only uses $CC for tagged configurations so make sure $CC is set.
4375_LT_AC_SYS_COMPILER
4376
4377# Allow CC to be a program name with arguments.
4378lt_save_CC="$CC"
4379CC=${GCJ-"gcj"}
4380compiler=$CC
4381_LT_AC_TAGVAR(compiler, $1)=$CC
4382
4383# GCJ did not exist at the time GCC didn't implicitly link libc in.
4384_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4385
4386AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
4387AC_LIBTOOL_PROG_COMPILER_PIC($1)
4388AC_LIBTOOL_PROG_CC_C_O($1)
4389AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
4390AC_LIBTOOL_PROG_LD_SHLIBS($1)
4391AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
4392AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
4393AC_LIBTOOL_SYS_LIB_STRIP
4394AC_LIBTOOL_DLOPEN_SELF($1)
4395
4396AC_LIBTOOL_CONFIG($1)
4397
4398AC_LANG_RESTORE
4399CC="$lt_save_CC"
4400])# AC_LIBTOOL_LANG_GCJ_CONFIG
4401
4402
4403# AC_LIBTOOL_LANG_RC_CONFIG
4404# --------------------------
4405# Ensure that the configuration vars for the Windows resource compiler are
4406# suitably defined.  Those variables are subsequently used by
4407# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4408AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
4409AC_DEFUN([_LT_AC_LANG_RC_CONFIG],
4410[AC_LANG_SAVE
4411
4412# Source file extension for RC test sources.
4413ac_ext=rc
4414
4415# Object file extension for compiled RC test sources.
4416objext=o
4417_LT_AC_TAGVAR(objext, $1)=$objext
4418
4419# Code to be used in simple compile tests
4420lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
4421
4422# Code to be used in simple link tests
4423lt_simple_link_test_code="$lt_simple_compile_test_code"
4424
4425# ltmain only uses $CC for tagged configurations so make sure $CC is set.
4426_LT_AC_SYS_COMPILER
4427
4428# Allow CC to be a program name with arguments.
4429lt_save_CC="$CC"
4430CC=${RC-"windres"}
4431compiler=$CC
4432_LT_AC_TAGVAR(compiler, $1)=$CC
4433_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
4434
4435AC_LIBTOOL_CONFIG($1)
4436
4437AC_LANG_RESTORE
4438CC="$lt_save_CC"
4439])# AC_LIBTOOL_LANG_RC_CONFIG
4440
4441
4442# AC_LIBTOOL_CONFIG([TAGNAME])
4443# ----------------------------
4444# If TAGNAME is not passed, then create an initial libtool script
4445# with a default configuration from the untagged config vars.  Otherwise
4446# add code to config.status for appending the configuration named by
4447# TAGNAME from the matching tagged config vars.
4448AC_DEFUN([AC_LIBTOOL_CONFIG],
4449[# The else clause should only fire when bootstrapping the
4450# libtool distribution, otherwise you forgot to ship ltmain.sh
4451# with your package, and you will get complaints that there are
4452# no rules to generate ltmain.sh.
4453if test -f "$ltmain"; then
4454  # See if we are running on zsh, and set the options which allow our commands through
4455  # without removal of \ escapes.
4456  if test -n "${ZSH_VERSION+set}" ; then
4457    setopt NO_GLOB_SUBST
4458  fi
4459  # Now quote all the things that may contain metacharacters while being
4460  # careful not to overquote the AC_SUBSTed values.  We take copies of the
4461  # variables and quote the copies for generation of the libtool script.
4462  for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \
4463    SED SHELL STRIP \
4464    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
4465    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
4466    deplibs_check_method reload_flag reload_cmds need_locks \
4467    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
4468    lt_cv_sys_global_symbol_to_c_name_address \
4469    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
4470    old_postinstall_cmds old_postuninstall_cmds \
4471    _LT_AC_TAGVAR(compiler, $1) \
4472    _LT_AC_TAGVAR(CC, $1) \
4473    _LT_AC_TAGVAR(LD, $1) \
4474    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
4475    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
4476    _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
4477    _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
4478    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
4479    _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
4480    _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
4481    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
4482    _LT_AC_TAGVAR(old_archive_cmds, $1) \
4483    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
4484    _LT_AC_TAGVAR(predep_objects, $1) \
4485    _LT_AC_TAGVAR(postdep_objects, $1) \
4486    _LT_AC_TAGVAR(predeps, $1) \
4487    _LT_AC_TAGVAR(postdeps, $1) \
4488    _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
4489    _LT_AC_TAGVAR(archive_cmds, $1) \
4490    _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
4491    _LT_AC_TAGVAR(postinstall_cmds, $1) \
4492    _LT_AC_TAGVAR(postuninstall_cmds, $1) \
4493    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
4494    _LT_AC_TAGVAR(allow_undefined_flag, $1) \
4495    _LT_AC_TAGVAR(no_undefined_flag, $1) \
4496    _LT_AC_TAGVAR(export_symbols_cmds, $1) \
4497    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
4498    _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
4499    _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
4500    _LT_AC_TAGVAR(hardcode_automatic, $1) \
4501    _LT_AC_TAGVAR(module_cmds, $1) \
4502    _LT_AC_TAGVAR(module_expsym_cmds, $1) \
4503    _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
4504    _LT_AC_TAGVAR(exclude_expsyms, $1) \
4505    _LT_AC_TAGVAR(include_expsyms, $1); do
4506
4507    case $var in
4508    _LT_AC_TAGVAR(old_archive_cmds, $1) | \
4509    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
4510    _LT_AC_TAGVAR(archive_cmds, $1) | \
4511    _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
4512    _LT_AC_TAGVAR(module_cmds, $1) | \
4513    _LT_AC_TAGVAR(module_expsym_cmds, $1) | \
4514    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
4515    _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
4516    extract_expsyms_cmds | reload_cmds | finish_cmds | \
4517    postinstall_cmds | postuninstall_cmds | \
4518    old_postinstall_cmds | old_postuninstall_cmds | \
4519    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
4520      # Double-quote double-evaled strings.
4521      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
4522      ;;
4523    *)
4524      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
4525      ;;
4526    esac
4527  done
4528
4529  case $lt_echo in
4530  *'\[$]0 --fallback-echo"')
4531    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
4532    ;;
4533  esac
4534
4535ifelse([$1], [],
4536  [cfgfile="${ofile}T"
4537  trap "$rm \"$cfgfile\"; exit 1" 1 2 15
4538  $rm -f "$cfgfile"
4539  AC_MSG_NOTICE([creating $ofile])],
4540  [cfgfile="$ofile"])
4541
4542  cat <<__EOF__ >> "$cfgfile"
4543ifelse([$1], [],
4544[#! $SHELL
4545
4546# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
4547# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
4548# NOTE: Changes made to this file will be lost: look at ltmain.sh.
4549#
4550# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
4551# Free Software Foundation, Inc.
4552#
4553# This file is part of GNU Libtool:
4554# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
4555#
4556# This program is free software; you can redistribute it and/or modify
4557# it under the terms of the GNU General Public License as published by
4558# the Free Software Foundation; either version 2 of the License, or
4559# (at your option) any later version.
4560#
4561# This program is distributed in the hope that it will be useful, but
4562# WITHOUT ANY WARRANTY; without even the implied warranty of
4563# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
4564# General Public License for more details.
4565#
4566# You should have received a copy of the GNU General Public License
4567# along with this program; if not, write to the Free Software
4568# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
4569#
4570# As a special exception to the GNU General Public License, if you
4571# distribute this file as part of a program that contains a
4572# configuration script generated by Autoconf, you may include it under
4573# the same distribution terms that you use for the rest of that program.
4574
4575# A sed program that does not truncate output.
4576SED=$lt_SED
4577
4578# Sed that helps us avoid accidentally triggering echo(1) options like -n.
4579Xsed="$SED -e s/^X//"
4580
4581# The HP-UX ksh and POSIX shell print the target directory to stdout
4582# if CDPATH is set.
4583if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
4584
4585# The names of the tagged configurations supported by this script.
4586available_tags=
4587
4588# ### BEGIN LIBTOOL CONFIG],
4589[# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
4590
4591# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
4592
4593# Shell to use when invoking shell scripts.
4594SHELL=$lt_SHELL
4595
4596# Whether or not to build shared libraries.
4597build_libtool_libs=$enable_shared
4598
4599# Whether or not to build static libraries.
4600build_old_libs=$enable_static
4601
4602# Whether or not to add -lc for building shared libraries.
4603build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
4604
4605# Whether or not to disallow shared libs when runtime libs are static
4606allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
4607
4608# Whether or not to optimize for fast installation.
4609fast_install=$enable_fast_install
4610
4611# The host system.
4612host_alias=$host_alias
4613host=$host
4614
4615# An echo program that does not interpret backslashes.
4616echo=$lt_echo
4617
4618# The archiver.
4619AR=$lt_AR
4620AR_FLAGS=$lt_AR_FLAGS
4621
4622# A C compiler.
4623LTCC=$lt_LTCC
4624
4625# A language-specific compiler.
4626CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
4627
4628# Is the compiler the GNU C compiler?
4629with_gcc=$_LT_AC_TAGVAR(GCC, $1)
4630
4631# An ERE matcher.
4632EGREP=$lt_EGREP
4633
4634# The linker used to build libraries.
4635LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
4636
4637# Whether we need hard or soft links.
4638LN_S=$lt_LN_S
4639
4640# A BSD-compatible nm program.
4641NM=$lt_NM
4642
4643# A symbol stripping program
4644STRIP=$lt_STRIP
4645
4646# Used to examine libraries when file_magic_cmd begins "file"
4647MAGIC_CMD=$MAGIC_CMD
4648
4649# Used on cygwin: DLL creation program.
4650DLLTOOL="$DLLTOOL"
4651
4652# Used on cygwin: object dumper.
4653OBJDUMP="$OBJDUMP"
4654
4655# Used on cygwin: assembler.
4656AS="$AS"
4657
4658# The name of the directory that contains temporary libtool files.
4659objdir=$objdir
4660
4661# How to create reloadable object files.
4662reload_flag=$lt_reload_flag
4663reload_cmds=$lt_reload_cmds
4664
4665# How to pass a linker flag through the compiler.
4666wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
4667
4668# Object file suffix (normally "o").
4669objext="$ac_objext"
4670
4671# Old archive suffix (normally "a").
4672libext="$libext"
4673
4674# Shared library suffix (normally ".so").
4675shrext='$shrext'
4676
4677# Executable file suffix (normally "").
4678exeext="$exeext"
4679
4680# Additional compiler flags for building library objects.
4681pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
4682pic_mode=$pic_mode
4683
4684# What is the maximum length of a command?
4685max_cmd_len=$lt_cv_sys_max_cmd_len
4686
4687# Does compiler simultaneously support -c and -o options?
4688compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
4689
4690# Must we lock files when doing compilation ?
4691need_locks=$lt_need_locks
4692
4693# Do we need the lib prefix for modules?
4694need_lib_prefix=$need_lib_prefix
4695
4696# Do we need a version for libraries?
4697need_version=$need_version
4698
4699# Whether dlopen is supported.
4700dlopen_support=$enable_dlopen
4701
4702# Whether dlopen of programs is supported.
4703dlopen_self=$enable_dlopen_self
4704
4705# Whether dlopen of statically linked programs is supported.
4706dlopen_self_static=$enable_dlopen_self_static
4707
4708# Compiler flag to prevent dynamic linking.
4709link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
4710
4711# Compiler flag to turn off builtin functions.
4712no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
4713
4714# Compiler flag to allow reflexive dlopens.
4715export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
4716
4717# Compiler flag to generate shared objects directly from archives.
4718whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
4719
4720# Compiler flag to generate thread-safe objects.
4721thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
4722
4723# Library versioning type.
4724version_type=$version_type
4725
4726# Format of library name prefix.
4727libname_spec=$lt_libname_spec
4728
4729# List of archive names.  First name is the real one, the rest are links.
4730# The last name is the one that the linker finds with -lNAME.
4731library_names_spec=$lt_library_names_spec
4732
4733# The coded name of the library, if different from the real name.
4734soname_spec=$lt_soname_spec
4735
4736# Commands used to build and install an old-style archive.
4737RANLIB=$lt_RANLIB
4738old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
4739old_postinstall_cmds=$lt_old_postinstall_cmds
4740old_postuninstall_cmds=$lt_old_postuninstall_cmds
4741
4742# Create an old-style archive from a shared archive.
4743old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
4744
4745# Create a temporary old-style archive to link instead of a shared archive.
4746old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
4747
4748# Commands used to build and install a shared archive.
4749archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
4750archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
4751postinstall_cmds=$lt_postinstall_cmds
4752postuninstall_cmds=$lt_postuninstall_cmds
4753
4754# Commands used to build a loadable module (assumed same as above if empty)
4755module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
4756module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
4757
4758# Commands to strip libraries.
4759old_striplib=$lt_old_striplib
4760striplib=$lt_striplib
4761
4762# Dependencies to place before the objects being linked to create a
4763# shared library.
4764predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
4765
4766# Dependencies to place after the objects being linked to create a
4767# shared library.
4768postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
4769
4770# Dependencies to place before the objects being linked to create a
4771# shared library.
4772predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
4773
4774# Dependencies to place after the objects being linked to create a
4775# shared library.
4776postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
4777
4778# The library search path used internally by the compiler when linking
4779# a shared library.
4780compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
4781
4782# Method to check whether dependent libraries are shared objects.
4783deplibs_check_method=$lt_deplibs_check_method
4784
4785# Command to use when deplibs_check_method == file_magic.
4786file_magic_cmd=$lt_file_magic_cmd
4787
4788# Flag that allows shared libraries with undefined symbols to be built.
4789allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
4790
4791# Flag that forces no undefined symbols.
4792no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
4793
4794# Commands used to finish a libtool library installation in a directory.
4795finish_cmds=$lt_finish_cmds
4796
4797# Same as above, but a single script fragment to be evaled but not shown.
4798finish_eval=$lt_finish_eval
4799
4800# Take the output of nm and produce a listing of raw symbols and C names.
4801global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
4802
4803# Transform the output of nm in a proper C declaration
4804global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
4805
4806# Transform the output of nm in a C name address pair
4807global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
4808
4809# This is the shared library runtime path variable.
4810runpath_var=$runpath_var
4811
4812# This is the shared library path variable.
4813shlibpath_var=$shlibpath_var
4814
4815# Is shlibpath searched before the hard-coded library search path?
4816shlibpath_overrides_runpath=$shlibpath_overrides_runpath
4817
4818# How to hardcode a shared library path into an executable.
4819hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
4820
4821# Whether we should hardcode library paths into libraries.
4822hardcode_into_libs=$hardcode_into_libs
4823
4824# Flag to hardcode \$libdir into a binary during linking.
4825# This must work even if \$libdir does not exist.
4826hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
4827
4828# If ld is used when linking, flag to hardcode \$libdir into
4829# a binary during linking. This must work even if \$libdir does
4830# not exist.
4831hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
4832
4833# Whether we need a single -rpath flag with a separated argument.
4834hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
4835
4836# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
4837# resulting binary.
4838hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
4839
4840# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
4841# resulting binary.
4842hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
4843
4844# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
4845# the resulting binary.
4846hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
4847
4848# Set to yes if building a shared library automatically hardcodes DIR into the library
4849# and all subsequent libraries and executables linked against it.
4850hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)
4851
4852# Variables whose values should be saved in libtool wrapper scripts and
4853# restored at relink time.
4854variables_saved_for_relink="$variables_saved_for_relink"
4855
4856# Whether libtool must link a program against all its dependency libraries.
4857link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
4858
4859# Compile-time system search path for libraries
4860sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
4861
4862# Run-time system search path for libraries
4863sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
4864
4865# Fix the shell variable \$srcfile for the compiler.
4866fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)"
4867
4868# Set to yes if exported symbols are required.
4869always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
4870
4871# The commands to list exported symbols.
4872export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
4873
4874# The commands to extract the exported symbol list from a shared archive.
4875extract_expsyms_cmds=$lt_extract_expsyms_cmds
4876
4877# Symbols that should not be listed in the preloaded symbols.
4878exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
4879
4880# Symbols that must always be exported.
4881include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
4882
4883ifelse([$1],[],
4884[# ### END LIBTOOL CONFIG],
4885[# ### END LIBTOOL TAG CONFIG: $tagname])
4886
4887__EOF__
4888
4889ifelse([$1],[], [
4890  case $host_os in
4891  aix3*)
4892    cat <<\EOF >> "$cfgfile"
4893
4894# AIX sometimes has problems with the GCC collect2 program.  For some
4895# reason, if we set the COLLECT_NAMES environment variable, the problems
4896# vanish in a puff of smoke.
4897if test "X${COLLECT_NAMES+set}" != Xset; then
4898  COLLECT_NAMES=
4899  export COLLECT_NAMES
4900fi
4901EOF
4902    ;;
4903  esac
4904
4905  # We use sed instead of cat because bash on DJGPP gets confused if
4906  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
4907  # text mode, it properly converts lines to CR/LF.  This bash problem
4908  # is reportedly fixed, but why not run on old versions too?
4909  sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
4910
4911  mv -f "$cfgfile" "$ofile" || \
4912    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
4913  chmod +x "$ofile"
4914])
4915else
4916  # If there is no Makefile yet, we rely on a make rule to execute
4917  # `config.status --recheck' to rerun these tests and create the
4918  # libtool script then.
4919  ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
4920  if test -f "$ltmain_in"; then
4921    test -f Makefile && make "$ltmain"
4922  fi
4923fi
4924])# AC_LIBTOOL_CONFIG
4925
4926
4927# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
4928# -------------------------------------------
4929AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
4930[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
4931
4932_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
4933
4934if test "$GCC" = yes; then
4935  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
4936
4937  AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
4938    lt_cv_prog_compiler_rtti_exceptions,
4939    [-fno-rtti -fno-exceptions], [],
4940    [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
4941fi
4942])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
4943
4944
4945# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
4946# ---------------------------------
4947AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
4948[AC_REQUIRE([AC_CANONICAL_HOST])
4949AC_REQUIRE([AC_PROG_NM])
4950AC_REQUIRE([AC_OBJEXT])
4951# Check for command to grab the raw symbol name followed by C symbol from nm.
4952AC_MSG_CHECKING([command to parse $NM output from $compiler object])
4953AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
4954[
4955# These are sane defaults that work on at least a few old systems.
4956# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
4957
4958# Character class describing NM global symbol codes.
4959symcode='[[BCDEGRST]]'
4960
4961# Regexp to match symbols that can be accessed directly from C.
4962sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
4963
4964# Transform the above into a raw symbol and a C symbol.
4965symxfrm='\1 \2\3 \3'
4966
4967# Transform an extracted symbol line into a proper C declaration
4968lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
4969
4970# Transform an extracted symbol line into symbol name and symbol address
4971lt_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'"
4972
4973# Define system-specific variables.
4974case $host_os in
4975aix*)
4976  symcode='[[BCDT]]'
4977  ;;
4978cygwin* | mingw* | pw32*)
4979  symcode='[[ABCDGISTW]]'
4980  ;;
4981hpux*) # Its linker distinguishes data from code symbols
4982  if test "$host_cpu" = ia64; then
4983    symcode='[[ABCDEGRST]]'
4984  fi
4985  lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4986  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'"
4987  ;;
4988irix* | nonstopux*)
4989  symcode='[[BCDEGRST]]'
4990  ;;
4991osf*)
4992  symcode='[[BCDEGQRST]]'
4993  ;;
4994solaris* | sysv5*)
4995  symcode='[[BDRT]]'
4996  ;;
4997sysv4)
4998  symcode='[[DFNSTU]]'
4999  ;;
5000esac
5001
5002# Handle CRLF in mingw tool chain
5003opt_cr=
5004case $build_os in
5005mingw*)
5006  opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
5007  ;;
5008esac
5009
5010# If we're using GNU nm, then use its standard symbol codes.
5011case `$NM -V 2>&1` in
5012*GNU* | *'with BFD'*)
5013  symcode='[[ABCDGIRSTW]]' ;;
5014esac
5015
5016# Try without a prefix undercore, then with it.
5017for ac_symprfx in "" "_"; do
5018
5019  # Write the raw and C identifiers.
5020  lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[      ]]\($symcode$symcode*\)[[       ]][[    ]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
5021
5022  # Check to see that the pipe works correctly.
5023  pipe_works=no
5024
5025  rm -f conftest*
5026  cat > conftest.$ac_ext <<EOF
5027#ifdef __cplusplus
5028extern "C" {
5029#endif
5030char nm_test_var;
5031void nm_test_func(){}
5032#ifdef __cplusplus
5033}
5034#endif
5035int main(){nm_test_var='a';nm_test_func();return(0);}
5036EOF
5037
5038  if AC_TRY_EVAL(ac_compile); then
5039    # Now try to grab the symbols.
5040    nlist=conftest.nm
5041    if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
5042      # Try sorting and uniquifying the output.
5043      if sort "$nlist" | uniq > "$nlist"T; then
5044        mv -f "$nlist"T "$nlist"
5045      else
5046        rm -f "$nlist"T
5047      fi
5048
5049      # Make sure that we snagged all the symbols we need.
5050      if grep ' nm_test_var$' "$nlist" >/dev/null; then
5051        if grep ' nm_test_func$' "$nlist" >/dev/null; then
5052          cat <<EOF > conftest.$ac_ext
5053#ifdef __cplusplus
5054extern "C" {
5055#endif
5056
5057EOF
5058          # Now generate the symbol file.
5059          eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
5060
5061          cat <<EOF >> conftest.$ac_ext
5062#if defined (__STDC__) && __STDC__
5063# define lt_ptr_t void *
5064#else
5065# define lt_ptr_t char *
5066# define const
5067#endif
5068
5069/* The mapping between symbol names and symbols. */
5070const struct {
5071  const char *name;
5072  lt_ptr_t address;
5073}
5074lt_preloaded_symbols[[]] =
5075{
5076EOF
5077          $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
5078          cat <<\EOF >> conftest.$ac_ext
5079  {0, (lt_ptr_t) 0}
5080};
5081
5082#ifdef __cplusplus
5083}
5084#endif
5085EOF
5086          # Now try linking the two files.
5087          mv conftest.$ac_objext conftstm.$ac_objext
5088          lt_save_LIBS="$LIBS"
5089          lt_save_CFLAGS="$CFLAGS"
5090          LIBS="conftstm.$ac_objext"
5091          CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
5092          if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
5093            pipe_works=yes
5094          fi
5095          LIBS="$lt_save_LIBS"
5096          CFLAGS="$lt_save_CFLAGS"
5097        else
5098          echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
5099        fi
5100      else
5101        echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
5102      fi
5103    else
5104      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
5105    fi
5106  else
5107    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
5108    cat conftest.$ac_ext >&5
5109  fi
5110  rm -f conftest* conftst*
5111
5112  # Do not use the global_symbol_pipe unless it works.
5113  if test "$pipe_works" = yes; then
5114    break
5115  else
5116    lt_cv_sys_global_symbol_pipe=
5117  fi
5118done
5119])
5120if test -z "$lt_cv_sys_global_symbol_pipe"; then
5121  lt_cv_sys_global_symbol_to_cdecl=
5122fi
5123if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
5124  AC_MSG_RESULT(failed)
5125else
5126  AC_MSG_RESULT(ok)
5127fi
5128]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
5129
5130
5131# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
5132# ---------------------------------------
5133AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
5134[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
5135_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5136_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
5137
5138AC_MSG_CHECKING([for $compiler option to produce PIC])
5139 ifelse([$1],[CXX],[
5140  # C++ specific cases for pic, static, wl, etc.
5141  if test "$GXX" = yes; then
5142    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5143    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5144
5145    case $host_os in
5146    aix*)
5147      # All AIX code is PIC.
5148      if test "$host_cpu" = ia64; then
5149        # AIX 5 now supports IA64 processor
5150        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5151      fi
5152      ;;
5153    amigaos*)
5154      # FIXME: we need at least 68020 code to build shared libraries, but
5155      # adding the `-m68020' flag to GCC prevents building anything better,
5156      # like `-m68040'.
5157      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
5158      ;;
5159    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5160      # PIC is the default for these OSes.
5161      ;;
5162    mingw* | os2* | pw32*)
5163      # This hack is so that the source file can tell whether it is being
5164      # built for inclusion in a dll (and should export symbols for example).
5165      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
5166      ;;
5167    darwin* | rhapsody*)
5168      # PIC is the default on this platform
5169      # Common symbols not allowed in MH_DYLIB files
5170      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5171      ;;
5172    *djgpp*)
5173      # DJGPP does not support shared libraries at all
5174      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5175      ;;
5176    sysv4*MP*)
5177      if test -d /usr/nec; then
5178        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
5179      fi
5180      ;;
5181    hpux*)
5182      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5183      # not for PA HP-UX.
5184      case "$host_cpu" in
5185      hppa*64*|ia64*)
5186        ;;
5187      *)
5188        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5189        ;;
5190      esac
5191      ;;
5192    *)
5193      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5194      ;;
5195    esac
5196  else
5197    case $host_os in
5198      aix4* | aix5*)
5199        # All AIX code is PIC.
5200        if test "$host_cpu" = ia64; then
5201          # AIX 5 now supports IA64 processor
5202          _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5203        else
5204          _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5205        fi
5206        ;;
5207      chorus*)
5208        case $cc_basename in
5209        cxch68)
5210          # Green Hills C++ Compiler
5211          # _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"
5212          ;;
5213        esac
5214        ;;
5215      dgux*)
5216        case $cc_basename in
5217          ec++)
5218            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5219            ;;
5220          ghcx)
5221            # Green Hills C++ Compiler
5222            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5223            ;;
5224          *)
5225            ;;
5226        esac
5227        ;;
5228      freebsd* | kfreebsd*-gnu)
5229        # FreeBSD uses GNU C++
5230        ;;
5231      hpux9* | hpux10* | hpux11*)
5232        case $cc_basename in
5233          CC)
5234            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5235            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
5236            if test "$host_cpu" != ia64; then
5237              _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5238            fi
5239            ;;
5240          aCC)
5241            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5242            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
5243            case "$host_cpu" in
5244            hppa*64*|ia64*)
5245              # +Z the default
5246              ;;
5247            *)
5248              _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5249              ;;
5250            esac
5251            ;;
5252          *)
5253            ;;
5254        esac
5255        ;;
5256      irix5* | irix6* | nonstopux*)
5257        case $cc_basename in
5258          CC)
5259            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5260            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5261            # CC pic flag -KPIC is the default.
5262            ;;
5263          *)
5264            ;;
5265        esac
5266        ;;
5267      linux*)
5268        case $cc_basename in
5269          KCC)
5270            # KAI C++ Compiler
5271            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
5272            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5273            ;;
5274          icpc)
5275            # Intel C++
5276            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5277            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5278            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5279            ;;
5280          cxx)
5281            # Compaq C++
5282            # Make sure the PIC flag is empty.  It appears that all Alpha
5283            # Linux and Compaq Tru64 Unix objects are PIC.
5284            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5285            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5286            ;;
5287          *)
5288            ;;
5289        esac
5290        ;;
5291      lynxos*)
5292        ;;
5293      m88k*)
5294        ;;
5295      mvs*)
5296        case $cc_basename in
5297          cxx)
5298            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
5299            ;;
5300          *)
5301            ;;
5302        esac
5303        ;;
5304      netbsd*)
5305        ;;
5306      osf3* | osf4* | osf5*)
5307        case $cc_basename in
5308          KCC)
5309            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
5310            ;;
5311          RCC)
5312            # Rational C++ 2.4.1
5313            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5314            ;;
5315          cxx)
5316            # Digital/Compaq C++
5317            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5318            # Make sure the PIC flag is empty.  It appears that all Alpha
5319            # Linux and Compaq Tru64 Unix objects are PIC.
5320            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5321            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5322            ;;
5323          *)
5324            ;;
5325        esac
5326        ;;
5327      psos*)
5328        ;;
5329      sco*)
5330        case $cc_basename in
5331          CC)
5332            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5333            ;;
5334          *)
5335            ;;
5336        esac
5337        ;;
5338      solaris*)
5339        case $cc_basename in
5340          CC)
5341            # Sun C++ 4.2, 5.x and Centerline C++
5342            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5343            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5344            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5345            ;;
5346          gcx)
5347            # Green Hills C++ Compiler
5348            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5349            ;;
5350          *)
5351            ;;
5352        esac
5353        ;;
5354      sunos4*)
5355        case $cc_basename in
5356          CC)
5357            # Sun C++ 4.x
5358            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5359            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5360            ;;
5361          lcc)
5362            # Lucid
5363            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5364            ;;
5365          *)
5366            ;;
5367        esac
5368        ;;
5369      tandem*)
5370        case $cc_basename in
5371          NCC)
5372            # NonStop-UX NCC 3.20
5373            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5374            ;;
5375          *)
5376            ;;
5377        esac
5378        ;;
5379      unixware*)
5380        ;;
5381      vxworks*)
5382        ;;
5383      *)
5384        _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5385        ;;
5386    esac
5387  fi
5388],
5389[
5390  if test "$GCC" = yes; then
5391    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5392    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5393
5394    case $host_os in
5395      aix*)
5396      # All AIX code is PIC.
5397      if test "$host_cpu" = ia64; then
5398        # AIX 5 now supports IA64 processor
5399        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5400      fi
5401      ;;
5402
5403    amigaos*)
5404      # FIXME: we need at least 68020 code to build shared libraries, but
5405      # adding the `-m68020' flag to GCC prevents building anything better,
5406      # like `-m68040'.
5407      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
5408      ;;
5409
5410    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5411      # PIC is the default for these OSes.
5412      ;;
5413
5414    mingw* | pw32* | os2*)
5415      # This hack is so that the source file can tell whether it is being
5416      # built for inclusion in a dll (and should export symbols for example).
5417      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
5418      ;;
5419
5420    darwin* | rhapsody*)
5421      # PIC is the default on this platform
5422      # Common symbols not allowed in MH_DYLIB files
5423      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5424      ;;
5425
5426    msdosdjgpp*)
5427      # Just because we use GCC doesn't mean we suddenly get shared libraries
5428      # on systems that don't support them.
5429      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5430      enable_shared=no
5431      ;;
5432
5433    sysv4*MP*)
5434      if test -d /usr/nec; then
5435        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
5436      fi
5437      ;;
5438
5439    hpux*)
5440      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5441      # not for PA HP-UX.
5442      case "$host_cpu" in
5443      hppa*64*|ia64*)
5444        # +Z the default
5445        ;;
5446      *)
5447        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5448        ;;
5449      esac
5450      ;;
5451
5452    *)
5453      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5454      ;;
5455    esac
5456  else
5457    # PORTME Check for flag to pass linker flags through the system compiler.
5458    case $host_os in
5459    aix*)
5460      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5461      if test "$host_cpu" = ia64; then
5462        # AIX 5 now supports IA64 processor
5463        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5464      else
5465        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5466      fi
5467      ;;
5468
5469    mingw* | pw32* | os2*)
5470      # This hack is so that the source file can tell whether it is being
5471      # built for inclusion in a dll (and should export symbols for example).
5472      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
5473      ;;
5474
5475    hpux9* | hpux10* | hpux11*)
5476      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5477      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5478      # not for PA HP-UX.
5479      case "$host_cpu" in
5480      hppa*64*|ia64*)
5481        # +Z the default
5482        ;;
5483      *)
5484        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5485        ;;
5486      esac
5487      # Is there a better lt_prog_compiler_static that works with the bundled CC?
5488      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5489      ;;
5490
5491    irix5* | irix6* | nonstopux*)
5492      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5493      # PIC (with -KPIC) is the default.
5494      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5495      ;;
5496
5497    newsos6)
5498      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5499      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5500      ;;
5501
5502    linux*)
5503      case $CC in
5504      icc* | ecc*)
5505        _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5506        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5507        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5508        ;;
5509      ccc*)
5510        _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5511        # All Alpha code is PIC.
5512        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5513        ;;
5514      esac
5515      ;;
5516
5517    osf3* | osf4* | osf5*)
5518      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5519      # All OSF/1 code is PIC.
5520      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5521      ;;
5522
5523    sco3.2v5*)
5524      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kpic'
5525      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-dn'
5526      ;;
5527
5528    solaris*)
5529      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5530      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5531      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5532      ;;
5533
5534    sunos4*)
5535      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5536      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5537      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5538      ;;
5539
5540    sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5541      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5542      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5543      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5544      ;;
5545
5546    sysv4*MP*)
5547      if test -d /usr/nec ;then
5548        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
5549        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5550      fi
5551      ;;
5552
5553    uts4*)
5554      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5555      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5556      ;;
5557
5558    *)
5559      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5560      ;;
5561    esac
5562  fi
5563])
5564AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
5565
5566#
5567# Check to make sure the PIC flag actually works.
5568#
5569if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
5570  AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
5571    _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
5572    [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
5573    [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
5574     "" | " "*) ;;
5575     *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
5576     esac],
5577    [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5578     _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
5579fi
5580case "$host_os" in
5581  # For platforms which do not support PIC, -DPIC is meaningless:
5582  *djgpp*)
5583    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5584    ;;
5585  *)
5586    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
5587    ;;
5588esac
5589])
5590
5591
5592# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
5593# ------------------------------------
5594# See if the linker supports building shared libraries.
5595AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
5596[AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
5597ifelse([$1],[CXX],[
5598  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5599  case $host_os in
5600  aix4* | aix5*)
5601    # If we're using GNU nm, then we don't want the "-C" option.
5602    # -C means demangle to AIX nm, but means don't demangle with GNU nm
5603    if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
5604      _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'
5605    else
5606      _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'
5607    fi
5608    ;;
5609  pw32*)
5610    _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
5611  ;;
5612  cygwin* | mingw*)
5613    _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
5614  ;;
5615  *)
5616    _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5617  ;;
5618  esac
5619],[
5620  runpath_var=
5621  _LT_AC_TAGVAR(allow_undefined_flag, $1)=
5622  _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5623  _LT_AC_TAGVAR(archive_cmds, $1)=
5624  _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
5625  _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
5626  _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
5627  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
5628  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5629  _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
5630  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
5631  _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
5632  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
5633  _LT_AC_TAGVAR(hardcode_direct, $1)=no
5634  _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
5635  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5636  _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
5637  _LT_AC_TAGVAR(hardcode_automatic, $1)=no
5638  _LT_AC_TAGVAR(module_cmds, $1)=
5639  _LT_AC_TAGVAR(module_expsym_cmds, $1)=
5640  _LT_AC_TAGVAR(always_export_symbols, $1)=no
5641  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5642  # include_expsyms should be a list of space-separated symbols to be *always*
5643  # included in the symbol list
5644  _LT_AC_TAGVAR(include_expsyms, $1)=
5645  # exclude_expsyms can be an extended regexp of symbols to exclude
5646  # it will be wrapped by ` (' and `)$', so one must not match beginning or
5647  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5648  # as well as any symbol that contains `d'.
5649  _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
5650  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5651  # platforms (ab)use it in PIC code, but their linkers get confused if
5652  # the symbol is explicitly referenced.  Since portable code cannot
5653  # rely on this symbol name, it's probably fine to never include it in
5654  # preloaded symbol tables.
5655  extract_expsyms_cmds=
5656
5657  case $host_os in
5658  cygwin* | mingw* | pw32*)
5659    # FIXME: the MSVC++ port hasn't been tested in a loooong time
5660    # When not using gcc, we currently assume that we are using
5661    # Microsoft Visual C++.
5662    if test "$GCC" != yes; then
5663      with_gnu_ld=no
5664    fi
5665    ;;
5666  openbsd*)
5667    with_gnu_ld=no
5668    ;;
5669  esac
5670
5671  _LT_AC_TAGVAR(ld_shlibs, $1)=yes
5672  if test "$with_gnu_ld" = yes; then
5673    # If archive_cmds runs LD, not CC, wlarc should be empty
5674    wlarc='${wl}'
5675
5676    # See if GNU ld supports shared libraries.
5677    case $host_os in
5678    aix3* | aix4* | aix5*)
5679      # On AIX/PPC, the GNU linker is very broken
5680      if test "$host_cpu" != ia64; then
5681        _LT_AC_TAGVAR(ld_shlibs, $1)=no
5682        cat <<EOF 1>&2
5683
5684*** Warning: the GNU linker, at least up to release 2.9.1, is reported
5685*** to be unable to reliably create shared libraries on AIX.
5686*** Therefore, libtool is disabling shared libraries support.  If you
5687*** really care for shared libraries, you may want to modify your PATH
5688*** so that a non-GNU linker is found, and then restart.
5689
5690EOF
5691      fi
5692      ;;
5693
5694    amigaos*)
5695      _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)'
5696      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5697      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5698
5699      # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
5700      # that the semantics of dynamic libraries on AmigaOS, at least up
5701      # to version 4, is to share data among multiple programs linked
5702      # with the same dynamic library.  Since this doesn't match the
5703      # behavior of shared libraries on other platforms, we can't use
5704      # them.
5705      _LT_AC_TAGVAR(ld_shlibs, $1)=no
5706      ;;
5707
5708    beos*)
5709      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5710        _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5711        # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5712        # support --undefined.  This deserves some investigation.  FIXME
5713        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5714      else
5715        _LT_AC_TAGVAR(ld_shlibs, $1)=no
5716      fi
5717      ;;
5718
5719    cygwin* | mingw* | pw32*)
5720      # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
5721      # as there is no search path for DLLs.
5722      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5723      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5724      _LT_AC_TAGVAR(always_export_symbols, $1)=no
5725      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5726      _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
5727
5728      if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
5729        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
5730        # If the export-symbols file already is a .def file (1st line
5731        # is EXPORTS), use it as is; otherwise, prepend...
5732        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
5733          cp $export_symbols $output_objdir/$soname.def;
5734        else
5735          echo EXPORTS > $output_objdir/$soname.def;
5736          cat $export_symbols >> $output_objdir/$soname.def;
5737        fi~
5738        $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000  ${wl}--out-implib,$lib'
5739      else
5740        ld_shlibs=no
5741      fi
5742      ;;
5743
5744    netbsd*)
5745      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5746        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5747        wlarc=
5748      else
5749        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5750        _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'
5751      fi
5752      ;;
5753
5754    solaris* | sysv5*)
5755      if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
5756        _LT_AC_TAGVAR(ld_shlibs, $1)=no
5757        cat <<EOF 1>&2
5758
5759*** Warning: The releases 2.8.* of the GNU linker cannot reliably
5760*** create shared libraries on Solaris systems.  Therefore, libtool
5761*** is disabling shared libraries support.  We urge you to upgrade GNU
5762*** binutils to release 2.9.1 or newer.  Another option is to modify
5763*** your PATH or compiler configuration so that the native linker is
5764*** used, and then restart.
5765
5766EOF
5767      elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5768        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5769        _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'
5770      else
5771        _LT_AC_TAGVAR(ld_shlibs, $1)=no
5772      fi
5773      ;;
5774
5775    sunos4*)
5776      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5777      wlarc=
5778      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5779      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5780      ;;
5781
5782  linux*)
5783    if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5784        tmp_archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5785        _LT_AC_TAGVAR(archive_cmds, $1)="$tmp_archive_cmds"
5786      supports_anon_versioning=no
5787      case `$LD -v 2>/dev/null` in
5788        *\ [01].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
5789        *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
5790        *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
5791        *\ 2.11.*) ;; # other 2.11 versions
5792        *) supports_anon_versioning=yes ;;
5793      esac
5794      if test $supports_anon_versioning = yes; then
5795        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~
5796cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5797$echo "local: *; };" >> $output_objdir/$libname.ver~
5798        $CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
5799      else
5800        _LT_AC_TAGVAR(archive_expsym_cmds, $1)="$tmp_archive_cmds"
5801      fi
5802    else
5803      _LT_AC_TAGVAR(ld_shlibs, $1)=no
5804    fi
5805    ;;
5806
5807    *)
5808      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5809        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5810        _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'
5811      else
5812        _LT_AC_TAGVAR(ld_shlibs, $1)=no
5813      fi
5814      ;;
5815    esac
5816
5817    if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = yes; then
5818      runpath_var=LD_RUN_PATH
5819      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
5820      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5821      # ancient GNU ld didn't support --whole-archive et. al.
5822      if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
5823        _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5824      else
5825        _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5826      fi
5827    fi
5828  else
5829    # PORTME fill in a description of your system's linker (not GNU ld)
5830    case $host_os in
5831    aix3*)
5832      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5833      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
5834      _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'
5835      # Note: this linker hardcodes the directories in LIBPATH if there
5836      # are no directories specified by -L.
5837      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5838      if test "$GCC" = yes && test -z "$link_static_flag"; then
5839        # Neither direct hardcoding nor static linking is supported with a
5840        # broken collect2.
5841        _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
5842      fi
5843      ;;
5844
5845    aix4* | aix5*)
5846      if test "$host_cpu" = ia64; then
5847        # On IA64, the linker does run time linking by default, so we don't
5848        # have to do anything special.
5849        aix_use_runtimelinking=no
5850        exp_sym_flag='-Bexport'
5851        no_entry_flag=""
5852      else
5853        # If we're using GNU nm, then we don't want the "-C" option.
5854        # -C means demangle to AIX nm, but means don't demangle with GNU nm
5855        if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
5856          _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'
5857        else
5858          _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'
5859        fi
5860        aix_use_runtimelinking=no
5861
5862        # Test if we are trying to use run time linking or normal
5863        # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5864        # need to do runtime linking.
5865        case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
5866          for ld_flag in $LDFLAGS; do
5867          if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
5868            aix_use_runtimelinking=yes
5869            break
5870          fi
5871          done
5872        esac
5873
5874        exp_sym_flag='-bexport'
5875        no_entry_flag='-bnoentry'
5876      fi
5877
5878      # When large executables or shared objects are built, AIX ld can
5879      # have problems creating the table of contents.  If linking a library
5880      # or program results in "error TOC overflow" add -mminimal-toc to
5881      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
5882      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5883
5884      _LT_AC_TAGVAR(archive_cmds, $1)=''
5885      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5886      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
5887      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
5888
5889      if test "$GCC" = yes; then
5890        case $host_os in aix4.[012]|aix4.[012].*)
5891        # We only want to do this on AIX 4.2 and lower, the check
5892        # below for broken collect2 doesn't work under 4.3+
5893          collect2name=`${CC} -print-prog-name=collect2`
5894          if test -f "$collect2name" && \
5895           strings "$collect2name" | grep resolve_lib_name >/dev/null
5896          then
5897          # We have reworked collect2
5898          _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5899          else
5900          # We have old collect2
5901          _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
5902          # It fails to find uninstalled libraries when the uninstalled
5903          # path is not listed in the libpath.  Setting hardcode_minus_L
5904          # to unsupported forces relinking
5905          _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5906          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5907          _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
5908          fi
5909        esac
5910        shared_flag='-shared'
5911      else
5912        # not using gcc
5913        if test "$host_cpu" = ia64; then
5914        # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
5915        # chokes on -Wl,-G. The following line is correct:
5916          shared_flag='-G'
5917        else
5918        if test "$aix_use_runtimelinking" = yes; then
5919            shared_flag='${wl}-G'
5920          else
5921            shared_flag='${wl}-bM:SRE'
5922        fi
5923        fi
5924      fi
5925
5926      # It seems that -bexpall does not export symbols beginning with
5927      # underscore (_), so it is better to generate a list of symbols to export.
5928      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
5929      if test "$aix_use_runtimelinking" = yes; then
5930        # Warning - without using the other runtime loading flags (-brtl),
5931        # -berok will link without error, but may produce a broken library.
5932        _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
5933       # Determine the default libpath from the value encoded in an empty executable.
5934       _LT_AC_SYS_LIBPATH_AIX
5935       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5936        _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
5937       else
5938        if test "$host_cpu" = ia64; then
5939          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
5940          _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
5941          _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
5942        else
5943         # Determine the default libpath from the value encoded in an empty executable.
5944         _LT_AC_SYS_LIBPATH_AIX
5945         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5946          # Warning - without using the other run time loading flags,
5947          # -berok will link without error, but may produce a broken library.
5948          _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
5949          _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
5950          # -bexpall does not export symbols beginning with underscore (_)
5951          _LT_AC_TAGVAR(always_export_symbols, $1)=yes
5952          # Exported symbols can be pulled into shared objects from archives
5953          _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
5954          _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
5955          # This is similar to how AIX traditionally builds it's shared libraries.
5956          _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
5957        fi
5958      fi
5959      ;;
5960
5961    amigaos*)
5962      _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)'
5963      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5964      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5965      # see comment about different semantics on the GNU ld section
5966      _LT_AC_TAGVAR(ld_shlibs, $1)=no
5967      ;;
5968
5969    bsdi4*)
5970      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
5971      ;;
5972
5973    cygwin* | mingw* | pw32*)
5974      # When not using gcc, we currently assume that we are using
5975      # Microsoft Visual C++.
5976      # hardcode_libdir_flag_spec is actually meaningless, as there is
5977      # no search path for DLLs.
5978      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
5979      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5980      # Tell ltmain to make .lib files, not .a files.
5981      libext=lib
5982      # Tell ltmain to make .dll files, not .so files.
5983      shrext=".dll"
5984      # FIXME: Setting linknames here is a bad hack.
5985      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
5986      # The linker will automatically build a .lib file if we build a DLL.
5987      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
5988      # FIXME: Should let the user specify the lib program.
5989      _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
5990      fix_srcfile_path='`cygpath -w "$srcfile"`'
5991      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5992      ;;
5993
5994    darwin* | rhapsody*)
5995    if test "$GXX" = yes ; then
5996      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
5997      case "$host_os" in
5998      rhapsody* | darwin1.[[012]])
5999        _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
6000        ;;
6001      *) # Darwin 1.3 on
6002      if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
6003        _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
6004      else
6005        case ${MACOSX_DEPLOYMENT_TARGET} in
6006          10.[[012]])
6007            _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
6008            ;;
6009          10.*)
6010            _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined dynamic_lookup'
6011            ;;
6012        esac
6013      fi
6014        ;;
6015      esac
6016        lt_int_apple_cc_single_mod=no
6017        output_verbose_link_cmd='echo'
6018        if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then
6019          lt_int_apple_cc_single_mod=yes
6020        fi
6021        if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
6022          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
6023        else
6024        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r ${wl}-bind_at_load -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'
6025      fi
6026      _LT_AC_TAGVAR(module_cmds, $1)='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
6027      # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
6028        if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
6029          _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}'
6030        else
6031          _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -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}'
6032        fi
6033          _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}'
6034      _LT_AC_TAGVAR(hardcode_direct, $1)=no
6035      _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
6036      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
6037      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
6038      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6039    else
6040      _LT_AC_TAGVAR(ld_shlibs, $1)=no
6041    fi
6042      ;;
6043
6044    dgux*)
6045      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6046      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6047      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6048      ;;
6049
6050    freebsd1*)
6051      _LT_AC_TAGVAR(ld_shlibs, $1)=no
6052      ;;
6053
6054    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
6055    # support.  Future versions do this automatically, but an explicit c++rt0.o
6056    # does not break anything, and helps significantly (at the cost of a little
6057    # extra space).
6058    freebsd2.2*)
6059      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
6060      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6061      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6062      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6063      ;;
6064
6065    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
6066    freebsd2*)
6067      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6068      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6069      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6070      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6071      ;;
6072
6073    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
6074    freebsd* | kfreebsd*-gnu)
6075      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
6076      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6077      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6078      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6079      ;;
6080
6081    hpux9*)
6082      if test "$GCC" = yes; then
6083        _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'
6084      else
6085        _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'
6086      fi
6087      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6088      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6089      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6090
6091      # hardcode_minus_L: Not really in the search PATH,
6092      # but as the default location of the library.
6093      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6094      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6095      ;;
6096
6097    hpux10* | hpux11*)
6098      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
6099        case "$host_cpu" in
6100        hppa*64*|ia64*)
6101          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6102          ;;
6103        *)
6104          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6105          ;;
6106        esac
6107      else
6108        case "$host_cpu" in
6109        hppa*64*|ia64*)
6110          _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
6111          ;;
6112        *)
6113          _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
6114          ;;
6115        esac
6116      fi
6117      if test "$with_gnu_ld" = no; then
6118        case "$host_cpu" in
6119        hppa*64*)
6120          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6121          _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
6122          _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6123          _LT_AC_TAGVAR(hardcode_direct, $1)=no
6124          _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6125          ;;
6126        ia64*)
6127          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6128          _LT_AC_TAGVAR(hardcode_direct, $1)=no
6129          _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6130
6131          # hardcode_minus_L: Not really in the search PATH,
6132          # but as the default location of the library.
6133          _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6134          ;;
6135        *)
6136          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6137          _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6138          _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6139          _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6140
6141          # hardcode_minus_L: Not really in the search PATH,
6142          # but as the default location of the library.
6143          _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6144          ;;
6145        esac
6146      fi
6147      ;;
6148
6149    irix5* | irix6* | nonstopux*)
6150      if test "$GCC" = yes; then
6151        _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'
6152      else
6153        _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'
6154        _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
6155      fi
6156      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6157      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6158      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6159      ;;
6160
6161    netbsd*)
6162      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6163        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
6164      else
6165        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
6166      fi
6167      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6168      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6169      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6170      ;;
6171
6172    newsos6)
6173      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6174      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6175      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6176      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6177      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6178      ;;
6179
6180    openbsd*)
6181      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6182      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6183      if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6184        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6185        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6186        _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6187      else
6188       case $host_os in
6189         openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
6190           _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6191           _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6192           ;;
6193         *)
6194           _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6195           _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6196           ;;
6197       esac
6198      fi
6199      ;;
6200
6201    os2*)
6202      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6203      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6204      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6205      _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'
6206      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
6207      ;;
6208
6209    osf3*)
6210      if test "$GCC" = yes; then
6211        _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6212        _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'
6213      else
6214        _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6215        _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'
6216      fi
6217      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6218      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6219      ;;
6220
6221    osf4* | osf5*)      # as osf3* with the addition of -msym flag
6222      if test "$GCC" = yes; then
6223        _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6224        _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'
6225        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6226      else
6227        _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6228        _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'
6229        _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~
6230        $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp'
6231
6232        # Both c and cxx compiler support -rpath directly
6233        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6234      fi
6235      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6236      ;;
6237
6238    sco3.2v5*)
6239      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6240      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6241      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
6242      runpath_var=LD_RUN_PATH
6243      hardcode_runpath_var=yes
6244      ;;
6245
6246    solaris*)
6247      _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
6248      if test "$GCC" = yes; then
6249        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6250        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6251          $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
6252      else
6253        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6254        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6255        $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6256      fi
6257      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6258      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6259      case $host_os in
6260      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6261      *) # Supported since Solaris 2.6 (maybe 2.5.1?)
6262        _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
6263      esac
6264      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6265      ;;
6266
6267    sunos4*)
6268      if test "x$host_vendor" = xsequent; then
6269        # Use $CC to link under sequent, because it throws in some extra .o
6270        # files that make .init and .fini sections work.
6271        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
6272      else
6273        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
6274      fi
6275      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6276      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6277      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6278      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6279      ;;
6280
6281    sysv4)
6282      case $host_vendor in
6283        sni)
6284          _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6285          _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
6286        ;;
6287        siemens)
6288          ## LD is ld it makes a PLAMLIB
6289          ## CC just makes a GrossModule.
6290          _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6291          _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
6292          _LT_AC_TAGVAR(hardcode_direct, $1)=no
6293        ;;
6294        motorola)
6295          _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6296          _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
6297        ;;
6298      esac
6299      runpath_var='LD_RUN_PATH'
6300      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6301      ;;
6302
6303    sysv4.3*)
6304      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6305      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6306      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
6307      ;;
6308
6309    sysv4*MP*)
6310      if test -d /usr/nec; then
6311        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6312        _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6313        runpath_var=LD_RUN_PATH
6314        hardcode_runpath_var=yes
6315        _LT_AC_TAGVAR(ld_shlibs, $1)=yes
6316      fi
6317      ;;
6318
6319    sysv4.2uw2*)
6320      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6321      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6322      _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
6323      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6324      hardcode_runpath_var=yes
6325      runpath_var=LD_RUN_PATH
6326      ;;
6327
6328   sysv5OpenUNIX8* | sysv5UnixWare7* |  sysv5uw[[78]]* | unixware7*)
6329      _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text'
6330      if test "$GCC" = yes; then
6331        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6332      else
6333        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6334      fi
6335      runpath_var='LD_RUN_PATH'
6336      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6337      ;;
6338
6339    sysv5*)
6340      _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
6341      # $CC -shared without GNU ld will not create a library from C++
6342      # object files and a static libstdc++, better avoid it by now
6343      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6344      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6345                $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6346      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
6347      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6348      runpath_var='LD_RUN_PATH'
6349      ;;
6350
6351    uts4*)
6352      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6353      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6354      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6355      ;;
6356
6357    *)
6358      _LT_AC_TAGVAR(ld_shlibs, $1)=no
6359      ;;
6360    esac
6361  fi
6362])
6363AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
6364test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
6365
6366variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
6367if test "$GCC" = yes; then
6368  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
6369fi
6370
6371#
6372# Do we need to explicitly link libc?
6373#
6374case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
6375x|xyes)
6376  # Assume -lc should be added
6377  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
6378
6379  if test "$enable_shared" = yes && test "$GCC" = yes; then
6380    case $_LT_AC_TAGVAR(archive_cmds, $1) in
6381    *'~'*)
6382      # FIXME: we may have to deal with multi-command sequences.
6383      ;;
6384    '$CC '*)
6385      # Test whether the compiler implicitly links with -lc since on some
6386      # systems, -lgcc has to come before -lc. If gcc already passes -lc
6387      # to ld, don't add -lc before -lgcc.
6388      AC_MSG_CHECKING([whether -lc should be explicitly linked in])
6389      $rm conftest*
6390      printf "$lt_simple_compile_test_code" > conftest.$ac_ext
6391
6392      if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
6393        soname=conftest
6394        lib=conftest
6395        libobjs=conftest.$ac_objext
6396        deplibs=
6397        wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
6398        compiler_flags=-v
6399        linker_flags=-v
6400        verstring=
6401        output_objdir=.
6402        libname=conftest
6403        lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
6404        _LT_AC_TAGVAR(allow_undefined_flag, $1)=
6405        if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
6406        then
6407          _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6408        else
6409          _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
6410        fi
6411        _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
6412      else
6413        cat conftest.err 1>&5
6414      fi
6415      $rm conftest*
6416      AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
6417      ;;
6418    esac
6419  fi
6420  ;;
6421esac
6422])# AC_LIBTOOL_PROG_LD_SHLIBS
6423
6424
6425# _LT_AC_FILE_LTDLL_C
6426# -------------------
6427# Be careful that the start marker always follows a newline.
6428AC_DEFUN([_LT_AC_FILE_LTDLL_C], [
6429# /* ltdll.c starts here */
6430# #define WIN32_LEAN_AND_MEAN
6431# #include <windows.h>
6432# #undef WIN32_LEAN_AND_MEAN
6433# #include <stdio.h>
6434#
6435# #ifndef __CYGWIN__
6436# #  ifdef __CYGWIN32__
6437# #    define __CYGWIN__ __CYGWIN32__
6438# #  endif
6439# #endif
6440#
6441# #ifdef __cplusplus
6442# extern "C" {
6443# #endif
6444# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
6445# #ifdef __cplusplus
6446# }
6447# #endif
6448#
6449# #ifdef __CYGWIN__
6450# #include <cygwin/cygwin_dll.h>
6451# DECLARE_CYGWIN_DLL( DllMain );
6452# #endif
6453# HINSTANCE __hDllInstance_base;
6454#
6455# BOOL APIENTRY
6456# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
6457# {
6458#   __hDllInstance_base = hInst;
6459#   return TRUE;
6460# }
6461# /* ltdll.c ends here */
6462])# _LT_AC_FILE_LTDLL_C
6463
6464
6465# _LT_AC_TAGVAR(VARNAME, [TAGNAME])
6466# ---------------------------------
6467AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
6468
6469
6470# old names
6471AC_DEFUN([AM_PROG_LIBTOOL],   [AC_PROG_LIBTOOL])
6472AC_DEFUN([AM_ENABLE_SHARED],  [AC_ENABLE_SHARED($@)])
6473AC_DEFUN([AM_ENABLE_STATIC],  [AC_ENABLE_STATIC($@)])
6474AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
6475AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
6476AC_DEFUN([AM_PROG_LD],        [AC_PROG_LD])
6477AC_DEFUN([AM_PROG_NM],        [AC_PROG_NM])
6478
6479# This is just to silence aclocal about the macro not being used
6480ifelse([AC_DISABLE_FAST_INSTALL])
6481
6482AC_DEFUN([LT_AC_PROG_GCJ],
6483[AC_CHECK_TOOL(GCJ, gcj, no)
6484  test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
6485  AC_SUBST(GCJFLAGS)
6486])
6487
6488AC_DEFUN([LT_AC_PROG_RC],
6489[AC_CHECK_TOOL(RC, windres, no)
6490])
6491
6492# NOTE: This macro has been submitted for inclusion into   #
6493#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
6494#  a released version of Autoconf we should remove this    #
6495#  macro and use it instead.                               #
6496# LT_AC_PROG_SED
6497# --------------
6498# Check for a fully-functional sed program, that truncates
6499# as few characters as possible.  Prefer GNU sed if found.
6500AC_DEFUN([LT_AC_PROG_SED],
6501[AC_MSG_CHECKING([for a sed that does not truncate output])
6502AC_CACHE_VAL(lt_cv_path_SED,
6503[# Loop through the user's path and test for sed and gsed.
6504# Then use that list of sed's as ones to test for truncation.
6505as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6506for as_dir in $PATH
6507do
6508  IFS=$as_save_IFS
6509  test -z "$as_dir" && as_dir=.
6510  for lt_ac_prog in sed gsed; do
6511    for ac_exec_ext in '' $ac_executable_extensions; do
6512      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
6513        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
6514      fi
6515    done
6516  done
6517done
6518lt_ac_max=0
6519lt_ac_count=0
6520# Add /usr/xpg4/bin/sed as it is typically found on Solaris
6521# along with /bin/sed that truncates output.
6522for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
6523  test ! -f $lt_ac_sed && break
6524  cat /dev/null > conftest.in
6525  lt_ac_count=0
6526  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
6527  # Check for GNU sed and select it if it is found.
6528  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
6529    lt_cv_path_SED=$lt_ac_sed
6530    break
6531  fi
6532  while true; do
6533    cat conftest.in conftest.in >conftest.tmp
6534    mv conftest.tmp conftest.in
6535    cp conftest.in conftest.nl
6536    echo >>conftest.nl
6537    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
6538    cmp -s conftest.out conftest.nl || break
6539    # 10000 chars as input seems more than enough
6540    test $lt_ac_count -gt 10 && break
6541    lt_ac_count=`expr $lt_ac_count + 1`
6542    if test $lt_ac_count -gt $lt_ac_max; then
6543      lt_ac_max=$lt_ac_count
6544      lt_cv_path_SED=$lt_ac_sed
6545    fi
6546  done
6547done
6548SED=$lt_cv_path_SED
6549])
6550AC_MSG_RESULT([$SED])
6551])
6552
Note: See TracBrowser for help on using the repository browser.