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