1# aclocal.m4 generated automatically by aclocal 1.6.3 -*- Autoconf -*-
2
3# Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002
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# Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*-
15
16# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
17
18# This program is free software; you can redistribute it and/or modify
19# it under the terms of the GNU General Public License as published by
20# the Free Software Foundation; either version 2, or (at your option)
21# any later version.
22
23# This program is distributed in the hope that it will be useful,
24# but WITHOUT ANY WARRANTY; without even the implied warranty of
25# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
26# GNU General Public License for more details.
27
28# You should have received a copy of the GNU General Public License
29# along with this program; if not, write to the Free Software
30# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
31# 02111-1307, USA.
32
33AC_PREREQ([2.52])
34
35# serial 6
36
37# When config.status generates a header, we must update the stamp-h file.
38# This file resides in the same directory as the config header
39# that is generated.  We must strip everything past the first ":",
40# and everything past the last "/".
41
42# _AM_DIRNAME(PATH)
43# -----------------
44# Like AS_DIRNAME, only do it during macro expansion
45AC_DEFUN([_AM_DIRNAME],
46       [m4_if(regexp([$1], [^.*[^/]//*[^/][^/]*/*$]), -1,
47	      m4_if(regexp([$1], [^//\([^/]\|$\)]), -1,
48		    m4_if(regexp([$1], [^/.*]), -1,
49			  [.],
50			  patsubst([$1], [^\(/\).*], [\1])),
51		    patsubst([$1], [^\(//\)\([^/].*\|$\)], [\1])),
52	      patsubst([$1], [^\(.*[^/]\)//*[^/][^/]*/*$], [\1]))[]dnl
53])# _AM_DIRNAME
54
55
56# The stamp files are numbered to have different names.
57# We could number them on a directory basis, but that's additional
58# complications, let's have a unique counter.
59m4_define([_AM_STAMP_Count], [0])
60
61
62# _AM_STAMP(HEADER)
63# -----------------
64# The name of the stamp file for HEADER.
65AC_DEFUN([_AM_STAMP],
66[m4_define([_AM_STAMP_Count], m4_incr(_AM_STAMP_Count))dnl
67AS_ESCAPE(_AM_DIRNAME(patsubst([$1],
68                               [:.*])))/stamp-h[]_AM_STAMP_Count])
69
70
71# _AM_CONFIG_HEADER(HEADER[:SOURCES], COMMANDS, INIT-COMMANDS)
72# ------------------------------------------------------------
73# We used to try to get a real timestamp in stamp-h.  But the fear is that
74# that will cause unnecessary cvs conflicts.
75AC_DEFUN([_AM_CONFIG_HEADER],
76[# Add the stamp file to the list of files AC keeps track of,
77# along with our hook.
78AC_CONFIG_HEADERS([$1],
79                  [# update the timestamp
80echo 'timestamp for $1' >"_AM_STAMP([$1])"
81$2],
82                  [$3])
83])# _AM_CONFIG_HEADER
84
85
86# AM_CONFIG_HEADER(HEADER[:SOURCES]..., COMMANDS, INIT-COMMANDS)
87# --------------------------------------------------------------
88AC_DEFUN([AM_CONFIG_HEADER],
89[AC_FOREACH([_AM_File], [$1], [_AM_CONFIG_HEADER(_AM_File, [$2], [$3])])
90])# AM_CONFIG_HEADER
91
92# Do all the work for Automake.                            -*- Autoconf -*-
93
94# This macro actually does too much some checks are only needed if
95# your package does certain things.  But this isn't really a big deal.
96
97# Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002
98# Free Software Foundation, Inc.
99
100# This program is free software; you can redistribute it and/or modify
101# it under the terms of the GNU General Public License as published by
102# the Free Software Foundation; either version 2, or (at your option)
103# any later version.
104
105# This program is distributed in the hope that it will be useful,
106# but WITHOUT ANY WARRANTY; without even the implied warranty of
107# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
108# GNU General Public License for more details.
109
110# You should have received a copy of the GNU General Public License
111# along with this program; if not, write to the Free Software
112# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
113# 02111-1307, USA.
114
115# serial 8
116
117# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
118# written in clear, in which case automake, when reading aclocal.m4,
119# will think it sees a *use*, and therefore will trigger all it's
120# C support machinery.  Also note that it means that autoscan, seeing
121# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
122
123
124AC_PREREQ([2.52])
125
126# Autoconf 2.50 wants to disallow AM_ names.  We explicitly allow
127# the ones we care about.
128m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
129
130# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
131# AM_INIT_AUTOMAKE([OPTIONS])
132# -----------------------------------------------
133# The call with PACKAGE and VERSION arguments is the old style
134# call (pre autoconf-2.50), which is being phased out.  PACKAGE
135# and VERSION should now be passed to AC_INIT and removed from
136# the call to AM_INIT_AUTOMAKE.
137# We support both call styles for the transition.  After
138# the next Automake release, Autoconf can make the AC_INIT
139# arguments mandatory, and then we can depend on a new Autoconf
140# release and drop the old call support.
141AC_DEFUN([AM_INIT_AUTOMAKE],
142[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
143 AC_REQUIRE([AC_PROG_INSTALL])dnl
144# test to see if srcdir already configured
145if test "`cd $srcdir && pwd`" != "`pwd`" &&
146   test -f $srcdir/config.status; then
147  AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
148fi
149
150# Define the identity of the package.
151dnl Distinguish between old-style and new-style calls.
152m4_ifval([$2],
153[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
154 AC_SUBST([PACKAGE], [$1])dnl
155 AC_SUBST([VERSION], [$2])],
156[_AM_SET_OPTIONS([$1])dnl
157 AC_SUBST([PACKAGE], [AC_PACKAGE_TARNAME])dnl
158 AC_SUBST([VERSION], [AC_PACKAGE_VERSION])])dnl
159
160_AM_IF_OPTION([no-define],,
161[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
162 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
163
164# Some tools Automake needs.
165AC_REQUIRE([AM_SANITY_CHECK])dnl
166AC_REQUIRE([AC_ARG_PROGRAM])dnl
167AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
168AM_MISSING_PROG(AUTOCONF, autoconf)
169AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
170AM_MISSING_PROG(AUTOHEADER, autoheader)
171AM_MISSING_PROG(MAKEINFO, makeinfo)
172AM_MISSING_PROG(AMTAR, tar)
173AM_PROG_INSTALL_SH
174AM_PROG_INSTALL_STRIP
175# We need awk for the "check" target.  The system "awk" is bad on
176# some platforms.
177AC_REQUIRE([AC_PROG_AWK])dnl
178AC_REQUIRE([AC_PROG_MAKE_SET])dnl
179
180_AM_IF_OPTION([no-dependencies],,
181[AC_PROVIDE_IFELSE([AC_PROG_][CC],
182                  [_AM_DEPENDENCIES(CC)],
183                  [define([AC_PROG_][CC],
184                          defn([AC_PROG_][CC])[_AM_DEPENDENCIES(CC)])])dnl
185AC_PROVIDE_IFELSE([AC_PROG_][CXX],
186                  [_AM_DEPENDENCIES(CXX)],
187                  [define([AC_PROG_][CXX],
188                          defn([AC_PROG_][CXX])[_AM_DEPENDENCIES(CXX)])])dnl
189])
190])
191
192# Copyright 2002  Free Software Foundation, Inc.
193
194# This program is free software; you can redistribute it and/or modify
195# it under the terms of the GNU General Public License as published by
196# the Free Software Foundation; either version 2, or (at your option)
197# any later version.
198
199# This program is distributed in the hope that it will be useful,
200# but WITHOUT ANY WARRANTY; without even the implied warranty of
201# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
202# GNU General Public License for more details.
203
204# You should have received a copy of the GNU General Public License
205# along with this program; if not, write to the Free Software
206# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
207
208# AM_AUTOMAKE_VERSION(VERSION)
209# ----------------------------
210# Automake X.Y traces this macro to ensure aclocal.m4 has been
211# generated from the m4 files accompanying Automake X.Y.
212AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.6"])
213
214# AM_SET_CURRENT_AUTOMAKE_VERSION
215# -------------------------------
216# Call AM_AUTOMAKE_VERSION so it can be traced.
217# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
218AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
219	 [AM_AUTOMAKE_VERSION([1.6.3])])
220
221# Helper functions for option handling.                    -*- Autoconf -*-
222
223# Copyright 2001, 2002  Free Software Foundation, Inc.
224
225# This program is free software; you can redistribute it and/or modify
226# it under the terms of the GNU General Public License as published by
227# the Free Software Foundation; either version 2, or (at your option)
228# any later version.
229
230# This program is distributed in the hope that it will be useful,
231# but WITHOUT ANY WARRANTY; without even the implied warranty of
232# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
233# GNU General Public License for more details.
234
235# You should have received a copy of the GNU General Public License
236# along with this program; if not, write to the Free Software
237# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
238# 02111-1307, USA.
239
240# serial 2
241
242# _AM_MANGLE_OPTION(NAME)
243# -----------------------
244AC_DEFUN([_AM_MANGLE_OPTION],
245[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
246
247# _AM_SET_OPTION(NAME)
248# ------------------------------
249# Set option NAME.  Presently that only means defining a flag for this option.
250AC_DEFUN([_AM_SET_OPTION],
251[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
252
253# _AM_SET_OPTIONS(OPTIONS)
254# ----------------------------------
255# OPTIONS is a space-separated list of Automake options.
256AC_DEFUN([_AM_SET_OPTIONS],
257[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
258
259# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
260# -------------------------------------------
261# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
262AC_DEFUN([_AM_IF_OPTION],
263[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
264
265#
266# Check to make sure that the build environment is sane.
267#
268
269# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
270
271# This program is free software; you can redistribute it and/or modify
272# it under the terms of the GNU General Public License as published by
273# the Free Software Foundation; either version 2, or (at your option)
274# any later version.
275
276# This program is distributed in the hope that it will be useful,
277# but WITHOUT ANY WARRANTY; without even the implied warranty of
278# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
279# GNU General Public License for more details.
280
281# You should have received a copy of the GNU General Public License
282# along with this program; if not, write to the Free Software
283# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
284# 02111-1307, USA.
285
286# serial 3
287
288# AM_SANITY_CHECK
289# ---------------
290AC_DEFUN([AM_SANITY_CHECK],
291[AC_MSG_CHECKING([whether build environment is sane])
292# Just in case
293sleep 1
294echo timestamp > conftest.file
295# Do `set' in a subshell so we don't clobber the current shell's
296# arguments.  Must try -L first in case configure is actually a
297# symlink; some systems play weird games with the mod time of symlinks
298# (eg FreeBSD returns the mod time of the symlink's containing
299# directory).
300if (
301   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
302   if test "$[*]" = "X"; then
303      # -L didn't work.
304      set X `ls -t $srcdir/configure conftest.file`
305   fi
306   rm -f conftest.file
307   if test "$[*]" != "X $srcdir/configure conftest.file" \
308      && test "$[*]" != "X conftest.file $srcdir/configure"; then
309
310      # If neither matched, then we have a broken ls.  This can happen
311      # if, for instance, CONFIG_SHELL is bash and it inherits a
312      # broken ls alias from the environment.  This has actually
313      # happened.  Such a system could not be considered "sane".
314      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
315alias in your environment])
316   fi
317
318   test "$[2]" = conftest.file
319   )
320then
321   # Ok.
322   :
323else
324   AC_MSG_ERROR([newly created file is older than distributed files!
325Check your system clock])
326fi
327AC_MSG_RESULT(yes)])
328
329#  -*- Autoconf -*-
330
331
332# Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
333
334# This program is free software; you can redistribute it and/or modify
335# it under the terms of the GNU General Public License as published by
336# the Free Software Foundation; either version 2, or (at your option)
337# any later version.
338
339# This program is distributed in the hope that it will be useful,
340# but WITHOUT ANY WARRANTY; without even the implied warranty of
341# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
342# GNU General Public License for more details.
343
344# You should have received a copy of the GNU General Public License
345# along with this program; if not, write to the Free Software
346# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
347# 02111-1307, USA.
348
349# serial 3
350
351# AM_MISSING_PROG(NAME, PROGRAM)
352# ------------------------------
353AC_DEFUN([AM_MISSING_PROG],
354[AC_REQUIRE([AM_MISSING_HAS_RUN])
355$1=${$1-"${am_missing_run}$2"}
356AC_SUBST($1)])
357
358
359# AM_MISSING_HAS_RUN
360# ------------------
361# Define MISSING if not defined so far and test if it supports --run.
362# If it does, set am_missing_run to use it, otherwise, to nothing.
363AC_DEFUN([AM_MISSING_HAS_RUN],
364[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
365test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
366# Use eval to expand $SHELL
367if eval "$MISSING --run true"; then
368  am_missing_run="$MISSING --run "
369else
370  am_missing_run=
371  AC_MSG_WARN([`missing' script is too old or missing])
372fi
373])
374
375# AM_AUX_DIR_EXPAND
376
377# Copyright 2001 Free Software Foundation, Inc.
378
379# This program is free software; you can redistribute it and/or modify
380# it under the terms of the GNU General Public License as published by
381# the Free Software Foundation; either version 2, or (at your option)
382# any later version.
383
384# This program is distributed in the hope that it will be useful,
385# but WITHOUT ANY WARRANTY; without even the implied warranty of
386# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
387# GNU General Public License for more details.
388
389# You should have received a copy of the GNU General Public License
390# along with this program; if not, write to the Free Software
391# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
392# 02111-1307, USA.
393
394# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
395# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
396# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
397#
398# Of course, Automake must honor this variable whenever it calls a
399# tool from the auxiliary directory.  The problem is that $srcdir (and
400# therefore $ac_aux_dir as well) can be either absolute or relative,
401# depending on how configure is run.  This is pretty annoying, since
402# it makes $ac_aux_dir quite unusable in subdirectories: in the top
403# source directory, any form will work fine, but in subdirectories a
404# relative path needs to be adjusted first.
405#
406# $ac_aux_dir/missing
407#    fails when called from a subdirectory if $ac_aux_dir is relative
408# $top_srcdir/$ac_aux_dir/missing
409#    fails if $ac_aux_dir is absolute,
410#    fails when called from a subdirectory in a VPATH build with
411#          a relative $ac_aux_dir
412#
413# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
414# are both prefixed by $srcdir.  In an in-source build this is usually
415# harmless because $srcdir is `.', but things will broke when you
416# start a VPATH build or use an absolute $srcdir.
417#
418# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
419# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
420#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
421# and then we would define $MISSING as
422#   MISSING="\${SHELL} $am_aux_dir/missing"
423# This will work as long as MISSING is not called from configure, because
424# unfortunately $(top_srcdir) has no meaning in configure.
425# However there are other variables, like CC, which are often used in
426# configure, and could therefore not use this "fixed" $ac_aux_dir.
427#
428# Another solution, used here, is to always expand $ac_aux_dir to an
429# absolute PATH.  The drawback is that using absolute paths prevent a
430# configured tree to be moved without reconfiguration.
431
432# Rely on autoconf to set up CDPATH properly.
433AC_PREREQ([2.50])
434
435AC_DEFUN([AM_AUX_DIR_EXPAND], [
436# expand $ac_aux_dir to an absolute path
437am_aux_dir=`cd $ac_aux_dir && pwd`
438])
439
440# AM_PROG_INSTALL_SH
441# ------------------
442# Define $install_sh.
443
444# Copyright 2001 Free Software Foundation, Inc.
445
446# This program is free software; you can redistribute it and/or modify
447# it under the terms of the GNU General Public License as published by
448# the Free Software Foundation; either version 2, or (at your option)
449# any later version.
450
451# This program is distributed in the hope that it will be useful,
452# but WITHOUT ANY WARRANTY; without even the implied warranty of
453# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
454# GNU General Public License for more details.
455
456# You should have received a copy of the GNU General Public License
457# along with this program; if not, write to the Free Software
458# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
459# 02111-1307, USA.
460
461AC_DEFUN([AM_PROG_INSTALL_SH],
462[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
463install_sh=${install_sh-"$am_aux_dir/install-sh"}
464AC_SUBST(install_sh)])
465
466# AM_PROG_INSTALL_STRIP
467
468# Copyright 2001 Free Software Foundation, Inc.
469
470# This program is free software; you can redistribute it and/or modify
471# it under the terms of the GNU General Public License as published by
472# the Free Software Foundation; either version 2, or (at your option)
473# any later version.
474
475# This program is distributed in the hope that it will be useful,
476# but WITHOUT ANY WARRANTY; without even the implied warranty of
477# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
478# GNU General Public License for more details.
479
480# You should have received a copy of the GNU General Public License
481# along with this program; if not, write to the Free Software
482# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
483# 02111-1307, USA.
484
485# One issue with vendor `install' (even GNU) is that you can't
486# specify the program used to strip binaries.  This is especially
487# annoying in cross-compiling environments, where the build's strip
488# is unlikely to handle the host's binaries.
489# Fortunately install-sh will honor a STRIPPROG variable, so we
490# always use install-sh in `make install-strip', and initialize
491# STRIPPROG with the value of the STRIP variable (set by the user).
492AC_DEFUN([AM_PROG_INSTALL_STRIP],
493[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
494# Installed binaries are usually stripped using `strip' when the user
495# run `make install-strip'.  However `strip' might not be the right
496# tool to use in cross-compilation environments, therefore Automake
497# will honor the `STRIP' environment variable to overrule this program.
498dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
499if test "$cross_compiling" != no; then
500  AC_CHECK_TOOL([STRIP], [strip], :)
501fi
502INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
503AC_SUBST([INSTALL_STRIP_PROGRAM])])
504
505# serial 4						-*- Autoconf -*-
506
507# Copyright 1999, 2000, 2001 Free Software Foundation, Inc.
508
509# This program is free software; you can redistribute it and/or modify
510# it under the terms of the GNU General Public License as published by
511# the Free Software Foundation; either version 2, or (at your option)
512# any later version.
513
514# This program is distributed in the hope that it will be useful,
515# but WITHOUT ANY WARRANTY; without even the implied warranty of
516# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
517# GNU General Public License for more details.
518
519# You should have received a copy of the GNU General Public License
520# along with this program; if not, write to the Free Software
521# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
522# 02111-1307, USA.
523
524
525# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
526# written in clear, in which case automake, when reading aclocal.m4,
527# will think it sees a *use*, and therefore will trigger all it's
528# C support machinery.  Also note that it means that autoscan, seeing
529# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
530
531
532
533# _AM_DEPENDENCIES(NAME)
534# ----------------------
535# See how the compiler implements dependency checking.
536# NAME is "CC", "CXX", "GCJ", or "OBJC".
537# We try a few techniques and use that to set a single cache variable.
538#
539# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
540# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
541# dependency, and given that the user is not expected to run this macro,
542# just rely on AC_PROG_CC.
543AC_DEFUN([_AM_DEPENDENCIES],
544[AC_REQUIRE([AM_SET_DEPDIR])dnl
545AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
546AC_REQUIRE([AM_MAKE_INCLUDE])dnl
547AC_REQUIRE([AM_DEP_TRACK])dnl
548
549ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
550       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
551       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
552       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
553                   [depcc="$$1"   am_compiler_list=])
554
555AC_CACHE_CHECK([dependency style of $depcc],
556               [am_cv_$1_dependencies_compiler_type],
557[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
558  # We make a subdir and do the tests there.  Otherwise we can end up
559  # making bogus files that we don't know about and never remove.  For
560  # instance it was reported that on HP-UX the gcc test will end up
561  # making a dummy file named `D' -- because `-MD' means `put the output
562  # in D'.
563  mkdir conftest.dir
564  # Copy depcomp to subdir because otherwise we won't find it if we're
565  # using a relative directory.
566  cp "$am_depcomp" conftest.dir
567  cd conftest.dir
568
569  am_cv_$1_dependencies_compiler_type=none
570  if test "$am_compiler_list" = ""; then
571     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
572  fi
573  for depmode in $am_compiler_list; do
574    # We need to recreate these files for each test, as the compiler may
575    # overwrite some of them when testing with obscure command lines.
576    # This happens at least with the AIX C compiler.
577    echo '#include "conftest.h"' > conftest.c
578    echo 'int i;' > conftest.h
579    echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf
580
581    case $depmode in
582    nosideeffect)
583      # after this tag, mechanisms are not by side-effect, so they'll
584      # only be used when explicitly requested
585      if test "x$enable_dependency_tracking" = xyes; then
586	continue
587      else
588	break
589      fi
590      ;;
591    none) break ;;
592    esac
593    # We check with `-c' and `-o' for the sake of the "dashmstdout"
594    # mode.  It turns out that the SunPro C++ compiler does not properly
595    # handle `-M -o', and we need to detect this.
596    if depmode=$depmode \
597       source=conftest.c object=conftest.o \
598       depfile=conftest.Po tmpdepfile=conftest.TPo \
599       $SHELL ./depcomp $depcc -c conftest.c -o conftest.o >/dev/null 2>&1 &&
600       grep conftest.h conftest.Po > /dev/null 2>&1 &&
601       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
602      am_cv_$1_dependencies_compiler_type=$depmode
603      break
604    fi
605  done
606
607  cd ..
608  rm -rf conftest.dir
609else
610  am_cv_$1_dependencies_compiler_type=none
611fi
612])
613AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
614])
615
616
617# AM_SET_DEPDIR
618# -------------
619# Choose a directory name for dependency files.
620# This macro is AC_REQUIREd in _AM_DEPENDENCIES
621AC_DEFUN([AM_SET_DEPDIR],
622[rm -f .deps 2>/dev/null
623mkdir .deps 2>/dev/null
624if test -d .deps; then
625  DEPDIR=.deps
626else
627  # MS-DOS does not allow filenames that begin with a dot.
628  DEPDIR=_deps
629fi
630rmdir .deps 2>/dev/null
631AC_SUBST([DEPDIR])
632])
633
634
635# AM_DEP_TRACK
636# ------------
637AC_DEFUN([AM_DEP_TRACK],
638[AC_ARG_ENABLE(dependency-tracking,
639[  --disable-dependency-tracking Speeds up one-time builds
640  --enable-dependency-tracking  Do not reject slow dependency extractors])
641if test "x$enable_dependency_tracking" != xno; then
642  am_depcomp="$ac_aux_dir/depcomp"
643  AMDEPBACKSLASH='\'
644fi
645AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
646AC_SUBST([AMDEPBACKSLASH])
647])
648
649# Generate code to set up dependency tracking.   -*- Autoconf -*-
650
651# Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
652
653# This program is free software; you can redistribute it and/or modify
654# it under the terms of the GNU General Public License as published by
655# the Free Software Foundation; either version 2, or (at your option)
656# any later version.
657
658# This program is distributed in the hope that it will be useful,
659# but WITHOUT ANY WARRANTY; without even the implied warranty of
660# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
661# GNU General Public License for more details.
662
663# You should have received a copy of the GNU General Public License
664# along with this program; if not, write to the Free Software
665# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
666# 02111-1307, USA.
667
668#serial 2
669
670# _AM_OUTPUT_DEPENDENCY_COMMANDS
671# ------------------------------
672AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
673[for mf in $CONFIG_FILES; do
674  # Strip MF so we end up with the name of the file.
675  mf=`echo "$mf" | sed -e 's/:.*$//'`
676  # Check whether this is an Automake generated Makefile or not.
677  # We used to match only the files named `Makefile.in', but
678  # some people rename them; so instead we look at the file content.
679  # Grep'ing the first line is not enough: some people post-process
680  # each Makefile.in and add a new line on top of each file to say so.
681  # So let's grep whole file.
682  if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
683    dirpart=`AS_DIRNAME("$mf")`
684  else
685    continue
686  fi
687  grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue
688  # Extract the definition of DEP_FILES from the Makefile without
689  # running `make'.
690  DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
691  test -z "$DEPDIR" && continue
692  # When using ansi2knr, U may be empty or an underscore; expand it
693  U=`sed -n -e '/^U = / s///p' < "$mf"`
694  test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
695  # We invoke sed twice because it is the simplest approach to
696  # changing $(DEPDIR) to its actual value in the expansion.
697  for file in `sed -n -e '
698    /^DEP_FILES = .*\\\\$/ {
699      s/^DEP_FILES = //
700      :loop
701	s/\\\\$//
702	p
703	n
704	/\\\\$/ b loop
705      p
706    }
707    /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
708       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
709    # Make sure the directory exists.
710    test -f "$dirpart/$file" && continue
711    fdir=`AS_DIRNAME(["$file"])`
712    AS_MKDIR_P([$dirpart/$fdir])
713    # echo "creating $dirpart/$file"
714    echo '# dummy' > "$dirpart/$file"
715  done
716done
717])# _AM_OUTPUT_DEPENDENCY_COMMANDS
718
719
720# AM_OUTPUT_DEPENDENCY_COMMANDS
721# -----------------------------
722# This macro should only be invoked once -- use via AC_REQUIRE.
723#
724# This code is only required when automatic dependency tracking
725# is enabled.  FIXME.  This creates each `.P' file that we will
726# need in order to bootstrap the dependency handling code.
727AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
728[AC_CONFIG_COMMANDS([depfiles],
729     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
730     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
731])
732
733# Copyright 2001 Free Software Foundation, Inc.             -*- Autoconf -*-
734
735# This program is free software; you can redistribute it and/or modify
736# it under the terms of the GNU General Public License as published by
737# the Free Software Foundation; either version 2, or (at your option)
738# any later version.
739
740# This program is distributed in the hope that it will be useful,
741# but WITHOUT ANY WARRANTY; without even the implied warranty of
742# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
743# GNU General Public License for more details.
744
745# You should have received a copy of the GNU General Public License
746# along with this program; if not, write to the Free Software
747# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
748# 02111-1307, USA.
749
750# serial 2
751
752# AM_MAKE_INCLUDE()
753# -----------------
754# Check to see how make treats includes.
755AC_DEFUN([AM_MAKE_INCLUDE],
756[am_make=${MAKE-make}
757cat > confinc << 'END'
758doit:
759	@echo done
760END
761# If we don't find an include directive, just comment out the code.
762AC_MSG_CHECKING([for style of include used by $am_make])
763am__include="#"
764am__quote=
765_am_result=none
766# First try GNU make style include.
767echo "include confinc" > confmf
768# We grep out `Entering directory' and `Leaving directory'
769# messages which can occur if `w' ends up in MAKEFLAGS.
770# In particular we don't look at `^make:' because GNU make might
771# be invoked under some other name (usually "gmake"), in which
772# case it prints its new name instead of `make'.
773if test "`$am_make -s -f confmf 2> /dev/null | fgrep -v 'ing directory'`" = "done"; then
774   am__include=include
775   am__quote=
776   _am_result=GNU
777fi
778# Now try BSD make style include.
779if test "$am__include" = "#"; then
780   echo '.include "confinc"' > confmf
781   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
782      am__include=.include
783      am__quote="\""
784      _am_result=BSD
785   fi
786fi
787AC_SUBST(am__include)
788AC_SUBST(am__quote)
789AC_MSG_RESULT($_am_result)
790rm -f confinc confmf
791])
792
793# AM_CONDITIONAL                                              -*- Autoconf -*-
794
795# Copyright 1997, 2000, 2001 Free Software Foundation, Inc.
796
797# This program is free software; you can redistribute it and/or modify
798# it under the terms of the GNU General Public License as published by
799# the Free Software Foundation; either version 2, or (at your option)
800# any later version.
801
802# This program is distributed in the hope that it will be useful,
803# but WITHOUT ANY WARRANTY; without even the implied warranty of
804# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
805# GNU General Public License for more details.
806
807# You should have received a copy of the GNU General Public License
808# along with this program; if not, write to the Free Software
809# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
810# 02111-1307, USA.
811
812# serial 5
813
814AC_PREREQ(2.52)
815
816# AM_CONDITIONAL(NAME, SHELL-CONDITION)
817# -------------------------------------
818# Define a conditional.
819AC_DEFUN([AM_CONDITIONAL],
820[ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
821        [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
822AC_SUBST([$1_TRUE])
823AC_SUBST([$1_FALSE])
824if $2; then
825  $1_TRUE=
826  $1_FALSE='#'
827else
828  $1_TRUE='#'
829  $1_FALSE=
830fi
831AC_CONFIG_COMMANDS_PRE(
832[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
833  AC_MSG_ERROR([conditional \"$1\" was never defined.
834Usually this means the macro was only invoked conditionally.])
835fi])])
836
837# Add --enable-maintainer-mode option to configure.
838# From Jim Meyering
839
840# Copyright 1996, 1998, 2000, 2001 Free Software Foundation, Inc.
841
842# This program is free software; you can redistribute it and/or modify
843# it under the terms of the GNU General Public License as published by
844# the Free Software Foundation; either version 2, or (at your option)
845# any later version.
846
847# This program is distributed in the hope that it will be useful,
848# but WITHOUT ANY WARRANTY; without even the implied warranty of
849# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
850# GNU General Public License for more details.
851
852# You should have received a copy of the GNU General Public License
853# along with this program; if not, write to the Free Software
854# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
855# 02111-1307, USA.
856
857# serial 1
858
859AC_DEFUN([AM_MAINTAINER_MODE],
860[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
861  dnl maintainer-mode is disabled by default
862  AC_ARG_ENABLE(maintainer-mode,
863[  --enable-maintainer-mode enable make rules and dependencies not useful
864                          (and sometimes confusing) to the casual installer],
865      USE_MAINTAINER_MODE=$enableval,
866      USE_MAINTAINER_MODE=no)
867  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
868  AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
869  MAINT=$MAINTAINER_MODE_TRUE
870  AC_SUBST(MAINT)dnl
871]
872)
873
874# serial 2
875
876# AM_PROG_CC_C_O
877# --------------
878# Like AC_PROG_CC_C_O, but changed for automake.
879
880# Copyright 1999, 2000, 2001 Free Software Foundation, Inc.
881
882# This program is free software; you can redistribute it and/or modify
883# it under the terms of the GNU General Public License as published by
884# the Free Software Foundation; either version 2, or (at your option)
885# any later version.
886
887# This program is distributed in the hope that it will be useful,
888# but WITHOUT ANY WARRANTY; without even the implied warranty of
889# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
890# GNU General Public License for more details.
891
892# You should have received a copy of the GNU General Public License
893# along with this program; if not, write to the Free Software
894# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
895# 02111-1307, USA.
896
897AC_DEFUN([AM_PROG_CC_C_O],
898[AC_REQUIRE([AC_PROG_CC_C_O])dnl
899AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
900# FIXME: we rely on the cache variable name because
901# there is no other way.
902set dummy $CC
903ac_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']`
904if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" != yes"; then
905   # Losing compiler, so override with the script.
906   # FIXME: It is wrong to rewrite CC.
907   # But if we don't then we get into trouble of one sort or another.
908   # A longer-term fix would be to have automake use am__CC in this case,
909   # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
910   CC="$am_aux_dir/compile $CC"
911fi
912])
913
914# Helper functions for option handling.                    -*- Autoconf -*-
915#
916#   Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
917#   Written by Gary V. Vaughan, 2004
918#
919# This file is free software; the Free Software Foundation gives
920# unlimited permission to copy and/or distribute it, with or without
921# modifications, as long as this notice is preserved.
922
923# serial 6 ltoptions.m4
924
925# This is to help aclocal find these macros, as it can't see m4_define.
926AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
927
928
929# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
930# ------------------------------------------
931m4_define([_LT_MANGLE_OPTION],
932[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
933
934
935# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
936# ---------------------------------------
937# Set option OPTION-NAME for macro MACRO-NAME, and if there is a
938# matching handler defined, dispatch to it.  Other OPTION-NAMEs are
939# saved as a flag.
940m4_define([_LT_SET_OPTION],
941[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
942m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
943        _LT_MANGLE_DEFUN([$1], [$2]),
944    [m4_warning([Unknown $1 option `$2'])])[]dnl
945])
946
947
948# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
949# ------------------------------------------------------------
950# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
951m4_define([_LT_IF_OPTION],
952[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
953
954
955# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
956# -------------------------------------------------------
957# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
958# are set.
959m4_define([_LT_UNLESS_OPTIONS],
960[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
961	    [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
962		      [m4_define([$0_found])])])[]dnl
963m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
964])[]dnl
965])
966
967
968# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
969# ----------------------------------------
970# OPTION-LIST is a space-separated list of Libtool options associated
971# with MACRO-NAME.  If any OPTION has a matching handler declared with
972# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
973# the unknown option and exit.
974m4_defun([_LT_SET_OPTIONS],
975[# Set options
976m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
977    [_LT_SET_OPTION([$1], _LT_Option)])
978
979m4_if([$1],[LT_INIT],[
980  dnl
981  dnl Simply set some default values (i.e off) if boolean options were not
982  dnl specified:
983  _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
984  ])
985  _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
986  ])
987  dnl
988  dnl If no reference was made to various pairs of opposing options, then
989  dnl we run the default mode handler for the pair.  For example, if neither
990  dnl `shared' nor `disable-shared' was passed, we enable building of shared
991  dnl archives by default:
992  _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
993  _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
994  _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
995  _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
996  		   [_LT_ENABLE_FAST_INSTALL])
997  ])
998])# _LT_SET_OPTIONS
999
1000
1001
1002# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
1003# -----------------------------------------
1004m4_define([_LT_MANGLE_DEFUN],
1005[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
1006
1007
1008# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
1009# -----------------------------------------------
1010m4_define([LT_OPTION_DEFINE],
1011[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
1012])# LT_OPTION_DEFINE
1013
1014
1015# dlopen
1016# ------
1017LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
1018])
1019
1020AU_DEFUN([AC_LIBTOOL_DLOPEN],
1021[_LT_SET_OPTION([LT_INIT], [dlopen])
1022AC_DIAGNOSE([obsolete],
1023[$0: Remove this warning and the call to _LT_SET_OPTION when you
1024put the `dlopen' option into LT_INIT's first parameter.])
1025])
1026
1027dnl aclocal-1.4 backwards compatibility:
1028dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
1029
1030
1031# win32-dll
1032# ---------
1033# Declare package support for building win32 dll's.
1034LT_OPTION_DEFINE([LT_INIT], [win32-dll],
1035[enable_win32_dll=yes
1036
1037case $host in
1038*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*)
1039  AC_CHECK_TOOL(AS, as, false)
1040  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
1041  AC_CHECK_TOOL(OBJDUMP, objdump, false)
1042  ;;
1043esac
1044
1045test -z "$AS" && AS=as
1046_LT_DECL([], [AS],      [0], [Assembler program])dnl
1047
1048test -z "$DLLTOOL" && DLLTOOL=dlltool
1049_LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl
1050
1051test -z "$OBJDUMP" && OBJDUMP=objdump
1052_LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl
1053])# win32-dll
1054
1055AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
1056[AC_REQUIRE([AC_CANONICAL_HOST])dnl
1057_LT_SET_OPTION([LT_INIT], [win32-dll])
1058AC_DIAGNOSE([obsolete],
1059[$0: Remove this warning and the call to _LT_SET_OPTION when you
1060put the `win32-dll' option into LT_INIT's first parameter.])
1061])
1062
1063dnl aclocal-1.4 backwards compatibility:
1064dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
1065
1066
1067# _LT_ENABLE_SHARED([DEFAULT])
1068# ----------------------------
1069# implement the --enable-shared flag, and supports the `shared' and
1070# `disable-shared' LT_INIT options.
1071# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
1072m4_define([_LT_ENABLE_SHARED],
1073[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
1074AC_ARG_ENABLE([shared],
1075    [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
1076	[build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
1077    [p=${PACKAGE-default}
1078    case $enableval in
1079    yes) enable_shared=yes ;;
1080    no) enable_shared=no ;;
1081    *)
1082      enable_shared=no
1083      # Look at the argument we got.  We use all the common list separators.
1084      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
1085      for pkg in $enableval; do
1086	IFS="$lt_save_ifs"
1087	if test "X$pkg" = "X$p"; then
1088	  enable_shared=yes
1089	fi
1090      done
1091      IFS="$lt_save_ifs"
1092      ;;
1093    esac],
1094    [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
1095
1096    _LT_DECL([build_libtool_libs], [enable_shared], [0],
1097	[Whether or not to build shared libraries])
1098])# _LT_ENABLE_SHARED
1099
1100LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
1101LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
1102
1103# Old names:
1104AC_DEFUN([AC_ENABLE_SHARED],
1105[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
1106])
1107
1108AC_DEFUN([AC_DISABLE_SHARED],
1109[_LT_SET_OPTION([LT_INIT], [disable-shared])
1110])
1111
1112AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
1113AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
1114
1115dnl aclocal-1.4 backwards compatibility:
1116dnl AC_DEFUN([AM_ENABLE_SHARED], [])
1117dnl AC_DEFUN([AM_DISABLE_SHARED], [])
1118
1119
1120
1121# _LT_ENABLE_STATIC([DEFAULT])
1122# ----------------------------
1123# implement the --enable-static flag, and support the `static' and
1124# `disable-static' LT_INIT options.
1125# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
1126m4_define([_LT_ENABLE_STATIC],
1127[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
1128AC_ARG_ENABLE([static],
1129    [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
1130	[build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
1131    [p=${PACKAGE-default}
1132    case $enableval in
1133    yes) enable_static=yes ;;
1134    no) enable_static=no ;;
1135    *)
1136     enable_static=no
1137      # Look at the argument we got.  We use all the common list separators.
1138      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
1139      for pkg in $enableval; do
1140	IFS="$lt_save_ifs"
1141	if test "X$pkg" = "X$p"; then
1142	  enable_static=yes
1143	fi
1144      done
1145      IFS="$lt_save_ifs"
1146      ;;
1147    esac],
1148    [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
1149
1150    _LT_DECL([build_old_libs], [enable_static], [0],
1151	[Whether or not to build static libraries])
1152])# _LT_ENABLE_STATIC
1153
1154LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
1155LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
1156
1157# Old names:
1158AC_DEFUN([AC_ENABLE_STATIC],
1159[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
1160])
1161
1162AC_DEFUN([AC_DISABLE_STATIC],
1163[_LT_SET_OPTION([LT_INIT], [disable-static])
1164])
1165
1166AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
1167AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
1168
1169dnl aclocal-1.4 backwards compatibility:
1170dnl AC_DEFUN([AM_ENABLE_STATIC], [])
1171dnl AC_DEFUN([AM_DISABLE_STATIC], [])
1172
1173
1174
1175# _LT_ENABLE_FAST_INSTALL([DEFAULT])
1176# ----------------------------------
1177# implement the --enable-fast-install flag, and support the `fast-install'
1178# and `disable-fast-install' LT_INIT options.
1179# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
1180m4_define([_LT_ENABLE_FAST_INSTALL],
1181[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
1182AC_ARG_ENABLE([fast-install],
1183    [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
1184    [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
1185    [p=${PACKAGE-default}
1186    case $enableval in
1187    yes) enable_fast_install=yes ;;
1188    no) enable_fast_install=no ;;
1189    *)
1190      enable_fast_install=no
1191      # Look at the argument we got.  We use all the common list separators.
1192      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
1193      for pkg in $enableval; do
1194	IFS="$lt_save_ifs"
1195	if test "X$pkg" = "X$p"; then
1196	  enable_fast_install=yes
1197	fi
1198      done
1199      IFS="$lt_save_ifs"
1200      ;;
1201    esac],
1202    [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
1203
1204_LT_DECL([fast_install], [enable_fast_install], [0],
1205	 [Whether or not to optimize for fast installation])dnl
1206])# _LT_ENABLE_FAST_INSTALL
1207
1208LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
1209LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
1210
1211# Old names:
1212AU_DEFUN([AC_ENABLE_FAST_INSTALL],
1213[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
1214AC_DIAGNOSE([obsolete],
1215[$0: Remove this warning and the call to _LT_SET_OPTION when you put
1216the `fast-install' option into LT_INIT's first parameter.])
1217])
1218
1219AU_DEFUN([AC_DISABLE_FAST_INSTALL],
1220[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
1221AC_DIAGNOSE([obsolete],
1222[$0: Remove this warning and the call to _LT_SET_OPTION when you put
1223the `disable-fast-install' option into LT_INIT's first parameter.])
1224])
1225
1226dnl aclocal-1.4 backwards compatibility:
1227dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
1228dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
1229
1230
1231# _LT_WITH_PIC([MODE])
1232# --------------------
1233# implement the --with-pic flag, and support the `pic-only' and `no-pic'
1234# LT_INIT options.
1235# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
1236m4_define([_LT_WITH_PIC],
1237[AC_ARG_WITH([pic],
1238    [AS_HELP_STRING([--with-pic],
1239	[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
1240    [pic_mode="$withval"],
1241    [pic_mode=default])
1242
1243test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
1244
1245_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
1246])# _LT_WITH_PIC
1247
1248LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
1249LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
1250
1251# Old name:
1252AU_DEFUN([AC_LIBTOOL_PICMODE],
1253[_LT_SET_OPTION([LT_INIT], [pic-only])
1254AC_DIAGNOSE([obsolete],
1255[$0: Remove this warning and the call to _LT_SET_OPTION when you
1256put the `pic-only' option into LT_INIT's first parameter.])
1257])
1258
1259dnl aclocal-1.4 backwards compatibility:
1260dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
1261
1262
1263m4_define([_LTDL_MODE], [])
1264LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
1265		 [m4_define([_LTDL_MODE], [nonrecursive])])
1266LT_OPTION_DEFINE([LTDL_INIT], [recursive],
1267		 [m4_define([_LTDL_MODE], [recursive])])
1268LT_OPTION_DEFINE([LTDL_INIT], [subproject],
1269		 [m4_define([_LTDL_MODE], [subproject])])
1270
1271m4_define([_LTDL_TYPE], [])
1272LT_OPTION_DEFINE([LTDL_INIT], [installable],
1273		 [m4_define([_LTDL_TYPE], [installable])])
1274LT_OPTION_DEFINE([LTDL_INIT], [convenience],
1275		 [m4_define([_LTDL_TYPE], [convenience])])
1276
1277# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
1278#
1279#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
1280#                 2006, 2007, 2008 Free Software Foundation, Inc.
1281#   Written by Gordon Matzigkeit, 1996
1282#
1283# This file is free software; the Free Software Foundation gives
1284# unlimited permission to copy and/or distribute it, with or without
1285# modifications, as long as this notice is preserved.
1286
1287m4_define([_LT_COPYING], [dnl
1288#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
1289#                 2006, 2007, 2008 Free Software Foundation, Inc.
1290#   Written by Gordon Matzigkeit, 1996
1291#
1292#   This file is part of GNU Libtool.
1293#
1294# GNU Libtool is free software; you can redistribute it and/or
1295# modify it under the terms of the GNU General Public License as
1296# published by the Free Software Foundation; either version 2 of
1297# the License, or (at your option) any later version.
1298#
1299# As a special exception to the GNU General Public License,
1300# if you distribute this file as part of a program or library that
1301# is built using GNU Libtool, you may include this file under the
1302# same distribution terms that you use for the rest of that program.
1303#
1304# GNU Libtool is distributed in the hope that it will be useful,
1305# but WITHOUT ANY WARRANTY; without even the implied warranty of
1306# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1307# GNU General Public License for more details.
1308#
1309# You should have received a copy of the GNU General Public License
1310# along with GNU Libtool; see the file COPYING.  If not, a copy
1311# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
1312# obtained by writing to the Free Software Foundation, Inc.,
1313# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
1314])
1315
1316# serial 56 LT_INIT
1317
1318
1319# LT_PREREQ(VERSION)
1320# ------------------
1321# Complain and exit if this libtool version is less that VERSION.
1322m4_defun([LT_PREREQ],
1323[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
1324       [m4_default([$3],
1325		   [m4_fatal([Libtool version $1 or higher is required],
1326		             63)])],
1327       [$2])])
1328
1329
1330# _LT_CHECK_BUILDDIR
1331# ------------------
1332# Complain if the absolute build directory name contains unusual characters
1333m4_defun([_LT_CHECK_BUILDDIR],
1334[case `pwd` in
1335  *\ * | *\	*)
1336    AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
1337esac
1338])
1339
1340
1341# LT_INIT([OPTIONS])
1342# ------------------
1343AC_DEFUN([LT_INIT],
1344[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
1345AC_BEFORE([$0], [LT_LANG])dnl
1346AC_BEFORE([$0], [LT_OUTPUT])dnl
1347AC_BEFORE([$0], [LTDL_INIT])dnl
1348m4_require([_LT_CHECK_BUILDDIR])dnl
1349
1350dnl Autoconf doesn't catch unexpanded LT_ macros by default:
1351m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
1352m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
1353dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
1354dnl unless we require an AC_DEFUNed macro:
1355AC_REQUIRE([LTOPTIONS_VERSION])dnl
1356AC_REQUIRE([LTSUGAR_VERSION])dnl
1357AC_REQUIRE([LTVERSION_VERSION])dnl
1358AC_REQUIRE([LTOBSOLETE_VERSION])dnl
1359m4_require([_LT_PROG_LTMAIN])dnl
1360
1361dnl Parse OPTIONS
1362_LT_SET_OPTIONS([$0], [$1])
1363
1364# This can be used to rebuild libtool when needed
1365LIBTOOL_DEPS="$ltmain"
1366
1367# Always use our own libtool.
1368LIBTOOL='$(SHELL) $(top_builddir)/libtool'
1369AC_SUBST(LIBTOOL)dnl
1370
1371_LT_SETUP
1372
1373# Only expand once:
1374m4_define([LT_INIT])
1375])# LT_INIT
1376
1377# Old names:
1378AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
1379AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
1380dnl aclocal-1.4 backwards compatibility:
1381dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
1382dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
1383
1384
1385# _LT_CC_BASENAME(CC)
1386# -------------------
1387# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
1388m4_defun([_LT_CC_BASENAME],
1389[for cc_temp in $1""; do
1390  case $cc_temp in
1391    compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
1392    distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
1393    \-*) ;;
1394    *) break;;
1395  esac
1396done
1397cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
1398])
1399
1400
1401# _LT_FILEUTILS_DEFAULTS
1402# ----------------------
1403# It is okay to use these file commands and assume they have been set
1404# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
1405m4_defun([_LT_FILEUTILS_DEFAULTS],
1406[: ${CP="cp -f"}
1407: ${MV="mv -f"}
1408: ${RM="rm -f"}
1409])# _LT_FILEUTILS_DEFAULTS
1410
1411
1412# _LT_SETUP
1413# ---------
1414m4_defun([_LT_SETUP],
1415[AC_REQUIRE([AC_CANONICAL_HOST])dnl
1416AC_REQUIRE([AC_CANONICAL_BUILD])dnl
1417_LT_DECL([], [host_alias], [0], [The host system])dnl
1418_LT_DECL([], [host], [0])dnl
1419_LT_DECL([], [host_os], [0])dnl
1420dnl
1421_LT_DECL([], [build_alias], [0], [The build system])dnl
1422_LT_DECL([], [build], [0])dnl
1423_LT_DECL([], [build_os], [0])dnl
1424dnl
1425AC_REQUIRE([AC_PROG_CC])dnl
1426AC_REQUIRE([LT_PATH_LD])dnl
1427AC_REQUIRE([LT_PATH_NM])dnl
1428dnl
1429AC_REQUIRE([AC_PROG_LN_S])dnl
1430test -z "$LN_S" && LN_S="ln -s"
1431_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
1432dnl
1433AC_REQUIRE([LT_CMD_MAX_LEN])dnl
1434_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
1435_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
1436dnl
1437m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1438m4_require([_LT_CHECK_SHELL_FEATURES])dnl
1439m4_require([_LT_CMD_RELOAD])dnl
1440m4_require([_LT_CHECK_MAGIC_METHOD])dnl
1441m4_require([_LT_CMD_OLD_ARCHIVE])dnl
1442m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
1443
1444_LT_CONFIG_LIBTOOL_INIT([
1445# See if we are running on zsh, and set the options which allow our
1446# commands through without removal of \ escapes INIT.
1447if test -n "\${ZSH_VERSION+set}" ; then
1448   setopt NO_GLOB_SUBST
1449fi
1450])
1451if test -n "${ZSH_VERSION+set}" ; then
1452   setopt NO_GLOB_SUBST
1453fi
1454
1455_LT_CHECK_OBJDIR
1456
1457m4_require([_LT_TAG_COMPILER])dnl
1458_LT_PROG_ECHO_BACKSLASH
1459
1460case $host_os in
1461aix3*)
1462  # AIX sometimes has problems with the GCC collect2 program.  For some
1463  # reason, if we set the COLLECT_NAMES environment variable, the problems
1464  # vanish in a puff of smoke.
1465  if test "X${COLLECT_NAMES+set}" != Xset; then
1466    COLLECT_NAMES=
1467    export COLLECT_NAMES
1468  fi
1469  ;;
1470esac
1471
1472# Sed substitution that helps us do robust quoting.  It backslashifies
1473# metacharacters that are still active within double-quoted strings.
1474sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
1475
1476# Same as above, but do not quote variable references.
1477double_quote_subst='s/\([["`\\]]\)/\\\1/g'
1478
1479# Sed substitution to delay expansion of an escaped shell variable in a
1480# double_quote_subst'ed string.
1481delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
1482
1483# Sed substitution to delay expansion of an escaped single quote.
1484delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
1485
1486# Sed substitution to avoid accidental globbing in evaled expressions
1487no_glob_subst='s/\*/\\\*/g'
1488
1489# Global variables:
1490ofile=libtool
1491can_build_shared=yes
1492
1493# All known linkers require a `.a' archive for static linking (except MSVC,
1494# which needs '.lib').
1495libext=a
1496
1497with_gnu_ld="$lt_cv_prog_gnu_ld"
1498
1499old_CC="$CC"
1500old_CFLAGS="$CFLAGS"
1501
1502# Set sane defaults for various variables
1503test -z "$CC" && CC=cc
1504test -z "$LTCC" && LTCC=$CC
1505test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
1506test -z "$LD" && LD=ld
1507test -z "$ac_objext" && ac_objext=o
1508
1509_LT_CC_BASENAME([$compiler])
1510
1511# Only perform the check for file, if the check method requires it
1512test -z "$MAGIC_CMD" && MAGIC_CMD=file
1513case $deplibs_check_method in
1514file_magic*)
1515  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
1516    _LT_PATH_MAGIC
1517  fi
1518  ;;
1519esac
1520
1521# Use C for the default configuration in the libtool script
1522LT_SUPPORTED_TAG([CC])
1523_LT_LANG_C_CONFIG
1524_LT_LANG_DEFAULT_CONFIG
1525_LT_CONFIG_COMMANDS
1526])# _LT_SETUP
1527
1528
1529# _LT_PROG_LTMAIN
1530# ---------------
1531# Note that this code is called both from `configure', and `config.status'
1532# now that we use AC_CONFIG_COMMANDS to generate libtool.  Notably,
1533# `config.status' has no value for ac_aux_dir unless we are using Automake,
1534# so we pass a copy along to make sure it has a sensible value anyway.
1535m4_defun([_LT_PROG_LTMAIN],
1536[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
1537_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
1538ltmain="$ac_aux_dir/ltmain.sh"
1539])# _LT_PROG_LTMAIN
1540
1541
1542
1543# So that we can recreate a full libtool script including additional
1544# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
1545# in macros and then make a single call at the end using the `libtool'
1546# label.
1547
1548
1549# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
1550# ----------------------------------------
1551# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
1552m4_define([_LT_CONFIG_LIBTOOL_INIT],
1553[m4_ifval([$1],
1554          [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
1555                     [$1
1556])])])
1557
1558# Initialize.
1559m4_define([_LT_OUTPUT_LIBTOOL_INIT])
1560
1561
1562# _LT_CONFIG_LIBTOOL([COMMANDS])
1563# ------------------------------
1564# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
1565m4_define([_LT_CONFIG_LIBTOOL],
1566[m4_ifval([$1],
1567          [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
1568                     [$1
1569])])])
1570
1571# Initialize.
1572m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
1573
1574
1575# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
1576# -----------------------------------------------------
1577m4_defun([_LT_CONFIG_SAVE_COMMANDS],
1578[_LT_CONFIG_LIBTOOL([$1])
1579_LT_CONFIG_LIBTOOL_INIT([$2])
1580])
1581
1582
1583# _LT_FORMAT_COMMENT([COMMENT])
1584# -----------------------------
1585# Add leading comment marks to the start of each line, and a trailing
1586# full-stop to the whole comment if one is not present already.
1587m4_define([_LT_FORMAT_COMMENT],
1588[m4_ifval([$1], [
1589m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
1590              [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
1591)])
1592
1593
1594
1595
1596
1597# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
1598# -------------------------------------------------------------------
1599# CONFIGNAME is the name given to the value in the libtool script.
1600# VARNAME is the (base) name used in the configure script.
1601# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
1602# VARNAME.  Any other value will be used directly.
1603m4_define([_LT_DECL],
1604[lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
1605    [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
1606	[m4_ifval([$1], [$1], [$2])])
1607    lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
1608    m4_ifval([$4],
1609	[lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
1610    lt_dict_add_subkey([lt_decl_dict], [$2],
1611	[tagged?], [m4_ifval([$5], [yes], [no])])])
1612])
1613
1614
1615# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
1616# --------------------------------------------------------
1617m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
1618
1619
1620# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
1621# ------------------------------------------------
1622m4_define([lt_decl_tag_varnames],
1623[_lt_decl_filter([tagged?], [yes], $@)])
1624
1625
1626# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
1627# ---------------------------------------------------------
1628m4_define([_lt_decl_filter],
1629[m4_case([$#],
1630  [0], [m4_fatal([$0: too few arguments: $#])],
1631  [1], [m4_fatal([$0: too few arguments: $#: $1])],
1632  [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
1633  [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
1634  [lt_dict_filter([lt_decl_dict], $@)])[]dnl
1635])
1636
1637
1638# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
1639# --------------------------------------------------
1640m4_define([lt_decl_quote_varnames],
1641[_lt_decl_filter([value], [1], $@)])
1642
1643
1644# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
1645# ---------------------------------------------------
1646m4_define([lt_decl_dquote_varnames],
1647[_lt_decl_filter([value], [2], $@)])
1648
1649
1650# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
1651# ---------------------------------------------------
1652m4_define([lt_decl_varnames_tagged],
1653[m4_assert([$# <= 2])dnl
1654_$0(m4_quote(m4_default([$1], [[, ]])),
1655    m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
1656    m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
1657m4_define([_lt_decl_varnames_tagged],
1658[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
1659
1660
1661# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
1662# ------------------------------------------------
1663m4_define([lt_decl_all_varnames],
1664[_$0(m4_quote(m4_default([$1], [[, ]])),
1665     m4_if([$2], [],
1666	   m4_quote(lt_decl_varnames),
1667	m4_quote(m4_shift($@))))[]dnl
1668])
1669m4_define([_lt_decl_all_varnames],
1670[lt_join($@, lt_decl_varnames_tagged([$1],
1671			lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
1672])
1673
1674
1675# _LT_CONFIG_STATUS_DECLARE([VARNAME])
1676# ------------------------------------
1677# Quote a variable value, and forward it to `config.status' so that its
1678# declaration there will have the same value as in `configure'.  VARNAME
1679# must have a single quote delimited value for this to work.
1680m4_define([_LT_CONFIG_STATUS_DECLARE],
1681[$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`'])
1682
1683
1684# _LT_CONFIG_STATUS_DECLARATIONS
1685# ------------------------------
1686# We delimit libtool config variables with single quotes, so when
1687# we write them to config.status, we have to be sure to quote all
1688# embedded single quotes properly.  In configure, this macro expands
1689# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
1690#
1691#    <var>='`$ECHO "X$<var>" | $Xsed -e "$delay_single_quote_subst"`'
1692m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
1693[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
1694    [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
1695
1696
1697# _LT_LIBTOOL_TAGS
1698# ----------------
1699# Output comment and list of tags supported by the script
1700m4_defun([_LT_LIBTOOL_TAGS],
1701[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
1702available_tags="_LT_TAGS"dnl
1703])
1704
1705
1706# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
1707# -----------------------------------
1708# Extract the dictionary values for VARNAME (optionally with TAG) and
1709# expand to a commented shell variable setting:
1710#
1711#    # Some comment about what VAR is for.
1712#    visible_name=$lt_internal_name
1713m4_define([_LT_LIBTOOL_DECLARE],
1714[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
1715					   [description])))[]dnl
1716m4_pushdef([_libtool_name],
1717    m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
1718m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
1719    [0], [_libtool_name=[$]$1],
1720    [1], [_libtool_name=$lt_[]$1],
1721    [2], [_libtool_name=$lt_[]$1],
1722    [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
1723m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
1724])
1725
1726
1727# _LT_LIBTOOL_CONFIG_VARS
1728# -----------------------
1729# Produce commented declarations of non-tagged libtool config variables
1730# suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
1731# script.  Tagged libtool config variables (even for the LIBTOOL CONFIG
1732# section) are produced by _LT_LIBTOOL_TAG_VARS.
1733m4_defun([_LT_LIBTOOL_CONFIG_VARS],
1734[m4_foreach([_lt_var],
1735    m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
1736    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
1737
1738
1739# _LT_LIBTOOL_TAG_VARS(TAG)
1740# -------------------------
1741m4_define([_LT_LIBTOOL_TAG_VARS],
1742[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
1743    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
1744
1745
1746# _LT_TAGVAR(VARNAME, [TAGNAME])
1747# ------------------------------
1748m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
1749
1750
1751# _LT_CONFIG_COMMANDS
1752# -------------------
1753# Send accumulated output to $CONFIG_STATUS.  Thanks to the lists of
1754# variables for single and double quote escaping we saved from calls
1755# to _LT_DECL, we can put quote escaped variables declarations
1756# into `config.status', and then the shell code to quote escape them in
1757# for loops in `config.status'.  Finally, any additional code accumulated
1758# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
1759m4_defun([_LT_CONFIG_COMMANDS],
1760[AC_PROVIDE_IFELSE([LT_OUTPUT],
1761	dnl If the libtool generation code has been placed in $CONFIG_LT,
1762	dnl instead of duplicating it all over again into config.status,
1763	dnl then we will have config.status run $CONFIG_LT later, so it
1764	dnl needs to know what name is stored there:
1765        [AC_CONFIG_COMMANDS([libtool],
1766            [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
1767    dnl If the libtool generation code is destined for config.status,
1768    dnl expand the accumulated commands and init code now:
1769    [AC_CONFIG_COMMANDS([libtool],
1770        [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
1771])#_LT_CONFIG_COMMANDS
1772
1773
1774# Initialize.
1775m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
1776[
1777
1778# The HP-UX ksh and POSIX shell print the target directory to stdout
1779# if CDPATH is set.
1780(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
1781
1782sed_quote_subst='$sed_quote_subst'
1783double_quote_subst='$double_quote_subst'
1784delay_variable_subst='$delay_variable_subst'
1785_LT_CONFIG_STATUS_DECLARATIONS
1786LTCC='$LTCC'
1787LTCFLAGS='$LTCFLAGS'
1788compiler='$compiler_DEFAULT'
1789
1790# Quote evaled strings.
1791for var in lt_decl_all_varnames([[ \
1792]], lt_decl_quote_varnames); do
1793    case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
1794    *[[\\\\\\\`\\"\\\$]]*)
1795      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
1796      ;;
1797    *)
1798      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
1799      ;;
1800    esac
1801done
1802
1803# Double-quote double-evaled strings.
1804for var in lt_decl_all_varnames([[ \
1805]], lt_decl_dquote_varnames); do
1806    case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
1807    *[[\\\\\\\`\\"\\\$]]*)
1808      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
1809      ;;
1810    *)
1811      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
1812      ;;
1813    esac
1814done
1815
1816# Fix-up fallback echo if it was mangled by the above quoting rules.
1817case \$lt_ECHO in
1818*'\\\[$]0 --fallback-echo"')dnl "
1819  lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\`
1820  ;;
1821esac
1822
1823_LT_OUTPUT_LIBTOOL_INIT
1824])
1825
1826
1827# LT_OUTPUT
1828# ---------
1829# This macro allows early generation of the libtool script (before
1830# AC_OUTPUT is called), incase it is used in configure for compilation
1831# tests.
1832AC_DEFUN([LT_OUTPUT],
1833[: ${CONFIG_LT=./config.lt}
1834AC_MSG_NOTICE([creating $CONFIG_LT])
1835cat >"$CONFIG_LT" <<_LTEOF
1836#! $SHELL
1837# Generated by $as_me.
1838# Run this file to recreate a libtool stub with the current configuration.
1839
1840lt_cl_silent=false
1841SHELL=\${CONFIG_SHELL-$SHELL}
1842_LTEOF
1843
1844cat >>"$CONFIG_LT" <<\_LTEOF
1845AS_SHELL_SANITIZE
1846_AS_PREPARE
1847
1848exec AS_MESSAGE_FD>&1
1849exec AS_MESSAGE_LOG_FD>>config.log
1850{
1851  echo
1852  AS_BOX([Running $as_me.])
1853} >&AS_MESSAGE_LOG_FD
1854
1855lt_cl_help="\
1856\`$as_me' creates a local libtool stub from the current configuration,
1857for use in further configure time tests before the real libtool is
1858generated.
1859
1860Usage: $[0] [[OPTIONS]]
1861
1862  -h, --help      print this help, then exit
1863  -V, --version   print version number, then exit
1864  -q, --quiet     do not print progress messages
1865  -d, --debug     don't remove temporary files
1866
1867Report bugs to <bug-libtool@gnu.org>."
1868
1869lt_cl_version="\
1870m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
1871m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
1872configured by $[0], generated by m4_PACKAGE_STRING.
1873
1874Copyright (C) 2008 Free Software Foundation, Inc.
1875This config.lt script is free software; the Free Software Foundation
1876gives unlimited permision to copy, distribute and modify it."
1877
1878while test $[#] != 0
1879do
1880  case $[1] in
1881    --version | --v* | -V )
1882      echo "$lt_cl_version"; exit 0 ;;
1883    --help | --h* | -h )
1884      echo "$lt_cl_help"; exit 0 ;;
1885    --debug | --d* | -d )
1886      debug=: ;;
1887    --quiet | --q* | --silent | --s* | -q )
1888      lt_cl_silent=: ;;
1889
1890    -*) AC_MSG_ERROR([unrecognized option: $[1]
1891Try \`$[0] --help' for more information.]) ;;
1892
1893    *) AC_MSG_ERROR([unrecognized argument: $[1]
1894Try \`$[0] --help' for more information.]) ;;
1895  esac
1896  shift
1897done
1898
1899if $lt_cl_silent; then
1900  exec AS_MESSAGE_FD>/dev/null
1901fi
1902_LTEOF
1903
1904cat >>"$CONFIG_LT" <<_LTEOF
1905_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
1906_LTEOF
1907
1908cat >>"$CONFIG_LT" <<\_LTEOF
1909AC_MSG_NOTICE([creating $ofile])
1910_LT_OUTPUT_LIBTOOL_COMMANDS
1911AS_EXIT(0)
1912_LTEOF
1913chmod +x "$CONFIG_LT"
1914
1915# configure is writing to config.log, but config.lt does its own redirection,
1916# appending to config.log, which fails on DOS, as config.log is still kept
1917# open by configure.  Here we exec the FD to /dev/null, effectively closing
1918# config.log, so it can be properly (re)opened and appended to by config.lt.
1919if test "$no_create" != yes; then
1920  lt_cl_success=:
1921  test "$silent" = yes &&
1922    lt_config_lt_args="$lt_config_lt_args --quiet"
1923  exec AS_MESSAGE_LOG_FD>/dev/null
1924  $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
1925  exec AS_MESSAGE_LOG_FD>>config.log
1926  $lt_cl_success || AS_EXIT(1)
1927fi
1928])# LT_OUTPUT
1929
1930
1931# _LT_CONFIG(TAG)
1932# ---------------
1933# If TAG is the built-in tag, create an initial libtool script with a
1934# default configuration from the untagged config vars.  Otherwise add code
1935# to config.status for appending the configuration named by TAG from the
1936# matching tagged config vars.
1937m4_defun([_LT_CONFIG],
1938[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1939_LT_CONFIG_SAVE_COMMANDS([
1940  m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
1941  m4_if(_LT_TAG, [C], [
1942    # See if we are running on zsh, and set the options which allow our
1943    # commands through without removal of \ escapes.
1944    if test -n "${ZSH_VERSION+set}" ; then
1945      setopt NO_GLOB_SUBST
1946    fi
1947
1948    cfgfile="${ofile}T"
1949    trap "$RM \"$cfgfile\"; exit 1" 1 2 15
1950    $RM "$cfgfile"
1951
1952    cat <<_LT_EOF >> "$cfgfile"
1953#! $SHELL
1954
1955# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
1956# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
1957# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
1958# NOTE: Changes made to this file will be lost: look at ltmain.sh.
1959#
1960_LT_COPYING
1961_LT_LIBTOOL_TAGS
1962
1963# ### BEGIN LIBTOOL CONFIG
1964_LT_LIBTOOL_CONFIG_VARS
1965_LT_LIBTOOL_TAG_VARS
1966# ### END LIBTOOL CONFIG
1967
1968_LT_EOF
1969
1970  case $host_os in
1971  aix3*)
1972    cat <<\_LT_EOF >> "$cfgfile"
1973# AIX sometimes has problems with the GCC collect2 program.  For some
1974# reason, if we set the COLLECT_NAMES environment variable, the problems
1975# vanish in a puff of smoke.
1976if test "X${COLLECT_NAMES+set}" != Xset; then
1977  COLLECT_NAMES=
1978  export COLLECT_NAMES
1979fi
1980_LT_EOF
1981    ;;
1982  esac
1983
1984  _LT_PROG_LTMAIN
1985
1986  # We use sed instead of cat because bash on DJGPP gets confused if
1987  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
1988  # text mode, it properly converts lines to CR/LF.  This bash problem
1989  # is reportedly fixed, but why not run on old versions too?
1990  sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
1991    || (rm -f "$cfgfile"; exit 1)
1992
1993  _LT_PROG_XSI_SHELLFNS
1994
1995  sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
1996    || (rm -f "$cfgfile"; exit 1)
1997
1998  mv -f "$cfgfile" "$ofile" ||
1999    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
2000  chmod +x "$ofile"
2001],
2002[cat <<_LT_EOF >> "$ofile"
2003
2004dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
2005dnl in a comment (ie after a #).
2006# ### BEGIN LIBTOOL TAG CONFIG: $1
2007_LT_LIBTOOL_TAG_VARS(_LT_TAG)
2008# ### END LIBTOOL TAG CONFIG: $1
2009_LT_EOF
2010])dnl /m4_if
2011],
2012[m4_if([$1], [], [
2013    PACKAGE='$PACKAGE'
2014    VERSION='$VERSION'
2015    TIMESTAMP='$TIMESTAMP'
2016    RM='$RM'
2017    ofile='$ofile'], [])
2018])dnl /_LT_CONFIG_SAVE_COMMANDS
2019])# _LT_CONFIG
2020
2021
2022# LT_SUPPORTED_TAG(TAG)
2023# ---------------------
2024# Trace this macro to discover what tags are supported by the libtool
2025# --tag option, using:
2026#    autoconf --trace 'LT_SUPPORTED_TAG:$1'
2027AC_DEFUN([LT_SUPPORTED_TAG], [])
2028
2029
2030# C support is built-in for now
2031m4_define([_LT_LANG_C_enabled], [])
2032m4_define([_LT_TAGS], [])
2033
2034
2035# LT_LANG(LANG)
2036# -------------
2037# Enable libtool support for the given language if not already enabled.
2038AC_DEFUN([LT_LANG],
2039[AC_BEFORE([$0], [LT_OUTPUT])dnl
2040m4_case([$1],
2041  [C],			[_LT_LANG(C)],
2042  [C++],		[_LT_LANG(CXX)],
2043  [Java],		[_LT_LANG(GCJ)],
2044  [Fortran 77],		[_LT_LANG(F77)],
2045  [Fortran],		[_LT_LANG(FC)],
2046  [Windows Resource],	[_LT_LANG(RC)],
2047  [m4_ifdef([_LT_LANG_]$1[_CONFIG],
2048    [_LT_LANG($1)],
2049    [m4_fatal([$0: unsupported language: "$1"])])])dnl
2050])# LT_LANG
2051
2052
2053# _LT_LANG(LANGNAME)
2054# ------------------
2055m4_defun([_LT_LANG],
2056[m4_ifdef([_LT_LANG_]$1[_enabled], [],
2057  [LT_SUPPORTED_TAG([$1])dnl
2058  m4_append([_LT_TAGS], [$1 ])dnl
2059  m4_define([_LT_LANG_]$1[_enabled], [])dnl
2060  _LT_LANG_$1_CONFIG($1)])dnl
2061])# _LT_LANG
2062
2063
2064# _LT_LANG_DEFAULT_CONFIG
2065# -----------------------
2066m4_defun([_LT_LANG_DEFAULT_CONFIG],
2067[AC_PROVIDE_IFELSE([AC_PROG_CXX],
2068  [LT_LANG(CXX)],
2069  [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
2070
2071AC_PROVIDE_IFELSE([AC_PROG_F77],
2072  [LT_LANG(F77)],
2073  [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
2074
2075AC_PROVIDE_IFELSE([AC_PROG_FC],
2076  [LT_LANG(FC)],
2077  [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
2078
2079dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
2080dnl pulling things in needlessly.
2081AC_PROVIDE_IFELSE([AC_PROG_GCJ],
2082  [LT_LANG(GCJ)],
2083  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
2084    [LT_LANG(GCJ)],
2085    [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
2086      [LT_LANG(GCJ)],
2087      [m4_ifdef([AC_PROG_GCJ],
2088	[m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
2089       m4_ifdef([A][M_PROG_GCJ],
2090	[m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
2091       m4_ifdef([LT_PROG_GCJ],
2092	[m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
2093
2094AC_PROVIDE_IFELSE([LT_PROG_RC],
2095  [LT_LANG(RC)],
2096  [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
2097])# _LT_LANG_DEFAULT_CONFIG
2098
2099# Obsolete macros:
2100AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
2101AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
2102AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
2103AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
2104dnl aclocal-1.4 backwards compatibility:
2105dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
2106dnl AC_DEFUN([AC_LIBTOOL_F77], [])
2107dnl AC_DEFUN([AC_LIBTOOL_FC], [])
2108dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
2109
2110
2111# _LT_TAG_COMPILER
2112# ----------------
2113m4_defun([_LT_TAG_COMPILER],
2114[AC_REQUIRE([AC_PROG_CC])dnl
2115
2116_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
2117_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
2118_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
2119_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
2120
2121# If no C compiler was specified, use CC.
2122LTCC=${LTCC-"$CC"}
2123
2124# If no C compiler flags were specified, use CFLAGS.
2125LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
2126
2127# Allow CC to be a program name with arguments.
2128compiler=$CC
2129])# _LT_TAG_COMPILER
2130
2131
2132# _LT_COMPILER_BOILERPLATE
2133# ------------------------
2134# Check for compiler boilerplate output or warnings with
2135# the simple compiler test code.
2136m4_defun([_LT_COMPILER_BOILERPLATE],
2137[m4_require([_LT_DECL_SED])dnl
2138ac_outfile=conftest.$ac_objext
2139echo "$lt_simple_compile_test_code" >conftest.$ac_ext
2140eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
2141_lt_compiler_boilerplate=`cat conftest.err`
2142$RM conftest*
2143])# _LT_COMPILER_BOILERPLATE
2144
2145
2146# _LT_LINKER_BOILERPLATE
2147# ----------------------
2148# Check for linker boilerplate output or warnings with
2149# the simple link test code.
2150m4_defun([_LT_LINKER_BOILERPLATE],
2151[m4_require([_LT_DECL_SED])dnl
2152ac_outfile=conftest.$ac_objext
2153echo "$lt_simple_link_test_code" >conftest.$ac_ext
2154eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
2155_lt_linker_boilerplate=`cat conftest.err`
2156$RM -r conftest*
2157])# _LT_LINKER_BOILERPLATE
2158
2159# _LT_REQUIRED_DARWIN_CHECKS
2160# -------------------------
2161m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
2162  case $host_os in
2163    rhapsody* | darwin*)
2164    AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
2165    AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
2166    AC_CHECK_TOOL([LIPO], [lipo], [:])
2167    AC_CHECK_TOOL([OTOOL], [otool], [:])
2168    AC_CHECK_TOOL([OTOOL64], [otool64], [:])
2169    _LT_DECL([], [DSYMUTIL], [1],
2170      [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
2171    _LT_DECL([], [NMEDIT], [1],
2172      [Tool to change global to local symbols on Mac OS X])
2173    _LT_DECL([], [LIPO], [1],
2174      [Tool to manipulate fat objects and archives on Mac OS X])
2175    _LT_DECL([], [OTOOL], [1],
2176      [ldd/readelf like tool for Mach-O binaries on Mac OS X])
2177    _LT_DECL([], [OTOOL64], [1],
2178      [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
2179
2180    AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
2181      [lt_cv_apple_cc_single_mod=no
2182      if test -z "${LT_MULTI_MODULE}"; then
2183	# By default we will add the -single_module flag. You can override
2184	# by either setting the environment variable LT_MULTI_MODULE
2185	# non-empty at configure time, or by adding -multi_module to the
2186	# link flags.
2187	rm -rf libconftest.dylib*
2188	echo "int foo(void){return 1;}" > conftest.c
2189	echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
2190-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
2191	$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
2192	  -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
2193        _lt_result=$?
2194	if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
2195	  lt_cv_apple_cc_single_mod=yes
2196	else
2197	  cat conftest.err >&AS_MESSAGE_LOG_FD
2198	fi
2199	rm -rf libconftest.dylib*
2200	rm -f conftest.*
2201      fi])
2202    AC_CACHE_CHECK([for -exported_symbols_list linker flag],
2203      [lt_cv_ld_exported_symbols_list],
2204      [lt_cv_ld_exported_symbols_list=no
2205      save_LDFLAGS=$LDFLAGS
2206      echo "_main" > conftest.sym
2207      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
2208      AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
2209	[lt_cv_ld_exported_symbols_list=yes],
2210	[lt_cv_ld_exported_symbols_list=no])
2211	LDFLAGS="$save_LDFLAGS"
2212    ])
2213    case $host_os in
2214    rhapsody* | darwin1.[[012]])
2215      _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
2216    darwin1.*)
2217      _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
2218    darwin*) # darwin 5.x on
2219      # if running on 10.5 or later, the deployment target defaults
2220      # to the OS version, if on x86, and 10.4, the deployment
2221      # target defaults to 10.4. Don't you love it?
2222      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
2223	10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
2224	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
2225	10.[[012]]*)
2226	  _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
2227	10.*)
2228	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
2229      esac
2230    ;;
2231  esac
2232    if test "$lt_cv_apple_cc_single_mod" = "yes"; then
2233      _lt_dar_single_mod='$single_module'
2234    fi
2235    if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
2236      _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
2237    else
2238      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
2239    fi
2240    if test "$DSYMUTIL" != ":"; then
2241      _lt_dsymutil='~$DSYMUTIL $lib || :'
2242    else
2243      _lt_dsymutil=
2244    fi
2245    ;;
2246  esac
2247])
2248
2249
2250# _LT_DARWIN_LINKER_FEATURES
2251# --------------------------
2252# Checks for linker and compiler features on darwin
2253m4_defun([_LT_DARWIN_LINKER_FEATURES],
2254[
2255  m4_require([_LT_REQUIRED_DARWIN_CHECKS])
2256  _LT_TAGVAR(archive_cmds_need_lc, $1)=no
2257  _LT_TAGVAR(hardcode_direct, $1)=no
2258  _LT_TAGVAR(hardcode_automatic, $1)=yes
2259  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
2260  _LT_TAGVAR(whole_archive_flag_spec, $1)=''
2261  _LT_TAGVAR(link_all_deplibs, $1)=yes
2262  _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
2263  case $cc_basename in
2264     ifort*) _lt_dar_can_shared=yes ;;
2265     *) _lt_dar_can_shared=$GCC ;;
2266  esac
2267  if test "$_lt_dar_can_shared" = "yes"; then
2268    output_verbose_link_cmd=echo
2269    _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
2270    _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
2271    _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
2272    _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
2273    m4_if([$1], [CXX],
2274[   if test "$lt_cv_apple_cc_single_mod" != "yes"; then
2275      _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}"
2276      _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}"
2277    fi
2278],[])
2279  else
2280  _LT_TAGVAR(ld_shlibs, $1)=no
2281  fi
2282])
2283
2284# _LT_SYS_MODULE_PATH_AIX
2285# -----------------------
2286# Links a minimal program and checks the executable
2287# for the system default hardcoded library path. In most cases,
2288# this is /usr/lib:/lib, but when the MPI compilers are used
2289# the location of the communication and MPI libs are included too.
2290# If we don't find anything, use the default library path according
2291# to the aix ld manual.
2292m4_defun([_LT_SYS_MODULE_PATH_AIX],
2293[m4_require([_LT_DECL_SED])dnl
2294AC_LINK_IFELSE(AC_LANG_PROGRAM,[
2295lt_aix_libpath_sed='
2296    /Import File Strings/,/^$/ {
2297	/^0/ {
2298	    s/^0  *\(.*\)$/\1/
2299	    p
2300	}
2301    }'
2302aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
2303# Check for a 64-bit object if we didn't find anything.
2304if test -z "$aix_libpath"; then
2305  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
2306fi],[])
2307if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
2308])# _LT_SYS_MODULE_PATH_AIX
2309
2310
2311# _LT_SHELL_INIT(ARG)
2312# -------------------
2313m4_define([_LT_SHELL_INIT],
2314[ifdef([AC_DIVERSION_NOTICE],
2315	     [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
2316	 [AC_DIVERT_PUSH(NOTICE)])
2317$1
2318AC_DIVERT_POP
2319])# _LT_SHELL_INIT
2320
2321
2322# _LT_PROG_ECHO_BACKSLASH
2323# -----------------------
2324# Add some code to the start of the generated configure script which
2325# will find an echo command which doesn't interpret backslashes.
2326m4_defun([_LT_PROG_ECHO_BACKSLASH],
2327[_LT_SHELL_INIT([
2328# Check that we are running under the correct shell.
2329SHELL=${CONFIG_SHELL-/bin/sh}
2330
2331case X$lt_ECHO in
2332X*--fallback-echo)
2333  # Remove one level of quotation (which was required for Make).
2334  ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
2335  ;;
2336esac
2337
2338ECHO=${lt_ECHO-echo}
2339if test "X[$]1" = X--no-reexec; then
2340  # Discard the --no-reexec flag, and continue.
2341  shift
2342elif test "X[$]1" = X--fallback-echo; then
2343  # Avoid inline document here, it may be left over
2344  :
2345elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then
2346  # Yippee, $ECHO works!
2347  :
2348else
2349  # Restart under the correct shell.
2350  exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
2351fi
2352
2353if test "X[$]1" = X--fallback-echo; then
2354  # used as fallback echo
2355  shift
2356  cat <<_LT_EOF
2357[$]*
2358_LT_EOF
2359  exit 0
2360fi
2361
2362# The HP-UX ksh and POSIX shell print the target directory to stdout
2363# if CDPATH is set.
2364(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
2365
2366if test -z "$lt_ECHO"; then
2367  if test "X${echo_test_string+set}" != Xset; then
2368    # find a string as large as possible, as long as the shell can cope with it
2369    for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
2370      # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
2371      if { echo_test_string=`eval $cmd`; } 2>/dev/null &&
2372	 { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null
2373      then
2374        break
2375      fi
2376    done
2377  fi
2378
2379  if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
2380     echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
2381     test "X$echo_testing_string" = "X$echo_test_string"; then
2382    :
2383  else
2384    # The Solaris, AIX, and Digital Unix default echo programs unquote
2385    # backslashes.  This makes it impossible to quote backslashes using
2386    #   echo "$something" | sed 's/\\/\\\\/g'
2387    #
2388    # So, first we look for a working echo in the user's PATH.
2389
2390    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2391    for dir in $PATH /usr/ucb; do
2392      IFS="$lt_save_ifs"
2393      if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
2394         test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
2395         echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
2396         test "X$echo_testing_string" = "X$echo_test_string"; then
2397        ECHO="$dir/echo"
2398        break
2399      fi
2400    done
2401    IFS="$lt_save_ifs"
2402
2403    if test "X$ECHO" = Xecho; then
2404      # We didn't find a better echo, so look for alternatives.
2405      if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' &&
2406         echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` &&
2407         test "X$echo_testing_string" = "X$echo_test_string"; then
2408        # This shell has a builtin print -r that does the trick.
2409        ECHO='print -r'
2410      elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } &&
2411	   test "X$CONFIG_SHELL" != X/bin/ksh; then
2412        # If we have ksh, try running configure again with it.
2413        ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
2414        export ORIGINAL_CONFIG_SHELL
2415        CONFIG_SHELL=/bin/ksh
2416        export CONFIG_SHELL
2417        exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
2418      else
2419        # Try using printf.
2420        ECHO='printf %s\n'
2421        if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
2422	   echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
2423	   test "X$echo_testing_string" = "X$echo_test_string"; then
2424	  # Cool, printf works
2425	  :
2426        elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
2427	     test "X$echo_testing_string" = 'X\t' &&
2428	     echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
2429	     test "X$echo_testing_string" = "X$echo_test_string"; then
2430	  CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
2431	  export CONFIG_SHELL
2432	  SHELL="$CONFIG_SHELL"
2433	  export SHELL
2434	  ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
2435        elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
2436	     test "X$echo_testing_string" = 'X\t' &&
2437	     echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
2438	     test "X$echo_testing_string" = "X$echo_test_string"; then
2439	  ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
2440        else
2441	  # maybe with a smaller string...
2442	  prev=:
2443
2444	  for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
2445	    if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null
2446	    then
2447	      break
2448	    fi
2449	    prev="$cmd"
2450	  done
2451
2452	  if test "$prev" != 'sed 50q "[$]0"'; then
2453	    echo_test_string=`eval $prev`
2454	    export echo_test_string
2455	    exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
2456	  else
2457	    # Oops.  We lost completely, so just stick with echo.
2458	    ECHO=echo
2459	  fi
2460        fi
2461      fi
2462    fi
2463  fi
2464fi
2465
2466# Copy echo and quote the copy suitably for passing to libtool from
2467# the Makefile, instead of quoting the original, which is used later.
2468lt_ECHO=$ECHO
2469if test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
2470   lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
2471fi
2472
2473AC_SUBST(lt_ECHO)
2474])
2475_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
2476_LT_DECL([], [ECHO], [1],
2477    [An echo program that does not interpret backslashes])
2478])# _LT_PROG_ECHO_BACKSLASH
2479
2480
2481# _LT_ENABLE_LOCK
2482# ---------------
2483m4_defun([_LT_ENABLE_LOCK],
2484[AC_ARG_ENABLE([libtool-lock],
2485  [AS_HELP_STRING([--disable-libtool-lock],
2486    [avoid locking (might break parallel builds)])])
2487test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
2488
2489# Some flags need to be propagated to the compiler or linker for good
2490# libtool support.
2491case $host in
2492ia64-*-hpux*)
2493  # Find out which ABI we are using.
2494  echo 'int i;' > conftest.$ac_ext
2495  if AC_TRY_EVAL(ac_compile); then
2496    case `/usr/bin/file conftest.$ac_objext` in
2497      *ELF-32*)
2498	HPUX_IA64_MODE="32"
2499	;;
2500      *ELF-64*)
2501	HPUX_IA64_MODE="64"
2502	;;
2503    esac
2504  fi
2505  rm -rf conftest*
2506  ;;
2507*-*-irix6*)
2508  # Find out which ABI we are using.
2509  echo '[#]line __oline__ "configure"' > conftest.$ac_ext
2510  if AC_TRY_EVAL(ac_compile); then
2511    if test "$lt_cv_prog_gnu_ld" = yes; then
2512      case `/usr/bin/file conftest.$ac_objext` in
2513	*32-bit*)
2514	  LD="${LD-ld} -melf32bsmip"
2515	  ;;
2516	*N32*)
2517	  LD="${LD-ld} -melf32bmipn32"
2518	  ;;
2519	*64-bit*)
2520	  LD="${LD-ld} -melf64bmip"
2521	;;
2522      esac
2523    else
2524      case `/usr/bin/file conftest.$ac_objext` in
2525	*32-bit*)
2526	  LD="${LD-ld} -32"
2527	  ;;
2528	*N32*)
2529	  LD="${LD-ld} -n32"
2530	  ;;
2531	*64-bit*)
2532	  LD="${LD-ld} -64"
2533	  ;;
2534      esac
2535    fi
2536  fi
2537  rm -rf conftest*
2538  ;;
2539
2540x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
2541s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
2542  # Find out which ABI we are using.
2543  echo 'int i;' > conftest.$ac_ext
2544  if AC_TRY_EVAL(ac_compile); then
2545    case `/usr/bin/file conftest.o` in
2546      *32-bit*)
2547	case $host in
2548	  x86_64-*kfreebsd*-gnu)
2549	    LD="${LD-ld} -m elf_i386_fbsd"
2550	    ;;
2551	  x86_64-*linux*)
2552	    LD="${LD-ld} -m elf_i386"
2553	    ;;
2554	  ppc64-*linux*|powerpc64-*linux*)
2555	    LD="${LD-ld} -m elf32ppclinux"
2556	    ;;
2557	  s390x-*linux*)
2558	    LD="${LD-ld} -m elf_s390"
2559	    ;;
2560	  sparc64-*linux*)
2561	    LD="${LD-ld} -m elf32_sparc"
2562	    ;;
2563	esac
2564	;;
2565      *64-bit*)
2566	case $host in
2567	  x86_64-*kfreebsd*-gnu)
2568	    LD="${LD-ld} -m elf_x86_64_fbsd"
2569	    ;;
2570	  x86_64-*linux*)
2571	    LD="${LD-ld} -m elf_x86_64"
2572	    ;;
2573	  ppc*-*linux*|powerpc*-*linux*)
2574	    LD="${LD-ld} -m elf64ppc"
2575	    ;;
2576	  s390*-*linux*|s390*-*tpf*)
2577	    LD="${LD-ld} -m elf64_s390"
2578	    ;;
2579	  sparc*-*linux*)
2580	    LD="${LD-ld} -m elf64_sparc"
2581	    ;;
2582	esac
2583	;;
2584    esac
2585  fi
2586  rm -rf conftest*
2587  ;;
2588
2589*-*-sco3.2v5*)
2590  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
2591  SAVE_CFLAGS="$CFLAGS"
2592  CFLAGS="$CFLAGS -belf"
2593  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
2594    [AC_LANG_PUSH(C)
2595     AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
2596     AC_LANG_POP])
2597  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
2598    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
2599    CFLAGS="$SAVE_CFLAGS"
2600  fi
2601  ;;
2602sparc*-*solaris*)
2603  # Find out which ABI we are using.
2604  echo 'int i;' > conftest.$ac_ext
2605  if AC_TRY_EVAL(ac_compile); then
2606    case `/usr/bin/file conftest.o` in
2607    *64-bit*)
2608      case $lt_cv_prog_gnu_ld in
2609      yes*) LD="${LD-ld} -m elf64_sparc" ;;
2610      *)
2611	if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
2612	  LD="${LD-ld} -64"
2613	fi
2614	;;
2615      esac
2616      ;;
2617    esac
2618  fi
2619  rm -rf conftest*
2620  ;;
2621esac
2622
2623need_locks="$enable_libtool_lock"
2624])# _LT_ENABLE_LOCK
2625
2626
2627# _LT_CMD_OLD_ARCHIVE
2628# -------------------
2629m4_defun([_LT_CMD_OLD_ARCHIVE],
2630[AC_CHECK_TOOL(AR, ar, false)
2631test -z "$AR" && AR=ar
2632test -z "$AR_FLAGS" && AR_FLAGS=cru
2633_LT_DECL([], [AR], [1], [The archiver])
2634_LT_DECL([], [AR_FLAGS], [1])
2635
2636AC_CHECK_TOOL(STRIP, strip, :)
2637test -z "$STRIP" && STRIP=:
2638_LT_DECL([], [STRIP], [1], [A symbol stripping program])
2639
2640AC_CHECK_TOOL(RANLIB, ranlib, :)
2641test -z "$RANLIB" && RANLIB=:
2642_LT_DECL([], [RANLIB], [1],
2643    [Commands used to install an old-style archive])
2644
2645# Determine commands to create old-style static archives.
2646old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
2647old_postinstall_cmds='chmod 644 $oldlib'
2648old_postuninstall_cmds=
2649
2650if test -n "$RANLIB"; then
2651  case $host_os in
2652  openbsd*)
2653    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
2654    ;;
2655  *)
2656    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
2657    ;;
2658  esac
2659  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
2660fi
2661_LT_DECL([], [old_postinstall_cmds], [2])
2662_LT_DECL([], [old_postuninstall_cmds], [2])
2663_LT_TAGDECL([], [old_archive_cmds], [2],
2664    [Commands used to build an old-style archive])
2665])# _LT_CMD_OLD_ARCHIVE
2666
2667
2668# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
2669#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
2670# ----------------------------------------------------------------
2671# Check whether the given compiler option works
2672AC_DEFUN([_LT_COMPILER_OPTION],
2673[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2674m4_require([_LT_DECL_SED])dnl
2675AC_CACHE_CHECK([$1], [$2],
2676  [$2=no
2677   m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
2678   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
2679   lt_compiler_flag="$3"
2680   # Insert the option either (1) after the last *FLAGS variable, or
2681   # (2) before a word containing "conftest.", or (3) at the end.
2682   # Note that $ac_compile itself does not contain backslashes and begins
2683   # with a dollar sign (not a hyphen), so the echo should work correctly.
2684   # The option is referenced via a variable to avoid confusing sed.
2685   lt_compile=`echo "$ac_compile" | $SED \
2686   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
2687   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
2688   -e 's:$: $lt_compiler_flag:'`
2689   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
2690   (eval "$lt_compile" 2>conftest.err)
2691   ac_status=$?
2692   cat conftest.err >&AS_MESSAGE_LOG_FD
2693   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
2694   if (exit $ac_status) && test -s "$ac_outfile"; then
2695     # The compiler can only warn and ignore the option if not recognized
2696     # So say no if there are warnings other than the usual output.
2697     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
2698     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
2699     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
2700       $2=yes
2701     fi
2702   fi
2703   $RM conftest*
2704])
2705
2706if test x"[$]$2" = xyes; then
2707    m4_if([$5], , :, [$5])
2708else
2709    m4_if([$6], , :, [$6])
2710fi
2711])# _LT_COMPILER_OPTION
2712
2713# Old name:
2714AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
2715dnl aclocal-1.4 backwards compatibility:
2716dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
2717
2718
2719# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
2720#                  [ACTION-SUCCESS], [ACTION-FAILURE])
2721# ----------------------------------------------------
2722# Check whether the given linker option works
2723AC_DEFUN([_LT_LINKER_OPTION],
2724[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2725m4_require([_LT_DECL_SED])dnl
2726AC_CACHE_CHECK([$1], [$2],
2727  [$2=no
2728   save_LDFLAGS="$LDFLAGS"
2729   LDFLAGS="$LDFLAGS $3"
2730   echo "$lt_simple_link_test_code" > conftest.$ac_ext
2731   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
2732     # The linker can only warn and ignore the option if not recognized
2733     # So say no if there are warnings
2734     if test -s conftest.err; then
2735       # Append any errors to the config.log.
2736       cat conftest.err 1>&AS_MESSAGE_LOG_FD
2737       $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
2738       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
2739       if diff conftest.exp conftest.er2 >/dev/null; then
2740         $2=yes
2741       fi
2742     else
2743       $2=yes
2744     fi
2745   fi
2746   $RM -r conftest*
2747   LDFLAGS="$save_LDFLAGS"
2748])
2749
2750if test x"[$]$2" = xyes; then
2751    m4_if([$4], , :, [$4])
2752else
2753    m4_if([$5], , :, [$5])
2754fi
2755])# _LT_LINKER_OPTION
2756
2757# Old name:
2758AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
2759dnl aclocal-1.4 backwards compatibility:
2760dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
2761
2762
2763# LT_CMD_MAX_LEN
2764#---------------
2765AC_DEFUN([LT_CMD_MAX_LEN],
2766[AC_REQUIRE([AC_CANONICAL_HOST])dnl
2767# find the maximum length of command line arguments
2768AC_MSG_CHECKING([the maximum length of command line arguments])
2769AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
2770  i=0
2771  teststring="ABCD"
2772
2773  case $build_os in
2774  msdosdjgpp*)
2775    # On DJGPP, this test can blow up pretty badly due to problems in libc
2776    # (any single argument exceeding 2000 bytes causes a buffer overrun
2777    # during glob expansion).  Even if it were fixed, the result of this
2778    # check would be larger than it should be.
2779    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
2780    ;;
2781
2782  gnu*)
2783    # Under GNU Hurd, this test is not required because there is
2784    # no limit to the length of command line arguments.
2785    # Libtool will interpret -1 as no limit whatsoever
2786    lt_cv_sys_max_cmd_len=-1;
2787    ;;
2788
2789  cygwin* | mingw* | cegcc*)
2790    # On Win9x/ME, this test blows up -- it succeeds, but takes
2791    # about 5 minutes as the teststring grows exponentially.
2792    # Worse, since 9x/ME are not pre-emptively multitasking,
2793    # you end up with a "frozen" computer, even though with patience
2794    # the test eventually succeeds (with a max line length of 256k).
2795    # Instead, let's just punt: use the minimum linelength reported by
2796    # all of the supported platforms: 8192 (on NT/2K/XP).
2797    lt_cv_sys_max_cmd_len=8192;
2798    ;;
2799
2800  amigaos*)
2801    # On AmigaOS with pdksh, this test takes hours, literally.
2802    # So we just punt and use a minimum line length of 8192.
2803    lt_cv_sys_max_cmd_len=8192;
2804    ;;
2805
2806  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
2807    # This has been around since 386BSD, at least.  Likely further.
2808    if test -x /sbin/sysctl; then
2809      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
2810    elif test -x /usr/sbin/sysctl; then
2811      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
2812    else
2813      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
2814    fi
2815    # And add a safety zone
2816    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
2817    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
2818    ;;
2819
2820  interix*)
2821    # We know the value 262144 and hardcode it with a safety zone (like BSD)
2822    lt_cv_sys_max_cmd_len=196608
2823    ;;
2824
2825  osf*)
2826    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
2827    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
2828    # nice to cause kernel panics so lets avoid the loop below.
2829    # First set a reasonable default.
2830    lt_cv_sys_max_cmd_len=16384
2831    #
2832    if test -x /sbin/sysconfig; then
2833      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
2834        *1*) lt_cv_sys_max_cmd_len=-1 ;;
2835      esac
2836    fi
2837    ;;
2838  sco3.2v5*)
2839    lt_cv_sys_max_cmd_len=102400
2840    ;;
2841  sysv5* | sco5v6* | sysv4.2uw2*)
2842    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
2843    if test -n "$kargmax"; then
2844      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[	 ]]//'`
2845    else
2846      lt_cv_sys_max_cmd_len=32768
2847    fi
2848    ;;
2849  *)
2850    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
2851    if test -n "$lt_cv_sys_max_cmd_len"; then
2852      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
2853      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
2854    else
2855      # Make teststring a little bigger before we do anything with it.
2856      # a 1K string should be a reasonable start.
2857      for i in 1 2 3 4 5 6 7 8 ; do
2858        teststring=$teststring$teststring
2859      done
2860      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
2861      # If test is not a shell built-in, we'll probably end up computing a
2862      # maximum length that is only half of the actual maximum length, but
2863      # we can't tell.
2864      while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
2865	         = "XX$teststring$teststring"; } >/dev/null 2>&1 &&
2866	      test $i != 17 # 1/2 MB should be enough
2867      do
2868        i=`expr $i + 1`
2869        teststring=$teststring$teststring
2870      done
2871      # Only check the string length outside the loop.
2872      lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
2873      teststring=
2874      # Add a significant safety factor because C++ compilers can tack on
2875      # massive amounts of additional arguments before passing them to the
2876      # linker.  It appears as though 1/2 is a usable value.
2877      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
2878    fi
2879    ;;
2880  esac
2881])
2882if test -n $lt_cv_sys_max_cmd_len ; then
2883  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
2884else
2885  AC_MSG_RESULT(none)
2886fi
2887max_cmd_len=$lt_cv_sys_max_cmd_len
2888_LT_DECL([], [max_cmd_len], [0],
2889    [What is the maximum length of a command?])
2890])# LT_CMD_MAX_LEN
2891
2892# Old name:
2893AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
2894dnl aclocal-1.4 backwards compatibility:
2895dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
2896
2897
2898# _LT_HEADER_DLFCN
2899# ----------------
2900m4_defun([_LT_HEADER_DLFCN],
2901[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
2902])# _LT_HEADER_DLFCN
2903
2904
2905# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
2906#                      ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
2907# ----------------------------------------------------------------
2908m4_defun([_LT_TRY_DLOPEN_SELF],
2909[m4_require([_LT_HEADER_DLFCN])dnl
2910if test "$cross_compiling" = yes; then :
2911  [$4]
2912else
2913  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
2914  lt_status=$lt_dlunknown
2915  cat > conftest.$ac_ext <<_LT_EOF
2916[#line __oline__ "configure"
2917#include "confdefs.h"
2918
2919#if HAVE_DLFCN_H
2920#include <dlfcn.h>
2921#endif
2922
2923#include <stdio.h>
2924
2925#ifdef RTLD_GLOBAL
2926#  define LT_DLGLOBAL		RTLD_GLOBAL
2927#else
2928#  ifdef DL_GLOBAL
2929#    define LT_DLGLOBAL		DL_GLOBAL
2930#  else
2931#    define LT_DLGLOBAL		0
2932#  endif
2933#endif
2934
2935/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
2936   find out it does not work in some platform. */
2937#ifndef LT_DLLAZY_OR_NOW
2938#  ifdef RTLD_LAZY
2939#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
2940#  else
2941#    ifdef DL_LAZY
2942#      define LT_DLLAZY_OR_NOW		DL_LAZY
2943#    else
2944#      ifdef RTLD_NOW
2945#        define LT_DLLAZY_OR_NOW	RTLD_NOW
2946#      else
2947#        ifdef DL_NOW
2948#          define LT_DLLAZY_OR_NOW	DL_NOW
2949#        else
2950#          define LT_DLLAZY_OR_NOW	0
2951#        endif
2952#      endif
2953#    endif
2954#  endif
2955#endif
2956
2957void fnord() { int i=42;}
2958int main ()
2959{
2960  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
2961  int status = $lt_dlunknown;
2962
2963  if (self)
2964    {
2965      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
2966      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
2967      /* dlclose (self); */
2968    }
2969  else
2970    puts (dlerror ());
2971
2972  return status;
2973}]
2974_LT_EOF
2975  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
2976    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
2977    lt_status=$?
2978    case x$lt_status in
2979      x$lt_dlno_uscore) $1 ;;
2980      x$lt_dlneed_uscore) $2 ;;
2981      x$lt_dlunknown|x*) $3 ;;
2982    esac
2983  else :
2984    # compilation failed
2985    $3
2986  fi
2987fi
2988rm -fr conftest*
2989])# _LT_TRY_DLOPEN_SELF
2990
2991
2992# LT_SYS_DLOPEN_SELF
2993# ------------------
2994AC_DEFUN([LT_SYS_DLOPEN_SELF],
2995[m4_require([_LT_HEADER_DLFCN])dnl
2996if test "x$enable_dlopen" != xyes; then
2997  enable_dlopen=unknown
2998  enable_dlopen_self=unknown
2999  enable_dlopen_self_static=unknown
3000else
3001  lt_cv_dlopen=no
3002  lt_cv_dlopen_libs=
3003
3004  case $host_os in
3005  beos*)
3006    lt_cv_dlopen="load_add_on"
3007    lt_cv_dlopen_libs=
3008    lt_cv_dlopen_self=yes
3009    ;;
3010
3011  mingw* | pw32* | cegcc*)
3012    lt_cv_dlopen="LoadLibrary"
3013    lt_cv_dlopen_libs=
3014    ;;
3015
3016  cygwin*)
3017    lt_cv_dlopen="dlopen"
3018    lt_cv_dlopen_libs=
3019    ;;
3020
3021  darwin*)
3022  # if libdl is installed we need to link against it
3023    AC_CHECK_LIB([dl], [dlopen],
3024		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
3025    lt_cv_dlopen="dyld"
3026    lt_cv_dlopen_libs=
3027    lt_cv_dlopen_self=yes
3028    ])
3029    ;;
3030
3031  *)
3032    AC_CHECK_FUNC([shl_load],
3033	  [lt_cv_dlopen="shl_load"],
3034      [AC_CHECK_LIB([dld], [shl_load],
3035	    [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
3036	[AC_CHECK_FUNC([dlopen],
3037	      [lt_cv_dlopen="dlopen"],
3038	  [AC_CHECK_LIB([dl], [dlopen],
3039		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
3040	    [AC_CHECK_LIB([svld], [dlopen],
3041		  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
3042	      [AC_CHECK_LIB([dld], [dld_link],
3043		    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
3044	      ])
3045	    ])
3046	  ])
3047	])
3048      ])
3049    ;;
3050  esac
3051
3052  if test "x$lt_cv_dlopen" != xno; then
3053    enable_dlopen=yes
3054  else
3055    enable_dlopen=no
3056  fi
3057
3058  case $lt_cv_dlopen in
3059  dlopen)
3060    save_CPPFLAGS="$CPPFLAGS"
3061    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
3062
3063    save_LDFLAGS="$LDFLAGS"
3064    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
3065
3066    save_LIBS="$LIBS"
3067    LIBS="$lt_cv_dlopen_libs $LIBS"
3068
3069    AC_CACHE_CHECK([whether a program can dlopen itself],
3070	  lt_cv_dlopen_self, [dnl
3071	  _LT_TRY_DLOPEN_SELF(
3072	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
3073	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
3074    ])
3075
3076    if test "x$lt_cv_dlopen_self" = xyes; then
3077      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
3078      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
3079	  lt_cv_dlopen_self_static, [dnl
3080	  _LT_TRY_DLOPEN_SELF(
3081	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
3082	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
3083      ])
3084    fi
3085
3086    CPPFLAGS="$save_CPPFLAGS"
3087    LDFLAGS="$save_LDFLAGS"
3088    LIBS="$save_LIBS"
3089    ;;
3090  esac
3091
3092  case $lt_cv_dlopen_self in
3093  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
3094  *) enable_dlopen_self=unknown ;;
3095  esac
3096
3097  case $lt_cv_dlopen_self_static in
3098  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
3099  *) enable_dlopen_self_static=unknown ;;
3100  esac
3101fi
3102_LT_DECL([dlopen_support], [enable_dlopen], [0],
3103	 [Whether dlopen is supported])
3104_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
3105	 [Whether dlopen of programs is supported])
3106_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
3107	 [Whether dlopen of statically linked programs is supported])
3108])# LT_SYS_DLOPEN_SELF
3109
3110# Old name:
3111AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
3112dnl aclocal-1.4 backwards compatibility:
3113dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
3114
3115
3116# _LT_COMPILER_C_O([TAGNAME])
3117# ---------------------------
3118# Check to see if options -c and -o are simultaneously supported by compiler.
3119# This macro does not hard code the compiler like AC_PROG_CC_C_O.
3120m4_defun([_LT_COMPILER_C_O],
3121[m4_require([_LT_DECL_SED])dnl
3122m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3123m4_require([_LT_TAG_COMPILER])dnl
3124AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
3125  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
3126  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
3127   $RM -r conftest 2>/dev/null
3128   mkdir conftest
3129   cd conftest
3130   mkdir out
3131   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
3132
3133   lt_compiler_flag="-o out/conftest2.$ac_objext"
3134   # Insert the option either (1) after the last *FLAGS variable, or
3135   # (2) before a word containing "conftest.", or (3) at the end.
3136   # Note that $ac_compile itself does not contain backslashes and begins
3137   # with a dollar sign (not a hyphen), so the echo should work correctly.
3138   lt_compile=`echo "$ac_compile" | $SED \
3139   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
3140   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
3141   -e 's:$: $lt_compiler_flag:'`
3142   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
3143   (eval "$lt_compile" 2>out/conftest.err)
3144   ac_status=$?
3145   cat out/conftest.err >&AS_MESSAGE_LOG_FD
3146   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
3147   if (exit $ac_status) && test -s out/conftest2.$ac_objext
3148   then
3149     # The compiler can only warn and ignore the option if not recognized
3150     # So say no if there are warnings
3151     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
3152     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
3153     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
3154       _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
3155     fi
3156   fi
3157   chmod u+w . 2>&AS_MESSAGE_LOG_FD
3158   $RM conftest*
3159   # SGI C++ compiler will create directory out/ii_files/ for
3160   # template instantiation
3161   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
3162   $RM out/* && rmdir out
3163   cd ..
3164   $RM -r conftest
3165   $RM conftest*
3166])
3167_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
3168	[Does compiler simultaneously support -c and -o options?])
3169])# _LT_COMPILER_C_O
3170
3171
3172# _LT_COMPILER_FILE_LOCKS([TAGNAME])
3173# ----------------------------------
3174# Check to see if we can do hard links to lock some files if needed
3175m4_defun([_LT_COMPILER_FILE_LOCKS],
3176[m4_require([_LT_ENABLE_LOCK])dnl
3177m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3178_LT_COMPILER_C_O([$1])
3179
3180hard_links="nottested"
3181if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
3182  # do not overwrite the value of need_locks provided by the user
3183  AC_MSG_CHECKING([if we can lock with hard links])
3184  hard_links=yes
3185  $RM conftest*
3186  ln conftest.a conftest.b 2>/dev/null && hard_links=no
3187  touch conftest.a
3188  ln conftest.a conftest.b 2>&5 || hard_links=no
3189  ln conftest.a conftest.b 2>/dev/null && hard_links=no
3190  AC_MSG_RESULT([$hard_links])
3191  if test "$hard_links" = no; then
3192    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
3193    need_locks=warn
3194  fi
3195else
3196  need_locks=no
3197fi
3198_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
3199])# _LT_COMPILER_FILE_LOCKS
3200
3201
3202# _LT_CHECK_OBJDIR
3203# ----------------
3204m4_defun([_LT_CHECK_OBJDIR],
3205[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
3206[rm -f .libs 2>/dev/null
3207mkdir .libs 2>/dev/null
3208if test -d .libs; then
3209  lt_cv_objdir=.libs
3210else
3211  # MS-DOS does not allow filenames that begin with a dot.
3212  lt_cv_objdir=_libs
3213fi
3214rmdir .libs 2>/dev/null])
3215objdir=$lt_cv_objdir
3216_LT_DECL([], [objdir], [0],
3217         [The name of the directory that contains temporary libtool files])dnl
3218m4_pattern_allow([LT_OBJDIR])dnl
3219AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
3220  [Define to the sub-directory in which libtool stores uninstalled libraries.])
3221])# _LT_CHECK_OBJDIR
3222
3223
3224# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
3225# --------------------------------------
3226# Check hardcoding attributes.
3227m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
3228[AC_MSG_CHECKING([how to hardcode library paths into programs])
3229_LT_TAGVAR(hardcode_action, $1)=
3230if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
3231   test -n "$_LT_TAGVAR(runpath_var, $1)" ||
3232   test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
3233
3234  # We can hardcode non-existent directories.
3235  if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
3236     # If the only mechanism to avoid hardcoding is shlibpath_var, we
3237     # have to relink, otherwise we might link with an installed library
3238     # when we should be linking with a yet-to-be-installed one
3239     ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
3240     test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
3241    # Linking always hardcodes the temporary library directory.
3242    _LT_TAGVAR(hardcode_action, $1)=relink
3243  else
3244    # We can link without hardcoding, and we can hardcode nonexisting dirs.
3245    _LT_TAGVAR(hardcode_action, $1)=immediate
3246  fi
3247else
3248  # We cannot hardcode anything, or else we can only hardcode existing
3249  # directories.
3250  _LT_TAGVAR(hardcode_action, $1)=unsupported
3251fi
3252AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
3253
3254if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
3255   test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
3256  # Fast installation is not supported
3257  enable_fast_install=no
3258elif test "$shlibpath_overrides_runpath" = yes ||
3259     test "$enable_shared" = no; then
3260  # Fast installation is not necessary
3261  enable_fast_install=needless
3262fi
3263_LT_TAGDECL([], [hardcode_action], [0],
3264    [How to hardcode a shared library path into an executable])
3265])# _LT_LINKER_HARDCODE_LIBPATH
3266
3267
3268# _LT_CMD_STRIPLIB
3269# ----------------
3270m4_defun([_LT_CMD_STRIPLIB],
3271[m4_require([_LT_DECL_EGREP])
3272striplib=
3273old_striplib=
3274AC_MSG_CHECKING([whether stripping libraries is possible])
3275if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
3276  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
3277  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
3278  AC_MSG_RESULT([yes])
3279else
3280# FIXME - insert some real tests, host_os isn't really good enough
3281  case $host_os in
3282  darwin*)
3283    if test -n "$STRIP" ; then
3284      striplib="$STRIP -x"
3285      old_striplib="$STRIP -S"
3286      AC_MSG_RESULT([yes])
3287    else
3288      AC_MSG_RESULT([no])
3289    fi
3290    ;;
3291  *)
3292    AC_MSG_RESULT([no])
3293    ;;
3294  esac
3295fi
3296_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
3297_LT_DECL([], [striplib], [1])
3298])# _LT_CMD_STRIPLIB
3299
3300
3301# _LT_SYS_DYNAMIC_LINKER([TAG])
3302# -----------------------------
3303# PORTME Fill in your ld.so characteristics
3304m4_defun([_LT_SYS_DYNAMIC_LINKER],
3305[AC_REQUIRE([AC_CANONICAL_HOST])dnl
3306m4_require([_LT_DECL_EGREP])dnl
3307m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3308m4_require([_LT_DECL_OBJDUMP])dnl
3309m4_require([_LT_DECL_SED])dnl
3310AC_MSG_CHECKING([dynamic linker characteristics])
3311m4_if([$1],
3312	[], [
3313if test "$GCC" = yes; then
3314  case $host_os in
3315    darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
3316    *) lt_awk_arg="/^libraries:/" ;;
3317  esac
3318  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
3319  if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then
3320    # if the path contains ";" then we assume it to be the separator
3321    # otherwise default to the standard path separator (i.e. ":") - it is
3322    # assumed that no part of a normal pathname contains ";" but that should
3323    # okay in the real world where ";" in dirpaths is itself problematic.
3324    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'`
3325  else
3326    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
3327  fi
3328  # Ok, now we have the path, separated by spaces, we can step through it
3329  # and add multilib dir if necessary.
3330  lt_tmp_lt_search_path_spec=
3331  lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
3332  for lt_sys_path in $lt_search_path_spec; do
3333    if test -d "$lt_sys_path/$lt_multi_os_dir"; then
3334      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
3335    else
3336      test -d "$lt_sys_path" && \
3337	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
3338    fi
3339  done
3340  lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk '
3341BEGIN {RS=" "; FS="/|\n";} {
3342  lt_foo="";
3343  lt_count=0;
3344  for (lt_i = NF; lt_i > 0; lt_i--) {
3345    if ($lt_i != "" && $lt_i != ".") {
3346      if ($lt_i == "..") {
3347        lt_count++;
3348      } else {
3349        if (lt_count == 0) {
3350          lt_foo="/" $lt_i lt_foo;
3351        } else {
3352          lt_count--;
3353        }
3354      }
3355    }
3356  }
3357  if (lt_foo != "") { lt_freq[[lt_foo]]++; }
3358  if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
3359}'`
3360  sys_lib_search_path_spec=`$ECHO $lt_search_path_spec`
3361else
3362  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
3363fi])
3364library_names_spec=
3365libname_spec='lib$name'
3366soname_spec=
3367shrext_cmds=".so"
3368postinstall_cmds=
3369postuninstall_cmds=
3370finish_cmds=
3371finish_eval=
3372shlibpath_var=
3373shlibpath_overrides_runpath=unknown
3374version_type=none
3375dynamic_linker="$host_os ld.so"
3376sys_lib_dlsearch_path_spec="/lib /usr/lib"
3377need_lib_prefix=unknown
3378hardcode_into_libs=no
3379
3380# when you set need_version to no, make sure it does not cause -set_version
3381# flags to be left without arguments
3382need_version=unknown
3383
3384case $host_os in
3385aix3*)
3386  version_type=linux
3387  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
3388  shlibpath_var=LIBPATH
3389
3390  # AIX 3 has no versioning support, so we append a major version to the name.
3391  soname_spec='${libname}${release}${shared_ext}$major'
3392  ;;
3393
3394aix[[4-9]]*)
3395  version_type=linux
3396  need_lib_prefix=no
3397  need_version=no
3398  hardcode_into_libs=yes
3399  if test "$host_cpu" = ia64; then
3400    # AIX 5 supports IA64
3401    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
3402    shlibpath_var=LD_LIBRARY_PATH
3403  else
3404    # With GCC up to 2.95.x, collect2 would create an import file
3405    # for dependence libraries.  The import file would start with
3406    # the line `#! .'.  This would cause the generated library to
3407    # depend on `.', always an invalid library.  This was fixed in
3408    # development snapshots of GCC prior to 3.0.
3409    case $host_os in
3410      aix4 | aix4.[[01]] | aix4.[[01]].*)
3411      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
3412	   echo ' yes '
3413	   echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
3414	:
3415      else
3416	can_build_shared=no
3417      fi
3418      ;;
3419    esac
3420    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
3421    # soname into executable. Probably we can add versioning support to
3422    # collect2, so additional links can be useful in future.
3423    if test "$aix_use_runtimelinking" = yes; then
3424      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
3425      # instead of lib<name>.a to let people know that these are not
3426      # typical AIX shared libraries.
3427      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3428    else
3429      # We preserve .a as extension for shared libraries through AIX4.2
3430      # and later when we are not doing run time linking.
3431      library_names_spec='${libname}${release}.a $libname.a'
3432      soname_spec='${libname}${release}${shared_ext}$major'
3433    fi
3434    shlibpath_var=LIBPATH
3435  fi
3436  ;;
3437
3438amigaos*)
3439  case $host_cpu in
3440  powerpc)
3441    # Since July 2007 AmigaOS4 officially supports .so libraries.
3442    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
3443    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3444    ;;
3445  m68k)
3446    library_names_spec='$libname.ixlibrary $libname.a'
3447    # Create ${libname}_ixlibrary.a entries in /sys/libs.
3448    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'
3449    ;;
3450  esac
3451  ;;
3452
3453beos*)
3454  library_names_spec='${libname}${shared_ext}'
3455  dynamic_linker="$host_os ld.so"
3456  shlibpath_var=LIBRARY_PATH
3457  ;;
3458
3459bsdi[[45]]*)
3460  version_type=linux
3461  need_version=no
3462  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3463  soname_spec='${libname}${release}${shared_ext}$major'
3464  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
3465  shlibpath_var=LD_LIBRARY_PATH
3466  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
3467  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
3468  # the default ld.so.conf also contains /usr/contrib/lib and
3469  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
3470  # libtool to hard-code these into programs
3471  ;;
3472
3473cygwin* | mingw* | pw32* | cegcc*)
3474  version_type=windows
3475  shrext_cmds=".dll"
3476  need_version=no
3477  need_lib_prefix=no
3478
3479  case $GCC,$host_os in
3480  yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
3481    library_names_spec='$libname.dll.a'
3482    # DLL is installed to $(libdir)/../bin by postinstall_cmds
3483    postinstall_cmds='base_file=`basename \${file}`~
3484      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
3485      dldir=$destdir/`dirname \$dlpath`~
3486      test -d \$dldir || mkdir -p \$dldir~
3487      $install_prog $dir/$dlname \$dldir/$dlname~
3488      chmod a+x \$dldir/$dlname~
3489      if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
3490        eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
3491      fi'
3492    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
3493      dlpath=$dir/\$dldll~
3494       $RM \$dlpath'
3495    shlibpath_overrides_runpath=yes
3496
3497    case $host_os in
3498    cygwin*)
3499      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
3500      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3501      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
3502      ;;
3503    mingw* | cegcc*)
3504      # MinGW DLLs use traditional 'lib' prefix
3505      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3506      sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
3507      if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
3508        # It is most probably a Windows format PATH printed by
3509        # mingw gcc, but we are running on Cygwin. Gcc prints its search
3510        # path with ; separators, and with drive letters. We can handle the
3511        # drive letters (cygwin fileutils understands them), so leave them,
3512        # especially as we might pass files found there to a mingw objdump,
3513        # which wouldn't understand a cygwinified path. Ahh.
3514        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
3515      else
3516        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
3517      fi
3518      ;;
3519    pw32*)
3520      # pw32 DLLs use 'pw' prefix rather than 'lib'
3521      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3522      ;;
3523    esac
3524    ;;
3525
3526  *)
3527    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
3528    ;;
3529  esac
3530  dynamic_linker='Win32 ld.exe'
3531  # FIXME: first we should search . and the directory the executable is in
3532  shlibpath_var=PATH
3533  ;;
3534
3535darwin* | rhapsody*)
3536  dynamic_linker="$host_os dyld"
3537  version_type=darwin
3538  need_lib_prefix=no
3539  need_version=no
3540  library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
3541  soname_spec='${libname}${release}${major}$shared_ext'
3542  shlibpath_overrides_runpath=yes
3543  shlibpath_var=DYLD_LIBRARY_PATH
3544  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
3545m4_if([$1], [],[
3546  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
3547  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
3548  ;;
3549
3550dgux*)
3551  version_type=linux
3552  need_lib_prefix=no
3553  need_version=no
3554  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
3555  soname_spec='${libname}${release}${shared_ext}$major'
3556  shlibpath_var=LD_LIBRARY_PATH
3557  ;;
3558
3559freebsd1*)
3560  dynamic_linker=no
3561  ;;
3562
3563freebsd* | dragonfly*)
3564  # DragonFly does not have aout.  When/if they implement a new
3565  # versioning mechanism, adjust this.
3566  if test -x /usr/bin/objformat; then
3567    objformat=`/usr/bin/objformat`
3568  else
3569    case $host_os in
3570    freebsd[[123]]*) objformat=aout ;;
3571    *) objformat=elf ;;
3572    esac
3573  fi
3574  version_type=freebsd-$objformat
3575  case $version_type in
3576    freebsd-elf*)
3577      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
3578      need_version=no
3579      need_lib_prefix=no
3580      ;;
3581    freebsd-*)
3582      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
3583      need_version=yes
3584      ;;
3585  esac
3586  shlibpath_var=LD_LIBRARY_PATH
3587  case $host_os in
3588  freebsd2*)
3589    shlibpath_overrides_runpath=yes
3590    ;;
3591  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
3592    shlibpath_overrides_runpath=yes
3593    hardcode_into_libs=yes
3594    ;;
3595  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
3596  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
3597    shlibpath_overrides_runpath=no
3598    hardcode_into_libs=yes
3599    ;;
3600  *) # from 4.6 on, and DragonFly
3601    shlibpath_overrides_runpath=yes
3602    hardcode_into_libs=yes
3603    ;;
3604  esac
3605  ;;
3606
3607gnu*)
3608  version_type=linux
3609  need_lib_prefix=no
3610  need_version=no
3611  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
3612  soname_spec='${libname}${release}${shared_ext}$major'
3613  shlibpath_var=LD_LIBRARY_PATH
3614  hardcode_into_libs=yes
3615  ;;
3616
3617hpux9* | hpux10* | hpux11*)
3618  # Give a soname corresponding to the major version so that dld.sl refuses to
3619  # link against other versions.
3620  version_type=sunos
3621  need_lib_prefix=no
3622  need_version=no
3623  case $host_cpu in
3624  ia64*)
3625    shrext_cmds='.so'
3626    hardcode_into_libs=yes
3627    dynamic_linker="$host_os dld.so"
3628    shlibpath_var=LD_LIBRARY_PATH
3629    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
3630    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3631    soname_spec='${libname}${release}${shared_ext}$major'
3632    if test "X$HPUX_IA64_MODE" = X32; then
3633      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
3634    else
3635      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
3636    fi
3637    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
3638    ;;
3639  hppa*64*)
3640    shrext_cmds='.sl'
3641    hardcode_into_libs=yes
3642    dynamic_linker="$host_os dld.sl"
3643    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
3644    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
3645    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3646    soname_spec='${libname}${release}${shared_ext}$major'
3647    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
3648    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
3649    ;;
3650  *)
3651    shrext_cmds='.sl'
3652    dynamic_linker="$host_os dld.sl"
3653    shlibpath_var=SHLIB_PATH
3654    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
3655    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3656    soname_spec='${libname}${release}${shared_ext}$major'
3657    ;;
3658  esac
3659  # HP-UX runs *really* slowly unless shared libraries are mode 555.
3660  postinstall_cmds='chmod 555 $lib'
3661  ;;
3662
3663interix[[3-9]]*)
3664  version_type=linux
3665  need_lib_prefix=no
3666  need_version=no
3667  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
3668  soname_spec='${libname}${release}${shared_ext}$major'
3669  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
3670  shlibpath_var=LD_LIBRARY_PATH
3671  shlibpath_overrides_runpath=no
3672  hardcode_into_libs=yes
3673  ;;
3674
3675irix5* | irix6* | nonstopux*)
3676  case $host_os in
3677    nonstopux*) version_type=nonstopux ;;
3678    *)
3679	if test "$lt_cv_prog_gnu_ld" = yes; then
3680		version_type=linux
3681	else
3682		version_type=irix
3683	fi ;;
3684  esac
3685  need_lib_prefix=no
3686  need_version=no
3687  soname_spec='${libname}${release}${shared_ext}$major'
3688  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
3689  case $host_os in
3690  irix5* | nonstopux*)
3691    libsuff= shlibsuff=
3692    ;;
3693  *)
3694    case $LD in # libtool.m4 will add one of these switches to LD
3695    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
3696      libsuff= shlibsuff= libmagic=32-bit;;
3697    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
3698      libsuff=32 shlibsuff=N32 libmagic=N32;;
3699    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
3700      libsuff=64 shlibsuff=64 libmagic=64-bit;;
3701    *) libsuff= shlibsuff= libmagic=never-match;;
3702    esac
3703    ;;
3704  esac
3705  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
3706  shlibpath_overrides_runpath=no
3707  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
3708  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
3709  hardcode_into_libs=yes
3710  ;;
3711
3712# No shared lib support for Linux oldld, aout, or coff.
3713linux*oldld* | linux*aout* | linux*coff*)
3714  dynamic_linker=no
3715  ;;
3716
3717# This must be Linux ELF.
3718linux* | k*bsd*-gnu)
3719  version_type=linux
3720  need_lib_prefix=no
3721  need_version=no
3722  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3723  soname_spec='${libname}${release}${shared_ext}$major'
3724  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
3725  shlibpath_var=LD_LIBRARY_PATH
3726  shlibpath_overrides_runpath=no
3727  # Some binutils ld are patched to set DT_RUNPATH
3728  save_LDFLAGS=$LDFLAGS
3729  save_libdir=$libdir
3730  eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
3731       LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
3732  AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
3733    [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
3734       [shlibpath_overrides_runpath=yes])])
3735  LDFLAGS=$save_LDFLAGS
3736  libdir=$save_libdir
3737
3738  # This implies no fast_install, which is unacceptable.
3739  # Some rework will be needed to allow for fast_install
3740  # before this can be enabled.
3741  hardcode_into_libs=yes
3742
3743  # Add ABI-specific directories to the system library path.
3744  sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib"
3745
3746  # Append ld.so.conf contents to the search path
3747  if test -f /etc/ld.so.conf; then
3748    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[	 ]*hwcap[	 ]/d;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
3749    sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
3750  fi
3751
3752  # We used to test for /lib/ld.so.1 and disable shared libraries on
3753  # powerpc, because MkLinux only supported shared libraries with the
3754  # GNU dynamic linker.  Since this was broken with cross compilers,
3755  # most powerpc-linux boxes support dynamic linking these days and
3756  # people can always --disable-shared, the test was removed, and we
3757  # assume the GNU/Linux dynamic linker is in use.
3758  dynamic_linker='GNU/Linux ld.so'
3759  ;;
3760
3761netbsd*)
3762  version_type=sunos
3763  need_lib_prefix=no
3764  need_version=no
3765  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
3766    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
3767    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
3768    dynamic_linker='NetBSD (a.out) ld.so'
3769  else
3770    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
3771    soname_spec='${libname}${release}${shared_ext}$major'
3772    dynamic_linker='NetBSD ld.elf_so'
3773  fi
3774  shlibpath_var=LD_LIBRARY_PATH
3775  shlibpath_overrides_runpath=yes
3776  hardcode_into_libs=yes
3777  ;;
3778
3779newsos6)
3780  version_type=linux
3781  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3782  shlibpath_var=LD_LIBRARY_PATH
3783  shlibpath_overrides_runpath=yes
3784  ;;
3785
3786*nto* | *qnx*)
3787  version_type=qnx
3788  need_lib_prefix=no
3789  need_version=no
3790  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3791  soname_spec='${libname}${release}${shared_ext}$major'
3792  shlibpath_var=LD_LIBRARY_PATH
3793  shlibpath_overrides_runpath=no
3794  hardcode_into_libs=yes
3795  dynamic_linker='ldqnx.so'
3796  ;;
3797
3798openbsd*)
3799  version_type=sunos
3800  sys_lib_dlsearch_path_spec="/usr/lib"
3801  need_lib_prefix=no
3802  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
3803  case $host_os in
3804    openbsd3.3 | openbsd3.3.*)	need_version=yes ;;
3805    *)				need_version=no  ;;
3806  esac
3807  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
3808  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
3809  shlibpath_var=LD_LIBRARY_PATH
3810  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3811    case $host_os in
3812      openbsd2.[[89]] | openbsd2.[[89]].*)
3813	shlibpath_overrides_runpath=no
3814	;;
3815      *)
3816	shlibpath_overrides_runpath=yes
3817	;;
3818      esac
3819  else
3820    shlibpath_overrides_runpath=yes
3821  fi
3822  ;;
3823
3824os2*)
3825  libname_spec='$name'
3826  shrext_cmds=".dll"
3827  need_lib_prefix=no
3828  library_names_spec='$libname${shared_ext} $libname.a'
3829  dynamic_linker='OS/2 ld.exe'
3830  shlibpath_var=LIBPATH
3831  ;;
3832
3833osf3* | osf4* | osf5*)
3834  version_type=osf
3835  need_lib_prefix=no
3836  need_version=no
3837  soname_spec='${libname}${release}${shared_ext}$major'
3838  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3839  shlibpath_var=LD_LIBRARY_PATH
3840  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
3841  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
3842  ;;
3843
3844rdos*)
3845  dynamic_linker=no
3846  ;;
3847
3848solaris*)
3849  version_type=linux
3850  need_lib_prefix=no
3851  need_version=no
3852  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3853  soname_spec='${libname}${release}${shared_ext}$major'
3854  shlibpath_var=LD_LIBRARY_PATH
3855  shlibpath_overrides_runpath=yes
3856  hardcode_into_libs=yes
3857  # ldd complains unless libraries are executable
3858  postinstall_cmds='chmod +x $lib'
3859  ;;
3860
3861sunos4*)
3862  version_type=sunos
3863  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
3864  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
3865  shlibpath_var=LD_LIBRARY_PATH
3866  shlibpath_overrides_runpath=yes
3867  if test "$with_gnu_ld" = yes; then
3868    need_lib_prefix=no
3869  fi
3870  need_version=yes
3871  ;;
3872
3873sysv4 | sysv4.3*)
3874  version_type=linux
3875  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3876  soname_spec='${libname}${release}${shared_ext}$major'
3877  shlibpath_var=LD_LIBRARY_PATH
3878  case $host_vendor in
3879    sni)
3880      shlibpath_overrides_runpath=no
3881      need_lib_prefix=no
3882      runpath_var=LD_RUN_PATH
3883      ;;
3884    siemens)
3885      need_lib_prefix=no
3886      ;;
3887    motorola)
3888      need_lib_prefix=no
3889      need_version=no
3890      shlibpath_overrides_runpath=no
3891      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
3892      ;;
3893  esac
3894  ;;
3895
3896sysv4*MP*)
3897  if test -d /usr/nec ;then
3898    version_type=linux
3899    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
3900    soname_spec='$libname${shared_ext}.$major'
3901    shlibpath_var=LD_LIBRARY_PATH
3902  fi
3903  ;;
3904
3905sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3906  version_type=freebsd-elf
3907  need_lib_prefix=no
3908  need_version=no
3909  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
3910  soname_spec='${libname}${release}${shared_ext}$major'
3911  shlibpath_var=LD_LIBRARY_PATH
3912  shlibpath_overrides_runpath=yes
3913  hardcode_into_libs=yes
3914  if test "$with_gnu_ld" = yes; then
3915    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
3916  else
3917    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
3918    case $host_os in
3919      sco3.2v5*)
3920        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
3921	;;
3922    esac
3923  fi
3924  sys_lib_dlsearch_path_spec='/usr/lib'
3925  ;;
3926
3927tpf*)
3928  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
3929  version_type=linux
3930  need_lib_prefix=no
3931  need_version=no
3932  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3933  shlibpath_var=LD_LIBRARY_PATH
3934  shlibpath_overrides_runpath=no
3935  hardcode_into_libs=yes
3936  ;;
3937
3938uts4*)
3939  version_type=linux
3940  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3941  soname_spec='${libname}${release}${shared_ext}$major'
3942  shlibpath_var=LD_LIBRARY_PATH
3943  ;;
3944
3945*)
3946  dynamic_linker=no
3947  ;;
3948esac
3949AC_MSG_RESULT([$dynamic_linker])
3950test "$dynamic_linker" = no && can_build_shared=no
3951
3952variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
3953if test "$GCC" = yes; then
3954  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
3955fi
3956
3957if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
3958  sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
3959fi
3960if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
3961  sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
3962fi
3963
3964_LT_DECL([], [variables_saved_for_relink], [1],
3965    [Variables whose values should be saved in libtool wrapper scripts and
3966    restored at link time])
3967_LT_DECL([], [need_lib_prefix], [0],
3968    [Do we need the "lib" prefix for modules?])
3969_LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
3970_LT_DECL([], [version_type], [0], [Library versioning type])
3971_LT_DECL([], [runpath_var], [0],  [Shared library runtime path variable])
3972_LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
3973_LT_DECL([], [shlibpath_overrides_runpath], [0],
3974    [Is shlibpath searched before the hard-coded library search path?])
3975_LT_DECL([], [libname_spec], [1], [Format of library name prefix])
3976_LT_DECL([], [library_names_spec], [1],
3977    [[List of archive names.  First name is the real one, the rest are links.
3978    The last name is the one that the linker finds with -lNAME]])
3979_LT_DECL([], [soname_spec], [1],
3980    [[The coded name of the library, if different from the real name]])
3981_LT_DECL([], [postinstall_cmds], [2],
3982    [Command to use after installation of a shared archive])
3983_LT_DECL([], [postuninstall_cmds], [2],
3984    [Command to use after uninstallation of a shared archive])
3985_LT_DECL([], [finish_cmds], [2],
3986    [Commands used to finish a libtool library installation in a directory])
3987_LT_DECL([], [finish_eval], [1],
3988    [[As "finish_cmds", except a single script fragment to be evaled but
3989    not shown]])
3990_LT_DECL([], [hardcode_into_libs], [0],
3991    [Whether we should hardcode library paths into libraries])
3992_LT_DECL([], [sys_lib_search_path_spec], [2],
3993    [Compile-time system search path for libraries])
3994_LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
3995    [Run-time system search path for libraries])
3996])# _LT_SYS_DYNAMIC_LINKER
3997
3998
3999# _LT_PATH_TOOL_PREFIX(TOOL)
4000# --------------------------
4001# find a file program which can recognize shared library
4002AC_DEFUN([_LT_PATH_TOOL_PREFIX],
4003[m4_require([_LT_DECL_EGREP])dnl
4004AC_MSG_CHECKING([for $1])
4005AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
4006[case $MAGIC_CMD in
4007[[\\/*] |  ?:[\\/]*])
4008  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4009  ;;
4010*)
4011  lt_save_MAGIC_CMD="$MAGIC_CMD"
4012  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4013dnl $ac_dummy forces splitting on constant user-supplied paths.
4014dnl POSIX.2 word splitting is done only on the output of word expansions,
4015dnl not every word.  This closes a longstanding sh security hole.
4016  ac_dummy="m4_if([$2], , $PATH, [$2])"
4017  for ac_dir in $ac_dummy; do
4018    IFS="$lt_save_ifs"
4019    test -z "$ac_dir" && ac_dir=.
4020    if test -f $ac_dir/$1; then
4021      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
4022      if test -n "$file_magic_test_file"; then
4023	case $deplibs_check_method in
4024	"file_magic "*)
4025	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
4026	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4027	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4028	    $EGREP "$file_magic_regex" > /dev/null; then
4029	    :
4030	  else
4031	    cat <<_LT_EOF 1>&2
4032
4033*** Warning: the command libtool uses to detect shared libraries,
4034*** $file_magic_cmd, produces output that libtool cannot recognize.
4035*** The result is that libtool may fail to recognize shared libraries
4036*** as such.  This will affect the creation of libtool libraries that
4037*** depend on shared libraries, but programs linked with such libtool
4038*** libraries will work regardless of this problem.  Nevertheless, you
4039*** may want to report the problem to your system manager and/or to
4040*** bug-libtool@gnu.org
4041
4042_LT_EOF
4043	  fi ;;
4044	esac
4045      fi
4046      break
4047    fi
4048  done
4049  IFS="$lt_save_ifs"
4050  MAGIC_CMD="$lt_save_MAGIC_CMD"
4051  ;;
4052esac])
4053MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4054if test -n "$MAGIC_CMD"; then
4055  AC_MSG_RESULT($MAGIC_CMD)
4056else
4057  AC_MSG_RESULT(no)
4058fi
4059_LT_DECL([], [MAGIC_CMD], [0],
4060	 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
4061])# _LT_PATH_TOOL_PREFIX
4062
4063# Old name:
4064AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
4065dnl aclocal-1.4 backwards compatibility:
4066dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
4067
4068
4069# _LT_PATH_MAGIC
4070# --------------
4071# find a file program which can recognize a shared library
4072m4_defun([_LT_PATH_MAGIC],
4073[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
4074if test -z "$lt_cv_path_MAGIC_CMD"; then
4075  if test -n "$ac_tool_prefix"; then
4076    _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
4077  else
4078    MAGIC_CMD=:
4079  fi
4080fi
4081])# _LT_PATH_MAGIC
4082
4083
4084# LT_PATH_LD
4085# ----------
4086# find the pathname to the GNU or non-GNU linker
4087AC_DEFUN([LT_PATH_LD],
4088[AC_REQUIRE([AC_PROG_CC])dnl
4089AC_REQUIRE([AC_CANONICAL_HOST])dnl
4090AC_REQUIRE([AC_CANONICAL_BUILD])dnl
4091m4_require([_LT_DECL_SED])dnl
4092m4_require([_LT_DECL_EGREP])dnl
4093
4094AC_ARG_WITH([gnu-ld],
4095    [AS_HELP_STRING([--with-gnu-ld],
4096	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
4097    [test "$withval" = no || with_gnu_ld=yes],
4098    [with_gnu_ld=no])dnl
4099
4100ac_prog=ld
4101if test "$GCC" = yes; then
4102  # Check if gcc -print-prog-name=ld gives a path.
4103  AC_MSG_CHECKING([for ld used by $CC])
4104  case $host in
4105  *-*-mingw*)
4106    # gcc leaves a trailing carriage return which upsets mingw
4107    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
4108  *)
4109    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
4110  esac
4111  case $ac_prog in
4112    # Accept absolute paths.
4113    [[\\/]]* | ?:[[\\/]]*)
4114      re_direlt='/[[^/]][[^/]]*/\.\./'
4115      # Canonicalize the pathname of ld
4116      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
4117      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
4118	ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
4119      done
4120      test -z "$LD" && LD="$ac_prog"
4121      ;;
4122  "")
4123    # If it fails, then pretend we aren't using GCC.
4124    ac_prog=ld
4125    ;;
4126  *)
4127    # If it is relative, then search for the first ld in PATH.
4128    with_gnu_ld=unknown
4129    ;;
4130  esac
4131elif test "$with_gnu_ld" = yes; then
4132  AC_MSG_CHECKING([for GNU ld])
4133else
4134  AC_MSG_CHECKING([for non-GNU ld])
4135fi
4136AC_CACHE_VAL(lt_cv_path_LD,
4137[if test -z "$LD"; then
4138  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4139  for ac_dir in $PATH; do
4140    IFS="$lt_save_ifs"
4141    test -z "$ac_dir" && ac_dir=.
4142    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
4143      lt_cv_path_LD="$ac_dir/$ac_prog"
4144      # Check to see if the program is GNU ld.  I'd rather use --version,
4145      # but apparently some variants of GNU ld only accept -v.
4146      # Break only if it was the GNU/non-GNU ld that we prefer.
4147      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
4148      *GNU* | *'with BFD'*)
4149	test "$with_gnu_ld" != no && break
4150	;;
4151      *)
4152	test "$with_gnu_ld" != yes && break
4153	;;
4154      esac
4155    fi
4156  done
4157  IFS="$lt_save_ifs"
4158else
4159  lt_cv_path_LD="$LD" # Let the user override the test with a path.
4160fi])
4161LD="$lt_cv_path_LD"
4162if test -n "$LD"; then
4163  AC_MSG_RESULT($LD)
4164else
4165  AC_MSG_RESULT(no)
4166fi
4167test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
4168_LT_PATH_LD_GNU
4169AC_SUBST([LD])
4170
4171_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
4172])# LT_PATH_LD
4173
4174# Old names:
4175AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
4176AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
4177dnl aclocal-1.4 backwards compatibility:
4178dnl AC_DEFUN([AM_PROG_LD], [])
4179dnl AC_DEFUN([AC_PROG_LD], [])
4180
4181
4182# _LT_PATH_LD_GNU
4183#- --------------
4184m4_defun([_LT_PATH_LD_GNU],
4185[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
4186[# I'd rather use --version here, but apparently some GNU lds only accept -v.
4187case `$LD -v 2>&1 </dev/null` in
4188*GNU* | *'with BFD'*)
4189  lt_cv_prog_gnu_ld=yes
4190  ;;
4191*)
4192  lt_cv_prog_gnu_ld=no
4193  ;;
4194esac])
4195with_gnu_ld=$lt_cv_prog_gnu_ld
4196])# _LT_PATH_LD_GNU
4197
4198
4199# _LT_CMD_RELOAD
4200# --------------
4201# find reload flag for linker
4202#   -- PORTME Some linkers may need a different reload flag.
4203m4_defun([_LT_CMD_RELOAD],
4204[AC_CACHE_CHECK([for $LD option to reload object files],
4205  lt_cv_ld_reload_flag,
4206  [lt_cv_ld_reload_flag='-r'])
4207reload_flag=$lt_cv_ld_reload_flag
4208case $reload_flag in
4209"" | " "*) ;;
4210*) reload_flag=" $reload_flag" ;;
4211esac
4212reload_cmds='$LD$reload_flag -o $output$reload_objs'
4213case $host_os in
4214  darwin*)
4215    if test "$GCC" = yes; then
4216      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
4217    else
4218      reload_cmds='$LD$reload_flag -o $output$reload_objs'
4219    fi
4220    ;;
4221esac
4222_LT_DECL([], [reload_flag], [1], [How to create reloadable object files])dnl
4223_LT_DECL([], [reload_cmds], [2])dnl
4224])# _LT_CMD_RELOAD
4225
4226
4227# _LT_CHECK_MAGIC_METHOD
4228# ----------------------
4229# how to check for library dependencies
4230#  -- PORTME fill in with the dynamic library characteristics
4231m4_defun([_LT_CHECK_MAGIC_METHOD],
4232[m4_require([_LT_DECL_EGREP])
4233m4_require([_LT_DECL_OBJDUMP])
4234AC_CACHE_CHECK([how to recognize dependent libraries],
4235lt_cv_deplibs_check_method,
4236[lt_cv_file_magic_cmd='$MAGIC_CMD'
4237lt_cv_file_magic_test_file=
4238lt_cv_deplibs_check_method='unknown'
4239# Need to set the preceding variable on all platforms that support
4240# interlibrary dependencies.
4241# 'none' -- dependencies not supported.
4242# `unknown' -- same as none, but documents that we really don't know.
4243# 'pass_all' -- all dependencies passed with no checks.
4244# 'test_compile' -- check by making test program.
4245# 'file_magic [[regex]]' -- check by looking for files in library path
4246# which responds to the $file_magic_cmd with a given extended regex.
4247# If you have `file' or equivalent on your system and you're not sure
4248# whether `pass_all' will *always* work, you probably want this one.
4249
4250case $host_os in
4251aix[[4-9]]*)
4252  lt_cv_deplibs_check_method=pass_all
4253  ;;
4254
4255beos*)
4256  lt_cv_deplibs_check_method=pass_all
4257  ;;
4258
4259bsdi[[45]]*)
4260  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
4261  lt_cv_file_magic_cmd='/usr/bin/file -L'
4262  lt_cv_file_magic_test_file=/shlib/libc.so
4263  ;;
4264
4265cygwin*)
4266  # func_win32_libid is a shell function defined in ltmain.sh
4267  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
4268  lt_cv_file_magic_cmd='func_win32_libid'
4269  ;;
4270
4271mingw* | pw32*)
4272  # Base MSYS/MinGW do not provide the 'file' command needed by
4273  # func_win32_libid shell function, so use a weaker test based on 'objdump',
4274  # unless we find 'file', for example because we are cross-compiling.
4275  if ( file / ) >/dev/null 2>&1; then
4276    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
4277    lt_cv_file_magic_cmd='func_win32_libid'
4278  else
4279    lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
4280    lt_cv_file_magic_cmd='$OBJDUMP -f'
4281  fi
4282  ;;
4283
4284cegcc)
4285  # use the weaker test based on 'objdump'. See mingw*.
4286  lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
4287  lt_cv_file_magic_cmd='$OBJDUMP -f'
4288  ;;
4289
4290darwin* | rhapsody*)
4291  lt_cv_deplibs_check_method=pass_all
4292  ;;
4293
4294freebsd* | dragonfly*)
4295  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
4296    case $host_cpu in
4297    i*86 )
4298      # Not sure whether the presence of OpenBSD here was a mistake.
4299      # Let's accept both of them until this is cleared up.
4300      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
4301      lt_cv_file_magic_cmd=/usr/bin/file
4302      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
4303      ;;
4304    esac
4305  else
4306    lt_cv_deplibs_check_method=pass_all
4307  fi
4308  ;;
4309
4310gnu*)
4311  lt_cv_deplibs_check_method=pass_all
4312  ;;
4313
4314hpux10.20* | hpux11*)
4315  lt_cv_file_magic_cmd=/usr/bin/file
4316  case $host_cpu in
4317  ia64*)
4318    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
4319    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
4320    ;;
4321  hppa*64*)
4322    [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]']
4323    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
4324    ;;
4325  *)
4326    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
4327    lt_cv_file_magic_test_file=/usr/lib/libc.sl
4328    ;;
4329  esac
4330  ;;
4331
4332interix[[3-9]]*)
4333  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
4334  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
4335  ;;
4336
4337irix5* | irix6* | nonstopux*)
4338  case $LD in
4339  *-32|*"-32 ") libmagic=32-bit;;
4340  *-n32|*"-n32 ") libmagic=N32;;
4341  *-64|*"-64 ") libmagic=64-bit;;
4342  *) libmagic=never-match;;
4343  esac
4344  lt_cv_deplibs_check_method=pass_all
4345  ;;
4346
4347# This must be Linux ELF.
4348linux* | k*bsd*-gnu)
4349  lt_cv_deplibs_check_method=pass_all
4350  ;;
4351
4352netbsd*)
4353  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
4354    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
4355  else
4356    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
4357  fi
4358  ;;
4359
4360newos6*)
4361  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
4362  lt_cv_file_magic_cmd=/usr/bin/file
4363  lt_cv_file_magic_test_file=/usr/lib/libnls.so
4364  ;;
4365
4366*nto* | *qnx*)
4367  lt_cv_deplibs_check_method=pass_all
4368  ;;
4369
4370openbsd*)
4371  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
4372    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
4373  else
4374    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
4375  fi
4376  ;;
4377
4378osf3* | osf4* | osf5*)
4379  lt_cv_deplibs_check_method=pass_all
4380  ;;
4381
4382rdos*)
4383  lt_cv_deplibs_check_method=pass_all
4384  ;;
4385
4386solaris*)
4387  lt_cv_deplibs_check_method=pass_all
4388  ;;
4389
4390sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
4391  lt_cv_deplibs_check_method=pass_all
4392  ;;
4393
4394sysv4 | sysv4.3*)
4395  case $host_vendor in
4396  motorola)
4397    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]]'
4398    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
4399    ;;
4400  ncr)
4401    lt_cv_deplibs_check_method=pass_all
4402    ;;
4403  sequent)
4404    lt_cv_file_magic_cmd='/bin/file'
4405    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
4406    ;;
4407  sni)
4408    lt_cv_file_magic_cmd='/bin/file'
4409    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
4410    lt_cv_file_magic_test_file=/lib/libc.so
4411    ;;
4412  siemens)
4413    lt_cv_deplibs_check_method=pass_all
4414    ;;
4415  pc)
4416    lt_cv_deplibs_check_method=pass_all
4417    ;;
4418  esac
4419  ;;
4420
4421tpf*)
4422  lt_cv_deplibs_check_method=pass_all
4423  ;;
4424esac
4425])
4426file_magic_cmd=$lt_cv_file_magic_cmd
4427deplibs_check_method=$lt_cv_deplibs_check_method
4428test -z "$deplibs_check_method" && deplibs_check_method=unknown
4429
4430_LT_DECL([], [deplibs_check_method], [1],
4431    [Method to check whether dependent libraries are shared objects])
4432_LT_DECL([], [file_magic_cmd], [1],
4433    [Command to use when deplibs_check_method == "file_magic"])
4434])# _LT_CHECK_MAGIC_METHOD
4435
4436
4437# LT_PATH_NM
4438# ----------
4439# find the pathname to a BSD- or MS-compatible name lister
4440AC_DEFUN([LT_PATH_NM],
4441[AC_REQUIRE([AC_PROG_CC])dnl
4442AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
4443[if test -n "$NM"; then
4444  # Let the user override the test.
4445  lt_cv_path_NM="$NM"
4446else
4447  lt_nm_to_check="${ac_tool_prefix}nm"
4448  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
4449    lt_nm_to_check="$lt_nm_to_check nm"
4450  fi
4451  for lt_tmp_nm in $lt_nm_to_check; do
4452    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4453    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
4454      IFS="$lt_save_ifs"
4455      test -z "$ac_dir" && ac_dir=.
4456      tmp_nm="$ac_dir/$lt_tmp_nm"
4457      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
4458	# Check to see if the nm accepts a BSD-compat flag.
4459	# Adding the `sed 1q' prevents false positives on HP-UX, which says:
4460	#   nm: unknown option "B" ignored
4461	# Tru64's nm complains that /dev/null is an invalid object file
4462	case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
4463	*/dev/null* | *'Invalid file or object type'*)
4464	  lt_cv_path_NM="$tmp_nm -B"
4465	  break
4466	  ;;
4467	*)
4468	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
4469	  */dev/null*)
4470	    lt_cv_path_NM="$tmp_nm -p"
4471	    break
4472	    ;;
4473	  *)
4474	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
4475	    continue # so that we can try to find one that supports BSD flags
4476	    ;;
4477	  esac
4478	  ;;
4479	esac
4480      fi
4481    done
4482    IFS="$lt_save_ifs"
4483  done
4484  : ${lt_cv_path_NM=no}
4485fi])
4486if test "$lt_cv_path_NM" != "no"; then
4487  NM="$lt_cv_path_NM"
4488else
4489  # Didn't find any BSD compatible name lister, look for dumpbin.
4490  AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :)
4491  AC_SUBST([DUMPBIN])
4492  if test "$DUMPBIN" != ":"; then
4493    NM="$DUMPBIN"
4494  fi
4495fi
4496test -z "$NM" && NM=nm
4497AC_SUBST([NM])
4498_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
4499
4500AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
4501  [lt_cv_nm_interface="BSD nm"
4502  echo "int some_variable = 0;" > conftest.$ac_ext
4503  (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
4504  (eval "$ac_compile" 2>conftest.err)
4505  cat conftest.err >&AS_MESSAGE_LOG_FD
4506  (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
4507  (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
4508  cat conftest.err >&AS_MESSAGE_LOG_FD
4509  (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD)
4510  cat conftest.out >&AS_MESSAGE_LOG_FD
4511  if $GREP 'External.*some_variable' conftest.out > /dev/null; then
4512    lt_cv_nm_interface="MS dumpbin"
4513  fi
4514  rm -f conftest*])
4515])# LT_PATH_NM
4516
4517# Old names:
4518AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
4519AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
4520dnl aclocal-1.4 backwards compatibility:
4521dnl AC_DEFUN([AM_PROG_NM], [])
4522dnl AC_DEFUN([AC_PROG_NM], [])
4523
4524
4525# LT_LIB_M
4526# --------
4527# check for math library
4528AC_DEFUN([LT_LIB_M],
4529[AC_REQUIRE([AC_CANONICAL_HOST])dnl
4530LIBM=
4531case $host in
4532*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
4533  # These system don't have libm, or don't need it
4534  ;;
4535*-ncr-sysv4.3*)
4536  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
4537  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
4538  ;;
4539*)
4540  AC_CHECK_LIB(m, cos, LIBM="-lm")
4541  ;;
4542esac
4543AC_SUBST([LIBM])
4544])# LT_LIB_M
4545
4546# Old name:
4547AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
4548dnl aclocal-1.4 backwards compatibility:
4549dnl AC_DEFUN([AC_CHECK_LIBM], [])
4550
4551
4552# _LT_COMPILER_NO_RTTI([TAGNAME])
4553# -------------------------------
4554m4_defun([_LT_COMPILER_NO_RTTI],
4555[m4_require([_LT_TAG_COMPILER])dnl
4556
4557_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
4558
4559if test "$GCC" = yes; then
4560  _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
4561
4562  _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
4563    lt_cv_prog_compiler_rtti_exceptions,
4564    [-fno-rtti -fno-exceptions], [],
4565    [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
4566fi
4567_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
4568	[Compiler flag to turn off builtin functions])
4569])# _LT_COMPILER_NO_RTTI
4570
4571
4572# _LT_CMD_GLOBAL_SYMBOLS
4573# ----------------------
4574m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
4575[AC_REQUIRE([AC_CANONICAL_HOST])dnl
4576AC_REQUIRE([AC_PROG_CC])dnl
4577AC_REQUIRE([LT_PATH_NM])dnl
4578AC_REQUIRE([LT_PATH_LD])dnl
4579m4_require([_LT_DECL_SED])dnl
4580m4_require([_LT_DECL_EGREP])dnl
4581m4_require([_LT_TAG_COMPILER])dnl
4582
4583# Check for command to grab the raw symbol name followed by C symbol from nm.
4584AC_MSG_CHECKING([command to parse $NM output from $compiler object])
4585AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
4586[
4587# These are sane defaults that work on at least a few old systems.
4588# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
4589
4590# Character class describing NM global symbol codes.
4591symcode='[[BCDEGRST]]'
4592
4593# Regexp to match symbols that can be accessed directly from C.
4594sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
4595
4596# Define system-specific variables.
4597case $host_os in
4598aix*)
4599  symcode='[[BCDT]]'
4600  ;;
4601cygwin* | mingw* | pw32* | cegcc*)
4602  symcode='[[ABCDGISTW]]'
4603  ;;
4604hpux*)
4605  if test "$host_cpu" = ia64; then
4606    symcode='[[ABCDEGRST]]'
4607  fi
4608  ;;
4609irix* | nonstopux*)
4610  symcode='[[BCDEGRST]]'
4611  ;;
4612osf*)
4613  symcode='[[BCDEGQRST]]'
4614  ;;
4615solaris*)
4616  symcode='[[BDRT]]'
4617  ;;
4618sco3.2v5*)
4619  symcode='[[DT]]'
4620  ;;
4621sysv4.2uw2*)
4622  symcode='[[DT]]'
4623  ;;
4624sysv5* | sco5v6* | unixware* | OpenUNIX*)
4625  symcode='[[ABDT]]'
4626  ;;
4627sysv4)
4628  symcode='[[DFNSTU]]'
4629  ;;
4630esac
4631
4632# If we're using GNU nm, then use its standard symbol codes.
4633case `$NM -V 2>&1` in
4634*GNU* | *'with BFD'*)
4635  symcode='[[ABCDGIRSTW]]' ;;
4636esac
4637
4638# Transform an extracted symbol line into a proper C declaration.
4639# Some systems (esp. on ia64) link data and code symbols differently,
4640# so use this general approach.
4641lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4642
4643# Transform an extracted symbol line into symbol name and symbol address
4644lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p'"
4645lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"lib\2\", (void *) \&\2},/p'"
4646
4647# Handle CRLF in mingw tool chain
4648opt_cr=
4649case $build_os in
4650mingw*)
4651  opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
4652  ;;
4653esac
4654
4655# Try without a prefix underscore, then with it.
4656for ac_symprfx in "" "_"; do
4657
4658  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
4659  symxfrm="\\1 $ac_symprfx\\2 \\2"
4660
4661  # Write the raw and C identifiers.
4662  if test "$lt_cv_nm_interface" = "MS dumpbin"; then
4663    # Fake it for dumpbin and say T for any non-static function
4664    # and D for any global variable.
4665    # Also find C++ and __fastcall symbols from MSVC++,
4666    # which start with @ or ?.
4667    lt_cv_sys_global_symbol_pipe="$AWK ['"\
4668"     {last_section=section; section=\$ 3};"\
4669"     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
4670"     \$ 0!~/External *\|/{next};"\
4671"     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
4672"     {if(hide[section]) next};"\
4673"     {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
4674"     {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
4675"     s[1]~/^[@?]/{print s[1], s[1]; next};"\
4676"     s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
4677"     ' prfx=^$ac_symprfx]"
4678  else
4679    lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[	 ]]\($symcode$symcode*\)[[	 ]][[	 ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
4680  fi
4681
4682  # Check to see that the pipe works correctly.
4683  pipe_works=no
4684
4685  rm -f conftest*
4686  cat > conftest.$ac_ext <<_LT_EOF
4687#ifdef __cplusplus
4688extern "C" {
4689#endif
4690char nm_test_var;
4691void nm_test_func(void);
4692void nm_test_func(void){}
4693#ifdef __cplusplus
4694}
4695#endif
4696int main(){nm_test_var='a';nm_test_func();return(0);}
4697_LT_EOF
4698
4699  if AC_TRY_EVAL(ac_compile); then
4700    # Now try to grab the symbols.
4701    nlist=conftest.nm
4702    if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
4703      # Try sorting and uniquifying the output.
4704      if sort "$nlist" | uniq > "$nlist"T; then
4705	mv -f "$nlist"T "$nlist"
4706      else
4707	rm -f "$nlist"T
4708      fi
4709
4710      # Make sure that we snagged all the symbols we need.
4711      if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
4712	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
4713	  cat <<_LT_EOF > conftest.$ac_ext
4714#ifdef __cplusplus
4715extern "C" {
4716#endif
4717
4718_LT_EOF
4719	  # Now generate the symbol file.
4720	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
4721
4722	  cat <<_LT_EOF >> conftest.$ac_ext
4723
4724/* The mapping between symbol names and symbols.  */
4725const struct {
4726  const char *name;
4727  void       *address;
4728}
4729lt__PROGRAM__LTX_preloaded_symbols[[]] =
4730{
4731  { "@PROGRAM@", (void *) 0 },
4732_LT_EOF
4733	  $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
4734	  cat <<\_LT_EOF >> conftest.$ac_ext
4735  {0, (void *) 0}
4736};
4737
4738/* This works around a problem in FreeBSD linker */
4739#ifdef FREEBSD_WORKAROUND
4740static const void *lt_preloaded_setup() {
4741  return lt__PROGRAM__LTX_preloaded_symbols;
4742}
4743#endif
4744
4745#ifdef __cplusplus
4746}
4747#endif
4748_LT_EOF
4749	  # Now try linking the two files.
4750	  mv conftest.$ac_objext conftstm.$ac_objext
4751	  lt_save_LIBS="$LIBS"
4752	  lt_save_CFLAGS="$CFLAGS"
4753	  LIBS="conftstm.$ac_objext"
4754	  CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
4755	  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
4756	    pipe_works=yes
4757	  fi
4758	  LIBS="$lt_save_LIBS"
4759	  CFLAGS="$lt_save_CFLAGS"
4760	else
4761	  echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
4762	fi
4763      else
4764	echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
4765      fi
4766    else
4767      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
4768    fi
4769  else
4770    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
4771    cat conftest.$ac_ext >&5
4772  fi
4773  rm -rf conftest* conftst*
4774
4775  # Do not use the global_symbol_pipe unless it works.
4776  if test "$pipe_works" = yes; then
4777    break
4778  else
4779    lt_cv_sys_global_symbol_pipe=
4780  fi
4781done
4782])
4783if test -z "$lt_cv_sys_global_symbol_pipe"; then
4784  lt_cv_sys_global_symbol_to_cdecl=
4785fi
4786if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
4787  AC_MSG_RESULT(failed)
4788else
4789  AC_MSG_RESULT(ok)
4790fi
4791
4792_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
4793    [Take the output of nm and produce a listing of raw symbols and C names])
4794_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
4795    [Transform the output of nm in a proper C declaration])
4796_LT_DECL([global_symbol_to_c_name_address],
4797    [lt_cv_sys_global_symbol_to_c_name_address], [1],
4798    [Transform the output of nm in a C name address pair])
4799_LT_DECL([global_symbol_to_c_name_address_lib_prefix],
4800    [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
4801    [Transform the output of nm in a C name address pair when lib prefix is needed])
4802]) # _LT_CMD_GLOBAL_SYMBOLS
4803
4804
4805# _LT_COMPILER_PIC([TAGNAME])
4806# ---------------------------
4807m4_defun([_LT_COMPILER_PIC],
4808[m4_require([_LT_TAG_COMPILER])dnl
4809_LT_TAGVAR(lt_prog_compiler_wl, $1)=
4810_LT_TAGVAR(lt_prog_compiler_pic, $1)=
4811_LT_TAGVAR(lt_prog_compiler_static, $1)=
4812
4813AC_MSG_CHECKING([for $compiler option to produce PIC])
4814m4_if([$1], [CXX], [
4815  # C++ specific cases for pic, static, wl, etc.
4816  if test "$GXX" = yes; then
4817    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4818    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4819
4820    case $host_os in
4821    aix*)
4822      # All AIX code is PIC.
4823      if test "$host_cpu" = ia64; then
4824	# AIX 5 now supports IA64 processor
4825	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4826      fi
4827      ;;
4828
4829    amigaos*)
4830      case $host_cpu in
4831      powerpc)
4832            # see comment about AmigaOS4 .so support
4833            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4834        ;;
4835      m68k)
4836            # FIXME: we need at least 68020 code to build shared libraries, but
4837            # adding the `-m68020' flag to GCC prevents building anything better,
4838            # like `-m68040'.
4839            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4840        ;;
4841      esac
4842      ;;
4843
4844    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4845      # PIC is the default for these OSes.
4846      ;;
4847    mingw* | cygwin* | os2* | pw32* | cegcc*)
4848      # This hack is so that the source file can tell whether it is being
4849      # built for inclusion in a dll (and should export symbols for example).
4850      # Although the cygwin gcc ignores -fPIC, still need this for old-style
4851      # (--disable-auto-import) libraries
4852      m4_if([$1], [GCJ], [],
4853	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4854      ;;
4855    darwin* | rhapsody*)
4856      # PIC is the default on this platform
4857      # Common symbols not allowed in MH_DYLIB files
4858      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4859      ;;
4860    *djgpp*)
4861      # DJGPP does not support shared libraries at all
4862      _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4863      ;;
4864    interix[[3-9]]*)
4865      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
4866      # Instead, we relocate shared libraries at runtime.
4867      ;;
4868    sysv4*MP*)
4869      if test -d /usr/nec; then
4870	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4871      fi
4872      ;;
4873    hpux*)
4874      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
4875      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
4876      # sets the default TLS model and affects inlining.
4877      case $host_cpu in
4878      hppa*64*)
4879	;;
4880      *)
4881	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4882	;;
4883      esac
4884      ;;
4885    *qnx* | *nto*)
4886      # QNX uses GNU C++, but need to define -shared option too, otherwise
4887      # it will coredump.
4888      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4889      ;;
4890    *)
4891      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4892      ;;
4893    esac
4894  else
4895    case $host_os in
4896      aix[[4-9]]*)
4897	# All AIX code is PIC.
4898	if test "$host_cpu" = ia64; then
4899	  # AIX 5 now supports IA64 processor
4900	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4901	else
4902	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
4903	fi
4904	;;
4905      chorus*)
4906	case $cc_basename in
4907	cxch68*)
4908	  # Green Hills C++ Compiler
4909	  # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
4910	  ;;
4911	esac
4912	;;
4913      dgux*)
4914	case $cc_basename in
4915	  ec++*)
4916	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4917	    ;;
4918	  ghcx*)
4919	    # Green Hills C++ Compiler
4920	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4921	    ;;
4922	  *)
4923	    ;;
4924	esac
4925	;;
4926      freebsd* | dragonfly*)
4927	# FreeBSD uses GNU C++
4928	;;
4929      hpux9* | hpux10* | hpux11*)
4930	case $cc_basename in
4931	  CC*)
4932	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4933	    _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4934	    if test "$host_cpu" != ia64; then
4935	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4936	    fi
4937	    ;;
4938	  aCC*)
4939	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4940	    _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4941	    case $host_cpu in
4942	    hppa*64*|ia64*)
4943	      # +Z the default
4944	      ;;
4945	    *)
4946	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4947	      ;;
4948	    esac
4949	    ;;
4950	  *)
4951	    ;;
4952	esac
4953	;;
4954      interix*)
4955	# This is c89, which is MS Visual C++ (no shared libs)
4956	# Anyone wants to do a port?
4957	;;
4958      irix5* | irix6* | nonstopux*)
4959	case $cc_basename in
4960	  CC*)
4961	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4962	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4963	    # CC pic flag -KPIC is the default.
4964	    ;;
4965	  *)
4966	    ;;
4967	esac
4968	;;
4969      linux* | k*bsd*-gnu)
4970	case $cc_basename in
4971	  KCC*)
4972	    # KAI C++ Compiler
4973	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4974	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4975	    ;;
4976	  ecpc* )
4977	    # old Intel C++ for x86_64 which still supported -KPIC.
4978	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4979	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4980	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4981	    ;;
4982	  icpc* )
4983	    # Intel C++, used to be incompatible with GCC.
4984	    # ICC 10 doesn't accept -KPIC any more.
4985	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4986	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4987	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4988	    ;;
4989	  pgCC* | pgcpp*)
4990	    # Portland Group C++ compiler
4991	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4992	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4993	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4994	    ;;
4995	  cxx*)
4996	    # Compaq C++
4997	    # Make sure the PIC flag is empty.  It appears that all Alpha
4998	    # Linux and Compaq Tru64 Unix objects are PIC.
4999	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
5000	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5001	    ;;
5002	  xlc* | xlC*)
5003	    # IBM XL 8.0 on PPC
5004	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5005	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
5006	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
5007	    ;;
5008	  *)
5009	    case `$CC -V 2>&1 | sed 5q` in
5010	    *Sun\ C*)
5011	      # Sun C++ 5.9
5012	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5013	      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5014	      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5015	      ;;
5016	    esac
5017	    ;;
5018	esac
5019	;;
5020      lynxos*)
5021	;;
5022      m88k*)
5023	;;
5024      mvs*)
5025	case $cc_basename in
5026	  cxx*)
5027	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
5028	    ;;
5029	  *)
5030	    ;;
5031	esac
5032	;;
5033      netbsd*)
5034	;;
5035      *qnx* | *nto*)
5036        # QNX uses GNU C++, but need to define -shared option too, otherwise
5037        # it will coredump.
5038        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
5039        ;;
5040      osf3* | osf4* | osf5*)
5041	case $cc_basename in
5042	  KCC*)
5043	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
5044	    ;;
5045	  RCC*)
5046	    # Rational C++ 2.4.1
5047	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5048	    ;;
5049	  cxx*)
5050	    # Digital/Compaq C++
5051	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5052	    # Make sure the PIC flag is empty.  It appears that all Alpha
5053	    # Linux and Compaq Tru64 Unix objects are PIC.
5054	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
5055	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5056	    ;;
5057	  *)
5058	    ;;
5059	esac
5060	;;
5061      psos*)
5062	;;
5063      solaris*)
5064	case $cc_basename in
5065	  CC*)
5066	    # Sun C++ 4.2, 5.x and Centerline C++
5067	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5068	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5069	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5070	    ;;
5071	  gcx*)
5072	    # Green Hills C++ Compiler
5073	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5074	    ;;
5075	  *)
5076	    ;;
5077	esac
5078	;;
5079      sunos4*)
5080	case $cc_basename in
5081	  CC*)
5082	    # Sun C++ 4.x
5083	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5084	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5085	    ;;
5086	  lcc*)
5087	    # Lucid
5088	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5089	    ;;
5090	  *)
5091	    ;;
5092	esac
5093	;;
5094      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
5095	case $cc_basename in
5096	  CC*)
5097	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5098	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5099	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5100	    ;;
5101	esac
5102	;;
5103      tandem*)
5104	case $cc_basename in
5105	  NCC*)
5106	    # NonStop-UX NCC 3.20
5107	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5108	    ;;
5109	  *)
5110	    ;;
5111	esac
5112	;;
5113      vxworks*)
5114	;;
5115      *)
5116	_LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5117	;;
5118    esac
5119  fi
5120],
5121[
5122  if test "$GCC" = yes; then
5123    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5124    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5125
5126    case $host_os in
5127      aix*)
5128      # All AIX code is PIC.
5129      if test "$host_cpu" = ia64; then
5130	# AIX 5 now supports IA64 processor
5131	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5132      fi
5133      ;;
5134
5135    amigaos*)
5136      case $host_cpu in
5137      powerpc)
5138            # see comment about AmigaOS4 .so support
5139            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5140        ;;
5141      m68k)
5142            # FIXME: we need at least 68020 code to build shared libraries, but
5143            # adding the `-m68020' flag to GCC prevents building anything better,
5144            # like `-m68040'.
5145            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
5146        ;;
5147      esac
5148      ;;
5149
5150    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5151      # PIC is the default for these OSes.
5152      ;;
5153
5154    mingw* | cygwin* | pw32* | os2* | cegcc*)
5155      # This hack is so that the source file can tell whether it is being
5156      # built for inclusion in a dll (and should export symbols for example).
5157      # Although the cygwin gcc ignores -fPIC, still need this for old-style
5158      # (--disable-auto-import) libraries
5159      m4_if([$1], [GCJ], [],
5160	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
5161      ;;
5162
5163    darwin* | rhapsody*)
5164      # PIC is the default on this platform
5165      # Common symbols not allowed in MH_DYLIB files
5166      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5167      ;;
5168
5169    hpux*)
5170      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
5171      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
5172      # sets the default TLS model and affects inlining.
5173      case $host_cpu in
5174      hppa*64*)
5175	# +Z the default
5176	;;
5177      *)
5178	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5179	;;
5180      esac
5181      ;;
5182
5183    interix[[3-9]]*)
5184      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
5185      # Instead, we relocate shared libraries at runtime.
5186      ;;
5187
5188    msdosdjgpp*)
5189      # Just because we use GCC doesn't mean we suddenly get shared libraries
5190      # on systems that don't support them.
5191      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5192      enable_shared=no
5193      ;;
5194
5195    *nto* | *qnx*)
5196      # QNX uses GNU C++, but need to define -shared option too, otherwise
5197      # it will coredump.
5198      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
5199      ;;
5200
5201    sysv4*MP*)
5202      if test -d /usr/nec; then
5203	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
5204      fi
5205      ;;
5206
5207    *)
5208      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5209      ;;
5210    esac
5211  else
5212    # PORTME Check for flag to pass linker flags through the system compiler.
5213    case $host_os in
5214    aix*)
5215      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5216      if test "$host_cpu" = ia64; then
5217	# AIX 5 now supports IA64 processor
5218	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5219      else
5220	_LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5221      fi
5222      ;;
5223
5224    mingw* | cygwin* | pw32* | os2* | cegcc*)
5225      # This hack is so that the source file can tell whether it is being
5226      # built for inclusion in a dll (and should export symbols for example).
5227      m4_if([$1], [GCJ], [],
5228	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
5229      ;;
5230
5231    hpux9* | hpux10* | hpux11*)
5232      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5233      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5234      # not for PA HP-UX.
5235      case $host_cpu in
5236      hppa*64*|ia64*)
5237	# +Z the default
5238	;;
5239      *)
5240	_LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5241	;;
5242      esac
5243      # Is there a better lt_prog_compiler_static that works with the bundled CC?
5244      _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5245      ;;
5246
5247    irix5* | irix6* | nonstopux*)
5248      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5249      # PIC (with -KPIC) is the default.
5250      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5251      ;;
5252
5253    linux* | k*bsd*-gnu)
5254      case $cc_basename in
5255      # old Intel for x86_64 which still supported -KPIC.
5256      ecc*)
5257	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5258	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5259	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5260        ;;
5261      # icc used to be incompatible with GCC.
5262      # ICC 10 doesn't accept -KPIC any more.
5263      icc* | ifort*)
5264	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5265	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5266	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5267        ;;
5268      # Lahey Fortran 8.1.
5269      lf95*)
5270	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5271	_LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
5272	_LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
5273	;;
5274      pgcc* | pgf77* | pgf90* | pgf95*)
5275        # Portland Group compilers (*not* the Pentium gcc compiler,
5276	# which looks to be a dead project)
5277	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5278	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5279	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5280        ;;
5281      ccc*)
5282        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5283        # All Alpha code is PIC.
5284        _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5285        ;;
5286      xl*)
5287	# IBM XL C 8.0/Fortran 10.1 on PPC
5288	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5289	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
5290	_LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
5291	;;
5292      *)
5293	case `$CC -V 2>&1 | sed 5q` in
5294	*Sun\ C*)
5295	  # Sun C 5.9
5296	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5297	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5298	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5299	  ;;
5300	*Sun\ F*)
5301	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
5302	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5303	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5304	  _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
5305	  ;;
5306	esac
5307	;;
5308      esac
5309      ;;
5310
5311    newsos6)
5312      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5313      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5314      ;;
5315
5316    *nto* | *qnx*)
5317      # QNX uses GNU C++, but need to define -shared option too, otherwise
5318      # it will coredump.
5319      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
5320      ;;
5321
5322    osf3* | osf4* | osf5*)
5323      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5324      # All OSF/1 code is PIC.
5325      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5326      ;;
5327
5328    rdos*)
5329      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5330      ;;
5331
5332    solaris*)
5333      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5334      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5335      case $cc_basename in
5336      f77* | f90* | f95*)
5337	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
5338      *)
5339	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
5340      esac
5341      ;;
5342
5343    sunos4*)
5344      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5345      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5346      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5347      ;;
5348
5349    sysv4 | sysv4.2uw2* | sysv4.3*)
5350      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5351      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5352      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5353      ;;
5354
5355    sysv4*MP*)
5356      if test -d /usr/nec ;then
5357	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
5358	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5359      fi
5360      ;;
5361
5362    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
5363      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5364      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5365      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5366      ;;
5367
5368    unicos*)
5369      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5370      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5371      ;;
5372
5373    uts4*)
5374      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5375      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5376      ;;
5377
5378    *)
5379      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5380      ;;
5381    esac
5382  fi
5383])
5384case $host_os in
5385  # For platforms which do not support PIC, -DPIC is meaningless:
5386  *djgpp*)
5387    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
5388    ;;
5389  *)
5390    _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
5391    ;;
5392esac
5393AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
5394_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
5395	[How to pass a linker flag through the compiler])
5396
5397#
5398# Check to make sure the PIC flag actually works.
5399#
5400if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
5401  _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
5402    [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
5403    [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
5404    [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
5405     "" | " "*) ;;
5406     *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
5407     esac],
5408    [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
5409     _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
5410fi
5411_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
5412	[Additional compiler flags for building library objects])
5413
5414#
5415# Check to make sure the static flag actually works.
5416#
5417wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
5418_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
5419  _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
5420  $lt_tmp_static_flag,
5421  [],
5422  [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
5423_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
5424	[Compiler flag to prevent dynamic linking])
5425])# _LT_COMPILER_PIC
5426
5427
5428# _LT_LINKER_SHLIBS([TAGNAME])
5429# ----------------------------
5430# See if the linker supports building shared libraries.
5431m4_defun([_LT_LINKER_SHLIBS],
5432[AC_REQUIRE([LT_PATH_LD])dnl
5433AC_REQUIRE([LT_PATH_NM])dnl
5434m4_require([_LT_FILEUTILS_DEFAULTS])dnl
5435m4_require([_LT_DECL_EGREP])dnl
5436m4_require([_LT_DECL_SED])dnl
5437m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
5438m4_require([_LT_TAG_COMPILER])dnl
5439AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
5440m4_if([$1], [CXX], [
5441  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5442  case $host_os in
5443  aix[[4-9]]*)
5444    # If we're using GNU nm, then we don't want the "-C" option.
5445    # -C means demangle to AIX nm, but means don't demangle with GNU nm
5446    if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
5447      _LT_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'
5448    else
5449      _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
5450    fi
5451    ;;
5452  pw32*)
5453    _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
5454  ;;
5455  cygwin* | mingw* | cegcc*)
5456    _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
5457  ;;
5458  *)
5459    _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5460  ;;
5461  esac
5462  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
5463], [
5464  runpath_var=
5465  _LT_TAGVAR(allow_undefined_flag, $1)=
5466  _LT_TAGVAR(always_export_symbols, $1)=no
5467  _LT_TAGVAR(archive_cmds, $1)=
5468  _LT_TAGVAR(archive_expsym_cmds, $1)=
5469  _LT_TAGVAR(compiler_needs_object, $1)=no
5470  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5471  _LT_TAGVAR(export_dynamic_flag_spec, $1)=
5472  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5473  _LT_TAGVAR(hardcode_automatic, $1)=no
5474  _LT_TAGVAR(hardcode_direct, $1)=no
5475  _LT_TAGVAR(hardcode_direct_absolute, $1)=no
5476  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5477  _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
5478  _LT_TAGVAR(hardcode_libdir_separator, $1)=
5479  _LT_TAGVAR(hardcode_minus_L, $1)=no
5480  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5481  _LT_TAGVAR(inherit_rpath, $1)=no
5482  _LT_TAGVAR(link_all_deplibs, $1)=unknown
5483  _LT_TAGVAR(module_cmds, $1)=
5484  _LT_TAGVAR(module_expsym_cmds, $1)=
5485  _LT_TAGVAR(old_archive_from_new_cmds, $1)=
5486  _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
5487  _LT_TAGVAR(thread_safe_flag_spec, $1)=
5488  _LT_TAGVAR(whole_archive_flag_spec, $1)=
5489  # include_expsyms should be a list of space-separated symbols to be *always*
5490  # included in the symbol list
5491  _LT_TAGVAR(include_expsyms, $1)=
5492  # exclude_expsyms can be an extended regexp of symbols to exclude
5493  # it will be wrapped by ` (' and `)$', so one must not match beginning or
5494  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5495  # as well as any symbol that contains `d'.
5496  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
5497  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5498  # platforms (ab)use it in PIC code, but their linkers get confused if
5499  # the symbol is explicitly referenced.  Since portable code cannot
5500  # rely on this symbol name, it's probably fine to never include it in
5501  # preloaded symbol tables.
5502  # Exclude shared library initialization/finalization symbols.
5503dnl Note also adjust exclude_expsyms for C++ above.
5504  extract_expsyms_cmds=
5505
5506  case $host_os in
5507  cygwin* | mingw* | pw32* | cegcc*)
5508    # FIXME: the MSVC++ port hasn't been tested in a loooong time
5509    # When not using gcc, we currently assume that we are using
5510    # Microsoft Visual C++.
5511    if test "$GCC" != yes; then
5512      with_gnu_ld=no
5513    fi
5514    ;;
5515  interix*)
5516    # we just hope/assume this is gcc and not c89 (= MSVC++)
5517    with_gnu_ld=yes
5518    ;;
5519  openbsd*)
5520    with_gnu_ld=no
5521    ;;
5522  esac
5523
5524  _LT_TAGVAR(ld_shlibs, $1)=yes
5525  if test "$with_gnu_ld" = yes; then
5526    # If archive_cmds runs LD, not CC, wlarc should be empty
5527    wlarc='${wl}'
5528
5529    # Set some defaults for GNU ld with shared library support. These
5530    # are reset later if shared libraries are not supported. Putting them
5531    # here allows them to be overridden if necessary.
5532    runpath_var=LD_RUN_PATH
5533    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5534    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5535    # ancient GNU ld didn't support --whole-archive et. al.
5536    if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
5537      _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5538    else
5539      _LT_TAGVAR(whole_archive_flag_spec, $1)=
5540    fi
5541    supports_anon_versioning=no
5542    case `$LD -v 2>&1` in
5543      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
5544      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
5545      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
5546      *\ 2.11.*) ;; # other 2.11 versions
5547      *) supports_anon_versioning=yes ;;
5548    esac
5549
5550    # See if GNU ld supports shared libraries.
5551    case $host_os in
5552    aix[[3-9]]*)
5553      # On AIX/PPC, the GNU linker is very broken
5554      if test "$host_cpu" != ia64; then
5555	_LT_TAGVAR(ld_shlibs, $1)=no
5556	cat <<_LT_EOF 1>&2
5557
5558*** Warning: the GNU linker, at least up to release 2.9.1, is reported
5559*** to be unable to reliably create shared libraries on AIX.
5560*** Therefore, libtool is disabling shared libraries support.  If you
5561*** really care for shared libraries, you may want to modify your PATH
5562*** so that a non-GNU linker is found, and then restart.
5563
5564_LT_EOF
5565      fi
5566      ;;
5567
5568    amigaos*)
5569      case $host_cpu in
5570      powerpc)
5571            # see comment about AmigaOS4 .so support
5572            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5573            _LT_TAGVAR(archive_expsym_cmds, $1)=''
5574        ;;
5575      m68k)
5576            _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
5577            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5578            _LT_TAGVAR(hardcode_minus_L, $1)=yes
5579        ;;
5580      esac
5581      ;;
5582
5583    beos*)
5584      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5585	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5586	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5587	# support --undefined.  This deserves some investigation.  FIXME
5588	_LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5589      else
5590	_LT_TAGVAR(ld_shlibs, $1)=no
5591      fi
5592      ;;
5593
5594    cygwin* | mingw* | pw32* | cegcc*)
5595      # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
5596      # as there is no search path for DLLs.
5597      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5598      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5599      _LT_TAGVAR(always_export_symbols, $1)=no
5600      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5601      _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
5602
5603      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
5604        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
5605	# If the export-symbols file already is a .def file (1st line
5606	# is EXPORTS), use it as is; otherwise, prepend...
5607	_LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
5608	  cp $export_symbols $output_objdir/$soname.def;
5609	else
5610	  echo EXPORTS > $output_objdir/$soname.def;
5611	  cat $export_symbols >> $output_objdir/$soname.def;
5612	fi~
5613	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
5614      else
5615	_LT_TAGVAR(ld_shlibs, $1)=no
5616      fi
5617      ;;
5618
5619    interix[[3-9]]*)
5620      _LT_TAGVAR(hardcode_direct, $1)=no
5621      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5622      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5623      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5624      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
5625      # Instead, shared libraries are loaded at an image base (0x10000000 by
5626      # default) and relocated if they conflict, which is a slow very memory
5627      # consuming and fragmenting process.  To avoid this, we pick a random,
5628      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
5629      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
5630      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
5631      _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
5632      ;;
5633
5634    gnu* | linux* | tpf* | k*bsd*-gnu)
5635      tmp_diet=no
5636      if test "$host_os" = linux-dietlibc; then
5637	case $cc_basename in
5638	  diet\ *) tmp_diet=yes;;	# linux-dietlibc with static linking (!diet-dyn)
5639	esac
5640      fi
5641      if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
5642	 && test "$tmp_diet" = no
5643      then
5644	tmp_addflag=
5645	tmp_sharedflag='-shared'
5646	case $cc_basename,$host_cpu in
5647        pgcc*)				# Portland Group C compiler
5648	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
5649	  tmp_addflag=' $pic_flag'
5650	  ;;
5651	pgf77* | pgf90* | pgf95*)	# Portland Group f77 and f90 compilers
5652	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
5653	  tmp_addflag=' $pic_flag -Mnomain' ;;
5654	ecc*,ia64* | icc*,ia64*)	# Intel C compiler on ia64
5655	  tmp_addflag=' -i_dynamic' ;;
5656	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
5657	  tmp_addflag=' -i_dynamic -nofor_main' ;;
5658	ifc* | ifort*)			# Intel Fortran compiler
5659	  tmp_addflag=' -nofor_main' ;;
5660	lf95*)				# Lahey Fortran 8.1
5661	  _LT_TAGVAR(whole_archive_flag_spec, $1)=
5662	  tmp_sharedflag='--shared' ;;
5663	xl[[cC]]*)			# IBM XL C 8.0 on PPC (deal with xlf below)
5664	  tmp_sharedflag='-qmkshrobj'
5665	  tmp_addflag= ;;
5666	esac
5667	case `$CC -V 2>&1 | sed 5q` in
5668	*Sun\ C*)			# Sun C 5.9
5669	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
5670	  _LT_TAGVAR(compiler_needs_object, $1)=yes
5671	  tmp_sharedflag='-G' ;;
5672	*Sun\ F*)			# Sun Fortran 8.3
5673	  tmp_sharedflag='-G' ;;
5674	esac
5675	_LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5676
5677        if test "x$supports_anon_versioning" = xyes; then
5678          _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
5679	    cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5680	    echo "local: *; };" >> $output_objdir/$libname.ver~
5681	    $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
5682        fi
5683
5684	case $cc_basename in
5685	xlf*)
5686	  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
5687	  _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
5688	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5689	  _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
5690	  _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib'
5691	  if test "x$supports_anon_versioning" = xyes; then
5692	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
5693	      cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5694	      echo "local: *; };" >> $output_objdir/$libname.ver~
5695	      $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
5696	  fi
5697	  ;;
5698	esac
5699      else
5700        _LT_TAGVAR(ld_shlibs, $1)=no
5701      fi
5702      ;;
5703
5704    netbsd*)
5705      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
5706	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5707	wlarc=
5708      else
5709	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5710	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5711      fi
5712      ;;
5713
5714    solaris*)
5715      if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
5716	_LT_TAGVAR(ld_shlibs, $1)=no
5717	cat <<_LT_EOF 1>&2
5718
5719*** Warning: The releases 2.8.* of the GNU linker cannot reliably
5720*** create shared libraries on Solaris systems.  Therefore, libtool
5721*** is disabling shared libraries support.  We urge you to upgrade GNU
5722*** binutils to release 2.9.1 or newer.  Another option is to modify
5723*** your PATH or compiler configuration so that the native linker is
5724*** used, and then restart.
5725
5726_LT_EOF
5727      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5728	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5729	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5730      else
5731	_LT_TAGVAR(ld_shlibs, $1)=no
5732      fi
5733      ;;
5734
5735    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
5736      case `$LD -v 2>&1` in
5737        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
5738	_LT_TAGVAR(ld_shlibs, $1)=no
5739	cat <<_LT_EOF 1>&2
5740
5741*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
5742*** reliably create shared libraries on SCO systems.  Therefore, libtool
5743*** is disabling shared libraries support.  We urge you to upgrade GNU
5744*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
5745*** your PATH or compiler configuration so that the native linker is
5746*** used, and then restart.
5747
5748_LT_EOF
5749	;;
5750	*)
5751	  # For security reasons, it is highly recommended that you always
5752	  # use absolute paths for naming shared libraries, and exclude the
5753	  # DT_RUNPATH tag from executables and libraries.  But doing so
5754	  # requires that you compile everything twice, which is a pain.
5755	  if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5756	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5757	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5758	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5759	  else
5760	    _LT_TAGVAR(ld_shlibs, $1)=no
5761	  fi
5762	;;
5763      esac
5764      ;;
5765
5766    sunos4*)
5767      _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5768      wlarc=
5769      _LT_TAGVAR(hardcode_direct, $1)=yes
5770      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5771      ;;
5772
5773    *)
5774      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5775	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5776	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5777      else
5778	_LT_TAGVAR(ld_shlibs, $1)=no
5779      fi
5780      ;;
5781    esac
5782
5783    if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
5784      runpath_var=
5785      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5786      _LT_TAGVAR(export_dynamic_flag_spec, $1)=
5787      _LT_TAGVAR(whole_archive_flag_spec, $1)=
5788    fi
5789  else
5790    # PORTME fill in a description of your system's linker (not GNU ld)
5791    case $host_os in
5792    aix3*)
5793      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5794      _LT_TAGVAR(always_export_symbols, $1)=yes
5795      _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
5796      # Note: this linker hardcodes the directories in LIBPATH if there
5797      # are no directories specified by -L.
5798      _LT_TAGVAR(hardcode_minus_L, $1)=yes
5799      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
5800	# Neither direct hardcoding nor static linking is supported with a
5801	# broken collect2.
5802	_LT_TAGVAR(hardcode_direct, $1)=unsupported
5803      fi
5804      ;;
5805
5806    aix[[4-9]]*)
5807      if test "$host_cpu" = ia64; then
5808	# On IA64, the linker does run time linking by default, so we don't
5809	# have to do anything special.
5810	aix_use_runtimelinking=no
5811	exp_sym_flag='-Bexport'
5812	no_entry_flag=""
5813      else
5814	# If we're using GNU nm, then we don't want the "-C" option.
5815	# -C means demangle to AIX nm, but means don't demangle with GNU nm
5816	if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
5817	  _LT_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'
5818	else
5819	  _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
5820	fi
5821	aix_use_runtimelinking=no
5822
5823	# Test if we are trying to use run time linking or normal
5824	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
5825	# need to do runtime linking.
5826	case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
5827	  for ld_flag in $LDFLAGS; do
5828	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
5829	    aix_use_runtimelinking=yes
5830	    break
5831	  fi
5832	  done
5833	  ;;
5834	esac
5835
5836	exp_sym_flag='-bexport'
5837	no_entry_flag='-bnoentry'
5838      fi
5839
5840      # When large executables or shared objects are built, AIX ld can
5841      # have problems creating the table of contents.  If linking a library
5842      # or program results in "error TOC overflow" add -mminimal-toc to
5843      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
5844      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5845
5846      _LT_TAGVAR(archive_cmds, $1)=''
5847      _LT_TAGVAR(hardcode_direct, $1)=yes
5848      _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5849      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
5850      _LT_TAGVAR(link_all_deplibs, $1)=yes
5851      _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
5852
5853      if test "$GCC" = yes; then
5854	case $host_os in aix4.[[012]]|aix4.[[012]].*)
5855	# We only want to do this on AIX 4.2 and lower, the check
5856	# below for broken collect2 doesn't work under 4.3+
5857	  collect2name=`${CC} -print-prog-name=collect2`
5858	  if test -f "$collect2name" &&
5859	   strings "$collect2name" | $GREP resolve_lib_name >/dev/null
5860	  then
5861	  # We have reworked collect2
5862	  :
5863	  else
5864	  # We have old collect2
5865	  _LT_TAGVAR(hardcode_direct, $1)=unsupported
5866	  # It fails to find uninstalled libraries when the uninstalled
5867	  # path is not listed in the libpath.  Setting hardcode_minus_L
5868	  # to unsupported forces relinking
5869	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
5870	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5871	  _LT_TAGVAR(hardcode_libdir_separator, $1)=
5872	  fi
5873	  ;;
5874	esac
5875	shared_flag='-shared'
5876	if test "$aix_use_runtimelinking" = yes; then
5877	  shared_flag="$shared_flag "'${wl}-G'
5878	fi
5879      else
5880	# not using gcc
5881	if test "$host_cpu" = ia64; then
5882	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
5883	# chokes on -Wl,-G. The following line is correct:
5884	  shared_flag='-G'
5885	else
5886	  if test "$aix_use_runtimelinking" = yes; then
5887	    shared_flag='${wl}-G'
5888	  else
5889	    shared_flag='${wl}-bM:SRE'
5890	  fi
5891	fi
5892      fi
5893
5894      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
5895      # It seems that -bexpall does not export symbols beginning with
5896      # underscore (_), so it is better to generate a list of symbols to export.
5897      _LT_TAGVAR(always_export_symbols, $1)=yes
5898      if test "$aix_use_runtimelinking" = yes; then
5899	# Warning - without using the other runtime loading flags (-brtl),
5900	# -berok will link without error, but may produce a broken library.
5901	_LT_TAGVAR(allow_undefined_flag, $1)='-berok'
5902        # Determine the default libpath from the value encoded in an
5903        # empty executable.
5904        _LT_SYS_MODULE_PATH_AIX
5905        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5906        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
5907      else
5908	if test "$host_cpu" = ia64; then
5909	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
5910	  _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
5911	  _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
5912	else
5913	 # Determine the default libpath from the value encoded in an
5914	 # empty executable.
5915	 _LT_SYS_MODULE_PATH_AIX
5916	 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5917	  # Warning - without using the other run time loading flags,
5918	  # -berok will link without error, but may produce a broken library.
5919	  _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
5920	  _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
5921	  # Exported symbols can be pulled into shared objects from archives
5922	  _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
5923	  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5924	  # This is similar to how AIX traditionally builds its shared libraries.
5925	  _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
5926	fi
5927      fi
5928      ;;
5929
5930    amigaos*)
5931      case $host_cpu in
5932      powerpc)
5933            # see comment about AmigaOS4 .so support
5934            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5935            _LT_TAGVAR(archive_expsym_cmds, $1)=''
5936        ;;
5937      m68k)
5938            _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
5939            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5940            _LT_TAGVAR(hardcode_minus_L, $1)=yes
5941        ;;
5942      esac
5943      ;;
5944
5945    bsdi[[45]]*)
5946      _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
5947      ;;
5948
5949    cygwin* | mingw* | pw32* | cegcc*)
5950      # When not using gcc, we currently assume that we are using
5951      # Microsoft Visual C++.
5952      # hardcode_libdir_flag_spec is actually meaningless, as there is
5953      # no search path for DLLs.
5954      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
5955      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5956      # Tell ltmain to make .lib files, not .a files.
5957      libext=lib
5958      # Tell ltmain to make .dll files, not .so files.
5959      shrext_cmds=".dll"
5960      # FIXME: Setting linknames here is a bad hack.
5961      _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames='
5962      # The linker will automatically build a .lib file if we build a DLL.
5963      _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
5964      # FIXME: Should let the user specify the lib program.
5965      _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
5966      _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
5967      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5968      ;;
5969
5970    darwin* | rhapsody*)
5971      _LT_DARWIN_LINKER_FEATURES($1)
5972      ;;
5973
5974    dgux*)
5975      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5976      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5977      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5978      ;;
5979
5980    freebsd1*)
5981      _LT_TAGVAR(ld_shlibs, $1)=no
5982      ;;
5983
5984    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5985    # support.  Future versions do this automatically, but an explicit c++rt0.o
5986    # does not break anything, and helps significantly (at the cost of a little
5987    # extra space).
5988    freebsd2.2*)
5989      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5990      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5991      _LT_TAGVAR(hardcode_direct, $1)=yes
5992      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5993      ;;
5994
5995    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5996    freebsd2*)
5997      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5998      _LT_TAGVAR(hardcode_direct, $1)=yes
5999      _LT_TAGVAR(hardcode_minus_L, $1)=yes
6000      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6001      ;;
6002
6003    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
6004    freebsd* | dragonfly*)
6005      _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
6006      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6007      _LT_TAGVAR(hardcode_direct, $1)=yes
6008      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6009      ;;
6010
6011    hpux9*)
6012      if test "$GCC" = yes; then
6013	_LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
6014      else
6015	_LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
6016      fi
6017      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6018      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6019      _LT_TAGVAR(hardcode_direct, $1)=yes
6020
6021      # hardcode_minus_L: Not really in the search PATH,
6022      # but as the default location of the library.
6023      _LT_TAGVAR(hardcode_minus_L, $1)=yes
6024      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6025      ;;
6026
6027    hpux10*)
6028      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
6029	_LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6030      else
6031	_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
6032      fi
6033      if test "$with_gnu_ld" = no; then
6034	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6035	_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
6036	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
6037	_LT_TAGVAR(hardcode_direct, $1)=yes
6038	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6039	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6040	# hardcode_minus_L: Not really in the search PATH,
6041	# but as the default location of the library.
6042	_LT_TAGVAR(hardcode_minus_L, $1)=yes
6043      fi
6044      ;;
6045
6046    hpux11*)
6047      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
6048	case $host_cpu in
6049	hppa*64*)
6050	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6051	  ;;
6052	ia64*)
6053	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
6054	  ;;
6055	*)
6056	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6057	  ;;
6058	esac
6059      else
6060	case $host_cpu in
6061	hppa*64*)
6062	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6063	  ;;
6064	ia64*)
6065	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
6066	  ;;
6067	*)
6068	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6069	  ;;
6070	esac
6071      fi
6072      if test "$with_gnu_ld" = no; then
6073	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6074	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
6075
6076	case $host_cpu in
6077	hppa*64*|ia64*)
6078	  _LT_TAGVAR(hardcode_direct, $1)=no
6079	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6080	  ;;
6081	*)
6082	  _LT_TAGVAR(hardcode_direct, $1)=yes
6083	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6084	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6085
6086	  # hardcode_minus_L: Not really in the search PATH,
6087	  # but as the default location of the library.
6088	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
6089	  ;;
6090	esac
6091      fi
6092      ;;
6093
6094    irix5* | irix6* | nonstopux*)
6095      if test "$GCC" = yes; then
6096	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6097	# Try to use the -exported_symbol ld option, if it does not
6098	# work, assume that -exports_file does not work either and
6099	# implicitly export all symbols.
6100        save_LDFLAGS="$LDFLAGS"
6101        LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
6102        AC_LINK_IFELSE(int foo(void) {},
6103          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
6104        )
6105        LDFLAGS="$save_LDFLAGS"
6106      else
6107	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
6108	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
6109      fi
6110      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
6111      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6112      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6113      _LT_TAGVAR(inherit_rpath, $1)=yes
6114      _LT_TAGVAR(link_all_deplibs, $1)=yes
6115      ;;
6116
6117    netbsd*)
6118      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
6119	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
6120      else
6121	_LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
6122      fi
6123      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6124      _LT_TAGVAR(hardcode_direct, $1)=yes
6125      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6126      ;;
6127
6128    newsos6)
6129      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6130      _LT_TAGVAR(hardcode_direct, $1)=yes
6131      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6132      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6133      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6134      ;;
6135
6136    *nto* | *qnx*)
6137      ;;
6138
6139    openbsd*)
6140      if test -f /usr/libexec/ld.so; then
6141	_LT_TAGVAR(hardcode_direct, $1)=yes
6142	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6143	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6144	if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6145	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6146	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
6147	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6148	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6149	else
6150	  case $host_os in
6151	   openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
6152	     _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6153	     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6154	     ;;
6155	   *)
6156	     _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6157	     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6158	     ;;
6159	  esac
6160	fi
6161      else
6162	_LT_TAGVAR(ld_shlibs, $1)=no
6163      fi
6164      ;;
6165
6166    os2*)
6167      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6168      _LT_TAGVAR(hardcode_minus_L, $1)=yes
6169      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6170      _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
6171      _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
6172      ;;
6173
6174    osf3*)
6175      if test "$GCC" = yes; then
6176	_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6177	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6178      else
6179	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6180	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
6181      fi
6182      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
6183      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6184      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6185      ;;
6186
6187    osf4* | osf5*)	# as osf3* with the addition of -msym flag
6188      if test "$GCC" = yes; then
6189	_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6190	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6191	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6192      else
6193	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6194	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
6195	_LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
6196	$CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
6197
6198	# Both c and cxx compiler support -rpath directly
6199	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6200      fi
6201      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
6202      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6203      ;;
6204
6205    solaris*)
6206      _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
6207      if test "$GCC" = yes; then
6208	wlarc='${wl}'
6209	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6210	_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6211	  $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
6212      else
6213	case `$CC -V 2>&1` in
6214	*"Compilers 5.0"*)
6215	  wlarc=''
6216	  _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6217	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6218	  $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
6219	  ;;
6220	*)
6221	  wlarc='${wl}'
6222	  _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
6223	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6224	  $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
6225	  ;;
6226	esac
6227      fi
6228      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6229      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6230      case $host_os in
6231      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6232      *)
6233	# The compiler driver will combine and reorder linker options,
6234	# but understands `-z linker_flag'.  GCC discards it without `$wl',
6235	# but is careful enough not to reorder.
6236	# Supported since Solaris 2.6 (maybe 2.5.1?)
6237	if test "$GCC" = yes; then
6238	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
6239	else
6240	  _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
6241	fi
6242	;;
6243      esac
6244      _LT_TAGVAR(link_all_deplibs, $1)=yes
6245      ;;
6246
6247    sunos4*)
6248      if test "x$host_vendor" = xsequent; then
6249	# Use $CC to link under sequent, because it throws in some extra .o
6250	# files that make .init and .fini sections work.
6251	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
6252      else
6253	_LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
6254      fi
6255      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6256      _LT_TAGVAR(hardcode_direct, $1)=yes
6257      _LT_TAGVAR(hardcode_minus_L, $1)=yes
6258      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6259      ;;
6260
6261    sysv4)
6262      case $host_vendor in
6263	sni)
6264	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6265	  _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
6266	;;
6267	siemens)
6268	  ## LD is ld it makes a PLAMLIB
6269	  ## CC just makes a GrossModule.
6270	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6271	  _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
6272	  _LT_TAGVAR(hardcode_direct, $1)=no
6273        ;;
6274	motorola)
6275	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6276	  _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
6277	;;
6278      esac
6279      runpath_var='LD_RUN_PATH'
6280      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6281      ;;
6282
6283    sysv4.3*)
6284      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6285      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6286      _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
6287      ;;
6288
6289    sysv4*MP*)
6290      if test -d /usr/nec; then
6291	_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6292	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6293	runpath_var=LD_RUN_PATH
6294	hardcode_runpath_var=yes
6295	_LT_TAGVAR(ld_shlibs, $1)=yes
6296      fi
6297      ;;
6298
6299    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
6300      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6301      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6302      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6303      runpath_var='LD_RUN_PATH'
6304
6305      if test "$GCC" = yes; then
6306	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6307	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6308      else
6309	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6310	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6311      fi
6312      ;;
6313
6314    sysv5* | sco3.2v5* | sco5v6*)
6315      # Note: We can NOT use -z defs as we might desire, because we do not
6316      # link with -lc, and that would cause any symbols used from libc to
6317      # always be unresolved, which means just about no library would
6318      # ever link correctly.  If we're not using GNU ld we use -z text
6319      # though, which does catch some bad symbols but isn't as heavy-handed
6320      # as -z defs.
6321      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6322      _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
6323      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6324      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6325      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
6326      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6327      _LT_TAGVAR(link_all_deplibs, $1)=yes
6328      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
6329      runpath_var='LD_RUN_PATH'
6330
6331      if test "$GCC" = yes; then
6332	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6333	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6334      else
6335	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6336	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6337      fi
6338      ;;
6339
6340    uts4*)
6341      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6342      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6343      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6344      ;;
6345
6346    *)
6347      _LT_TAGVAR(ld_shlibs, $1)=no
6348      ;;
6349    esac
6350
6351    if test x$host_vendor = xsni; then
6352      case $host in
6353      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6354	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
6355	;;
6356      esac
6357    fi
6358  fi
6359])
6360AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
6361test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
6362
6363_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
6364
6365_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
6366_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
6367_LT_DECL([], [extract_expsyms_cmds], [2],
6368    [The commands to extract the exported symbol list from a shared archive])
6369
6370#
6371# Do we need to explicitly link libc?
6372#
6373case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
6374x|xyes)
6375  # Assume -lc should be added
6376  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6377
6378  if test "$enable_shared" = yes && test "$GCC" = yes; then
6379    case $_LT_TAGVAR(archive_cmds, $1) in
6380    *'~'*)
6381      # FIXME: we may have to deal with multi-command sequences.
6382      ;;
6383    '$CC '*)
6384      # Test whether the compiler implicitly links with -lc since on some
6385      # systems, -lgcc has to come before -lc. If gcc already passes -lc
6386      # to ld, don't add -lc before -lgcc.
6387      AC_MSG_CHECKING([whether -lc should be explicitly linked in])
6388      $RM conftest*
6389      echo "$lt_simple_compile_test_code" > conftest.$ac_ext
6390
6391      if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
6392        soname=conftest
6393        lib=conftest
6394        libobjs=conftest.$ac_objext
6395        deplibs=
6396        wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
6397	pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
6398        compiler_flags=-v
6399        linker_flags=-v
6400        verstring=
6401        output_objdir=.
6402        libname=conftest
6403        lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
6404        _LT_TAGVAR(allow_undefined_flag, $1)=
6405        if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
6406        then
6407	  _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6408        else
6409	  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6410        fi
6411        _LT_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_TAGVAR(archive_cmds_need_lc, $1)])
6417      ;;
6418    esac
6419  fi
6420  ;;
6421esac
6422
6423_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
6424    [Whether or not to add -lc for building shared libraries])
6425_LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
6426    [enable_shared_with_static_runtimes], [0],
6427    [Whether or not to disallow shared libs when runtime libs are static])
6428_LT_TAGDECL([], [export_dynamic_flag_spec], [1],
6429    [Compiler flag to allow reflexive dlopens])
6430_LT_TAGDECL([], [whole_archive_flag_spec], [1],
6431    [Compiler flag to generate shared objects directly from archives])
6432_LT_TAGDECL([], [compiler_needs_object], [1],
6433    [Whether the compiler copes with passing no objects directly])
6434_LT_TAGDECL([], [old_archive_from_new_cmds], [2],
6435    [Create an old-style archive from a shared archive])
6436_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
6437    [Create a temporary old-style archive to link instead of a shared archive])
6438_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
6439_LT_TAGDECL([], [archive_expsym_cmds], [2])
6440_LT_TAGDECL([], [module_cmds], [2],
6441    [Commands used to build a loadable module if different from building
6442    a shared archive.])
6443_LT_TAGDECL([], [module_expsym_cmds], [2])
6444_LT_TAGDECL([], [with_gnu_ld], [1],
6445    [Whether we are building with GNU ld or not])
6446_LT_TAGDECL([], [allow_undefined_flag], [1],
6447    [Flag that allows shared libraries with undefined symbols to be built])
6448_LT_TAGDECL([], [no_undefined_flag], [1],
6449    [Flag that enforces no undefined symbols])
6450_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
6451    [Flag to hardcode $libdir into a binary during linking.
6452    This must work even if $libdir does not exist])
6453_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1],
6454    [[If ld is used when linking, flag to hardcode $libdir into a binary
6455    during linking.  This must work even if $libdir does not exist]])
6456_LT_TAGDECL([], [hardcode_libdir_separator], [1],
6457    [Whether we need a single "-rpath" flag with a separated argument])
6458_LT_TAGDECL([], [hardcode_direct], [0],
6459    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
6460    DIR into the resulting binary])
6461_LT_TAGDECL([], [hardcode_direct_absolute], [0],
6462    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
6463    DIR into the resulting binary and the resulting library dependency is
6464    "absolute", i.e impossible to change by setting ${shlibpath_var} if the
6465    library is relocated])
6466_LT_TAGDECL([], [hardcode_minus_L], [0],
6467    [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
6468    into the resulting binary])
6469_LT_TAGDECL([], [hardcode_shlibpath_var], [0],
6470    [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
6471    into the resulting binary])
6472_LT_TAGDECL([], [hardcode_automatic], [0],
6473    [Set to "yes" if building a shared library automatically hardcodes DIR
6474    into the library and all subsequent libraries and executables linked
6475    against it])
6476_LT_TAGDECL([], [inherit_rpath], [0],
6477    [Set to yes if linker adds runtime paths of dependent libraries
6478    to runtime path list])
6479_LT_TAGDECL([], [link_all_deplibs], [0],
6480    [Whether libtool must link a program against all its dependency libraries])
6481_LT_TAGDECL([], [fix_srcfile_path], [1],
6482    [Fix the shell variable $srcfile for the compiler])
6483_LT_TAGDECL([], [always_export_symbols], [0],
6484    [Set to "yes" if exported symbols are required])
6485_LT_TAGDECL([], [export_symbols_cmds], [2],
6486    [The commands to list exported symbols])
6487_LT_TAGDECL([], [exclude_expsyms], [1],
6488    [Symbols that should not be listed in the preloaded symbols])
6489_LT_TAGDECL([], [include_expsyms], [1],
6490    [Symbols that must always be exported])
6491_LT_TAGDECL([], [prelink_cmds], [2],
6492    [Commands necessary for linking programs (against libraries) with templates])
6493_LT_TAGDECL([], [file_list_spec], [1],
6494    [Specify filename containing input files])
6495dnl FIXME: Not yet implemented
6496dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
6497dnl    [Compiler flag to generate thread safe objects])
6498])# _LT_LINKER_SHLIBS
6499
6500
6501# _LT_LANG_C_CONFIG([TAG])
6502# ------------------------
6503# Ensure that the configuration variables for a C compiler are suitably
6504# defined.  These variables are subsequently used by _LT_CONFIG to write
6505# the compiler configuration to `libtool'.
6506m4_defun([_LT_LANG_C_CONFIG],
6507[m4_require([_LT_DECL_EGREP])dnl
6508lt_save_CC="$CC"
6509AC_LANG_PUSH(C)
6510
6511# Source file extension for C test sources.
6512ac_ext=c
6513
6514# Object file extension for compiled C test sources.
6515objext=o
6516_LT_TAGVAR(objext, $1)=$objext
6517
6518# Code to be used in simple compile tests
6519lt_simple_compile_test_code="int some_variable = 0;"
6520
6521# Code to be used in simple link tests
6522lt_simple_link_test_code='int main(){return(0);}'
6523
6524_LT_TAG_COMPILER
6525# Save the default compiler, since it gets overwritten when the other
6526# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
6527compiler_DEFAULT=$CC
6528
6529# save warnings/boilerplate of simple test code
6530_LT_COMPILER_BOILERPLATE
6531_LT_LINKER_BOILERPLATE
6532
6533if test -n "$compiler"; then
6534  _LT_COMPILER_NO_RTTI($1)
6535  _LT_COMPILER_PIC($1)
6536  _LT_COMPILER_C_O($1)
6537  _LT_COMPILER_FILE_LOCKS($1)
6538  _LT_LINKER_SHLIBS($1)
6539  _LT_SYS_DYNAMIC_LINKER($1)
6540  _LT_LINKER_HARDCODE_LIBPATH($1)
6541  LT_SYS_DLOPEN_SELF
6542  _LT_CMD_STRIPLIB
6543
6544  # Report which library types will actually be built
6545  AC_MSG_CHECKING([if libtool supports shared libraries])
6546  AC_MSG_RESULT([$can_build_shared])
6547
6548  AC_MSG_CHECKING([whether to build shared libraries])
6549  test "$can_build_shared" = "no" && enable_shared=no
6550
6551  # On AIX, shared libraries and static libraries use the same namespace, and
6552  # are all built from PIC.
6553  case $host_os in
6554  aix3*)
6555    test "$enable_shared" = yes && enable_static=no
6556    if test -n "$RANLIB"; then
6557      archive_cmds="$archive_cmds~\$RANLIB \$lib"
6558      postinstall_cmds='$RANLIB $lib'
6559    fi
6560    ;;
6561
6562  aix[[4-9]]*)
6563    if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6564      test "$enable_shared" = yes && enable_static=no
6565    fi
6566    ;;
6567  esac
6568  AC_MSG_RESULT([$enable_shared])
6569
6570  AC_MSG_CHECKING([whether to build static libraries])
6571  # Make sure either enable_shared or enable_static is yes.
6572  test "$enable_shared" = yes || enable_static=yes
6573  AC_MSG_RESULT([$enable_static])
6574
6575  _LT_CONFIG($1)
6576fi
6577AC_LANG_POP
6578CC="$lt_save_CC"
6579])# _LT_LANG_C_CONFIG
6580
6581
6582# _LT_PROG_CXX
6583# ------------
6584# Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++
6585# compiler, we have our own version here.
6586m4_defun([_LT_PROG_CXX],
6587[
6588pushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes])
6589AC_PROG_CXX
6590if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
6591    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
6592    (test "X$CXX" != "Xg++"))) ; then
6593  AC_PROG_CXXCPP
6594else
6595  _lt_caught_CXX_error=yes
6596fi
6597popdef([AC_MSG_ERROR])
6598])# _LT_PROG_CXX
6599
6600dnl aclocal-1.4 backwards compatibility:
6601dnl AC_DEFUN([_LT_PROG_CXX], [])
6602
6603
6604# _LT_LANG_CXX_CONFIG([TAG])
6605# --------------------------
6606# Ensure that the configuration variables for a C++ compiler are suitably
6607# defined.  These variables are subsequently used by _LT_CONFIG to write
6608# the compiler configuration to `libtool'.
6609m4_defun([_LT_LANG_CXX_CONFIG],
6610[AC_REQUIRE([_LT_PROG_CXX])dnl
6611m4_require([_LT_FILEUTILS_DEFAULTS])dnl
6612m4_require([_LT_DECL_EGREP])dnl
6613
6614AC_LANG_PUSH(C++)
6615_LT_TAGVAR(archive_cmds_need_lc, $1)=no
6616_LT_TAGVAR(allow_undefined_flag, $1)=
6617_LT_TAGVAR(always_export_symbols, $1)=no
6618_LT_TAGVAR(archive_expsym_cmds, $1)=
6619_LT_TAGVAR(compiler_needs_object, $1)=no
6620_LT_TAGVAR(export_dynamic_flag_spec, $1)=
6621_LT_TAGVAR(hardcode_direct, $1)=no
6622_LT_TAGVAR(hardcode_direct_absolute, $1)=no
6623_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6624_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
6625_LT_TAGVAR(hardcode_libdir_separator, $1)=
6626_LT_TAGVAR(hardcode_minus_L, $1)=no
6627_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
6628_LT_TAGVAR(hardcode_automatic, $1)=no
6629_LT_TAGVAR(inherit_rpath, $1)=no
6630_LT_TAGVAR(module_cmds, $1)=
6631_LT_TAGVAR(module_expsym_cmds, $1)=
6632_LT_TAGVAR(link_all_deplibs, $1)=unknown
6633_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
6634_LT_TAGVAR(no_undefined_flag, $1)=
6635_LT_TAGVAR(whole_archive_flag_spec, $1)=
6636_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
6637
6638# Source file extension for C++ test sources.
6639ac_ext=cpp
6640
6641# Object file extension for compiled C++ test sources.
6642objext=o
6643_LT_TAGVAR(objext, $1)=$objext
6644
6645# No sense in running all these tests if we already determined that
6646# the CXX compiler isn't working.  Some variables (like enable_shared)
6647# are currently assumed to apply to all compilers on this platform,
6648# and will be corrupted by setting them based on a non-working compiler.
6649if test "$_lt_caught_CXX_error" != yes; then
6650  # Code to be used in simple compile tests
6651  lt_simple_compile_test_code="int some_variable = 0;"
6652
6653  # Code to be used in simple link tests
6654  lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
6655
6656  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
6657  _LT_TAG_COMPILER
6658
6659  # save warnings/boilerplate of simple test code
6660  _LT_COMPILER_BOILERPLATE
6661  _LT_LINKER_BOILERPLATE
6662
6663  # Allow CC to be a program name with arguments.
6664  lt_save_CC=$CC
6665  lt_save_LD=$LD
6666  lt_save_GCC=$GCC
6667  GCC=$GXX
6668  lt_save_with_gnu_ld=$with_gnu_ld
6669  lt_save_path_LD=$lt_cv_path_LD
6670  if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
6671    lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
6672  else
6673    $as_unset lt_cv_prog_gnu_ld
6674  fi
6675  if test -n "${lt_cv_path_LDCXX+set}"; then
6676    lt_cv_path_LD=$lt_cv_path_LDCXX
6677  else
6678    $as_unset lt_cv_path_LD
6679  fi
6680  test -z "${LDCXX+set}" || LD=$LDCXX
6681  CC=${CXX-"c++"}
6682  compiler=$CC
6683  _LT_TAGVAR(compiler, $1)=$CC
6684  _LT_CC_BASENAME([$compiler])
6685
6686  if test -n "$compiler"; then
6687    # We don't want -fno-exception when compiling C++ code, so set the
6688    # no_builtin_flag separately
6689    if test "$GXX" = yes; then
6690      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
6691    else
6692      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
6693    fi
6694
6695    if test "$GXX" = yes; then
6696      # Set up default GNU C++ configuration
6697
6698      LT_PATH_LD
6699
6700      # Check if GNU C++ uses GNU ld as the underlying linker, since the
6701      # archiving commands below assume that GNU ld is being used.
6702      if test "$with_gnu_ld" = yes; then
6703        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
6704        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
6705
6706        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6707        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6708
6709        # If archive_cmds runs LD, not CC, wlarc should be empty
6710        # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
6711        #     investigate it a little bit more. (MM)
6712        wlarc='${wl}'
6713
6714        # ancient GNU ld didn't support --whole-archive et. al.
6715        if eval "`$CC -print-prog-name=ld` --help 2>&1" |
6716	  $GREP 'no-whole-archive' > /dev/null; then
6717          _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
6718        else
6719          _LT_TAGVAR(whole_archive_flag_spec, $1)=
6720        fi
6721      else
6722        with_gnu_ld=no
6723        wlarc=
6724
6725        # A generic and very simple default shared library creation
6726        # command for GNU C++ for the case where it uses the native
6727        # linker, instead of GNU ld.  If possible, this setting should
6728        # overridden to take advantage of the native linker features on
6729        # the platform it is being used on.
6730        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
6731      fi
6732
6733      # Commands to make compiler produce verbose output that lists
6734      # what "hidden" libraries, object files and flags are used when
6735      # linking a shared library.
6736      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
6737
6738    else
6739      GXX=no
6740      with_gnu_ld=no
6741      wlarc=
6742    fi
6743
6744    # PORTME: fill in a description of your system's C++ link characteristics
6745    AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
6746    _LT_TAGVAR(ld_shlibs, $1)=yes
6747    case $host_os in
6748      aix3*)
6749        # FIXME: insert proper C++ library support
6750        _LT_TAGVAR(ld_shlibs, $1)=no
6751        ;;
6752      aix[[4-9]]*)
6753        if test "$host_cpu" = ia64; then
6754          # On IA64, the linker does run time linking by default, so we don't
6755          # have to do anything special.
6756          aix_use_runtimelinking=no
6757          exp_sym_flag='-Bexport'
6758          no_entry_flag=""
6759        else
6760          aix_use_runtimelinking=no
6761
6762          # Test if we are trying to use run time linking or normal
6763          # AIX style linking. If -brtl is somewhere in LDFLAGS, we
6764          # need to do runtime linking.
6765          case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
6766	    for ld_flag in $LDFLAGS; do
6767	      case $ld_flag in
6768	      *-brtl*)
6769	        aix_use_runtimelinking=yes
6770	        break
6771	        ;;
6772	      esac
6773	    done
6774	    ;;
6775          esac
6776
6777          exp_sym_flag='-bexport'
6778          no_entry_flag='-bnoentry'
6779        fi
6780
6781        # When large executables or shared objects are built, AIX ld can
6782        # have problems creating the table of contents.  If linking a library
6783        # or program results in "error TOC overflow" add -mminimal-toc to
6784        # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
6785        # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
6786
6787        _LT_TAGVAR(archive_cmds, $1)=''
6788        _LT_TAGVAR(hardcode_direct, $1)=yes
6789        _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6790        _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6791        _LT_TAGVAR(link_all_deplibs, $1)=yes
6792        _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
6793
6794        if test "$GXX" = yes; then
6795          case $host_os in aix4.[[012]]|aix4.[[012]].*)
6796          # We only want to do this on AIX 4.2 and lower, the check
6797          # below for broken collect2 doesn't work under 4.3+
6798	  collect2name=`${CC} -print-prog-name=collect2`
6799	  if test -f "$collect2name" &&
6800	     strings "$collect2name" | $GREP resolve_lib_name >/dev/null
6801	  then
6802	    # We have reworked collect2
6803	    :
6804	  else
6805	    # We have old collect2
6806	    _LT_TAGVAR(hardcode_direct, $1)=unsupported
6807	    # It fails to find uninstalled libraries when the uninstalled
6808	    # path is not listed in the libpath.  Setting hardcode_minus_L
6809	    # to unsupported forces relinking
6810	    _LT_TAGVAR(hardcode_minus_L, $1)=yes
6811	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6812	    _LT_TAGVAR(hardcode_libdir_separator, $1)=
6813	  fi
6814          esac
6815          shared_flag='-shared'
6816	  if test "$aix_use_runtimelinking" = yes; then
6817	    shared_flag="$shared_flag "'${wl}-G'
6818	  fi
6819        else
6820          # not using gcc
6821          if test "$host_cpu" = ia64; then
6822	  # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
6823	  # chokes on -Wl,-G. The following line is correct:
6824	  shared_flag='-G'
6825          else
6826	    if test "$aix_use_runtimelinking" = yes; then
6827	      shared_flag='${wl}-G'
6828	    else
6829	      shared_flag='${wl}-bM:SRE'
6830	    fi
6831          fi
6832        fi
6833
6834        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
6835        # It seems that -bexpall does not export symbols beginning with
6836        # underscore (_), so it is better to generate a list of symbols to
6837	# export.
6838        _LT_TAGVAR(always_export_symbols, $1)=yes
6839        if test "$aix_use_runtimelinking" = yes; then
6840          # Warning - without using the other runtime loading flags (-brtl),
6841          # -berok will link without error, but may produce a broken library.
6842          _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
6843          # Determine the default libpath from the value encoded in an empty
6844          # executable.
6845          _LT_SYS_MODULE_PATH_AIX
6846          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6847
6848          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
6849        else
6850          if test "$host_cpu" = ia64; then
6851	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
6852	    _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
6853	    _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
6854          else
6855	    # Determine the default libpath from the value encoded in an
6856	    # empty executable.
6857	    _LT_SYS_MODULE_PATH_AIX
6858	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6859	    # Warning - without using the other run time loading flags,
6860	    # -berok will link without error, but may produce a broken library.
6861	    _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
6862	    _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
6863	    # Exported symbols can be pulled into shared objects from archives
6864	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
6865	    _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6866	    # This is similar to how AIX traditionally builds its shared
6867	    # libraries.
6868	    _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
6869          fi
6870        fi
6871        ;;
6872
6873      beos*)
6874	if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6875	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6876	  # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
6877	  # support --undefined.  This deserves some investigation.  FIXME
6878	  _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6879	else
6880	  _LT_TAGVAR(ld_shlibs, $1)=no
6881	fi
6882	;;
6883
6884      chorus*)
6885        case $cc_basename in
6886          *)
6887	  # FIXME: insert proper C++ library support
6888	  _LT_TAGVAR(ld_shlibs, $1)=no
6889	  ;;
6890        esac
6891        ;;
6892
6893      cygwin* | mingw* | pw32* | cegcc*)
6894        # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
6895        # as there is no search path for DLLs.
6896        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6897        _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6898        _LT_TAGVAR(always_export_symbols, $1)=no
6899        _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6900
6901        if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
6902          _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
6903          # If the export-symbols file already is a .def file (1st line
6904          # is EXPORTS), use it as is; otherwise, prepend...
6905          _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6906	    cp $export_symbols $output_objdir/$soname.def;
6907          else
6908	    echo EXPORTS > $output_objdir/$soname.def;
6909	    cat $export_symbols >> $output_objdir/$soname.def;
6910          fi~
6911          $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
6912        else
6913          _LT_TAGVAR(ld_shlibs, $1)=no
6914        fi
6915        ;;
6916      darwin* | rhapsody*)
6917        _LT_DARWIN_LINKER_FEATURES($1)
6918	;;
6919
6920      dgux*)
6921        case $cc_basename in
6922          ec++*)
6923	    # FIXME: insert proper C++ library support
6924	    _LT_TAGVAR(ld_shlibs, $1)=no
6925	    ;;
6926          ghcx*)
6927	    # Green Hills C++ Compiler
6928	    # FIXME: insert proper C++ library support
6929	    _LT_TAGVAR(ld_shlibs, $1)=no
6930	    ;;
6931          *)
6932	    # FIXME: insert proper C++ library support
6933	    _LT_TAGVAR(ld_shlibs, $1)=no
6934	    ;;
6935        esac
6936        ;;
6937
6938      freebsd[[12]]*)
6939        # C++ shared libraries reported to be fairly broken before
6940	# switch to ELF
6941        _LT_TAGVAR(ld_shlibs, $1)=no
6942        ;;
6943
6944      freebsd-elf*)
6945        _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6946        ;;
6947
6948      freebsd* | dragonfly*)
6949        # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
6950        # conventions
6951        _LT_TAGVAR(ld_shlibs, $1)=yes
6952        ;;
6953
6954      gnu*)
6955        ;;
6956
6957      hpux9*)
6958        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6959        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6960        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6961        _LT_TAGVAR(hardcode_direct, $1)=yes
6962        _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
6963				             # but as the default
6964				             # location of the library.
6965
6966        case $cc_basename in
6967          CC*)
6968            # FIXME: insert proper C++ library support
6969            _LT_TAGVAR(ld_shlibs, $1)=no
6970            ;;
6971          aCC*)
6972            _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
6973            # Commands to make compiler produce verbose output that lists
6974            # what "hidden" libraries, object files and flags are used when
6975            # linking a shared library.
6976            #
6977            # There doesn't appear to be a way to prevent this compiler from
6978            # explicitly linking system object files so we need to strip them
6979            # from the output so that they don't get included in the library
6980            # dependencies.
6981            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 "X$list" | $Xsed'
6982            ;;
6983          *)
6984            if test "$GXX" = yes; then
6985              _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
6986            else
6987              # FIXME: insert proper C++ library support
6988              _LT_TAGVAR(ld_shlibs, $1)=no
6989            fi
6990            ;;
6991        esac
6992        ;;
6993
6994      hpux10*|hpux11*)
6995        if test $with_gnu_ld = no; then
6996	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6997	  _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6998
6999          case $host_cpu in
7000            hppa*64*|ia64*)
7001              ;;
7002            *)
7003	      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7004              ;;
7005          esac
7006        fi
7007        case $host_cpu in
7008          hppa*64*|ia64*)
7009            _LT_TAGVAR(hardcode_direct, $1)=no
7010            _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7011            ;;
7012          *)
7013            _LT_TAGVAR(hardcode_direct, $1)=yes
7014            _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7015            _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
7016					         # but as the default
7017					         # location of the library.
7018            ;;
7019        esac
7020
7021        case $cc_basename in
7022          CC*)
7023	    # FIXME: insert proper C++ library support
7024	    _LT_TAGVAR(ld_shlibs, $1)=no
7025	    ;;
7026          aCC*)
7027	    case $host_cpu in
7028	      hppa*64*)
7029	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7030	        ;;
7031	      ia64*)
7032	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7033	        ;;
7034	      *)
7035	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7036	        ;;
7037	    esac
7038	    # Commands to make compiler produce verbose output that lists
7039	    # what "hidden" libraries, object files and flags are used when
7040	    # linking a shared library.
7041	    #
7042	    # There doesn't appear to be a way to prevent this compiler from
7043	    # explicitly linking system object files so we need to strip them
7044	    # from the output so that they don't get included in the library
7045	    # dependencies.
7046	    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 "X$list" | $Xsed'
7047	    ;;
7048          *)
7049	    if test "$GXX" = yes; then
7050	      if test $with_gnu_ld = no; then
7051	        case $host_cpu in
7052	          hppa*64*)
7053	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7054	            ;;
7055	          ia64*)
7056	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7057	            ;;
7058	          *)
7059	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7060	            ;;
7061	        esac
7062	      fi
7063	    else
7064	      # FIXME: insert proper C++ library support
7065	      _LT_TAGVAR(ld_shlibs, $1)=no
7066	    fi
7067	    ;;
7068        esac
7069        ;;
7070
7071      interix[[3-9]]*)
7072	_LT_TAGVAR(hardcode_direct, $1)=no
7073	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7074	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7075	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7076	# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
7077	# Instead, shared libraries are loaded at an image base (0x10000000 by
7078	# default) and relocated if they conflict, which is a slow very memory
7079	# consuming and fragmenting process.  To avoid this, we pick a random,
7080	# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
7081	# time.  Moving up from 0x10000000 also allows more sbrk(2) space.
7082	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
7083	_LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
7084	;;
7085      irix5* | irix6*)
7086        case $cc_basename in
7087          CC*)
7088	    # SGI C++
7089	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
7090
7091	    # Archives containing C++ object files must be created using
7092	    # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
7093	    # necessary to make sure instantiated templates are included
7094	    # in the archive.
7095	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
7096	    ;;
7097          *)
7098	    if test "$GXX" = yes; then
7099	      if test "$with_gnu_ld" = no; then
7100	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
7101	      else
7102	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib'
7103	      fi
7104	    fi
7105	    _LT_TAGVAR(link_all_deplibs, $1)=yes
7106	    ;;
7107        esac
7108        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7109        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7110        _LT_TAGVAR(inherit_rpath, $1)=yes
7111        ;;
7112
7113      linux* | k*bsd*-gnu)
7114        case $cc_basename in
7115          KCC*)
7116	    # Kuck and Associates, Inc. (KAI) C++ Compiler
7117
7118	    # KCC will only create a shared library if the output file
7119	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
7120	    # to its proper name (with version) after linking.
7121	    _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
7122	    _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
7123	    # Commands to make compiler produce verbose output that lists
7124	    # what "hidden" libraries, object files and flags are used when
7125	    # linking a shared library.
7126	    #
7127	    # There doesn't appear to be a way to prevent this compiler from
7128	    # explicitly linking system object files so we need to strip them
7129	    # from the output so that they don't get included in the library
7130	    # dependencies.
7131	    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 "X$list" | $Xsed'
7132
7133	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7134	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7135
7136	    # Archives containing C++ object files must be created using
7137	    # "CC -Bstatic", where "CC" is the KAI C++ compiler.
7138	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
7139	    ;;
7140	  icpc* | ecpc* )
7141	    # Intel C++
7142	    with_gnu_ld=yes
7143	    # version 8.0 and above of icpc choke on multiply defined symbols
7144	    # if we add $predep_objects and $postdep_objects, however 7.1 and
7145	    # earlier do not add the objects themselves.
7146	    case `$CC -V 2>&1` in
7147	      *"Version 7."*)
7148	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
7149		_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
7150		;;
7151	      *)  # Version 8.0 or newer
7152	        tmp_idyn=
7153	        case $host_cpu in
7154		  ia64*) tmp_idyn=' -i_dynamic';;
7155		esac
7156	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7157		_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
7158		;;
7159	    esac
7160	    _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7161	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7162	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7163	    _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
7164	    ;;
7165          pgCC* | pgcpp*)
7166            # Portland Group C++ compiler
7167	    case `$CC -V` in
7168	    *pgCC\ [[1-5]]* | *pgcpp\ [[1-5]]*)
7169	      _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
7170		rm -rf $tpldir~
7171		$CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
7172		compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"'
7173	      _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
7174		rm -rf $tpldir~
7175		$CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
7176		$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~
7177		$RANLIB $oldlib'
7178	      _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
7179		rm -rf $tpldir~
7180		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
7181		$CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
7182	      _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
7183		rm -rf $tpldir~
7184		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
7185		$CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
7186	      ;;
7187	    *) # Version 6 will use weak symbols
7188	      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
7189	      _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
7190	      ;;
7191	    esac
7192
7193	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
7194	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7195	    _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
7196            ;;
7197	  cxx*)
7198	    # Compaq C++
7199	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
7200	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname  -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
7201
7202	    runpath_var=LD_RUN_PATH
7203	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
7204	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7205
7206	    # Commands to make compiler produce verbose output that lists
7207	    # what "hidden" libraries, object files and flags are used when
7208	    # linking a shared library.
7209	    #
7210	    # There doesn't appear to be a way to prevent this compiler from
7211	    # explicitly linking system object files so we need to strip them
7212	    # from the output so that they don't get included in the library
7213	    # dependencies.
7214	    output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "X$templist" | $Xsed -e "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 "X$list" | $Xsed'
7215	    ;;
7216	  xl*)
7217	    # IBM XL 8.0 on PPC, with GNU ld
7218	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7219	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7220	    _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7221	    if test "x$supports_anon_versioning" = xyes; then
7222	      _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
7223		cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
7224		echo "local: *; };" >> $output_objdir/$libname.ver~
7225		$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
7226	    fi
7227	    ;;
7228	  *)
7229	    case `$CC -V 2>&1 | sed 5q` in
7230	    *Sun\ C*)
7231	      # Sun C++ 5.9
7232	      _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
7233	      _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7234	      _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
7235	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7236	      _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
7237	      _LT_TAGVAR(compiler_needs_object, $1)=yes
7238
7239	      # Not sure whether something based on
7240	      # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
7241	      # would be better.
7242	      output_verbose_link_cmd='echo'
7243
7244	      # Archives containing C++ object files must be created using
7245	      # "CC -xar", where "CC" is the Sun C++ compiler.  This is
7246	      # necessary to make sure instantiated templates are included
7247	      # in the archive.
7248	      _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
7249	      ;;
7250	    esac
7251	    ;;
7252	esac
7253	;;
7254
7255      lynxos*)
7256        # FIXME: insert proper C++ library support
7257	_LT_TAGVAR(ld_shlibs, $1)=no
7258	;;
7259
7260      m88k*)
7261        # FIXME: insert proper C++ library support
7262        _LT_TAGVAR(ld_shlibs, $1)=no
7263	;;
7264
7265      mvs*)
7266        case $cc_basename in
7267          cxx*)
7268	    # FIXME: insert proper C++ library support
7269	    _LT_TAGVAR(ld_shlibs, $1)=no
7270	    ;;
7271	  *)
7272	    # FIXME: insert proper C++ library support
7273	    _LT_TAGVAR(ld_shlibs, $1)=no
7274	    ;;
7275	esac
7276	;;
7277
7278      netbsd*)
7279        if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
7280	  _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
7281	  wlarc=
7282	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7283	  _LT_TAGVAR(hardcode_direct, $1)=yes
7284	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7285	fi
7286	# Workaround some broken pre-1.5 toolchains
7287	output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
7288	;;
7289
7290      *nto* | *qnx*)
7291        _LT_TAGVAR(ld_shlibs, $1)=yes
7292	;;
7293
7294      openbsd2*)
7295        # C++ shared libraries are fairly broken
7296	_LT_TAGVAR(ld_shlibs, $1)=no
7297	;;
7298
7299      openbsd*)
7300	if test -f /usr/libexec/ld.so; then
7301	  _LT_TAGVAR(hardcode_direct, $1)=yes
7302	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7303	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7304	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
7305	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7306	  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
7307	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
7308	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7309	    _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
7310	  fi
7311	  output_verbose_link_cmd=echo
7312	else
7313	  _LT_TAGVAR(ld_shlibs, $1)=no
7314	fi
7315	;;
7316
7317      osf3* | osf4* | osf5*)
7318        case $cc_basename in
7319          KCC*)
7320	    # Kuck and Associates, Inc. (KAI) C++ Compiler
7321
7322	    # KCC will only create a shared library if the output file
7323	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
7324	    # to its proper name (with version) after linking.
7325	    _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
7326
7327	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7328	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7329
7330	    # Archives containing C++ object files must be created using
7331	    # the KAI C++ compiler.
7332	    case $host in
7333	      osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
7334	      *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
7335	    esac
7336	    ;;
7337          RCC*)
7338	    # Rational C++ 2.4.1
7339	    # FIXME: insert proper C++ library support
7340	    _LT_TAGVAR(ld_shlibs, $1)=no
7341	    ;;
7342          cxx*)
7343	    case $host in
7344	      osf3*)
7345	        _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
7346	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
7347	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7348		;;
7349	      *)
7350	        _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
7351	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
7352	        _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
7353	          echo "-hidden">> $lib.exp~
7354	          $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 "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~
7355	          $RM $lib.exp'
7356	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
7357		;;
7358	    esac
7359
7360	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7361
7362	    # Commands to make compiler produce verbose output that lists
7363	    # what "hidden" libraries, object files and flags are used when
7364	    # linking a shared library.
7365	    #
7366	    # There doesn't appear to be a way to prevent this compiler from
7367	    # explicitly linking system object files so we need to strip them
7368	    # from the output so that they don't get included in the library
7369	    # dependencies.
7370	    output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "X$templist" | $Xsed -e "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 "X$list" | $Xsed'
7371	    ;;
7372	  *)
7373	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
7374	      _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
7375	      case $host in
7376	        osf3*)
7377	          _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
7378		  ;;
7379	        *)
7380	          _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
7381		  ;;
7382	      esac
7383
7384	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7385	      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7386
7387	      # Commands to make compiler produce verbose output that lists
7388	      # what "hidden" libraries, object files and flags are used when
7389	      # linking a shared library.
7390	      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
7391
7392	    else
7393	      # FIXME: insert proper C++ library support
7394	      _LT_TAGVAR(ld_shlibs, $1)=no
7395	    fi
7396	    ;;
7397        esac
7398        ;;
7399
7400      psos*)
7401        # FIXME: insert proper C++ library support
7402        _LT_TAGVAR(ld_shlibs, $1)=no
7403        ;;
7404
7405      sunos4*)
7406        case $cc_basename in
7407          CC*)
7408	    # Sun C++ 4.x
7409	    # FIXME: insert proper C++ library support
7410	    _LT_TAGVAR(ld_shlibs, $1)=no
7411	    ;;
7412          lcc*)
7413	    # Lucid
7414	    # FIXME: insert proper C++ library support
7415	    _LT_TAGVAR(ld_shlibs, $1)=no
7416	    ;;
7417          *)
7418	    # FIXME: insert proper C++ library support
7419	    _LT_TAGVAR(ld_shlibs, $1)=no
7420	    ;;
7421        esac
7422        ;;
7423
7424      solaris*)
7425        case $cc_basename in
7426          CC*)
7427	    # Sun C++ 4.2, 5.x and Centerline C++
7428            _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
7429	    _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
7430	    _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7431	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7432	      $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
7433
7434	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7435	    _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7436	    case $host_os in
7437	      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
7438	      *)
7439		# The compiler driver will combine and reorder linker options,
7440		# but understands `-z linker_flag'.
7441	        # Supported since Solaris 2.6 (maybe 2.5.1?)
7442		_LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
7443	        ;;
7444	    esac
7445	    _LT_TAGVAR(link_all_deplibs, $1)=yes
7446
7447	    output_verbose_link_cmd='echo'
7448
7449	    # Archives containing C++ object files must be created using
7450	    # "CC -xar", where "CC" is the Sun C++ compiler.  This is
7451	    # necessary to make sure instantiated templates are included
7452	    # in the archive.
7453	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
7454	    ;;
7455          gcx*)
7456	    # Green Hills C++ Compiler
7457	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
7458
7459	    # The C++ compiler must be used to create the archive.
7460	    _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
7461	    ;;
7462          *)
7463	    # GNU C++ compiler with Solaris linker
7464	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
7465	      _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
7466	      if $CC --version | $GREP -v '^2\.7' > /dev/null; then
7467	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
7468	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7469		  $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
7470
7471	        # Commands to make compiler produce verbose output that lists
7472	        # what "hidden" libraries, object files and flags are used when
7473	        # linking a shared library.
7474	        output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
7475	      else
7476	        # g++ 2.7 appears to require `-G' NOT `-shared' on this
7477	        # platform.
7478	        _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
7479	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7480		  $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
7481
7482	        # Commands to make compiler produce verbose output that lists
7483	        # what "hidden" libraries, object files and flags are used when
7484	        # linking a shared library.
7485	        output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
7486	      fi
7487
7488	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
7489	      case $host_os in
7490		solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
7491		*)
7492		  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
7493		  ;;
7494	      esac
7495	    fi
7496	    ;;
7497        esac
7498        ;;
7499
7500    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
7501      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
7502      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7503      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7504      runpath_var='LD_RUN_PATH'
7505
7506      case $cc_basename in
7507        CC*)
7508	  _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7509	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7510	  ;;
7511	*)
7512	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7513	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7514	  ;;
7515      esac
7516      ;;
7517
7518      sysv5* | sco3.2v5* | sco5v6*)
7519	# Note: We can NOT use -z defs as we might desire, because we do not
7520	# link with -lc, and that would cause any symbols used from libc to
7521	# always be unresolved, which means just about no library would
7522	# ever link correctly.  If we're not using GNU ld we use -z text
7523	# though, which does catch some bad symbols but isn't as heavy-handed
7524	# as -z defs.
7525	_LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
7526	_LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
7527	_LT_TAGVAR(archive_cmds_need_lc, $1)=no
7528	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7529	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
7530	_LT_TAGVAR(hardcode_libdir_separator, $1)=':'
7531	_LT_TAGVAR(link_all_deplibs, $1)=yes
7532	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
7533	runpath_var='LD_RUN_PATH'
7534
7535	case $cc_basename in
7536          CC*)
7537	    _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7538	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7539	    ;;
7540	  *)
7541	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7542	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7543	    ;;
7544	esac
7545      ;;
7546
7547      tandem*)
7548        case $cc_basename in
7549          NCC*)
7550	    # NonStop-UX NCC 3.20
7551	    # FIXME: insert proper C++ library support
7552	    _LT_TAGVAR(ld_shlibs, $1)=no
7553	    ;;
7554          *)
7555	    # FIXME: insert proper C++ library support
7556	    _LT_TAGVAR(ld_shlibs, $1)=no
7557	    ;;
7558        esac
7559        ;;
7560
7561      vxworks*)
7562        # FIXME: insert proper C++ library support
7563        _LT_TAGVAR(ld_shlibs, $1)=no
7564        ;;
7565
7566      *)
7567        # FIXME: insert proper C++ library support
7568        _LT_TAGVAR(ld_shlibs, $1)=no
7569        ;;
7570    esac
7571
7572    AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
7573    test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
7574
7575    _LT_TAGVAR(GCC, $1)="$GXX"
7576    _LT_TAGVAR(LD, $1)="$LD"
7577
7578    ## CAVEAT EMPTOR:
7579    ## There is no encapsulation within the following macros, do not change
7580    ## the running order or otherwise move them around unless you know exactly
7581    ## what you are doing...
7582    _LT_SYS_HIDDEN_LIBDEPS($1)
7583    _LT_COMPILER_PIC($1)
7584    _LT_COMPILER_C_O($1)
7585    _LT_COMPILER_FILE_LOCKS($1)
7586    _LT_LINKER_SHLIBS($1)
7587    _LT_SYS_DYNAMIC_LINKER($1)
7588    _LT_LINKER_HARDCODE_LIBPATH($1)
7589
7590    _LT_CONFIG($1)
7591  fi # test -n "$compiler"
7592
7593  CC=$lt_save_CC
7594  LDCXX=$LD
7595  LD=$lt_save_LD
7596  GCC=$lt_save_GCC
7597  with_gnu_ld=$lt_save_with_gnu_ld
7598  lt_cv_path_LDCXX=$lt_cv_path_LD
7599  lt_cv_path_LD=$lt_save_path_LD
7600  lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
7601  lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
7602fi # test "$_lt_caught_CXX_error" != yes
7603
7604AC_LANG_POP
7605])# _LT_LANG_CXX_CONFIG
7606
7607
7608# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
7609# ---------------------------------
7610# Figure out "hidden" library dependencies from verbose
7611# compiler output when linking a shared library.
7612# Parse the compiler output and extract the necessary
7613# objects, libraries and library flags.
7614m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
7615[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
7616# Dependencies to place before and after the object being linked:
7617_LT_TAGVAR(predep_objects, $1)=
7618_LT_TAGVAR(postdep_objects, $1)=
7619_LT_TAGVAR(predeps, $1)=
7620_LT_TAGVAR(postdeps, $1)=
7621_LT_TAGVAR(compiler_lib_search_path, $1)=
7622
7623dnl we can't use the lt_simple_compile_test_code here,
7624dnl because it contains code intended for an executable,
7625dnl not a library.  It's possible we should let each
7626dnl tag define a new lt_????_link_test_code variable,
7627dnl but it's only used here...
7628m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
7629int a;
7630void foo (void) { a = 0; }
7631_LT_EOF
7632], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
7633class Foo
7634{
7635public:
7636  Foo (void) { a = 0; }
7637private:
7638  int a;
7639};
7640_LT_EOF
7641], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
7642      subroutine foo
7643      implicit none
7644      integer*4 a
7645      a=0
7646      return
7647      end
7648_LT_EOF
7649], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
7650      subroutine foo
7651      implicit none
7652      integer a
7653      a=0
7654      return
7655      end
7656_LT_EOF
7657], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
7658public class foo {
7659  private int a;
7660  public void bar (void) {
7661    a = 0;
7662  }
7663};
7664_LT_EOF
7665])
7666dnl Parse the compiler output and extract the necessary
7667dnl objects, libraries and library flags.
7668if AC_TRY_EVAL(ac_compile); then
7669  # Parse the compiler output and extract the necessary
7670  # objects, libraries and library flags.
7671
7672  # Sentinel used to keep track of whether or not we are before
7673  # the conftest object file.
7674  pre_test_object_deps_done=no
7675
7676  for p in `eval "$output_verbose_link_cmd"`; do
7677    case $p in
7678
7679    -L* | -R* | -l*)
7680       # Some compilers place space between "-{L,R}" and the path.
7681       # Remove the space.
7682       if test $p = "-L" ||
7683          test $p = "-R"; then
7684	 prev=$p
7685	 continue
7686       else
7687	 prev=
7688       fi
7689
7690       if test "$pre_test_object_deps_done" = no; then
7691	 case $p in
7692	 -L* | -R*)
7693	   # Internal compiler library paths should come after those
7694	   # provided the user.  The postdeps already come after the
7695	   # user supplied libs so there is no need to process them.
7696	   if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
7697	     _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
7698	   else
7699	     _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
7700	   fi
7701	   ;;
7702	 # The "-l" case would never come before the object being
7703	 # linked, so don't bother handling this case.
7704	 esac
7705       else
7706	 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
7707	   _LT_TAGVAR(postdeps, $1)="${prev}${p}"
7708	 else
7709	   _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
7710	 fi
7711       fi
7712       ;;
7713
7714    *.$objext)
7715       # This assumes that the test object file only shows up
7716       # once in the compiler output.
7717       if test "$p" = "conftest.$objext"; then
7718	 pre_test_object_deps_done=yes
7719	 continue
7720       fi
7721
7722       if test "$pre_test_object_deps_done" = no; then
7723	 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
7724	   _LT_TAGVAR(predep_objects, $1)="$p"
7725	 else
7726	   _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
7727	 fi
7728       else
7729	 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
7730	   _LT_TAGVAR(postdep_objects, $1)="$p"
7731	 else
7732	   _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
7733	 fi
7734       fi
7735       ;;
7736
7737    *) ;; # Ignore the rest.
7738
7739    esac
7740  done
7741
7742  # Clean up.
7743  rm -f a.out a.exe
7744else
7745  echo "libtool.m4: error: problem compiling $1 test program"
7746fi
7747
7748$RM -f confest.$objext
7749
7750# PORTME: override above test on systems where it is broken
7751m4_if([$1], [CXX],
7752[case $host_os in
7753interix[[3-9]]*)
7754  # Interix 3.5 installs completely hosed .la files for C++, so rather than
7755  # hack all around it, let's just trust "g++" to DTRT.
7756  _LT_TAGVAR(predep_objects,$1)=
7757  _LT_TAGVAR(postdep_objects,$1)=
7758  _LT_TAGVAR(postdeps,$1)=
7759  ;;
7760
7761linux*)
7762  case `$CC -V 2>&1 | sed 5q` in
7763  *Sun\ C*)
7764    # Sun C++ 5.9
7765
7766    # The more standards-conforming stlport4 library is
7767    # incompatible with the Cstd library. Avoid specifying
7768    # it if it's in CXXFLAGS. Ignore libCrun as
7769    # -library=stlport4 depends on it.
7770    case " $CXX $CXXFLAGS " in
7771    *" -library=stlport4 "*)
7772      solaris_use_stlport4=yes
7773      ;;
7774    esac
7775
7776    if test "$solaris_use_stlport4" != yes; then
7777      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
7778    fi
7779    ;;
7780  esac
7781  ;;
7782
7783solaris*)
7784  case $cc_basename in
7785  CC*)
7786    # The more standards-conforming stlport4 library is
7787    # incompatible with the Cstd library. Avoid specifying
7788    # it if it's in CXXFLAGS. Ignore libCrun as
7789    # -library=stlport4 depends on it.
7790    case " $CXX $CXXFLAGS " in
7791    *" -library=stlport4 "*)
7792      solaris_use_stlport4=yes
7793      ;;
7794    esac
7795
7796    # Adding this requires a known-good setup of shared libraries for
7797    # Sun compiler versions before 5.6, else PIC objects from an old
7798    # archive will be linked into the output, leading to subtle bugs.
7799    if test "$solaris_use_stlport4" != yes; then
7800      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
7801    fi
7802    ;;
7803  esac
7804  ;;
7805esac
7806])
7807
7808case " $_LT_TAGVAR(postdeps, $1) " in
7809*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
7810esac
7811 _LT_TAGVAR(compiler_lib_search_dirs, $1)=
7812if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
7813 _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
7814fi
7815_LT_TAGDECL([], [compiler_lib_search_dirs], [1],
7816    [The directories searched by this compiler when creating a shared library])
7817_LT_TAGDECL([], [predep_objects], [1],
7818    [Dependencies to place before and after the objects being linked to
7819    create a shared library])
7820_LT_TAGDECL([], [postdep_objects], [1])
7821_LT_TAGDECL([], [predeps], [1])
7822_LT_TAGDECL([], [postdeps], [1])
7823_LT_TAGDECL([], [compiler_lib_search_path], [1],
7824    [The library search path used internally by the compiler when linking
7825    a shared library])
7826])# _LT_SYS_HIDDEN_LIBDEPS
7827
7828
7829# _LT_PROG_F77
7830# ------------
7831# Since AC_PROG_F77 is broken, in that it returns the empty string
7832# if there is no fortran compiler, we have our own version here.
7833m4_defun([_LT_PROG_F77],
7834[
7835pushdef([AC_MSG_ERROR], [_lt_disable_F77=yes])
7836AC_PROG_F77
7837if test -z "$F77" || test "X$F77" = "Xno"; then
7838  _lt_disable_F77=yes
7839fi
7840popdef([AC_MSG_ERROR])
7841])# _LT_PROG_F77
7842
7843dnl aclocal-1.4 backwards compatibility:
7844dnl AC_DEFUN([_LT_PROG_F77], [])
7845
7846
7847# _LT_LANG_F77_CONFIG([TAG])
7848# --------------------------
7849# Ensure that the configuration variables for a Fortran 77 compiler are
7850# suitably defined.  These variables are subsequently used by _LT_CONFIG
7851# to write the compiler configuration to `libtool'.
7852m4_defun([_LT_LANG_F77_CONFIG],
7853[AC_REQUIRE([_LT_PROG_F77])dnl
7854AC_LANG_PUSH(Fortran 77)
7855
7856_LT_TAGVAR(archive_cmds_need_lc, $1)=no
7857_LT_TAGVAR(allow_undefined_flag, $1)=
7858_LT_TAGVAR(always_export_symbols, $1)=no
7859_LT_TAGVAR(archive_expsym_cmds, $1)=
7860_LT_TAGVAR(export_dynamic_flag_spec, $1)=
7861_LT_TAGVAR(hardcode_direct, $1)=no
7862_LT_TAGVAR(hardcode_direct_absolute, $1)=no
7863_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
7864_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
7865_LT_TAGVAR(hardcode_libdir_separator, $1)=
7866_LT_TAGVAR(hardcode_minus_L, $1)=no
7867_LT_TAGVAR(hardcode_automatic, $1)=no
7868_LT_TAGVAR(inherit_rpath, $1)=no
7869_LT_TAGVAR(module_cmds, $1)=
7870_LT_TAGVAR(module_expsym_cmds, $1)=
7871_LT_TAGVAR(link_all_deplibs, $1)=unknown
7872_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7873_LT_TAGVAR(no_undefined_flag, $1)=
7874_LT_TAGVAR(whole_archive_flag_spec, $1)=
7875_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
7876
7877# Source file extension for f77 test sources.
7878ac_ext=f
7879
7880# Object file extension for compiled f77 test sources.
7881objext=o
7882_LT_TAGVAR(objext, $1)=$objext
7883
7884# No sense in running all these tests if we already determined that
7885# the F77 compiler isn't working.  Some variables (like enable_shared)
7886# are currently assumed to apply to all compilers on this platform,
7887# and will be corrupted by setting them based on a non-working compiler.
7888if test "$_lt_disable_F77" != yes; then
7889  # Code to be used in simple compile tests
7890  lt_simple_compile_test_code="\
7891      subroutine t
7892      return
7893      end
7894"
7895
7896  # Code to be used in simple link tests
7897  lt_simple_link_test_code="\
7898      program t
7899      end
7900"
7901
7902  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7903  _LT_TAG_COMPILER
7904
7905  # save warnings/boilerplate of simple test code
7906  _LT_COMPILER_BOILERPLATE
7907  _LT_LINKER_BOILERPLATE
7908
7909  # Allow CC to be a program name with arguments.
7910  lt_save_CC="$CC"
7911  lt_save_GCC=$GCC
7912  CC=${F77-"f77"}
7913  compiler=$CC
7914  _LT_TAGVAR(compiler, $1)=$CC
7915  _LT_CC_BASENAME([$compiler])
7916  GCC=$G77
7917  if test -n "$compiler"; then
7918    AC_MSG_CHECKING([if libtool supports shared libraries])
7919    AC_MSG_RESULT([$can_build_shared])
7920
7921    AC_MSG_CHECKING([whether to build shared libraries])
7922    test "$can_build_shared" = "no" && enable_shared=no
7923
7924    # On AIX, shared libraries and static libraries use the same namespace, and
7925    # are all built from PIC.
7926    case $host_os in
7927      aix3*)
7928        test "$enable_shared" = yes && enable_static=no
7929        if test -n "$RANLIB"; then
7930          archive_cmds="$archive_cmds~\$RANLIB \$lib"
7931          postinstall_cmds='$RANLIB $lib'
7932        fi
7933        ;;
7934      aix[[4-9]]*)
7935	if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
7936	  test "$enable_shared" = yes && enable_static=no
7937	fi
7938        ;;
7939    esac
7940    AC_MSG_RESULT([$enable_shared])
7941
7942    AC_MSG_CHECKING([whether to build static libraries])
7943    # Make sure either enable_shared or enable_static is yes.
7944    test "$enable_shared" = yes || enable_static=yes
7945    AC_MSG_RESULT([$enable_static])
7946
7947    _LT_TAGVAR(GCC, $1)="$G77"
7948    _LT_TAGVAR(LD, $1)="$LD"
7949
7950    ## CAVEAT EMPTOR:
7951    ## There is no encapsulation within the following macros, do not change
7952    ## the running order or otherwise move them around unless you know exactly
7953    ## what you are doing...
7954    _LT_COMPILER_PIC($1)
7955    _LT_COMPILER_C_O($1)
7956    _LT_COMPILER_FILE_LOCKS($1)
7957    _LT_LINKER_SHLIBS($1)
7958    _LT_SYS_DYNAMIC_LINKER($1)
7959    _LT_LINKER_HARDCODE_LIBPATH($1)
7960
7961    _LT_CONFIG($1)
7962  fi # test -n "$compiler"
7963
7964  GCC=$lt_save_GCC
7965  CC="$lt_save_CC"
7966fi # test "$_lt_disable_F77" != yes
7967
7968AC_LANG_POP
7969])# _LT_LANG_F77_CONFIG
7970
7971
7972# _LT_PROG_FC
7973# -----------
7974# Since AC_PROG_FC is broken, in that it returns the empty string
7975# if there is no fortran compiler, we have our own version here.
7976m4_defun([_LT_PROG_FC],
7977[
7978pushdef([AC_MSG_ERROR], [_lt_disable_FC=yes])
7979AC_PROG_FC
7980if test -z "$FC" || test "X$FC" = "Xno"; then
7981  _lt_disable_FC=yes
7982fi
7983popdef([AC_MSG_ERROR])
7984])# _LT_PROG_FC
7985
7986dnl aclocal-1.4 backwards compatibility:
7987dnl AC_DEFUN([_LT_PROG_FC], [])
7988
7989
7990# _LT_LANG_FC_CONFIG([TAG])
7991# -------------------------
7992# Ensure that the configuration variables for a Fortran compiler are
7993# suitably defined.  These variables are subsequently used by _LT_CONFIG
7994# to write the compiler configuration to `libtool'.
7995m4_defun([_LT_LANG_FC_CONFIG],
7996[AC_REQUIRE([_LT_PROG_FC])dnl
7997AC_LANG_PUSH(Fortran)
7998
7999_LT_TAGVAR(archive_cmds_need_lc, $1)=no
8000_LT_TAGVAR(allow_undefined_flag, $1)=
8001_LT_TAGVAR(always_export_symbols, $1)=no
8002_LT_TAGVAR(archive_expsym_cmds, $1)=
8003_LT_TAGVAR(export_dynamic_flag_spec, $1)=
8004_LT_TAGVAR(hardcode_direct, $1)=no
8005_LT_TAGVAR(hardcode_direct_absolute, $1)=no
8006_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
8007_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
8008_LT_TAGVAR(hardcode_libdir_separator, $1)=
8009_LT_TAGVAR(hardcode_minus_L, $1)=no
8010_LT_TAGVAR(hardcode_automatic, $1)=no
8011_LT_TAGVAR(inherit_rpath, $1)=no
8012_LT_TAGVAR(module_cmds, $1)=
8013_LT_TAGVAR(module_expsym_cmds, $1)=
8014_LT_TAGVAR(link_all_deplibs, $1)=unknown
8015_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8016_LT_TAGVAR(no_undefined_flag, $1)=
8017_LT_TAGVAR(whole_archive_flag_spec, $1)=
8018_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
8019
8020# Source file extension for fc test sources.
8021ac_ext=${ac_fc_srcext-f}
8022
8023# Object file extension for compiled fc test sources.
8024objext=o
8025_LT_TAGVAR(objext, $1)=$objext
8026
8027# No sense in running all these tests if we already determined that
8028# the FC compiler isn't working.  Some variables (like enable_shared)
8029# are currently assumed to apply to all compilers on this platform,
8030# and will be corrupted by setting them based on a non-working compiler.
8031if test "$_lt_disable_FC" != yes; then
8032  # Code to be used in simple compile tests
8033  lt_simple_compile_test_code="\
8034      subroutine t
8035      return
8036      end
8037"
8038
8039  # Code to be used in simple link tests
8040  lt_simple_link_test_code="\
8041      program t
8042      end
8043"
8044
8045  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8046  _LT_TAG_COMPILER
8047
8048  # save warnings/boilerplate of simple test code
8049  _LT_COMPILER_BOILERPLATE
8050  _LT_LINKER_BOILERPLATE
8051
8052  # Allow CC to be a program name with arguments.
8053  lt_save_CC="$CC"
8054  lt_save_GCC=$GCC
8055  CC=${FC-"f95"}
8056  compiler=$CC
8057  GCC=$ac_cv_fc_compiler_gnu
8058
8059  _LT_TAGVAR(compiler, $1)=$CC
8060  _LT_CC_BASENAME([$compiler])
8061
8062  if test -n "$compiler"; then
8063    AC_MSG_CHECKING([if libtool supports shared libraries])
8064    AC_MSG_RESULT([$can_build_shared])
8065
8066    AC_MSG_CHECKING([whether to build shared libraries])
8067    test "$can_build_shared" = "no" && enable_shared=no
8068
8069    # On AIX, shared libraries and static libraries use the same namespace, and
8070    # are all built from PIC.
8071    case $host_os in
8072      aix3*)
8073        test "$enable_shared" = yes && enable_static=no
8074        if test -n "$RANLIB"; then
8075          archive_cmds="$archive_cmds~\$RANLIB \$lib"
8076          postinstall_cmds='$RANLIB $lib'
8077        fi
8078        ;;
8079      aix[[4-9]]*)
8080	if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
8081	  test "$enable_shared" = yes && enable_static=no
8082	fi
8083        ;;
8084    esac
8085    AC_MSG_RESULT([$enable_shared])
8086
8087    AC_MSG_CHECKING([whether to build static libraries])
8088    # Make sure either enable_shared or enable_static is yes.
8089    test "$enable_shared" = yes || enable_static=yes
8090    AC_MSG_RESULT([$enable_static])
8091
8092    _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
8093    _LT_TAGVAR(LD, $1)="$LD"
8094
8095    ## CAVEAT EMPTOR:
8096    ## There is no encapsulation within the following macros, do not change
8097    ## the running order or otherwise move them around unless you know exactly
8098    ## what you are doing...
8099    _LT_SYS_HIDDEN_LIBDEPS($1)
8100    _LT_COMPILER_PIC($1)
8101    _LT_COMPILER_C_O($1)
8102    _LT_COMPILER_FILE_LOCKS($1)
8103    _LT_LINKER_SHLIBS($1)
8104    _LT_SYS_DYNAMIC_LINKER($1)
8105    _LT_LINKER_HARDCODE_LIBPATH($1)
8106
8107    _LT_CONFIG($1)
8108  fi # test -n "$compiler"
8109
8110  GCC=$lt_save_GCC
8111  CC="$lt_save_CC"
8112fi # test "$_lt_disable_FC" != yes
8113
8114AC_LANG_POP
8115])# _LT_LANG_FC_CONFIG
8116
8117
8118# _LT_LANG_GCJ_CONFIG([TAG])
8119# --------------------------
8120# Ensure that the configuration variables for the GNU Java Compiler compiler
8121# are suitably defined.  These variables are subsequently used by _LT_CONFIG
8122# to write the compiler configuration to `libtool'.
8123m4_defun([_LT_LANG_GCJ_CONFIG],
8124[AC_REQUIRE([LT_PROG_GCJ])dnl
8125AC_LANG_SAVE
8126
8127# Source file extension for Java test sources.
8128ac_ext=java
8129
8130# Object file extension for compiled Java test sources.
8131objext=o
8132_LT_TAGVAR(objext, $1)=$objext
8133
8134# Code to be used in simple compile tests
8135lt_simple_compile_test_code="class foo {}"
8136
8137# Code to be used in simple link tests
8138lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
8139
8140# ltmain only uses $CC for tagged configurations so make sure $CC is set.
8141_LT_TAG_COMPILER
8142
8143# save warnings/boilerplate of simple test code
8144_LT_COMPILER_BOILERPLATE
8145_LT_LINKER_BOILERPLATE
8146
8147# Allow CC to be a program name with arguments.
8148lt_save_CC="$CC"
8149lt_save_GCC=$GCC
8150GCC=yes
8151CC=${GCJ-"gcj"}
8152compiler=$CC
8153_LT_TAGVAR(compiler, $1)=$CC
8154_LT_TAGVAR(LD, $1)="$LD"
8155_LT_CC_BASENAME([$compiler])
8156
8157# GCJ did not exist at the time GCC didn't implicitly link libc in.
8158_LT_TAGVAR(archive_cmds_need_lc, $1)=no
8159
8160_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8161
8162if test -n "$compiler"; then
8163  _LT_COMPILER_NO_RTTI($1)
8164  _LT_COMPILER_PIC($1)
8165  _LT_COMPILER_C_O($1)
8166  _LT_COMPILER_FILE_LOCKS($1)
8167  _LT_LINKER_SHLIBS($1)
8168  _LT_LINKER_HARDCODE_LIBPATH($1)
8169
8170  _LT_CONFIG($1)
8171fi
8172
8173AC_LANG_RESTORE
8174
8175GCC=$lt_save_GCC
8176CC="$lt_save_CC"
8177])# _LT_LANG_GCJ_CONFIG
8178
8179
8180# _LT_LANG_RC_CONFIG([TAG])
8181# -------------------------
8182# Ensure that the configuration variables for the Windows resource compiler
8183# are suitably defined.  These variables are subsequently used by _LT_CONFIG
8184# to write the compiler configuration to `libtool'.
8185m4_defun([_LT_LANG_RC_CONFIG],
8186[AC_REQUIRE([LT_PROG_RC])dnl
8187AC_LANG_SAVE
8188
8189# Source file extension for RC test sources.
8190ac_ext=rc
8191
8192# Object file extension for compiled RC test sources.
8193objext=o
8194_LT_TAGVAR(objext, $1)=$objext
8195
8196# Code to be used in simple compile tests
8197lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
8198
8199# Code to be used in simple link tests
8200lt_simple_link_test_code="$lt_simple_compile_test_code"
8201
8202# ltmain only uses $CC for tagged configurations so make sure $CC is set.
8203_LT_TAG_COMPILER
8204
8205# save warnings/boilerplate of simple test code
8206_LT_COMPILER_BOILERPLATE
8207_LT_LINKER_BOILERPLATE
8208
8209# Allow CC to be a program name with arguments.
8210lt_save_CC="$CC"
8211lt_save_GCC=$GCC
8212GCC=
8213CC=${RC-"windres"}
8214compiler=$CC
8215_LT_TAGVAR(compiler, $1)=$CC
8216_LT_CC_BASENAME([$compiler])
8217_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
8218
8219if test -n "$compiler"; then
8220  :
8221  _LT_CONFIG($1)
8222fi
8223
8224GCC=$lt_save_GCC
8225AC_LANG_RESTORE
8226CC="$lt_save_CC"
8227])# _LT_LANG_RC_CONFIG
8228
8229
8230# LT_PROG_GCJ
8231# -----------
8232AC_DEFUN([LT_PROG_GCJ],
8233[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
8234  [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
8235    [AC_CHECK_TOOL(GCJ, gcj,)
8236      test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
8237      AC_SUBST(GCJFLAGS)])])[]dnl
8238])
8239
8240# Old name:
8241AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
8242dnl aclocal-1.4 backwards compatibility:
8243dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
8244
8245
8246# LT_PROG_RC
8247# ----------
8248AC_DEFUN([LT_PROG_RC],
8249[AC_CHECK_TOOL(RC, windres,)
8250])
8251
8252# Old name:
8253AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
8254dnl aclocal-1.4 backwards compatibility:
8255dnl AC_DEFUN([LT_AC_PROG_RC], [])
8256
8257
8258# _LT_DECL_EGREP
8259# --------------
8260# If we don't have a new enough Autoconf to choose the best grep
8261# available, choose the one first in the user's PATH.
8262m4_defun([_LT_DECL_EGREP],
8263[AC_REQUIRE([AC_PROG_EGREP])dnl
8264AC_REQUIRE([AC_PROG_FGREP])dnl
8265test -z "$GREP" && GREP=grep
8266_LT_DECL([], [GREP], [1], [A grep program that handles long lines])
8267_LT_DECL([], [EGREP], [1], [An ERE matcher])
8268_LT_DECL([], [FGREP], [1], [A literal string matcher])
8269dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
8270AC_SUBST([GREP])
8271])
8272
8273
8274# _LT_DECL_OBJDUMP
8275# --------------
8276# If we don't have a new enough Autoconf to choose the best objdump
8277# available, choose the one first in the user's PATH.
8278m4_defun([_LT_DECL_OBJDUMP],
8279[AC_CHECK_TOOL(OBJDUMP, objdump, false)
8280test -z "$OBJDUMP" && OBJDUMP=objdump
8281_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
8282AC_SUBST([OBJDUMP])
8283])
8284
8285
8286# _LT_DECL_SED
8287# ------------
8288# Check for a fully-functional sed program, that truncates
8289# as few characters as possible.  Prefer GNU sed if found.
8290m4_defun([_LT_DECL_SED],
8291[AC_PROG_SED
8292test -z "$SED" && SED=sed
8293Xsed="$SED -e 1s/^X//"
8294_LT_DECL([], [SED], [1], [A sed program that does not truncate output])
8295_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
8296    [Sed that helps us avoid accidentally triggering echo(1) options like -n])
8297])# _LT_DECL_SED
8298
8299m4_ifndef([AC_PROG_SED], [
8300# NOTE: This macro has been submitted for inclusion into   #
8301#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
8302#  a released version of Autoconf we should remove this    #
8303#  macro and use it instead.                               #
8304
8305m4_defun([AC_PROG_SED],
8306[AC_MSG_CHECKING([for a sed that does not truncate output])
8307AC_CACHE_VAL(lt_cv_path_SED,
8308[# Loop through the user's path and test for sed and gsed.
8309# Then use that list of sed's as ones to test for truncation.
8310as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8311for as_dir in $PATH
8312do
8313  IFS=$as_save_IFS
8314  test -z "$as_dir" && as_dir=.
8315  for lt_ac_prog in sed gsed; do
8316    for ac_exec_ext in '' $ac_executable_extensions; do
8317      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
8318        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
8319      fi
8320    done
8321  done
8322done
8323IFS=$as_save_IFS
8324lt_ac_max=0
8325lt_ac_count=0
8326# Add /usr/xpg4/bin/sed as it is typically found on Solaris
8327# along with /bin/sed that truncates output.
8328for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
8329  test ! -f $lt_ac_sed && continue
8330  cat /dev/null > conftest.in
8331  lt_ac_count=0
8332  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
8333  # Check for GNU sed and select it if it is found.
8334  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
8335    lt_cv_path_SED=$lt_ac_sed
8336    break
8337  fi
8338  while true; do
8339    cat conftest.in conftest.in >conftest.tmp
8340    mv conftest.tmp conftest.in
8341    cp conftest.in conftest.nl
8342    echo >>conftest.nl
8343    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
8344    cmp -s conftest.out conftest.nl || break
8345    # 10000 chars as input seems more than enough
8346    test $lt_ac_count -gt 10 && break
8347    lt_ac_count=`expr $lt_ac_count + 1`
8348    if test $lt_ac_count -gt $lt_ac_max; then
8349      lt_ac_max=$lt_ac_count
8350      lt_cv_path_SED=$lt_ac_sed
8351    fi
8352  done
8353done
8354])
8355SED=$lt_cv_path_SED
8356AC_SUBST([SED])
8357AC_MSG_RESULT([$SED])
8358])#AC_PROG_SED
8359])#m4_ifndef
8360
8361# Old name:
8362AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
8363dnl aclocal-1.4 backwards compatibility:
8364dnl AC_DEFUN([LT_AC_PROG_SED], [])
8365
8366
8367# _LT_CHECK_SHELL_FEATURES
8368# ------------------------
8369# Find out whether the shell is Bourne or XSI compatible,
8370# or has some other useful features.
8371m4_defun([_LT_CHECK_SHELL_FEATURES],
8372[AC_MSG_CHECKING([whether the shell understands some XSI constructs])
8373# Try some XSI features
8374xsi_shell=no
8375( _lt_dummy="a/b/c"
8376  test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
8377      = c,a/b,, \
8378    && eval 'test $(( 1 + 1 )) -eq 2 \
8379    && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
8380  && xsi_shell=yes
8381AC_MSG_RESULT([$xsi_shell])
8382_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
8383
8384AC_MSG_CHECKING([whether the shell understands "+="])
8385lt_shell_append=no
8386( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
8387    >/dev/null 2>&1 \
8388  && lt_shell_append=yes
8389AC_MSG_RESULT([$lt_shell_append])
8390_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
8391
8392if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
8393  lt_unset=unset
8394else
8395  lt_unset=false
8396fi
8397_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
8398
8399# test EBCDIC or ASCII
8400case `echo X|tr X '\101'` in
8401 A) # ASCII based system
8402    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
8403  lt_SP2NL='tr \040 \012'
8404  lt_NL2SP='tr \015\012 \040\040'
8405  ;;
8406 *) # EBCDIC based system
8407  lt_SP2NL='tr \100 \n'
8408  lt_NL2SP='tr \r\n \100\100'
8409  ;;
8410esac
8411_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
8412_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
8413])# _LT_CHECK_SHELL_FEATURES
8414
8415
8416# _LT_PROG_XSI_SHELLFNS
8417# ---------------------
8418# Bourne and XSI compatible variants of some useful shell functions.
8419m4_defun([_LT_PROG_XSI_SHELLFNS],
8420[case $xsi_shell in
8421  yes)
8422    cat << \_LT_EOF >> "$cfgfile"
8423
8424# func_dirname file append nondir_replacement
8425# Compute the dirname of FILE.  If nonempty, add APPEND to the result,
8426# otherwise set result to NONDIR_REPLACEMENT.
8427func_dirname ()
8428{
8429  case ${1} in
8430    */*) func_dirname_result="${1%/*}${2}" ;;
8431    *  ) func_dirname_result="${3}" ;;
8432  esac
8433}
8434
8435# func_basename file
8436func_basename ()
8437{
8438  func_basename_result="${1##*/}"
8439}
8440
8441# func_dirname_and_basename file append nondir_replacement
8442# perform func_basename and func_dirname in a single function
8443# call:
8444#   dirname:  Compute the dirname of FILE.  If nonempty,
8445#             add APPEND to the result, otherwise set result
8446#             to NONDIR_REPLACEMENT.
8447#             value returned in "$func_dirname_result"
8448#   basename: Compute filename of FILE.
8449#             value retuned in "$func_basename_result"
8450# Implementation must be kept synchronized with func_dirname
8451# and func_basename. For efficiency, we do not delegate to
8452# those functions but instead duplicate the functionality here.
8453func_dirname_and_basename ()
8454{
8455  case ${1} in
8456    */*) func_dirname_result="${1%/*}${2}" ;;
8457    *  ) func_dirname_result="${3}" ;;
8458  esac
8459  func_basename_result="${1##*/}"
8460}
8461
8462# func_stripname prefix suffix name
8463# strip PREFIX and SUFFIX off of NAME.
8464# PREFIX and SUFFIX must not contain globbing or regex special
8465# characters, hashes, percent signs, but SUFFIX may contain a leading
8466# dot (in which case that matches only a dot).
8467func_stripname ()
8468{
8469  # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
8470  # positional parameters, so assign one to ordinary parameter first.
8471  func_stripname_result=${3}
8472  func_stripname_result=${func_stripname_result#"${1}"}
8473  func_stripname_result=${func_stripname_result%"${2}"}
8474}
8475
8476# func_opt_split
8477func_opt_split ()
8478{
8479  func_opt_split_opt=${1%%=*}
8480  func_opt_split_arg=${1#*=}
8481}
8482
8483# func_lo2o object
8484func_lo2o ()
8485{
8486  case ${1} in
8487    *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
8488    *)    func_lo2o_result=${1} ;;
8489  esac
8490}
8491
8492# func_xform libobj-or-source
8493func_xform ()
8494{
8495  func_xform_result=${1%.*}.lo
8496}
8497
8498# func_arith arithmetic-term...
8499func_arith ()
8500{
8501  func_arith_result=$(( $[*] ))
8502}
8503
8504# func_len string
8505# STRING may not start with a hyphen.
8506func_len ()
8507{
8508  func_len_result=${#1}
8509}
8510
8511_LT_EOF
8512    ;;
8513  *) # Bourne compatible functions.
8514    cat << \_LT_EOF >> "$cfgfile"
8515
8516# func_dirname file append nondir_replacement
8517# Compute the dirname of FILE.  If nonempty, add APPEND to the result,
8518# otherwise set result to NONDIR_REPLACEMENT.
8519func_dirname ()
8520{
8521  # Extract subdirectory from the argument.
8522  func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
8523  if test "X$func_dirname_result" = "X${1}"; then
8524    func_dirname_result="${3}"
8525  else
8526    func_dirname_result="$func_dirname_result${2}"
8527  fi
8528}
8529
8530# func_basename file
8531func_basename ()
8532{
8533  func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
8534}
8535
8536dnl func_dirname_and_basename
8537dnl A portable version of this function is already defined in general.m4sh
8538dnl so there is no need for it here.
8539
8540# func_stripname prefix suffix name
8541# strip PREFIX and SUFFIX off of NAME.
8542# PREFIX and SUFFIX must not contain globbing or regex special
8543# characters, hashes, percent signs, but SUFFIX may contain a leading
8544# dot (in which case that matches only a dot).
8545# func_strip_suffix prefix name
8546func_stripname ()
8547{
8548  case ${2} in
8549    .*) func_stripname_result=`$ECHO "X${3}" \
8550           | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;;
8551    *)  func_stripname_result=`$ECHO "X${3}" \
8552           | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;;
8553  esac
8554}
8555
8556# sed scripts:
8557my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q'
8558my_sed_long_arg='1s/^-[[^=]]*=//'
8559
8560# func_opt_split
8561func_opt_split ()
8562{
8563  func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"`
8564  func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"`
8565}
8566
8567# func_lo2o object
8568func_lo2o ()
8569{
8570  func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"`
8571}
8572
8573# func_xform libobj-or-source
8574func_xform ()
8575{
8576  func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'`
8577}
8578
8579# func_arith arithmetic-term...
8580func_arith ()
8581{
8582  func_arith_result=`expr "$[@]"`
8583}
8584
8585# func_len string
8586# STRING may not start with a hyphen.
8587func_len ()
8588{
8589  func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len`
8590}
8591
8592_LT_EOF
8593esac
8594
8595case $lt_shell_append in
8596  yes)
8597    cat << \_LT_EOF >> "$cfgfile"
8598
8599# func_append var value
8600# Append VALUE to the end of shell variable VAR.
8601func_append ()
8602{
8603  eval "$[1]+=\$[2]"
8604}
8605_LT_EOF
8606    ;;
8607  *)
8608    cat << \_LT_EOF >> "$cfgfile"
8609
8610# func_append var value
8611# Append VALUE to the end of shell variable VAR.
8612func_append ()
8613{
8614  eval "$[1]=\$$[1]\$[2]"
8615}
8616
8617_LT_EOF
8618    ;;
8619  esac
8620])
8621
8622# ltdl.m4 - Configure ltdl for the target system. -*-Autoconf-*-
8623#
8624#   Copyright (C) 1999-2006, 2007, 2008 Free Software Foundation, Inc.
8625#   Written by Thomas Tanner, 1999
8626#
8627# This file is free software; the Free Software Foundation gives
8628# unlimited permission to copy and/or distribute it, with or without
8629# modifications, as long as this notice is preserved.
8630
8631# serial 17 LTDL_INIT
8632
8633# LT_CONFIG_LTDL_DIR(DIRECTORY, [LTDL-MODE])
8634# ------------------------------------------
8635# DIRECTORY contains the libltdl sources.  It is okay to call this
8636# function multiple times, as long as the same DIRECTORY is always given.
8637AC_DEFUN([LT_CONFIG_LTDL_DIR],
8638[AC_BEFORE([$0], [LTDL_INIT])
8639_$0($*)
8640])# LT_CONFIG_LTDL_DIR
8641
8642# We break this out into a separate macro, so that we can call it safely
8643# internally without being caught accidentally by the sed scan in libtoolize.
8644m4_defun([_LT_CONFIG_LTDL_DIR],
8645[dnl remove trailing slashes
8646m4_pushdef([_ARG_DIR], m4_bpatsubst([$1], [/*$]))
8647m4_case(_LTDL_DIR,
8648	[], [dnl only set lt_ltdl_dir if _ARG_DIR is not simply `.'
8649	     m4_if(_ARG_DIR, [.],
8650	             [],
8651		 [m4_define([_LTDL_DIR], _ARG_DIR)
8652	          _LT_SHELL_INIT([lt_ltdl_dir=']_ARG_DIR['])])],
8653    [m4_if(_ARG_DIR, _LTDL_DIR,
8654	    [],
8655	[m4_fatal([multiple libltdl directories: `]_LTDL_DIR[', `]_ARG_DIR['])])])
8656m4_popdef([_ARG_DIR])
8657])# _LT_CONFIG_LTDL_DIR
8658
8659# Initialise:
8660m4_define([_LTDL_DIR], [])
8661
8662
8663# _LT_BUILD_PREFIX
8664# ----------------
8665# If Autoconf is new enough, expand to `${top_build_prefix}', otherwise
8666# to `${top_builddir}/'.
8667m4_define([_LT_BUILD_PREFIX],
8668[m4_ifdef([AC_AUTOCONF_VERSION],
8669   [m4_if(m4_version_compare(m4_defn([AC_AUTOCONF_VERSION]), [2.62]),
8670	  [-1], [m4_ifdef([_AC_HAVE_TOP_BUILD_PREFIX],
8671			  [${top_build_prefix}],
8672			  [${top_builddir}/])],
8673	  [${top_build_prefix}])],
8674   [${top_builddir}/])[]dnl
8675])
8676
8677
8678# LTDL_CONVENIENCE
8679# ----------------
8680# sets LIBLTDL to the link flags for the libltdl convenience library and
8681# LTDLINCL to the include flags for the libltdl header and adds
8682# --enable-ltdl-convenience to the configure arguments.  Note that
8683# AC_CONFIG_SUBDIRS is not called here.  LIBLTDL will be prefixed with
8684# '${top_build_prefix}' if available, otherwise with '${top_builddir}/',
8685# and LTDLINCL will be prefixed with '${top_srcdir}/' (note the single
8686# quotes!).  If your package is not flat and you're not using automake,
8687# define top_build_prefix, top_builddir, and top_srcdir appropriately
8688# in your Makefiles.
8689AC_DEFUN([LTDL_CONVENIENCE],
8690[AC_BEFORE([$0], [LTDL_INIT])dnl
8691dnl Although the argument is deprecated and no longer documented,
8692dnl LTDL_CONVENIENCE used to take a DIRECTORY orgument, if we have one
8693dnl here make sure it is the same as any other declaration of libltdl's
8694dnl location!  This also ensures lt_ltdl_dir is set when configure.ac is
8695dnl not yet using an explicit LT_CONFIG_LTDL_DIR.
8696m4_ifval([$1], [_LT_CONFIG_LTDL_DIR([$1])])dnl
8697_$0()
8698])# LTDL_CONVENIENCE
8699
8700# AC_LIBLTDL_CONVENIENCE accepted a directory argument in older libtools,
8701# now we have LT_CONFIG_LTDL_DIR:
8702AU_DEFUN([AC_LIBLTDL_CONVENIENCE],
8703[_LT_CONFIG_LTDL_DIR([m4_default([$1], [libltdl])])
8704_LTDL_CONVENIENCE])
8705
8706dnl aclocal-1.4 backwards compatibility:
8707dnl AC_DEFUN([AC_LIBLTDL_CONVENIENCE], [])
8708
8709
8710# _LTDL_CONVENIENCE
8711# -----------------
8712# Code shared by LTDL_CONVENIENCE and LTDL_INIT([convenience]).
8713m4_defun([_LTDL_CONVENIENCE],
8714[case $enable_ltdl_convenience in
8715  no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
8716  "") enable_ltdl_convenience=yes
8717      ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
8718esac
8719LIBLTDL='_LT_BUILD_PREFIX'"${lt_ltdl_dir+$lt_ltdl_dir/}libltdlc.la"
8720LTDLDEPS=$LIBLTDL
8721LTDLINCL='-I${top_srcdir}'"${lt_ltdl_dir+/$lt_ltdl_dir}"
8722
8723AC_SUBST([LIBLTDL])
8724AC_SUBST([LTDLDEPS])
8725AC_SUBST([LTDLINCL])
8726
8727# For backwards non-gettext consistent compatibility...
8728INCLTDL="$LTDLINCL"
8729AC_SUBST([INCLTDL])
8730])# _LTDL_CONVENIENCE
8731
8732
8733# LTDL_INSTALLABLE
8734# ----------------
8735# sets LIBLTDL to the link flags for the libltdl installable library
8736# and LTDLINCL to the include flags for the libltdl header and adds
8737# --enable-ltdl-install to the configure arguments.  Note that
8738# AC_CONFIG_SUBDIRS is not called from here.  If an installed libltdl
8739# is not found, LIBLTDL will be prefixed with '${top_build_prefix}' if
8740# available, otherwise with '${top_builddir}/', and LTDLINCL will be
8741# prefixed with '${top_srcdir}/' (note the single quotes!).  If your
8742# package is not flat and you're not using automake, define top_build_prefix,
8743# top_builddir, and top_srcdir appropriately in your Makefiles.
8744# In the future, this macro may have to be called after LT_INIT.
8745AC_DEFUN([LTDL_INSTALLABLE],
8746[AC_BEFORE([$0], [LTDL_INIT])dnl
8747dnl Although the argument is deprecated and no longer documented,
8748dnl LTDL_INSTALLABLE used to take a DIRECTORY orgument, if we have one
8749dnl here make sure it is the same as any other declaration of libltdl's
8750dnl location!  This also ensures lt_ltdl_dir is set when configure.ac is
8751dnl not yet using an explicit LT_CONFIG_LTDL_DIR.
8752m4_ifval([$1], [_LT_CONFIG_LTDL_DIR([$1])])dnl
8753_$0()
8754])# LTDL_INSTALLABLE
8755
8756# AC_LIBLTDL_INSTALLABLE accepted a directory argument in older libtools,
8757# now we have LT_CONFIG_LTDL_DIR:
8758AU_DEFUN([AC_LIBLTDL_INSTALLABLE],
8759[_LT_CONFIG_LTDL_DIR([m4_default([$1], [libltdl])])
8760_LTDL_INSTALLABLE])
8761
8762dnl aclocal-1.4 backwards compatibility:
8763dnl AC_DEFUN([AC_LIBLTDL_INSTALLABLE], [])
8764
8765
8766# _LTDL_INSTALLABLE
8767# -----------------
8768# Code shared by LTDL_INSTALLABLE and LTDL_INIT([installable]).
8769m4_defun([_LTDL_INSTALLABLE],
8770[if test -f $prefix/lib/libltdl.la; then
8771  lt_save_LDFLAGS="$LDFLAGS"
8772  LDFLAGS="-L$prefix/lib $LDFLAGS"
8773  AC_CHECK_LIB([ltdl], [lt_dlinit], [lt_lib_ltdl=yes])
8774  LDFLAGS="$lt_save_LDFLAGS"
8775  if test x"${lt_lib_ltdl-no}" = xyes; then
8776    if test x"$enable_ltdl_install" != xyes; then
8777      # Don't overwrite $prefix/lib/libltdl.la without --enable-ltdl-install
8778      AC_MSG_WARN([not overwriting libltdl at $prefix, force with `--enable-ltdl-install'])
8779      enable_ltdl_install=no
8780    fi
8781  elif test x"$enable_ltdl_install" = xno; then
8782    AC_MSG_WARN([libltdl not installed, but installation disabled])
8783  fi
8784fi
8785
8786# If configure.ac declared an installable ltdl, and the user didn't override
8787# with --disable-ltdl-install, we will install the shipped libltdl.
8788case $enable_ltdl_install in
8789  no) ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
8790      LIBLTDL="-lltdl"
8791      LTDLDEPS=
8792      LTDLINCL=
8793      ;;
8794  *)  enable_ltdl_install=yes
8795      ac_configure_args="$ac_configure_args --enable-ltdl-install"
8796      LIBLTDL='_LT_BUILD_PREFIX'"${lt_ltdl_dir+$lt_ltdl_dir/}libltdl.la"
8797      LTDLDEPS=$LIBLTDL
8798      LTDLINCL='-I${top_srcdir}'"${lt_ltdl_dir+/$lt_ltdl_dir}"
8799      ;;
8800esac
8801
8802AC_SUBST([LIBLTDL])
8803AC_SUBST([LTDLDEPS])
8804AC_SUBST([LTDLINCL])
8805
8806# For backwards non-gettext consistent compatibility...
8807INCLTDL="$LTDLINCL"
8808AC_SUBST([INCLTDL])
8809])# LTDL_INSTALLABLE
8810
8811
8812# _LTDL_MODE_DISPATCH
8813# -------------------
8814m4_define([_LTDL_MODE_DISPATCH],
8815[dnl If _LTDL_DIR is `.', then we are configuring libltdl itself:
8816m4_if(_LTDL_DIR, [],
8817	[],
8818    dnl if _LTDL_MODE was not set already, the default value is `subproject':
8819    [m4_case(m4_default(_LTDL_MODE, [subproject]),
8820	  [subproject], [AC_CONFIG_SUBDIRS(_LTDL_DIR)
8821			  _LT_SHELL_INIT([lt_dlopen_dir="$lt_ltdl_dir"])],
8822	  [nonrecursive], [_LT_SHELL_INIT([lt_dlopen_dir="$lt_ltdl_dir"; lt_libobj_prefix="$lt_ltdl_dir/"])],
8823	  [recursive], [],
8824	[m4_fatal([unknown libltdl mode: ]_LTDL_MODE)])])dnl
8825dnl Be careful not to expand twice:
8826m4_define([$0], [])
8827])# _LTDL_MODE_DISPATCH
8828
8829
8830# _LT_LIBOBJ(MODULE_NAME)
8831# -----------------------
8832# Like AC_LIBOBJ, except that MODULE_NAME goes into _LT_LIBOBJS instead
8833# of into LIBOBJS.
8834AC_DEFUN([_LT_LIBOBJ], [
8835  m4_pattern_allow([^_LT_LIBOBJS$])
8836  _LT_LIBOBJS="$_LT_LIBOBJS $1.$ac_objext"
8837])# _LT_LIBOBJS
8838
8839
8840# LTDL_INIT([OPTIONS])
8841# --------------------
8842# Clients of libltdl can use this macro to allow the installer to
8843# choose between a shipped copy of the ltdl sources or a preinstalled
8844# version of the library.  If the shipped ltdl sources are not in a
8845# subdirectory named libltdl, the directory name must be given by
8846# LT_CONFIG_LTDL_DIR.
8847AC_DEFUN([LTDL_INIT],
8848[dnl Parse OPTIONS
8849_LT_SET_OPTIONS([$0], [$1])
8850
8851dnl We need to keep our own list of libobjs separate from our parent project,
8852dnl and the easiest way to do that is redefine the AC_LIBOBJs macro while
8853dnl we look for our own LIBOBJs.
8854m4_pushdef([AC_LIBOBJ], m4_defn([_LT_LIBOBJ]))
8855m4_pushdef([AC_LIBSOURCES])
8856
8857dnl If not otherwise defined, default to the 1.5.x compatible subproject mode:
8858m4_if(_LTDL_MODE, [],
8859        [m4_define([_LTDL_MODE], m4_default([$2], [subproject]))
8860        m4_if([-1], [m4_bregexp(_LTDL_MODE, [\(subproject\|\(non\)?recursive\)])],
8861                [m4_fatal([unknown libltdl mode: ]_LTDL_MODE)])])
8862
8863AC_ARG_WITH([included_ltdl],
8864    [AS_HELP_STRING([--with-included-ltdl],
8865                    [use the GNU ltdl sources included here])])
8866
8867if test "x$with_included_ltdl" != xyes; then
8868  # We are not being forced to use the included libltdl sources, so
8869  # decide whether there is a useful installed version we can use.
8870  AC_CHECK_HEADER([ltdl.h],
8871      [AC_CHECK_DECL([lt_dlinterface_register],
8872	   [AC_CHECK_LIB([ltdl], [lt_dladvise_preload],
8873	       [with_included_ltdl=no],
8874	       [with_included_ltdl=yes])],
8875	   [with_included_ltdl=yes],
8876	   [AC_INCLUDES_DEFAULT
8877	    #include <ltdl.h>])],
8878      [with_included_ltdl=yes],
8879      [AC_INCLUDES_DEFAULT]
8880  )
8881fi
8882
8883dnl If neither LT_CONFIG_LTDL_DIR, LTDL_CONVENIENCE nor LTDL_INSTALLABLE
8884dnl was called yet, then for old times' sake, we assume libltdl is in an
8885dnl eponymous directory:
8886AC_PROVIDE_IFELSE([LT_CONFIG_LTDL_DIR], [], [_LT_CONFIG_LTDL_DIR([libltdl])])
8887
8888AC_ARG_WITH([ltdl_include],
8889    [AS_HELP_STRING([--with-ltdl-include=DIR],
8890                    [use the ltdl headers installed in DIR])])
8891
8892if test -n "$with_ltdl_include"; then
8893  if test -f "$with_ltdl_include/ltdl.h"; then :
8894  else
8895    AC_MSG_ERROR([invalid ltdl include directory: `$with_ltdl_include'])
8896  fi
8897else
8898  with_ltdl_include=no
8899fi
8900
8901AC_ARG_WITH([ltdl_lib],
8902    [AS_HELP_STRING([--with-ltdl-lib=DIR],
8903                    [use the libltdl.la installed in DIR])])
8904
8905if test -n "$with_ltdl_lib"; then
8906  if test -f "$with_ltdl_lib/libltdl.la"; then :
8907  else
8908    AC_MSG_ERROR([invalid ltdl library directory: `$with_ltdl_lib'])
8909  fi
8910else
8911  with_ltdl_lib=no
8912fi
8913
8914case ,$with_included_ltdl,$with_ltdl_include,$with_ltdl_lib, in
8915  ,yes,no,no,)
8916	m4_case(m4_default(_LTDL_TYPE, [convenience]),
8917	    [convenience], [_LTDL_CONVENIENCE],
8918	    [installable], [_LTDL_INSTALLABLE],
8919	  [m4_fatal([unknown libltdl build type: ]_LTDL_TYPE)])
8920	;;
8921  ,no,no,no,)
8922	# If the included ltdl is not to be used, then use the
8923	# preinstalled libltdl we found.
8924	AC_DEFINE([HAVE_LTDL], [1],
8925	  [Define this if a modern libltdl is already installed])
8926	LIBLTDL=-lltdl
8927	LTDLDEPS=
8928	LTDLINCL=
8929	;;
8930  ,no*,no,*)
8931	AC_MSG_ERROR([`--with-ltdl-include' and `--with-ltdl-lib' options must be used together])
8932	;;
8933  *)	with_included_ltdl=no
8934	LIBLTDL="-L$with_ltdl_lib -lltdl"
8935	LTDLDEPS=
8936	LTDLINCL="-I$with_ltdl_include"
8937	;;
8938esac
8939INCLTDL="$LTDLINCL"
8940
8941# Report our decision...
8942AC_MSG_CHECKING([where to find libltdl headers])
8943AC_MSG_RESULT([$LTDLINCL])
8944AC_MSG_CHECKING([where to find libltdl library])
8945AC_MSG_RESULT([$LIBLTDL])
8946
8947_LTDL_SETUP
8948
8949dnl restore autoconf definition.
8950m4_popdef([AC_LIBOBJ])
8951m4_popdef([AC_LIBSOURCES])
8952
8953AC_CONFIG_COMMANDS_PRE([
8954    _ltdl_libobjs=
8955    _ltdl_ltlibobjs=
8956    if test -n "$_LT_LIBOBJS"; then
8957      # Remove the extension.
8958      _lt_sed_drop_objext='s/\.o$//;s/\.obj$//'
8959      for i in `for i in $_LT_LIBOBJS; do echo "$i"; done | sed "$_lt_sed_drop_objext" | sort -u`; do
8960        _ltdl_libobjs="$_ltdl_libobjs $lt_libobj_prefix$i.$ac_objext"
8961        _ltdl_ltlibobjs="$_ltdl_ltlibobjs $lt_libobj_prefix$i.lo"
8962      done
8963    fi
8964    AC_SUBST([ltdl_LIBOBJS], [$_ltdl_libobjs])
8965    AC_SUBST([ltdl_LTLIBOBJS], [$_ltdl_ltlibobjs])
8966])
8967
8968# Only expand once:
8969m4_define([LTDL_INIT])
8970])# LTDL_INIT
8971
8972# Old names:
8973AU_DEFUN([AC_LIB_LTDL], [LTDL_INIT($@)])
8974AU_DEFUN([AC_WITH_LTDL], [LTDL_INIT($@)])
8975AU_DEFUN([LT_WITH_LTDL], [LTDL_INIT($@)])
8976dnl aclocal-1.4 backwards compatibility:
8977dnl AC_DEFUN([AC_LIB_LTDL], [])
8978dnl AC_DEFUN([AC_WITH_LTDL], [])
8979dnl AC_DEFUN([LT_WITH_LTDL], [])
8980
8981
8982# _LTDL_SETUP
8983# -----------
8984# Perform all the checks necessary for compilation of the ltdl objects
8985#  -- including compiler checks and header checks.  This is a public
8986# interface  mainly for the benefit of libltdl's own configure.ac, most
8987# other users should call LTDL_INIT instead.
8988AC_DEFUN([_LTDL_SETUP],
8989[AC_REQUIRE([AC_PROG_CC])dnl
8990AC_REQUIRE([LT_SYS_MODULE_EXT])dnl
8991AC_REQUIRE([LT_SYS_MODULE_PATH])dnl
8992AC_REQUIRE([LT_SYS_DLSEARCH_PATH])dnl
8993AC_REQUIRE([LT_LIB_DLLOAD])dnl
8994AC_REQUIRE([LT_SYS_SYMBOL_USCORE])dnl
8995AC_REQUIRE([LT_FUNC_DLSYM_USCORE])dnl
8996AC_REQUIRE([LT_SYS_DLOPEN_DEPLIBS])dnl
8997AC_REQUIRE([gl_FUNC_ARGZ])dnl
8998
8999m4_require([_LT_CHECK_OBJDIR])dnl
9000m4_require([_LT_HEADER_DLFCN])dnl
9001m4_require([_LT_CHECK_DLPREOPEN])dnl
9002m4_require([_LT_DECL_SED])dnl
9003
9004dnl Don't require this, or it will be expanded earlier than the code
9005dnl that sets the variables it relies on:
9006_LT_ENABLE_INSTALL
9007
9008dnl _LTDL_MODE specific code must be called at least once:
9009_LTDL_MODE_DISPATCH
9010
9011# In order that ltdl.c can compile, find out the first AC_CONFIG_HEADERS
9012# the user used.  This is so that ltdl.h can pick up the parent projects
9013# config.h file, The first file in AC_CONFIG_HEADERS must contain the
9014# definitions required by ltdl.c.
9015# FIXME: Remove use of undocumented AC_LIST_HEADERS (2.59 compatibility).
9016AC_CONFIG_COMMANDS_PRE([dnl
9017m4_pattern_allow([^LT_CONFIG_H$])dnl
9018m4_ifset([AH_HEADER],
9019    [LT_CONFIG_H=AH_HEADER],
9020    [m4_ifset([AC_LIST_HEADERS],
9021	    [LT_CONFIG_H=`echo "AC_LIST_HEADERS" | $SED 's,^[[      ]]*,,;s,[[ :]].*$,,'`],
9022	[])])])
9023AC_SUBST([LT_CONFIG_H])
9024
9025AC_CHECK_HEADERS([unistd.h dl.h sys/dl.h dld.h mach-o/dyld.h dirent.h],
9026	[], [], [AC_INCLUDES_DEFAULT])
9027
9028AC_CHECK_FUNCS([closedir opendir readdir], [], [AC_LIBOBJ([lt__dirent])])
9029AC_CHECK_FUNCS([strlcat strlcpy], [], [AC_LIBOBJ([lt__strl])])
9030
9031AC_DEFINE_UNQUOTED([LT_LIBEXT],["$libext"],[The archive extension])
9032
9033name=ltdl
9034LTDLOPEN=`eval "\\$ECHO \"$libname_spec\""`
9035AC_SUBST([LTDLOPEN])
9036])# _LTDL_SETUP
9037
9038
9039# _LT_ENABLE_INSTALL
9040# ------------------
9041m4_define([_LT_ENABLE_INSTALL],
9042[AC_ARG_ENABLE([ltdl-install],
9043    [AS_HELP_STRING([--enable-ltdl-install], [install libltdl])])
9044
9045case ,${enable_ltdl_install},${enable_ltdl_convenience} in
9046  *yes*) ;;
9047  *) enable_ltdl_convenience=yes ;;
9048esac
9049
9050m4_ifdef([AM_CONDITIONAL],
9051[AM_CONDITIONAL(INSTALL_LTDL, test x"${enable_ltdl_install-no}" != xno)
9052 AM_CONDITIONAL(CONVENIENCE_LTDL, test x"${enable_ltdl_convenience-no}" != xno)])
9053])# _LT_ENABLE_INSTALL
9054
9055
9056# LT_SYS_DLOPEN_DEPLIBS
9057# ---------------------
9058AC_DEFUN([LT_SYS_DLOPEN_DEPLIBS],
9059[AC_REQUIRE([AC_CANONICAL_HOST])dnl
9060AC_CACHE_CHECK([whether deplibs are loaded by dlopen],
9061  [lt_cv_sys_dlopen_deplibs],
9062  [# PORTME does your system automatically load deplibs for dlopen?
9063  # or its logical equivalent (e.g. shl_load for HP-UX < 11)
9064  # For now, we just catch OSes we know something about -- in the
9065  # future, we'll try test this programmatically.
9066  lt_cv_sys_dlopen_deplibs=unknown
9067  case $host_os in
9068  aix3*|aix4.1.*|aix4.2.*)
9069    # Unknown whether this is true for these versions of AIX, but
9070    # we want this `case' here to explicitly catch those versions.
9071    lt_cv_sys_dlopen_deplibs=unknown
9072    ;;
9073  aix[[4-9]]*)
9074    lt_cv_sys_dlopen_deplibs=yes
9075    ;;
9076  amigaos*)
9077    case $host_cpu in
9078    powerpc)
9079      lt_cv_sys_dlopen_deplibs=no
9080      ;;
9081    esac
9082    ;;
9083  darwin*)
9084    # Assuming the user has installed a libdl from somewhere, this is true
9085    # If you are looking for one http://www.opendarwin.org/projects/dlcompat
9086    lt_cv_sys_dlopen_deplibs=yes
9087    ;;
9088  freebsd* | dragonfly*)
9089    lt_cv_sys_dlopen_deplibs=yes
9090    ;;
9091  gnu* | linux* | k*bsd*-gnu)
9092    # GNU and its variants, using gnu ld.so (Glibc)
9093    lt_cv_sys_dlopen_deplibs=yes
9094    ;;
9095  hpux10*|hpux11*)
9096    lt_cv_sys_dlopen_deplibs=yes
9097    ;;
9098  interix*)
9099    lt_cv_sys_dlopen_deplibs=yes
9100    ;;
9101  irix[[12345]]*|irix6.[[01]]*)
9102    # Catch all versions of IRIX before 6.2, and indicate that we don't
9103    # know how it worked for any of those versions.
9104    lt_cv_sys_dlopen_deplibs=unknown
9105    ;;
9106  irix*)
9107    # The case above catches anything before 6.2, and it's known that
9108    # at 6.2 and later dlopen does load deplibs.
9109    lt_cv_sys_dlopen_deplibs=yes
9110    ;;
9111  netbsd*)
9112    lt_cv_sys_dlopen_deplibs=yes
9113    ;;
9114  openbsd*)
9115    lt_cv_sys_dlopen_deplibs=yes
9116    ;;
9117  osf[[1234]]*)
9118    # dlopen did load deplibs (at least at 4.x), but until the 5.x series,
9119    # it did *not* use an RPATH in a shared library to find objects the
9120    # library depends on, so we explicitly say `no'.
9121    lt_cv_sys_dlopen_deplibs=no
9122    ;;
9123  osf5.0|osf5.0a|osf5.1)
9124    # dlopen *does* load deplibs and with the right loader patch applied
9125    # it even uses RPATH in a shared library to search for shared objects
9126    # that the library depends on, but there's no easy way to know if that
9127    # patch is installed.  Since this is the case, all we can really
9128    # say is unknown -- it depends on the patch being installed.  If
9129    # it is, this changes to `yes'.  Without it, it would be `no'.
9130    lt_cv_sys_dlopen_deplibs=unknown
9131    ;;
9132  osf*)
9133    # the two cases above should catch all versions of osf <= 5.1.  Read
9134    # the comments above for what we know about them.
9135    # At > 5.1, deplibs are loaded *and* any RPATH in a shared library
9136    # is used to find them so we can finally say `yes'.
9137    lt_cv_sys_dlopen_deplibs=yes
9138    ;;
9139  qnx*)
9140    lt_cv_sys_dlopen_deplibs=yes
9141    ;;
9142  solaris*)
9143    lt_cv_sys_dlopen_deplibs=yes
9144    ;;
9145  sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
9146    libltdl_cv_sys_dlopen_deplibs=yes
9147    ;;
9148  esac
9149  ])
9150if test "$lt_cv_sys_dlopen_deplibs" != yes; then
9151 AC_DEFINE([LTDL_DLOPEN_DEPLIBS], [1],
9152    [Define if the OS needs help to load dependent libraries for dlopen().])
9153fi
9154])# LT_SYS_DLOPEN_DEPLIBS
9155
9156# Old name:
9157AU_ALIAS([AC_LTDL_SYS_DLOPEN_DEPLIBS], [LT_SYS_DLOPEN_DEPLIBS])
9158dnl aclocal-1.4 backwards compatibility:
9159dnl AC_DEFUN([AC_LTDL_SYS_DLOPEN_DEPLIBS], [])
9160
9161
9162# LT_SYS_MODULE_EXT
9163# -----------------
9164AC_DEFUN([LT_SYS_MODULE_EXT],
9165[m4_require([_LT_SYS_DYNAMIC_LINKER])dnl
9166AC_CACHE_CHECK([which extension is used for runtime loadable modules],
9167  [libltdl_cv_shlibext],
9168[
9169module=yes
9170eval libltdl_cv_shlibext=$shrext_cmds
9171  ])
9172if test -n "$libltdl_cv_shlibext"; then
9173  m4_pattern_allow([LT_MODULE_EXT])dnl
9174  AC_DEFINE_UNQUOTED([LT_MODULE_EXT], ["$libltdl_cv_shlibext"],
9175    [Define to the extension used for runtime loadable modules, say, ".so".])
9176fi
9177])# LT_SYS_MODULE_EXT
9178
9179# Old name:
9180AU_ALIAS([AC_LTDL_SHLIBEXT], [LT_SYS_MODULE_EXT])
9181dnl aclocal-1.4 backwards compatibility:
9182dnl AC_DEFUN([AC_LTDL_SHLIBEXT], [])
9183
9184
9185# LT_SYS_MODULE_PATH
9186# ------------------
9187AC_DEFUN([LT_SYS_MODULE_PATH],
9188[m4_require([_LT_SYS_DYNAMIC_LINKER])dnl
9189AC_CACHE_CHECK([which variable specifies run-time module search path],
9190  [lt_cv_module_path_var], [lt_cv_module_path_var="$shlibpath_var"])
9191if test -n "$lt_cv_module_path_var"; then
9192  m4_pattern_allow([LT_MODULE_PATH_VAR])dnl
9193  AC_DEFINE_UNQUOTED([LT_MODULE_PATH_VAR], ["$lt_cv_module_path_var"],
9194    [Define to the name of the environment variable that determines the run-time module search path.])
9195fi
9196])# LT_SYS_MODULE_PATH
9197
9198# Old name:
9199AU_ALIAS([AC_LTDL_SHLIBPATH], [LT_SYS_MODULE_PATH])
9200dnl aclocal-1.4 backwards compatibility:
9201dnl AC_DEFUN([AC_LTDL_SHLIBPATH], [])
9202
9203
9204# LT_SYS_DLSEARCH_PATH
9205# --------------------
9206AC_DEFUN([LT_SYS_DLSEARCH_PATH],
9207[m4_require([_LT_SYS_DYNAMIC_LINKER])dnl
9208AC_CACHE_CHECK([for the default library search path],
9209  [lt_cv_sys_dlsearch_path],
9210  [lt_cv_sys_dlsearch_path="$sys_lib_dlsearch_path_spec"])
9211if test -n "$lt_cv_sys_dlsearch_path"; then
9212  sys_dlsearch_path=
9213  for dir in $lt_cv_sys_dlsearch_path; do
9214    if test -z "$sys_dlsearch_path"; then
9215      sys_dlsearch_path="$dir"
9216    else
9217      sys_dlsearch_path="$sys_dlsearch_path$PATH_SEPARATOR$dir"
9218    fi
9219  done
9220  m4_pattern_allow([LT_DLSEARCH_PATH])dnl
9221  AC_DEFINE_UNQUOTED([LT_DLSEARCH_PATH], ["$sys_dlsearch_path"],
9222    [Define to the system default library search path.])
9223fi
9224])# LT_SYS_DLSEARCH_PATH
9225
9226# Old name:
9227AU_ALIAS([AC_LTDL_SYSSEARCHPATH], [LT_SYS_DLSEARCH_PATH])
9228dnl aclocal-1.4 backwards compatibility:
9229dnl AC_DEFUN([AC_LTDL_SYSSEARCHPATH], [])
9230
9231
9232# _LT_CHECK_DLPREOPEN
9233# -------------------
9234m4_defun([_LT_CHECK_DLPREOPEN],
9235[m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
9236AC_CACHE_CHECK([whether libtool supports -dlopen/-dlpreopen],
9237  [libltdl_cv_preloaded_symbols],
9238  [if test -n "$lt_cv_sys_global_symbol_pipe"; then
9239    libltdl_cv_preloaded_symbols=yes
9240  else
9241    libltdl_cv_preloaded_symbols=no
9242  fi
9243  ])
9244if test x"$libltdl_cv_preloaded_symbols" = xyes; then
9245  AC_DEFINE([HAVE_PRELOADED_SYMBOLS], [1],
9246    [Define if libtool can extract symbol lists from object files.])
9247fi
9248])# _LT_CHECK_DLPREOPEN
9249
9250
9251# LT_LIB_DLLOAD
9252# -------------
9253AC_DEFUN([LT_LIB_DLLOAD],
9254[m4_pattern_allow([^LT_DLLOADERS$])
9255LT_DLLOADERS=
9256AC_SUBST([LT_DLLOADERS])
9257
9258AC_LANG_PUSH([C])
9259
9260LIBADD_DLOPEN=
9261AC_SEARCH_LIBS([dlopen], [dl],
9262	[AC_DEFINE([HAVE_LIBDL], [1],
9263		   [Define if you have the libdl library or equivalent.])
9264	if test "$ac_cv_search_dlopen" != "none required" ; then
9265	  LIBADD_DLOPEN="-ldl"
9266	fi
9267	libltdl_cv_lib_dl_dlopen="yes"
9268	LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dlopen.la"],
9269    [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#if HAVE_DLFCN_H
9270#  include <dlfcn.h>
9271#endif
9272    ]], [[dlopen(0, 0);]])],
9273	    [AC_DEFINE([HAVE_LIBDL], [1],
9274		       [Define if you have the libdl library or equivalent.])
9275	    libltdl_cv_func_dlopen="yes"
9276	    LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dlopen.la"],
9277	[AC_CHECK_LIB([svld], [dlopen],
9278		[AC_DEFINE([HAVE_LIBDL], [1],
9279			 [Define if you have the libdl library or equivalent.])
9280	        LIBADD_DLOPEN="-lsvld" libltdl_cv_func_dlopen="yes"
9281		LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dlopen.la"])])])
9282if test x"$libltdl_cv_func_dlopen" = xyes || test x"$libltdl_cv_lib_dl_dlopen" = xyes
9283then
9284  lt_save_LIBS="$LIBS"
9285  LIBS="$LIBS $LIBADD_DLOPEN"
9286  AC_CHECK_FUNCS([dlerror])
9287  LIBS="$lt_save_LIBS"
9288fi
9289AC_SUBST([LIBADD_DLOPEN])
9290
9291LIBADD_SHL_LOAD=
9292AC_CHECK_FUNC([shl_load],
9293	[AC_DEFINE([HAVE_SHL_LOAD], [1],
9294		   [Define if you have the shl_load function.])
9295	LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}shl_load.la"],
9296    [AC_CHECK_LIB([dld], [shl_load],
9297	    [AC_DEFINE([HAVE_SHL_LOAD], [1],
9298		       [Define if you have the shl_load function.])
9299	    LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}shl_load.la"
9300	    LIBADD_SHL_LOAD="-ldld"])])
9301AC_SUBST([LIBADD_SHL_LOAD])
9302
9303case $host_os in
9304darwin[[1567]].*)
9305# We only want this for pre-Mac OS X 10.4.
9306  AC_CHECK_FUNC([_dyld_func_lookup],
9307	[AC_DEFINE([HAVE_DYLD], [1],
9308		   [Define if you have the _dyld_func_lookup function.])
9309	LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dyld.la"])
9310  ;;
9311beos*)
9312  LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}load_add_on.la"
9313  ;;
9314cygwin* | mingw* | os2* | pw32*)
9315  AC_CHECK_DECLS([cygwin_conv_path], [], [], [[#include <sys/cygwin.h>]])
9316  LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}loadlibrary.la"
9317  ;;
9318esac
9319
9320AC_CHECK_LIB([dld], [dld_link],
9321	[AC_DEFINE([HAVE_DLD], [1],
9322		   [Define if you have the GNU dld library.])
9323		LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dld_link.la"])
9324AC_SUBST([LIBADD_DLD_LINK])
9325
9326m4_pattern_allow([^LT_DLPREOPEN$])
9327LT_DLPREOPEN=
9328if test -n "$LT_DLLOADERS"
9329then
9330  for lt_loader in $LT_DLLOADERS; do
9331    LT_DLPREOPEN="$LT_DLPREOPEN-dlpreopen $lt_loader "
9332  done
9333  AC_DEFINE([HAVE_LIBDLLOADER], [1],
9334            [Define if libdlloader will be built on this platform])
9335fi
9336AC_SUBST([LT_DLPREOPEN])
9337
9338dnl This isn't used anymore, but set it for backwards compatibility
9339LIBADD_DL="$LIBADD_DLOPEN $LIBADD_SHL_LOAD"
9340AC_SUBST([LIBADD_DL])
9341
9342AC_LANG_POP
9343])# LT_LIB_DLLOAD
9344
9345# Old name:
9346AU_ALIAS([AC_LTDL_DLLIB], [LT_LIB_DLLOAD])
9347dnl aclocal-1.4 backwards compatibility:
9348dnl AC_DEFUN([AC_LTDL_DLLIB], [])
9349
9350
9351# LT_SYS_SYMBOL_USCORE
9352# --------------------
9353# does the compiler prefix global symbols with an underscore?
9354AC_DEFUN([LT_SYS_SYMBOL_USCORE],
9355[m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
9356AC_CACHE_CHECK([for _ prefix in compiled symbols],
9357  [lt_cv_sys_symbol_underscore],
9358  [lt_cv_sys_symbol_underscore=no
9359  cat > conftest.$ac_ext <<_LT_EOF
9360void nm_test_func(){}
9361int main(){nm_test_func;return 0;}
9362_LT_EOF
9363  if AC_TRY_EVAL(ac_compile); then
9364    # Now try to grab the symbols.
9365    ac_nlist=conftest.nm
9366    if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $ac_nlist) && test -s "$ac_nlist"; then
9367      # See whether the symbols have a leading underscore.
9368      if grep '^. _nm_test_func' "$ac_nlist" >/dev/null; then
9369        lt_cv_sys_symbol_underscore=yes
9370      else
9371        if grep '^. nm_test_func ' "$ac_nlist" >/dev/null; then
9372	  :
9373        else
9374	  echo "configure: cannot find nm_test_func in $ac_nlist" >&AS_MESSAGE_LOG_FD
9375        fi
9376      fi
9377    else
9378      echo "configure: cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
9379    fi
9380  else
9381    echo "configure: failed program was:" >&AS_MESSAGE_LOG_FD
9382    cat conftest.c >&AS_MESSAGE_LOG_FD
9383  fi
9384  rm -rf conftest*
9385  ])
9386  sys_symbol_underscore=$lt_cv_sys_symbol_underscore
9387  AC_SUBST([sys_symbol_underscore])
9388])# LT_SYS_SYMBOL_USCORE
9389
9390# Old name:
9391AU_ALIAS([AC_LTDL_SYMBOL_USCORE], [LT_SYS_SYMBOL_USCORE])
9392dnl aclocal-1.4 backwards compatibility:
9393dnl AC_DEFUN([AC_LTDL_SYMBOL_USCORE], [])
9394
9395
9396# LT_FUNC_DLSYM_USCORE
9397# --------------------
9398AC_DEFUN([LT_FUNC_DLSYM_USCORE],
9399[AC_REQUIRE([LT_SYS_SYMBOL_USCORE])dnl
9400if test x"$lt_cv_sys_symbol_underscore" = xyes; then
9401  if test x"$libltdl_cv_func_dlopen" = xyes ||
9402     test x"$libltdl_cv_lib_dl_dlopen" = xyes ; then
9403	AC_CACHE_CHECK([whether we have to add an underscore for dlsym],
9404	  [libltdl_cv_need_uscore],
9405	  [libltdl_cv_need_uscore=unknown
9406          save_LIBS="$LIBS"
9407          LIBS="$LIBS $LIBADD_DLOPEN"
9408	  _LT_TRY_DLOPEN_SELF(
9409	    [libltdl_cv_need_uscore=no], [libltdl_cv_need_uscore=yes],
9410	    [],				 [libltdl_cv_need_uscore=cross])
9411	  LIBS="$save_LIBS"
9412	])
9413  fi
9414fi
9415
9416if test x"$libltdl_cv_need_uscore" = xyes; then
9417  AC_DEFINE([NEED_USCORE], [1],
9418    [Define if dlsym() requires a leading underscore in symbol names.])
9419fi
9420])# LT_FUNC_DLSYM_USCORE
9421
9422# Old name:
9423AU_ALIAS([AC_LTDL_DLSYM_USCORE], [LT_FUNC_DLSYM_USCORE])
9424dnl aclocal-1.4 backwards compatibility:
9425dnl AC_DEFUN([AC_LTDL_DLSYM_USCORE], [])
9426
9427# Portability macros for glibc argz.                    -*- Autoconf -*-
9428#
9429#   Copyright (C) 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
9430#   Written by Gary V. Vaughan <gary@gnu.org>
9431#
9432# This file is free software; the Free Software Foundation gives
9433# unlimited permission to copy and/or distribute it, with or without
9434# modifications, as long as this notice is preserved.
9435
9436# serial 5 argz.m4
9437
9438AC_DEFUN([gl_FUNC_ARGZ],
9439[gl_PREREQ_ARGZ
9440
9441AC_CHECK_HEADERS([argz.h], [], [], [AC_INCLUDES_DEFAULT])
9442
9443AC_CHECK_TYPES([error_t],
9444  [],
9445  [AC_DEFINE([error_t], [int],
9446   [Define to a type to use for `error_t' if it is not otherwise available.])
9447   AC_DEFINE([__error_t_defined], [1], [Define so that glibc/gnulib argp.h
9448    does not typedef error_t.])],
9449  [#if defined(HAVE_ARGZ_H)
9450#  include <argz.h>
9451#endif])
9452
9453ARGZ_H=
9454AC_CHECK_FUNCS([argz_add argz_append argz_count argz_create_sep argz_insert \
9455	argz_next argz_stringify], [], [ARGZ_H=argz.h; AC_LIBOBJ([argz])])
9456
9457dnl if have system argz functions, allow forced use of
9458dnl libltdl-supplied implementation (and default to do so
9459dnl on "known bad" systems). Could use a runtime check, but
9460dnl (a) detecting malloc issues is notoriously unreliable
9461dnl (b) only known system that declares argz functions,
9462dnl     provides them, yet they are broken, is cygwin
9463dnl     releases prior to 16-Mar-2007 (1.5.24 and earlier)
9464dnl So, it's more straightforward simply to special case
9465dnl this for known bad systems.
9466AS_IF([test -z "$ARGZ_H"],
9467    [AC_CACHE_CHECK(
9468        [if argz actually works],
9469        [lt_cv_sys_argz_works],
9470        [[case $host_os in #(
9471	 *cygwin*)
9472	   lt_cv_sys_argz_works=no
9473	   if test "$cross_compiling" != no; then
9474	     lt_cv_sys_argz_works="guessing no"
9475	   else
9476	     lt_sed_extract_leading_digits='s/^\([0-9\.]*\).*/\1/'
9477	     save_IFS=$IFS
9478	     IFS=-.
9479	     set x `uname -r | sed -e "$lt_sed_extract_leading_digits"`
9480	     IFS=$save_IFS
9481	     lt_os_major=${2-0}
9482	     lt_os_minor=${3-0}
9483	     lt_os_micro=${4-0}
9484	     if test "$lt_os_major" -gt 1 \
9485		|| { test "$lt_os_major" -eq 1 \
9486		  && { test "$lt_os_minor" -gt 5 \
9487		    || { test "$lt_os_minor" -eq 5 \
9488		      && test "$lt_os_micro" -gt 24; }; }; }; then
9489	       lt_cv_sys_argz_works=yes
9490	     fi
9491	   fi
9492	   ;; #(
9493	 *) lt_cv_sys_argz_works=yes ;;
9494	 esac]])
9495     AS_IF([test $lt_cv_sys_argz_works = yes],
9496        [AC_DEFINE([HAVE_WORKING_ARGZ], 1,
9497                   [This value is set to 1 to indicate that the system argz facility works])],
9498        [ARGZ_H=argz.h
9499        AC_LIBOBJ([argz])])])
9500
9501AC_SUBST([ARGZ_H])
9502])
9503
9504# Prerequisites of lib/argz.c.
9505AC_DEFUN([gl_PREREQ_ARGZ], [:])
9506
9507# ltsugar.m4 -- libtool m4 base layer.                         -*-Autoconf-*-
9508#
9509# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
9510# Written by Gary V. Vaughan, 2004
9511#
9512# This file is free software; the Free Software Foundation gives
9513# unlimited permission to copy and/or distribute it, with or without
9514# modifications, as long as this notice is preserved.
9515
9516# serial 6 ltsugar.m4
9517
9518# This is to help aclocal find these macros, as it can't see m4_define.
9519AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
9520
9521
9522# lt_join(SEP, ARG1, [ARG2...])
9523# -----------------------------
9524# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
9525# associated separator.
9526# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
9527# versions in m4sugar had bugs.
9528m4_define([lt_join],
9529[m4_if([$#], [1], [],
9530       [$#], [2], [[$2]],
9531       [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
9532m4_define([_lt_join],
9533[m4_if([$#$2], [2], [],
9534       [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
9535
9536
9537# lt_car(LIST)
9538# lt_cdr(LIST)
9539# ------------
9540# Manipulate m4 lists.
9541# These macros are necessary as long as will still need to support
9542# Autoconf-2.59 which quotes differently.
9543m4_define([lt_car], [[$1]])
9544m4_define([lt_cdr],
9545[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
9546       [$#], 1, [],
9547       [m4_dquote(m4_shift($@))])])
9548m4_define([lt_unquote], $1)
9549
9550
9551# lt_append(MACRO-NAME, STRING, [SEPARATOR])
9552# ------------------------------------------
9553# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
9554# Note that neither SEPARATOR nor STRING are expanded; they are appended
9555# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
9556# No SEPARATOR is output if MACRO-NAME was previously undefined (different
9557# than defined and empty).
9558#
9559# This macro is needed until we can rely on Autoconf 2.62, since earlier
9560# versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
9561m4_define([lt_append],
9562[m4_define([$1],
9563	   m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
9564
9565
9566
9567# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
9568# ----------------------------------------------------------
9569# Produce a SEP delimited list of all paired combinations of elements of
9570# PREFIX-LIST with SUFFIX1 through SUFFIXn.  Each element of the list
9571# has the form PREFIXmINFIXSUFFIXn.
9572# Needed until we can rely on m4_combine added in Autoconf 2.62.
9573m4_define([lt_combine],
9574[m4_if(m4_eval([$# > 3]), [1],
9575       [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
9576[[m4_foreach([_Lt_prefix], [$2],
9577	     [m4_foreach([_Lt_suffix],
9578		]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
9579	[_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
9580
9581
9582# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
9583# -----------------------------------------------------------------------
9584# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
9585# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
9586m4_define([lt_if_append_uniq],
9587[m4_ifdef([$1],
9588	  [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
9589		 [lt_append([$1], [$2], [$3])$4],
9590		 [$5])],
9591	  [lt_append([$1], [$2], [$3])$4])])
9592
9593
9594# lt_dict_add(DICT, KEY, VALUE)
9595# -----------------------------
9596m4_define([lt_dict_add],
9597[m4_define([$1($2)], [$3])])
9598
9599
9600# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
9601# --------------------------------------------
9602m4_define([lt_dict_add_subkey],
9603[m4_define([$1($2:$3)], [$4])])
9604
9605
9606# lt_dict_fetch(DICT, KEY, [SUBKEY])
9607# ----------------------------------
9608m4_define([lt_dict_fetch],
9609[m4_ifval([$3],
9610	m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
9611    m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
9612
9613
9614# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
9615# -----------------------------------------------------------------
9616m4_define([lt_if_dict_fetch],
9617[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
9618	[$5],
9619    [$6])])
9620
9621
9622# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
9623# --------------------------------------------------------------
9624m4_define([lt_dict_filter],
9625[m4_if([$5], [], [],
9626  [lt_join(m4_quote(m4_default([$4], [[, ]])),
9627           lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
9628		      [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
9629])
9630
9631# ltversion.m4 -- version numbers			-*- Autoconf -*-
9632#
9633#   Copyright (C) 2004 Free Software Foundation, Inc.
9634#   Written by Scott James Remnant, 2004
9635#
9636# This file is free software; the Free Software Foundation gives
9637# unlimited permission to copy and/or distribute it, with or without
9638# modifications, as long as this notice is preserved.
9639
9640# Generated from ltversion.in.
9641
9642# serial 3012 ltversion.m4
9643# This file is part of GNU Libtool
9644
9645m4_define([LT_PACKAGE_VERSION], [2.2.6])
9646m4_define([LT_PACKAGE_REVISION], [1.3012])
9647
9648AC_DEFUN([LTVERSION_VERSION],
9649[macro_version='2.2.6'
9650macro_revision='1.3012'
9651_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
9652_LT_DECL(, macro_revision, 0)
9653])
9654
9655# lt~obsolete.m4 -- aclocal satisfying obsolete definitions.    -*-Autoconf-*-
9656#
9657#   Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc.
9658#   Written by Scott James Remnant, 2004.
9659#
9660# This file is free software; the Free Software Foundation gives
9661# unlimited permission to copy and/or distribute it, with or without
9662# modifications, as long as this notice is preserved.
9663
9664# serial 4 lt~obsolete.m4
9665
9666# These exist entirely to fool aclocal when bootstrapping libtool.
9667#
9668# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
9669# which have later been changed to m4_define as they aren't part of the
9670# exported API, or moved to Autoconf or Automake where they belong.
9671#
9672# The trouble is, aclocal is a bit thick.  It'll see the old AC_DEFUN
9673# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
9674# using a macro with the same name in our local m4/libtool.m4 it'll
9675# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
9676# and doesn't know about Autoconf macros at all.)
9677#
9678# So we provide this file, which has a silly filename so it's always
9679# included after everything else.  This provides aclocal with the
9680# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
9681# because those macros already exist, or will be overwritten later.
9682# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
9683#
9684# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
9685# Yes, that means every name once taken will need to remain here until
9686# we give up compatibility with versions before 1.7, at which point
9687# we need to keep only those names which we still refer to.
9688
9689# This is to help aclocal find these macros, as it can't see m4_define.
9690AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
9691
9692m4_ifndef([AC_LIBTOOL_LINKER_OPTION],	[AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
9693m4_ifndef([AC_PROG_EGREP],		[AC_DEFUN([AC_PROG_EGREP])])
9694m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH],	[AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
9695m4_ifndef([_LT_AC_SHELL_INIT],		[AC_DEFUN([_LT_AC_SHELL_INIT])])
9696m4_ifndef([_LT_AC_SYS_LIBPATH_AIX],	[AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
9697m4_ifndef([_LT_PROG_LTMAIN],		[AC_DEFUN([_LT_PROG_LTMAIN])])
9698m4_ifndef([_LT_AC_TAGVAR],		[AC_DEFUN([_LT_AC_TAGVAR])])
9699m4_ifndef([AC_LTDL_ENABLE_INSTALL],	[AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
9700m4_ifndef([AC_LTDL_PREOPEN],		[AC_DEFUN([AC_LTDL_PREOPEN])])
9701m4_ifndef([_LT_AC_SYS_COMPILER],	[AC_DEFUN([_LT_AC_SYS_COMPILER])])
9702m4_ifndef([_LT_AC_LOCK],		[AC_DEFUN([_LT_AC_LOCK])])
9703m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE],	[AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
9704m4_ifndef([_LT_AC_TRY_DLOPEN_SELF],	[AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
9705m4_ifndef([AC_LIBTOOL_PROG_CC_C_O],	[AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
9706m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
9707m4_ifndef([AC_LIBTOOL_OBJDIR],		[AC_DEFUN([AC_LIBTOOL_OBJDIR])])
9708m4_ifndef([AC_LTDL_OBJDIR],		[AC_DEFUN([AC_LTDL_OBJDIR])])
9709m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
9710m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP],	[AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
9711m4_ifndef([AC_PATH_MAGIC],		[AC_DEFUN([AC_PATH_MAGIC])])
9712m4_ifndef([AC_PROG_LD_GNU],		[AC_DEFUN([AC_PROG_LD_GNU])])
9713m4_ifndef([AC_PROG_LD_RELOAD_FLAG],	[AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
9714m4_ifndef([AC_DEPLIBS_CHECK_METHOD],	[AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
9715m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
9716m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
9717m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
9718m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS],	[AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
9719m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP],	[AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
9720m4_ifndef([LT_AC_PROG_EGREP],		[AC_DEFUN([LT_AC_PROG_EGREP])])
9721m4_ifndef([LT_AC_PROG_SED],		[AC_DEFUN([LT_AC_PROG_SED])])
9722m4_ifndef([_LT_CC_BASENAME],		[AC_DEFUN([_LT_CC_BASENAME])])
9723m4_ifndef([_LT_COMPILER_BOILERPLATE],	[AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
9724m4_ifndef([_LT_LINKER_BOILERPLATE],	[AC_DEFUN([_LT_LINKER_BOILERPLATE])])
9725m4_ifndef([_AC_PROG_LIBTOOL],		[AC_DEFUN([_AC_PROG_LIBTOOL])])
9726m4_ifndef([AC_LIBTOOL_SETUP],		[AC_DEFUN([AC_LIBTOOL_SETUP])])
9727m4_ifndef([_LT_AC_CHECK_DLFCN],		[AC_DEFUN([_LT_AC_CHECK_DLFCN])])
9728m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER],	[AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
9729m4_ifndef([_LT_AC_TAGCONFIG],		[AC_DEFUN([_LT_AC_TAGCONFIG])])
9730m4_ifndef([AC_DISABLE_FAST_INSTALL],	[AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
9731m4_ifndef([_LT_AC_LANG_CXX],		[AC_DEFUN([_LT_AC_LANG_CXX])])
9732m4_ifndef([_LT_AC_LANG_F77],		[AC_DEFUN([_LT_AC_LANG_F77])])
9733m4_ifndef([_LT_AC_LANG_GCJ],		[AC_DEFUN([_LT_AC_LANG_GCJ])])
9734m4_ifndef([AC_LIBTOOL_RC],		[AC_DEFUN([AC_LIBTOOL_RC])])
9735m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
9736m4_ifndef([_LT_AC_LANG_C_CONFIG],	[AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
9737m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
9738m4_ifndef([_LT_AC_LANG_CXX_CONFIG],	[AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
9739m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
9740m4_ifndef([_LT_AC_LANG_F77_CONFIG],	[AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
9741m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
9742m4_ifndef([_LT_AC_LANG_GCJ_CONFIG],	[AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
9743m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
9744m4_ifndef([_LT_AC_LANG_RC_CONFIG],	[AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
9745m4_ifndef([AC_LIBTOOL_CONFIG],		[AC_DEFUN([AC_LIBTOOL_CONFIG])])
9746m4_ifndef([_LT_AC_FILE_LTDLL_C],	[AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
9747
9748# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
9749#
9750# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
9751#
9752# This program is free software; you can redistribute it and/or modify
9753# it under the terms of the GNU General Public License as published by
9754# the Free Software Foundation; either version 2 of the License, or
9755# (at your option) any later version.
9756#
9757# This program is distributed in the hope that it will be useful, but
9758# WITHOUT ANY WARRANTY; without even the implied warranty of
9759# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
9760# General Public License for more details.
9761#
9762# You should have received a copy of the GNU General Public License
9763# along with this program; if not, write to the Free Software
9764# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
9765#
9766# As a special exception to the GNU General Public License, if you
9767# distribute this file as part of a program that contains a
9768# configuration script generated by Autoconf, you may include it under
9769# the same distribution terms that you use for the rest of that program.
9770
9771# PKG_PROG_PKG_CONFIG([MIN-VERSION])
9772# ----------------------------------
9773AC_DEFUN([PKG_PROG_PKG_CONFIG],
9774[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
9775m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
9776AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
9777if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9778	AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
9779fi
9780if test -n "$PKG_CONFIG"; then
9781	_pkg_min_version=m4_default([$1], [0.9.0])
9782	AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
9783	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
9784		AC_MSG_RESULT([yes])
9785	else
9786		AC_MSG_RESULT([no])
9787		PKG_CONFIG=""
9788	fi
9789
9790fi[]dnl
9791])# PKG_PROG_PKG_CONFIG
9792
9793# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
9794#
9795# Check to see whether a particular set of modules exists.  Similar
9796# to PKG_CHECK_MODULES(), but does not set variables or print errors.
9797#
9798#
9799# Similar to PKG_CHECK_MODULES, make sure that the first instance of
9800# this or PKG_CHECK_MODULES is called, or make sure to call
9801# PKG_CHECK_EXISTS manually
9802# --------------------------------------------------------------
9803AC_DEFUN([PKG_CHECK_EXISTS],
9804[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
9805if test -n "$PKG_CONFIG" && \
9806    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
9807  m4_ifval([$2], [$2], [:])
9808m4_ifvaln([$3], [else
9809  $3])dnl
9810fi])
9811
9812
9813# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
9814# ---------------------------------------------
9815m4_define([_PKG_CONFIG],
9816[if test -n "$PKG_CONFIG"; then
9817    if test -n "$$1"; then
9818        pkg_cv_[]$1="$$1"
9819    else
9820        PKG_CHECK_EXISTS([$3],
9821                         [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
9822			 [pkg_failed=yes])
9823    fi
9824else
9825	pkg_failed=untried
9826fi[]dnl
9827])# _PKG_CONFIG
9828
9829# _PKG_SHORT_ERRORS_SUPPORTED
9830# -----------------------------
9831AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
9832[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
9833if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
9834        _pkg_short_errors_supported=yes
9835else
9836        _pkg_short_errors_supported=no
9837fi[]dnl
9838])# _PKG_SHORT_ERRORS_SUPPORTED
9839
9840
9841# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
9842# [ACTION-IF-NOT-FOUND])
9843#
9844#
9845# Note that if there is a possibility the first call to
9846# PKG_CHECK_MODULES might not happen, you should be sure to include an
9847# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
9848#
9849#
9850# --------------------------------------------------------------
9851AC_DEFUN([PKG_CHECK_MODULES],
9852[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
9853AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
9854AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
9855
9856pkg_failed=no
9857AC_MSG_CHECKING([for $1])
9858
9859_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
9860_PKG_CONFIG([$1][_LIBS], [libs], [$2])
9861
9862m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
9863and $1[]_LIBS to avoid the need to call pkg-config.
9864See the pkg-config man page for more details.])
9865
9866if test $pkg_failed = yes; then
9867        _PKG_SHORT_ERRORS_SUPPORTED
9868        if test $_pkg_short_errors_supported = yes; then
9869	        $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"`
9870        else
9871	        $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
9872        fi
9873	# Put the nasty error message in config.log where it belongs
9874	echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
9875
9876	ifelse([$4], , [AC_MSG_ERROR(dnl
9877[Package requirements ($2) were not met:
9878
9879$$1_PKG_ERRORS
9880
9881Consider adjusting the PKG_CONFIG_PATH environment variable if you
9882installed software in a non-standard prefix.
9883
9884_PKG_TEXT
9885])],
9886		[AC_MSG_RESULT([no])
9887                $4])
9888elif test $pkg_failed = untried; then
9889	ifelse([$4], , [AC_MSG_FAILURE(dnl
9890[The pkg-config script could not be found or is too old.  Make sure it
9891is in your PATH or set the PKG_CONFIG environment variable to the full
9892path to pkg-config.
9893
9894_PKG_TEXT
9895
9896To get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
9897		[$4])
9898else
9899	$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
9900	$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
9901        AC_MSG_RESULT([yes])
9902	ifelse([$3], , :, [$3])
9903fi[]dnl
9904])# PKG_CHECK_MODULES
9905
9906# Configure paths for libogg
9907# Jack Moffitt <jack@icecast.org> 10-21-2000
9908# Shamelessly stolen from Owen Taylor and Manish Singh
9909
9910dnl XIPH_PATH_OGG([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
9911dnl Test for libogg, and define OGG_CFLAGS and OGG_LIBS
9912dnl
9913AC_DEFUN([XIPH_PATH_OGG],
9914[dnl
9915dnl Get the cflags and libraries
9916dnl
9917AC_ARG_WITH(ogg,AC_HELP_STRING([--with-ogg=PFX],[Prefix where libogg is installed (optional)]), ogg_prefix="$withval", ogg_prefix="")
9918AC_ARG_WITH(ogg-libraries,AC_HELP_STRING([--with-ogg-libraries=DIR],[Directory where libogg library is installed (optional)]), ogg_libraries="$withval", ogg_libraries="")
9919AC_ARG_WITH(ogg-includes,AC_HELP_STRING([--with-ogg-includes=DIR],[Directory where libogg header files are installed (optional)]), ogg_includes="$withval", ogg_includes="")
9920AC_ARG_ENABLE(oggtest,AC_HELP_STRING([--disable-oggtest],[Do not try to compile and run a test Ogg program]),, enable_oggtest=yes)
9921
9922  if test "x$ogg_libraries" != "x" ; then
9923    OGG_LIBS="-L$ogg_libraries"
9924  elif test "x$ogg_prefix" = "xno" || test "x$ogg_prefix" = "xyes" ; then
9925    OGG_LIBS=""
9926  elif test "x$ogg_prefix" != "x" ; then
9927    OGG_LIBS="-L$ogg_prefix/lib"
9928  elif test "x$prefix" != "xNONE" ; then
9929    OGG_LIBS="-L$libdir"
9930  fi
9931
9932  if test "x$ogg_prefix" != "xno" ; then
9933    OGG_LIBS="$OGG_LIBS -logg"
9934  fi
9935
9936  if test "x$ogg_includes" != "x" ; then
9937    OGG_CFLAGS="-I$ogg_includes"
9938  elif test "x$ogg_prefix" = "xno" || test "x$ogg_prefix" = "xyes" ; then
9939    OGG_CFLAGS=""
9940  elif test "x$ogg_prefix" != "x" ; then
9941    OGG_CFLAGS="-I$ogg_prefix/include"
9942  elif test "x$prefix" != "xNONE"; then
9943    OGG_CFLAGS=""
9944  fi
9945
9946  AC_MSG_CHECKING(for Ogg)
9947  if test "x$ogg_prefix" = "xno" ; then
9948    no_ogg="disabled"
9949    enable_oggtest="no"
9950  else
9951    no_ogg=""
9952  fi
9953
9954
9955  if test "x$enable_oggtest" = "xyes" ; then
9956    ac_save_CFLAGS="$CFLAGS"
9957    ac_save_LIBS="$LIBS"
9958    CFLAGS="$CFLAGS $OGG_CFLAGS"
9959    LIBS="$LIBS $OGG_LIBS"
9960dnl
9961dnl Now check if the installed Ogg is sufficiently new.
9962dnl
9963      rm -f conf.oggtest
9964      AC_TRY_RUN([
9965#include <stdio.h>
9966#include <stdlib.h>
9967#include <string.h>
9968#include <ogg/ogg.h>
9969
9970int main ()
9971{
9972  system("touch conf.oggtest");
9973  return 0;
9974}
9975
9976],, no_ogg=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
9977       CFLAGS="$ac_save_CFLAGS"
9978       LIBS="$ac_save_LIBS"
9979  fi
9980
9981  if test "x$no_ogg" = "xdisabled" ; then
9982     AC_MSG_RESULT(no)
9983     ifelse([$2], , :, [$2])
9984  elif test "x$no_ogg" = "x" ; then
9985     AC_MSG_RESULT(yes)
9986     ifelse([$1], , :, [$1])
9987  else
9988     AC_MSG_RESULT(no)
9989     if test -f conf.oggtest ; then
9990       :
9991     else
9992       echo "*** Could not run Ogg test program, checking why..."
9993       CFLAGS="$CFLAGS $OGG_CFLAGS"
9994       LIBS="$LIBS $OGG_LIBS"
9995       AC_TRY_LINK([
9996#include <stdio.h>
9997#include <ogg/ogg.h>
9998],     [ return 0; ],
9999       [ echo "*** The test program compiled, but did not run. This usually means"
10000       echo "*** that the run-time linker is not finding Ogg or finding the wrong"
10001       echo "*** version of Ogg. If it is not finding Ogg, you'll need to set your"
10002       echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
10003       echo "*** to the installed location  Also, make sure you have run ldconfig if that"
10004       echo "*** is required on your system"
10005       echo "***"
10006       echo "*** If you have an old version installed, it is best to remove it, although"
10007       echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],
10008       [ echo "*** The test program failed to compile or link. See the file config.log for the"
10009       echo "*** exact error that occured. This usually means Ogg was incorrectly installed"
10010       echo "*** or that you have moved Ogg since it was installed." ])
10011       CFLAGS="$ac_save_CFLAGS"
10012       LIBS="$ac_save_LIBS"
10013     fi
10014     OGG_CFLAGS=""
10015     OGG_LIBS=""
10016     ifelse([$2], , :, [$2])
10017  fi
10018  AC_SUBST(OGG_CFLAGS)
10019  AC_SUBST(OGG_LIBS)
10020  rm -f conf.oggtest
10021])
10022
10023# Configure paths for libvorbis
10024# Jack Moffitt <jack@icecast.org> 10-21-2000
10025# Shamelessly stolen from Owen Taylor and Manish Singh
10026# thomasvs added check for vorbis_bitrate_addblock which is new in rc3
10027
10028dnl XIPH_PATH_VORBIS([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
10029dnl Test for libvorbis, and define VORBIS_CFLAGS and VORBIS_LIBS
10030dnl
10031AC_DEFUN([XIPH_PATH_VORBIS],
10032[dnl
10033dnl Get the cflags and libraries
10034dnl
10035AC_ARG_WITH(vorbis,[  --with-vorbis=PFX   Prefix where libvorbis is installed (optional)], vorbis_prefix="$withval", vorbis_prefix="")
10036AC_ARG_WITH(vorbis-libraries,[  --with-vorbis-libraries=DIR   Directory where libvorbis library is installed (optional)], vorbis_libraries="$withval", vorbis_libraries="")
10037AC_ARG_WITH(vorbis-includes,[  --with-vorbis-includes=DIR   Directory where libvorbis header files are installed (optional)], vorbis_includes="$withval", vorbis_includes="")
10038AC_ARG_ENABLE(vorbistest, [  --disable-vorbistest    Do not try to compile and run a test Vorbis program],, enable_vorbistest=yes)
10039
10040  if test "x$vorbis_libraries" != "x" ; then
10041    VORBIS_LIBS="-L$vorbis_libraries"
10042  elif test "x$vorbis_prefix" != "x" ; then
10043    VORBIS_LIBS="-L$vorbis_prefix/lib"
10044  elif test "x$prefix" != "xNONE"; then
10045    VORBIS_LIBS="-L$libdir"
10046  fi
10047
10048  VORBIS_LIBS="$VORBIS_LIBS -lvorbis -lm"
10049  VORBISFILE_LIBS="-lvorbisfile"
10050  VORBISENC_LIBS="-lvorbisenc"
10051
10052  if test "x$vorbis_includes" != "x" ; then
10053    VORBIS_CFLAGS="-I$vorbis_includes"
10054  elif test "x$vorbis_prefix" != "x" ; then
10055    VORBIS_CFLAGS="-I$vorbis_prefix/include"
10056  elif test "x$prefix" != "xNONE"; then
10057    VORBIS_CFLAGS=""
10058  fi
10059
10060
10061  AC_MSG_CHECKING(for Vorbis)
10062  no_vorbis=""
10063
10064
10065  if test "x$enable_vorbistest" = "xyes" ; then
10066    ac_save_CFLAGS="$CFLAGS"
10067    ac_save_LIBS="$LIBS"
10068    CFLAGS="$CFLAGS $VORBIS_CFLAGS $OGG_CFLAGS"
10069    LIBS="$LIBS $VORBIS_LIBS $VORBISENC_LIBS $OGG_LIBS"
10070dnl
10071dnl Now check if the installed Vorbis is sufficiently new.
10072dnl
10073      rm -f conf.vorbistest
10074      AC_TRY_RUN([
10075#include <stdio.h>
10076#include <stdlib.h>
10077#include <string.h>
10078#include <vorbis/codec.h>
10079#include <vorbis/vorbisenc.h>
10080
10081int main ()
10082{
10083    vorbis_block 	vb;
10084    vorbis_dsp_state	vd;
10085    vorbis_info		vi;
10086
10087    vorbis_info_init (&vi);
10088    vorbis_encode_init (&vi, 2, 44100, -1, 128000, -1);
10089    vorbis_analysis_init (&vd, &vi);
10090    vorbis_block_init (&vd, &vb);
10091    /* this function was added in 1.0rc3, so this is what we're testing for */
10092    vorbis_bitrate_addblock (&vb);
10093
10094    system("touch conf.vorbistest");
10095    return 0;
10096}
10097
10098],, no_vorbis=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
10099       CFLAGS="$ac_save_CFLAGS"
10100       LIBS="$ac_save_LIBS"
10101  fi
10102
10103  if test "x$no_vorbis" = "x" ; then
10104     AC_MSG_RESULT(yes)
10105     ifelse([$1], , :, [$1])
10106  else
10107     AC_MSG_RESULT(no)
10108     if test -f conf.vorbistest ; then
10109       :
10110     else
10111       echo "*** Could not run Vorbis test program, checking why..."
10112       CFLAGS="$CFLAGS $VORBIS_CFLAGS"
10113       LIBS="$LIBS $VORBIS_LIBS $OGG_LIBS"
10114       AC_TRY_LINK([
10115#include <stdio.h>
10116#include <vorbis/codec.h>
10117],     [ return 0; ],
10118       [ echo "*** The test program compiled, but did not run. This usually means"
10119       echo "*** that the run-time linker is not finding Vorbis or finding the wrong"
10120       echo "*** version of Vorbis. If it is not finding Vorbis, you'll need to set your"
10121       echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
10122       echo "*** to the installed location  Also, make sure you have run ldconfig if that"
10123       echo "*** is required on your system"
10124       echo "***"
10125       echo "*** If you have an old version installed, it is best to remove it, although"
10126       echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],
10127       [ echo "*** The test program failed to compile or link. See the file config.log for the"
10128       echo "*** exact error that occured. This usually means Vorbis was incorrectly installed"
10129       echo "*** or that you have moved Vorbis since it was installed." ])
10130       CFLAGS="$ac_save_CFLAGS"
10131       LIBS="$ac_save_LIBS"
10132     fi
10133     VORBIS_CFLAGS=""
10134     VORBIS_LIBS=""
10135     VORBISFILE_LIBS=""
10136     VORBISENC_LIBS=""
10137     ifelse([$2], , :, [$2])
10138  fi
10139  AC_SUBST(VORBIS_CFLAGS)
10140  AC_SUBST(VORBIS_LIBS)
10141  AC_SUBST(VORBISFILE_LIBS)
10142  AC_SUBST(VORBISENC_LIBS)
10143  rm -f conf.vorbistest
10144])
10145
10146# Configure paths for SDL
10147# Sam Lantinga 9/21/99
10148# stolen from Manish Singh
10149# stolen back from Frank Belew
10150# stolen from Manish Singh
10151# Shamelessly stolen from Owen Taylor
10152
10153dnl AM_PATH_SDL([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
10154dnl Test for SDL, and define SDL_CFLAGS and SDL_LIBS
10155dnl
10156AC_DEFUN([AM_PATH_SDL],
10157[dnl
10158dnl Get the cflags and libraries from the sdl-config script
10159dnl
10160AC_ARG_WITH(sdl-prefix,[  --with-sdl-prefix=PFX   Prefix where SDL is installed (optional)],
10161            sdl_prefix="$withval", sdl_prefix="")
10162AC_ARG_WITH(sdl-exec-prefix,[  --with-sdl-exec-prefix=PFX Exec prefix where SDL is installed (optional)],
10163            sdl_exec_prefix="$withval", sdl_exec_prefix="")
10164AC_ARG_ENABLE(sdltest, [  --disable-sdltest       Do not try to compile and run a test SDL program],
10165		    , enable_sdltest=yes)
10166
10167  if test x$sdl_exec_prefix != x ; then
10168     sdl_args="$sdl_args --exec-prefix=$sdl_exec_prefix"
10169     if test x${SDL_CONFIG+set} != xset ; then
10170        SDL_CONFIG=$sdl_exec_prefix/bin/sdl-config
10171     fi
10172  fi
10173  if test x$sdl_prefix != x ; then
10174     sdl_args="$sdl_args --prefix=$sdl_prefix"
10175     if test x${SDL_CONFIG+set} != xset ; then
10176        SDL_CONFIG=$sdl_prefix/bin/sdl-config
10177     fi
10178  fi
10179
10180  AC_REQUIRE([AC_CANONICAL_TARGET])
10181  PATH="$prefix/bin:$prefix/usr/bin:$PATH"
10182  AC_PATH_PROG(SDL_CONFIG, sdl-config, no, [$PATH])
10183  min_sdl_version=ifelse([$1], ,0.11.0,$1)
10184  AC_MSG_CHECKING(for SDL - version >= $min_sdl_version)
10185  no_sdl=""
10186  if test "$SDL_CONFIG" = "no" ; then
10187    no_sdl=yes
10188  else
10189    SDL_CFLAGS=`$SDL_CONFIG $sdlconf_args --cflags`
10190    SDL_LIBS=`$SDL_CONFIG $sdlconf_args --libs`
10191
10192    sdl_major_version=`$SDL_CONFIG $sdl_args --version | \
10193           sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
10194    sdl_minor_version=`$SDL_CONFIG $sdl_args --version | \
10195           sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
10196    sdl_micro_version=`$SDL_CONFIG $sdl_config_args --version | \
10197           sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
10198    if test "x$enable_sdltest" = "xyes" ; then
10199      ac_save_CFLAGS="$CFLAGS"
10200      ac_save_CXXFLAGS="$CXXFLAGS"
10201      ac_save_LIBS="$LIBS"
10202      CFLAGS="$CFLAGS $SDL_CFLAGS"
10203      CXXFLAGS="$CXXFLAGS $SDL_CFLAGS"
10204      LIBS="$LIBS $SDL_LIBS"
10205dnl
10206dnl Now check if the installed SDL is sufficiently new. (Also sanity
10207dnl checks the results of sdl-config to some extent
10208dnl
10209      rm -f conf.sdltest
10210      AC_TRY_RUN([
10211#include <stdio.h>
10212#include <stdlib.h>
10213#include <string.h>
10214#include "SDL.h"
10215
10216char*
10217my_strdup (char *str)
10218{
10219  char *new_str;
10220
10221  if (str)
10222    {
10223      new_str = (char *)malloc ((strlen (str) + 1) * sizeof(char));
10224      strcpy (new_str, str);
10225    }
10226  else
10227    new_str = NULL;
10228
10229  return new_str;
10230}
10231
10232int main (int argc, char *argv[])
10233{
10234  int major, minor, micro;
10235  char *tmp_version;
10236
10237  /* This hangs on some systems (?)
10238  system ("touch conf.sdltest");
10239  */
10240  { FILE *fp = fopen("conf.sdltest", "a"); if ( fp ) fclose(fp); }
10241
10242  /* HP/UX 9 (%@#!) writes to sscanf strings */
10243  tmp_version = my_strdup("$min_sdl_version");
10244  if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
10245     printf("%s, bad version string\n", "$min_sdl_version");
10246     exit(1);
10247   }
10248
10249   if (($sdl_major_version > major) ||
10250      (($sdl_major_version == major) && ($sdl_minor_version > minor)) ||
10251      (($sdl_major_version == major) && ($sdl_minor_version == minor) && ($sdl_micro_version >= micro)))
10252    {
10253      return 0;
10254    }
10255  else
10256    {
10257      printf("\n*** 'sdl-config --version' returned %d.%d.%d, but the minimum version\n", $sdl_major_version, $sdl_minor_version, $sdl_micro_version);
10258      printf("*** of SDL required is %d.%d.%d. If sdl-config is correct, then it is\n", major, minor, micro);
10259      printf("*** best to upgrade to the required version.\n");
10260      printf("*** If sdl-config was wrong, set the environment variable SDL_CONFIG\n");
10261      printf("*** to point to the correct copy of sdl-config, and remove the file\n");
10262      printf("*** config.cache before re-running configure\n");
10263      return 1;
10264    }
10265}
10266
10267],, no_sdl=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
10268       CFLAGS="$ac_save_CFLAGS"
10269       CXXFLAGS="$ac_save_CXXFLAGS"
10270       LIBS="$ac_save_LIBS"
10271     fi
10272  fi
10273  if test "x$no_sdl" = x ; then
10274     AC_MSG_RESULT(yes)
10275     ifelse([$2], , :, [$2])
10276  else
10277     AC_MSG_RESULT(no)
10278     if test "$SDL_CONFIG" = "no" ; then
10279       echo "*** The sdl-config script installed by SDL could not be found"
10280       echo "*** If SDL was installed in PREFIX, make sure PREFIX/bin is in"
10281       echo "*** your path, or set the SDL_CONFIG environment variable to the"
10282       echo "*** full path to sdl-config."
10283     else
10284       if test -f conf.sdltest ; then
10285        :
10286       else
10287          echo "*** Could not run SDL test program, checking why..."
10288          CFLAGS="$CFLAGS $SDL_CFLAGS"
10289          CXXFLAGS="$CXXFLAGS $SDL_CFLAGS"
10290          LIBS="$LIBS $SDL_LIBS"
10291          AC_TRY_LINK([
10292#include <stdio.h>
10293#include "SDL.h"
10294
10295int main(int argc, char *argv[])
10296{ return 0; }
10297#undef  main
10298#define main K_and_R_C_main
10299],      [ return 0; ],
10300        [ echo "*** The test program compiled, but did not run. This usually means"
10301          echo "*** that the run-time linker is not finding SDL or finding the wrong"
10302          echo "*** version of SDL. If it is not finding SDL, you'll need to set your"
10303          echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
10304          echo "*** to the installed location  Also, make sure you have run ldconfig if that"
10305          echo "*** is required on your system"
10306	  echo "***"
10307          echo "*** If you have an old version installed, it is best to remove it, although"
10308          echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],
10309        [ echo "*** The test program failed to compile or link. See the file config.log for the"
10310          echo "*** exact error that occured. This usually means SDL was incorrectly installed"
10311          echo "*** or that you have moved SDL since it was installed. In the latter case, you"
10312          echo "*** may want to edit the sdl-config script: $SDL_CONFIG" ])
10313          CFLAGS="$ac_save_CFLAGS"
10314          CXXFLAGS="$ac_save_CXXFLAGS"
10315          LIBS="$ac_save_LIBS"
10316       fi
10317     fi
10318     SDL_CFLAGS=""
10319     SDL_LIBS=""
10320     ifelse([$3], , :, [$3])
10321  fi
10322  AC_SUBST(SDL_CFLAGS)
10323  AC_SUBST(SDL_LIBS)
10324  rm -f conf.sdltest
10325])
10326
10327dnl as-ac-expand.m4 0.2.0
10328dnl autostars m4 macro for expanding directories using configure's prefix
10329dnl thomas@apestaart.org
10330
10331dnl AS_AC_EXPAND(VAR, CONFIGURE_VAR)
10332dnl example
10333dnl AS_AC_EXPAND(SYSCONFDIR, $sysconfdir)
10334dnl will set SYSCONFDIR to /usr/local/etc if prefix=/usr/local
10335
10336AC_DEFUN([AS_AC_EXPAND],
10337[
10338  EXP_VAR=[$1]
10339  FROM_VAR=[$2]
10340
10341  dnl first expand prefix and exec_prefix if necessary
10342  prefix_save=$prefix
10343  exec_prefix_save=$exec_prefix
10344
10345  dnl if no prefix given, then use /usr/local, the default prefix
10346  if test "x$prefix" = "xNONE"; then
10347    prefix="$ac_default_prefix"
10348  fi
10349  dnl if no exec_prefix given, then use prefix
10350  if test "x$exec_prefix" = "xNONE"; then
10351    exec_prefix=$prefix
10352  fi
10353
10354  full_var="$FROM_VAR"
10355  dnl loop until it doesn't change anymore
10356  while true; do
10357    new_full_var="`eval echo $full_var`"
10358    if test "x$new_full_var" = "x$full_var"; then break; fi
10359    full_var=$new_full_var
10360  done
10361
10362  dnl clean up
10363  full_var=$new_full_var
10364  AC_SUBST([$1], "$full_var")
10365
10366  dnl restore prefix and exec_prefix
10367  prefix=$prefix_save
10368  exec_prefix=$exec_prefix_save
10369])
10370
10371