source: aclocal.m4 @ 20f9748

feature/autosinkfeature/cnnfeature/cnn_orgfeature/constantqfeature/crepefeature/crepe_orgfeature/pitchshiftfeature/pydocstringsfeature/timestretchfix/ffmpeg5pitchshiftsamplertimestretchyinfft+
Last change on this file since 20f9748 was 96fb8ad, checked in by Paul Brossier <piem@altern.org>, 20 years ago

import 0.1.7.1

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