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
840
841# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
842# -----------------------------------------------------------
843# If this macro is not defined by Autoconf, define it here.
844m4_ifdef([AC_PROVIDE_IFELSE],
845         [],
846         [m4_define([AC_PROVIDE_IFELSE],
847	         [m4_ifdef([AC_PROVIDE_$1],
848		           [$2], [$3])])])
849
850
851# AC_PROG_LIBTOOL
852# ---------------
853AC_DEFUN([AC_PROG_LIBTOOL],
854[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
855dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
856dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
857  AC_PROVIDE_IFELSE([AC_PROG_CXX],
858    [AC_LIBTOOL_CXX],
859    [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
860  ])])
861dnl And a similar setup for Fortran 77 support
862  AC_PROVIDE_IFELSE([AC_PROG_F77],
863    [AC_LIBTOOL_F77],
864    [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
865])])
866
867dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
868dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
869dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
870  AC_PROVIDE_IFELSE([AC_PROG_GCJ],
871    [AC_LIBTOOL_GCJ],
872    [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
873      [AC_LIBTOOL_GCJ],
874      [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
875	[AC_LIBTOOL_GCJ],
876      [ifdef([AC_PROG_GCJ],
877	     [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
878       ifdef([A][M_PROG_GCJ],
879	     [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
880       ifdef([LT_AC_PROG_GCJ],
881	     [define([LT_AC_PROG_GCJ],
882		defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
883])])# AC_PROG_LIBTOOL
884
885
886# _AC_PROG_LIBTOOL
887# ----------------
888AC_DEFUN([_AC_PROG_LIBTOOL],
889[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
890AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
891AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
892AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
893
894# This can be used to rebuild libtool when needed
895LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
896
897# Always use our own libtool.
898LIBTOOL='$(SHELL) $(top_builddir)/libtool'
899AC_SUBST(LIBTOOL)dnl
900
901# Prevent multiple expansion
902define([AC_PROG_LIBTOOL], [])
903])# _AC_PROG_LIBTOOL
904
905
906# AC_LIBTOOL_SETUP
907# ----------------
908AC_DEFUN([AC_LIBTOOL_SETUP],
909[AC_PREREQ(2.50)dnl
910AC_REQUIRE([AC_ENABLE_SHARED])dnl
911AC_REQUIRE([AC_ENABLE_STATIC])dnl
912AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
913AC_REQUIRE([AC_CANONICAL_HOST])dnl
914AC_REQUIRE([AC_CANONICAL_BUILD])dnl
915AC_REQUIRE([AC_PROG_CC])dnl
916AC_REQUIRE([AC_PROG_LD])dnl
917AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
918AC_REQUIRE([AC_PROG_NM])dnl
919
920AC_REQUIRE([AC_PROG_LN_S])dnl
921AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
922# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
923AC_REQUIRE([AC_OBJEXT])dnl
924AC_REQUIRE([AC_EXEEXT])dnl
925dnl
926
927AC_LIBTOOL_SYS_MAX_CMD_LEN
928AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
929AC_LIBTOOL_OBJDIR
930
931AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
932_LT_AC_PROG_ECHO_BACKSLASH
933
934case $host_os in
935aix3*)
936  # AIX sometimes has problems with the GCC collect2 program.  For some
937  # reason, if we set the COLLECT_NAMES environment variable, the problems
938  # vanish in a puff of smoke.
939  if test "X${COLLECT_NAMES+set}" != Xset; then
940    COLLECT_NAMES=
941    export COLLECT_NAMES
942  fi
943  ;;
944esac
945
946# Sed substitution that helps us do robust quoting.  It backslashifies
947# metacharacters that are still active within double-quoted strings.
948Xsed='sed -e 1s/^X//'
949[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
950
951# Same as above, but do not quote variable references.
952[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
953
954# Sed substitution to delay expansion of an escaped shell variable in a
955# double_quote_subst'ed string.
956delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
957
958# Sed substitution to avoid accidental globbing in evaled expressions
959no_glob_subst='s/\*/\\\*/g'
960
961# Constants:
962rm="rm -f"
963
964# Global variables:
965default_ofile=libtool
966can_build_shared=yes
967
968# All known linkers require a `.a' archive for static linking (except M$VC,
969# which needs '.lib').
970libext=a
971ltmain="$ac_aux_dir/ltmain.sh"
972ofile="$default_ofile"
973with_gnu_ld="$lt_cv_prog_gnu_ld"
974
975AC_CHECK_TOOL(AR, ar, false)
976AC_CHECK_TOOL(RANLIB, ranlib, :)
977AC_CHECK_TOOL(STRIP, strip, :)
978
979old_CC="$CC"
980old_CFLAGS="$CFLAGS"
981
982# Set sane defaults for various variables
983test -z "$AR" && AR=ar
984test -z "$AR_FLAGS" && AR_FLAGS=cru
985test -z "$AS" && AS=as
986test -z "$CC" && CC=cc
987test -z "$LTCC" && LTCC=$CC
988test -z "$DLLTOOL" && DLLTOOL=dlltool
989test -z "$LD" && LD=ld
990test -z "$LN_S" && LN_S="ln -s"
991test -z "$MAGIC_CMD" && MAGIC_CMD=file
992test -z "$NM" && NM=nm
993test -z "$SED" && SED=sed
994test -z "$OBJDUMP" && OBJDUMP=objdump
995test -z "$RANLIB" && RANLIB=:
996test -z "$STRIP" && STRIP=:
997test -z "$ac_objext" && ac_objext=o
998
999# Determine commands to create old-style static archives.
1000old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
1001old_postinstall_cmds='chmod 644 $oldlib'
1002old_postuninstall_cmds=
1003
1004if test -n "$RANLIB"; then
1005  case $host_os in
1006  openbsd*)
1007    old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
1008    ;;
1009  *)
1010    old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
1011    ;;
1012  esac
1013  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
1014fi
1015
1016_LT_CC_BASENAME([$compiler])
1017
1018# Only perform the check for file, if the check method requires it
1019case $deplibs_check_method in
1020file_magic*)
1021  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
1022    AC_PATH_MAGIC
1023  fi
1024  ;;
1025esac
1026
1027AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
1028AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
1029enable_win32_dll=yes, enable_win32_dll=no)
1030
1031AC_ARG_ENABLE([libtool-lock],
1032    [AC_HELP_STRING([--disable-libtool-lock],
1033	[avoid locking (might break parallel builds)])])
1034test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
1035
1036AC_ARG_WITH([pic],
1037    [AC_HELP_STRING([--with-pic],
1038	[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
1039    [pic_mode="$withval"],
1040    [pic_mode=default])
1041test -z "$pic_mode" && pic_mode=default
1042
1043# Use C for the default configuration in the libtool script
1044tagname=
1045AC_LIBTOOL_LANG_C_CONFIG
1046_LT_AC_TAGCONFIG
1047])# AC_LIBTOOL_SETUP
1048
1049
1050# _LT_AC_SYS_COMPILER
1051# -------------------
1052AC_DEFUN([_LT_AC_SYS_COMPILER],
1053[AC_REQUIRE([AC_PROG_CC])dnl
1054
1055# If no C compiler was specified, use CC.
1056LTCC=${LTCC-"$CC"}
1057
1058# Allow CC to be a program name with arguments.
1059compiler=$CC
1060])# _LT_AC_SYS_COMPILER
1061
1062
1063# _LT_CC_BASENAME(CC)
1064# -------------------
1065# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
1066AC_DEFUN([_LT_CC_BASENAME],
1067[for cc_temp in $1""; do
1068  case $cc_temp in
1069    compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
1070    distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
1071    \-*) ;;
1072    *) break;;
1073  esac
1074done
1075cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
1076])
1077
1078
1079# _LT_COMPILER_BOILERPLATE
1080# ------------------------
1081# Check for compiler boilerplate output or warnings with
1082# the simple compiler test code.
1083AC_DEFUN([_LT_COMPILER_BOILERPLATE],
1084[ac_outfile=conftest.$ac_objext
1085printf "$lt_simple_compile_test_code" >conftest.$ac_ext
1086eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err
1087_lt_compiler_boilerplate=`cat conftest.err`
1088$rm conftest*
1089])# _LT_COMPILER_BOILERPLATE
1090
1091
1092# _LT_LINKER_BOILERPLATE
1093# ----------------------
1094# Check for linker boilerplate output or warnings with
1095# the simple link test code.
1096AC_DEFUN([_LT_LINKER_BOILERPLATE],
1097[ac_outfile=conftest.$ac_objext
1098printf "$lt_simple_link_test_code" >conftest.$ac_ext
1099eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err
1100_lt_linker_boilerplate=`cat conftest.err`
1101$rm conftest*
1102])# _LT_LINKER_BOILERPLATE
1103
1104
1105# _LT_AC_SYS_LIBPATH_AIX
1106# ----------------------
1107# Links a minimal program and checks the executable
1108# for the system default hardcoded library path. In most cases,
1109# this is /usr/lib:/lib, but when the MPI compilers are used
1110# the location of the communication and MPI libs are included too.
1111# If we don't find anything, use the default library path according
1112# to the aix ld manual.
1113AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
1114[AC_LINK_IFELSE(AC_LANG_PROGRAM,[
1115aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
1116}'`
1117# Check for a 64-bit object if we didn't find anything.
1118if 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; }
1119}'`; fi],[])
1120if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
1121])# _LT_AC_SYS_LIBPATH_AIX
1122
1123
1124# _LT_AC_SHELL_INIT(ARG)
1125# ----------------------
1126AC_DEFUN([_LT_AC_SHELL_INIT],
1127[ifdef([AC_DIVERSION_NOTICE],
1128	     [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
1129	 [AC_DIVERT_PUSH(NOTICE)])
1130$1
1131AC_DIVERT_POP
1132])# _LT_AC_SHELL_INIT
1133
1134
1135# _LT_AC_PROG_ECHO_BACKSLASH
1136# --------------------------
1137# Add some code to the start of the generated configure script which
1138# will find an echo command which doesn't interpret backslashes.
1139AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
1140[_LT_AC_SHELL_INIT([
1141# Check that we are running under the correct shell.
1142SHELL=${CONFIG_SHELL-/bin/sh}
1143
1144case X$ECHO in
1145X*--fallback-echo)
1146  # Remove one level of quotation (which was required for Make).
1147  ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
1148  ;;
1149esac
1150
1151echo=${ECHO-echo}
1152if test "X[$]1" = X--no-reexec; then
1153  # Discard the --no-reexec flag, and continue.
1154  shift
1155elif test "X[$]1" = X--fallback-echo; then
1156  # Avoid inline document here, it may be left over
1157  :
1158elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
1159  # Yippee, $echo works!
1160  :
1161else
1162  # Restart under the correct shell.
1163  exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
1164fi
1165
1166if test "X[$]1" = X--fallback-echo; then
1167  # used as fallback echo
1168  shift
1169  cat <<EOF
1170[$]*
1171EOF
1172  exit 0
1173fi
1174
1175# The HP-UX ksh and POSIX shell print the target directory to stdout
1176# if CDPATH is set.
1177(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
1178
1179if test -z "$ECHO"; then
1180if test "X${echo_test_string+set}" != Xset; then
1181# find a string as large as possible, as long as the shell can cope with it
1182  for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
1183    # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
1184    if (echo_test_string="`eval $cmd`") 2>/dev/null &&
1185       echo_test_string="`eval $cmd`" &&
1186       (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
1187    then
1188      break
1189    fi
1190  done
1191fi
1192
1193if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
1194   echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
1195   test "X$echo_testing_string" = "X$echo_test_string"; then
1196  :
1197else
1198  # The Solaris, AIX, and Digital Unix default echo programs unquote
1199  # backslashes.  This makes it impossible to quote backslashes using
1200  #   echo "$something" | sed 's/\\/\\\\/g'
1201  #
1202  # So, first we look for a working echo in the user's PATH.
1203
1204  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
1205  for dir in $PATH /usr/ucb; do
1206    IFS="$lt_save_ifs"
1207    if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
1208       test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
1209       echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
1210       test "X$echo_testing_string" = "X$echo_test_string"; then
1211      echo="$dir/echo"
1212      break
1213    fi
1214  done
1215  IFS="$lt_save_ifs"
1216
1217  if test "X$echo" = Xecho; then
1218    # We didn't find a better echo, so look for alternatives.
1219    if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
1220       echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
1221       test "X$echo_testing_string" = "X$echo_test_string"; then
1222      # This shell has a builtin print -r that does the trick.
1223      echo='print -r'
1224    elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
1225	 test "X$CONFIG_SHELL" != X/bin/ksh; then
1226      # If we have ksh, try running configure again with it.
1227      ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
1228      export ORIGINAL_CONFIG_SHELL
1229      CONFIG_SHELL=/bin/ksh
1230      export CONFIG_SHELL
1231      exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
1232    else
1233      # Try using printf.
1234      echo='printf %s\n'
1235      if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
1236	 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
1237	 test "X$echo_testing_string" = "X$echo_test_string"; then
1238	# Cool, printf works
1239	:
1240      elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1241	   test "X$echo_testing_string" = 'X\t' &&
1242	   echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1243	   test "X$echo_testing_string" = "X$echo_test_string"; then
1244	CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
1245	export CONFIG_SHELL
1246	SHELL="$CONFIG_SHELL"
1247	export SHELL
1248	echo="$CONFIG_SHELL [$]0 --fallback-echo"
1249      elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1250	   test "X$echo_testing_string" = 'X\t' &&
1251	   echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1252	   test "X$echo_testing_string" = "X$echo_test_string"; then
1253	echo="$CONFIG_SHELL [$]0 --fallback-echo"
1254      else
1255	# maybe with a smaller string...
1256	prev=:
1257
1258	for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
1259	  if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
1260	  then
1261	    break
1262	  fi
1263	  prev="$cmd"
1264	done
1265
1266	if test "$prev" != 'sed 50q "[$]0"'; then
1267	  echo_test_string=`eval $prev`
1268	  export echo_test_string
1269	  exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
1270	else
1271	  # Oops.  We lost completely, so just stick with echo.
1272	  echo=echo
1273	fi
1274      fi
1275    fi
1276  fi
1277fi
1278fi
1279
1280# Copy echo and quote the copy suitably for passing to libtool from
1281# the Makefile, instead of quoting the original, which is used later.
1282ECHO=$echo
1283if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
1284   ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
1285fi
1286
1287AC_SUBST(ECHO)
1288])])# _LT_AC_PROG_ECHO_BACKSLASH
1289
1290
1291# _LT_AC_LOCK
1292# -----------
1293AC_DEFUN([_LT_AC_LOCK],
1294[AC_ARG_ENABLE([libtool-lock],
1295    [AC_HELP_STRING([--disable-libtool-lock],
1296	[avoid locking (might break parallel builds)])])
1297test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
1298
1299# Some flags need to be propagated to the compiler or linker for good
1300# libtool support.
1301case $host in
1302ia64-*-hpux*)
1303  # Find out which ABI we are using.
1304  echo 'int i;' > conftest.$ac_ext
1305  if AC_TRY_EVAL(ac_compile); then
1306    case `/usr/bin/file conftest.$ac_objext` in
1307    *ELF-32*)
1308      HPUX_IA64_MODE="32"
1309      ;;
1310    *ELF-64*)
1311      HPUX_IA64_MODE="64"
1312      ;;
1313    esac
1314  fi
1315  rm -rf conftest*
1316  ;;
1317*-*-irix6*)
1318  # Find out which ABI we are using.
1319  echo '[#]line __oline__ "configure"' > conftest.$ac_ext
1320  if AC_TRY_EVAL(ac_compile); then
1321   if test "$lt_cv_prog_gnu_ld" = yes; then
1322    case `/usr/bin/file conftest.$ac_objext` in
1323    *32-bit*)
1324      LD="${LD-ld} -melf32bsmip"
1325      ;;
1326    *N32*)
1327      LD="${LD-ld} -melf32bmipn32"
1328      ;;
1329    *64-bit*)
1330      LD="${LD-ld} -melf64bmip"
1331      ;;
1332    esac
1333   else
1334    case `/usr/bin/file conftest.$ac_objext` in
1335    *32-bit*)
1336      LD="${LD-ld} -32"
1337      ;;
1338    *N32*)
1339      LD="${LD-ld} -n32"
1340      ;;
1341    *64-bit*)
1342      LD="${LD-ld} -64"
1343      ;;
1344    esac
1345   fi
1346  fi
1347  rm -rf conftest*
1348  ;;
1349
1350x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
1351  # Find out which ABI we are using.
1352  echo 'int i;' > conftest.$ac_ext
1353  if AC_TRY_EVAL(ac_compile); then
1354    case "`/usr/bin/file conftest.o`" in
1355    *32-bit*)
1356      case $host in
1357        x86_64-*linux*)
1358          LD="${LD-ld} -m elf_i386"
1359          ;;
1360        ppc64-*linux*|powerpc64-*linux*)
1361          LD="${LD-ld} -m elf32ppclinux"
1362          ;;
1363        s390x-*linux*)
1364          LD="${LD-ld} -m elf_s390"
1365          ;;
1366        sparc64-*linux*)
1367          LD="${LD-ld} -m elf32_sparc"
1368          ;;
1369      esac
1370      ;;
1371    *64-bit*)
1372      case $host in
1373        x86_64-*linux*)
1374          LD="${LD-ld} -m elf_x86_64"
1375          ;;
1376        ppc*-*linux*|powerpc*-*linux*)
1377          LD="${LD-ld} -m elf64ppc"
1378          ;;
1379        s390*-*linux*)
1380          LD="${LD-ld} -m elf64_s390"
1381          ;;
1382        sparc*-*linux*)
1383          LD="${LD-ld} -m elf64_sparc"
1384          ;;
1385      esac
1386      ;;
1387    esac
1388  fi
1389  rm -rf conftest*
1390  ;;
1391
1392*-*-sco3.2v5*)
1393  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1394  SAVE_CFLAGS="$CFLAGS"
1395  CFLAGS="$CFLAGS -belf"
1396  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
1397    [AC_LANG_PUSH(C)
1398     AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
1399     AC_LANG_POP])
1400  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
1401    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1402    CFLAGS="$SAVE_CFLAGS"
1403  fi
1404  ;;
1405AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
1406[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
1407  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
1408  AC_CHECK_TOOL(AS, as, false)
1409  AC_CHECK_TOOL(OBJDUMP, objdump, false)
1410  ;;
1411  ])
1412esac
1413
1414need_locks="$enable_libtool_lock"
1415
1416])# _LT_AC_LOCK
1417
1418
1419# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1420#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
1421# ----------------------------------------------------------------
1422# Check whether the given compiler option works
1423AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
1424[AC_REQUIRE([LT_AC_PROG_SED])
1425AC_CACHE_CHECK([$1], [$2],
1426  [$2=no
1427  ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
1428   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
1429   lt_compiler_flag="$3"
1430   # Insert the option either (1) after the last *FLAGS variable, or
1431   # (2) before a word containing "conftest.", or (3) at the end.
1432   # Note that $ac_compile itself does not contain backslashes and begins
1433   # with a dollar sign (not a hyphen), so the echo should work correctly.
1434   # The option is referenced via a variable to avoid confusing sed.
1435   lt_compile=`echo "$ac_compile" | $SED \
1436   -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
1437   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1438   -e 's:$: $lt_compiler_flag:'`
1439   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1440   (eval "$lt_compile" 2>conftest.err)
1441   ac_status=$?
1442   cat conftest.err >&AS_MESSAGE_LOG_FD
1443   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1444   if (exit $ac_status) && test -s "$ac_outfile"; then
1445     # The compiler can only warn and ignore the option if not recognized
1446     # So say no if there are warnings other than the usual output.
1447     $echo "X$_lt_compiler_boilerplate" | $Xsed >conftest.exp
1448     $SED '/^$/d' conftest.err >conftest.er2
1449     if test ! -s conftest.err || diff conftest.exp conftest.er2 >/dev/null; then
1450       $2=yes
1451     fi
1452   fi
1453   $rm conftest*
1454])
1455
1456if test x"[$]$2" = xyes; then
1457    ifelse([$5], , :, [$5])
1458else
1459    ifelse([$6], , :, [$6])
1460fi
1461])# AC_LIBTOOL_COMPILER_OPTION
1462
1463
1464# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1465#                          [ACTION-SUCCESS], [ACTION-FAILURE])
1466# ------------------------------------------------------------
1467# Check whether the given compiler option works
1468AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
1469[AC_CACHE_CHECK([$1], [$2],
1470  [$2=no
1471   save_LDFLAGS="$LDFLAGS"
1472   LDFLAGS="$LDFLAGS $3"
1473   printf "$lt_simple_link_test_code" > conftest.$ac_ext
1474   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
1475     # The compiler can only warn and ignore the option if not recognized
1476     # So say no if there are warnings
1477     if test -s conftest.err; then
1478       # Append any errors to the config.log.
1479       cat conftest.err 1>&AS_MESSAGE_LOG_FD
1480       $echo "X$_lt_linker_boilerplate" | $Xsed > conftest.exp
1481       $SED '/^$/d' conftest.err >conftest.er2
1482       if diff conftest.exp conftest.er2 >/dev/null; then
1483         $2=yes
1484       fi
1485     else
1486       $2=yes
1487     fi
1488   fi
1489   $rm conftest*
1490   LDFLAGS="$save_LDFLAGS"
1491])
1492
1493if test x"[$]$2" = xyes; then
1494    ifelse([$4], , :, [$4])
1495else
1496    ifelse([$5], , :, [$5])
1497fi
1498])# AC_LIBTOOL_LINKER_OPTION
1499
1500
1501# AC_LIBTOOL_SYS_MAX_CMD_LEN
1502# --------------------------
1503AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
1504[# find the maximum length of command line arguments
1505AC_MSG_CHECKING([the maximum length of command line arguments])
1506AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
1507  i=0
1508  teststring="ABCD"
1509
1510  case $build_os in
1511  msdosdjgpp*)
1512    # On DJGPP, this test can blow up pretty badly due to problems in libc
1513    # (any single argument exceeding 2000 bytes causes a buffer overrun
1514    # during glob expansion).  Even if it were fixed, the result of this
1515    # check would be larger than it should be.
1516    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
1517    ;;
1518
1519  gnu*)
1520    # Under GNU Hurd, this test is not required because there is
1521    # no limit to the length of command line arguments.
1522    # Libtool will interpret -1 as no limit whatsoever
1523    lt_cv_sys_max_cmd_len=-1;
1524    ;;
1525
1526  cygwin* | mingw*)
1527    # On Win9x/ME, this test blows up -- it succeeds, but takes
1528    # about 5 minutes as the teststring grows exponentially.
1529    # Worse, since 9x/ME are not pre-emptively multitasking,
1530    # you end up with a "frozen" computer, even though with patience
1531    # the test eventually succeeds (with a max line length of 256k).
1532    # Instead, let's just punt: use the minimum linelength reported by
1533    # all of the supported platforms: 8192 (on NT/2K/XP).
1534    lt_cv_sys_max_cmd_len=8192;
1535    ;;
1536
1537  amigaos*)
1538    # On AmigaOS with pdksh, this test takes hours, literally.
1539    # So we just punt and use a minimum line length of 8192.
1540    lt_cv_sys_max_cmd_len=8192;
1541    ;;
1542
1543  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
1544    # This has been around since 386BSD, at least.  Likely further.
1545    if test -x /sbin/sysctl; then
1546      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
1547    elif test -x /usr/sbin/sysctl; then
1548      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
1549    else
1550      lt_cv_sys_max_cmd_len=65536 # usable default for *BSD
1551    fi
1552    # And add a safety zone
1553    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1554    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
1555    ;;
1556  osf*)
1557    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
1558    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
1559    # nice to cause kernel panics so lets avoid the loop below.
1560    # First set a reasonable default.
1561    lt_cv_sys_max_cmd_len=16384
1562    #
1563    if test -x /sbin/sysconfig; then
1564      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
1565        *1*) lt_cv_sys_max_cmd_len=-1 ;;
1566      esac
1567    fi
1568    ;;
1569  *)
1570    # If test is not a shell built-in, we'll probably end up computing a
1571    # maximum length that is only half of the actual maximum length, but
1572    # we can't tell.
1573    SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
1574    while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
1575	       = "XX$teststring") >/dev/null 2>&1 &&
1576	    new_result=`expr "X$teststring" : ".*" 2>&1` &&
1577	    lt_cv_sys_max_cmd_len=$new_result &&
1578	    test $i != 17 # 1/2 MB should be enough
1579    do
1580      i=`expr $i + 1`
1581      teststring=$teststring$teststring
1582    done
1583    teststring=
1584    # Add a significant safety factor because C++ compilers can tack on massive
1585    # amounts of additional arguments before passing them to the linker.
1586    # It appears as though 1/2 is a usable value.
1587    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
1588    ;;
1589  esac
1590])
1591if test -n $lt_cv_sys_max_cmd_len ; then
1592  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
1593else
1594  AC_MSG_RESULT(none)
1595fi
1596])# AC_LIBTOOL_SYS_MAX_CMD_LEN
1597
1598
1599# _LT_AC_CHECK_DLFCN
1600# --------------------
1601AC_DEFUN([_LT_AC_CHECK_DLFCN],
1602[AC_CHECK_HEADERS(dlfcn.h)dnl
1603])# _LT_AC_CHECK_DLFCN
1604
1605
1606# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
1607#                           ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
1608# ------------------------------------------------------------------
1609AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
1610[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
1611if test "$cross_compiling" = yes; then :
1612  [$4]
1613else
1614  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1615  lt_status=$lt_dlunknown
1616  cat > conftest.$ac_ext <<EOF
1617[#line __oline__ "configure"
1618#include "confdefs.h"
1619
1620#if HAVE_DLFCN_H
1621#include <dlfcn.h>
1622#endif
1623
1624#include <stdio.h>
1625
1626#ifdef RTLD_GLOBAL
1627#  define LT_DLGLOBAL		RTLD_GLOBAL
1628#else
1629#  ifdef DL_GLOBAL
1630#    define LT_DLGLOBAL		DL_GLOBAL
1631#  else
1632#    define LT_DLGLOBAL		0
1633#  endif
1634#endif
1635
1636/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
1637   find out it does not work in some platform. */
1638#ifndef LT_DLLAZY_OR_NOW
1639#  ifdef RTLD_LAZY
1640#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
1641#  else
1642#    ifdef DL_LAZY
1643#      define LT_DLLAZY_OR_NOW		DL_LAZY
1644#    else
1645#      ifdef RTLD_NOW
1646#        define LT_DLLAZY_OR_NOW	RTLD_NOW
1647#      else
1648#        ifdef DL_NOW
1649#          define LT_DLLAZY_OR_NOW	DL_NOW
1650#        else
1651#          define LT_DLLAZY_OR_NOW	0
1652#        endif
1653#      endif
1654#    endif
1655#  endif
1656#endif
1657
1658#ifdef __cplusplus
1659extern "C" void exit (int);
1660#endif
1661
1662void fnord() { int i=42;}
1663int main ()
1664{
1665  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
1666  int status = $lt_dlunknown;
1667
1668  if (self)
1669    {
1670      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
1671      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
1672      /* dlclose (self); */
1673    }
1674
1675    exit (status);
1676}]
1677EOF
1678  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
1679    (./conftest; exit; ) 2>/dev/null
1680    lt_status=$?
1681    case x$lt_status in
1682      x$lt_dlno_uscore) $1 ;;
1683      x$lt_dlneed_uscore) $2 ;;
1684      x$lt_unknown|x*) $3 ;;
1685    esac
1686  else :
1687    # compilation failed
1688    $3
1689  fi
1690fi
1691rm -fr conftest*
1692])# _LT_AC_TRY_DLOPEN_SELF
1693
1694
1695# AC_LIBTOOL_DLOPEN_SELF
1696# -------------------
1697AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
1698[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
1699if test "x$enable_dlopen" != xyes; then
1700  enable_dlopen=unknown
1701  enable_dlopen_self=unknown
1702  enable_dlopen_self_static=unknown
1703else
1704  lt_cv_dlopen=no
1705  lt_cv_dlopen_libs=
1706
1707  case $host_os in
1708  beos*)
1709    lt_cv_dlopen="load_add_on"
1710    lt_cv_dlopen_libs=
1711    lt_cv_dlopen_self=yes
1712    ;;
1713
1714  mingw* | pw32*)
1715    lt_cv_dlopen="LoadLibrary"
1716    lt_cv_dlopen_libs=
1717   ;;
1718
1719  cygwin*)
1720    lt_cv_dlopen="dlopen"
1721    lt_cv_dlopen_libs=
1722   ;;
1723
1724  darwin*)
1725  # if libdl is installed we need to link against it
1726    AC_CHECK_LIB([dl], [dlopen],
1727		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
1728    lt_cv_dlopen="dyld"
1729    lt_cv_dlopen_libs=
1730    lt_cv_dlopen_self=yes
1731    ])
1732   ;;
1733
1734  *)
1735    AC_CHECK_FUNC([shl_load],
1736	  [lt_cv_dlopen="shl_load"],
1737      [AC_CHECK_LIB([dld], [shl_load],
1738	    [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
1739	[AC_CHECK_FUNC([dlopen],
1740	      [lt_cv_dlopen="dlopen"],
1741	  [AC_CHECK_LIB([dl], [dlopen],
1742		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
1743	    [AC_CHECK_LIB([svld], [dlopen],
1744		  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
1745	      [AC_CHECK_LIB([dld], [dld_link],
1746		    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
1747	      ])
1748	    ])
1749	  ])
1750	])
1751      ])
1752    ;;
1753  esac
1754
1755  if test "x$lt_cv_dlopen" != xno; then
1756    enable_dlopen=yes
1757  else
1758    enable_dlopen=no
1759  fi
1760
1761  case $lt_cv_dlopen in
1762  dlopen)
1763    save_CPPFLAGS="$CPPFLAGS"
1764    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
1765
1766    save_LDFLAGS="$LDFLAGS"
1767    eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
1768
1769    save_LIBS="$LIBS"
1770    LIBS="$lt_cv_dlopen_libs $LIBS"
1771
1772    AC_CACHE_CHECK([whether a program can dlopen itself],
1773	  lt_cv_dlopen_self, [dnl
1774	  _LT_AC_TRY_DLOPEN_SELF(
1775	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
1776	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
1777    ])
1778
1779    if test "x$lt_cv_dlopen_self" = xyes; then
1780      LDFLAGS="$LDFLAGS $link_static_flag"
1781      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
1782    	  lt_cv_dlopen_self_static, [dnl
1783	  _LT_AC_TRY_DLOPEN_SELF(
1784	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
1785	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
1786      ])
1787    fi
1788
1789    CPPFLAGS="$save_CPPFLAGS"
1790    LDFLAGS="$save_LDFLAGS"
1791    LIBS="$save_LIBS"
1792    ;;
1793  esac
1794
1795  case $lt_cv_dlopen_self in
1796  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
1797  *) enable_dlopen_self=unknown ;;
1798  esac
1799
1800  case $lt_cv_dlopen_self_static in
1801  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
1802  *) enable_dlopen_self_static=unknown ;;
1803  esac
1804fi
1805])# AC_LIBTOOL_DLOPEN_SELF
1806
1807
1808# AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
1809# ---------------------------------
1810# Check to see if options -c and -o are simultaneously supported by compiler
1811AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
1812[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
1813AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
1814  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
1815  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
1816   $rm -r conftest 2>/dev/null
1817   mkdir conftest
1818   cd conftest
1819   mkdir out
1820   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
1821
1822   lt_compiler_flag="-o out/conftest2.$ac_objext"
1823   # Insert the option either (1) after the last *FLAGS variable, or
1824   # (2) before a word containing "conftest.", or (3) at the end.
1825   # Note that $ac_compile itself does not contain backslashes and begins
1826   # with a dollar sign (not a hyphen), so the echo should work correctly.
1827   lt_compile=`echo "$ac_compile" | $SED \
1828   -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
1829   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1830   -e 's:$: $lt_compiler_flag:'`
1831   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1832   (eval "$lt_compile" 2>out/conftest.err)
1833   ac_status=$?
1834   cat out/conftest.err >&AS_MESSAGE_LOG_FD
1835   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1836   if (exit $ac_status) && test -s out/conftest2.$ac_objext
1837   then
1838     # The compiler can only warn and ignore the option if not recognized
1839     # So say no if there are warnings
1840     $echo "X$_lt_compiler_boilerplate" | $Xsed > out/conftest.exp
1841     $SED '/^$/d' out/conftest.err >out/conftest.er2
1842     if test ! -s out/conftest.err || diff out/conftest.exp out/conftest.er2 >/dev/null; then
1843       _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
1844     fi
1845   fi
1846   chmod u+w .
1847   $rm conftest*
1848   # SGI C++ compiler will create directory out/ii_files/ for
1849   # template instantiation
1850   test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
1851   $rm out/* && rmdir out
1852   cd ..
1853   rmdir conftest
1854   $rm conftest*
1855])
1856])# AC_LIBTOOL_PROG_CC_C_O
1857
1858
1859# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
1860# -----------------------------------------
1861# Check to see if we can do hard links to lock some files if needed
1862AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
1863[AC_REQUIRE([_LT_AC_LOCK])dnl
1864
1865hard_links="nottested"
1866if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
1867  # do not overwrite the value of need_locks provided by the user
1868  AC_MSG_CHECKING([if we can lock with hard links])
1869  hard_links=yes
1870  $rm conftest*
1871  ln conftest.a conftest.b 2>/dev/null && hard_links=no
1872  touch conftest.a
1873  ln conftest.a conftest.b 2>&5 || hard_links=no
1874  ln conftest.a conftest.b 2>/dev/null && hard_links=no
1875  AC_MSG_RESULT([$hard_links])
1876  if test "$hard_links" = no; then
1877    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
1878    need_locks=warn
1879  fi
1880else
1881  need_locks=no
1882fi
1883])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
1884
1885
1886# AC_LIBTOOL_OBJDIR
1887# -----------------
1888AC_DEFUN([AC_LIBTOOL_OBJDIR],
1889[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
1890[rm -f .libs 2>/dev/null
1891mkdir .libs 2>/dev/null
1892if test -d .libs; then
1893  lt_cv_objdir=.libs
1894else
1895  # MS-DOS does not allow filenames that begin with a dot.
1896  lt_cv_objdir=_libs
1897fi
1898rmdir .libs 2>/dev/null])
1899objdir=$lt_cv_objdir
1900])# AC_LIBTOOL_OBJDIR
1901
1902
1903# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
1904# ----------------------------------------------
1905# Check hardcoding attributes.
1906AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
1907[AC_MSG_CHECKING([how to hardcode library paths into programs])
1908_LT_AC_TAGVAR(hardcode_action, $1)=
1909if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
1910   test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \
1911   test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
1912
1913  # We can hardcode non-existant directories.
1914  if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
1915     # If the only mechanism to avoid hardcoding is shlibpath_var, we
1916     # have to relink, otherwise we might link with an installed library
1917     # when we should be linking with a yet-to-be-installed one
1918     ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
1919     test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
1920    # Linking always hardcodes the temporary library directory.
1921    _LT_AC_TAGVAR(hardcode_action, $1)=relink
1922  else
1923    # We can link without hardcoding, and we can hardcode nonexisting dirs.
1924    _LT_AC_TAGVAR(hardcode_action, $1)=immediate
1925  fi
1926else
1927  # We cannot hardcode anything, or else we can only hardcode existing
1928  # directories.
1929  _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
1930fi
1931AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
1932
1933if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
1934  # Fast installation is not supported
1935  enable_fast_install=no
1936elif test "$shlibpath_overrides_runpath" = yes ||
1937     test "$enable_shared" = no; then
1938  # Fast installation is not necessary
1939  enable_fast_install=needless
1940fi
1941])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
1942
1943
1944# AC_LIBTOOL_SYS_LIB_STRIP
1945# ------------------------
1946AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
1947[striplib=
1948old_striplib=
1949AC_MSG_CHECKING([whether stripping libraries is possible])
1950if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
1951  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
1952  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
1953  AC_MSG_RESULT([yes])
1954else
1955# FIXME - insert some real tests, host_os isn't really good enough
1956  case $host_os in
1957   darwin*)
1958       if test -n "$STRIP" ; then
1959         striplib="$STRIP -x"
1960         AC_MSG_RESULT([yes])
1961       else
1962  AC_MSG_RESULT([no])
1963fi
1964       ;;
1965   *)
1966  AC_MSG_RESULT([no])
1967    ;;
1968  esac
1969fi
1970])# AC_LIBTOOL_SYS_LIB_STRIP
1971
1972
1973# AC_LIBTOOL_SYS_DYNAMIC_LINKER
1974# -----------------------------
1975# PORTME Fill in your ld.so characteristics
1976AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
1977[AC_MSG_CHECKING([dynamic linker characteristics])
1978library_names_spec=
1979libname_spec='lib$name'
1980soname_spec=
1981shrext_cmds=".so"
1982postinstall_cmds=
1983postuninstall_cmds=
1984finish_cmds=
1985finish_eval=
1986shlibpath_var=
1987shlibpath_overrides_runpath=unknown
1988version_type=none
1989dynamic_linker="$host_os ld.so"
1990sys_lib_dlsearch_path_spec="/lib /usr/lib"
1991if test "$GCC" = yes; then
1992  sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
1993  if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
1994    # if the path contains ";" then we assume it to be the separator
1995    # otherwise default to the standard path separator (i.e. ":") - it is
1996    # assumed that no part of a normal pathname contains ";" but that should
1997    # okay in the real world where ";" in dirpaths is itself problematic.
1998    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
1999  else
2000    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
2001  fi
2002else
2003  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2004fi
2005need_lib_prefix=unknown
2006hardcode_into_libs=no
2007
2008# when you set need_version to no, make sure it does not cause -set_version
2009# flags to be left without arguments
2010need_version=unknown
2011
2012case $host_os in
2013aix3*)
2014  version_type=linux
2015  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
2016  shlibpath_var=LIBPATH
2017
2018  # AIX 3 has no versioning support, so we append a major version to the name.
2019  soname_spec='${libname}${release}${shared_ext}$major'
2020  ;;
2021
2022aix4* | aix5*)
2023  version_type=linux
2024  need_lib_prefix=no
2025  need_version=no
2026  hardcode_into_libs=yes
2027  if test "$host_cpu" = ia64; then
2028    # AIX 5 supports IA64
2029    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
2030    shlibpath_var=LD_LIBRARY_PATH
2031  else
2032    # With GCC up to 2.95.x, collect2 would create an import file
2033    # for dependence libraries.  The import file would start with
2034    # the line `#! .'.  This would cause the generated library to
2035    # depend on `.', always an invalid library.  This was fixed in
2036    # development snapshots of GCC prior to 3.0.
2037    case $host_os in
2038      aix4 | aix4.[[01]] | aix4.[[01]].*)
2039      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
2040	   echo ' yes '
2041	   echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
2042	:
2043      else
2044	can_build_shared=no
2045      fi
2046      ;;
2047    esac
2048    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
2049    # soname into executable. Probably we can add versioning support to
2050    # collect2, so additional links can be useful in future.
2051    if test "$aix_use_runtimelinking" = yes; then
2052      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
2053      # instead of lib<name>.a to let people know that these are not
2054      # typical AIX shared libraries.
2055      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2056    else
2057      # We preserve .a as extension for shared libraries through AIX4.2
2058      # and later when we are not doing run time linking.
2059      library_names_spec='${libname}${release}.a $libname.a'
2060      soname_spec='${libname}${release}${shared_ext}$major'
2061    fi
2062    shlibpath_var=LIBPATH
2063  fi
2064  ;;
2065
2066amigaos*)
2067  library_names_spec='$libname.ixlibrary $libname.a'
2068  # Create ${libname}_ixlibrary.a entries in /sys/libs.
2069  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'
2070  ;;
2071
2072beos*)
2073  library_names_spec='${libname}${shared_ext}'
2074  dynamic_linker="$host_os ld.so"
2075  shlibpath_var=LIBRARY_PATH
2076  ;;
2077
2078bsdi[[45]]*)
2079  version_type=linux
2080  need_version=no
2081  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2082  soname_spec='${libname}${release}${shared_ext}$major'
2083  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
2084  shlibpath_var=LD_LIBRARY_PATH
2085  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
2086  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
2087  # the default ld.so.conf also contains /usr/contrib/lib and
2088  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
2089  # libtool to hard-code these into programs
2090  ;;
2091
2092cygwin* | mingw* | pw32*)
2093  version_type=windows
2094  shrext_cmds=".dll"
2095  need_version=no
2096  need_lib_prefix=no
2097
2098  case $GCC,$host_os in
2099  yes,cygwin* | yes,mingw* | yes,pw32*)
2100    library_names_spec='$libname.dll.a'
2101    # DLL is installed to $(libdir)/../bin by postinstall_cmds
2102    postinstall_cmds='base_file=`basename \${file}`~
2103      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
2104      dldir=$destdir/`dirname \$dlpath`~
2105      test -d \$dldir || mkdir -p \$dldir~
2106      $install_prog $dir/$dlname \$dldir/$dlname'
2107    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
2108      dlpath=$dir/\$dldll~
2109       $rm \$dlpath'
2110    shlibpath_overrides_runpath=yes
2111
2112    case $host_os in
2113    cygwin*)
2114      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
2115      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2116      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
2117      ;;
2118    mingw*)
2119      # MinGW DLLs use traditional 'lib' prefix
2120      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2121      sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
2122      if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
2123        # It is most probably a Windows format PATH printed by
2124        # mingw gcc, but we are running on Cygwin. Gcc prints its search
2125        # path with ; separators, and with drive letters. We can handle the
2126        # drive letters (cygwin fileutils understands them), so leave them,
2127        # especially as we might pass files found there to a mingw objdump,
2128        # which wouldn't understand a cygwinified path. Ahh.
2129        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
2130      else
2131        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
2132      fi
2133      ;;
2134    pw32*)
2135      # pw32 DLLs use 'pw' prefix rather than 'lib'
2136      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2137      ;;
2138    esac
2139    ;;
2140
2141  *)
2142    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
2143    ;;
2144  esac
2145  dynamic_linker='Win32 ld.exe'
2146  # FIXME: first we should search . and the directory the executable is in
2147  shlibpath_var=PATH
2148  ;;
2149
2150darwin* | rhapsody*)
2151  dynamic_linker="$host_os dyld"
2152  version_type=darwin
2153  need_lib_prefix=no
2154  need_version=no
2155  library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
2156  soname_spec='${libname}${release}${major}$shared_ext'
2157  shlibpath_overrides_runpath=yes
2158  shlibpath_var=DYLD_LIBRARY_PATH
2159  shrext_cmds='$(test .$module = .yes && echo .so || echo .dylib)'
2160  # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
2161  if test "$GCC" = yes; then
2162    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"`
2163  else
2164    sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
2165  fi
2166  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
2167  ;;
2168
2169dgux*)
2170  version_type=linux
2171  need_lib_prefix=no
2172  need_version=no
2173  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
2174  soname_spec='${libname}${release}${shared_ext}$major'
2175  shlibpath_var=LD_LIBRARY_PATH
2176  ;;
2177
2178freebsd1*)
2179  dynamic_linker=no
2180  ;;
2181
2182kfreebsd*-gnu)
2183  version_type=linux
2184  need_lib_prefix=no
2185  need_version=no
2186  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2187  soname_spec='${libname}${release}${shared_ext}$major'
2188  shlibpath_var=LD_LIBRARY_PATH
2189  shlibpath_overrides_runpath=no
2190  hardcode_into_libs=yes
2191  dynamic_linker='GNU ld.so'
2192  ;;
2193
2194freebsd* | dragonfly*)
2195  # DragonFly does not have aout.  When/if they implement a new
2196  # versioning mechanism, adjust this.
2197  objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
2198  version_type=freebsd-$objformat
2199  case $version_type in
2200    freebsd-elf*)
2201      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
2202      need_version=no
2203      need_lib_prefix=no
2204      ;;
2205    freebsd-*)
2206      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
2207      need_version=yes
2208      ;;
2209  esac
2210  shlibpath_var=LD_LIBRARY_PATH
2211  case $host_os in
2212  freebsd2*)
2213    shlibpath_overrides_runpath=yes
2214    ;;
2215  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
2216    shlibpath_overrides_runpath=yes
2217    hardcode_into_libs=yes
2218    ;;
2219  *) # from 3.2 on
2220    shlibpath_overrides_runpath=no
2221    hardcode_into_libs=yes
2222    ;;
2223  esac
2224  ;;
2225
2226gnu*)
2227  version_type=linux
2228  need_lib_prefix=no
2229  need_version=no
2230  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
2231  soname_spec='${libname}${release}${shared_ext}$major'
2232  shlibpath_var=LD_LIBRARY_PATH
2233  hardcode_into_libs=yes
2234  ;;
2235
2236hpux9* | hpux10* | hpux11*)
2237  # Give a soname corresponding to the major version so that dld.sl refuses to
2238  # link against other versions.
2239  version_type=sunos
2240  need_lib_prefix=no
2241  need_version=no
2242  case "$host_cpu" in
2243  ia64*)
2244    shrext_cmds='.so'
2245    hardcode_into_libs=yes
2246    dynamic_linker="$host_os dld.so"
2247    shlibpath_var=LD_LIBRARY_PATH
2248    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2249    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2250    soname_spec='${libname}${release}${shared_ext}$major'
2251    if test "X$HPUX_IA64_MODE" = X32; then
2252      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
2253    else
2254      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
2255    fi
2256    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2257    ;;
2258   hppa*64*)
2259     shrext_cmds='.sl'
2260     hardcode_into_libs=yes
2261     dynamic_linker="$host_os dld.sl"
2262     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
2263     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2264     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2265     soname_spec='${libname}${release}${shared_ext}$major'
2266     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
2267     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2268     ;;
2269   *)
2270    shrext_cmds='.sl'
2271    dynamic_linker="$host_os dld.sl"
2272    shlibpath_var=SHLIB_PATH
2273    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
2274    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2275    soname_spec='${libname}${release}${shared_ext}$major'
2276    ;;
2277  esac
2278  # HP-UX runs *really* slowly unless shared libraries are mode 555.
2279  postinstall_cmds='chmod 555 $lib'
2280  ;;
2281
2282irix5* | irix6* | nonstopux*)
2283  case $host_os in
2284    nonstopux*) version_type=nonstopux ;;
2285    *)
2286	if test "$lt_cv_prog_gnu_ld" = yes; then
2287		version_type=linux
2288	else
2289		version_type=irix
2290	fi ;;
2291  esac
2292  need_lib_prefix=no
2293  need_version=no
2294  soname_spec='${libname}${release}${shared_ext}$major'
2295  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
2296  case $host_os in
2297  irix5* | nonstopux*)
2298    libsuff= shlibsuff=
2299    ;;
2300  *)
2301    case $LD in # libtool.m4 will add one of these switches to LD
2302    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
2303      libsuff= shlibsuff= libmagic=32-bit;;
2304    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
2305      libsuff=32 shlibsuff=N32 libmagic=N32;;
2306    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
2307      libsuff=64 shlibsuff=64 libmagic=64-bit;;
2308    *) libsuff= shlibsuff= libmagic=never-match;;
2309    esac
2310    ;;
2311  esac
2312  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
2313  shlibpath_overrides_runpath=no
2314  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
2315  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
2316  hardcode_into_libs=yes
2317  ;;
2318
2319# No shared lib support for Linux oldld, aout, or coff.
2320linux*oldld* | linux*aout* | linux*coff*)
2321  dynamic_linker=no
2322  ;;
2323
2324# This must be Linux ELF.
2325linux*)
2326  version_type=linux
2327  need_lib_prefix=no
2328  need_version=no
2329  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2330  soname_spec='${libname}${release}${shared_ext}$major'
2331  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
2332  shlibpath_var=LD_LIBRARY_PATH
2333  shlibpath_overrides_runpath=no
2334  # This implies no fast_install, which is unacceptable.
2335  # Some rework will be needed to allow for fast_install
2336  # before this can be enabled.
2337  hardcode_into_libs=yes
2338
2339  # find out which ABI we are using
2340  libsuff=
2341  case "$host_cpu" in
2342  x86_64*|s390x*|powerpc64*)
2343    echo '[#]line __oline__ "configure"' > conftest.$ac_ext
2344    if AC_TRY_EVAL(ac_compile); then
2345      case `/usr/bin/file conftest.$ac_objext` in
2346      *64-bit*)
2347        libsuff=64
2348        sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
2349        ;;
2350      esac
2351    fi
2352    rm -rf conftest*
2353    ;;
2354  esac
2355
2356  # Append ld.so.conf contents to the search path
2357  if test -f /etc/ld.so.conf; then
2358    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:,\t]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
2359    sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra"
2360  fi
2361
2362  # We used to test for /lib/ld.so.1 and disable shared libraries on
2363  # powerpc, because MkLinux only supported shared libraries with the
2364  # GNU dynamic linker.  Since this was broken with cross compilers,
2365  # most powerpc-linux boxes support dynamic linking these days and
2366  # people can always --disable-shared, the test was removed, and we
2367  # assume the GNU/Linux dynamic linker is in use.
2368  dynamic_linker='GNU/Linux ld.so'
2369  ;;
2370
2371knetbsd*-gnu)
2372  version_type=linux
2373  need_lib_prefix=no
2374  need_version=no
2375  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2376  soname_spec='${libname}${release}${shared_ext}$major'
2377  shlibpath_var=LD_LIBRARY_PATH
2378  shlibpath_overrides_runpath=no
2379  hardcode_into_libs=yes
2380  dynamic_linker='GNU ld.so'
2381  ;;
2382
2383netbsd*)
2384  version_type=sunos
2385  need_lib_prefix=no
2386  need_version=no
2387  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
2388    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2389    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2390    dynamic_linker='NetBSD (a.out) ld.so'
2391  else
2392    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2393    soname_spec='${libname}${release}${shared_ext}$major'
2394    dynamic_linker='NetBSD ld.elf_so'
2395  fi
2396  shlibpath_var=LD_LIBRARY_PATH
2397  shlibpath_overrides_runpath=yes
2398  hardcode_into_libs=yes
2399  ;;
2400
2401newsos6)
2402  version_type=linux
2403  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2404  shlibpath_var=LD_LIBRARY_PATH
2405  shlibpath_overrides_runpath=yes
2406  ;;
2407
2408nto-qnx*)
2409  version_type=linux
2410  need_lib_prefix=no
2411  need_version=no
2412  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2413  soname_spec='${libname}${release}${shared_ext}$major'
2414  shlibpath_var=LD_LIBRARY_PATH
2415  shlibpath_overrides_runpath=yes
2416  ;;
2417
2418openbsd*)
2419  version_type=sunos
2420  need_lib_prefix=no
2421  need_version=no
2422  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2423  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2424  shlibpath_var=LD_LIBRARY_PATH
2425  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2426    case $host_os in
2427      openbsd2.[[89]] | openbsd2.[[89]].*)
2428	shlibpath_overrides_runpath=no
2429	;;
2430      *)
2431	shlibpath_overrides_runpath=yes
2432	;;
2433      esac
2434  else
2435    shlibpath_overrides_runpath=yes
2436  fi
2437  ;;
2438
2439os2*)
2440  libname_spec='$name'
2441  shrext_cmds=".dll"
2442  need_lib_prefix=no
2443  library_names_spec='$libname${shared_ext} $libname.a'
2444  dynamic_linker='OS/2 ld.exe'
2445  shlibpath_var=LIBPATH
2446  ;;
2447
2448osf3* | osf4* | osf5*)
2449  version_type=osf
2450  need_lib_prefix=no
2451  need_version=no
2452  soname_spec='${libname}${release}${shared_ext}$major'
2453  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2454  shlibpath_var=LD_LIBRARY_PATH
2455  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
2456  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
2457  ;;
2458
2459sco3.2v5*)
2460  version_type=osf
2461  soname_spec='${libname}${release}${shared_ext}$major'
2462  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2463  shlibpath_var=LD_LIBRARY_PATH
2464  ;;
2465
2466solaris*)
2467  version_type=linux
2468  need_lib_prefix=no
2469  need_version=no
2470  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2471  soname_spec='${libname}${release}${shared_ext}$major'
2472  shlibpath_var=LD_LIBRARY_PATH
2473  shlibpath_overrides_runpath=yes
2474  hardcode_into_libs=yes
2475  # ldd complains unless libraries are executable
2476  postinstall_cmds='chmod +x $lib'
2477  ;;
2478
2479sunos4*)
2480  version_type=sunos
2481  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2482  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
2483  shlibpath_var=LD_LIBRARY_PATH
2484  shlibpath_overrides_runpath=yes
2485  if test "$with_gnu_ld" = yes; then
2486    need_lib_prefix=no
2487  fi
2488  need_version=yes
2489  ;;
2490
2491sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
2492  version_type=linux
2493  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2494  soname_spec='${libname}${release}${shared_ext}$major'
2495  shlibpath_var=LD_LIBRARY_PATH
2496  case $host_vendor in
2497    sni)
2498      shlibpath_overrides_runpath=no
2499      need_lib_prefix=no
2500      export_dynamic_flag_spec='${wl}-Blargedynsym'
2501      runpath_var=LD_RUN_PATH
2502      ;;
2503    siemens)
2504      need_lib_prefix=no
2505      ;;
2506    motorola)
2507      need_lib_prefix=no
2508      need_version=no
2509      shlibpath_overrides_runpath=no
2510      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
2511      ;;
2512  esac
2513  ;;
2514
2515sysv4*MP*)
2516  if test -d /usr/nec ;then
2517    version_type=linux
2518    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
2519    soname_spec='$libname${shared_ext}.$major'
2520    shlibpath_var=LD_LIBRARY_PATH
2521  fi
2522  ;;
2523
2524uts4*)
2525  version_type=linux
2526  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2527  soname_spec='${libname}${release}${shared_ext}$major'
2528  shlibpath_var=LD_LIBRARY_PATH
2529  ;;
2530
2531*)
2532  dynamic_linker=no
2533  ;;
2534esac
2535AC_MSG_RESULT([$dynamic_linker])
2536test "$dynamic_linker" = no && can_build_shared=no
2537])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
2538
2539
2540# _LT_AC_TAGCONFIG
2541# ----------------
2542AC_DEFUN([_LT_AC_TAGCONFIG],
2543[AC_ARG_WITH([tags],
2544    [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
2545        [include additional configurations @<:@automatic@:>@])],
2546    [tagnames="$withval"])
2547
2548if test -f "$ltmain" && test -n "$tagnames"; then
2549  if test ! -f "${ofile}"; then
2550    AC_MSG_WARN([output file `$ofile' does not exist])
2551  fi
2552
2553  if test -z "$LTCC"; then
2554    eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
2555    if test -z "$LTCC"; then
2556      AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
2557    else
2558      AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
2559    fi
2560  fi
2561
2562  # Extract list of available tagged configurations in $ofile.
2563  # Note that this assumes the entire list is on one line.
2564  available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
2565
2566  lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2567  for tagname in $tagnames; do
2568    IFS="$lt_save_ifs"
2569    # Check whether tagname contains only valid characters
2570    case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
2571    "") ;;
2572    *)  AC_MSG_ERROR([invalid tag name: $tagname])
2573	;;
2574    esac
2575
2576    if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
2577    then
2578      AC_MSG_ERROR([tag name \"$tagname\" already exists])
2579    fi
2580
2581    # Update the list of available tags.
2582    if test -n "$tagname"; then
2583      echo appending configuration tag \"$tagname\" to $ofile
2584
2585      case $tagname in
2586      CXX)
2587	if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
2588	    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
2589	    (test "X$CXX" != "Xg++"))) ; then
2590	  AC_LIBTOOL_LANG_CXX_CONFIG
2591	else
2592	  tagname=""
2593	fi
2594	;;
2595
2596      F77)
2597	if test -n "$F77" && test "X$F77" != "Xno"; then
2598	  AC_LIBTOOL_LANG_F77_CONFIG
2599	else
2600	  tagname=""
2601	fi
2602	;;
2603
2604      GCJ)
2605	if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
2606	  AC_LIBTOOL_LANG_GCJ_CONFIG
2607	else
2608	  tagname=""
2609	fi
2610	;;
2611
2612      RC)
2613	AC_LIBTOOL_LANG_RC_CONFIG
2614	;;
2615
2616      *)
2617	AC_MSG_ERROR([Unsupported tag name: $tagname])
2618	;;
2619      esac
2620
2621      # Append the new tag name to the list of available tags.
2622      if test -n "$tagname" ; then
2623      available_tags="$available_tags $tagname"
2624    fi
2625    fi
2626  done
2627  IFS="$lt_save_ifs"
2628
2629  # Now substitute the updated list of available tags.
2630  if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
2631    mv "${ofile}T" "$ofile"
2632    chmod +x "$ofile"
2633  else
2634    rm -f "${ofile}T"
2635    AC_MSG_ERROR([unable to update list of available tagged configurations.])
2636  fi
2637fi
2638])# _LT_AC_TAGCONFIG
2639
2640
2641# AC_LIBTOOL_DLOPEN
2642# -----------------
2643# enable checks for dlopen support
2644AC_DEFUN([AC_LIBTOOL_DLOPEN],
2645 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
2646])# AC_LIBTOOL_DLOPEN
2647
2648
2649# AC_LIBTOOL_WIN32_DLL
2650# --------------------
2651# declare package support for building win32 dll's
2652AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
2653[AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
2654])# AC_LIBTOOL_WIN32_DLL
2655
2656
2657# AC_ENABLE_SHARED([DEFAULT])
2658# ---------------------------
2659# implement the --enable-shared flag
2660# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
2661AC_DEFUN([AC_ENABLE_SHARED],
2662[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
2663AC_ARG_ENABLE([shared],
2664    [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
2665	[build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
2666    [p=${PACKAGE-default}
2667    case $enableval in
2668    yes) enable_shared=yes ;;
2669    no) enable_shared=no ;;
2670    *)
2671      enable_shared=no
2672      # Look at the argument we got.  We use all the common list separators.
2673      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2674      for pkg in $enableval; do
2675	IFS="$lt_save_ifs"
2676	if test "X$pkg" = "X$p"; then
2677	  enable_shared=yes
2678	fi
2679      done
2680      IFS="$lt_save_ifs"
2681      ;;
2682    esac],
2683    [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
2684])# AC_ENABLE_SHARED
2685
2686
2687# AC_DISABLE_SHARED
2688# -----------------
2689#- set the default shared flag to --disable-shared
2690AC_DEFUN([AC_DISABLE_SHARED],
2691[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2692AC_ENABLE_SHARED(no)
2693])# AC_DISABLE_SHARED
2694
2695
2696# AC_ENABLE_STATIC([DEFAULT])
2697# ---------------------------
2698# implement the --enable-static flag
2699# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
2700AC_DEFUN([AC_ENABLE_STATIC],
2701[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
2702AC_ARG_ENABLE([static],
2703    [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
2704	[build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
2705    [p=${PACKAGE-default}
2706    case $enableval in
2707    yes) enable_static=yes ;;
2708    no) enable_static=no ;;
2709    *)
2710     enable_static=no
2711      # Look at the argument we got.  We use all the common list separators.
2712      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2713      for pkg in $enableval; do
2714	IFS="$lt_save_ifs"
2715	if test "X$pkg" = "X$p"; then
2716	  enable_static=yes
2717	fi
2718      done
2719      IFS="$lt_save_ifs"
2720      ;;
2721    esac],
2722    [enable_static=]AC_ENABLE_STATIC_DEFAULT)
2723])# AC_ENABLE_STATIC
2724
2725
2726# AC_DISABLE_STATIC
2727# -----------------
2728# set the default static flag to --disable-static
2729AC_DEFUN([AC_DISABLE_STATIC],
2730[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2731AC_ENABLE_STATIC(no)
2732])# AC_DISABLE_STATIC
2733
2734
2735# AC_ENABLE_FAST_INSTALL([DEFAULT])
2736# ---------------------------------
2737# implement the --enable-fast-install flag
2738# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
2739AC_DEFUN([AC_ENABLE_FAST_INSTALL],
2740[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
2741AC_ARG_ENABLE([fast-install],
2742    [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
2743    [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
2744    [p=${PACKAGE-default}
2745    case $enableval in
2746    yes) enable_fast_install=yes ;;
2747    no) enable_fast_install=no ;;
2748    *)
2749      enable_fast_install=no
2750      # Look at the argument we got.  We use all the common list separators.
2751      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2752      for pkg in $enableval; do
2753	IFS="$lt_save_ifs"
2754	if test "X$pkg" = "X$p"; then
2755	  enable_fast_install=yes
2756	fi
2757      done
2758      IFS="$lt_save_ifs"
2759      ;;
2760    esac],
2761    [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
2762])# AC_ENABLE_FAST_INSTALL
2763
2764
2765# AC_DISABLE_FAST_INSTALL
2766# -----------------------
2767# set the default to --disable-fast-install
2768AC_DEFUN([AC_DISABLE_FAST_INSTALL],
2769[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2770AC_ENABLE_FAST_INSTALL(no)
2771])# AC_DISABLE_FAST_INSTALL
2772
2773
2774# AC_LIBTOOL_PICMODE([MODE])
2775# --------------------------
2776# implement the --with-pic flag
2777# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
2778AC_DEFUN([AC_LIBTOOL_PICMODE],
2779[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2780pic_mode=ifelse($#,1,$1,default)
2781])# AC_LIBTOOL_PICMODE
2782
2783
2784# AC_PROG_EGREP
2785# -------------
2786# This is predefined starting with Autoconf 2.54, so this conditional
2787# definition can be removed once we require Autoconf 2.54 or later.
2788m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
2789[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
2790   [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
2791    then ac_cv_prog_egrep='grep -E'
2792    else ac_cv_prog_egrep='egrep'
2793    fi])
2794 EGREP=$ac_cv_prog_egrep
2795 AC_SUBST([EGREP])
2796])])
2797
2798
2799# AC_PATH_TOOL_PREFIX
2800# -------------------
2801# find a file program which can recognise shared library
2802AC_DEFUN([AC_PATH_TOOL_PREFIX],
2803[AC_REQUIRE([AC_PROG_EGREP])dnl
2804AC_MSG_CHECKING([for $1])
2805AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
2806[case $MAGIC_CMD in
2807[[\\/*] |  ?:[\\/]*])
2808  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
2809  ;;
2810*)
2811  lt_save_MAGIC_CMD="$MAGIC_CMD"
2812  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2813dnl $ac_dummy forces splitting on constant user-supplied paths.
2814dnl POSIX.2 word splitting is done only on the output of word expansions,
2815dnl not every word.  This closes a longstanding sh security hole.
2816  ac_dummy="ifelse([$2], , $PATH, [$2])"
2817  for ac_dir in $ac_dummy; do
2818    IFS="$lt_save_ifs"
2819    test -z "$ac_dir" && ac_dir=.
2820    if test -f $ac_dir/$1; then
2821      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
2822      if test -n "$file_magic_test_file"; then
2823	case $deplibs_check_method in
2824	"file_magic "*)
2825	  file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
2826	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2827	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
2828	    $EGREP "$file_magic_regex" > /dev/null; then
2829	    :
2830	  else
2831	    cat <<EOF 1>&2
2832
2833*** Warning: the command libtool uses to detect shared libraries,
2834*** $file_magic_cmd, produces output that libtool cannot recognize.
2835*** The result is that libtool may fail to recognize shared libraries
2836*** as such.  This will affect the creation of libtool libraries that
2837*** depend on shared libraries, but programs linked with such libtool
2838*** libraries will work regardless of this problem.  Nevertheless, you
2839*** may want to report the problem to your system manager and/or to
2840*** bug-libtool@gnu.org
2841
2842EOF
2843	  fi ;;
2844	esac
2845      fi
2846      break
2847    fi
2848  done
2849  IFS="$lt_save_ifs"
2850  MAGIC_CMD="$lt_save_MAGIC_CMD"
2851  ;;
2852esac])
2853MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2854if test -n "$MAGIC_CMD"; then
2855  AC_MSG_RESULT($MAGIC_CMD)
2856else
2857  AC_MSG_RESULT(no)
2858fi
2859])# AC_PATH_TOOL_PREFIX
2860
2861
2862# AC_PATH_MAGIC
2863# -------------
2864# find a file program which can recognise a shared library
2865AC_DEFUN([AC_PATH_MAGIC],
2866[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
2867if test -z "$lt_cv_path_MAGIC_CMD"; then
2868  if test -n "$ac_tool_prefix"; then
2869    AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
2870  else
2871    MAGIC_CMD=:
2872  fi
2873fi
2874])# AC_PATH_MAGIC
2875
2876
2877# AC_PROG_LD
2878# ----------
2879# find the pathname to the GNU or non-GNU linker
2880AC_DEFUN([AC_PROG_LD],
2881[AC_ARG_WITH([gnu-ld],
2882    [AC_HELP_STRING([--with-gnu-ld],
2883	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
2884    [test "$withval" = no || with_gnu_ld=yes],
2885    [with_gnu_ld=no])
2886AC_REQUIRE([LT_AC_PROG_SED])dnl
2887AC_REQUIRE([AC_PROG_CC])dnl
2888AC_REQUIRE([AC_CANONICAL_HOST])dnl
2889AC_REQUIRE([AC_CANONICAL_BUILD])dnl
2890ac_prog=ld
2891if test "$GCC" = yes; then
2892  # Check if gcc -print-prog-name=ld gives a path.
2893  AC_MSG_CHECKING([for ld used by $CC])
2894  case $host in
2895  *-*-mingw*)
2896    # gcc leaves a trailing carriage return which upsets mingw
2897    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
2898  *)
2899    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
2900  esac
2901  case $ac_prog in
2902    # Accept absolute paths.
2903    [[\\/]]* | ?:[[\\/]]*)
2904      re_direlt='/[[^/]][[^/]]*/\.\./'
2905      # Canonicalize the pathname of ld
2906      ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
2907      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
2908	ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
2909      done
2910      test -z "$LD" && LD="$ac_prog"
2911      ;;
2912  "")
2913    # If it fails, then pretend we aren't using GCC.
2914    ac_prog=ld
2915    ;;
2916  *)
2917    # If it is relative, then search for the first ld in PATH.
2918    with_gnu_ld=unknown
2919    ;;
2920  esac
2921elif test "$with_gnu_ld" = yes; then
2922  AC_MSG_CHECKING([for GNU ld])
2923else
2924  AC_MSG_CHECKING([for non-GNU ld])
2925fi
2926AC_CACHE_VAL(lt_cv_path_LD,
2927[if test -z "$LD"; then
2928  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2929  for ac_dir in $PATH; do
2930    IFS="$lt_save_ifs"
2931    test -z "$ac_dir" && ac_dir=.
2932    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2933      lt_cv_path_LD="$ac_dir/$ac_prog"
2934      # Check to see if the program is GNU ld.  I'd rather use --version,
2935      # but apparently some GNU ld's only accept -v.
2936      # Break only if it was the GNU/non-GNU ld that we prefer.
2937      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
2938      *GNU* | *'with BFD'*)
2939	test "$with_gnu_ld" != no && break
2940	;;
2941      *)
2942	test "$with_gnu_ld" != yes && break
2943	;;
2944      esac
2945    fi
2946  done
2947  IFS="$lt_save_ifs"
2948else
2949  lt_cv_path_LD="$LD" # Let the user override the test with a path.
2950fi])
2951LD="$lt_cv_path_LD"
2952if test -n "$LD"; then
2953  AC_MSG_RESULT($LD)
2954else
2955  AC_MSG_RESULT(no)
2956fi
2957test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
2958AC_PROG_LD_GNU
2959])# AC_PROG_LD
2960
2961
2962# AC_PROG_LD_GNU
2963# --------------
2964AC_DEFUN([AC_PROG_LD_GNU],
2965[AC_REQUIRE([AC_PROG_EGREP])dnl
2966AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
2967[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
2968case `$LD -v 2>&1 </dev/null` in
2969*GNU* | *'with BFD'*)
2970  lt_cv_prog_gnu_ld=yes
2971  ;;
2972*)
2973  lt_cv_prog_gnu_ld=no
2974  ;;
2975esac])
2976with_gnu_ld=$lt_cv_prog_gnu_ld
2977])# AC_PROG_LD_GNU
2978
2979
2980# AC_PROG_LD_RELOAD_FLAG
2981# ----------------------
2982# find reload flag for linker
2983#   -- PORTME Some linkers may need a different reload flag.
2984AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
2985[AC_CACHE_CHECK([for $LD option to reload object files],
2986  lt_cv_ld_reload_flag,
2987  [lt_cv_ld_reload_flag='-r'])
2988reload_flag=$lt_cv_ld_reload_flag
2989case $reload_flag in
2990"" | " "*) ;;
2991*) reload_flag=" $reload_flag" ;;
2992esac
2993reload_cmds='$LD$reload_flag -o $output$reload_objs'
2994case $host_os in
2995  darwin*)
2996    if test "$GCC" = yes; then
2997      reload_cmds='$CC -nostdlib ${wl}-r -o $output$reload_objs'
2998    else
2999      reload_cmds='$LD$reload_flag -o $output$reload_objs'
3000    fi
3001    ;;
3002esac
3003])# AC_PROG_LD_RELOAD_FLAG
3004
3005
3006# AC_DEPLIBS_CHECK_METHOD
3007# -----------------------
3008# how to check for library dependencies
3009#  -- PORTME fill in with the dynamic library characteristics
3010AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
3011[AC_CACHE_CHECK([how to recognise dependent libraries],
3012lt_cv_deplibs_check_method,
3013[lt_cv_file_magic_cmd='$MAGIC_CMD'
3014lt_cv_file_magic_test_file=
3015lt_cv_deplibs_check_method='unknown'
3016# Need to set the preceding variable on all platforms that support
3017# interlibrary dependencies.
3018# 'none' -- dependencies not supported.
3019# `unknown' -- same as none, but documents that we really don't know.
3020# 'pass_all' -- all dependencies passed with no checks.
3021# 'test_compile' -- check by making test program.
3022# 'file_magic [[regex]]' -- check by looking for files in library path
3023# which responds to the $file_magic_cmd with a given extended regex.
3024# If you have `file' or equivalent on your system and you're not sure
3025# whether `pass_all' will *always* work, you probably want this one.
3026
3027case $host_os in
3028aix4* | aix5*)
3029  lt_cv_deplibs_check_method=pass_all
3030  ;;
3031
3032beos*)
3033  lt_cv_deplibs_check_method=pass_all
3034  ;;
3035
3036bsdi[[45]]*)
3037  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
3038  lt_cv_file_magic_cmd='/usr/bin/file -L'
3039  lt_cv_file_magic_test_file=/shlib/libc.so
3040  ;;
3041
3042cygwin*)
3043  # func_win32_libid is a shell function defined in ltmain.sh
3044  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3045  lt_cv_file_magic_cmd='func_win32_libid'
3046  ;;
3047
3048mingw* | pw32*)
3049  # Base MSYS/MinGW do not provide the 'file' command needed by
3050  # func_win32_libid shell function, so use a weaker test based on 'objdump'.
3051  lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3052  lt_cv_file_magic_cmd='$OBJDUMP -f'
3053  ;;
3054
3055darwin* | rhapsody*)
3056  lt_cv_deplibs_check_method=pass_all
3057  ;;
3058
3059freebsd* | kfreebsd*-gnu | dragonfly*)
3060  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3061    case $host_cpu in
3062    i*86 )
3063      # Not sure whether the presence of OpenBSD here was a mistake.
3064      # Let's accept both of them until this is cleared up.
3065      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
3066      lt_cv_file_magic_cmd=/usr/bin/file
3067      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3068      ;;
3069    esac
3070  else
3071    lt_cv_deplibs_check_method=pass_all
3072  fi
3073  ;;
3074
3075gnu*)
3076  lt_cv_deplibs_check_method=pass_all
3077  ;;
3078
3079hpux10.20* | hpux11*)
3080  lt_cv_file_magic_cmd=/usr/bin/file
3081  case "$host_cpu" in
3082  ia64*)
3083    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
3084    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
3085    ;;
3086  hppa*64*)
3087    [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]']
3088    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
3089    ;;
3090  *)
3091    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
3092    lt_cv_file_magic_test_file=/usr/lib/libc.sl
3093    ;;
3094  esac
3095  ;;
3096
3097irix5* | irix6* | nonstopux*)
3098  case $LD in
3099  *-32|*"-32 ") libmagic=32-bit;;
3100  *-n32|*"-n32 ") libmagic=N32;;
3101  *-64|*"-64 ") libmagic=64-bit;;
3102  *) libmagic=never-match;;
3103  esac
3104  lt_cv_deplibs_check_method=pass_all
3105  ;;
3106
3107# This must be Linux ELF.
3108linux*)
3109  lt_cv_deplibs_check_method=pass_all
3110  ;;
3111
3112netbsd*)
3113  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3114    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3115  else
3116    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
3117  fi
3118  ;;
3119
3120newos6*)
3121  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
3122  lt_cv_file_magic_cmd=/usr/bin/file
3123  lt_cv_file_magic_test_file=/usr/lib/libnls.so
3124  ;;
3125
3126nto-qnx*)
3127  lt_cv_deplibs_check_method=unknown
3128  ;;
3129
3130openbsd*)
3131  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3132    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
3133  else
3134    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3135  fi
3136  ;;
3137
3138osf3* | osf4* | osf5*)
3139  lt_cv_deplibs_check_method=pass_all
3140  ;;
3141
3142sco3.2v5*)
3143  lt_cv_deplibs_check_method=pass_all
3144  ;;
3145
3146solaris*)
3147  lt_cv_deplibs_check_method=pass_all
3148  ;;
3149
3150sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
3151  case $host_vendor in
3152  motorola)
3153    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]]'
3154    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3155    ;;
3156  ncr)
3157    lt_cv_deplibs_check_method=pass_all
3158    ;;
3159  sequent)
3160    lt_cv_file_magic_cmd='/bin/file'
3161    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
3162    ;;
3163  sni)
3164    lt_cv_file_magic_cmd='/bin/file'
3165    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
3166    lt_cv_file_magic_test_file=/lib/libc.so
3167    ;;
3168  siemens)
3169    lt_cv_deplibs_check_method=pass_all
3170    ;;
3171  esac
3172  ;;
3173
3174sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7* | sysv4*uw2*)
3175  lt_cv_deplibs_check_method=pass_all
3176  ;;
3177esac
3178])
3179file_magic_cmd=$lt_cv_file_magic_cmd
3180deplibs_check_method=$lt_cv_deplibs_check_method
3181test -z "$deplibs_check_method" && deplibs_check_method=unknown
3182])# AC_DEPLIBS_CHECK_METHOD
3183
3184
3185# AC_PROG_NM
3186# ----------
3187# find the pathname to a BSD-compatible name lister
3188AC_DEFUN([AC_PROG_NM],
3189[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
3190[if test -n "$NM"; then
3191  # Let the user override the test.
3192  lt_cv_path_NM="$NM"
3193else
3194  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3195  for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
3196    IFS="$lt_save_ifs"
3197    test -z "$ac_dir" && ac_dir=.
3198    tmp_nm="$ac_dir/${ac_tool_prefix}nm"
3199    if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
3200      # Check to see if the nm accepts a BSD-compat flag.
3201      # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3202      #   nm: unknown option "B" ignored
3203      # Tru64's nm complains that /dev/null is an invalid object file
3204      case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
3205      */dev/null* | *'Invalid file or object type'*)
3206	lt_cv_path_NM="$tmp_nm -B"
3207	break
3208        ;;
3209      *)
3210	case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
3211	*/dev/null*)
3212	  lt_cv_path_NM="$tmp_nm -p"
3213	  break
3214	  ;;
3215	*)
3216	  lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3217	  continue # so that we can try to find one that supports BSD flags
3218	  ;;
3219	esac
3220      esac
3221    fi
3222  done
3223  IFS="$lt_save_ifs"
3224  test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
3225fi])
3226NM="$lt_cv_path_NM"
3227])# AC_PROG_NM
3228
3229
3230# AC_CHECK_LIBM
3231# -------------
3232# check for math library
3233AC_DEFUN([AC_CHECK_LIBM],
3234[AC_REQUIRE([AC_CANONICAL_HOST])dnl
3235LIBM=
3236case $host in
3237*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
3238  # These system don't have libm, or don't need it
3239  ;;
3240*-ncr-sysv4.3*)
3241  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
3242  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
3243  ;;
3244*)
3245  AC_CHECK_LIB(m, cos, LIBM="-lm")
3246  ;;
3247esac
3248])# AC_CHECK_LIBM
3249
3250
3251# AC_LIBLTDL_CONVENIENCE([DIRECTORY])
3252# -----------------------------------
3253# sets LIBLTDL to the link flags for the libltdl convenience library and
3254# LTDLINCL to the include flags for the libltdl header and adds
3255# --enable-ltdl-convenience to the configure arguments.  Note that LIBLTDL
3256# and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called.  If
3257# DIRECTORY is not provided, it is assumed to be `libltdl'.  LIBLTDL will
3258# be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed with
3259# '${top_srcdir}/' (note the single quotes!).  If your package is not
3260# flat and you're not using automake, define top_builddir and
3261# top_srcdir appropriately in the Makefiles.
3262AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
3263[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3264  case $enable_ltdl_convenience in
3265  no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
3266  "") enable_ltdl_convenience=yes
3267      ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
3268  esac
3269  LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
3270  LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
3271  # For backwards non-gettext consistent compatibility...
3272  INCLTDL="$LTDLINCL"
3273])# AC_LIBLTDL_CONVENIENCE
3274
3275
3276# AC_LIBLTDL_INSTALLABLE([DIRECTORY])
3277# -----------------------------------
3278# sets LIBLTDL to the link flags for the libltdl installable library and
3279# LTDLINCL to the include flags for the libltdl header and adds
3280# --enable-ltdl-install to the configure arguments.  Note that LIBLTDL
3281# and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called.  If
3282# DIRECTORY is not provided and an installed libltdl is not found, it is
3283# assumed to be `libltdl'.  LIBLTDL will be prefixed with '${top_builddir}/'
3284# and LTDLINCL will be prefixed with '${top_srcdir}/' (note the single
3285# quotes!).  If your package is not flat and you're not using automake,
3286# define top_builddir and top_srcdir appropriately in the Makefiles.
3287# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
3288AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
3289[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3290  AC_CHECK_LIB(ltdl, lt_dlinit,
3291  [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
3292  [if test x"$enable_ltdl_install" = xno; then
3293     AC_MSG_WARN([libltdl not installed, but installation disabled])
3294   else
3295     enable_ltdl_install=yes
3296   fi
3297  ])
3298  if test x"$enable_ltdl_install" = x"yes"; then
3299    ac_configure_args="$ac_configure_args --enable-ltdl-install"
3300    LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
3301    LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
3302  else
3303    ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
3304    LIBLTDL="-lltdl"
3305    LTDLINCL=
3306  fi
3307  # For backwards non-gettext consistent compatibility...
3308  INCLTDL="$LTDLINCL"
3309])# AC_LIBLTDL_INSTALLABLE
3310
3311
3312# AC_LIBTOOL_CXX
3313# --------------
3314# enable support for C++ libraries
3315AC_DEFUN([AC_LIBTOOL_CXX],
3316[AC_REQUIRE([_LT_AC_LANG_CXX])
3317])# AC_LIBTOOL_CXX
3318
3319
3320# _LT_AC_LANG_CXX
3321# ---------------
3322AC_DEFUN([_LT_AC_LANG_CXX],
3323[AC_REQUIRE([AC_PROG_CXX])
3324AC_REQUIRE([_LT_AC_PROG_CXXCPP])
3325_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
3326])# _LT_AC_LANG_CXX
3327
3328# _LT_AC_PROG_CXXCPP
3329# ---------------
3330AC_DEFUN([_LT_AC_PROG_CXXCPP],
3331[
3332AC_REQUIRE([AC_PROG_CXX])
3333if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
3334    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
3335    (test "X$CXX" != "Xg++"))) ; then
3336  AC_PROG_CXXCPP
3337fi
3338])# _LT_AC_PROG_CXXCPP
3339
3340# AC_LIBTOOL_F77
3341# --------------
3342# enable support for Fortran 77 libraries
3343AC_DEFUN([AC_LIBTOOL_F77],
3344[AC_REQUIRE([_LT_AC_LANG_F77])
3345])# AC_LIBTOOL_F77
3346
3347
3348# _LT_AC_LANG_F77
3349# ---------------
3350AC_DEFUN([_LT_AC_LANG_F77],
3351[AC_REQUIRE([AC_PROG_F77])
3352_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
3353])# _LT_AC_LANG_F77
3354
3355
3356# AC_LIBTOOL_GCJ
3357# --------------
3358# enable support for GCJ libraries
3359AC_DEFUN([AC_LIBTOOL_GCJ],
3360[AC_REQUIRE([_LT_AC_LANG_GCJ])
3361])# AC_LIBTOOL_GCJ
3362
3363
3364# _LT_AC_LANG_GCJ
3365# ---------------
3366AC_DEFUN([_LT_AC_LANG_GCJ],
3367[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
3368  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
3369    [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
3370      [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
3371	 [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
3372	   [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
3373_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
3374])# _LT_AC_LANG_GCJ
3375
3376
3377# AC_LIBTOOL_RC
3378# --------------
3379# enable support for Windows resource files
3380AC_DEFUN([AC_LIBTOOL_RC],
3381[AC_REQUIRE([LT_AC_PROG_RC])
3382_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
3383])# AC_LIBTOOL_RC
3384
3385
3386# AC_LIBTOOL_LANG_C_CONFIG
3387# ------------------------
3388# Ensure that the configuration vars for the C compiler are
3389# suitably defined.  Those variables are subsequently used by
3390# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3391AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
3392AC_DEFUN([_LT_AC_LANG_C_CONFIG],
3393[lt_save_CC="$CC"
3394AC_LANG_PUSH(C)
3395
3396# Source file extension for C test sources.
3397ac_ext=c
3398
3399# Object file extension for compiled C test sources.
3400objext=o
3401_LT_AC_TAGVAR(objext, $1)=$objext
3402
3403# Code to be used in simple compile tests
3404lt_simple_compile_test_code="int some_variable = 0;\n"
3405
3406# Code to be used in simple link tests
3407lt_simple_link_test_code='int main(){return(0);}\n'
3408
3409_LT_AC_SYS_COMPILER
3410
3411# save warnings/boilerplate of simple test code
3412_LT_COMPILER_BOILERPLATE
3413_LT_LINKER_BOILERPLATE
3414
3415#
3416# Check for any special shared library compilation flags.
3417#
3418_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)=
3419if test "$GCC" = no; then
3420  case $host_os in
3421  sco3.2v5*)
3422    _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)='-belf'
3423    ;;
3424  esac
3425fi
3426if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then
3427  AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries])
3428  if echo "$old_CC $old_CFLAGS " | grep "[[ 	]]$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[ 	]]" >/dev/null; then :
3429  else
3430    AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure])
3431    _LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no
3432  fi
3433fi
3434
3435
3436#
3437# Check to make sure the static flag actually works.
3438#
3439AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works],
3440  _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
3441  $_LT_AC_TAGVAR(lt_prog_compiler_static, $1),
3442  [],
3443  [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
3444
3445
3446AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
3447AC_LIBTOOL_PROG_COMPILER_PIC($1)
3448AC_LIBTOOL_PROG_CC_C_O($1)
3449AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
3450AC_LIBTOOL_PROG_LD_SHLIBS($1)
3451AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
3452AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
3453AC_LIBTOOL_SYS_LIB_STRIP
3454AC_LIBTOOL_DLOPEN_SELF($1)
3455
3456# Report which librarie types wil actually be built
3457AC_MSG_CHECKING([if libtool supports shared libraries])
3458AC_MSG_RESULT([$can_build_shared])
3459
3460AC_MSG_CHECKING([whether to build shared libraries])
3461test "$can_build_shared" = "no" && enable_shared=no
3462
3463# On AIX, shared libraries and static libraries use the same namespace, and
3464# are all built from PIC.
3465case "$host_os" in
3466aix3*)
3467  test "$enable_shared" = yes && enable_static=no
3468  if test -n "$RANLIB"; then
3469    archive_cmds="$archive_cmds~\$RANLIB \$lib"
3470    postinstall_cmds='$RANLIB $lib'
3471  fi
3472  ;;
3473
3474aix4* | aix5*)
3475  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
3476    test "$enable_shared" = yes && enable_static=no
3477  fi
3478    ;;
3479esac
3480AC_MSG_RESULT([$enable_shared])
3481
3482AC_MSG_CHECKING([whether to build static libraries])
3483# Make sure either enable_shared or enable_static is yes.
3484test "$enable_shared" = yes || enable_static=yes
3485AC_MSG_RESULT([$enable_static])
3486
3487AC_LIBTOOL_CONFIG($1)
3488
3489AC_LANG_POP
3490CC="$lt_save_CC"
3491])# AC_LIBTOOL_LANG_C_CONFIG
3492
3493
3494# AC_LIBTOOL_LANG_CXX_CONFIG
3495# --------------------------
3496# Ensure that the configuration vars for the C compiler are
3497# suitably defined.  Those variables are subsequently used by
3498# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3499AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
3500AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
3501[AC_LANG_PUSH(C++)
3502AC_REQUIRE([AC_PROG_CXX])
3503AC_REQUIRE([_LT_AC_PROG_CXXCPP])
3504
3505_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3506_LT_AC_TAGVAR(allow_undefined_flag, $1)=
3507_LT_AC_TAGVAR(always_export_symbols, $1)=no
3508_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
3509_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
3510_LT_AC_TAGVAR(hardcode_direct, $1)=no
3511_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
3512_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
3513_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
3514_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
3515_LT_AC_TAGVAR(hardcode_automatic, $1)=no
3516_LT_AC_TAGVAR(module_cmds, $1)=
3517_LT_AC_TAGVAR(module_expsym_cmds, $1)=
3518_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
3519_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
3520_LT_AC_TAGVAR(no_undefined_flag, $1)=
3521_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
3522_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
3523
3524# Dependencies to place before and after the object being linked:
3525_LT_AC_TAGVAR(predep_objects, $1)=
3526_LT_AC_TAGVAR(postdep_objects, $1)=
3527_LT_AC_TAGVAR(predeps, $1)=
3528_LT_AC_TAGVAR(postdeps, $1)=
3529_LT_AC_TAGVAR(compiler_lib_search_path, $1)=
3530
3531# Source file extension for C++ test sources.
3532ac_ext=cc
3533
3534# Object file extension for compiled C++ test sources.
3535objext=o
3536_LT_AC_TAGVAR(objext, $1)=$objext
3537
3538# Code to be used in simple compile tests
3539lt_simple_compile_test_code="int some_variable = 0;\n"
3540
3541# Code to be used in simple link tests
3542lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n'
3543
3544# ltmain only uses $CC for tagged configurations so make sure $CC is set.
3545_LT_AC_SYS_COMPILER
3546
3547# save warnings/boilerplate of simple test code
3548_LT_COMPILER_BOILERPLATE
3549_LT_LINKER_BOILERPLATE
3550
3551# Allow CC to be a program name with arguments.
3552lt_save_CC=$CC
3553lt_save_LD=$LD
3554lt_save_GCC=$GCC
3555GCC=$GXX
3556lt_save_with_gnu_ld=$with_gnu_ld
3557lt_save_path_LD=$lt_cv_path_LD
3558if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
3559  lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
3560else
3561  unset lt_cv_prog_gnu_ld
3562fi
3563if test -n "${lt_cv_path_LDCXX+set}"; then
3564  lt_cv_path_LD=$lt_cv_path_LDCXX
3565else
3566  unset lt_cv_path_LD
3567fi
3568test -z "${LDCXX+set}" || LD=$LDCXX
3569CC=${CXX-"c++"}
3570compiler=$CC
3571_LT_AC_TAGVAR(compiler, $1)=$CC
3572_LT_CC_BASENAME([$compiler])
3573
3574# We don't want -fno-exception wen compiling C++ code, so set the
3575# no_builtin_flag separately
3576if test "$GXX" = yes; then
3577  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
3578else
3579  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
3580fi
3581
3582if test "$GXX" = yes; then
3583  # Set up default GNU C++ configuration
3584
3585  AC_PROG_LD
3586
3587  # Check if GNU C++ uses GNU ld as the underlying linker, since the
3588  # archiving commands below assume that GNU ld is being used.
3589  if test "$with_gnu_ld" = yes; then
3590    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
3591    _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'
3592
3593    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
3594    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3595
3596    # If archive_cmds runs LD, not CC, wlarc should be empty
3597    # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
3598    #     investigate it a little bit more. (MM)
3599    wlarc='${wl}'
3600
3601    # ancient GNU ld didn't support --whole-archive et. al.
3602    if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
3603	grep 'no-whole-archive' > /dev/null; then
3604      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
3605    else
3606      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
3607    fi
3608  else
3609    with_gnu_ld=no
3610    wlarc=
3611
3612    # A generic and very simple default shared library creation
3613    # command for GNU C++ for the case where it uses the native
3614    # linker, instead of GNU ld.  If possible, this setting should
3615    # overridden to take advantage of the native linker features on
3616    # the platform it is being used on.
3617    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
3618  fi
3619
3620  # Commands to make compiler produce verbose output that lists
3621  # what "hidden" libraries, object files and flags are used when
3622  # linking a shared library.
3623  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
3624
3625else
3626  GXX=no
3627  with_gnu_ld=no
3628  wlarc=
3629fi
3630
3631# PORTME: fill in a description of your system's C++ link characteristics
3632AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
3633_LT_AC_TAGVAR(ld_shlibs, $1)=yes
3634case $host_os in
3635  aix3*)
3636    # FIXME: insert proper C++ library support
3637    _LT_AC_TAGVAR(ld_shlibs, $1)=no
3638    ;;
3639  aix4* | aix5*)
3640    if test "$host_cpu" = ia64; then
3641      # On IA64, the linker does run time linking by default, so we don't
3642      # have to do anything special.
3643      aix_use_runtimelinking=no
3644      exp_sym_flag='-Bexport'
3645      no_entry_flag=""
3646    else
3647      aix_use_runtimelinking=no
3648
3649      # Test if we are trying to use run time linking or normal
3650      # AIX style linking. If -brtl is somewhere in LDFLAGS, we
3651      # need to do runtime linking.
3652      case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
3653	for ld_flag in $LDFLAGS; do
3654	  case $ld_flag in
3655	  *-brtl*)
3656	    aix_use_runtimelinking=yes
3657	    break
3658	    ;;
3659	  esac
3660	done
3661      esac
3662
3663      exp_sym_flag='-bexport'
3664      no_entry_flag='-bnoentry'
3665    fi
3666
3667    # When large executables or shared objects are built, AIX ld can
3668    # have problems creating the table of contents.  If linking a library
3669    # or program results in "error TOC overflow" add -mminimal-toc to
3670    # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
3671    # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
3672
3673    _LT_AC_TAGVAR(archive_cmds, $1)=''
3674    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3675    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
3676    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3677
3678    if test "$GXX" = yes; then
3679      case $host_os in aix4.[[012]]|aix4.[[012]].*)
3680      # We only want to do this on AIX 4.2 and lower, the check
3681      # below for broken collect2 doesn't work under 4.3+
3682	collect2name=`${CC} -print-prog-name=collect2`
3683	if test -f "$collect2name" && \
3684	   strings "$collect2name" | grep resolve_lib_name >/dev/null
3685	then
3686	  # We have reworked collect2
3687	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3688	else
3689	  # We have old collect2
3690	  _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
3691	  # It fails to find uninstalled libraries when the uninstalled
3692	  # path is not listed in the libpath.  Setting hardcode_minus_L
3693	  # to unsupported forces relinking
3694	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
3695	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3696	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
3697	fi
3698      esac
3699      shared_flag='-shared'
3700      if test "$aix_use_runtimelinking" = yes; then
3701	shared_flag="$shared_flag "'${wl}-G'
3702      fi
3703    else
3704      # not using gcc
3705      if test "$host_cpu" = ia64; then
3706	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
3707	# chokes on -Wl,-G. The following line is correct:
3708	shared_flag='-G'
3709      else
3710	if test "$aix_use_runtimelinking" = yes; then
3711	  shared_flag='${wl}-G'
3712	else
3713	  shared_flag='${wl}-bM:SRE'
3714	fi
3715      fi
3716    fi
3717
3718    # It seems that -bexpall does not export symbols beginning with
3719    # underscore (_), so it is better to generate a list of symbols to export.
3720    _LT_AC_TAGVAR(always_export_symbols, $1)=yes
3721    if test "$aix_use_runtimelinking" = yes; then
3722      # Warning - without using the other runtime loading flags (-brtl),
3723      # -berok will link without error, but may produce a broken library.
3724      _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
3725      # Determine the default libpath from the value encoded in an empty executable.
3726      _LT_AC_SYS_LIBPATH_AIX
3727      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
3728
3729      _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"
3730     else
3731      if test "$host_cpu" = ia64; then
3732	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
3733	_LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
3734	_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"
3735      else
3736	# Determine the default libpath from the value encoded in an empty executable.
3737	_LT_AC_SYS_LIBPATH_AIX
3738	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
3739	# Warning - without using the other run time loading flags,
3740	# -berok will link without error, but may produce a broken library.
3741	_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
3742	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
3743	# -bexpall does not export symbols beginning with underscore (_)
3744	_LT_AC_TAGVAR(always_export_symbols, $1)=yes
3745	# Exported symbols can be pulled into shared objects from archives
3746	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
3747	_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
3748	# This is similar to how AIX traditionally builds it's shared libraries.
3749	_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'
3750      fi
3751    fi
3752    ;;
3753  chorus*)
3754    case $cc_basename in
3755      *)
3756	# FIXME: insert proper C++ library support
3757	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3758	;;
3759    esac
3760    ;;
3761
3762
3763  cygwin* | mingw* | pw32*)
3764    # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
3765    # as there is no search path for DLLs.
3766    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3767    _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
3768    _LT_AC_TAGVAR(always_export_symbols, $1)=no
3769    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
3770
3771    if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
3772      _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'
3773      # If the export-symbols file already is a .def file (1st line
3774      # is EXPORTS), use it as is; otherwise, prepend...
3775      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
3776	cp $export_symbols $output_objdir/$soname.def;
3777      else
3778	echo EXPORTS > $output_objdir/$soname.def;
3779	cat $export_symbols >> $output_objdir/$soname.def;
3780      fi~
3781      $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'
3782    else
3783      _LT_AC_TAGVAR(ld_shlibs, $1)=no
3784    fi
3785  ;;
3786      darwin* | rhapsody*)
3787        case "$host_os" in
3788        rhapsody* | darwin1.[[012]])
3789         _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
3790         ;;
3791       *) # Darwin 1.3 on
3792         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
3793           _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
3794         else
3795           case ${MACOSX_DEPLOYMENT_TARGET} in
3796             10.[[012]])
3797               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
3798               ;;
3799             10.*)
3800               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
3801               ;;
3802           esac
3803         fi
3804         ;;
3805        esac
3806      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3807      _LT_AC_TAGVAR(hardcode_direct, $1)=no
3808      _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
3809      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
3810      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
3811      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3812
3813    if test "$GXX" = yes ; then
3814      lt_int_apple_cc_single_mod=no
3815      output_verbose_link_cmd='echo'
3816      if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then
3817       lt_int_apple_cc_single_mod=yes
3818      fi
3819      if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
3820       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
3821      else
3822          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
3823        fi
3824        _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
3825        # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
3826          if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
3827            _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}'
3828          else
3829            _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
3830          fi
3831            _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}'
3832      else
3833      case $cc_basename in
3834        xlc*)
3835         output_verbose_link_cmd='echo'
3836          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
3837          _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
3838          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
3839          _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
3840          _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}'
3841          ;;
3842       *)
3843         _LT_AC_TAGVAR(ld_shlibs, $1)=no
3844          ;;
3845      esac
3846      fi
3847        ;;
3848
3849  dgux*)
3850    case $cc_basename in
3851      ec++*)
3852	# FIXME: insert proper C++ library support
3853	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3854	;;
3855      ghcx*)
3856	# Green Hills C++ Compiler
3857	# FIXME: insert proper C++ library support
3858	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3859	;;
3860      *)
3861	# FIXME: insert proper C++ library support
3862	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3863	;;
3864    esac
3865    ;;
3866  freebsd[[12]]*)
3867    # C++ shared libraries reported to be fairly broken before switch to ELF
3868    _LT_AC_TAGVAR(ld_shlibs, $1)=no
3869    ;;
3870  freebsd-elf*)
3871    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3872    ;;
3873  freebsd* | kfreebsd*-gnu | dragonfly*)
3874    # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
3875    # conventions
3876    _LT_AC_TAGVAR(ld_shlibs, $1)=yes
3877    ;;
3878  gnu*)
3879    ;;
3880  hpux9*)
3881    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3882    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3883    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3884    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3885    _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
3886				# but as the default
3887				# location of the library.
3888
3889    case $cc_basename in
3890    CC*)
3891      # FIXME: insert proper C++ library support
3892      _LT_AC_TAGVAR(ld_shlibs, $1)=no
3893      ;;
3894    aCC*)
3895      _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'
3896      # Commands to make compiler produce verbose output that lists
3897      # what "hidden" libraries, object files and flags are used when
3898      # linking a shared library.
3899      #
3900      # There doesn't appear to be a way to prevent this compiler from
3901      # explicitly linking system object files so we need to strip them
3902      # from the output so that they don't get included in the library
3903      # dependencies.
3904      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'
3905      ;;
3906    *)
3907      if test "$GXX" = yes; then
3908        _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'
3909      else
3910        # FIXME: insert proper C++ library support
3911        _LT_AC_TAGVAR(ld_shlibs, $1)=no
3912      fi
3913      ;;
3914    esac
3915    ;;
3916  hpux10*|hpux11*)
3917    if test $with_gnu_ld = no; then
3918      case "$host_cpu" in
3919      hppa*64*)
3920	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3921	_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
3922	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3923        ;;
3924      ia64*)
3925	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3926        ;;
3927      *)
3928	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3929	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3930	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3931        ;;
3932      esac
3933    fi
3934    case "$host_cpu" in
3935    hppa*64*)
3936      _LT_AC_TAGVAR(hardcode_direct, $1)=no
3937      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3938      ;;
3939    ia64*)
3940      _LT_AC_TAGVAR(hardcode_direct, $1)=no
3941      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3942      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
3943					      # but as the default
3944					      # location of the library.
3945      ;;
3946    *)
3947      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3948      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
3949					      # but as the default
3950					      # location of the library.
3951      ;;
3952    esac
3953
3954    case $cc_basename in
3955      CC*)
3956	# FIXME: insert proper C++ library support
3957	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3958	;;
3959      aCC*)
3960	case "$host_cpu" in
3961	hppa*64*|ia64*)
3962	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
3963	  ;;
3964	*)
3965	  _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'
3966	  ;;
3967	esac
3968	# Commands to make compiler produce verbose output that lists
3969	# what "hidden" libraries, object files and flags are used when
3970	# linking a shared library.
3971	#
3972	# There doesn't appear to be a way to prevent this compiler from
3973	# explicitly linking system object files so we need to strip them
3974	# from the output so that they don't get included in the library
3975	# dependencies.
3976	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'
3977	;;
3978      *)
3979	if test "$GXX" = yes; then
3980	  if test $with_gnu_ld = no; then
3981	    case "$host_cpu" in
3982	    ia64*|hppa*64*)
3983	      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
3984	      ;;
3985	    *)
3986	      _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'
3987	      ;;
3988	    esac
3989	  fi
3990	else
3991	  # FIXME: insert proper C++ library support
3992	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
3993	fi
3994	;;
3995    esac
3996    ;;
3997  irix5* | irix6*)
3998    case $cc_basename in
3999      CC*)
4000	# SGI C++
4001	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
4002
4003	# Archives containing C++ object files must be created using
4004	# "CC -ar", where "CC" is the IRIX C++ compiler.  This is
4005	# necessary to make sure instantiated templates are included
4006	# in the archive.
4007	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
4008	;;
4009      *)
4010	if test "$GXX" = yes; then
4011	  if test "$with_gnu_ld" = no; then
4012	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
4013	  else
4014	    _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'
4015	  fi
4016	fi
4017	_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4018	;;
4019    esac
4020    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4021    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4022    ;;
4023  linux*)
4024    case $cc_basename in
4025      KCC*)
4026	# Kuck and Associates, Inc. (KAI) C++ Compiler
4027
4028	# KCC will only create a shared library if the output file
4029	# ends with ".so" (or ".sl" for HP-UX), so rename the library
4030	# to its proper name (with version) after linking.
4031	_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'
4032	_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'
4033	# Commands to make compiler produce verbose output that lists
4034	# what "hidden" libraries, object files and flags are used when
4035	# linking a shared library.
4036	#
4037	# There doesn't appear to be a way to prevent this compiler from
4038	# explicitly linking system object files so we need to strip them
4039	# from the output so that they don't get included in the library
4040	# dependencies.
4041	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'
4042
4043	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
4044	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4045
4046	# Archives containing C++ object files must be created using
4047	# "CC -Bstatic", where "CC" is the KAI C++ compiler.
4048	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
4049	;;
4050      icpc*)
4051	# Intel C++
4052	with_gnu_ld=yes
4053	# version 8.0 and above of icpc choke on multiply defined symbols
4054	# if we add $predep_objects and $postdep_objects, however 7.1 and
4055	# earlier do not add the objects themselves.
4056	case `$CC -V 2>&1` in
4057	*"Version 7."*)
4058  	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
4059  	  _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'
4060	  ;;
4061	*)  # Version 8.0 or newer
4062	  tmp_idyn=
4063	  case $host_cpu in
4064	    ia64*) tmp_idyn=' -i_dynamic';;
4065	  esac
4066  	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4067	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
4068	  ;;
4069	esac
4070	_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4071	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4072	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4073	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
4074	;;
4075      pgCC*)
4076        # Portland Group C++ compiler
4077	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
4078  	_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'
4079
4080	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
4081	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4082	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
4083        ;;
4084      cxx*)
4085	# Compaq C++
4086	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
4087	_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'
4088
4089	runpath_var=LD_RUN_PATH
4090	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
4091	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4092
4093	# Commands to make compiler produce verbose output that lists
4094	# what "hidden" libraries, object files and flags are used when
4095	# linking a shared library.
4096	#
4097	# There doesn't appear to be a way to prevent this compiler from
4098	# explicitly linking system object files so we need to strip them
4099	# from the output so that they don't get included in the library
4100	# dependencies.
4101	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'
4102	;;
4103    esac
4104    ;;
4105  lynxos*)
4106    # FIXME: insert proper C++ library support
4107    _LT_AC_TAGVAR(ld_shlibs, $1)=no
4108    ;;
4109  m88k*)
4110    # FIXME: insert proper C++ library support
4111    _LT_AC_TAGVAR(ld_shlibs, $1)=no
4112    ;;
4113  mvs*)
4114    case $cc_basename in
4115      cxx*)
4116	# FIXME: insert proper C++ library support
4117	_LT_AC_TAGVAR(ld_shlibs, $1)=no
4118	;;
4119      *)
4120	# FIXME: insert proper C++ library support
4121	_LT_AC_TAGVAR(ld_shlibs, $1)=no
4122	;;
4123    esac
4124    ;;
4125  netbsd*)
4126    if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
4127      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
4128      wlarc=
4129      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4130      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4131      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4132    fi
4133    # Workaround some broken pre-1.5 toolchains
4134    output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
4135    ;;
4136  openbsd2*)
4137    # C++ shared libraries are fairly broken
4138    _LT_AC_TAGVAR(ld_shlibs, $1)=no
4139    ;;
4140  openbsd*)
4141    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4142    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4143    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
4144    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4145    if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
4146      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
4147      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4148      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
4149    fi
4150    output_verbose_link_cmd='echo'
4151    ;;
4152  osf3*)
4153    case $cc_basename in
4154      KCC*)
4155	# Kuck and Associates, Inc. (KAI) C++ Compiler
4156
4157	# KCC will only create a shared library if the output file
4158	# ends with ".so" (or ".sl" for HP-UX), so rename the library
4159	# to its proper name (with version) after linking.
4160	_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'
4161
4162	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4163	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4164
4165	# Archives containing C++ object files must be created using
4166	# "CC -Bstatic", where "CC" is the KAI C++ compiler.
4167	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
4168
4169	;;
4170      RCC*)
4171	# Rational C++ 2.4.1
4172	# FIXME: insert proper C++ library support
4173	_LT_AC_TAGVAR(ld_shlibs, $1)=no
4174	;;
4175      cxx*)
4176	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4177	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
4178
4179	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4180	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4181
4182	# Commands to make compiler produce verbose output that lists
4183	# what "hidden" libraries, object files and flags are used when
4184	# linking a shared library.
4185	#
4186	# There doesn't appear to be a way to prevent this compiler from
4187	# explicitly linking system object files so we need to strip them
4188	# from the output so that they don't get included in the library
4189	# dependencies.
4190	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'
4191	;;
4192      *)
4193	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
4194	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4195	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
4196
4197	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4198	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4199
4200	  # Commands to make compiler produce verbose output that lists
4201	  # what "hidden" libraries, object files and flags are used when
4202	  # linking a shared library.
4203	  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
4204
4205	else
4206	  # FIXME: insert proper C++ library support
4207	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
4208	fi
4209	;;
4210    esac
4211    ;;
4212  osf4* | osf5*)
4213    case $cc_basename in
4214      KCC*)
4215	# Kuck and Associates, Inc. (KAI) C++ Compiler
4216
4217	# KCC will only create a shared library if the output file
4218	# ends with ".so" (or ".sl" for HP-UX), so rename the library
4219	# to its proper name (with version) after linking.
4220	_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'
4221
4222	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4223	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4224
4225	# Archives containing C++ object files must be created using
4226	# the KAI C++ compiler.
4227	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
4228	;;
4229      RCC*)
4230	# Rational C++ 2.4.1
4231	# FIXME: insert proper C++ library support
4232	_LT_AC_TAGVAR(ld_shlibs, $1)=no
4233	;;
4234      cxx*)
4235	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
4236	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
4237	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
4238	  echo "-hidden">> $lib.exp~
4239	  $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp  `test -n "$verstring" && echo -set_version	$verstring` -update_registry ${output_objdir}/so_locations -o $lib~
4240	  $rm $lib.exp'
4241
4242	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
4243	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4244
4245	# Commands to make compiler produce verbose output that lists
4246	# what "hidden" libraries, object files and flags are used when
4247	# linking a shared library.
4248	#
4249	# There doesn't appear to be a way to prevent this compiler from
4250	# explicitly linking system object files so we need to strip them
4251	# from the output so that they don't get included in the library
4252	# dependencies.
4253	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'
4254	;;
4255      *)
4256	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
4257	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4258	 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
4259
4260	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4261	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4262
4263	  # Commands to make compiler produce verbose output that lists
4264	  # what "hidden" libraries, object files and flags are used when
4265	  # linking a shared library.
4266	  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
4267
4268	else
4269	  # FIXME: insert proper C++ library support
4270	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
4271	fi
4272	;;
4273    esac
4274    ;;
4275  psos*)
4276    # FIXME: insert proper C++ library support
4277    _LT_AC_TAGVAR(ld_shlibs, $1)=no
4278    ;;
4279  sco*)
4280    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4281    case $cc_basename in
4282      CC*)
4283	# FIXME: insert proper C++ library support
4284	_LT_AC_TAGVAR(ld_shlibs, $1)=no
4285	;;
4286      *)
4287	# FIXME: insert proper C++ library support
4288	_LT_AC_TAGVAR(ld_shlibs, $1)=no
4289	;;
4290    esac
4291    ;;
4292  sunos4*)
4293    case $cc_basename in
4294      CC*)
4295	# Sun C++ 4.x
4296	# FIXME: insert proper C++ library support
4297	_LT_AC_TAGVAR(ld_shlibs, $1)=no
4298	;;
4299      lcc*)
4300	# Lucid
4301	# FIXME: insert proper C++ library support
4302	_LT_AC_TAGVAR(ld_shlibs, $1)=no
4303	;;
4304      *)
4305	# FIXME: insert proper C++ library support
4306	_LT_AC_TAGVAR(ld_shlibs, $1)=no
4307	;;
4308    esac
4309    ;;
4310  solaris*)
4311    case $cc_basename in
4312      CC*)
4313	# Sun C++ 4.2, 5.x and Centerline C++
4314	_LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
4315	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
4316	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
4317	$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'
4318
4319	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4320	_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4321	case $host_os in
4322	  solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
4323	  *)
4324	    # The C++ compiler is used as linker so we must use $wl
4325	    # flag to pass the commands to the underlying system
4326	    # linker. We must also pass each convience library through
4327	    # to the system linker between allextract/defaultextract.
4328	    # The C++ compiler will combine linker options so we
4329	    # cannot just pass the convience library names through
4330	    # without $wl.
4331	    # Supported since Solaris 2.6 (maybe 2.5.1?)
4332	    _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract'
4333	    ;;
4334	esac
4335	_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4336
4337	# Commands to make compiler produce verbose output that lists
4338	# what "hidden" libraries, object files and flags are used when
4339	# linking a shared library.
4340	#
4341	# There doesn't appear to be a way to prevent this compiler from
4342	# explicitly linking system object files so we need to strip them
4343	# from the output so that they don't get included in the library
4344	# dependencies.
4345	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'
4346
4347	# Archives containing C++ object files must be created using
4348	# "CC -xar", where "CC" is the Sun C++ compiler.  This is
4349	# necessary to make sure instantiated templates are included
4350	# in the archive.
4351	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
4352	;;
4353      gcx*)
4354	# Green Hills C++ Compiler
4355	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
4356
4357	# The C++ compiler must be used to create the archive.
4358	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
4359	;;
4360      *)
4361	# GNU C++ compiler with Solaris linker
4362	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
4363	  _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
4364	  if $CC --version | grep -v '^2\.7' > /dev/null; then
4365	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
4366	    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
4367		$CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
4368
4369	    # Commands to make compiler produce verbose output that lists
4370	    # what "hidden" libraries, object files and flags are used when
4371	    # linking a shared library.
4372	    output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
4373	  else
4374	    # g++ 2.7 appears to require `-G' NOT `-shared' on this
4375	    # platform.
4376	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
4377	    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
4378		$CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
4379
4380	    # Commands to make compiler produce verbose output that lists
4381	    # what "hidden" libraries, object files and flags are used when
4382	    # linking a shared library.
4383	    output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
4384	  fi
4385
4386	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
4387	fi
4388	;;
4389    esac
4390    ;;
4391  sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
4392    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4393    ;;
4394  tandem*)
4395    case $cc_basename in
4396      NCC*)
4397	# NonStop-UX NCC 3.20
4398	# FIXME: insert proper C++ library support
4399	_LT_AC_TAGVAR(ld_shlibs, $1)=no
4400	;;
4401      *)
4402	# FIXME: insert proper C++ library support
4403	_LT_AC_TAGVAR(ld_shlibs, $1)=no
4404	;;
4405    esac
4406    ;;
4407  vxworks*)
4408    # FIXME: insert proper C++ library support
4409    _LT_AC_TAGVAR(ld_shlibs, $1)=no
4410    ;;
4411  *)
4412    # FIXME: insert proper C++ library support
4413    _LT_AC_TAGVAR(ld_shlibs, $1)=no
4414    ;;
4415esac
4416AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
4417test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
4418
4419_LT_AC_TAGVAR(GCC, $1)="$GXX"
4420_LT_AC_TAGVAR(LD, $1)="$LD"
4421
4422AC_LIBTOOL_POSTDEP_PREDEP($1)
4423AC_LIBTOOL_PROG_COMPILER_PIC($1)
4424AC_LIBTOOL_PROG_CC_C_O($1)
4425AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
4426AC_LIBTOOL_PROG_LD_SHLIBS($1)
4427AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
4428AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
4429AC_LIBTOOL_SYS_LIB_STRIP
4430AC_LIBTOOL_DLOPEN_SELF($1)
4431
4432AC_LIBTOOL_CONFIG($1)
4433
4434AC_LANG_POP
4435CC=$lt_save_CC
4436LDCXX=$LD
4437LD=$lt_save_LD
4438GCC=$lt_save_GCC
4439with_gnu_ldcxx=$with_gnu_ld
4440with_gnu_ld=$lt_save_with_gnu_ld
4441lt_cv_path_LDCXX=$lt_cv_path_LD
4442lt_cv_path_LD=$lt_save_path_LD
4443lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
4444lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
4445])# AC_LIBTOOL_LANG_CXX_CONFIG
4446
4447# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
4448# ------------------------
4449# Figure out "hidden" library dependencies from verbose
4450# compiler output when linking a shared library.
4451# Parse the compiler output and extract the necessary
4452# objects, libraries and library flags.
4453AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[
4454dnl we can't use the lt_simple_compile_test_code here,
4455dnl because it contains code intended for an executable,
4456dnl not a library.  It's possible we should let each
4457dnl tag define a new lt_????_link_test_code variable,
4458dnl but it's only used here...
4459ifelse([$1],[],[cat > conftest.$ac_ext <<EOF
4460int a;
4461void foo (void) { a = 0; }
4462EOF
4463],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
4464class Foo
4465{
4466public:
4467  Foo (void) { a = 0; }
4468private:
4469  int a;
4470};
4471EOF
4472],[$1],[F77],[cat > conftest.$ac_ext <<EOF
4473      subroutine foo
4474      implicit none
4475      integer*4 a
4476      a=0
4477      return
4478      end
4479EOF
4480],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
4481public class foo {
4482  private int a;
4483  public void bar (void) {
4484    a = 0;
4485  }
4486};
4487EOF
4488])
4489dnl Parse the compiler output and extract the necessary
4490dnl objects, libraries and library flags.
4491if AC_TRY_EVAL(ac_compile); then
4492  # Parse the compiler output and extract the necessary
4493  # objects, libraries and library flags.
4494
4495  # Sentinel used to keep track of whether or not we are before
4496  # the conftest object file.
4497  pre_test_object_deps_done=no
4498
4499  # The `*' in the case matches for architectures that use `case' in
4500  # $output_verbose_cmd can trigger glob expansion during the loop
4501  # eval without this substitution.
4502  output_verbose_link_cmd="`$echo \"X$output_verbose_link_cmd\" | $Xsed -e \"$no_glob_subst\"`"
4503
4504  for p in `eval $output_verbose_link_cmd`; do
4505    case $p in
4506
4507    -L* | -R* | -l*)
4508       # Some compilers place space between "-{L,R}" and the path.
4509       # Remove the space.
4510       if test $p = "-L" \
4511	  || test $p = "-R"; then
4512	 prev=$p
4513	 continue
4514       else
4515	 prev=
4516       fi
4517
4518       if test "$pre_test_object_deps_done" = no; then
4519	 case $p in
4520	 -L* | -R*)
4521	   # Internal compiler library paths should come after those
4522	   # provided the user.  The postdeps already come after the
4523	   # user supplied libs so there is no need to process them.
4524	   if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
4525	     _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
4526	   else
4527	     _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
4528	   fi
4529	   ;;
4530	 # The "-l" case would never come before the object being
4531	 # linked, so don't bother handling this case.
4532	 esac
4533       else
4534	 if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
4535	   _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
4536	 else
4537	   _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
4538	 fi
4539       fi
4540       ;;
4541
4542    *.$objext)
4543       # This assumes that the test object file only shows up
4544       # once in the compiler output.
4545       if test "$p" = "conftest.$objext"; then
4546	 pre_test_object_deps_done=yes
4547	 continue
4548       fi
4549
4550       if test "$pre_test_object_deps_done" = no; then
4551	 if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
4552	   _LT_AC_TAGVAR(predep_objects, $1)="$p"
4553	 else
4554	   _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
4555	 fi
4556       else
4557	 if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
4558	   _LT_AC_TAGVAR(postdep_objects, $1)="$p"
4559	 else
4560	   _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
4561	 fi
4562       fi
4563       ;;
4564
4565    *) ;; # Ignore the rest.
4566
4567    esac
4568  done
4569
4570  # Clean up.
4571  rm -f a.out a.exe
4572else
4573  echo "libtool.m4: error: problem compiling $1 test program"
4574fi
4575
4576$rm -f confest.$objext
4577
4578case " $_LT_AC_TAGVAR(postdeps, $1) " in
4579*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
4580esac
4581])# AC_LIBTOOL_POSTDEP_PREDEP
4582
4583# AC_LIBTOOL_LANG_F77_CONFIG
4584# ------------------------
4585# Ensure that the configuration vars for the C compiler are
4586# suitably defined.  Those variables are subsequently used by
4587# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4588AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
4589AC_DEFUN([_LT_AC_LANG_F77_CONFIG],
4590[AC_REQUIRE([AC_PROG_F77])
4591AC_LANG_PUSH(Fortran 77)
4592
4593_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4594_LT_AC_TAGVAR(allow_undefined_flag, $1)=
4595_LT_AC_TAGVAR(always_export_symbols, $1)=no
4596_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
4597_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
4598_LT_AC_TAGVAR(hardcode_direct, $1)=no
4599_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
4600_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
4601_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
4602_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
4603_LT_AC_TAGVAR(hardcode_automatic, $1)=no
4604_LT_AC_TAGVAR(module_cmds, $1)=
4605_LT_AC_TAGVAR(module_expsym_cmds, $1)=
4606_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
4607_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
4608_LT_AC_TAGVAR(no_undefined_flag, $1)=
4609_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
4610_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
4611
4612# Source file extension for f77 test sources.
4613ac_ext=f
4614
4615# Object file extension for compiled f77 test sources.
4616objext=o
4617_LT_AC_TAGVAR(objext, $1)=$objext
4618
4619# Code to be used in simple compile tests
4620lt_simple_compile_test_code="      subroutine t\n      return\n      end\n"
4621
4622# Code to be used in simple link tests
4623lt_simple_link_test_code="      program t\n      end\n"
4624
4625# ltmain only uses $CC for tagged configurations so make sure $CC is set.
4626_LT_AC_SYS_COMPILER
4627
4628# save warnings/boilerplate of simple test code
4629_LT_COMPILER_BOILERPLATE
4630_LT_LINKER_BOILERPLATE
4631
4632# Allow CC to be a program name with arguments.
4633lt_save_CC="$CC"
4634CC=${F77-"f77"}
4635compiler=$CC
4636_LT_AC_TAGVAR(compiler, $1)=$CC
4637_LT_CC_BASENAME([$compiler])
4638
4639AC_MSG_CHECKING([if libtool supports shared libraries])
4640AC_MSG_RESULT([$can_build_shared])
4641
4642AC_MSG_CHECKING([whether to build shared libraries])
4643test "$can_build_shared" = "no" && enable_shared=no
4644
4645# On AIX, shared libraries and static libraries use the same namespace, and
4646# are all built from PIC.
4647case "$host_os" in
4648aix3*)
4649  test "$enable_shared" = yes && enable_static=no
4650  if test -n "$RANLIB"; then
4651    archive_cmds="$archive_cmds~\$RANLIB \$lib"
4652    postinstall_cmds='$RANLIB $lib'
4653  fi
4654  ;;
4655aix4* | aix5*)
4656  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
4657    test "$enable_shared" = yes && enable_static=no
4658  fi
4659  ;;
4660esac
4661AC_MSG_RESULT([$enable_shared])
4662
4663AC_MSG_CHECKING([whether to build static libraries])
4664# Make sure either enable_shared or enable_static is yes.
4665test "$enable_shared" = yes || enable_static=yes
4666AC_MSG_RESULT([$enable_static])
4667
4668test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
4669
4670_LT_AC_TAGVAR(GCC, $1)="$G77"
4671_LT_AC_TAGVAR(LD, $1)="$LD"
4672
4673AC_LIBTOOL_PROG_COMPILER_PIC($1)
4674AC_LIBTOOL_PROG_CC_C_O($1)
4675AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
4676AC_LIBTOOL_PROG_LD_SHLIBS($1)
4677AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
4678AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
4679AC_LIBTOOL_SYS_LIB_STRIP
4680
4681
4682AC_LIBTOOL_CONFIG($1)
4683
4684AC_LANG_POP
4685CC="$lt_save_CC"
4686])# AC_LIBTOOL_LANG_F77_CONFIG
4687
4688
4689# AC_LIBTOOL_LANG_GCJ_CONFIG
4690# --------------------------
4691# Ensure that the configuration vars for the C compiler are
4692# suitably defined.  Those variables are subsequently used by
4693# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4694AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
4695AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
4696[AC_LANG_SAVE
4697
4698# Source file extension for Java test sources.
4699ac_ext=java
4700
4701# Object file extension for compiled Java test sources.
4702objext=o
4703_LT_AC_TAGVAR(objext, $1)=$objext
4704
4705# Code to be used in simple compile tests
4706lt_simple_compile_test_code="class foo {}\n"
4707
4708# Code to be used in simple link tests
4709lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }\n'
4710
4711# ltmain only uses $CC for tagged configurations so make sure $CC is set.
4712_LT_AC_SYS_COMPILER
4713
4714# save warnings/boilerplate of simple test code
4715_LT_COMPILER_BOILERPLATE
4716_LT_LINKER_BOILERPLATE
4717
4718# Allow CC to be a program name with arguments.
4719lt_save_CC="$CC"
4720CC=${GCJ-"gcj"}
4721compiler=$CC
4722_LT_AC_TAGVAR(compiler, $1)=$CC
4723_LT_CC_BASENAME([$compiler])
4724
4725# GCJ did not exist at the time GCC didn't implicitly link libc in.
4726_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4727
4728_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
4729
4730AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
4731AC_LIBTOOL_PROG_COMPILER_PIC($1)
4732AC_LIBTOOL_PROG_CC_C_O($1)
4733AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
4734AC_LIBTOOL_PROG_LD_SHLIBS($1)
4735AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
4736AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
4737AC_LIBTOOL_SYS_LIB_STRIP
4738AC_LIBTOOL_DLOPEN_SELF($1)
4739
4740AC_LIBTOOL_CONFIG($1)
4741
4742AC_LANG_RESTORE
4743CC="$lt_save_CC"
4744])# AC_LIBTOOL_LANG_GCJ_CONFIG
4745
4746
4747# AC_LIBTOOL_LANG_RC_CONFIG
4748# --------------------------
4749# Ensure that the configuration vars for the Windows resource compiler are
4750# suitably defined.  Those variables are subsequently used by
4751# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4752AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
4753AC_DEFUN([_LT_AC_LANG_RC_CONFIG],
4754[AC_LANG_SAVE
4755
4756# Source file extension for RC test sources.
4757ac_ext=rc
4758
4759# Object file extension for compiled RC test sources.
4760objext=o
4761_LT_AC_TAGVAR(objext, $1)=$objext
4762
4763# Code to be used in simple compile tests
4764lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
4765
4766# Code to be used in simple link tests
4767lt_simple_link_test_code="$lt_simple_compile_test_code"
4768
4769# ltmain only uses $CC for tagged configurations so make sure $CC is set.
4770_LT_AC_SYS_COMPILER
4771
4772# save warnings/boilerplate of simple test code
4773_LT_COMPILER_BOILERPLATE
4774_LT_LINKER_BOILERPLATE
4775
4776# Allow CC to be a program name with arguments.
4777lt_save_CC="$CC"
4778CC=${RC-"windres"}
4779compiler=$CC
4780_LT_AC_TAGVAR(compiler, $1)=$CC
4781_LT_CC_BASENAME([$compiler])
4782_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
4783
4784AC_LIBTOOL_CONFIG($1)
4785
4786AC_LANG_RESTORE
4787CC="$lt_save_CC"
4788])# AC_LIBTOOL_LANG_RC_CONFIG
4789
4790
4791# AC_LIBTOOL_CONFIG([TAGNAME])
4792# ----------------------------
4793# If TAGNAME is not passed, then create an initial libtool script
4794# with a default configuration from the untagged config vars.  Otherwise
4795# add code to config.status for appending the configuration named by
4796# TAGNAME from the matching tagged config vars.
4797AC_DEFUN([AC_LIBTOOL_CONFIG],
4798[# The else clause should only fire when bootstrapping the
4799# libtool distribution, otherwise you forgot to ship ltmain.sh
4800# with your package, and you will get complaints that there are
4801# no rules to generate ltmain.sh.
4802if test -f "$ltmain"; then
4803  # See if we are running on zsh, and set the options which allow our commands through
4804  # without removal of \ escapes.
4805  if test -n "${ZSH_VERSION+set}" ; then
4806    setopt NO_GLOB_SUBST
4807  fi
4808  # Now quote all the things that may contain metacharacters while being
4809  # careful not to overquote the AC_SUBSTed values.  We take copies of the
4810  # variables and quote the copies for generation of the libtool script.
4811  for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \
4812    SED SHELL STRIP \
4813    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
4814    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
4815    deplibs_check_method reload_flag reload_cmds need_locks \
4816    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
4817    lt_cv_sys_global_symbol_to_c_name_address \
4818    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
4819    old_postinstall_cmds old_postuninstall_cmds \
4820    _LT_AC_TAGVAR(compiler, $1) \
4821    _LT_AC_TAGVAR(CC, $1) \
4822    _LT_AC_TAGVAR(LD, $1) \
4823    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
4824    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
4825    _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
4826    _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
4827    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
4828    _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
4829    _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
4830    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
4831    _LT_AC_TAGVAR(old_archive_cmds, $1) \
4832    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
4833    _LT_AC_TAGVAR(predep_objects, $1) \
4834    _LT_AC_TAGVAR(postdep_objects, $1) \
4835    _LT_AC_TAGVAR(predeps, $1) \
4836    _LT_AC_TAGVAR(postdeps, $1) \
4837    _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
4838    _LT_AC_TAGVAR(archive_cmds, $1) \
4839    _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
4840    _LT_AC_TAGVAR(postinstall_cmds, $1) \
4841    _LT_AC_TAGVAR(postuninstall_cmds, $1) \
4842    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
4843    _LT_AC_TAGVAR(allow_undefined_flag, $1) \
4844    _LT_AC_TAGVAR(no_undefined_flag, $1) \
4845    _LT_AC_TAGVAR(export_symbols_cmds, $1) \
4846    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
4847    _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
4848    _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
4849    _LT_AC_TAGVAR(hardcode_automatic, $1) \
4850    _LT_AC_TAGVAR(module_cmds, $1) \
4851    _LT_AC_TAGVAR(module_expsym_cmds, $1) \
4852    _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
4853    _LT_AC_TAGVAR(exclude_expsyms, $1) \
4854    _LT_AC_TAGVAR(include_expsyms, $1); do
4855
4856    case $var in
4857    _LT_AC_TAGVAR(old_archive_cmds, $1) | \
4858    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
4859    _LT_AC_TAGVAR(archive_cmds, $1) | \
4860    _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
4861    _LT_AC_TAGVAR(module_cmds, $1) | \
4862    _LT_AC_TAGVAR(module_expsym_cmds, $1) | \
4863    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
4864    _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
4865    extract_expsyms_cmds | reload_cmds | finish_cmds | \
4866    postinstall_cmds | postuninstall_cmds | \
4867    old_postinstall_cmds | old_postuninstall_cmds | \
4868    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
4869      # Double-quote double-evaled strings.
4870      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
4871      ;;
4872    *)
4873      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
4874      ;;
4875    esac
4876  done
4877
4878  case $lt_echo in
4879  *'\[$]0 --fallback-echo"')
4880    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
4881    ;;
4882  esac
4883
4884ifelse([$1], [],
4885  [cfgfile="${ofile}T"
4886  trap "$rm \"$cfgfile\"; exit 1" 1 2 15
4887  $rm -f "$cfgfile"
4888  AC_MSG_NOTICE([creating $ofile])],
4889  [cfgfile="$ofile"])
4890
4891  cat <<__EOF__ >> "$cfgfile"
4892ifelse([$1], [],
4893[#! $SHELL
4894
4895# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
4896# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
4897# NOTE: Changes made to this file will be lost: look at ltmain.sh.
4898#
4899# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
4900# Free Software Foundation, Inc.
4901#
4902# This file is part of GNU Libtool:
4903# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
4904#
4905# This program is free software; you can redistribute it and/or modify
4906# it under the terms of the GNU General Public License as published by
4907# the Free Software Foundation; either version 2 of the License, or
4908# (at your option) any later version.
4909#
4910# This program is distributed in the hope that it will be useful, but
4911# WITHOUT ANY WARRANTY; without even the implied warranty of
4912# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
4913# General Public License for more details.
4914#
4915# You should have received a copy of the GNU General Public License
4916# along with this program; if not, write to the Free Software
4917# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
4918#
4919# As a special exception to the GNU General Public License, if you
4920# distribute this file as part of a program that contains a
4921# configuration script generated by Autoconf, you may include it under
4922# the same distribution terms that you use for the rest of that program.
4923
4924# A sed program that does not truncate output.
4925SED=$lt_SED
4926
4927# Sed that helps us avoid accidentally triggering echo(1) options like -n.
4928Xsed="$SED -e 1s/^X//"
4929
4930# The HP-UX ksh and POSIX shell print the target directory to stdout
4931# if CDPATH is set.
4932(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
4933
4934# The names of the tagged configurations supported by this script.
4935available_tags=
4936
4937# ### BEGIN LIBTOOL CONFIG],
4938[# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
4939
4940# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
4941
4942# Shell to use when invoking shell scripts.
4943SHELL=$lt_SHELL
4944
4945# Whether or not to build shared libraries.
4946build_libtool_libs=$enable_shared
4947
4948# Whether or not to build static libraries.
4949build_old_libs=$enable_static
4950
4951# Whether or not to add -lc for building shared libraries.
4952build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
4953
4954# Whether or not to disallow shared libs when runtime libs are static
4955allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
4956
4957# Whether or not to optimize for fast installation.
4958fast_install=$enable_fast_install
4959
4960# The host system.
4961host_alias=$host_alias
4962host=$host
4963host_os=$host_os
4964
4965# The build system.
4966build_alias=$build_alias
4967build=$build
4968build_os=$build_os
4969
4970# An echo program that does not interpret backslashes.
4971echo=$lt_echo
4972
4973# The archiver.
4974AR=$lt_AR
4975AR_FLAGS=$lt_AR_FLAGS
4976
4977# A C compiler.
4978LTCC=$lt_LTCC
4979
4980# A language-specific compiler.
4981CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
4982
4983# Is the compiler the GNU C compiler?
4984with_gcc=$_LT_AC_TAGVAR(GCC, $1)
4985
4986# An ERE matcher.
4987EGREP=$lt_EGREP
4988
4989# The linker used to build libraries.
4990LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
4991
4992# Whether we need hard or soft links.
4993LN_S=$lt_LN_S
4994
4995# A BSD-compatible nm program.
4996NM=$lt_NM
4997
4998# A symbol stripping program
4999STRIP=$lt_STRIP
5000
5001# Used to examine libraries when file_magic_cmd begins "file"
5002MAGIC_CMD=$MAGIC_CMD
5003
5004# Used on cygwin: DLL creation program.
5005DLLTOOL="$DLLTOOL"
5006
5007# Used on cygwin: object dumper.
5008OBJDUMP="$OBJDUMP"
5009
5010# Used on cygwin: assembler.
5011AS="$AS"
5012
5013# The name of the directory that contains temporary libtool files.
5014objdir=$objdir
5015
5016# How to create reloadable object files.
5017reload_flag=$lt_reload_flag
5018reload_cmds=$lt_reload_cmds
5019
5020# How to pass a linker flag through the compiler.
5021wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
5022
5023# Object file suffix (normally "o").
5024objext="$ac_objext"
5025
5026# Old archive suffix (normally "a").
5027libext="$libext"
5028
5029# Shared library suffix (normally ".so").
5030shrext_cmds='$shrext_cmds'
5031
5032# Executable file suffix (normally "").
5033exeext="$exeext"
5034
5035# Additional compiler flags for building library objects.
5036pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
5037pic_mode=$pic_mode
5038
5039# What is the maximum length of a command?
5040max_cmd_len=$lt_cv_sys_max_cmd_len
5041
5042# Does compiler simultaneously support -c and -o options?
5043compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
5044
5045# Must we lock files when doing compilation?
5046need_locks=$lt_need_locks
5047
5048# Do we need the lib prefix for modules?
5049need_lib_prefix=$need_lib_prefix
5050
5051# Do we need a version for libraries?
5052need_version=$need_version
5053
5054# Whether dlopen is supported.
5055dlopen_support=$enable_dlopen
5056
5057# Whether dlopen of programs is supported.
5058dlopen_self=$enable_dlopen_self
5059
5060# Whether dlopen of statically linked programs is supported.
5061dlopen_self_static=$enable_dlopen_self_static
5062
5063# Compiler flag to prevent dynamic linking.
5064link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
5065
5066# Compiler flag to turn off builtin functions.
5067no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
5068
5069# Compiler flag to allow reflexive dlopens.
5070export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
5071
5072# Compiler flag to generate shared objects directly from archives.
5073whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
5074
5075# Compiler flag to generate thread-safe objects.
5076thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
5077
5078# Library versioning type.
5079version_type=$version_type
5080
5081# Format of library name prefix.
5082libname_spec=$lt_libname_spec
5083
5084# List of archive names.  First name is the real one, the rest are links.
5085# The last name is the one that the linker finds with -lNAME.
5086library_names_spec=$lt_library_names_spec
5087
5088# The coded name of the library, if different from the real name.
5089soname_spec=$lt_soname_spec
5090
5091# Commands used to build and install an old-style archive.
5092RANLIB=$lt_RANLIB
5093old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
5094old_postinstall_cmds=$lt_old_postinstall_cmds
5095old_postuninstall_cmds=$lt_old_postuninstall_cmds
5096
5097# Create an old-style archive from a shared archive.
5098old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
5099
5100# Create a temporary old-style archive to link instead of a shared archive.
5101old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
5102
5103# Commands used to build and install a shared archive.
5104archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
5105archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
5106postinstall_cmds=$lt_postinstall_cmds
5107postuninstall_cmds=$lt_postuninstall_cmds
5108
5109# Commands used to build a loadable module (assumed same as above if empty)
5110module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
5111module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
5112
5113# Commands to strip libraries.
5114old_striplib=$lt_old_striplib
5115striplib=$lt_striplib
5116
5117# Dependencies to place before the objects being linked to create a
5118# shared library.
5119predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
5120
5121# Dependencies to place after the objects being linked to create a
5122# shared library.
5123postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
5124
5125# Dependencies to place before the objects being linked to create a
5126# shared library.
5127predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
5128
5129# Dependencies to place after the objects being linked to create a
5130# shared library.
5131postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
5132
5133# The library search path used internally by the compiler when linking
5134# a shared library.
5135compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
5136
5137# Method to check whether dependent libraries are shared objects.
5138deplibs_check_method=$lt_deplibs_check_method
5139
5140# Command to use when deplibs_check_method == file_magic.
5141file_magic_cmd=$lt_file_magic_cmd
5142
5143# Flag that allows shared libraries with undefined symbols to be built.
5144allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
5145
5146# Flag that forces no undefined symbols.
5147no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
5148
5149# Commands used to finish a libtool library installation in a directory.
5150finish_cmds=$lt_finish_cmds
5151
5152# Same as above, but a single script fragment to be evaled but not shown.
5153finish_eval=$lt_finish_eval
5154
5155# Take the output of nm and produce a listing of raw symbols and C names.
5156global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
5157
5158# Transform the output of nm in a proper C declaration
5159global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
5160
5161# Transform the output of nm in a C name address pair
5162global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
5163
5164# This is the shared library runtime path variable.
5165runpath_var=$runpath_var
5166
5167# This is the shared library path variable.
5168shlibpath_var=$shlibpath_var
5169
5170# Is shlibpath searched before the hard-coded library search path?
5171shlibpath_overrides_runpath=$shlibpath_overrides_runpath
5172
5173# How to hardcode a shared library path into an executable.
5174hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
5175
5176# Whether we should hardcode library paths into libraries.
5177hardcode_into_libs=$hardcode_into_libs
5178
5179# Flag to hardcode \$libdir into a binary during linking.
5180# This must work even if \$libdir does not exist.
5181hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
5182
5183# If ld is used when linking, flag to hardcode \$libdir into
5184# a binary during linking. This must work even if \$libdir does
5185# not exist.
5186hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
5187
5188# Whether we need a single -rpath flag with a separated argument.
5189hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
5190
5191# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
5192# resulting binary.
5193hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
5194
5195# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
5196# resulting binary.
5197hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
5198
5199# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
5200# the resulting binary.
5201hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
5202
5203# Set to yes if building a shared library automatically hardcodes DIR into the library
5204# and all subsequent libraries and executables linked against it.
5205hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)
5206
5207# Variables whose values should be saved in libtool wrapper scripts and
5208# restored at relink time.
5209variables_saved_for_relink="$variables_saved_for_relink"
5210
5211# Whether libtool must link a program against all its dependency libraries.
5212link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
5213
5214# Compile-time system search path for libraries
5215sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
5216
5217# Run-time system search path for libraries
5218sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
5219
5220# Fix the shell variable \$srcfile for the compiler.
5221fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)"
5222
5223# Set to yes if exported symbols are required.
5224always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
5225
5226# The commands to list exported symbols.
5227export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
5228
5229# The commands to extract the exported symbol list from a shared archive.
5230extract_expsyms_cmds=$lt_extract_expsyms_cmds
5231
5232# Symbols that should not be listed in the preloaded symbols.
5233exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
5234
5235# Symbols that must always be exported.
5236include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
5237
5238ifelse([$1],[],
5239[# ### END LIBTOOL CONFIG],
5240[# ### END LIBTOOL TAG CONFIG: $tagname])
5241
5242__EOF__
5243
5244ifelse([$1],[], [
5245  case $host_os in
5246  aix3*)
5247    cat <<\EOF >> "$cfgfile"
5248
5249# AIX sometimes has problems with the GCC collect2 program.  For some
5250# reason, if we set the COLLECT_NAMES environment variable, the problems
5251# vanish in a puff of smoke.
5252if test "X${COLLECT_NAMES+set}" != Xset; then
5253  COLLECT_NAMES=
5254  export COLLECT_NAMES
5255fi
5256EOF
5257    ;;
5258  esac
5259
5260  # We use sed instead of cat because bash on DJGPP gets confused if
5261  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
5262  # text mode, it properly converts lines to CR/LF.  This bash problem
5263  # is reportedly fixed, but why not run on old versions too?
5264  sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
5265
5266  mv -f "$cfgfile" "$ofile" || \
5267    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
5268  chmod +x "$ofile"
5269])
5270else
5271  # If there is no Makefile yet, we rely on a make rule to execute
5272  # `config.status --recheck' to rerun these tests and create the
5273  # libtool script then.
5274  ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
5275  if test -f "$ltmain_in"; then
5276    test -f Makefile && make "$ltmain"
5277  fi
5278fi
5279])# AC_LIBTOOL_CONFIG
5280
5281
5282# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
5283# -------------------------------------------
5284AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
5285[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
5286
5287_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
5288
5289if test "$GCC" = yes; then
5290  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
5291
5292  AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
5293    lt_cv_prog_compiler_rtti_exceptions,
5294    [-fno-rtti -fno-exceptions], [],
5295    [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
5296fi
5297])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
5298
5299
5300# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
5301# ---------------------------------
5302AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
5303[AC_REQUIRE([AC_CANONICAL_HOST])
5304AC_REQUIRE([AC_PROG_NM])
5305AC_REQUIRE([AC_OBJEXT])
5306# Check for command to grab the raw symbol name followed by C symbol from nm.
5307AC_MSG_CHECKING([command to parse $NM output from $compiler object])
5308AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
5309[
5310# These are sane defaults that work on at least a few old systems.
5311# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
5312
5313# Character class describing NM global symbol codes.
5314symcode='[[BCDEGRST]]'
5315
5316# Regexp to match symbols that can be accessed directly from C.
5317sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
5318
5319# Transform an extracted symbol line into a proper C declaration
5320lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
5321
5322# Transform an extracted symbol line into symbol name and symbol address
5323lt_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'"
5324
5325# Define system-specific variables.
5326case $host_os in
5327aix*)
5328  symcode='[[BCDT]]'
5329  ;;
5330cygwin* | mingw* | pw32*)
5331  symcode='[[ABCDGISTW]]'
5332  ;;
5333hpux*) # Its linker distinguishes data from code symbols
5334  if test "$host_cpu" = ia64; then
5335    symcode='[[ABCDEGRST]]'
5336  fi
5337  lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
5338  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'"
5339  ;;
5340linux*)
5341  if test "$host_cpu" = ia64; then
5342    symcode='[[ABCDGIRSTW]]'
5343    lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
5344    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'"
5345  fi
5346  ;;
5347irix* | nonstopux*)
5348  symcode='[[BCDEGRST]]'
5349  ;;
5350osf*)
5351  symcode='[[BCDEGQRST]]'
5352  ;;
5353solaris* | sysv5*)
5354  symcode='[[BDRT]]'
5355  ;;
5356sysv4)
5357  symcode='[[DFNSTU]]'
5358  ;;
5359esac
5360
5361# Handle CRLF in mingw tool chain
5362opt_cr=
5363case $build_os in
5364mingw*)
5365  opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
5366  ;;
5367esac
5368
5369# If we're using GNU nm, then use its standard symbol codes.
5370case `$NM -V 2>&1` in
5371*GNU* | *'with BFD'*)
5372  symcode='[[ABCDGIRSTW]]' ;;
5373esac
5374
5375# Try without a prefix undercore, then with it.
5376for ac_symprfx in "" "_"; do
5377
5378  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
5379  symxfrm="\\1 $ac_symprfx\\2 \\2"
5380
5381  # Write the raw and C identifiers.
5382  lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ 	]]\($symcode$symcode*\)[[ 	]][[ 	]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
5383
5384  # Check to see that the pipe works correctly.
5385  pipe_works=no
5386
5387  rm -f conftest*
5388  cat > conftest.$ac_ext <<EOF
5389#ifdef __cplusplus
5390extern "C" {
5391#endif
5392char nm_test_var;
5393void nm_test_func(){}
5394#ifdef __cplusplus
5395}
5396#endif
5397int main(){nm_test_var='a';nm_test_func();return(0);}
5398EOF
5399
5400  if AC_TRY_EVAL(ac_compile); then
5401    # Now try to grab the symbols.
5402    nlist=conftest.nm
5403    if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
5404      # Try sorting and uniquifying the output.
5405      if sort "$nlist" | uniq > "$nlist"T; then
5406	mv -f "$nlist"T "$nlist"
5407      else
5408	rm -f "$nlist"T
5409      fi
5410
5411      # Make sure that we snagged all the symbols we need.
5412      if grep ' nm_test_var$' "$nlist" >/dev/null; then
5413	if grep ' nm_test_func$' "$nlist" >/dev/null; then
5414	  cat <<EOF > conftest.$ac_ext
5415#ifdef __cplusplus
5416extern "C" {
5417#endif
5418
5419EOF
5420	  # Now generate the symbol file.
5421	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
5422
5423	  cat <<EOF >> conftest.$ac_ext
5424#if defined (__STDC__) && __STDC__
5425# define lt_ptr_t void *
5426#else
5427# define lt_ptr_t char *
5428# define const
5429#endif
5430
5431/* The mapping between symbol names and symbols. */
5432const struct {
5433  const char *name;
5434  lt_ptr_t address;
5435}
5436lt_preloaded_symbols[[]] =
5437{
5438EOF
5439	  $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
5440	  cat <<\EOF >> conftest.$ac_ext
5441  {0, (lt_ptr_t) 0}
5442};
5443
5444#ifdef __cplusplus
5445}
5446#endif
5447EOF
5448	  # Now try linking the two files.
5449	  mv conftest.$ac_objext conftstm.$ac_objext
5450	  lt_save_LIBS="$LIBS"
5451	  lt_save_CFLAGS="$CFLAGS"
5452	  LIBS="conftstm.$ac_objext"
5453	  CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
5454	  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
5455	    pipe_works=yes
5456	  fi
5457	  LIBS="$lt_save_LIBS"
5458	  CFLAGS="$lt_save_CFLAGS"
5459	else
5460	  echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
5461	fi
5462      else
5463	echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
5464      fi
5465    else
5466      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
5467    fi
5468  else
5469    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
5470    cat conftest.$ac_ext >&5
5471  fi
5472  rm -f conftest* conftst*
5473
5474  # Do not use the global_symbol_pipe unless it works.
5475  if test "$pipe_works" = yes; then
5476    break
5477  else
5478    lt_cv_sys_global_symbol_pipe=
5479  fi
5480done
5481])
5482if test -z "$lt_cv_sys_global_symbol_pipe"; then
5483  lt_cv_sys_global_symbol_to_cdecl=
5484fi
5485if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
5486  AC_MSG_RESULT(failed)
5487else
5488  AC_MSG_RESULT(ok)
5489fi
5490]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
5491
5492
5493# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
5494# ---------------------------------------
5495AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
5496[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
5497_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5498_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
5499
5500AC_MSG_CHECKING([for $compiler option to produce PIC])
5501 ifelse([$1],[CXX],[
5502  # C++ specific cases for pic, static, wl, etc.
5503  if test "$GXX" = yes; then
5504    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5505    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5506
5507    case $host_os in
5508    aix*)
5509      # All AIX code is PIC.
5510      if test "$host_cpu" = ia64; then
5511	# AIX 5 now supports IA64 processor
5512	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5513      fi
5514      ;;
5515    amigaos*)
5516      # FIXME: we need at least 68020 code to build shared libraries, but
5517      # adding the `-m68020' flag to GCC prevents building anything better,
5518      # like `-m68040'.
5519      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
5520      ;;
5521    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5522      # PIC is the default for these OSes.
5523      ;;
5524    mingw* | os2* | pw32*)
5525      # This hack is so that the source file can tell whether it is being
5526      # built for inclusion in a dll (and should export symbols for example).
5527      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
5528      ;;
5529    darwin* | rhapsody*)
5530      # PIC is the default on this platform
5531      # Common symbols not allowed in MH_DYLIB files
5532      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5533      ;;
5534    *djgpp*)
5535      # DJGPP does not support shared libraries at all
5536      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5537      ;;
5538    sysv4*MP*)
5539      if test -d /usr/nec; then
5540	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
5541      fi
5542      ;;
5543    hpux*)
5544      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5545      # not for PA HP-UX.
5546      case "$host_cpu" in
5547      hppa*64*|ia64*)
5548	;;
5549      *)
5550	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5551	;;
5552      esac
5553      ;;
5554    *)
5555      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5556      ;;
5557    esac
5558  else
5559    case $host_os in
5560      aix4* | aix5*)
5561	# All AIX code is PIC.
5562	if test "$host_cpu" = ia64; then
5563	  # AIX 5 now supports IA64 processor
5564	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5565	else
5566	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5567	fi
5568	;;
5569      chorus*)
5570	case $cc_basename in
5571	cxch68*)
5572	  # Green Hills C++ Compiler
5573	  # _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"
5574	  ;;
5575	esac
5576	;;
5577       darwin*)
5578         # PIC is the default on this platform
5579         # Common symbols not allowed in MH_DYLIB files
5580         case $cc_basename in
5581           xlc*)
5582           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
5583           _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5584           ;;
5585         esac
5586       ;;
5587      dgux*)
5588	case $cc_basename in
5589	  ec++*)
5590	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5591	    ;;
5592	  ghcx*)
5593	    # Green Hills C++ Compiler
5594	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5595	    ;;
5596	  *)
5597	    ;;
5598	esac
5599	;;
5600      freebsd* | kfreebsd*-gnu | dragonfly*)
5601	# FreeBSD uses GNU C++
5602	;;
5603      hpux9* | hpux10* | hpux11*)
5604	case $cc_basename in
5605	  CC*)
5606	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5607	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
5608	    if test "$host_cpu" != ia64; then
5609	      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5610	    fi
5611	    ;;
5612	  aCC*)
5613	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5614	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
5615	    case "$host_cpu" in
5616	    hppa*64*|ia64*)
5617	      # +Z the default
5618	      ;;
5619	    *)
5620	      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5621	      ;;
5622	    esac
5623	    ;;
5624	  *)
5625	    ;;
5626	esac
5627	;;
5628      irix5* | irix6* | nonstopux*)
5629	case $cc_basename in
5630	  CC*)
5631	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5632	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5633	    # CC pic flag -KPIC is the default.
5634	    ;;
5635	  *)
5636	    ;;
5637	esac
5638	;;
5639      linux*)
5640	case $cc_basename in
5641	  KCC*)
5642	    # KAI C++ Compiler
5643	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
5644	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5645	    ;;
5646	  icpc* | ecpc*)
5647	    # Intel C++
5648	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5649	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5650	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5651	    ;;
5652	  pgCC*)
5653	    # Portland Group C++ compiler.
5654	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5655	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5656	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5657	    ;;
5658	  cxx*)
5659	    # Compaq C++
5660	    # Make sure the PIC flag is empty.  It appears that all Alpha
5661	    # Linux and Compaq Tru64 Unix objects are PIC.
5662	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5663	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5664	    ;;
5665	  *)
5666	    ;;
5667	esac
5668	;;
5669      lynxos*)
5670	;;
5671      m88k*)
5672	;;
5673      mvs*)
5674	case $cc_basename in
5675	  cxx*)
5676	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
5677	    ;;
5678	  *)
5679	    ;;
5680	esac
5681	;;
5682      netbsd*)
5683	;;
5684      osf3* | osf4* | osf5*)
5685	case $cc_basename in
5686	  KCC*)
5687	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
5688	    ;;
5689	  RCC*)
5690	    # Rational C++ 2.4.1
5691	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5692	    ;;
5693	  cxx*)
5694	    # Digital/Compaq C++
5695	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5696	    # Make sure the PIC flag is empty.  It appears that all Alpha
5697	    # Linux and Compaq Tru64 Unix objects are PIC.
5698	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5699	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5700	    ;;
5701	  *)
5702	    ;;
5703	esac
5704	;;
5705      psos*)
5706	;;
5707      sco*)
5708	case $cc_basename in
5709	  CC*)
5710	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5711	    ;;
5712	  *)
5713	    ;;
5714	esac
5715	;;
5716      solaris*)
5717	case $cc_basename in
5718	  CC*)
5719	    # Sun C++ 4.2, 5.x and Centerline C++
5720	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5721	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5722	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5723	    ;;
5724	  gcx*)
5725	    # Green Hills C++ Compiler
5726	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5727	    ;;
5728	  *)
5729	    ;;
5730	esac
5731	;;
5732      sunos4*)
5733	case $cc_basename in
5734	  CC*)
5735	    # Sun C++ 4.x
5736	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5737	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5738	    ;;
5739	  lcc*)
5740	    # Lucid
5741	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5742	    ;;
5743	  *)
5744	    ;;
5745	esac
5746	;;
5747      tandem*)
5748	case $cc_basename in
5749	  NCC*)
5750	    # NonStop-UX NCC 3.20
5751	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5752	    ;;
5753	  *)
5754	    ;;
5755	esac
5756	;;
5757      unixware*)
5758	;;
5759      vxworks*)
5760	;;
5761      *)
5762	_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5763	;;
5764    esac
5765  fi
5766],
5767[
5768  if test "$GCC" = yes; then
5769    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5770    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5771
5772    case $host_os in
5773      aix*)
5774      # All AIX code is PIC.
5775      if test "$host_cpu" = ia64; then
5776	# AIX 5 now supports IA64 processor
5777	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5778      fi
5779      ;;
5780
5781    amigaos*)
5782      # FIXME: we need at least 68020 code to build shared libraries, but
5783      # adding the `-m68020' flag to GCC prevents building anything better,
5784      # like `-m68040'.
5785      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
5786      ;;
5787
5788    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5789      # PIC is the default for these OSes.
5790      ;;
5791
5792    mingw* | pw32* | os2*)
5793      # This hack is so that the source file can tell whether it is being
5794      # built for inclusion in a dll (and should export symbols for example).
5795      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
5796      ;;
5797
5798    darwin* | rhapsody*)
5799      # PIC is the default on this platform
5800      # Common symbols not allowed in MH_DYLIB files
5801      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5802      ;;
5803
5804    msdosdjgpp*)
5805      # Just because we use GCC doesn't mean we suddenly get shared libraries
5806      # on systems that don't support them.
5807      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5808      enable_shared=no
5809      ;;
5810
5811    sysv4*MP*)
5812      if test -d /usr/nec; then
5813	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
5814      fi
5815      ;;
5816
5817    hpux*)
5818      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5819      # not for PA HP-UX.
5820      case "$host_cpu" in
5821      hppa*64*|ia64*)
5822	# +Z the default
5823	;;
5824      *)
5825	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5826	;;
5827      esac
5828      ;;
5829
5830    *)
5831      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5832      ;;
5833    esac
5834  else
5835    # PORTME Check for flag to pass linker flags through the system compiler.
5836    case $host_os in
5837    aix*)
5838      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5839      if test "$host_cpu" = ia64; then
5840	# AIX 5 now supports IA64 processor
5841	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5842      else
5843	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5844      fi
5845      ;;
5846      darwin*)
5847        # PIC is the default on this platform
5848        # Common symbols not allowed in MH_DYLIB files
5849       case $cc_basename in
5850         xlc*)
5851         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
5852         _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5853         ;;
5854       esac
5855       ;;
5856
5857    mingw* | pw32* | os2*)
5858      # This hack is so that the source file can tell whether it is being
5859      # built for inclusion in a dll (and should export symbols for example).
5860      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
5861      ;;
5862
5863    hpux9* | hpux10* | hpux11*)
5864      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5865      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5866      # not for PA HP-UX.
5867      case "$host_cpu" in
5868      hppa*64*|ia64*)
5869	# +Z the default
5870	;;
5871      *)
5872	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5873	;;
5874      esac
5875      # Is there a better lt_prog_compiler_static that works with the bundled CC?
5876      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5877      ;;
5878
5879    irix5* | irix6* | nonstopux*)
5880      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5881      # PIC (with -KPIC) is the default.
5882      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5883      ;;
5884
5885    newsos6)
5886      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5887      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5888      ;;
5889
5890    linux*)
5891      case $cc_basename in
5892      icc* | ecc*)
5893	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5894	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5895	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5896        ;;
5897      pgcc* | pgf77* | pgf90*)
5898        # Portland Group compilers (*not* the Pentium gcc compiler,
5899	# which looks to be a dead project)
5900	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5901	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5902	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5903        ;;
5904      ccc*)
5905        _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5906        # All Alpha code is PIC.
5907        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5908        ;;
5909      esac
5910      ;;
5911
5912    osf3* | osf4* | osf5*)
5913      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5914      # All OSF/1 code is PIC.
5915      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5916      ;;
5917
5918    sco3.2v5*)
5919      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kpic'
5920      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-dn'
5921      ;;
5922
5923    solaris*)
5924      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5925      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5926      case $cc_basename in
5927      f77* | f90* | f95*)
5928	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
5929      *)
5930	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
5931      esac
5932      ;;
5933
5934    sunos4*)
5935      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5936      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5937      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5938      ;;
5939
5940    sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5941      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5942      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5943      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5944      ;;
5945
5946    sysv4*MP*)
5947      if test -d /usr/nec ;then
5948	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
5949	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5950      fi
5951      ;;
5952
5953    unicos*)
5954      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5955      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5956      ;;
5957
5958    uts4*)
5959      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5960      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5961      ;;
5962
5963    *)
5964      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5965      ;;
5966    esac
5967  fi
5968])
5969AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
5970
5971#
5972# Check to make sure the PIC flag actually works.
5973#
5974if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
5975  AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
5976    _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
5977    [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
5978    [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
5979     "" | " "*) ;;
5980     *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
5981     esac],
5982    [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5983     _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
5984fi
5985case "$host_os" in
5986  # For platforms which do not support PIC, -DPIC is meaningless:
5987  *djgpp*)
5988    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5989    ;;
5990  *)
5991    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
5992    ;;
5993esac
5994])
5995
5996
5997# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
5998# ------------------------------------
5999# See if the linker supports building shared libraries.
6000AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
6001[AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
6002ifelse([$1],[CXX],[
6003  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
6004  case $host_os in
6005  aix4* | aix5*)
6006    # If we're using GNU nm, then we don't want the "-C" option.
6007    # -C means demangle to AIX nm, but means don't demangle with GNU nm
6008    if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
6009      _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'
6010    else
6011      _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'
6012    fi
6013    ;;
6014  pw32*)
6015    _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
6016  ;;
6017  cygwin* | mingw*)
6018    _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/;/^.* __nm__/s/^.* __nm__\([[^ ]]*\) [[^ ]]*/\1 DATA/;/^I /d;/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
6019  ;;
6020  *)
6021    _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
6022  ;;
6023  esac
6024],[
6025  runpath_var=
6026  _LT_AC_TAGVAR(allow_undefined_flag, $1)=
6027  _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
6028  _LT_AC_TAGVAR(archive_cmds, $1)=
6029  _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
6030  _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
6031  _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
6032  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
6033  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
6034  _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
6035  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
6036  _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
6037  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
6038  _LT_AC_TAGVAR(hardcode_direct, $1)=no
6039  _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
6040  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
6041  _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
6042  _LT_AC_TAGVAR(hardcode_automatic, $1)=no
6043  _LT_AC_TAGVAR(module_cmds, $1)=
6044  _LT_AC_TAGVAR(module_expsym_cmds, $1)=
6045  _LT_AC_TAGVAR(always_export_symbols, $1)=no
6046  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
6047  # include_expsyms should be a list of space-separated symbols to be *always*
6048  # included in the symbol list
6049  _LT_AC_TAGVAR(include_expsyms, $1)=
6050  # exclude_expsyms can be an extended regexp of symbols to exclude
6051  # it will be wrapped by ` (' and `)$', so one must not match beginning or
6052  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
6053  # as well as any symbol that contains `d'.
6054  _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
6055  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
6056  # platforms (ab)use it in PIC code, but their linkers get confused if
6057  # the symbol is explicitly referenced.  Since portable code cannot
6058  # rely on this symbol name, it's probably fine to never include it in
6059  # preloaded symbol tables.
6060  extract_expsyms_cmds=
6061  # Just being paranoid about ensuring that cc_basename is set.
6062  _LT_CC_BASENAME([$compiler])
6063  case $host_os in
6064  cygwin* | mingw* | pw32*)
6065    # FIXME: the MSVC++ port hasn't been tested in a loooong time
6066    # When not using gcc, we currently assume that we are using
6067    # Microsoft Visual C++.
6068    if test "$GCC" != yes; then
6069      with_gnu_ld=no
6070    fi
6071    ;;
6072  openbsd*)
6073    with_gnu_ld=no
6074    ;;
6075  esac
6076
6077  _LT_AC_TAGVAR(ld_shlibs, $1)=yes
6078  if test "$with_gnu_ld" = yes; then
6079    # If archive_cmds runs LD, not CC, wlarc should be empty
6080    wlarc='${wl}'
6081
6082    # Set some defaults for GNU ld with shared library support. These
6083    # are reset later if shared libraries are not supported. Putting them
6084    # here allows them to be overridden if necessary.
6085    runpath_var=LD_RUN_PATH
6086    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
6087    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6088    # ancient GNU ld didn't support --whole-archive et. al.
6089    if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
6090	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
6091      else
6092  	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
6093    fi
6094    supports_anon_versioning=no
6095    case `$LD -v 2>/dev/null` in
6096      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
6097      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
6098      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
6099      *\ 2.11.*) ;; # other 2.11 versions
6100      *) supports_anon_versioning=yes ;;
6101    esac
6102
6103    # See if GNU ld supports shared libraries.
6104    case $host_os in
6105    aix3* | aix4* | aix5*)
6106      # On AIX/PPC, the GNU linker is very broken
6107      if test "$host_cpu" != ia64; then
6108	_LT_AC_TAGVAR(ld_shlibs, $1)=no
6109	cat <<EOF 1>&2
6110
6111*** Warning: the GNU linker, at least up to release 2.9.1, is reported
6112*** to be unable to reliably create shared libraries on AIX.
6113*** Therefore, libtool is disabling shared libraries support.  If you
6114*** really care for shared libraries, you may want to modify your PATH
6115*** so that a non-GNU linker is found, and then restart.
6116
6117EOF
6118      fi
6119      ;;
6120
6121    amigaos*)
6122      _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)'
6123      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6124      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6125
6126      # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
6127      # that the semantics of dynamic libraries on AmigaOS, at least up
6128      # to version 4, is to share data among multiple programs linked
6129      # with the same dynamic library.  Since this doesn't match the
6130      # behavior of shared libraries on other platforms, we can't use
6131      # them.
6132      _LT_AC_TAGVAR(ld_shlibs, $1)=no
6133      ;;
6134
6135    beos*)
6136      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
6137	_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6138	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
6139	# support --undefined.  This deserves some investigation.  FIXME
6140	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6141      else
6142	_LT_AC_TAGVAR(ld_shlibs, $1)=no
6143      fi
6144      ;;
6145
6146    cygwin* | mingw* | pw32*)
6147      # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
6148      # as there is no search path for DLLs.
6149      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6150      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6151      _LT_AC_TAGVAR(always_export_symbols, $1)=no
6152      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6153      _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
6154
6155      if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
6156        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
6157	# If the export-symbols file already is a .def file (1st line
6158	# is EXPORTS), use it as is; otherwise, prepend...
6159	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6160	  cp $export_symbols $output_objdir/$soname.def;
6161	else
6162	  echo EXPORTS > $output_objdir/$soname.def;
6163	  cat $export_symbols >> $output_objdir/$soname.def;
6164	fi~
6165	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000  ${wl}--out-implib,$lib'
6166      else
6167	_LT_AC_TAGVAR(ld_shlibs, $1)=no
6168      fi
6169      ;;
6170
6171    linux*)
6172      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
6173	tmp_addflag=
6174	case $cc_basename,$host_cpu in
6175	pgcc*)				# Portland Group C compiler
6176	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
6177	  ;;
6178	pgf77* | pgf90* )			# Portland Group f77 and f90 compilers
6179	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
6180	  tmp_addflag=' -fpic -Mnomain' ;;
6181	ecc*,ia64* | icc*,ia64*)		# Intel C compiler on ia64
6182	  tmp_addflag=' -i_dynamic' ;;
6183	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
6184	  tmp_addflag=' -i_dynamic -nofor_main' ;;
6185	ifc* | ifort*)			# Intel Fortran compiler
6186	  tmp_addflag=' -nofor_main' ;;
6187	esac
6188	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6189
6190	if test $supports_anon_versioning = yes; then
6191	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~
6192  cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
6193  $echo "local: *; };" >> $output_objdir/$libname.ver~
6194	  $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
6195	fi
6196      else
6197	_LT_AC_TAGVAR(ld_shlibs, $1)=no
6198      fi
6199      ;;
6200
6201    netbsd*)
6202      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6203	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
6204	wlarc=
6205      else
6206	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6207	_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'
6208      fi
6209      ;;
6210
6211    solaris* | sysv5*)
6212      if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
6213	_LT_AC_TAGVAR(ld_shlibs, $1)=no
6214	cat <<EOF 1>&2
6215
6216*** Warning: The releases 2.8.* of the GNU linker cannot reliably
6217*** create shared libraries on Solaris systems.  Therefore, libtool
6218*** is disabling shared libraries support.  We urge you to upgrade GNU
6219*** binutils to release 2.9.1 or newer.  Another option is to modify
6220*** your PATH or compiler configuration so that the native linker is
6221*** used, and then restart.
6222
6223EOF
6224      elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
6225	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6226	_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'
6227      else
6228	_LT_AC_TAGVAR(ld_shlibs, $1)=no
6229      fi
6230      ;;
6231
6232    sunos4*)
6233      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6234      wlarc=
6235      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6236      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6237      ;;
6238
6239    *)
6240      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
6241	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6242	_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'
6243      else
6244	_LT_AC_TAGVAR(ld_shlibs, $1)=no
6245      fi
6246      ;;
6247    esac
6248
6249    if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then
6250      runpath_var=
6251      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
6252      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
6253      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
6254    fi
6255  else
6256    # PORTME fill in a description of your system's linker (not GNU ld)
6257    case $host_os in
6258    aix3*)
6259      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6260      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
6261      _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'
6262      # Note: this linker hardcodes the directories in LIBPATH if there
6263      # are no directories specified by -L.
6264      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6265      if test "$GCC" = yes && test -z "$link_static_flag"; then
6266	# Neither direct hardcoding nor static linking is supported with a
6267	# broken collect2.
6268	_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
6269      fi
6270      ;;
6271
6272    aix4* | aix5*)
6273      if test "$host_cpu" = ia64; then
6274	# On IA64, the linker does run time linking by default, so we don't
6275	# have to do anything special.
6276	aix_use_runtimelinking=no
6277	exp_sym_flag='-Bexport'
6278	no_entry_flag=""
6279      else
6280	# If we're using GNU nm, then we don't want the "-C" option.
6281	# -C means demangle to AIX nm, but means don't demangle with GNU nm
6282	if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
6283	  _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'
6284	else
6285	  _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'
6286	fi
6287	aix_use_runtimelinking=no
6288
6289	# Test if we are trying to use run time linking or normal
6290	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
6291	# need to do runtime linking.
6292	case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
6293	  for ld_flag in $LDFLAGS; do
6294  	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
6295  	    aix_use_runtimelinking=yes
6296  	    break
6297  	  fi
6298	  done
6299	esac
6300
6301	exp_sym_flag='-bexport'
6302	no_entry_flag='-bnoentry'
6303      fi
6304
6305      # When large executables or shared objects are built, AIX ld can
6306      # have problems creating the table of contents.  If linking a library
6307      # or program results in "error TOC overflow" add -mminimal-toc to
6308      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
6309      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
6310
6311      _LT_AC_TAGVAR(archive_cmds, $1)=''
6312      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6313      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
6314      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6315
6316      if test "$GCC" = yes; then
6317	case $host_os in aix4.[[012]]|aix4.[[012]].*)
6318	# We only want to do this on AIX 4.2 and lower, the check
6319	# below for broken collect2 doesn't work under 4.3+
6320	  collect2name=`${CC} -print-prog-name=collect2`
6321	  if test -f "$collect2name" && \
6322  	   strings "$collect2name" | grep resolve_lib_name >/dev/null
6323	  then
6324  	  # We have reworked collect2
6325  	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6326	  else
6327  	  # We have old collect2
6328  	  _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
6329  	  # It fails to find uninstalled libraries when the uninstalled
6330  	  # path is not listed in the libpath.  Setting hardcode_minus_L
6331  	  # to unsupported forces relinking
6332  	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6333  	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6334  	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
6335	  fi
6336	esac
6337	shared_flag='-shared'
6338	if test "$aix_use_runtimelinking" = yes; then
6339	  shared_flag="$shared_flag "'${wl}-G'
6340	fi
6341      else
6342	# not using gcc
6343	if test "$host_cpu" = ia64; then
6344  	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
6345  	# chokes on -Wl,-G. The following line is correct:
6346	  shared_flag='-G'
6347	else
6348  	if test "$aix_use_runtimelinking" = yes; then
6349	    shared_flag='${wl}-G'
6350	  else
6351	    shared_flag='${wl}-bM:SRE'
6352  	fi
6353	fi
6354      fi
6355
6356      # It seems that -bexpall does not export symbols beginning with
6357      # underscore (_), so it is better to generate a list of symbols to export.
6358      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
6359      if test "$aix_use_runtimelinking" = yes; then
6360	# Warning - without using the other runtime loading flags (-brtl),
6361	# -berok will link without error, but may produce a broken library.
6362	_LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
6363       # Determine the default libpath from the value encoded in an empty executable.
6364       _LT_AC_SYS_LIBPATH_AIX
6365       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6366	_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"
6367       else
6368	if test "$host_cpu" = ia64; then
6369	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
6370	  _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
6371	  _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"
6372	else
6373	 # Determine the default libpath from the value encoded in an empty executable.
6374	 _LT_AC_SYS_LIBPATH_AIX
6375	 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6376	  # Warning - without using the other run time loading flags,
6377	  # -berok will link without error, but may produce a broken library.
6378	  _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
6379	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
6380	  # -bexpall does not export symbols beginning with underscore (_)
6381	  _LT_AC_TAGVAR(always_export_symbols, $1)=yes
6382	  # Exported symbols can be pulled into shared objects from archives
6383	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
6384	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
6385	  # This is similar to how AIX traditionally builds it's shared libraries.
6386	  _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'
6387	fi
6388      fi
6389      ;;
6390
6391    amigaos*)
6392      _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)'
6393      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6394      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6395      # see comment about different semantics on the GNU ld section
6396      _LT_AC_TAGVAR(ld_shlibs, $1)=no
6397      ;;
6398
6399    bsdi[[45]]*)
6400      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
6401      ;;
6402
6403    cygwin* | mingw* | pw32*)
6404      # When not using gcc, we currently assume that we are using
6405      # Microsoft Visual C++.
6406      # hardcode_libdir_flag_spec is actually meaningless, as there is
6407      # no search path for DLLs.
6408      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
6409      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6410      # Tell ltmain to make .lib files, not .a files.
6411      libext=lib
6412      # Tell ltmain to make .dll files, not .so files.
6413      shrext_cmds=".dll"
6414      # FIXME: Setting linknames here is a bad hack.
6415      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
6416      # The linker will automatically build a .lib file if we build a DLL.
6417      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
6418      # FIXME: Should let the user specify the lib program.
6419      _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
6420      _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
6421      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6422      ;;
6423
6424    darwin* | rhapsody*)
6425      case "$host_os" in
6426        rhapsody* | darwin1.[[012]])
6427         _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
6428         ;;
6429       *) # Darwin 1.3 on
6430         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
6431           _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
6432         else
6433           case ${MACOSX_DEPLOYMENT_TARGET} in
6434             10.[[012]])
6435               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
6436               ;;
6437             10.*)
6438               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
6439               ;;
6440           esac
6441         fi
6442         ;;
6443      esac
6444      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6445      _LT_AC_TAGVAR(hardcode_direct, $1)=no
6446      _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
6447      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
6448      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
6449      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6450    if test "$GCC" = yes ; then
6451    	output_verbose_link_cmd='echo'
6452        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
6453      _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
6454      # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
6455      _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}'
6456      _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}'
6457    else
6458      case $cc_basename in
6459        xlc*)
6460         output_verbose_link_cmd='echo'
6461         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
6462         _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
6463          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
6464         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
6465          _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}'
6466          ;;
6467       *)
6468         _LT_AC_TAGVAR(ld_shlibs, $1)=no
6469          ;;
6470      esac
6471    fi
6472      ;;
6473
6474    dgux*)
6475      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6476      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6477      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6478      ;;
6479
6480    freebsd1*)
6481      _LT_AC_TAGVAR(ld_shlibs, $1)=no
6482      ;;
6483
6484    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
6485    # support.  Future versions do this automatically, but an explicit c++rt0.o
6486    # does not break anything, and helps significantly (at the cost of a little
6487    # extra space).
6488    freebsd2.2*)
6489      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
6490      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6491      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6492      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6493      ;;
6494
6495    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
6496    freebsd2*)
6497      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6498      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6499      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6500      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6501      ;;
6502
6503    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
6504    freebsd* | kfreebsd*-gnu | dragonfly*)
6505      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
6506      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6507      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6508      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6509      ;;
6510
6511    hpux9*)
6512      if test "$GCC" = yes; then
6513	_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'
6514      else
6515	_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'
6516      fi
6517      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6518      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6519      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6520
6521      # hardcode_minus_L: Not really in the search PATH,
6522      # but as the default location of the library.
6523      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6524      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6525      ;;
6526
6527    hpux10* | hpux11*)
6528      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
6529	case "$host_cpu" in
6530	hppa*64*|ia64*)
6531	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6532	  ;;
6533	*)
6534	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6535	  ;;
6536	esac
6537      else
6538	case "$host_cpu" in
6539	hppa*64*|ia64*)
6540	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
6541	  ;;
6542	*)
6543	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
6544	  ;;
6545	esac
6546      fi
6547      if test "$with_gnu_ld" = no; then
6548	case "$host_cpu" in
6549	hppa*64*)
6550	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6551	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
6552	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6553	  _LT_AC_TAGVAR(hardcode_direct, $1)=no
6554	  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6555	  ;;
6556	ia64*)
6557	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6558	  _LT_AC_TAGVAR(hardcode_direct, $1)=no
6559	  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6560
6561	  # hardcode_minus_L: Not really in the search PATH,
6562	  # but as the default location of the library.
6563	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6564	  ;;
6565	*)
6566	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6567	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6568	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6569	  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6570
6571	  # hardcode_minus_L: Not really in the search PATH,
6572	  # but as the default location of the library.
6573	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6574	  ;;
6575	esac
6576      fi
6577      ;;
6578
6579    irix5* | irix6* | nonstopux*)
6580      if test "$GCC" = yes; then
6581	_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'
6582      else
6583	_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'
6584	_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
6585      fi
6586      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6587      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6588      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6589      ;;
6590
6591    netbsd*)
6592      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6593	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
6594      else
6595	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
6596      fi
6597      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6598      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6599      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6600      ;;
6601
6602    newsos6)
6603      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6604      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6605      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6606      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6607      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6608      ;;
6609
6610    openbsd*)
6611      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6612      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6613      if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6614	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6615	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
6616	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6617	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6618      else
6619       case $host_os in
6620	 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
6621	   _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6622	   _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6623	   ;;
6624	 *)
6625	   _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6626	   _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6627	   ;;
6628       esac
6629      fi
6630      ;;
6631
6632    os2*)
6633      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6634      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6635      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6636      _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'
6637      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
6638      ;;
6639
6640    osf3*)
6641      if test "$GCC" = yes; then
6642	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6643	_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'
6644      else
6645	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6646	_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'
6647      fi
6648      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6649      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6650      ;;
6651
6652    osf4* | osf5*)	# as osf3* with the addition of -msym flag
6653      if test "$GCC" = yes; then
6654	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6655	_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'
6656	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6657      else
6658	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6659	_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'
6660	_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~
6661	$LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp'
6662
6663	# Both c and cxx compiler support -rpath directly
6664	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6665      fi
6666      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6667      ;;
6668
6669    sco3.2v5*)
6670      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6671      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6672      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
6673      runpath_var=LD_RUN_PATH
6674      hardcode_runpath_var=yes
6675      ;;
6676
6677    solaris*)
6678      _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
6679      if test "$GCC" = yes; then
6680	wlarc='${wl}'
6681	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6682	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6683	  $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
6684      else
6685	wlarc=''
6686	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6687	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6688  	$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6689      fi
6690      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6691      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6692      case $host_os in
6693      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6694      *)
6695 	# The compiler driver will combine linker options so we
6696 	# cannot just pass the convience library names through
6697 	# without $wl, iff we do not link with $LD.
6698 	# Luckily, gcc supports the same syntax we need for Sun Studio.
6699 	# Supported since Solaris 2.6 (maybe 2.5.1?)
6700 	case $wlarc in
6701 	'')
6702 	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
6703 	*)
6704 	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;;
6705 	esac ;;
6706      esac
6707      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6708      ;;
6709
6710    sunos4*)
6711      if test "x$host_vendor" = xsequent; then
6712	# Use $CC to link under sequent, because it throws in some extra .o
6713	# files that make .init and .fini sections work.
6714	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
6715      else
6716	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
6717      fi
6718      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6719      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6720      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6721      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6722      ;;
6723
6724    sysv4)
6725      case $host_vendor in
6726	sni)
6727	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6728	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
6729	;;
6730	siemens)
6731	  ## LD is ld it makes a PLAMLIB
6732	  ## CC just makes a GrossModule.
6733	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6734	  _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
6735	  _LT_AC_TAGVAR(hardcode_direct, $1)=no
6736        ;;
6737	motorola)
6738	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6739	  _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
6740	;;
6741      esac
6742      runpath_var='LD_RUN_PATH'
6743      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6744      ;;
6745
6746    sysv4.3*)
6747      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6748      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6749      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
6750      ;;
6751
6752    sysv4*MP*)
6753      if test -d /usr/nec; then
6754	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6755	_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6756	runpath_var=LD_RUN_PATH
6757	hardcode_runpath_var=yes
6758	_LT_AC_TAGVAR(ld_shlibs, $1)=yes
6759      fi
6760      ;;
6761
6762    sysv4.2uw2*)
6763      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6764      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6765      _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
6766      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6767      hardcode_runpath_var=yes
6768      runpath_var=LD_RUN_PATH
6769      ;;
6770
6771   sysv5OpenUNIX8* | sysv5UnixWare7* |  sysv5uw[[78]]* | unixware7*)
6772      _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text'
6773      if test "$GCC" = yes; then
6774	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6775      else
6776	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6777      fi
6778      runpath_var='LD_RUN_PATH'
6779      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6780      ;;
6781
6782    sysv5*)
6783      _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
6784      # $CC -shared without GNU ld will not create a library from C++
6785      # object files and a static libstdc++, better avoid it by now
6786      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6787      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6788  		$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6789      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
6790      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6791      runpath_var='LD_RUN_PATH'
6792      ;;
6793
6794    uts4*)
6795      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6796      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6797      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6798      ;;
6799
6800    *)
6801      _LT_AC_TAGVAR(ld_shlibs, $1)=no
6802      ;;
6803    esac
6804  fi
6805])
6806AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
6807test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
6808
6809variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
6810if test "$GCC" = yes; then
6811  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
6812fi
6813
6814#
6815# Do we need to explicitly link libc?
6816#
6817case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
6818x|xyes)
6819  # Assume -lc should be added
6820  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
6821
6822  if test "$enable_shared" = yes && test "$GCC" = yes; then
6823    case $_LT_AC_TAGVAR(archive_cmds, $1) in
6824    *'~'*)
6825      # FIXME: we may have to deal with multi-command sequences.
6826      ;;
6827    '$CC '*)
6828      # Test whether the compiler implicitly links with -lc since on some
6829      # systems, -lgcc has to come before -lc. If gcc already passes -lc
6830      # to ld, don't add -lc before -lgcc.
6831      AC_MSG_CHECKING([whether -lc should be explicitly linked in])
6832      $rm conftest*
6833      printf "$lt_simple_compile_test_code" > conftest.$ac_ext
6834
6835      if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
6836        soname=conftest
6837        lib=conftest
6838        libobjs=conftest.$ac_objext
6839        deplibs=
6840        wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
6841        compiler_flags=-v
6842        linker_flags=-v
6843        verstring=
6844        output_objdir=.
6845        libname=conftest
6846        lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
6847        _LT_AC_TAGVAR(allow_undefined_flag, $1)=
6848        if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
6849        then
6850	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6851        else
6852	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
6853        fi
6854        _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
6855      else
6856        cat conftest.err 1>&5
6857      fi
6858      $rm conftest*
6859      AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
6860      ;;
6861    esac
6862  fi
6863  ;;
6864esac
6865])# AC_LIBTOOL_PROG_LD_SHLIBS
6866
6867
6868# _LT_AC_FILE_LTDLL_C
6869# -------------------
6870# Be careful that the start marker always follows a newline.
6871AC_DEFUN([_LT_AC_FILE_LTDLL_C], [
6872# /* ltdll.c starts here */
6873# #define WIN32_LEAN_AND_MEAN
6874# #include <windows.h>
6875# #undef WIN32_LEAN_AND_MEAN
6876# #include <stdio.h>
6877#
6878# #ifndef __CYGWIN__
6879# #  ifdef __CYGWIN32__
6880# #    define __CYGWIN__ __CYGWIN32__
6881# #  endif
6882# #endif
6883#
6884# #ifdef __cplusplus
6885# extern "C" {
6886# #endif
6887# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
6888# #ifdef __cplusplus
6889# }
6890# #endif
6891#
6892# #ifdef __CYGWIN__
6893# #include <cygwin/cygwin_dll.h>
6894# DECLARE_CYGWIN_DLL( DllMain );
6895# #endif
6896# HINSTANCE __hDllInstance_base;
6897#
6898# BOOL APIENTRY
6899# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
6900# {
6901#   __hDllInstance_base = hInst;
6902#   return TRUE;
6903# }
6904# /* ltdll.c ends here */
6905])# _LT_AC_FILE_LTDLL_C
6906
6907
6908# _LT_AC_TAGVAR(VARNAME, [TAGNAME])
6909# ---------------------------------
6910AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
6911
6912
6913# old names
6914AC_DEFUN([AM_PROG_LIBTOOL],   [AC_PROG_LIBTOOL])
6915AC_DEFUN([AM_ENABLE_SHARED],  [AC_ENABLE_SHARED($@)])
6916AC_DEFUN([AM_ENABLE_STATIC],  [AC_ENABLE_STATIC($@)])
6917AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
6918AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
6919AC_DEFUN([AM_PROG_LD],        [AC_PROG_LD])
6920AC_DEFUN([AM_PROG_NM],        [AC_PROG_NM])
6921
6922# This is just to silence aclocal about the macro not being used
6923ifelse([AC_DISABLE_FAST_INSTALL])
6924
6925AC_DEFUN([LT_AC_PROG_GCJ],
6926[AC_CHECK_TOOL(GCJ, gcj, no)
6927  test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
6928  AC_SUBST(GCJFLAGS)
6929])
6930
6931AC_DEFUN([LT_AC_PROG_RC],
6932[AC_CHECK_TOOL(RC, windres, no)
6933])
6934
6935# NOTE: This macro has been submitted for inclusion into   #
6936#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
6937#  a released version of Autoconf we should remove this    #
6938#  macro and use it instead.                               #
6939# LT_AC_PROG_SED
6940# --------------
6941# Check for a fully-functional sed program, that truncates
6942# as few characters as possible.  Prefer GNU sed if found.
6943AC_DEFUN([LT_AC_PROG_SED],
6944[AC_MSG_CHECKING([for a sed that does not truncate output])
6945AC_CACHE_VAL(lt_cv_path_SED,
6946[# Loop through the user's path and test for sed and gsed.
6947# Then use that list of sed's as ones to test for truncation.
6948as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6949for as_dir in $PATH
6950do
6951  IFS=$as_save_IFS
6952  test -z "$as_dir" && as_dir=.
6953  for lt_ac_prog in sed gsed; do
6954    for ac_exec_ext in '' $ac_executable_extensions; do
6955      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
6956        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
6957      fi
6958    done
6959  done
6960done
6961lt_ac_max=0
6962lt_ac_count=0
6963# Add /usr/xpg4/bin/sed as it is typically found on Solaris
6964# along with /bin/sed that truncates output.
6965for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
6966  test ! -f $lt_ac_sed && continue
6967  cat /dev/null > conftest.in
6968  lt_ac_count=0
6969  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
6970  # Check for GNU sed and select it if it is found.
6971  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
6972    lt_cv_path_SED=$lt_ac_sed
6973    break
6974  fi
6975  while true; do
6976    cat conftest.in conftest.in >conftest.tmp
6977    mv conftest.tmp conftest.in
6978    cp conftest.in conftest.nl
6979    echo >>conftest.nl
6980    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
6981    cmp -s conftest.out conftest.nl || break
6982    # 10000 chars as input seems more than enough
6983    test $lt_ac_count -gt 10 && break
6984    lt_ac_count=`expr $lt_ac_count + 1`
6985    if test $lt_ac_count -gt $lt_ac_max; then
6986      lt_ac_max=$lt_ac_count
6987      lt_cv_path_SED=$lt_ac_sed
6988    fi
6989  done
6990done
6991])
6992SED=$lt_cv_path_SED
6993AC_MSG_RESULT([$SED])
6994])
6995
6996# gettext.m4 serial 36 (gettext-0.14.3)
6997dnl Copyright (C) 1995-2005 Free Software Foundation, Inc.
6998dnl This file is free software; the Free Software Foundation
6999dnl gives unlimited permission to copy and/or distribute it,
7000dnl with or without modifications, as long as this notice is preserved.
7001dnl
7002dnl This file can can be used in projects which are not available under
7003dnl the GNU General Public License or the GNU Library General Public
7004dnl License but which still want to provide support for the GNU gettext
7005dnl functionality.
7006dnl Please note that the actual code of the GNU gettext library is covered
7007dnl by the GNU Library General Public License, and the rest of the GNU
7008dnl gettext package package is covered by the GNU General Public License.
7009dnl They are *not* in the public domain.
7010
7011dnl Authors:
7012dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
7013dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2003.
7014
7015dnl Macro to add for using GNU gettext.
7016
7017dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]).
7018dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The
7019dnl    default (if it is not specified or empty) is 'no-libtool'.
7020dnl    INTLSYMBOL should be 'external' for packages with no intl directory,
7021dnl    and 'no-libtool' or 'use-libtool' for packages with an intl directory.
7022dnl    If INTLSYMBOL is 'use-libtool', then a libtool library
7023dnl    $(top_builddir)/intl/libintl.la will be created (shared and/or static,
7024dnl    depending on --{enable,disable}-{shared,static} and on the presence of
7025dnl    AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library
7026dnl    $(top_builddir)/intl/libintl.a will be created.
7027dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext
7028dnl    implementations (in libc or libintl) without the ngettext() function
7029dnl    will be ignored.  If NEEDSYMBOL is specified and is
7030dnl    'need-formatstring-macros', then GNU gettext implementations that don't
7031dnl    support the ISO C 99 <inttypes.h> formatstring macros will be ignored.
7032dnl INTLDIR is used to find the intl libraries.  If empty,
7033dnl    the value `$(top_builddir)/intl/' is used.
7034dnl
7035dnl The result of the configuration is one of three cases:
7036dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled
7037dnl    and used.
7038dnl    Catalog format: GNU --> install in $(datadir)
7039dnl    Catalog extension: .mo after installation, .gmo in source tree
7040dnl 2) GNU gettext has been found in the system's C library.
7041dnl    Catalog format: GNU --> install in $(datadir)
7042dnl    Catalog extension: .mo after installation, .gmo in source tree
7043dnl 3) No internationalization, always use English msgid.
7044dnl    Catalog format: none
7045dnl    Catalog extension: none
7046dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur.
7047dnl The use of .gmo is historical (it was needed to avoid overwriting the
7048dnl GNU format catalogs when building on a platform with an X/Open gettext),
7049dnl but we keep it in order not to force irrelevant filename changes on the
7050dnl maintainers.
7051dnl
7052AC_DEFUN([AM_GNU_GETTEXT],
7053[
7054  dnl Argument checking.
7055  ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], ,
7056    [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT
7057])])])])])
7058  ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], ,
7059    [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT
7060])])])])
7061  define([gt_included_intl], ifelse([$1], [external], [no], [yes]))
7062  define([gt_libtool_suffix_prefix], ifelse([$1], [use-libtool], [l], []))
7063
7064  AC_REQUIRE([AM_PO_SUBDIRS])dnl
7065  ifelse(gt_included_intl, yes, [
7066    AC_REQUIRE([AM_INTL_SUBDIR])dnl
7067  ])
7068
7069  dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
7070  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
7071  AC_REQUIRE([AC_LIB_RPATH])
7072
7073  dnl Sometimes libintl requires libiconv, so first search for libiconv.
7074  dnl Ideally we would do this search only after the
7075  dnl      if test "$USE_NLS" = "yes"; then
7076  dnl        if test "$gt_cv_func_gnugettext_libc" != "yes"; then
7077  dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT
7078  dnl the configure script would need to contain the same shell code
7079  dnl again, outside any 'if'. There are two solutions:
7080  dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'.
7081  dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE.
7082  dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not
7083  dnl documented, we avoid it.
7084  ifelse(gt_included_intl, yes, , [
7085    AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
7086  ])
7087
7088  dnl Sometimes, on MacOS X, libintl requires linking with CoreFoundation.
7089  gt_INTL_MACOSX
7090
7091  dnl Set USE_NLS.
7092  AM_NLS
7093
7094  ifelse(gt_included_intl, yes, [
7095    BUILD_INCLUDED_LIBINTL=no
7096    USE_INCLUDED_LIBINTL=no
7097  ])
7098  LIBINTL=
7099  LTLIBINTL=
7100  POSUB=
7101
7102  dnl If we use NLS figure out what method
7103  if test "$USE_NLS" = "yes"; then
7104    gt_use_preinstalled_gnugettext=no
7105    ifelse(gt_included_intl, yes, [
7106      AC_MSG_CHECKING([whether included gettext is requested])
7107      AC_ARG_WITH(included-gettext,
7108        [  --with-included-gettext use the GNU gettext library included here],
7109        nls_cv_force_use_gnu_gettext=$withval,
7110        nls_cv_force_use_gnu_gettext=no)
7111      AC_MSG_RESULT($nls_cv_force_use_gnu_gettext)
7112
7113      nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
7114      if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
7115    ])
7116        dnl User does not insist on using GNU NLS library.  Figure out what
7117        dnl to use.  If GNU gettext is available we use this.  Else we have
7118        dnl to fall back to GNU NLS library.
7119
7120        dnl Add a version number to the cache macros.
7121        define([gt_api_version], ifelse([$2], [need-formatstring-macros], 3, ifelse([$2], [need-ngettext], 2, 1)))
7122        define([gt_cv_func_gnugettext_libc], [gt_cv_func_gnugettext]gt_api_version[_libc])
7123        define([gt_cv_func_gnugettext_libintl], [gt_cv_func_gnugettext]gt_api_version[_libintl])
7124
7125        AC_CACHE_CHECK([for GNU gettext in libc], gt_cv_func_gnugettext_libc,
7126         [AC_TRY_LINK([#include <libintl.h>
7127]ifelse([$2], [need-formatstring-macros],
7128[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
7129#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
7130#endif
7131changequote(,)dnl
7132typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
7133changequote([,])dnl
7134], [])[extern int _nl_msg_cat_cntr;
7135extern int *_nl_domain_bindings;],
7136            [bindtextdomain ("", "");
7137return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_domain_bindings],
7138            gt_cv_func_gnugettext_libc=yes,
7139            gt_cv_func_gnugettext_libc=no)])
7140
7141        if test "$gt_cv_func_gnugettext_libc" != "yes"; then
7142          dnl Sometimes libintl requires libiconv, so first search for libiconv.
7143          ifelse(gt_included_intl, yes, , [
7144            AM_ICONV_LINK
7145          ])
7146          dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL
7147          dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv])
7148          dnl because that would add "-liconv" to LIBINTL and LTLIBINTL
7149          dnl even if libiconv doesn't exist.
7150          AC_LIB_LINKFLAGS_BODY([intl])
7151          AC_CACHE_CHECK([for GNU gettext in libintl],
7152            gt_cv_func_gnugettext_libintl,
7153           [gt_save_CPPFLAGS="$CPPFLAGS"
7154            CPPFLAGS="$CPPFLAGS $INCINTL"
7155            gt_save_LIBS="$LIBS"
7156            LIBS="$LIBS $LIBINTL"
7157            dnl Now see whether libintl exists and does not depend on libiconv.
7158            AC_TRY_LINK([#include <libintl.h>
7159]ifelse([$2], [need-formatstring-macros],
7160[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
7161#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
7162#endif
7163changequote(,)dnl
7164typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
7165changequote([,])dnl
7166], [])[extern int _nl_msg_cat_cntr;
7167extern
7168#ifdef __cplusplus
7169"C"
7170#endif
7171const char *_nl_expand_alias (const char *);],
7172              [bindtextdomain ("", "");
7173return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias ("")],
7174              gt_cv_func_gnugettext_libintl=yes,
7175              gt_cv_func_gnugettext_libintl=no)
7176            dnl Now see whether libintl exists and depends on libiconv.
7177            if test "$gt_cv_func_gnugettext_libintl" != yes && test -n "$LIBICONV"; then
7178              LIBS="$LIBS $LIBICONV"
7179              AC_TRY_LINK([#include <libintl.h>
7180]ifelse([$2], [need-formatstring-macros],
7181[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
7182#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
7183#endif
7184changequote(,)dnl
7185typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
7186changequote([,])dnl
7187], [])[extern int _nl_msg_cat_cntr;
7188extern
7189#ifdef __cplusplus
7190"C"
7191#endif
7192const char *_nl_expand_alias (const char *);],
7193                [bindtextdomain ("", "");
7194return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias ("")],
7195               [LIBINTL="$LIBINTL $LIBICONV"
7196                LTLIBINTL="$LTLIBINTL $LTLIBICONV"
7197                gt_cv_func_gnugettext_libintl=yes
7198               ])
7199            fi
7200            CPPFLAGS="$gt_save_CPPFLAGS"
7201            LIBS="$gt_save_LIBS"])
7202        fi
7203
7204        dnl If an already present or preinstalled GNU gettext() is found,
7205        dnl use it.  But if this macro is used in GNU gettext, and GNU
7206        dnl gettext is already preinstalled in libintl, we update this
7207        dnl libintl.  (Cf. the install rule in intl/Makefile.in.)
7208        if test "$gt_cv_func_gnugettext_libc" = "yes" \
7209           || { test "$gt_cv_func_gnugettext_libintl" = "yes" \
7210                && test "$PACKAGE" != gettext-runtime \
7211                && test "$PACKAGE" != gettext-tools; }; then
7212          gt_use_preinstalled_gnugettext=yes
7213        else
7214          dnl Reset the values set by searching for libintl.
7215          LIBINTL=
7216          LTLIBINTL=
7217          INCINTL=
7218        fi
7219
7220    ifelse(gt_included_intl, yes, [
7221        if test "$gt_use_preinstalled_gnugettext" != "yes"; then
7222          dnl GNU gettext is not found in the C library.
7223          dnl Fall back on included GNU gettext library.
7224          nls_cv_use_gnu_gettext=yes
7225        fi
7226      fi
7227
7228      if test "$nls_cv_use_gnu_gettext" = "yes"; then
7229        dnl Mark actions used to generate GNU NLS library.
7230        BUILD_INCLUDED_LIBINTL=yes
7231        USE_INCLUDED_LIBINTL=yes
7232        LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV"
7233        LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV"
7234        LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
7235      fi
7236
7237      CATOBJEXT=
7238      if test "$gt_use_preinstalled_gnugettext" = "yes" \
7239         || test "$nls_cv_use_gnu_gettext" = "yes"; then
7240        dnl Mark actions to use GNU gettext tools.
7241        CATOBJEXT=.gmo
7242      fi
7243    ])
7244
7245    if test -n "$INTL_MACOSX_LIBS"; then
7246      if test "$gt_use_preinstalled_gnugettext" = "yes" \
7247         || test "$nls_cv_use_gnu_gettext" = "yes"; then
7248        dnl Some extra flags are needed during linking.
7249        LIBINTL="$LIBINTL $INTL_MACOSX_LIBS"
7250        LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS"
7251      fi
7252    fi
7253
7254    if test "$gt_use_preinstalled_gnugettext" = "yes" \
7255       || test "$nls_cv_use_gnu_gettext" = "yes"; then
7256      AC_DEFINE(ENABLE_NLS, 1,
7257        [Define to 1 if translation of program messages to the user's native language
7258   is requested.])
7259    else
7260      USE_NLS=no
7261    fi
7262  fi
7263
7264  AC_MSG_CHECKING([whether to use NLS])
7265  AC_MSG_RESULT([$USE_NLS])
7266  if test "$USE_NLS" = "yes"; then
7267    AC_MSG_CHECKING([where the gettext function comes from])
7268    if test "$gt_use_preinstalled_gnugettext" = "yes"; then
7269      if test "$gt_cv_func_gnugettext_libintl" = "yes"; then
7270        gt_source="external libintl"
7271      else
7272        gt_source="libc"
7273      fi
7274    else
7275      gt_source="included intl directory"
7276    fi
7277    AC_MSG_RESULT([$gt_source])
7278  fi
7279
7280  if test "$USE_NLS" = "yes"; then
7281
7282    if test "$gt_use_preinstalled_gnugettext" = "yes"; then
7283      if test "$gt_cv_func_gnugettext_libintl" = "yes"; then
7284        AC_MSG_CHECKING([how to link with libintl])
7285        AC_MSG_RESULT([$LIBINTL])
7286        AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL])
7287      fi
7288
7289      dnl For backward compatibility. Some packages may be using this.
7290      AC_DEFINE(HAVE_GETTEXT, 1,
7291       [Define if the GNU gettext() function is already present or preinstalled.])
7292      AC_DEFINE(HAVE_DCGETTEXT, 1,
7293       [Define if the GNU dcgettext() function is already present or preinstalled.])
7294    fi
7295
7296    dnl We need to process the po/ directory.
7297    POSUB=po
7298  fi
7299
7300  ifelse(gt_included_intl, yes, [
7301    dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL
7302    dnl to 'yes' because some of the testsuite requires it.
7303    if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then
7304      BUILD_INCLUDED_LIBINTL=yes
7305    fi
7306
7307    dnl Make all variables we use known to autoconf.
7308    AC_SUBST(BUILD_INCLUDED_LIBINTL)
7309    AC_SUBST(USE_INCLUDED_LIBINTL)
7310    AC_SUBST(CATOBJEXT)
7311
7312    dnl For backward compatibility. Some configure.ins may be using this.
7313    nls_cv_header_intl=
7314    nls_cv_header_libgt=
7315
7316    dnl For backward compatibility. Some Makefiles may be using this.
7317    DATADIRNAME=share
7318    AC_SUBST(DATADIRNAME)
7319
7320    dnl For backward compatibility. Some Makefiles may be using this.
7321    INSTOBJEXT=.mo
7322    AC_SUBST(INSTOBJEXT)
7323
7324    dnl For backward compatibility. Some Makefiles may be using this.
7325    GENCAT=gencat
7326    AC_SUBST(GENCAT)
7327
7328    dnl For backward compatibility. Some Makefiles may be using this.
7329    INTLOBJS=
7330    if test "$USE_INCLUDED_LIBINTL" = yes; then
7331      INTLOBJS="\$(GETTOBJS)"
7332    fi
7333    AC_SUBST(INTLOBJS)
7334
7335    dnl Enable libtool support if the surrounding package wishes it.
7336    INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix
7337    AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX)
7338  ])
7339
7340  dnl For backward compatibility. Some Makefiles may be using this.
7341  INTLLIBS="$LIBINTL"
7342  AC_SUBST(INTLLIBS)
7343
7344  dnl Make all documented variables known to autoconf.
7345  AC_SUBST(LIBINTL)
7346  AC_SUBST(LTLIBINTL)
7347  AC_SUBST(POSUB)
7348])
7349
7350
7351dnl Checks for all prerequisites of the intl subdirectory,
7352dnl except for INTL_LIBTOOL_SUFFIX_PREFIX (and possibly LIBTOOL), INTLOBJS,
7353dnl            USE_INCLUDED_LIBINTL, BUILD_INCLUDED_LIBINTL.
7354AC_DEFUN([AM_INTL_SUBDIR],
7355[
7356  AC_REQUIRE([AC_PROG_INSTALL])dnl
7357  AC_REQUIRE([AM_MKINSTALLDIRS])dnl
7358  AC_REQUIRE([AC_PROG_CC])dnl
7359  AC_REQUIRE([AC_CANONICAL_HOST])dnl
7360  AC_REQUIRE([gt_GLIBC2])dnl
7361  AC_REQUIRE([AC_PROG_RANLIB])dnl
7362  AC_REQUIRE([AC_ISC_POSIX])dnl
7363  AC_REQUIRE([AC_HEADER_STDC])dnl
7364  AC_REQUIRE([AC_C_CONST])dnl
7365  AC_REQUIRE([bh_C_SIGNED])dnl
7366  AC_REQUIRE([AC_C_INLINE])dnl
7367  AC_REQUIRE([AC_TYPE_OFF_T])dnl
7368  AC_REQUIRE([AC_TYPE_SIZE_T])dnl
7369  AC_REQUIRE([gl_AC_TYPE_LONG_LONG])dnl
7370  AC_REQUIRE([gt_TYPE_LONGDOUBLE])dnl
7371  AC_REQUIRE([gt_TYPE_WCHAR_T])dnl
7372  AC_REQUIRE([gt_TYPE_WINT_T])dnl
7373  AC_REQUIRE([gl_AC_HEADER_INTTYPES_H])
7374  AC_REQUIRE([gl_AC_HEADER_STDINT_H])
7375  AC_REQUIRE([gt_TYPE_INTMAX_T])
7376  AC_REQUIRE([gt_PRINTF_POSIX])
7377  AC_REQUIRE([AC_FUNC_ALLOCA])dnl
7378  AC_REQUIRE([AC_FUNC_MMAP])dnl
7379  AC_REQUIRE([gl_GLIBC21])dnl
7380  AC_REQUIRE([gt_INTDIV0])dnl
7381  AC_REQUIRE([gl_AC_TYPE_UINTMAX_T])dnl
7382  AC_REQUIRE([gt_HEADER_INTTYPES_H])dnl
7383  AC_REQUIRE([gt_INTTYPES_PRI])dnl
7384  AC_REQUIRE([gl_XSIZE])dnl
7385  AC_REQUIRE([gt_INTL_MACOSX])dnl
7386
7387  AC_CHECK_TYPE([ptrdiff_t], ,
7388    [AC_DEFINE([ptrdiff_t], [long],
7389       [Define as the type of the result of subtracting two pointers, if the system doesn't define it.])
7390    ])
7391  AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h stddef.h \
7392stdlib.h string.h unistd.h sys/param.h])
7393  AC_CHECK_FUNCS([asprintf fwprintf getcwd getegid geteuid getgid getuid \
7394mempcpy munmap putenv setenv setlocale snprintf stpcpy strcasecmp strdup \
7395strtoul tsearch wcslen __argz_count __argz_stringify __argz_next \
7396__fsetlocking])
7397
7398  dnl Use the _snprintf function only if it is declared (because on NetBSD it
7399  dnl is defined as a weak alias of snprintf; we prefer to use the latter).
7400  gt_CHECK_DECL(_snprintf, [#include <stdio.h>])
7401  gt_CHECK_DECL(_snwprintf, [#include <stdio.h>])
7402
7403  dnl Use the *_unlocked functions only if they are declared.
7404  dnl (because some of them were defined without being declared in Solaris
7405  dnl 2.5.1 but were removed in Solaris 2.6, whereas we want binaries built
7406  dnl on Solaris 2.5.1 to run on Solaris 2.6).
7407  dnl Don't use AC_CHECK_DECLS because it isn't supported in autoconf-2.13.
7408  gt_CHECK_DECL(feof_unlocked, [#include <stdio.h>])
7409  gt_CHECK_DECL(fgets_unlocked, [#include <stdio.h>])
7410  gt_CHECK_DECL(getc_unlocked, [#include <stdio.h>])
7411
7412  case $gt_cv_func_printf_posix in
7413    *yes) HAVE_POSIX_PRINTF=1 ;;
7414    *) HAVE_POSIX_PRINTF=0 ;;
7415  esac
7416  AC_SUBST([HAVE_POSIX_PRINTF])
7417  if test "$ac_cv_func_asprintf" = yes; then
7418    HAVE_ASPRINTF=1
7419  else
7420    HAVE_ASPRINTF=0
7421  fi
7422  AC_SUBST([HAVE_ASPRINTF])
7423  if test "$ac_cv_func_snprintf" = yes; then
7424    HAVE_SNPRINTF=1
7425  else
7426    HAVE_SNPRINTF=0
7427  fi
7428  AC_SUBST([HAVE_SNPRINTF])
7429  if test "$ac_cv_func_wprintf" = yes; then
7430    HAVE_WPRINTF=1
7431  else
7432    HAVE_WPRINTF=0
7433  fi
7434  AC_SUBST([HAVE_WPRINTF])
7435
7436  AM_ICONV
7437  AM_LANGINFO_CODESET
7438  if test $ac_cv_header_locale_h = yes; then
7439    gt_LC_MESSAGES
7440  fi
7441
7442  if test -n "$INTL_MACOSX_LIBS"; then
7443    CPPFLAGS="$CPPFLAGS -I/System/Library/Frameworks/CoreFoundation.framework/Headers"
7444  fi
7445
7446  dnl intl/plural.c is generated from intl/plural.y. It requires bison,
7447  dnl because plural.y uses bison specific features. It requires at least
7448  dnl bison-1.26 because earlier versions generate a plural.c that doesn't
7449  dnl compile.
7450  dnl bison is only needed for the maintainer (who touches plural.y). But in
7451  dnl order to avoid separate Makefiles or --enable-maintainer-mode, we put
7452  dnl the rule in general Makefile. Now, some people carelessly touch the
7453  dnl files or have a broken "make" program, hence the plural.c rule will
7454  dnl sometimes fire. To avoid an error, defines BISON to ":" if it is not
7455  dnl present or too old.
7456  AC_CHECK_PROGS([INTLBISON], [bison])
7457  if test -z "$INTLBISON"; then
7458    ac_verc_fail=yes
7459  else
7460    dnl Found it, now check the version.
7461    AC_MSG_CHECKING([version of bison])
7462changequote(<<,>>)dnl
7463    ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
7464    case $ac_prog_version in
7465      '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
7466      1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*)
7467changequote([,])dnl
7468         ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
7469      *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
7470    esac
7471    AC_MSG_RESULT([$ac_prog_version])
7472  fi
7473  if test $ac_verc_fail = yes; then
7474    INTLBISON=:
7475  fi
7476])
7477
7478
7479dnl Checks for special options needed on MacOS X.
7480dnl Defines INTL_MACOSX_LIBS.
7481AC_DEFUN([gt_INTL_MACOSX],
7482[
7483  dnl Check for API introduced in MacOS X 10.2.
7484  AC_CACHE_CHECK([for CFPreferencesCopyAppValue],
7485    gt_cv_func_CFPreferencesCopyAppValue,
7486    [gt_save_CPPFLAGS="$CPPFLAGS"
7487     CPPFLAGS="$CPPFLAGS -I/System/Library/Frameworks/CoreFoundation.framework/Headers"
7488     gt_save_LIBS="$LIBS"
7489     LIBS="$LIBS -framework CoreFoundation"
7490     AC_TRY_LINK([#include <CFPreferences.h>],
7491       [CFPreferencesCopyAppValue(NULL, NULL)],
7492       [gt_cv_func_CFPreferencesCopyAppValue=yes],
7493       [gt_cv_func_CFPreferencesCopyAppValue=no])
7494     CPPFLAGS="$gt_save_CPPFLAGS"
7495     LIBS="$gt_save_LIBS"])
7496  if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
7497    AC_DEFINE([HAVE_CFPREFERENCESCOPYAPPVALUE], 1,
7498      [Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in the CoreFoundation framework.])
7499  fi
7500  dnl Check for API introduced in MacOS X 10.3.
7501  AC_CACHE_CHECK([for CFLocaleCopyCurrent], gt_cv_func_CFLocaleCopyCurrent,
7502    [gt_save_CPPFLAGS="$CPPFLAGS"
7503     CPPFLAGS="$CPPFLAGS -I/System/Library/Frameworks/CoreFoundation.framework/Headers"
7504     gt_save_LIBS="$LIBS"
7505     LIBS="$LIBS -framework CoreFoundation"
7506     AC_TRY_LINK([#include <CFLocale.h>], [CFLocaleCopyCurrent();],
7507       [gt_cv_func_CFLocaleCopyCurrent=yes],
7508       [gt_cv_func_CFLocaleCopyCurrent=no])
7509     CPPFLAGS="$gt_save_CPPFLAGS"
7510     LIBS="$gt_save_LIBS"])
7511  if test $gt_cv_func_CFLocaleCopyCurrent = yes; then
7512    AC_DEFINE([HAVE_CFLOCALECOPYCURRENT], 1,
7513      [Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the CoreFoundation framework.])
7514  fi
7515  INTL_MACOSX_LIBS=
7516  if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then
7517    INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
7518  fi
7519  AC_SUBST([INTL_MACOSX_LIBS])
7520])
7521
7522
7523dnl gt_CHECK_DECL(FUNC, INCLUDES)
7524dnl Check whether a function is declared.
7525AC_DEFUN([gt_CHECK_DECL],
7526[
7527  AC_CACHE_CHECK([whether $1 is declared], ac_cv_have_decl_$1,
7528    [AC_TRY_COMPILE([$2], [
7529#ifndef $1
7530  char *p = (char *) $1;
7531#endif
7532], ac_cv_have_decl_$1=yes, ac_cv_have_decl_$1=no)])
7533  if test $ac_cv_have_decl_$1 = yes; then
7534    gt_value=1
7535  else
7536    gt_value=0
7537  fi
7538  AC_DEFINE_UNQUOTED([HAVE_DECL_]translit($1, [a-z], [A-Z]), [$gt_value],
7539    [Define to 1 if you have the declaration of `$1', and to 0 if you don't.])
7540])
7541
7542
7543dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version])
7544AC_DEFUN([AM_GNU_GETTEXT_VERSION], [])
7545
7546# po.m4 serial 7 (gettext-0.14.3)
7547dnl Copyright (C) 1995-2005 Free Software Foundation, Inc.
7548dnl This file is free software; the Free Software Foundation
7549dnl gives unlimited permission to copy and/or distribute it,
7550dnl with or without modifications, as long as this notice is preserved.
7551dnl
7552dnl This file can can be used in projects which are not available under
7553dnl the GNU General Public License or the GNU Library General Public
7554dnl License but which still want to provide support for the GNU gettext
7555dnl functionality.
7556dnl Please note that the actual code of the GNU gettext library is covered
7557dnl by the GNU Library General Public License, and the rest of the GNU
7558dnl gettext package package is covered by the GNU General Public License.
7559dnl They are *not* in the public domain.
7560
7561dnl Authors:
7562dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
7563dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2003.
7564
7565AC_PREREQ(2.50)
7566
7567dnl Checks for all prerequisites of the po subdirectory.
7568AC_DEFUN([AM_PO_SUBDIRS],
7569[
7570  AC_REQUIRE([AC_PROG_MAKE_SET])dnl
7571  AC_REQUIRE([AC_PROG_INSTALL])dnl
7572  AC_REQUIRE([AM_MKINSTALLDIRS])dnl
7573  AC_REQUIRE([AM_NLS])dnl
7574
7575  dnl Perform the following tests also if --disable-nls has been given,
7576  dnl because they are needed for "make dist" to work.
7577
7578  dnl Search for GNU msgfmt in the PATH.
7579  dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions.
7580  dnl The second test excludes FreeBSD msgfmt.
7581  AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
7582    [$ac_dir/$ac_word --statistics /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 &&
7583     (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
7584    :)
7585  AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
7586
7587  dnl Search for GNU xgettext 0.12 or newer in the PATH.
7588  dnl The first test excludes Solaris xgettext and early GNU xgettext versions.
7589  dnl The second test excludes FreeBSD xgettext.
7590  AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
7591    [$ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 &&
7592     (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
7593    :)
7594  dnl Remove leftover from FreeBSD xgettext call.
7595  rm -f messages.po
7596
7597  dnl Search for GNU msgmerge 0.11 or newer in the PATH.
7598  AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge,
7599    [$ac_dir/$ac_word --update -q /dev/null /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1], :)
7600
7601  dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
7602  dnl Test whether we really found GNU msgfmt.
7603  if test "$GMSGFMT" != ":"; then
7604    dnl If it is no GNU msgfmt we define it as : so that the
7605    dnl Makefiles still can work.
7606    if $GMSGFMT --statistics /dev/null >/dev/null 2>&1 &&
7607       (if $GMSGFMT --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
7608      : ;
7609    else
7610      GMSGFMT=`echo "$GMSGFMT" | sed -e 's,^.*/,,'`
7611      AC_MSG_RESULT(
7612        [found $GMSGFMT program is not GNU msgfmt; ignore it])
7613      GMSGFMT=":"
7614    fi
7615  fi
7616
7617  dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
7618  dnl Test whether we really found GNU xgettext.
7619  if test "$XGETTEXT" != ":"; then
7620    dnl If it is no GNU xgettext we define it as : so that the
7621    dnl Makefiles still can work.
7622    if $XGETTEXT --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >/dev/null 2>&1 &&
7623       (if $XGETTEXT --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
7624      : ;
7625    else
7626      AC_MSG_RESULT(
7627        [found xgettext program is not GNU xgettext; ignore it])
7628      XGETTEXT=":"
7629    fi
7630    dnl Remove leftover from FreeBSD xgettext call.
7631    rm -f messages.po
7632  fi
7633
7634  AC_OUTPUT_COMMANDS([
7635    for ac_file in $CONFIG_FILES; do
7636      # Support "outfile[:infile[:infile...]]"
7637      case "$ac_file" in
7638        *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
7639      esac
7640      # PO directories have a Makefile.in generated from Makefile.in.in.
7641      case "$ac_file" in */Makefile.in)
7642        # Adjust a relative srcdir.
7643        ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
7644        ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
7645        ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
7646        # In autoconf-2.13 it is called $ac_given_srcdir.
7647        # In autoconf-2.50 it is called $srcdir.
7648        test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
7649        case "$ac_given_srcdir" in
7650          .)  top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
7651          /*) top_srcdir="$ac_given_srcdir" ;;
7652          *)  top_srcdir="$ac_dots$ac_given_srcdir" ;;
7653        esac
7654        # Treat a directory as a PO directory if and only if it has a
7655        # POTFILES.in file. This allows packages to have multiple PO
7656        # directories under different names or in different locations.
7657        if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
7658          rm -f "$ac_dir/POTFILES"
7659          test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
7660          cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ 	]*\$/d" -e "s,.*,     $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
7661          POMAKEFILEDEPS="POTFILES.in"
7662          # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend
7663          # on $ac_dir but don't depend on user-specified configuration
7664          # parameters.
7665          if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
7666            # The LINGUAS file contains the set of available languages.
7667            if test -n "$OBSOLETE_ALL_LINGUAS"; then
7668              test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
7669            fi
7670            ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
7671            # Hide the ALL_LINGUAS assigment from automake.
7672            eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
7673            POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
7674          else
7675            # The set of available languages was given in configure.in.
7676            eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
7677          fi
7678          # Compute POFILES
7679          # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
7680          # Compute UPDATEPOFILES
7681          # as      $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
7682          # Compute DUMMYPOFILES
7683          # as      $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
7684          # Compute GMOFILES
7685          # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
7686          case "$ac_given_srcdir" in
7687            .) srcdirpre= ;;
7688            *) srcdirpre='$(srcdir)/' ;;
7689          esac
7690          POFILES=
7691          UPDATEPOFILES=
7692          DUMMYPOFILES=
7693          GMOFILES=
7694          for lang in $ALL_LINGUAS; do
7695            POFILES="$POFILES $srcdirpre$lang.po"
7696            UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
7697            DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
7698            GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
7699          done
7700          # CATALOGS depends on both $ac_dir and the user's LINGUAS
7701          # environment variable.
7702          INST_LINGUAS=
7703          if test -n "$ALL_LINGUAS"; then
7704            for presentlang in $ALL_LINGUAS; do
7705              useit=no
7706              if test "%UNSET%" != "$LINGUAS"; then
7707                desiredlanguages="$LINGUAS"
7708              else
7709                desiredlanguages="$ALL_LINGUAS"
7710              fi
7711              for desiredlang in $desiredlanguages; do
7712                # Use the presentlang catalog if desiredlang is
7713                #   a. equal to presentlang, or
7714                #   b. a variant of presentlang (because in this case,
7715                #      presentlang can be used as a fallback for messages
7716                #      which are not translated in the desiredlang catalog).
7717                case "$desiredlang" in
7718                  "$presentlang"*) useit=yes;;
7719                esac
7720              done
7721              if test $useit = yes; then
7722                INST_LINGUAS="$INST_LINGUAS $presentlang"
7723              fi
7724            done
7725          fi
7726          CATALOGS=
7727          if test -n "$INST_LINGUAS"; then
7728            for lang in $INST_LINGUAS; do
7729              CATALOGS="$CATALOGS $lang.gmo"
7730            done
7731          fi
7732          test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
7733          sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
7734          for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
7735            if test -f "$f"; then
7736              case "$f" in
7737                *.orig | *.bak | *~) ;;
7738                *) cat "$f" >> "$ac_dir/Makefile" ;;
7739              esac
7740            fi
7741          done
7742        fi
7743        ;;
7744      esac
7745    done],
7746   [# Capture the value of obsolete ALL_LINGUAS because we need it to compute
7747    # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it
7748    # from automake.
7749    eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
7750    # Capture the value of LINGUAS because we need it to compute CATALOGS.
7751    LINGUAS="${LINGUAS-%UNSET%}"
7752   ])
7753])
7754
7755dnl Postprocesses a Makefile in a directory containing PO files.
7756AC_DEFUN([AM_POSTPROCESS_PO_MAKEFILE],
7757[
7758  # When this code is run, in config.status, two variables have already been
7759  # set:
7760  # - OBSOLETE_ALL_LINGUAS is the value of LINGUAS set in configure.in,
7761  # - LINGUAS is the value of the environment variable LINGUAS at configure
7762  #   time.
7763
7764changequote(,)dnl
7765  # Adjust a relative srcdir.
7766  ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
7767  ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
7768  ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
7769  # In autoconf-2.13 it is called $ac_given_srcdir.
7770  # In autoconf-2.50 it is called $srcdir.
7771  test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
7772  case "$ac_given_srcdir" in
7773    .)  top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
7774    /*) top_srcdir="$ac_given_srcdir" ;;
7775    *)  top_srcdir="$ac_dots$ac_given_srcdir" ;;
7776  esac
7777
7778  # Find a way to echo strings without interpreting backslash.
7779  if test "X`(echo '\t') 2>/dev/null`" = 'X\t'; then
7780    gt_echo='echo'
7781  else
7782    if test "X`(printf '%s\n' '\t') 2>/dev/null`" = 'X\t'; then
7783      gt_echo='printf %s\n'
7784    else
7785      echo_func () {
7786        cat <<EOT
7787$*
7788EOT
7789      }
7790      gt_echo='echo_func'
7791    fi
7792  fi
7793
7794  # A sed script that extracts the value of VARIABLE from a Makefile.
7795  sed_x_variable='
7796# Test if the hold space is empty.
7797x
7798s/P/P/
7799x
7800ta
7801# Yes it was empty. Look if we have the expected variable definition.
7802/^[	 ]*VARIABLE[	 ]*=/{
7803  # Seen the first line of the variable definition.
7804  s/^[	 ]*VARIABLE[	 ]*=//
7805  ba
7806}
7807bd
7808:a
7809# Here we are processing a line from the variable definition.
7810# Remove comment, more precisely replace it with a space.
7811s/#.*$/ /
7812# See if the line ends in a backslash.
7813tb
7814:b
7815s/\\$//
7816# Print the line, without the trailing backslash.
7817p
7818tc
7819# There was no trailing backslash. The end of the variable definition is
7820# reached. Clear the hold space.
7821s/^.*$//
7822x
7823bd
7824:c
7825# A trailing backslash means that the variable definition continues in the
7826# next line. Put a nonempty string into the hold space to indicate this.
7827s/^.*$/P/
7828x
7829:d
7830'
7831changequote([,])dnl
7832
7833  # Set POTFILES to the value of the Makefile variable POTFILES.
7834  sed_x_POTFILES="`$gt_echo \"$sed_x_variable\" | sed -e '/^ *#/d' -e 's/VARIABLE/POTFILES/g'`"
7835  POTFILES=`sed -n -e "$sed_x_POTFILES" < "$ac_file"`
7836  # Compute POTFILES_DEPS as
7837  #   $(foreach file, $(POTFILES), $(top_srcdir)/$(file))
7838  POTFILES_DEPS=
7839  for file in $POTFILES; do
7840    POTFILES_DEPS="$POTFILES_DEPS "'$(top_srcdir)/'"$file"
7841  done
7842  POMAKEFILEDEPS=""
7843
7844  if test -n "$OBSOLETE_ALL_LINGUAS"; then
7845    test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
7846  fi
7847  if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
7848    # The LINGUAS file contains the set of available languages.
7849    ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
7850    POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
7851  else
7852    # Set ALL_LINGUAS to the value of the Makefile variable LINGUAS.
7853    sed_x_LINGUAS="`$gt_echo \"$sed_x_variable\" | sed -e '/^ *#/d' -e 's/VARIABLE/LINGUAS/g'`"
7854    ALL_LINGUAS_=`sed -n -e "$sed_x_LINGUAS" < "$ac_file"`
7855  fi
7856  # Hide the ALL_LINGUAS assigment from automake.
7857  eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
7858  # Compute POFILES
7859  # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
7860  # Compute UPDATEPOFILES
7861  # as      $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
7862  # Compute DUMMYPOFILES
7863  # as      $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
7864  # Compute GMOFILES
7865  # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
7866  # Compute PROPERTIESFILES
7867  # as      $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).properties)
7868  # Compute CLASSFILES
7869  # as      $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).class)
7870  # Compute QMFILES
7871  # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).qm)
7872  # Compute MSGFILES
7873  # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang)).msg)
7874  # Compute RESOURCESDLLFILES
7875  # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang))/$(DOMAIN).resources.dll)
7876  case "$ac_given_srcdir" in
7877    .) srcdirpre= ;;
7878    *) srcdirpre='$(srcdir)/' ;;
7879  esac
7880  POFILES=
7881  UPDATEPOFILES=
7882  DUMMYPOFILES=
7883  GMOFILES=
7884  PROPERTIESFILES=
7885  CLASSFILES=
7886  QMFILES=
7887  MSGFILES=
7888  RESOURCESDLLFILES=
7889  for lang in $ALL_LINGUAS; do
7890    POFILES="$POFILES $srcdirpre$lang.po"
7891    UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
7892    DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
7893    GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
7894    PROPERTIESFILES="$PROPERTIESFILES \$(top_srcdir)/\$(DOMAIN)_$lang.properties"
7895    CLASSFILES="$CLASSFILES \$(top_srcdir)/\$(DOMAIN)_$lang.class"
7896    QMFILES="$QMFILES $srcdirpre$lang.qm"
7897    frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
7898    MSGFILES="$MSGFILES $srcdirpre$frobbedlang.msg"
7899    frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'`
7900    RESOURCESDLLFILES="$RESOURCESDLLFILES $srcdirpre$frobbedlang/\$(DOMAIN).resources.dll"
7901  done
7902  # CATALOGS depends on both $ac_dir and the user's LINGUAS
7903  # environment variable.
7904  INST_LINGUAS=
7905  if test -n "$ALL_LINGUAS"; then
7906    for presentlang in $ALL_LINGUAS; do
7907      useit=no
7908      if test "%UNSET%" != "$LINGUAS"; then
7909        desiredlanguages="$LINGUAS"
7910      else
7911        desiredlanguages="$ALL_LINGUAS"
7912      fi
7913      for desiredlang in $desiredlanguages; do
7914        # Use the presentlang catalog if desiredlang is
7915        #   a. equal to presentlang, or
7916        #   b. a variant of presentlang (because in this case,
7917        #      presentlang can be used as a fallback for messages
7918        #      which are not translated in the desiredlang catalog).
7919        case "$desiredlang" in
7920          "$presentlang"*) useit=yes;;
7921        esac
7922      done
7923      if test $useit = yes; then
7924        INST_LINGUAS="$INST_LINGUAS $presentlang"
7925      fi
7926    done
7927  fi
7928  CATALOGS=
7929  JAVACATALOGS=
7930  QTCATALOGS=
7931  TCLCATALOGS=
7932  CSHARPCATALOGS=
7933  if test -n "$INST_LINGUAS"; then
7934    for lang in $INST_LINGUAS; do
7935      CATALOGS="$CATALOGS $lang.gmo"
7936      JAVACATALOGS="$JAVACATALOGS \$(DOMAIN)_$lang.properties"
7937      QTCATALOGS="$QTCATALOGS $lang.qm"
7938      frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
7939      TCLCATALOGS="$TCLCATALOGS $frobbedlang.msg"
7940      frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'`
7941      CSHARPCATALOGS="$CSHARPCATALOGS $frobbedlang/\$(DOMAIN).resources.dll"
7942    done
7943  fi
7944
7945  sed -e "s|@POTFILES_DEPS@|$POTFILES_DEPS|g" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@PROPERTIESFILES@|$PROPERTIESFILES|g" -e "s|@CLASSFILES@|$CLASSFILES|g" -e "s|@QMFILES@|$QMFILES|g" -e "s|@MSGFILES@|$MSGFILES|g" -e "s|@RESOURCESDLLFILES@|$RESOURCESDLLFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@JAVACATALOGS@|$JAVACATALOGS|g" -e "s|@QTCATALOGS@|$QTCATALOGS|g" -e "s|@TCLCATALOGS@|$TCLCATALOGS|g" -e "s|@CSHARPCATALOGS@|$CSHARPCATALOGS|g" -e 's,^#distdir:,distdir:,' < "$ac_file" > "$ac_file.tmp"
7946  if grep -l '@TCLCATALOGS@' "$ac_file" > /dev/null; then
7947    # Add dependencies that cannot be formulated as a simple suffix rule.
7948    for lang in $ALL_LINGUAS; do
7949      frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
7950      cat >> "$ac_file.tmp" <<EOF
7951$frobbedlang.msg: $lang.po
7952	@echo "\$(MSGFMT) -c --tcl -d \$(srcdir) -l $lang $srcdirpre$lang.po"; \
7953	\$(MSGFMT) -c --tcl -d "\$(srcdir)" -l $lang $srcdirpre$lang.po || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
7954EOF
7955    done
7956  fi
7957  if grep -l '@CSHARPCATALOGS@' "$ac_file" > /dev/null; then
7958    # Add dependencies that cannot be formulated as a simple suffix rule.
7959    for lang in $ALL_LINGUAS; do
7960      frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'`
7961      cat >> "$ac_file.tmp" <<EOF
7962$frobbedlang/\$(DOMAIN).resources.dll: $lang.po
7963	@echo "\$(MSGFMT) -c --csharp -d \$(srcdir) -l $lang $srcdirpre$lang.po -r \$(DOMAIN)"; \
7964	\$(MSGFMT) -c --csharp -d "\$(srcdir)" -l $lang $srcdirpre$lang.po -r "\$(DOMAIN)" || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
7965EOF
7966    done
7967  fi
7968  if test -n "$POMAKEFILEDEPS"; then
7969    cat >> "$ac_file.tmp" <<EOF
7970Makefile: $POMAKEFILEDEPS
7971EOF
7972  fi
7973  mv "$ac_file.tmp" "$ac_file"
7974])
7975
7976# nls.m4 serial 2 (gettext-0.14.3)
7977dnl Copyright (C) 1995-2003, 2005 Free Software Foundation, Inc.
7978dnl This file is free software; the Free Software Foundation
7979dnl gives unlimited permission to copy and/or distribute it,
7980dnl with or without modifications, as long as this notice is preserved.
7981dnl
7982dnl This file can can be used in projects which are not available under
7983dnl the GNU General Public License or the GNU Library General Public
7984dnl License but which still want to provide support for the GNU gettext
7985dnl functionality.
7986dnl Please note that the actual code of the GNU gettext library is covered
7987dnl by the GNU Library General Public License, and the rest of the GNU
7988dnl gettext package package is covered by the GNU General Public License.
7989dnl They are *not* in the public domain.
7990
7991dnl Authors:
7992dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
7993dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2003.
7994
7995AC_PREREQ(2.50)
7996
7997AC_DEFUN([AM_NLS],
7998[
7999  AC_MSG_CHECKING([whether NLS is requested])
8000  dnl Default is enabled NLS
8001  AC_ARG_ENABLE(nls,
8002    [  --disable-nls           do not use Native Language Support],
8003    USE_NLS=$enableval, USE_NLS=yes)
8004  AC_MSG_RESULT($USE_NLS)
8005  AC_SUBST(USE_NLS)
8006])
8007
8008AC_DEFUN([AM_MKINSTALLDIRS],
8009[
8010  dnl Tell automake >= 1.10 to complain if mkinstalldirs is missing.
8011  m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([mkinstalldirs])])
8012  dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
8013  dnl find the mkinstalldirs script in another subdir but $(top_srcdir).
8014  dnl Try to locate it.
8015  MKINSTALLDIRS=
8016  if test -n "$ac_aux_dir"; then
8017    case "$ac_aux_dir" in
8018      /*) MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" ;;
8019      *) MKINSTALLDIRS="\$(top_builddir)/$ac_aux_dir/mkinstalldirs" ;;
8020    esac
8021  fi
8022  if test -z "$MKINSTALLDIRS"; then
8023    MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
8024  fi
8025  AC_SUBST(MKINSTALLDIRS)
8026])
8027
8028# progtest.m4 serial 4 (gettext-0.14.2)
8029dnl Copyright (C) 1996-2003, 2005 Free Software Foundation, Inc.
8030dnl This file is free software; the Free Software Foundation
8031dnl gives unlimited permission to copy and/or distribute it,
8032dnl with or without modifications, as long as this notice is preserved.
8033dnl
8034dnl This file can can be used in projects which are not available under
8035dnl the GNU General Public License or the GNU Library General Public
8036dnl License but which still want to provide support for the GNU gettext
8037dnl functionality.
8038dnl Please note that the actual code of the GNU gettext library is covered
8039dnl by the GNU Library General Public License, and the rest of the GNU
8040dnl gettext package package is covered by the GNU General Public License.
8041dnl They are *not* in the public domain.
8042
8043dnl Authors:
8044dnl   Ulrich Drepper <drepper@cygnus.com>, 1996.
8045
8046AC_PREREQ(2.50)
8047
8048# Search path for a program which passes the given test.
8049
8050dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
8051dnl   TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
8052AC_DEFUN([AM_PATH_PROG_WITH_TEST],
8053[
8054# Prepare PATH_SEPARATOR.
8055# The user is always right.
8056if test "${PATH_SEPARATOR+set}" != set; then
8057  echo "#! /bin/sh" >conf$$.sh
8058  echo  "exit 0"   >>conf$$.sh
8059  chmod +x conf$$.sh
8060  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
8061    PATH_SEPARATOR=';'
8062  else
8063    PATH_SEPARATOR=:
8064  fi
8065  rm -f conf$$.sh
8066fi
8067
8068# Find out how to test for executable files. Don't use a zero-byte file,
8069# as systems may use methods other than mode bits to determine executability.
8070cat >conf$$.file <<_ASEOF
8071#! /bin/sh
8072exit 0
8073_ASEOF
8074chmod +x conf$$.file
8075if test -x conf$$.file >/dev/null 2>&1; then
8076  ac_executable_p="test -x"
8077else
8078  ac_executable_p="test -f"
8079fi
8080rm -f conf$$.file
8081
8082# Extract the first word of "$2", so it can be a program name with args.
8083set dummy $2; ac_word=[$]2
8084AC_MSG_CHECKING([for $ac_word])
8085AC_CACHE_VAL(ac_cv_path_$1,
8086[case "[$]$1" in
8087  [[\\/]]* | ?:[[\\/]]*)
8088    ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
8089    ;;
8090  *)
8091    ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
8092    for ac_dir in ifelse([$5], , $PATH, [$5]); do
8093      IFS="$ac_save_IFS"
8094      test -z "$ac_dir" && ac_dir=.
8095      for ac_exec_ext in '' $ac_executable_extensions; do
8096        if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
8097          echo "$as_me: trying $ac_dir/$ac_word..." >&AS_MESSAGE_LOG_FD
8098          if [$3]; then
8099            ac_cv_path_$1="$ac_dir/$ac_word$ac_exec_ext"
8100            break 2
8101          fi
8102        fi
8103      done
8104    done
8105    IFS="$ac_save_IFS"
8106dnl If no 4th arg is given, leave the cache variable unset,
8107dnl so AC_PATH_PROGS will keep looking.
8108ifelse([$4], , , [  test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
8109])dnl
8110    ;;
8111esac])dnl
8112$1="$ac_cv_path_$1"
8113if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
8114  AC_MSG_RESULT([$]$1)
8115else
8116  AC_MSG_RESULT(no)
8117fi
8118AC_SUBST($1)dnl
8119])
8120
8121# lib-prefix.m4 serial 4 (gettext-0.14.2)
8122dnl Copyright (C) 2001-2005 Free Software Foundation, Inc.
8123dnl This file is free software; the Free Software Foundation
8124dnl gives unlimited permission to copy and/or distribute it,
8125dnl with or without modifications, as long as this notice is preserved.
8126
8127dnl From Bruno Haible.
8128
8129dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
8130dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
8131dnl require excessive bracketing.
8132ifdef([AC_HELP_STRING],
8133[AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
8134[AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
8135
8136dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
8137dnl to access previously installed libraries. The basic assumption is that
8138dnl a user will want packages to use other packages he previously installed
8139dnl with the same --prefix option.
8140dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
8141dnl libraries, but is otherwise very convenient.
8142AC_DEFUN([AC_LIB_PREFIX],
8143[
8144  AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
8145  AC_REQUIRE([AC_PROG_CC])
8146  AC_REQUIRE([AC_CANONICAL_HOST])
8147  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
8148  dnl By default, look in $includedir and $libdir.
8149  use_additional=yes
8150  AC_LIB_WITH_FINAL_PREFIX([
8151    eval additional_includedir=\"$includedir\"
8152    eval additional_libdir=\"$libdir\"
8153  ])
8154  AC_LIB_ARG_WITH([lib-prefix],
8155[  --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
8156  --without-lib-prefix    don't search for libraries in includedir and libdir],
8157[
8158    if test "X$withval" = "Xno"; then
8159      use_additional=no
8160    else
8161      if test "X$withval" = "X"; then
8162        AC_LIB_WITH_FINAL_PREFIX([
8163          eval additional_includedir=\"$includedir\"
8164          eval additional_libdir=\"$libdir\"
8165        ])
8166      else
8167        additional_includedir="$withval/include"
8168        additional_libdir="$withval/lib"
8169      fi
8170    fi
8171])
8172  if test $use_additional = yes; then
8173    dnl Potentially add $additional_includedir to $CPPFLAGS.
8174    dnl But don't add it
8175    dnl   1. if it's the standard /usr/include,
8176    dnl   2. if it's already present in $CPPFLAGS,
8177    dnl   3. if it's /usr/local/include and we are using GCC on Linux,
8178    dnl   4. if it doesn't exist as a directory.
8179    if test "X$additional_includedir" != "X/usr/include"; then
8180      haveit=
8181      for x in $CPPFLAGS; do
8182        AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
8183        if test "X$x" = "X-I$additional_includedir"; then
8184          haveit=yes
8185          break
8186        fi
8187      done
8188      if test -z "$haveit"; then
8189        if test "X$additional_includedir" = "X/usr/local/include"; then
8190          if test -n "$GCC"; then
8191            case $host_os in
8192              linux* | gnu* | k*bsd*-gnu) haveit=yes;;
8193            esac
8194          fi
8195        fi
8196        if test -z "$haveit"; then
8197          if test -d "$additional_includedir"; then
8198            dnl Really add $additional_includedir to $CPPFLAGS.
8199            CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
8200          fi
8201        fi
8202      fi
8203    fi
8204    dnl Potentially add $additional_libdir to $LDFLAGS.
8205    dnl But don't add it
8206    dnl   1. if it's the standard /usr/lib,
8207    dnl   2. if it's already present in $LDFLAGS,
8208    dnl   3. if it's /usr/local/lib and we are using GCC on Linux,
8209    dnl   4. if it doesn't exist as a directory.
8210    if test "X$additional_libdir" != "X/usr/lib"; then
8211      haveit=
8212      for x in $LDFLAGS; do
8213        AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
8214        if test "X$x" = "X-L$additional_libdir"; then
8215          haveit=yes
8216          break
8217        fi
8218      done
8219      if test -z "$haveit"; then
8220        if test "X$additional_libdir" = "X/usr/local/lib"; then
8221          if test -n "$GCC"; then
8222            case $host_os in
8223              linux*) haveit=yes;;
8224            esac
8225          fi
8226        fi
8227        if test -z "$haveit"; then
8228          if test -d "$additional_libdir"; then
8229            dnl Really add $additional_libdir to $LDFLAGS.
8230            LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
8231          fi
8232        fi
8233      fi
8234    fi
8235  fi
8236])
8237
8238dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
8239dnl acl_final_exec_prefix, containing the values to which $prefix and
8240dnl $exec_prefix will expand at the end of the configure script.
8241AC_DEFUN([AC_LIB_PREPARE_PREFIX],
8242[
8243  dnl Unfortunately, prefix and exec_prefix get only finally determined
8244  dnl at the end of configure.
8245  if test "X$prefix" = "XNONE"; then
8246    acl_final_prefix="$ac_default_prefix"
8247  else
8248    acl_final_prefix="$prefix"
8249  fi
8250  if test "X$exec_prefix" = "XNONE"; then
8251    acl_final_exec_prefix='${prefix}'
8252  else
8253    acl_final_exec_prefix="$exec_prefix"
8254  fi
8255  acl_save_prefix="$prefix"
8256  prefix="$acl_final_prefix"
8257  eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
8258  prefix="$acl_save_prefix"
8259])
8260
8261dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
8262dnl variables prefix and exec_prefix bound to the values they will have
8263dnl at the end of the configure script.
8264AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
8265[
8266  acl_save_prefix="$prefix"
8267  prefix="$acl_final_prefix"
8268  acl_save_exec_prefix="$exec_prefix"
8269  exec_prefix="$acl_final_exec_prefix"
8270  $1
8271  exec_prefix="$acl_save_exec_prefix"
8272  prefix="$acl_save_prefix"
8273])
8274
8275# lib-link.m4 serial 6 (gettext-0.14.3)
8276dnl Copyright (C) 2001-2005 Free Software Foundation, Inc.
8277dnl This file is free software; the Free Software Foundation
8278dnl gives unlimited permission to copy and/or distribute it,
8279dnl with or without modifications, as long as this notice is preserved.
8280
8281dnl From Bruno Haible.
8282
8283AC_PREREQ(2.50)
8284
8285dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
8286dnl the libraries corresponding to explicit and implicit dependencies.
8287dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
8288dnl augments the CPPFLAGS variable.
8289AC_DEFUN([AC_LIB_LINKFLAGS],
8290[
8291  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
8292  AC_REQUIRE([AC_LIB_RPATH])
8293  define([Name],[translit([$1],[./-], [___])])
8294  define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
8295                               [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
8296  AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
8297    AC_LIB_LINKFLAGS_BODY([$1], [$2])
8298    ac_cv_lib[]Name[]_libs="$LIB[]NAME"
8299    ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
8300    ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
8301  ])
8302  LIB[]NAME="$ac_cv_lib[]Name[]_libs"
8303  LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
8304  INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
8305  AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
8306  AC_SUBST([LIB]NAME)
8307  AC_SUBST([LTLIB]NAME)
8308  dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
8309  dnl results of this search when this library appears as a dependency.
8310  HAVE_LIB[]NAME=yes
8311  undefine([Name])
8312  undefine([NAME])
8313])
8314
8315dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode)
8316dnl searches for libname and the libraries corresponding to explicit and
8317dnl implicit dependencies, together with the specified include files and
8318dnl the ability to compile and link the specified testcode. If found, it
8319dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and
8320dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and
8321dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
8322dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
8323AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
8324[
8325  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
8326  AC_REQUIRE([AC_LIB_RPATH])
8327  define([Name],[translit([$1],[./-], [___])])
8328  define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
8329                               [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
8330
8331  dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
8332  dnl accordingly.
8333  AC_LIB_LINKFLAGS_BODY([$1], [$2])
8334
8335  dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
8336  dnl because if the user has installed lib[]Name and not disabled its use
8337  dnl via --without-lib[]Name-prefix, he wants to use it.
8338  ac_save_CPPFLAGS="$CPPFLAGS"
8339  AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
8340
8341  AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
8342    ac_save_LIBS="$LIBS"
8343    LIBS="$LIBS $LIB[]NAME"
8344    AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no])
8345    LIBS="$ac_save_LIBS"
8346  ])
8347  if test "$ac_cv_lib[]Name" = yes; then
8348    HAVE_LIB[]NAME=yes
8349    AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.])
8350    AC_MSG_CHECKING([how to link with lib[]$1])
8351    AC_MSG_RESULT([$LIB[]NAME])
8352  else
8353    HAVE_LIB[]NAME=no
8354    dnl If $LIB[]NAME didn't lead to a usable library, we don't need
8355    dnl $INC[]NAME either.
8356    CPPFLAGS="$ac_save_CPPFLAGS"
8357    LIB[]NAME=
8358    LTLIB[]NAME=
8359  fi
8360  AC_SUBST([HAVE_LIB]NAME)
8361  AC_SUBST([LIB]NAME)
8362  AC_SUBST([LTLIB]NAME)
8363  undefine([Name])
8364  undefine([NAME])
8365])
8366
8367dnl Determine the platform dependent parameters needed to use rpath:
8368dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator,
8369dnl hardcode_direct, hardcode_minus_L.
8370AC_DEFUN([AC_LIB_RPATH],
8371[
8372  dnl Tell automake >= 1.10 to complain if config.rpath is missing.
8373  m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])])
8374  AC_REQUIRE([AC_PROG_CC])                dnl we use $CC, $GCC, $LDFLAGS
8375  AC_REQUIRE([AC_LIB_PROG_LD])            dnl we use $LD, $with_gnu_ld
8376  AC_REQUIRE([AC_CANONICAL_HOST])         dnl we use $host
8377  AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
8378  AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [
8379    CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
8380    ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
8381    . ./conftest.sh
8382    rm -f ./conftest.sh
8383    acl_cv_rpath=done
8384  ])
8385  wl="$acl_cv_wl"
8386  libext="$acl_cv_libext"
8387  shlibext="$acl_cv_shlibext"
8388  hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
8389  hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
8390  hardcode_direct="$acl_cv_hardcode_direct"
8391  hardcode_minus_L="$acl_cv_hardcode_minus_L"
8392  dnl Determine whether the user wants rpath handling at all.
8393  AC_ARG_ENABLE(rpath,
8394    [  --disable-rpath         do not hardcode runtime library paths],
8395    :, enable_rpath=yes)
8396])
8397
8398dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
8399dnl the libraries corresponding to explicit and implicit dependencies.
8400dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
8401AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
8402[
8403  define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
8404                               [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
8405  dnl By default, look in $includedir and $libdir.
8406  use_additional=yes
8407  AC_LIB_WITH_FINAL_PREFIX([
8408    eval additional_includedir=\"$includedir\"
8409    eval additional_libdir=\"$libdir\"
8410  ])
8411  AC_LIB_ARG_WITH([lib$1-prefix],
8412[  --with-lib$1-prefix[=DIR]  search for lib$1 in DIR/include and DIR/lib
8413  --without-lib$1-prefix     don't search for lib$1 in includedir and libdir],
8414[
8415    if test "X$withval" = "Xno"; then
8416      use_additional=no
8417    else
8418      if test "X$withval" = "X"; then
8419        AC_LIB_WITH_FINAL_PREFIX([
8420          eval additional_includedir=\"$includedir\"
8421          eval additional_libdir=\"$libdir\"
8422        ])
8423      else
8424        additional_includedir="$withval/include"
8425        additional_libdir="$withval/lib"
8426      fi
8427    fi
8428])
8429  dnl Search the library and its dependencies in $additional_libdir and
8430  dnl $LDFLAGS. Using breadth-first-seach.
8431  LIB[]NAME=
8432  LTLIB[]NAME=
8433  INC[]NAME=
8434  rpathdirs=
8435  ltrpathdirs=
8436  names_already_handled=
8437  names_next_round='$1 $2'
8438  while test -n "$names_next_round"; do
8439    names_this_round="$names_next_round"
8440    names_next_round=
8441    for name in $names_this_round; do
8442      already_handled=
8443      for n in $names_already_handled; do
8444        if test "$n" = "$name"; then
8445          already_handled=yes
8446          break
8447        fi
8448      done
8449      if test -z "$already_handled"; then
8450        names_already_handled="$names_already_handled $name"
8451        dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
8452        dnl or AC_LIB_HAVE_LINKFLAGS call.
8453        uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
8454        eval value=\"\$HAVE_LIB$uppername\"
8455        if test -n "$value"; then
8456          if test "$value" = yes; then
8457            eval value=\"\$LIB$uppername\"
8458            test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
8459            eval value=\"\$LTLIB$uppername\"
8460            test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
8461          else
8462            dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
8463            dnl that this library doesn't exist. So just drop it.
8464            :
8465          fi
8466        else
8467          dnl Search the library lib$name in $additional_libdir and $LDFLAGS
8468          dnl and the already constructed $LIBNAME/$LTLIBNAME.
8469          found_dir=
8470          found_la=
8471          found_so=
8472          found_a=
8473          if test $use_additional = yes; then
8474            if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
8475              found_dir="$additional_libdir"
8476              found_so="$additional_libdir/lib$name.$shlibext"
8477              if test -f "$additional_libdir/lib$name.la"; then
8478                found_la="$additional_libdir/lib$name.la"
8479              fi
8480            else
8481              if test -f "$additional_libdir/lib$name.$libext"; then
8482                found_dir="$additional_libdir"
8483                found_a="$additional_libdir/lib$name.$libext"
8484                if test -f "$additional_libdir/lib$name.la"; then
8485                  found_la="$additional_libdir/lib$name.la"
8486                fi
8487              fi
8488            fi
8489          fi
8490          if test "X$found_dir" = "X"; then
8491            for x in $LDFLAGS $LTLIB[]NAME; do
8492              AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
8493              case "$x" in
8494                -L*)
8495                  dir=`echo "X$x" | sed -e 's/^X-L//'`
8496                  if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
8497                    found_dir="$dir"
8498                    found_so="$dir/lib$name.$shlibext"
8499                    if test -f "$dir/lib$name.la"; then
8500                      found_la="$dir/lib$name.la"
8501                    fi
8502                  else
8503                    if test -f "$dir/lib$name.$libext"; then
8504                      found_dir="$dir"
8505                      found_a="$dir/lib$name.$libext"
8506                      if test -f "$dir/lib$name.la"; then
8507                        found_la="$dir/lib$name.la"
8508                      fi
8509                    fi
8510                  fi
8511                  ;;
8512              esac
8513              if test "X$found_dir" != "X"; then
8514                break
8515              fi
8516            done
8517          fi
8518          if test "X$found_dir" != "X"; then
8519            dnl Found the library.
8520            LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
8521            if test "X$found_so" != "X"; then
8522              dnl Linking with a shared library. We attempt to hardcode its
8523              dnl directory into the executable's runpath, unless it's the
8524              dnl standard /usr/lib.
8525              if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
8526                dnl No hardcoding is needed.
8527                LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
8528              else
8529                dnl Use an explicit option to hardcode DIR into the resulting
8530                dnl binary.
8531                dnl Potentially add DIR to ltrpathdirs.
8532                dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
8533                haveit=
8534                for x in $ltrpathdirs; do
8535                  if test "X$x" = "X$found_dir"; then
8536                    haveit=yes
8537                    break
8538                  fi
8539                done
8540                if test -z "$haveit"; then
8541                  ltrpathdirs="$ltrpathdirs $found_dir"
8542                fi
8543                dnl The hardcoding into $LIBNAME is system dependent.
8544                if test "$hardcode_direct" = yes; then
8545                  dnl Using DIR/libNAME.so during linking hardcodes DIR into the
8546                  dnl resulting binary.
8547                  LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
8548                else
8549                  if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
8550                    dnl Use an explicit option to hardcode DIR into the resulting
8551                    dnl binary.
8552                    LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
8553                    dnl Potentially add DIR to rpathdirs.
8554                    dnl The rpathdirs will be appended to $LIBNAME at the end.
8555                    haveit=
8556                    for x in $rpathdirs; do
8557                      if test "X$x" = "X$found_dir"; then
8558                        haveit=yes
8559                        break
8560                      fi
8561                    done
8562                    if test -z "$haveit"; then
8563                      rpathdirs="$rpathdirs $found_dir"
8564                    fi
8565                  else
8566                    dnl Rely on "-L$found_dir".
8567                    dnl But don't add it if it's already contained in the LDFLAGS
8568                    dnl or the already constructed $LIBNAME
8569                    haveit=
8570                    for x in $LDFLAGS $LIB[]NAME; do
8571                      AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
8572                      if test "X$x" = "X-L$found_dir"; then
8573                        haveit=yes
8574                        break
8575                      fi
8576                    done
8577                    if test -z "$haveit"; then
8578                      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
8579                    fi
8580                    if test "$hardcode_minus_L" != no; then
8581                      dnl FIXME: Not sure whether we should use
8582                      dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
8583                      dnl here.
8584                      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
8585                    else
8586                      dnl We cannot use $hardcode_runpath_var and LD_RUN_PATH
8587                      dnl here, because this doesn't fit in flags passed to the
8588                      dnl compiler. So give up. No hardcoding. This affects only
8589                      dnl very old systems.
8590                      dnl FIXME: Not sure whether we should use
8591                      dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
8592                      dnl here.
8593                      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
8594                    fi
8595                  fi
8596                fi
8597              fi
8598            else
8599              if test "X$found_a" != "X"; then
8600                dnl Linking with a static library.
8601                LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
8602              else
8603                dnl We shouldn't come here, but anyway it's good to have a
8604                dnl fallback.
8605                LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
8606              fi
8607            fi
8608            dnl Assume the include files are nearby.
8609            additional_includedir=
8610            case "$found_dir" in
8611              */lib | */lib/)
8612                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
8613                additional_includedir="$basedir/include"
8614                ;;
8615            esac
8616            if test "X$additional_includedir" != "X"; then
8617              dnl Potentially add $additional_includedir to $INCNAME.
8618              dnl But don't add it
8619              dnl   1. if it's the standard /usr/include,
8620              dnl   2. if it's /usr/local/include and we are using GCC on Linux,
8621              dnl   3. if it's already present in $CPPFLAGS or the already
8622              dnl      constructed $INCNAME,
8623              dnl   4. if it doesn't exist as a directory.
8624              if test "X$additional_includedir" != "X/usr/include"; then
8625                haveit=
8626                if test "X$additional_includedir" = "X/usr/local/include"; then
8627                  if test -n "$GCC"; then
8628                    case $host_os in
8629                      linux* | gnu* | k*bsd*-gnu) haveit=yes;;
8630                    esac
8631                  fi
8632                fi
8633                if test -z "$haveit"; then
8634                  for x in $CPPFLAGS $INC[]NAME; do
8635                    AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
8636                    if test "X$x" = "X-I$additional_includedir"; then
8637                      haveit=yes
8638                      break
8639                    fi
8640                  done
8641                  if test -z "$haveit"; then
8642                    if test -d "$additional_includedir"; then
8643                      dnl Really add $additional_includedir to $INCNAME.
8644                      INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
8645                    fi
8646                  fi
8647                fi
8648              fi
8649            fi
8650            dnl Look for dependencies.
8651            if test -n "$found_la"; then
8652              dnl Read the .la file. It defines the variables
8653              dnl dlname, library_names, old_library, dependency_libs, current,
8654              dnl age, revision, installed, dlopen, dlpreopen, libdir.
8655              save_libdir="$libdir"
8656              case "$found_la" in
8657                */* | *\\*) . "$found_la" ;;
8658                *) . "./$found_la" ;;
8659              esac
8660              libdir="$save_libdir"
8661              dnl We use only dependency_libs.
8662              for dep in $dependency_libs; do
8663                case "$dep" in
8664                  -L*)
8665                    additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
8666                    dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
8667                    dnl But don't add it
8668                    dnl   1. if it's the standard /usr/lib,
8669                    dnl   2. if it's /usr/local/lib and we are using GCC on Linux,
8670                    dnl   3. if it's already present in $LDFLAGS or the already
8671                    dnl      constructed $LIBNAME,
8672                    dnl   4. if it doesn't exist as a directory.
8673                    if test "X$additional_libdir" != "X/usr/lib"; then
8674                      haveit=
8675                      if test "X$additional_libdir" = "X/usr/local/lib"; then
8676                        if test -n "$GCC"; then
8677                          case $host_os in
8678                            linux* | gnu* | k*bsd*-gnu) haveit=yes;;
8679                          esac
8680                        fi
8681                      fi
8682                      if test -z "$haveit"; then
8683                        haveit=
8684                        for x in $LDFLAGS $LIB[]NAME; do
8685                          AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
8686                          if test "X$x" = "X-L$additional_libdir"; then
8687                            haveit=yes
8688                            break
8689                          fi
8690                        done
8691                        if test -z "$haveit"; then
8692                          if test -d "$additional_libdir"; then
8693                            dnl Really add $additional_libdir to $LIBNAME.
8694                            LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
8695                          fi
8696                        fi
8697                        haveit=
8698                        for x in $LDFLAGS $LTLIB[]NAME; do
8699                          AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
8700                          if test "X$x" = "X-L$additional_libdir"; then
8701                            haveit=yes
8702                            break
8703                          fi
8704                        done
8705                        if test -z "$haveit"; then
8706                          if test -d "$additional_libdir"; then
8707                            dnl Really add $additional_libdir to $LTLIBNAME.
8708                            LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
8709                          fi
8710                        fi
8711                      fi
8712                    fi
8713                    ;;
8714                  -R*)
8715                    dir=`echo "X$dep" | sed -e 's/^X-R//'`
8716                    if test "$enable_rpath" != no; then
8717                      dnl Potentially add DIR to rpathdirs.
8718                      dnl The rpathdirs will be appended to $LIBNAME at the end.
8719                      haveit=
8720                      for x in $rpathdirs; do
8721                        if test "X$x" = "X$dir"; then
8722                          haveit=yes
8723                          break
8724                        fi
8725                      done
8726                      if test -z "$haveit"; then
8727                        rpathdirs="$rpathdirs $dir"
8728                      fi
8729                      dnl Potentially add DIR to ltrpathdirs.
8730                      dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
8731                      haveit=
8732                      for x in $ltrpathdirs; do
8733                        if test "X$x" = "X$dir"; then
8734                          haveit=yes
8735                          break
8736                        fi
8737                      done
8738                      if test -z "$haveit"; then
8739                        ltrpathdirs="$ltrpathdirs $dir"
8740                      fi
8741                    fi
8742                    ;;
8743                  -l*)
8744                    dnl Handle this in the next round.
8745                    names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
8746                    ;;
8747                  *.la)
8748                    dnl Handle this in the next round. Throw away the .la's
8749                    dnl directory; it is already contained in a preceding -L
8750                    dnl option.
8751                    names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
8752                    ;;
8753                  *)
8754                    dnl Most likely an immediate library name.
8755                    LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
8756                    LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
8757                    ;;
8758                esac
8759              done
8760            fi
8761          else
8762            dnl Didn't find the library; assume it is in the system directories
8763            dnl known to the linker and runtime loader. (All the system
8764            dnl directories known to the linker should also be known to the
8765            dnl runtime loader, otherwise the system is severely misconfigured.)
8766            LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
8767            LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
8768          fi
8769        fi
8770      fi
8771    done
8772  done
8773  if test "X$rpathdirs" != "X"; then
8774    if test -n "$hardcode_libdir_separator"; then
8775      dnl Weird platform: only the last -rpath option counts, the user must
8776      dnl pass all path elements in one option. We can arrange that for a
8777      dnl single library, but not when more than one $LIBNAMEs are used.
8778      alldirs=
8779      for found_dir in $rpathdirs; do
8780        alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
8781      done
8782      dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl.
8783      acl_save_libdir="$libdir"
8784      libdir="$alldirs"
8785      eval flag=\"$hardcode_libdir_flag_spec\"
8786      libdir="$acl_save_libdir"
8787      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
8788    else
8789      dnl The -rpath options are cumulative.
8790      for found_dir in $rpathdirs; do
8791        acl_save_libdir="$libdir"
8792        libdir="$found_dir"
8793        eval flag=\"$hardcode_libdir_flag_spec\"
8794        libdir="$acl_save_libdir"
8795        LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
8796      done
8797    fi
8798  fi
8799  if test "X$ltrpathdirs" != "X"; then
8800    dnl When using libtool, the option that works for both libraries and
8801    dnl executables is -R. The -R options are cumulative.
8802    for found_dir in $ltrpathdirs; do
8803      LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
8804    done
8805  fi
8806])
8807
8808dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
8809dnl unless already present in VAR.
8810dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
8811dnl contains two or three consecutive elements that belong together.
8812AC_DEFUN([AC_LIB_APPENDTOVAR],
8813[
8814  for element in [$2]; do
8815    haveit=
8816    for x in $[$1]; do
8817      AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
8818      if test "X$x" = "X$element"; then
8819        haveit=yes
8820        break
8821      fi
8822    done
8823    if test -z "$haveit"; then
8824      [$1]="${[$1]}${[$1]:+ }$element"
8825    fi
8826  done
8827])
8828
8829# lib-ld.m4 serial 3 (gettext-0.13)
8830dnl Copyright (C) 1996-2003 Free Software Foundation, Inc.
8831dnl This file is free software; the Free Software Foundation
8832dnl gives unlimited permission to copy and/or distribute it,
8833dnl with or without modifications, as long as this notice is preserved.
8834
8835dnl Subroutines of libtool.m4,
8836dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
8837dnl with libtool.m4.
8838
8839dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
8840AC_DEFUN([AC_LIB_PROG_LD_GNU],
8841[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld,
8842[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
8843case `$LD -v 2>&1 </dev/null` in
8844*GNU* | *'with BFD'*)
8845  acl_cv_prog_gnu_ld=yes ;;
8846*)
8847  acl_cv_prog_gnu_ld=no ;;
8848esac])
8849with_gnu_ld=$acl_cv_prog_gnu_ld
8850])
8851
8852dnl From libtool-1.4. Sets the variable LD.
8853AC_DEFUN([AC_LIB_PROG_LD],
8854[AC_ARG_WITH(gnu-ld,
8855[  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]],
8856test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
8857AC_REQUIRE([AC_PROG_CC])dnl
8858AC_REQUIRE([AC_CANONICAL_HOST])dnl
8859# Prepare PATH_SEPARATOR.
8860# The user is always right.
8861if test "${PATH_SEPARATOR+set}" != set; then
8862  echo "#! /bin/sh" >conf$$.sh
8863  echo  "exit 0"   >>conf$$.sh
8864  chmod +x conf$$.sh
8865  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
8866    PATH_SEPARATOR=';'
8867  else
8868    PATH_SEPARATOR=:
8869  fi
8870  rm -f conf$$.sh
8871fi
8872ac_prog=ld
8873if test "$GCC" = yes; then
8874  # Check if gcc -print-prog-name=ld gives a path.
8875  AC_MSG_CHECKING([for ld used by GCC])
8876  case $host in
8877  *-*-mingw*)
8878    # gcc leaves a trailing carriage return which upsets mingw
8879    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
8880  *)
8881    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
8882  esac
8883  case $ac_prog in
8884    # Accept absolute paths.
8885    [[\\/]* | [A-Za-z]:[\\/]*)]
8886      [re_direlt='/[^/][^/]*/\.\./']
8887      # Canonicalize the path of ld
8888      ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
8889      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
8890	ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
8891      done
8892      test -z "$LD" && LD="$ac_prog"
8893      ;;
8894  "")
8895    # If it fails, then pretend we aren't using GCC.
8896    ac_prog=ld
8897    ;;
8898  *)
8899    # If it is relative, then search for the first ld in PATH.
8900    with_gnu_ld=unknown
8901    ;;
8902  esac
8903elif test "$with_gnu_ld" = yes; then
8904  AC_MSG_CHECKING([for GNU ld])
8905else
8906  AC_MSG_CHECKING([for non-GNU ld])
8907fi
8908AC_CACHE_VAL(acl_cv_path_LD,
8909[if test -z "$LD"; then
8910  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
8911  for ac_dir in $PATH; do
8912    test -z "$ac_dir" && ac_dir=.
8913    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
8914      acl_cv_path_LD="$ac_dir/$ac_prog"
8915      # Check to see if the program is GNU ld.  I'd rather use --version,
8916      # but apparently some GNU ld's only accept -v.
8917      # Break only if it was the GNU/non-GNU ld that we prefer.
8918      case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
8919      *GNU* | *'with BFD'*)
8920	test "$with_gnu_ld" != no && break ;;
8921      *)
8922	test "$with_gnu_ld" != yes && break ;;
8923      esac
8924    fi
8925  done
8926  IFS="$ac_save_ifs"
8927else
8928  acl_cv_path_LD="$LD" # Let the user override the test with a path.
8929fi])
8930LD="$acl_cv_path_LD"
8931if test -n "$LD"; then
8932  AC_MSG_RESULT($LD)
8933else
8934  AC_MSG_RESULT(no)
8935fi
8936test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
8937AC_LIB_PROG_LD_GNU
8938])
8939
8940# iconv.m4 serial AM4 (gettext-0.11.3)
8941dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
8942dnl This file is free software; the Free Software Foundation
8943dnl gives unlimited permission to copy and/or distribute it,
8944dnl with or without modifications, as long as this notice is preserved.
8945
8946dnl From Bruno Haible.
8947
8948AC_DEFUN([AM_ICONV_LINKFLAGS_BODY],
8949[
8950  dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
8951  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
8952  AC_REQUIRE([AC_LIB_RPATH])
8953
8954  dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
8955  dnl accordingly.
8956  AC_LIB_LINKFLAGS_BODY([iconv])
8957])
8958
8959AC_DEFUN([AM_ICONV_LINK],
8960[
8961  dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
8962  dnl those with the standalone portable GNU libiconv installed).
8963
8964  dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
8965  dnl accordingly.
8966  AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
8967
8968  dnl Add $INCICONV to CPPFLAGS before performing the following checks,
8969  dnl because if the user has installed libiconv and not disabled its use
8970  dnl via --without-libiconv-prefix, he wants to use it. The first
8971  dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed.
8972  am_save_CPPFLAGS="$CPPFLAGS"
8973  AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
8974
8975  AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [
8976    am_cv_func_iconv="no, consider installing GNU libiconv"
8977    am_cv_lib_iconv=no
8978    AC_TRY_LINK([#include <stdlib.h>
8979#include <iconv.h>],
8980      [iconv_t cd = iconv_open("","");
8981       iconv(cd,NULL,NULL,NULL,NULL);
8982       iconv_close(cd);],
8983      am_cv_func_iconv=yes)
8984    if test "$am_cv_func_iconv" != yes; then
8985      am_save_LIBS="$LIBS"
8986      LIBS="$LIBS $LIBICONV"
8987      AC_TRY_LINK([#include <stdlib.h>
8988#include <iconv.h>],
8989        [iconv_t cd = iconv_open("","");
8990         iconv(cd,NULL,NULL,NULL,NULL);
8991         iconv_close(cd);],
8992        am_cv_lib_iconv=yes
8993        am_cv_func_iconv=yes)
8994      LIBS="$am_save_LIBS"
8995    fi
8996  ])
8997  if test "$am_cv_func_iconv" = yes; then
8998    AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.])
8999  fi
9000  if test "$am_cv_lib_iconv" = yes; then
9001    AC_MSG_CHECKING([how to link with libiconv])
9002    AC_MSG_RESULT([$LIBICONV])
9003  else
9004    dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV
9005    dnl either.
9006    CPPFLAGS="$am_save_CPPFLAGS"
9007    LIBICONV=
9008    LTLIBICONV=
9009  fi
9010  AC_SUBST(LIBICONV)
9011  AC_SUBST(LTLIBICONV)
9012])
9013
9014AC_DEFUN([AM_ICONV],
9015[
9016  AM_ICONV_LINK
9017  if test "$am_cv_func_iconv" = yes; then
9018    AC_MSG_CHECKING([for iconv declaration])
9019    AC_CACHE_VAL(am_cv_proto_iconv, [
9020      AC_TRY_COMPILE([
9021#include <stdlib.h>
9022#include <iconv.h>
9023extern
9024#ifdef __cplusplus
9025"C"
9026#endif
9027#if defined(__STDC__) || defined(__cplusplus)
9028size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
9029#else
9030size_t iconv();
9031#endif
9032], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const")
9033      am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"])
9034    am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
9035    AC_MSG_RESULT([$]{ac_t:-
9036         }[$]am_cv_proto_iconv)
9037    AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1,
9038      [Define as const if the declaration of iconv() needs const.])
9039  fi
9040])
9041
9042# glibc2.m4 serial 1
9043dnl Copyright (C) 2000-2002, 2004 Free Software Foundation, Inc.
9044dnl This file is free software; the Free Software Foundation
9045dnl gives unlimited permission to copy and/or distribute it,
9046dnl with or without modifications, as long as this notice is preserved.
9047
9048# Test for the GNU C Library, version 2.0 or newer.
9049# From Bruno Haible.
9050
9051AC_DEFUN([gt_GLIBC2],
9052  [
9053    AC_CACHE_CHECK(whether we are using the GNU C Library 2 or newer,
9054      ac_cv_gnu_library_2,
9055      [AC_EGREP_CPP([Lucky GNU user],
9056	[
9057#include <features.h>
9058#ifdef __GNU_LIBRARY__
9059 #if (__GLIBC__ >= 2)
9060  Lucky GNU user
9061 #endif
9062#endif
9063	],
9064	ac_cv_gnu_library_2=yes,
9065	ac_cv_gnu_library_2=no)
9066      ]
9067    )
9068    AC_SUBST(GLIBC2)
9069    GLIBC2="$ac_cv_gnu_library_2"
9070  ]
9071)
9072
9073# isc-posix.m4 serial 2 (gettext-0.11.2)
9074dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
9075dnl This file is free software; the Free Software Foundation
9076dnl gives unlimited permission to copy and/or distribute it,
9077dnl with or without modifications, as long as this notice is preserved.
9078
9079# This file is not needed with autoconf-2.53 and newer.  Remove it in 2005.
9080
9081# This test replaces the one in autoconf.
9082# Currently this macro should have the same name as the autoconf macro
9083# because gettext's gettext.m4 (distributed in the automake package)
9084# still uses it.  Otherwise, the use in gettext.m4 makes autoheader
9085# give these diagnostics:
9086#   configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX
9087#   configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX
9088
9089undefine([AC_ISC_POSIX])
9090
9091AC_DEFUN([AC_ISC_POSIX],
9092  [
9093    dnl This test replaces the obsolescent AC_ISC_POSIX kludge.
9094    AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"])
9095  ]
9096)
9097
9098# signed.m4 serial 1 (gettext-0.10.40)
9099dnl Copyright (C) 2001-2002 Free Software Foundation, Inc.
9100dnl This file is free software; the Free Software Foundation
9101dnl gives unlimited permission to copy and/or distribute it,
9102dnl with or without modifications, as long as this notice is preserved.
9103
9104dnl From Bruno Haible.
9105
9106AC_DEFUN([bh_C_SIGNED],
9107[
9108  AC_CACHE_CHECK([for signed], bh_cv_c_signed,
9109   [AC_TRY_COMPILE(, [signed char x;], bh_cv_c_signed=yes, bh_cv_c_signed=no)])
9110  if test $bh_cv_c_signed = no; then
9111    AC_DEFINE(signed, ,
9112              [Define to empty if the C compiler doesn't support this keyword.])
9113  fi
9114])
9115
9116# longlong.m4 serial 5
9117dnl Copyright (C) 1999-2004 Free Software Foundation, Inc.
9118dnl This file is free software; the Free Software Foundation
9119dnl gives unlimited permission to copy and/or distribute it,
9120dnl with or without modifications, as long as this notice is preserved.
9121
9122dnl From Paul Eggert.
9123
9124# Define HAVE_LONG_LONG if 'long long' works.
9125
9126AC_DEFUN([gl_AC_TYPE_LONG_LONG],
9127[
9128  AC_CACHE_CHECK([for long long], ac_cv_type_long_long,
9129  [AC_TRY_LINK([long long ll = 1LL; int i = 63;],
9130    [long long llmax = (long long) -1;
9131     return ll << i | ll >> i | llmax / ll | llmax % ll;],
9132    ac_cv_type_long_long=yes,
9133    ac_cv_type_long_long=no)])
9134  if test $ac_cv_type_long_long = yes; then
9135    AC_DEFINE(HAVE_LONG_LONG, 1,
9136      [Define if you have the 'long long' type.])
9137  fi
9138])
9139
9140# longdouble.m4 serial 1 (gettext-0.12)
9141dnl Copyright (C) 2002-2003 Free Software Foundation, Inc.
9142dnl This file is free software; the Free Software Foundation
9143dnl gives unlimited permission to copy and/or distribute it,
9144dnl with or without modifications, as long as this notice is preserved.
9145
9146dnl From Bruno Haible.
9147dnl Test whether the compiler supports the 'long double' type.
9148dnl Prerequisite: AC_PROG_CC
9149
9150AC_DEFUN([gt_TYPE_LONGDOUBLE],
9151[
9152  AC_CACHE_CHECK([for long double], gt_cv_c_long_double,
9153    [if test "$GCC" = yes; then
9154       gt_cv_c_long_double=yes
9155     else
9156       AC_TRY_COMPILE([
9157         /* The Stardent Vistra knows sizeof(long double), but does not support it.  */
9158         long double foo = 0.0;
9159         /* On Ultrix 4.3 cc, long double is 4 and double is 8.  */
9160         int array [2*(sizeof(long double) >= sizeof(double)) - 1];
9161         ], ,
9162         gt_cv_c_long_double=yes, gt_cv_c_long_double=no)
9163     fi])
9164  if test $gt_cv_c_long_double = yes; then
9165    AC_DEFINE(HAVE_LONG_DOUBLE, 1, [Define if you have the 'long double' type.])
9166  fi
9167])
9168
9169# wchar_t.m4 serial 1 (gettext-0.12)
9170dnl Copyright (C) 2002-2003 Free Software Foundation, Inc.
9171dnl This file is free software; the Free Software Foundation
9172dnl gives unlimited permission to copy and/or distribute it,
9173dnl with or without modifications, as long as this notice is preserved.
9174
9175dnl From Bruno Haible.
9176dnl Test whether <stddef.h> has the 'wchar_t' type.
9177dnl Prerequisite: AC_PROG_CC
9178
9179AC_DEFUN([gt_TYPE_WCHAR_T],
9180[
9181  AC_CACHE_CHECK([for wchar_t], gt_cv_c_wchar_t,
9182    [AC_TRY_COMPILE([#include <stddef.h>
9183       wchar_t foo = (wchar_t)'\0';], ,
9184       gt_cv_c_wchar_t=yes, gt_cv_c_wchar_t=no)])
9185  if test $gt_cv_c_wchar_t = yes; then
9186    AC_DEFINE(HAVE_WCHAR_T, 1, [Define if you have the 'wchar_t' type.])
9187  fi
9188])
9189
9190# wint_t.m4 serial 1 (gettext-0.12)
9191dnl Copyright (C) 2003 Free Software Foundation, Inc.
9192dnl This file is free software; the Free Software Foundation
9193dnl gives unlimited permission to copy and/or distribute it,
9194dnl with or without modifications, as long as this notice is preserved.
9195
9196dnl From Bruno Haible.
9197dnl Test whether <wchar.h> has the 'wint_t' type.
9198dnl Prerequisite: AC_PROG_CC
9199
9200AC_DEFUN([gt_TYPE_WINT_T],
9201[
9202  AC_CACHE_CHECK([for wint_t], gt_cv_c_wint_t,
9203    [AC_TRY_COMPILE([#include <wchar.h>
9204       wint_t foo = (wchar_t)'\0';], ,
9205       gt_cv_c_wint_t=yes, gt_cv_c_wint_t=no)])
9206  if test $gt_cv_c_wint_t = yes; then
9207    AC_DEFINE(HAVE_WINT_T, 1, [Define if you have the 'wint_t' type.])
9208  fi
9209])
9210
9211# inttypes_h.m4 serial 6
9212dnl Copyright (C) 1997-2004 Free Software Foundation, Inc.
9213dnl This file is free software; the Free Software Foundation
9214dnl gives unlimited permission to copy and/or distribute it,
9215dnl with or without modifications, as long as this notice is preserved.
9216
9217dnl From Paul Eggert.
9218
9219# Define HAVE_INTTYPES_H_WITH_UINTMAX if <inttypes.h> exists,
9220# doesn't clash with <sys/types.h>, and declares uintmax_t.
9221
9222AC_DEFUN([gl_AC_HEADER_INTTYPES_H],
9223[
9224  AC_CACHE_CHECK([for inttypes.h], gl_cv_header_inttypes_h,
9225  [AC_TRY_COMPILE(
9226    [#include <sys/types.h>
9227#include <inttypes.h>],
9228    [uintmax_t i = (uintmax_t) -1;],
9229    gl_cv_header_inttypes_h=yes,
9230    gl_cv_header_inttypes_h=no)])
9231  if test $gl_cv_header_inttypes_h = yes; then
9232    AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H_WITH_UINTMAX, 1,
9233      [Define if <inttypes.h> exists, doesn't clash with <sys/types.h>,
9234       and declares uintmax_t. ])
9235  fi
9236])
9237
9238# stdint_h.m4 serial 5
9239dnl Copyright (C) 1997-2004 Free Software Foundation, Inc.
9240dnl This file is free software; the Free Software Foundation
9241dnl gives unlimited permission to copy and/or distribute it,
9242dnl with or without modifications, as long as this notice is preserved.
9243
9244dnl From Paul Eggert.
9245
9246# Define HAVE_STDINT_H_WITH_UINTMAX if <stdint.h> exists,
9247# doesn't clash with <sys/types.h>, and declares uintmax_t.
9248
9249AC_DEFUN([gl_AC_HEADER_STDINT_H],
9250[
9251  AC_CACHE_CHECK([for stdint.h], gl_cv_header_stdint_h,
9252  [AC_TRY_COMPILE(
9253    [#include <sys/types.h>
9254#include <stdint.h>],
9255    [uintmax_t i = (uintmax_t) -1;],
9256    gl_cv_header_stdint_h=yes,
9257    gl_cv_header_stdint_h=no)])
9258  if test $gl_cv_header_stdint_h = yes; then
9259    AC_DEFINE_UNQUOTED(HAVE_STDINT_H_WITH_UINTMAX, 1,
9260      [Define if <stdint.h> exists, doesn't clash with <sys/types.h>,
9261       and declares uintmax_t. ])
9262  fi
9263])
9264
9265# intmax.m4 serial 2 (gettext-0.14.2)
9266dnl Copyright (C) 2002-2005 Free Software Foundation, Inc.
9267dnl This file is free software; the Free Software Foundation
9268dnl gives unlimited permission to copy and/or distribute it,
9269dnl with or without modifications, as long as this notice is preserved.
9270
9271dnl From Bruno Haible.
9272dnl Test whether the system has the 'intmax_t' type, but don't attempt to
9273dnl find a replacement if it is lacking.
9274
9275AC_DEFUN([gt_TYPE_INTMAX_T],
9276[
9277  AC_REQUIRE([gl_AC_HEADER_INTTYPES_H])
9278  AC_REQUIRE([gl_AC_HEADER_STDINT_H])
9279  AC_CACHE_CHECK(for intmax_t, gt_cv_c_intmax_t,
9280    [AC_TRY_COMPILE([
9281#include <stddef.h>
9282#include <stdlib.h>
9283#if HAVE_STDINT_H_WITH_UINTMAX
9284#include <stdint.h>
9285#endif
9286#if HAVE_INTTYPES_H_WITH_UINTMAX
9287#include <inttypes.h>
9288#endif
9289], [intmax_t x = -1;], gt_cv_c_intmax_t=yes, gt_cv_c_intmax_t=no)])
9290  if test $gt_cv_c_intmax_t = yes; then
9291    AC_DEFINE(HAVE_INTMAX_T, 1,
9292      [Define if you have the 'intmax_t' type in <stdint.h> or <inttypes.h>.])
9293  fi
9294])
9295
9296# printf-posix.m4 serial 2 (gettext-0.13.1)
9297dnl Copyright (C) 2003 Free Software Foundation, Inc.
9298dnl This file is free software; the Free Software Foundation
9299dnl gives unlimited permission to copy and/or distribute it,
9300dnl with or without modifications, as long as this notice is preserved.
9301
9302dnl From Bruno Haible.
9303dnl Test whether the printf() function supports POSIX/XSI format strings with
9304dnl positions.
9305
9306AC_DEFUN([gt_PRINTF_POSIX],
9307[
9308  AC_REQUIRE([AC_PROG_CC])
9309  AC_CACHE_CHECK([whether printf() supports POSIX/XSI format strings],
9310    gt_cv_func_printf_posix,
9311    [
9312      AC_TRY_RUN([
9313#include <stdio.h>
9314#include <string.h>
9315/* The string "%2$d %1$d", with dollar characters protected from the shell's
9316   dollar expansion (possibly an autoconf bug).  */
9317static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' };
9318static char buf[100];
9319int main ()
9320{
9321  sprintf (buf, format, 33, 55);
9322  return (strcmp (buf, "55 33") != 0);
9323}], gt_cv_func_printf_posix=yes, gt_cv_func_printf_posix=no,
9324      [
9325        AC_EGREP_CPP(notposix, [
9326#if defined __NetBSD__ || defined _MSC_VER || defined __MINGW32__ || defined __CYGWIN__
9327  notposix
9328#endif
9329        ], gt_cv_func_printf_posix="guessing no",
9330           gt_cv_func_printf_posix="guessing yes")
9331      ])
9332    ])
9333  case $gt_cv_func_printf_posix in
9334    *yes)
9335      AC_DEFINE(HAVE_POSIX_PRINTF, 1,
9336        [Define if your printf() function supports format strings with positions.])
9337      ;;
9338  esac
9339])
9340
9341# glibc21.m4 serial 3
9342dnl Copyright (C) 2000-2002, 2004 Free Software Foundation, Inc.
9343dnl This file is free software; the Free Software Foundation
9344dnl gives unlimited permission to copy and/or distribute it,
9345dnl with or without modifications, as long as this notice is preserved.
9346
9347# Test for the GNU C Library, version 2.1 or newer.
9348# From Bruno Haible.
9349
9350AC_DEFUN([gl_GLIBC21],
9351  [
9352    AC_CACHE_CHECK(whether we are using the GNU C Library 2.1 or newer,
9353      ac_cv_gnu_library_2_1,
9354      [AC_EGREP_CPP([Lucky GNU user],
9355	[
9356#include <features.h>
9357#ifdef __GNU_LIBRARY__
9358 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
9359  Lucky GNU user
9360 #endif
9361#endif
9362	],
9363	ac_cv_gnu_library_2_1=yes,
9364	ac_cv_gnu_library_2_1=no)
9365      ]
9366    )
9367    AC_SUBST(GLIBC21)
9368    GLIBC21="$ac_cv_gnu_library_2_1"
9369  ]
9370)
9371
9372# intdiv0.m4 serial 1 (gettext-0.11.3)
9373dnl Copyright (C) 2002 Free Software Foundation, Inc.
9374dnl This file is free software; the Free Software Foundation
9375dnl gives unlimited permission to copy and/or distribute it,
9376dnl with or without modifications, as long as this notice is preserved.
9377
9378dnl From Bruno Haible.
9379
9380AC_DEFUN([gt_INTDIV0],
9381[
9382  AC_REQUIRE([AC_PROG_CC])dnl
9383  AC_REQUIRE([AC_CANONICAL_HOST])dnl
9384
9385  AC_CACHE_CHECK([whether integer division by zero raises SIGFPE],
9386    gt_cv_int_divbyzero_sigfpe,
9387    [
9388      AC_TRY_RUN([
9389#include <stdlib.h>
9390#include <signal.h>
9391
9392static void
9393#ifdef __cplusplus
9394sigfpe_handler (int sig)
9395#else
9396sigfpe_handler (sig) int sig;
9397#endif
9398{
9399  /* Exit with code 0 if SIGFPE, with code 1 if any other signal.  */
9400  exit (sig != SIGFPE);
9401}
9402
9403int x = 1;
9404int y = 0;
9405int z;
9406int nan;
9407
9408int main ()
9409{
9410  signal (SIGFPE, sigfpe_handler);
9411/* IRIX and AIX (when "xlc -qcheck" is used) yield signal SIGTRAP.  */
9412#if (defined (__sgi) || defined (_AIX)) && defined (SIGTRAP)
9413  signal (SIGTRAP, sigfpe_handler);
9414#endif
9415/* Linux/SPARC yields signal SIGILL.  */
9416#if defined (__sparc__) && defined (__linux__)
9417  signal (SIGILL, sigfpe_handler);
9418#endif
9419
9420  z = x / y;
9421  nan = y / y;
9422  exit (1);
9423}
9424], gt_cv_int_divbyzero_sigfpe=yes, gt_cv_int_divbyzero_sigfpe=no,
9425        [
9426          # Guess based on the CPU.
9427          case "$host_cpu" in
9428            alpha* | i[34567]86 | m68k | s390*)
9429              gt_cv_int_divbyzero_sigfpe="guessing yes";;
9430            *)
9431              gt_cv_int_divbyzero_sigfpe="guessing no";;
9432          esac
9433        ])
9434    ])
9435  case "$gt_cv_int_divbyzero_sigfpe" in
9436    *yes) value=1;;
9437    *) value=0;;
9438  esac
9439  AC_DEFINE_UNQUOTED(INTDIV0_RAISES_SIGFPE, $value,
9440    [Define if integer division by zero raises signal SIGFPE.])
9441])
9442
9443# uintmax_t.m4 serial 9
9444dnl Copyright (C) 1997-2004 Free Software Foundation, Inc.
9445dnl This file is free software; the Free Software Foundation
9446dnl gives unlimited permission to copy and/or distribute it,
9447dnl with or without modifications, as long as this notice is preserved.
9448
9449dnl From Paul Eggert.
9450
9451AC_PREREQ(2.13)
9452
9453# Define uintmax_t to 'unsigned long' or 'unsigned long long'
9454# if it is not already defined in <stdint.h> or <inttypes.h>.
9455
9456AC_DEFUN([gl_AC_TYPE_UINTMAX_T],
9457[
9458  AC_REQUIRE([gl_AC_HEADER_INTTYPES_H])
9459  AC_REQUIRE([gl_AC_HEADER_STDINT_H])
9460  if test $gl_cv_header_inttypes_h = no && test $gl_cv_header_stdint_h = no; then
9461    AC_REQUIRE([gl_AC_TYPE_UNSIGNED_LONG_LONG])
9462    test $ac_cv_type_unsigned_long_long = yes \
9463      && ac_type='unsigned long long' \
9464      || ac_type='unsigned long'
9465    AC_DEFINE_UNQUOTED(uintmax_t, $ac_type,
9466      [Define to unsigned long or unsigned long long
9467       if <stdint.h> and <inttypes.h> don't define.])
9468  else
9469    AC_DEFINE(HAVE_UINTMAX_T, 1,
9470      [Define if you have the 'uintmax_t' type in <stdint.h> or <inttypes.h>.])
9471  fi
9472])
9473
9474# ulonglong.m4 serial 4
9475dnl Copyright (C) 1999-2004 Free Software Foundation, Inc.
9476dnl This file is free software; the Free Software Foundation
9477dnl gives unlimited permission to copy and/or distribute it,
9478dnl with or without modifications, as long as this notice is preserved.
9479
9480dnl From Paul Eggert.
9481
9482# Define HAVE_UNSIGNED_LONG_LONG if 'unsigned long long' works.
9483
9484AC_DEFUN([gl_AC_TYPE_UNSIGNED_LONG_LONG],
9485[
9486  AC_CACHE_CHECK([for unsigned long long], ac_cv_type_unsigned_long_long,
9487  [AC_TRY_LINK([unsigned long long ull = 1ULL; int i = 63;],
9488    [unsigned long long ullmax = (unsigned long long) -1;
9489     return ull << i | ull >> i | ullmax / ull | ullmax % ull;],
9490    ac_cv_type_unsigned_long_long=yes,
9491    ac_cv_type_unsigned_long_long=no)])
9492  if test $ac_cv_type_unsigned_long_long = yes; then
9493    AC_DEFINE(HAVE_UNSIGNED_LONG_LONG, 1,
9494      [Define if you have the 'unsigned long long' type.])
9495  fi
9496])
9497
9498# inttypes.m4 serial 1 (gettext-0.11.4)
9499dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
9500dnl This file is free software; the Free Software Foundation
9501dnl gives unlimited permission to copy and/or distribute it,
9502dnl with or without modifications, as long as this notice is preserved.
9503
9504dnl From Paul Eggert.
9505
9506# Define HAVE_INTTYPES_H if <inttypes.h> exists and doesn't clash with
9507# <sys/types.h>.
9508
9509AC_DEFUN([gt_HEADER_INTTYPES_H],
9510[
9511  AC_CACHE_CHECK([for inttypes.h], gt_cv_header_inttypes_h,
9512  [
9513    AC_TRY_COMPILE(
9514      [#include <sys/types.h>
9515#include <inttypes.h>],
9516      [], gt_cv_header_inttypes_h=yes, gt_cv_header_inttypes_h=no)
9517  ])
9518  if test $gt_cv_header_inttypes_h = yes; then
9519    AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H, 1,
9520      [Define if <inttypes.h> exists and doesn't clash with <sys/types.h>.])
9521  fi
9522])
9523
9524# inttypes-pri.m4 serial 1 (gettext-0.11.4)
9525dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
9526dnl This file is free software; the Free Software Foundation
9527dnl gives unlimited permission to copy and/or distribute it,
9528dnl with or without modifications, as long as this notice is preserved.
9529
9530dnl From Bruno Haible.
9531
9532# Define PRI_MACROS_BROKEN if <inttypes.h> exists and defines the PRI*
9533# macros to non-string values.  This is the case on AIX 4.3.3.
9534
9535AC_DEFUN([gt_INTTYPES_PRI],
9536[
9537  AC_REQUIRE([gt_HEADER_INTTYPES_H])
9538  if test $gt_cv_header_inttypes_h = yes; then
9539    AC_CACHE_CHECK([whether the inttypes.h PRIxNN macros are broken],
9540      gt_cv_inttypes_pri_broken,
9541      [
9542        AC_TRY_COMPILE([#include <inttypes.h>
9543#ifdef PRId32
9544char *p = PRId32;
9545#endif
9546], [], gt_cv_inttypes_pri_broken=no, gt_cv_inttypes_pri_broken=yes)
9547      ])
9548  fi
9549  if test "$gt_cv_inttypes_pri_broken" = yes; then
9550    AC_DEFINE_UNQUOTED(PRI_MACROS_BROKEN, 1,
9551      [Define if <inttypes.h> exists and defines unusable PRI* macros.])
9552  fi
9553])
9554
9555# xsize.m4 serial 3
9556dnl Copyright (C) 2003-2004 Free Software Foundation, Inc.
9557dnl This file is free software; the Free Software Foundation
9558dnl gives unlimited permission to copy and/or distribute it,
9559dnl with or without modifications, as long as this notice is preserved.
9560
9561AC_DEFUN([gl_XSIZE],
9562[
9563  dnl Prerequisites of lib/xsize.h.
9564  AC_REQUIRE([gl_SIZE_MAX])
9565  AC_REQUIRE([AC_C_INLINE])
9566  AC_CHECK_HEADERS(stdint.h)
9567])
9568
9569# size_max.m4 serial 2
9570dnl Copyright (C) 2003 Free Software Foundation, Inc.
9571dnl This file is free software; the Free Software Foundation
9572dnl gives unlimited permission to copy and/or distribute it,
9573dnl with or without modifications, as long as this notice is preserved.
9574
9575dnl From Bruno Haible.
9576
9577AC_DEFUN([gl_SIZE_MAX],
9578[
9579  AC_CHECK_HEADERS(stdint.h)
9580  dnl First test whether the system already has SIZE_MAX.
9581  AC_MSG_CHECKING([for SIZE_MAX])
9582  result=
9583  AC_EGREP_CPP([Found it], [
9584#include <limits.h>
9585#if HAVE_STDINT_H
9586#include <stdint.h>
9587#endif
9588#ifdef SIZE_MAX
9589Found it
9590#endif
9591], result=yes)
9592  if test -z "$result"; then
9593    dnl Define it ourselves. Here we assume that the type 'size_t' is not wider
9594    dnl than the type 'unsigned long'.
9595    dnl The _AC_COMPUTE_INT macro works up to LONG_MAX, since it uses 'expr',
9596    dnl which is guaranteed to work from LONG_MIN to LONG_MAX.
9597    _AC_COMPUTE_INT([~(size_t)0 / 10], res_hi,
9598      [#include <stddef.h>], result=?)
9599    _AC_COMPUTE_INT([~(size_t)0 % 10], res_lo,
9600      [#include <stddef.h>], result=?)
9601    _AC_COMPUTE_INT([sizeof (size_t) <= sizeof (unsigned int)], fits_in_uint,
9602      [#include <stddef.h>], result=?)
9603    if test "$fits_in_uint" = 1; then
9604      dnl Even though SIZE_MAX fits in an unsigned int, it must be of type
9605      dnl 'unsigned long' if the type 'size_t' is the same as 'unsigned long'.
9606      AC_TRY_COMPILE([#include <stddef.h>
9607        extern size_t foo;
9608        extern unsigned long foo;
9609        ], [], fits_in_uint=0)
9610    fi
9611    if test -z "$result"; then
9612      if test "$fits_in_uint" = 1; then
9613        result="$res_hi$res_lo"U
9614      else
9615        result="$res_hi$res_lo"UL
9616      fi
9617    else
9618      dnl Shouldn't happen, but who knows...
9619      result='~(size_t)0'
9620    fi
9621  fi
9622  AC_MSG_RESULT([$result])
9623  if test "$result" != yes; then
9624    AC_DEFINE_UNQUOTED([SIZE_MAX], [$result],
9625      [Define as the maximum value of type 'size_t', if the system doesn't define it.])
9626  fi
9627])
9628
9629# codeset.m4 serial AM1 (gettext-0.10.40)
9630dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
9631dnl This file is free software; the Free Software Foundation
9632dnl gives unlimited permission to copy and/or distribute it,
9633dnl with or without modifications, as long as this notice is preserved.
9634
9635dnl From Bruno Haible.
9636
9637AC_DEFUN([AM_LANGINFO_CODESET],
9638[
9639  AC_CACHE_CHECK([for nl_langinfo and CODESET], am_cv_langinfo_codeset,
9640    [AC_TRY_LINK([#include <langinfo.h>],
9641      [char* cs = nl_langinfo(CODESET);],
9642      am_cv_langinfo_codeset=yes,
9643      am_cv_langinfo_codeset=no)
9644    ])
9645  if test $am_cv_langinfo_codeset = yes; then
9646    AC_DEFINE(HAVE_LANGINFO_CODESET, 1,
9647      [Define if you have <langinfo.h> and nl_langinfo(CODESET).])
9648  fi
9649])
9650
9651# lcmessage.m4 serial 4 (gettext-0.14.2)
9652dnl Copyright (C) 1995-2002, 2004-2005 Free Software Foundation, Inc.
9653dnl This file is free software; the Free Software Foundation
9654dnl gives unlimited permission to copy and/or distribute it,
9655dnl with or without modifications, as long as this notice is preserved.
9656dnl
9657dnl This file can can be used in projects which are not available under
9658dnl the GNU General Public License or the GNU Library General Public
9659dnl License but which still want to provide support for the GNU gettext
9660dnl functionality.
9661dnl Please note that the actual code of the GNU gettext library is covered
9662dnl by the GNU Library General Public License, and the rest of the GNU
9663dnl gettext package package is covered by the GNU General Public License.
9664dnl They are *not* in the public domain.
9665
9666dnl Authors:
9667dnl   Ulrich Drepper <drepper@cygnus.com>, 1995.
9668
9669# Check whether LC_MESSAGES is available in <locale.h>.
9670
9671AC_DEFUN([gt_LC_MESSAGES],
9672[
9673  AC_CACHE_CHECK([for LC_MESSAGES], gt_cv_val_LC_MESSAGES,
9674    [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
9675       gt_cv_val_LC_MESSAGES=yes, gt_cv_val_LC_MESSAGES=no)])
9676  if test $gt_cv_val_LC_MESSAGES = yes; then
9677    AC_DEFINE(HAVE_LC_MESSAGES, 1,
9678      [Define if your <locale.h> file defines LC_MESSAGES.])
9679  fi
9680])
9681
9682# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
9683#
9684# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
9685#
9686# This program is free software; you can redistribute it and/or modify
9687# it under the terms of the GNU General Public License as published by
9688# the Free Software Foundation; either version 2 of the License, or
9689# (at your option) any later version.
9690#
9691# This program is distributed in the hope that it will be useful, but
9692# WITHOUT ANY WARRANTY; without even the implied warranty of
9693# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
9694# General Public License for more details.
9695#
9696# You should have received a copy of the GNU General Public License
9697# along with this program; if not, write to the Free Software
9698# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
9699#
9700# As a special exception to the GNU General Public License, if you
9701# distribute this file as part of a program that contains a
9702# configuration script generated by Autoconf, you may include it under
9703# the same distribution terms that you use for the rest of that program.
9704
9705# PKG_PROG_PKG_CONFIG([MIN-VERSION])
9706# ----------------------------------
9707AC_DEFUN([PKG_PROG_PKG_CONFIG],
9708[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
9709m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
9710AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
9711if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9712	AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
9713fi
9714if test -n "$PKG_CONFIG"; then
9715	_pkg_min_version=m4_default([$1], [0.9.0])
9716	AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
9717	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
9718		AC_MSG_RESULT([yes])
9719	else
9720		AC_MSG_RESULT([no])
9721		PKG_CONFIG=""
9722	fi
9723
9724fi[]dnl
9725])# PKG_PROG_PKG_CONFIG
9726
9727# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
9728#
9729# Check to see whether a particular set of modules exists.  Similar
9730# to PKG_CHECK_MODULES(), but does not set variables or print errors.
9731#
9732#
9733# Similar to PKG_CHECK_MODULES, make sure that the first instance of
9734# this or PKG_CHECK_MODULES is called, or make sure to call
9735# PKG_CHECK_EXISTS manually
9736# --------------------------------------------------------------
9737AC_DEFUN([PKG_CHECK_EXISTS],
9738[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
9739if test -n "$PKG_CONFIG" && \
9740    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
9741  m4_ifval([$2], [$2], [:])
9742m4_ifvaln([$3], [else
9743  $3])dnl
9744fi])
9745
9746
9747# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
9748# ---------------------------------------------
9749m4_define([_PKG_CONFIG],
9750[if test -n "$PKG_CONFIG"; then
9751    if test -n "$$1"; then
9752        pkg_cv_[]$1="$$1"
9753    else
9754        PKG_CHECK_EXISTS([$3],
9755                         [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
9756			 [pkg_failed=yes])
9757    fi
9758else
9759	pkg_failed=untried
9760fi[]dnl
9761])# _PKG_CONFIG
9762
9763# _PKG_SHORT_ERRORS_SUPPORTED
9764# -----------------------------
9765AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
9766[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
9767if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
9768        _pkg_short_errors_supported=yes
9769else
9770        _pkg_short_errors_supported=no
9771fi[]dnl
9772])# _PKG_SHORT_ERRORS_SUPPORTED
9773
9774
9775# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
9776# [ACTION-IF-NOT-FOUND])
9777#
9778#
9779# Note that if there is a possibility the first call to
9780# PKG_CHECK_MODULES might not happen, you should be sure to include an
9781# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
9782#
9783#
9784# --------------------------------------------------------------
9785AC_DEFUN([PKG_CHECK_MODULES],
9786[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
9787AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
9788AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
9789
9790pkg_failed=no
9791AC_MSG_CHECKING([for $1])
9792
9793_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
9794_PKG_CONFIG([$1][_LIBS], [libs], [$2])
9795
9796m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
9797and $1[]_LIBS to avoid the need to call pkg-config.
9798See the pkg-config man page for more details.])
9799
9800if test $pkg_failed = yes; then
9801        _PKG_SHORT_ERRORS_SUPPORTED
9802        if test $_pkg_short_errors_supported = yes; then
9803	        $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"`
9804        else
9805	        $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
9806        fi
9807	# Put the nasty error message in config.log where it belongs
9808	echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
9809
9810	ifelse([$4], , [AC_MSG_ERROR(dnl
9811[Package requirements ($2) were not met:
9812
9813$$1_PKG_ERRORS
9814
9815Consider adjusting the PKG_CONFIG_PATH environment variable if you
9816installed software in a non-standard prefix.
9817
9818_PKG_TEXT
9819])],
9820		[$4])
9821elif test $pkg_failed = untried; then
9822	ifelse([$4], , [AC_MSG_FAILURE(dnl
9823[The pkg-config script could not be found or is too old.  Make sure it
9824is in your PATH or set the PKG_CONFIG environment variable to the full
9825path to pkg-config.
9826
9827_PKG_TEXT
9828
9829To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.])],
9830		[$4])
9831else
9832	$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
9833	$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
9834        AC_MSG_RESULT([yes])
9835	ifelse([$3], , :, [$3])
9836fi[]dnl
9837])# PKG_CHECK_MODULES
9838
9839