l10n: Updated Russian (ru) translation to 100%
[maepad.git] / aclocal.m4
blobc03dd310283174eefcd12bb4d2dfbf4e636918c5
1 # generated automatically by aclocal 1.7.9 -*- Autoconf -*-
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.
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.
14 # Do all the work for Automake.                            -*- Autoconf -*-
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.
19 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
20 # Free Software Foundation, Inc.
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.
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.
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.
37 # serial 10
39 AC_PREREQ([2.54])
41 # Autoconf 2.50 wants to disallow AM_ names.  We explicitly allow
42 # the ones we care about.
43 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
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.
56 AC_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
60 if 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])
65 # test whether we have cygpath
66 if 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
73 AC_SUBST([CYGPATH_W])
75 # Define the identity of the package.
76 dnl Distinguish between old-style and new-style calls.
77 m4_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
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
89 # Some tools Automake needs.
90 AC_REQUIRE([AM_SANITY_CHECK])dnl
91 AC_REQUIRE([AC_ARG_PROGRAM])dnl
92 AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
93 AM_MISSING_PROG(AUTOCONF, autoconf)
94 AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
95 AM_MISSING_PROG(AUTOHEADER, autoheader)
96 AM_MISSING_PROG(MAKEINFO, makeinfo)
97 AM_MISSING_PROG(AMTAR, tar)
98 AM_PROG_INSTALL_SH
99 AM_PROG_INSTALL_STRIP
100 # We need awk for the "check" target.  The system "awk" is bad on
101 # some platforms.
102 AC_REQUIRE([AC_PROG_AWK])dnl
103 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
104 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
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
111 AC_PROVIDE_IFELSE([AC_PROG_CXX],
112                   [_AM_DEPENDENCIES(CXX)],
113                   [define([AC_PROG_CXX],
114                           defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
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.
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.
126 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
127 [# Compute $1's index in $config_headers.
128 _am_stamp_count=1
129 for _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
136 done
137 echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
139 # Copyright 2002  Free Software Foundation, Inc.
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.
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.
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
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.
159 AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.7"])
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.
165 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
166          [AM_AUTOMAKE_VERSION([1.7.9])])
168 # Helper functions for option handling.                    -*- Autoconf -*-
170 # Copyright 2001, 2002  Free Software Foundation, Inc.
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.
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.
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.
187 # serial 2
189 # _AM_MANGLE_OPTION(NAME)
190 # -----------------------
191 AC_DEFUN([_AM_MANGLE_OPTION],
192 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
194 # _AM_SET_OPTION(NAME)
195 # ------------------------------
196 # Set option NAME.  Presently that only means defining a flag for this option.
197 AC_DEFUN([_AM_SET_OPTION],
198 [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
200 # _AM_SET_OPTIONS(OPTIONS)
201 # ----------------------------------
202 # OPTIONS is a space-separated list of Automake options.
203 AC_DEFUN([_AM_SET_OPTIONS],
204 [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
206 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
207 # -------------------------------------------
208 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
209 AC_DEFUN([_AM_IF_OPTION],
210 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
213 # Check to make sure that the build environment is sane.
216 # Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
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.
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.
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.
233 # serial 3
235 # AM_SANITY_CHECK
236 # ---------------
237 AC_DEFUN([AM_SANITY_CHECK],
238 [AC_MSG_CHECKING([whether build environment is sane])
239 # Just in case
240 sleep 1
241 echo 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).
247 if (
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
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
262 alias in your environment])
263    fi
265    test "$[2]" = conftest.file
266    )
267 then
268    # Ok.
269    :
270 else
271    AC_MSG_ERROR([newly created file is older than distributed files!
272 Check your system clock])
274 AC_MSG_RESULT(yes)])
276 #  -*- Autoconf -*-
279 # Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
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.
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.
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.
296 # serial 3
298 # AM_MISSING_PROG(NAME, PROGRAM)
299 # ------------------------------
300 AC_DEFUN([AM_MISSING_PROG],
301 [AC_REQUIRE([AM_MISSING_HAS_RUN])
302 $1=${$1-"${am_missing_run}$2"}
303 AC_SUBST($1)])
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.
310 AC_DEFUN([AM_MISSING_HAS_RUN],
311 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
312 test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
313 # Use eval to expand $SHELL
314 if eval "$MISSING --run true"; then
315   am_missing_run="$MISSING --run "
316 else
317   am_missing_run=
318   AC_MSG_WARN([`missing' script is too old or missing])
322 # AM_AUX_DIR_EXPAND
324 # Copyright 2001 Free Software Foundation, Inc.
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.
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.
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.
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/../..'.
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.
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
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.
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.
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.
379 # Rely on autoconf to set up CDPATH properly.
380 AC_PREREQ([2.50])
382 AC_DEFUN([AM_AUX_DIR_EXPAND], [
383 # expand $ac_aux_dir to an absolute path
384 am_aux_dir=`cd $ac_aux_dir && pwd`
387 # AM_PROG_INSTALL_SH
388 # ------------------
389 # Define $install_sh.
391 # Copyright 2001 Free Software Foundation, Inc.
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.
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.
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.
408 AC_DEFUN([AM_PROG_INSTALL_SH],
409 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
410 install_sh=${install_sh-"$am_aux_dir/install-sh"}
411 AC_SUBST(install_sh)])
413 # AM_PROG_INSTALL_STRIP
415 # Copyright 2001 Free Software Foundation, Inc.
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.
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.
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.
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).
439 AC_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.
445 dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
446 if test "$cross_compiling" != no; then
447   AC_CHECK_TOOL([STRIP], [strip], :)
449 INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
450 AC_SUBST([INSTALL_STRIP_PROGRAM])])
452 #                                                          -*- Autoconf -*-
453 # Copyright (C) 2003  Free Software Foundation, Inc.
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.
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.
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.
470 # serial 1
472 # Check whether the underlying file-system supports filenames
473 # with a leading dot.  For instance MS-DOS doesn't.
474 AC_DEFUN([AM_SET_LEADING_DOT],
475 [rm -rf .tst 2>/dev/null
476 mkdir .tst 2>/dev/null
477 if test -d .tst; then
478   am__leading_dot=.
479 else
480   am__leading_dot=_
482 rmdir .tst 2>/dev/null
483 AC_SUBST([am__leading_dot])])
485 # serial 5                                              -*- Autoconf -*-
487 # Copyright (C) 1999, 2000, 2001, 2002, 2003  Free Software Foundation, Inc.
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.
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.
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.
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...
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.
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.
523 AC_DEFUN([_AM_DEPENDENCIES],
524 [AC_REQUIRE([AM_SET_DEPDIR])dnl
525 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
526 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
527 AC_REQUIRE([AM_DEP_TRACK])dnl
529 ifelse([$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=])
535 AC_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
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
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
608   cd ..
609   rm -rf conftest.dir
610 else
611   am_cv_$1_dependencies_compiler_type=none
614 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
615 AM_CONDITIONAL([am__fastdep$1], [
616   test "x$enable_dependency_tracking" != xno \
617   && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
621 # AM_SET_DEPDIR
622 # -------------
623 # Choose a directory name for dependency files.
624 # This macro is AC_REQUIREd in _AM_DEPENDENCIES
625 AC_DEFUN([AM_SET_DEPDIR],
626 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
627 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
631 # AM_DEP_TRACK
632 # ------------
633 AC_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])
637 if test "x$enable_dependency_tracking" != xno; then
638   am_depcomp="$ac_aux_dir/depcomp"
639   AMDEPBACKSLASH='\'
641 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
642 AC_SUBST([AMDEPBACKSLASH])
645 # Generate code to set up dependency tracking.   -*- Autoconf -*-
647 # Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
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.
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.
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.
664 #serial 2
666 # _AM_OUTPUT_DEPENDENCY_COMMANDS
667 # ------------------------------
668 AC_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
712 done
713 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
716 # AM_OUTPUT_DEPENDENCY_COMMANDS
717 # -----------------------------
718 # This macro should only be invoked once -- use via AC_REQUIRE.
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.
723 AC_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"])
729 # Check to see how 'make' treats includes.      -*- Autoconf -*-
731 # Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
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.
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.
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.
748 # serial 2
750 # AM_MAKE_INCLUDE()
751 # -----------------
752 # Check to see how make treats includes.
753 AC_DEFUN([AM_MAKE_INCLUDE],
754 [am_make=${MAKE-make}
755 cat > confinc << 'END'
756 am__doit:
757         @echo done
758 .PHONY: am__doit
760 # If we don't find an include directive, just comment out the code.
761 AC_MSG_CHECKING([for style of include used by $am_make])
762 am__include="#"
763 am__quote=
764 _am_result=none
765 # First try GNU make style include.
766 echo "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'.
772 if 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
777 # Now try BSD make style include.
778 if 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
786 AC_SUBST([am__include])
787 AC_SUBST([am__quote])
788 AC_MSG_RESULT([$_am_result])
789 rm -f confinc confmf
792 # AM_CONDITIONAL                                              -*- Autoconf -*-
794 # Copyright 1997, 2000, 2001 Free Software Foundation, Inc.
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.
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.
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.
811 # serial 5
813 AC_PREREQ(2.52)
815 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
816 # -------------------------------------
817 # Define a conditional.
818 AC_DEFUN([AM_CONDITIONAL],
819 [ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
820         [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
821 AC_SUBST([$1_TRUE])
822 AC_SUBST([$1_FALSE])
823 if $2; then
824   $1_TRUE=
825   $1_FALSE='#'
826 else
827   $1_TRUE='#'
828   $1_FALSE=
830 AC_CONFIG_COMMANDS_PRE(
831 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
832   AC_MSG_ERROR([conditional "$1" was never defined.
833 Usually this means the macro was only invoked conditionally.])
834 fi])])
836 # Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*-
838 # Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
840 # This program is free software; you can redistribute it and/or modify
841 # it under the terms of the GNU General Public License as published by
842 # the Free Software Foundation; either version 2, or (at your option)
843 # any later version.
845 # This program is distributed in the hope that it will be useful,
846 # but WITHOUT ANY WARRANTY; without even the implied warranty of
847 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
848 # GNU General Public License for more details.
850 # You should have received a copy of the GNU General Public License
851 # along with this program; if not, write to the Free Software
852 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
853 # 02111-1307, USA.
855 AC_PREREQ([2.52])
857 # serial 6
859 # AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
860 AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
862 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
864 # serial 52 AC_PROG_LIBTOOL
867 # AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
868 # -----------------------------------------------------------
869 # If this macro is not defined by Autoconf, define it here.
870 m4_ifdef([AC_PROVIDE_IFELSE],
871          [],
872          [m4_define([AC_PROVIDE_IFELSE],
873                  [m4_ifdef([AC_PROVIDE_$1],
874                            [$2], [$3])])])
877 # AC_PROG_LIBTOOL
878 # ---------------
879 AC_DEFUN([AC_PROG_LIBTOOL],
880 [AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
881 dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
882 dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
883   AC_PROVIDE_IFELSE([AC_PROG_CXX],
884     [AC_LIBTOOL_CXX],
885     [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
886   ])])
887 dnl And a similar setup for Fortran 77 support
888   AC_PROVIDE_IFELSE([AC_PROG_F77],
889     [AC_LIBTOOL_F77],
890     [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
891 ])])
893 dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
894 dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
895 dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
896   AC_PROVIDE_IFELSE([AC_PROG_GCJ],
897     [AC_LIBTOOL_GCJ],
898     [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
899       [AC_LIBTOOL_GCJ],
900       [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
901         [AC_LIBTOOL_GCJ],
902       [ifdef([AC_PROG_GCJ],
903              [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
904        ifdef([A][M_PROG_GCJ],
905              [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
906        ifdef([LT_AC_PROG_GCJ],
907              [define([LT_AC_PROG_GCJ],
908                 defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
909 ])])# AC_PROG_LIBTOOL
912 # _AC_PROG_LIBTOOL
913 # ----------------
914 AC_DEFUN([_AC_PROG_LIBTOOL],
915 [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
916 AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
917 AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
918 AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
920 # This can be used to rebuild libtool when needed
921 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
923 # Always use our own libtool.
924 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
925 AC_SUBST(LIBTOOL)dnl
927 # Prevent multiple expansion
928 define([AC_PROG_LIBTOOL], [])
929 ])# _AC_PROG_LIBTOOL
932 # AC_LIBTOOL_SETUP
933 # ----------------
934 AC_DEFUN([AC_LIBTOOL_SETUP],
935 [AC_PREREQ(2.50)dnl
936 AC_REQUIRE([AC_ENABLE_SHARED])dnl
937 AC_REQUIRE([AC_ENABLE_STATIC])dnl
938 AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
939 AC_REQUIRE([AC_CANONICAL_HOST])dnl
940 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
941 AC_REQUIRE([AC_PROG_CC])dnl
942 AC_REQUIRE([AC_PROG_LD])dnl
943 AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
944 AC_REQUIRE([AC_PROG_NM])dnl
946 AC_REQUIRE([AC_PROG_LN_S])dnl
947 AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
948 # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
949 AC_REQUIRE([AC_OBJEXT])dnl
950 AC_REQUIRE([AC_EXEEXT])dnl
952 AC_LIBTOOL_SYS_MAX_CMD_LEN
953 AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
954 AC_LIBTOOL_OBJDIR
956 AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
957 _LT_AC_PROG_ECHO_BACKSLASH
959 case $host_os in
960 aix3*)
961   # AIX sometimes has problems with the GCC collect2 program.  For some
962   # reason, if we set the COLLECT_NAMES environment variable, the problems
963   # vanish in a puff of smoke.
964   if test "X${COLLECT_NAMES+set}" != Xset; then
965     COLLECT_NAMES=
966     export COLLECT_NAMES
967   fi
968   ;;
969 esac
971 # Sed substitution that helps us do robust quoting.  It backslashifies
972 # metacharacters that are still active within double-quoted strings.
973 Xsed='sed -e 1s/^X//'
974 [sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
976 # Same as above, but do not quote variable references.
977 [double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
979 # Sed substitution to delay expansion of an escaped shell variable in a
980 # double_quote_subst'ed string.
981 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
983 # Sed substitution to avoid accidental globbing in evaled expressions
984 no_glob_subst='s/\*/\\\*/g'
986 # Constants:
987 rm="rm -f"
989 # Global variables:
990 default_ofile=libtool
991 can_build_shared=yes
993 # All known linkers require a `.a' archive for static linking (except MSVC,
994 # which needs '.lib').
995 libext=a
996 ltmain="$ac_aux_dir/ltmain.sh"
997 ofile="$default_ofile"
998 with_gnu_ld="$lt_cv_prog_gnu_ld"
1000 AC_CHECK_TOOL(AR, ar, false)
1001 AC_CHECK_TOOL(RANLIB, ranlib, :)
1002 AC_CHECK_TOOL(STRIP, strip, :)
1004 old_CC="$CC"
1005 old_CFLAGS="$CFLAGS"
1007 # Set sane defaults for various variables
1008 test -z "$AR" && AR=ar
1009 test -z "$AR_FLAGS" && AR_FLAGS=cru
1010 test -z "$AS" && AS=as
1011 test -z "$CC" && CC=cc
1012 test -z "$LTCC" && LTCC=$CC
1013 test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
1014 test -z "$DLLTOOL" && DLLTOOL=dlltool
1015 test -z "$LD" && LD=ld
1016 test -z "$LN_S" && LN_S="ln -s"
1017 test -z "$MAGIC_CMD" && MAGIC_CMD=file
1018 test -z "$NM" && NM=nm
1019 test -z "$SED" && SED=sed
1020 test -z "$OBJDUMP" && OBJDUMP=objdump
1021 test -z "$RANLIB" && RANLIB=:
1022 test -z "$STRIP" && STRIP=:
1023 test -z "$ac_objext" && ac_objext=o
1025 # Determine commands to create old-style static archives.
1026 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
1027 old_postinstall_cmds='chmod 644 $oldlib'
1028 old_postuninstall_cmds=
1030 if test -n "$RANLIB"; then
1031   case $host_os in
1032   openbsd*)
1033     old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
1034     ;;
1035   *)
1036     old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
1037     ;;
1038   esac
1039   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
1042 _LT_CC_BASENAME([$compiler])
1044 # Only perform the check for file, if the check method requires it
1045 case $deplibs_check_method in
1046 file_magic*)
1047   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
1048     AC_PATH_MAGIC
1049   fi
1050   ;;
1051 esac
1053 _LT_REQUIRED_DARWIN_CHECKS
1055 AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
1056 AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
1057 enable_win32_dll=yes, enable_win32_dll=no)
1059 AC_ARG_ENABLE([libtool-lock],
1060     [AC_HELP_STRING([--disable-libtool-lock],
1061         [avoid locking (might break parallel builds)])])
1062 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
1064 AC_ARG_WITH([pic],
1065     [AC_HELP_STRING([--with-pic],
1066         [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
1067     [pic_mode="$withval"],
1068     [pic_mode=default])
1069 test -z "$pic_mode" && pic_mode=default
1071 # Use C for the default configuration in the libtool script
1072 tagname=
1073 AC_LIBTOOL_LANG_C_CONFIG
1074 _LT_AC_TAGCONFIG
1075 ])# AC_LIBTOOL_SETUP
1078 # _LT_AC_SYS_COMPILER
1079 # -------------------
1080 AC_DEFUN([_LT_AC_SYS_COMPILER],
1081 [AC_REQUIRE([AC_PROG_CC])dnl
1083 # If no C compiler was specified, use CC.
1084 LTCC=${LTCC-"$CC"}
1086 # If no C compiler flags were specified, use CFLAGS.
1087 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
1089 # Allow CC to be a program name with arguments.
1090 compiler=$CC
1091 ])# _LT_AC_SYS_COMPILER
1094 # _LT_CC_BASENAME(CC)
1095 # -------------------
1096 # Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
1097 AC_DEFUN([_LT_CC_BASENAME],
1098 [for cc_temp in $1""; do
1099   case $cc_temp in
1100     compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
1101     distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
1102     \-*) ;;
1103     *) break;;
1104   esac
1105 done
1106 cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
1110 # _LT_COMPILER_BOILERPLATE
1111 # ------------------------
1112 # Check for compiler boilerplate output or warnings with
1113 # the simple compiler test code.
1114 AC_DEFUN([_LT_COMPILER_BOILERPLATE],
1115 [AC_REQUIRE([LT_AC_PROG_SED])dnl
1116 ac_outfile=conftest.$ac_objext
1117 echo "$lt_simple_compile_test_code" >conftest.$ac_ext
1118 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
1119 _lt_compiler_boilerplate=`cat conftest.err`
1120 $rm conftest*
1121 ])# _LT_COMPILER_BOILERPLATE
1124 # _LT_LINKER_BOILERPLATE
1125 # ----------------------
1126 # Check for linker boilerplate output or warnings with
1127 # the simple link test code.
1128 AC_DEFUN([_LT_LINKER_BOILERPLATE],
1129 [AC_REQUIRE([LT_AC_PROG_SED])dnl
1130 ac_outfile=conftest.$ac_objext
1131 echo "$lt_simple_link_test_code" >conftest.$ac_ext
1132 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
1133 _lt_linker_boilerplate=`cat conftest.err`
1134 $rm -r conftest*
1135 ])# _LT_LINKER_BOILERPLATE
1137 # _LT_REQUIRED_DARWIN_CHECKS
1138 # --------------------------
1139 # Check for some things on darwin
1140 AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS],[
1141   case $host_os in
1142     rhapsody* | darwin*)
1143     AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
1144     AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
1146     AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
1147       [lt_cv_apple_cc_single_mod=no
1148       if test -z "${LT_MULTI_MODULE}"; then
1149    # By default we will add the -single_module flag. You can override
1150    # by either setting the environment variable LT_MULTI_MODULE
1151    # non-empty at configure time, or by adding -multi_module to the
1152    # link flags.
1153    echo "int foo(void){return 1;}" > conftest.c
1154    $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
1155      -dynamiclib ${wl}-single_module conftest.c
1156    if test -f libconftest.dylib; then
1157      lt_cv_apple_cc_single_mod=yes
1158      rm -rf libconftest.dylib*
1159    fi
1160    rm conftest.c
1161       fi])
1162     AC_CACHE_CHECK([for -exported_symbols_list linker flag],
1163       [lt_cv_ld_exported_symbols_list],
1164       [lt_cv_ld_exported_symbols_list=no
1165       save_LDFLAGS=$LDFLAGS
1166       echo "_main" > conftest.sym
1167       LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
1168       AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
1169    [lt_cv_ld_exported_symbols_list=yes],
1170    [lt_cv_ld_exported_symbols_list=no])
1171    LDFLAGS="$save_LDFLAGS"
1172     ])
1173     case $host_os in
1174     rhapsody* | darwin1.[[0123]])
1175       _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
1176     darwin1.*)
1177      _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
1178     darwin*)
1179       # if running on 10.5 or later, the deployment target defaults
1180       # to the OS version, if on x86, and 10.4, the deployment
1181       # target defaults to 10.4. Don't you love it?
1182       case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
1183    10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
1184      _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
1185    10.[[012]]*)
1186      _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
1187    10.*)
1188      _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
1189       esac
1190     ;;
1191   esac
1192     if test "$lt_cv_apple_cc_single_mod" = "yes"; then
1193       _lt_dar_single_mod='$single_module'
1194     fi
1195     if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
1196       _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
1197     else
1198       _lt_dar_export_syms="~$NMEDIT -s \$output_objdir/\${libname}-symbols.expsym \${lib}"
1199     fi
1200     if test "$DSYMUTIL" != ":"; then
1201       _lt_dsymutil="~$DSYMUTIL \$lib || :"
1202     else
1203       _lt_dsymutil=
1204     fi
1205     ;;
1206   esac
1209 # _LT_AC_SYS_LIBPATH_AIX
1210 # ----------------------
1211 # Links a minimal program and checks the executable
1212 # for the system default hardcoded library path. In most cases,
1213 # this is /usr/lib:/lib, but when the MPI compilers are used
1214 # the location of the communication and MPI libs are included too.
1215 # If we don't find anything, use the default library path according
1216 # to the aix ld manual.
1217 AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
1218 [AC_REQUIRE([LT_AC_PROG_SED])dnl
1219 AC_LINK_IFELSE(AC_LANG_PROGRAM,[
1220 lt_aix_libpath_sed='
1221     /Import File Strings/,/^$/ {
1222         /^0/ {
1223             s/^0  *\(.*\)$/\1/
1224             p
1225         }
1226     }'
1227 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1228 # Check for a 64-bit object if we didn't find anything.
1229 if test -z "$aix_libpath"; then
1230   aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1231 fi],[])
1232 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
1233 ])# _LT_AC_SYS_LIBPATH_AIX
1236 # _LT_AC_SHELL_INIT(ARG)
1237 # ----------------------
1238 AC_DEFUN([_LT_AC_SHELL_INIT],
1239 [ifdef([AC_DIVERSION_NOTICE],
1240              [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
1241          [AC_DIVERT_PUSH(NOTICE)])
1243 AC_DIVERT_POP
1244 ])# _LT_AC_SHELL_INIT
1247 # _LT_AC_PROG_ECHO_BACKSLASH
1248 # --------------------------
1249 # Add some code to the start of the generated configure script which
1250 # will find an echo command which doesn't interpret backslashes.
1251 AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
1252 [_LT_AC_SHELL_INIT([
1253 # Check that we are running under the correct shell.
1254 SHELL=${CONFIG_SHELL-/bin/sh}
1256 case X$ECHO in
1257 X*--fallback-echo)
1258   # Remove one level of quotation (which was required for Make).
1259   ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
1260   ;;
1261 esac
1263 echo=${ECHO-echo}
1264 if test "X[$]1" = X--no-reexec; then
1265   # Discard the --no-reexec flag, and continue.
1266   shift
1267 elif test "X[$]1" = X--fallback-echo; then
1268   # Avoid inline document here, it may be left over
1269   :
1270 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
1271   # Yippee, $echo works!
1272   :
1273 else
1274   # Restart under the correct shell.
1275   exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
1278 if test "X[$]1" = X--fallback-echo; then
1279   # used as fallback echo
1280   shift
1281   cat <<EOF
1282 [$]*
1284   exit 0
1287 # The HP-UX ksh and POSIX shell print the target directory to stdout
1288 # if CDPATH is set.
1289 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
1291 if test -z "$ECHO"; then
1292 if test "X${echo_test_string+set}" != Xset; then
1293 # find a string as large as possible, as long as the shell can cope with it
1294   for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
1295     # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
1296     if (echo_test_string=`eval $cmd`) 2>/dev/null &&
1297        echo_test_string=`eval $cmd` &&
1298        (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
1299     then
1300       break
1301     fi
1302   done
1305 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
1306    echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
1307    test "X$echo_testing_string" = "X$echo_test_string"; then
1308   :
1309 else
1310   # The Solaris, AIX, and Digital Unix default echo programs unquote
1311   # backslashes.  This makes it impossible to quote backslashes using
1312   #   echo "$something" | sed 's/\\/\\\\/g'
1313   #
1314   # So, first we look for a working echo in the user's PATH.
1316   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
1317   for dir in $PATH /usr/ucb; do
1318     IFS="$lt_save_ifs"
1319     if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
1320        test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
1321        echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
1322        test "X$echo_testing_string" = "X$echo_test_string"; then
1323       echo="$dir/echo"
1324       break
1325     fi
1326   done
1327   IFS="$lt_save_ifs"
1329   if test "X$echo" = Xecho; then
1330     # We didn't find a better echo, so look for alternatives.
1331     if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
1332        echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
1333        test "X$echo_testing_string" = "X$echo_test_string"; then
1334       # This shell has a builtin print -r that does the trick.
1335       echo='print -r'
1336     elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
1337          test "X$CONFIG_SHELL" != X/bin/ksh; then
1338       # If we have ksh, try running configure again with it.
1339       ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
1340       export ORIGINAL_CONFIG_SHELL
1341       CONFIG_SHELL=/bin/ksh
1342       export CONFIG_SHELL
1343       exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
1344     else
1345       # Try using printf.
1346       echo='printf %s\n'
1347       if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
1348          echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
1349          test "X$echo_testing_string" = "X$echo_test_string"; then
1350         # Cool, printf works
1351         :
1352       elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1353            test "X$echo_testing_string" = 'X\t' &&
1354            echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1355            test "X$echo_testing_string" = "X$echo_test_string"; then
1356         CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
1357         export CONFIG_SHELL
1358         SHELL="$CONFIG_SHELL"
1359         export SHELL
1360         echo="$CONFIG_SHELL [$]0 --fallback-echo"
1361       elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1362            test "X$echo_testing_string" = 'X\t' &&
1363            echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1364            test "X$echo_testing_string" = "X$echo_test_string"; then
1365         echo="$CONFIG_SHELL [$]0 --fallback-echo"
1366       else
1367         # maybe with a smaller string...
1368         prev=:
1370         for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
1371           if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
1372           then
1373             break
1374           fi
1375           prev="$cmd"
1376         done
1378         if test "$prev" != 'sed 50q "[$]0"'; then
1379           echo_test_string=`eval $prev`
1380           export echo_test_string
1381           exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
1382         else
1383           # Oops.  We lost completely, so just stick with echo.
1384           echo=echo
1385         fi
1386       fi
1387     fi
1388   fi
1392 # Copy echo and quote the copy suitably for passing to libtool from
1393 # the Makefile, instead of quoting the original, which is used later.
1394 ECHO=$echo
1395 if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
1396    ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
1399 AC_SUBST(ECHO)
1400 ])])# _LT_AC_PROG_ECHO_BACKSLASH
1403 # _LT_AC_LOCK
1404 # -----------
1405 AC_DEFUN([_LT_AC_LOCK],
1406 [AC_ARG_ENABLE([libtool-lock],
1407     [AC_HELP_STRING([--disable-libtool-lock],
1408         [avoid locking (might break parallel builds)])])
1409 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
1411 # Some flags need to be propagated to the compiler or linker for good
1412 # libtool support.
1413 case $host in
1414 ia64-*-hpux*)
1415   # Find out which ABI we are using.
1416   echo 'int i;' > conftest.$ac_ext
1417   if AC_TRY_EVAL(ac_compile); then
1418     case `/usr/bin/file conftest.$ac_objext` in
1419     *ELF-32*)
1420       HPUX_IA64_MODE="32"
1421       ;;
1422     *ELF-64*)
1423       HPUX_IA64_MODE="64"
1424       ;;
1425     esac
1426   fi
1427   rm -rf conftest*
1428   ;;
1429 *-*-irix6*)
1430   # Find out which ABI we are using.
1431   echo '[#]line __oline__ "configure"' > conftest.$ac_ext
1432   if AC_TRY_EVAL(ac_compile); then
1433    if test "$lt_cv_prog_gnu_ld" = yes; then
1434     case `/usr/bin/file conftest.$ac_objext` in
1435     *32-bit*)
1436       LD="${LD-ld} -melf32bsmip"
1437       ;;
1438     *N32*)
1439       LD="${LD-ld} -melf32bmipn32"
1440       ;;
1441     *64-bit*)
1442       LD="${LD-ld} -melf64bmip"
1443       ;;
1444     esac
1445    else
1446     case `/usr/bin/file conftest.$ac_objext` in
1447     *32-bit*)
1448       LD="${LD-ld} -32"
1449       ;;
1450     *N32*)
1451       LD="${LD-ld} -n32"
1452       ;;
1453     *64-bit*)
1454       LD="${LD-ld} -64"
1455       ;;
1456     esac
1457    fi
1458   fi
1459   rm -rf conftest*
1460   ;;
1462 x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
1463 s390*-*linux*|sparc*-*linux*)
1464   # Find out which ABI we are using.
1465   echo 'int i;' > conftest.$ac_ext
1466   if AC_TRY_EVAL(ac_compile); then
1467     case `/usr/bin/file conftest.o` in
1468     *32-bit*)
1469       case $host in
1470         x86_64-*kfreebsd*-gnu)
1471           LD="${LD-ld} -m elf_i386_fbsd"
1472           ;;
1473         x86_64-*linux*)
1474           LD="${LD-ld} -m elf_i386"
1475           ;;
1476         ppc64-*linux*|powerpc64-*linux*)
1477           LD="${LD-ld} -m elf32ppclinux"
1478           ;;
1479         s390x-*linux*)
1480           LD="${LD-ld} -m elf_s390"
1481           ;;
1482         sparc64-*linux*)
1483           LD="${LD-ld} -m elf32_sparc"
1484           ;;
1485       esac
1486       ;;
1487     *64-bit*)
1488       case $host in
1489         x86_64-*kfreebsd*-gnu)
1490           LD="${LD-ld} -m elf_x86_64_fbsd"
1491           ;;
1492         x86_64-*linux*)
1493           LD="${LD-ld} -m elf_x86_64"
1494           ;;
1495         ppc*-*linux*|powerpc*-*linux*)
1496           LD="${LD-ld} -m elf64ppc"
1497           ;;
1498         s390*-*linux*)
1499           LD="${LD-ld} -m elf64_s390"
1500           ;;
1501         sparc*-*linux*)
1502           LD="${LD-ld} -m elf64_sparc"
1503           ;;
1504       esac
1505       ;;
1506     esac
1507   fi
1508   rm -rf conftest*
1509   ;;
1511 *-*-sco3.2v5*)
1512   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1513   SAVE_CFLAGS="$CFLAGS"
1514   CFLAGS="$CFLAGS -belf"
1515   AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
1516     [AC_LANG_PUSH(C)
1517      AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
1518      AC_LANG_POP])
1519   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
1520     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1521     CFLAGS="$SAVE_CFLAGS"
1522   fi
1523   ;;
1524 sparc*-*solaris*)
1525   # Find out which ABI we are using.
1526   echo 'int i;' > conftest.$ac_ext
1527   if AC_TRY_EVAL(ac_compile); then
1528     case `/usr/bin/file conftest.o` in
1529     *64-bit*)
1530       case $lt_cv_prog_gnu_ld in
1531       yes*) LD="${LD-ld} -m elf64_sparc" ;;
1532       *)
1533         if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
1534           LD="${LD-ld} -64"
1535         fi
1536         ;;
1537       esac
1538       ;;
1539     esac
1540   fi
1541   rm -rf conftest*
1542   ;;
1544 AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
1545 [*-*-cygwin* | *-*-mingw* | *-*-pw32*)
1546   AC_CHECK_TOOL(DLLTOOL, dlltool, false)
1547   AC_CHECK_TOOL(AS, as, false)
1548   AC_CHECK_TOOL(OBJDUMP, objdump, false)
1549   ;;
1550   ])
1551 esac
1553 need_locks="$enable_libtool_lock"
1555 ])# _LT_AC_LOCK
1558 # AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1559 #               [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
1560 # ----------------------------------------------------------------
1561 # Check whether the given compiler option works
1562 AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
1563 [AC_REQUIRE([LT_AC_PROG_SED])
1564 AC_CACHE_CHECK([$1], [$2],
1565   [$2=no
1566   ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
1567    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
1568    lt_compiler_flag="$3"
1569    # Insert the option either (1) after the last *FLAGS variable, or
1570    # (2) before a word containing "conftest.", or (3) at the end.
1571    # Note that $ac_compile itself does not contain backslashes and begins
1572    # with a dollar sign (not a hyphen), so the echo should work correctly.
1573    # The option is referenced via a variable to avoid confusing sed.
1574    lt_compile=`echo "$ac_compile" | $SED \
1575    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1576    -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1577    -e 's:$: $lt_compiler_flag:'`
1578    (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1579    (eval "$lt_compile" 2>conftest.err)
1580    ac_status=$?
1581    cat conftest.err >&AS_MESSAGE_LOG_FD
1582    echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1583    if (exit $ac_status) && test -s "$ac_outfile"; then
1584      # The compiler can only warn and ignore the option if not recognized
1585      # So say no if there are warnings other than the usual output.
1586      $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
1587      $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1588      if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
1589        $2=yes
1590      fi
1591    fi
1592    $rm conftest*
1595 if test x"[$]$2" = xyes; then
1596     ifelse([$5], , :, [$5])
1597 else
1598     ifelse([$6], , :, [$6])
1600 ])# AC_LIBTOOL_COMPILER_OPTION
1603 # AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1604 #                          [ACTION-SUCCESS], [ACTION-FAILURE])
1605 # ------------------------------------------------------------
1606 # Check whether the given compiler option works
1607 AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
1608 [AC_REQUIRE([LT_AC_PROG_SED])dnl
1609 AC_CACHE_CHECK([$1], [$2],
1610   [$2=no
1611    save_LDFLAGS="$LDFLAGS"
1612    LDFLAGS="$LDFLAGS $3"
1613    echo "$lt_simple_link_test_code" > conftest.$ac_ext
1614    if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
1615      # The linker can only warn and ignore the option if not recognized
1616      # So say no if there are warnings
1617      if test -s conftest.err; then
1618        # Append any errors to the config.log.
1619        cat conftest.err 1>&AS_MESSAGE_LOG_FD
1620        $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
1621        $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1622        if diff conftest.exp conftest.er2 >/dev/null; then
1623          $2=yes
1624        fi
1625      else
1626        $2=yes
1627      fi
1628    fi
1629    $rm -r conftest*
1630    LDFLAGS="$save_LDFLAGS"
1633 if test x"[$]$2" = xyes; then
1634     ifelse([$4], , :, [$4])
1635 else
1636     ifelse([$5], , :, [$5])
1638 ])# AC_LIBTOOL_LINKER_OPTION
1641 # AC_LIBTOOL_SYS_MAX_CMD_LEN
1642 # --------------------------
1643 AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
1644 [# find the maximum length of command line arguments
1645 AC_MSG_CHECKING([the maximum length of command line arguments])
1646 AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
1647   i=0
1648   teststring="ABCD"
1650   case $build_os in
1651   msdosdjgpp*)
1652     # On DJGPP, this test can blow up pretty badly due to problems in libc
1653     # (any single argument exceeding 2000 bytes causes a buffer overrun
1654     # during glob expansion).  Even if it were fixed, the result of this
1655     # check would be larger than it should be.
1656     lt_cv_sys_max_cmd_len=12288;    # 12K is about right
1657     ;;
1659   gnu*)
1660     # Under GNU Hurd, this test is not required because there is
1661     # no limit to the length of command line arguments.
1662     # Libtool will interpret -1 as no limit whatsoever
1663     lt_cv_sys_max_cmd_len=-1;
1664     ;;
1666   cygwin* | mingw*)
1667     # On Win9x/ME, this test blows up -- it succeeds, but takes
1668     # about 5 minutes as the teststring grows exponentially.
1669     # Worse, since 9x/ME are not pre-emptively multitasking,
1670     # you end up with a "frozen" computer, even though with patience
1671     # the test eventually succeeds (with a max line length of 256k).
1672     # Instead, let's just punt: use the minimum linelength reported by
1673     # all of the supported platforms: 8192 (on NT/2K/XP).
1674     lt_cv_sys_max_cmd_len=8192;
1675     ;;
1677   amigaos*)
1678     # On AmigaOS with pdksh, this test takes hours, literally.
1679     # So we just punt and use a minimum line length of 8192.
1680     lt_cv_sys_max_cmd_len=8192;
1681     ;;
1683   netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
1684     # This has been around since 386BSD, at least.  Likely further.
1685     if test -x /sbin/sysctl; then
1686       lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
1687     elif test -x /usr/sbin/sysctl; then
1688       lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
1689     else
1690       lt_cv_sys_max_cmd_len=65536       # usable default for all BSDs
1691     fi
1692     # And add a safety zone
1693     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1694     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
1695     ;;
1697   interix*)
1698     # We know the value 262144 and hardcode it with a safety zone (like BSD)
1699     lt_cv_sys_max_cmd_len=196608
1700     ;;
1702   osf*)
1703     # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
1704     # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
1705     # nice to cause kernel panics so lets avoid the loop below.
1706     # First set a reasonable default.
1707     lt_cv_sys_max_cmd_len=16384
1708     #
1709     if test -x /sbin/sysconfig; then
1710       case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
1711         *1*) lt_cv_sys_max_cmd_len=-1 ;;
1712       esac
1713     fi
1714     ;;
1715   sco3.2v5*)
1716     lt_cv_sys_max_cmd_len=102400
1717     ;;
1718   sysv5* | sco5v6* | sysv4.2uw2*)
1719     kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
1720     if test -n "$kargmax"; then
1721       lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[        ]]//'`
1722     else
1723       lt_cv_sys_max_cmd_len=32768
1724     fi
1725     ;;
1726   *)
1727     lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
1728     if test -n "$lt_cv_sys_max_cmd_len"; then
1729       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1730       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
1731     else
1732       SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
1733       while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
1734                = "XX$teststring") >/dev/null 2>&1 &&
1735               new_result=`expr "X$teststring" : ".*" 2>&1` &&
1736               lt_cv_sys_max_cmd_len=$new_result &&
1737               test $i != 17 # 1/2 MB should be enough
1738       do
1739         i=`expr $i + 1`
1740         teststring=$teststring$teststring
1741       done
1742       teststring=
1743       # Add a significant safety factor because C++ compilers can tack on massive
1744       # amounts of additional arguments before passing them to the linker.
1745       # It appears as though 1/2 is a usable value.
1746       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
1747     fi
1748     ;;
1749   esac
1751 if test -n $lt_cv_sys_max_cmd_len ; then
1752   AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
1753 else
1754   AC_MSG_RESULT(none)
1756 ])# AC_LIBTOOL_SYS_MAX_CMD_LEN
1759 # _LT_AC_CHECK_DLFCN
1760 # ------------------
1761 AC_DEFUN([_LT_AC_CHECK_DLFCN],
1762 [AC_CHECK_HEADERS(dlfcn.h)dnl
1763 ])# _LT_AC_CHECK_DLFCN
1766 # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
1767 #                           ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
1768 # ---------------------------------------------------------------------
1769 AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
1770 [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
1771 if test "$cross_compiling" = yes; then :
1772   [$4]
1773 else
1774   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1775   lt_status=$lt_dlunknown
1776   cat > conftest.$ac_ext <<EOF
1777 [#line __oline__ "configure"
1778 #include "confdefs.h"
1780 #if HAVE_DLFCN_H
1781 #include <dlfcn.h>
1782 #endif
1784 #include <stdio.h>
1786 #ifdef RTLD_GLOBAL
1787 #  define LT_DLGLOBAL           RTLD_GLOBAL
1788 #else
1789 #  ifdef DL_GLOBAL
1790 #    define LT_DLGLOBAL         DL_GLOBAL
1791 #  else
1792 #    define LT_DLGLOBAL         0
1793 #  endif
1794 #endif
1796 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
1797    find out it does not work in some platform. */
1798 #ifndef LT_DLLAZY_OR_NOW
1799 #  ifdef RTLD_LAZY
1800 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
1801 #  else
1802 #    ifdef DL_LAZY
1803 #      define LT_DLLAZY_OR_NOW          DL_LAZY
1804 #    else
1805 #      ifdef RTLD_NOW
1806 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
1807 #      else
1808 #        ifdef DL_NOW
1809 #          define LT_DLLAZY_OR_NOW      DL_NOW
1810 #        else
1811 #          define LT_DLLAZY_OR_NOW      0
1812 #        endif
1813 #      endif
1814 #    endif
1815 #  endif
1816 #endif
1818 #ifdef __cplusplus
1819 extern "C" void exit (int);
1820 #endif
1822 void fnord() { int i=42;}
1823 int main ()
1825   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
1826   int status = $lt_dlunknown;
1828   if (self)
1829     {
1830       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
1831       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
1832       /* dlclose (self); */
1833     }
1834   else
1835     puts (dlerror ());
1837     exit (status);
1840   if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
1841     (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
1842     lt_status=$?
1843     case x$lt_status in
1844       x$lt_dlno_uscore) $1 ;;
1845       x$lt_dlneed_uscore) $2 ;;
1846       x$lt_dlunknown|x*) $3 ;;
1847     esac
1848   else :
1849     # compilation failed
1850     $3
1851   fi
1853 rm -fr conftest*
1854 ])# _LT_AC_TRY_DLOPEN_SELF
1857 # AC_LIBTOOL_DLOPEN_SELF
1858 # ----------------------
1859 AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
1860 [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
1861 if test "x$enable_dlopen" != xyes; then
1862   enable_dlopen=unknown
1863   enable_dlopen_self=unknown
1864   enable_dlopen_self_static=unknown
1865 else
1866   lt_cv_dlopen=no
1867   lt_cv_dlopen_libs=
1869   case $host_os in
1870   beos*)
1871     lt_cv_dlopen="load_add_on"
1872     lt_cv_dlopen_libs=
1873     lt_cv_dlopen_self=yes
1874     ;;
1876   mingw* | pw32*)
1877     lt_cv_dlopen="LoadLibrary"
1878     lt_cv_dlopen_libs=
1879    ;;
1881   cygwin*)
1882     lt_cv_dlopen="dlopen"
1883     lt_cv_dlopen_libs=
1884    ;;
1886   darwin*)
1887   # if libdl is installed we need to link against it
1888     AC_CHECK_LIB([dl], [dlopen],
1889                 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
1890     lt_cv_dlopen="dyld"
1891     lt_cv_dlopen_libs=
1892     lt_cv_dlopen_self=yes
1893     ])
1894    ;;
1896   *)
1897     AC_CHECK_FUNC([shl_load],
1898           [lt_cv_dlopen="shl_load"],
1899       [AC_CHECK_LIB([dld], [shl_load],
1900             [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
1901         [AC_CHECK_FUNC([dlopen],
1902               [lt_cv_dlopen="dlopen"],
1903           [AC_CHECK_LIB([dl], [dlopen],
1904                 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
1905             [AC_CHECK_LIB([svld], [dlopen],
1906                   [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
1907               [AC_CHECK_LIB([dld], [dld_link],
1908                     [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
1909               ])
1910             ])
1911           ])
1912         ])
1913       ])
1914     ;;
1915   esac
1917   if test "x$lt_cv_dlopen" != xno; then
1918     enable_dlopen=yes
1919   else
1920     enable_dlopen=no
1921   fi
1923   case $lt_cv_dlopen in
1924   dlopen)
1925     save_CPPFLAGS="$CPPFLAGS"
1926     test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
1928     save_LDFLAGS="$LDFLAGS"
1929     wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
1931     save_LIBS="$LIBS"
1932     LIBS="$lt_cv_dlopen_libs $LIBS"
1934     AC_CACHE_CHECK([whether a program can dlopen itself],
1935           lt_cv_dlopen_self, [dnl
1936           _LT_AC_TRY_DLOPEN_SELF(
1937             lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
1938             lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
1939     ])
1941     if test "x$lt_cv_dlopen_self" = xyes; then
1942       wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
1943       AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
1944           lt_cv_dlopen_self_static, [dnl
1945           _LT_AC_TRY_DLOPEN_SELF(
1946             lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
1947             lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
1948       ])
1949     fi
1951     CPPFLAGS="$save_CPPFLAGS"
1952     LDFLAGS="$save_LDFLAGS"
1953     LIBS="$save_LIBS"
1954     ;;
1955   esac
1957   case $lt_cv_dlopen_self in
1958   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
1959   *) enable_dlopen_self=unknown ;;
1960   esac
1962   case $lt_cv_dlopen_self_static in
1963   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
1964   *) enable_dlopen_self_static=unknown ;;
1965   esac
1967 ])# AC_LIBTOOL_DLOPEN_SELF
1970 # AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
1971 # ---------------------------------
1972 # Check to see if options -c and -o are simultaneously supported by compiler
1973 AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
1974 [AC_REQUIRE([LT_AC_PROG_SED])dnl
1975 AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
1976 AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
1977   [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
1978   [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
1979    $rm -r conftest 2>/dev/null
1980    mkdir conftest
1981    cd conftest
1982    mkdir out
1983    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
1985    lt_compiler_flag="-o out/conftest2.$ac_objext"
1986    # Insert the option either (1) after the last *FLAGS variable, or
1987    # (2) before a word containing "conftest.", or (3) at the end.
1988    # Note that $ac_compile itself does not contain backslashes and begins
1989    # with a dollar sign (not a hyphen), so the echo should work correctly.
1990    lt_compile=`echo "$ac_compile" | $SED \
1991    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1992    -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1993    -e 's:$: $lt_compiler_flag:'`
1994    (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1995    (eval "$lt_compile" 2>out/conftest.err)
1996    ac_status=$?
1997    cat out/conftest.err >&AS_MESSAGE_LOG_FD
1998    echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1999    if (exit $ac_status) && test -s out/conftest2.$ac_objext
2000    then
2001      # The compiler can only warn and ignore the option if not recognized
2002      # So say no if there are warnings
2003      $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
2004      $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
2005      if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
2006        _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
2007      fi
2008    fi
2009    chmod u+w . 2>&AS_MESSAGE_LOG_FD
2010    $rm conftest*
2011    # SGI C++ compiler will create directory out/ii_files/ for
2012    # template instantiation
2013    test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
2014    $rm out/* && rmdir out
2015    cd ..
2016    rmdir conftest
2017    $rm conftest*
2019 ])# AC_LIBTOOL_PROG_CC_C_O
2022 # AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
2023 # -----------------------------------------
2024 # Check to see if we can do hard links to lock some files if needed
2025 AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
2026 [AC_REQUIRE([_LT_AC_LOCK])dnl
2028 hard_links="nottested"
2029 if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
2030   # do not overwrite the value of need_locks provided by the user
2031   AC_MSG_CHECKING([if we can lock with hard links])
2032   hard_links=yes
2033   $rm conftest*
2034   ln conftest.a conftest.b 2>/dev/null && hard_links=no
2035   touch conftest.a
2036   ln conftest.a conftest.b 2>&5 || hard_links=no
2037   ln conftest.a conftest.b 2>/dev/null && hard_links=no
2038   AC_MSG_RESULT([$hard_links])
2039   if test "$hard_links" = no; then
2040     AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
2041     need_locks=warn
2042   fi
2043 else
2044   need_locks=no
2046 ])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
2049 # AC_LIBTOOL_OBJDIR
2050 # -----------------
2051 AC_DEFUN([AC_LIBTOOL_OBJDIR],
2052 [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
2053 [rm -f .libs 2>/dev/null
2054 mkdir .libs 2>/dev/null
2055 if test -d .libs; then
2056   lt_cv_objdir=.libs
2057 else
2058   # MS-DOS does not allow filenames that begin with a dot.
2059   lt_cv_objdir=_libs
2061 rmdir .libs 2>/dev/null])
2062 objdir=$lt_cv_objdir
2063 ])# AC_LIBTOOL_OBJDIR
2066 # AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
2067 # ----------------------------------------------
2068 # Check hardcoding attributes.
2069 AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
2070 [AC_MSG_CHECKING([how to hardcode library paths into programs])
2071 _LT_AC_TAGVAR(hardcode_action, $1)=
2072 if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
2073    test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \
2074    test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
2076   # We can hardcode non-existant directories.
2077   if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
2078      # If the only mechanism to avoid hardcoding is shlibpath_var, we
2079      # have to relink, otherwise we might link with an installed library
2080      # when we should be linking with a yet-to-be-installed one
2081      ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
2082      test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
2083     # Linking always hardcodes the temporary library directory.
2084     _LT_AC_TAGVAR(hardcode_action, $1)=relink
2085   else
2086     # We can link without hardcoding, and we can hardcode nonexisting dirs.
2087     _LT_AC_TAGVAR(hardcode_action, $1)=immediate
2088   fi
2089 else
2090   # We cannot hardcode anything, or else we can only hardcode existing
2091   # directories.
2092   _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
2094 AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
2096 if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
2097   # Fast installation is not supported
2098   enable_fast_install=no
2099 elif test "$shlibpath_overrides_runpath" = yes ||
2100      test "$enable_shared" = no; then
2101   # Fast installation is not necessary
2102   enable_fast_install=needless
2104 ])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
2107 # AC_LIBTOOL_SYS_LIB_STRIP
2108 # ------------------------
2109 AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
2110 [striplib=
2111 old_striplib=
2112 AC_MSG_CHECKING([whether stripping libraries is possible])
2113 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
2114   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
2115   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
2116   AC_MSG_RESULT([yes])
2117 else
2118 # FIXME - insert some real tests, host_os isn't really good enough
2119   case $host_os in
2120    darwin*)
2121        if test -n "$STRIP" ; then
2122          striplib="$STRIP -x"
2123          old_striplib="$STRIP -S"
2124          AC_MSG_RESULT([yes])
2125        else
2126   AC_MSG_RESULT([no])
2128        ;;
2129    *)
2130   AC_MSG_RESULT([no])
2131     ;;
2132   esac
2134 ])# AC_LIBTOOL_SYS_LIB_STRIP
2137 # AC_LIBTOOL_SYS_DYNAMIC_LINKER
2138 # -----------------------------
2139 # PORTME Fill in your ld.so characteristics
2140 AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
2141 [AC_REQUIRE([LT_AC_PROG_SED])dnl
2142 AC_MSG_CHECKING([dynamic linker characteristics])
2143 library_names_spec=
2144 libname_spec='lib$name'
2145 soname_spec=
2146 shrext_cmds=".so"
2147 postinstall_cmds=
2148 postuninstall_cmds=
2149 finish_cmds=
2150 finish_eval=
2151 shlibpath_var=
2152 shlibpath_overrides_runpath=unknown
2153 version_type=none
2154 dynamic_linker="$host_os ld.so"
2155 sys_lib_dlsearch_path_spec="/lib /usr/lib"
2156 m4_if($1,[],[
2157 if test "$GCC" = yes; then
2158   case $host_os in
2159     darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
2160     *) lt_awk_arg="/^libraries:/" ;;
2161   esac
2162   lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
2163   if echo "$lt_search_path_spec" | grep ';' >/dev/null ; then
2164     # if the path contains ";" then we assume it to be the separator
2165     # otherwise default to the standard path separator (i.e. ":") - it is
2166     # assumed that no part of a normal pathname contains ";" but that should
2167     # okay in the real world where ";" in dirpaths is itself problematic.
2168     lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e 's/;/ /g'`
2169   else
2170     lt_search_path_spec=`echo "$lt_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
2171   fi
2172   # Ok, now we have the path, separated by spaces, we can step through it
2173   # and add multilib dir if necessary.
2174   lt_tmp_lt_search_path_spec=
2175   lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
2176   for lt_sys_path in $lt_search_path_spec; do
2177     if test -d "$lt_sys_path/$lt_multi_os_dir"; then
2178       lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
2179     else
2180       test -d "$lt_sys_path" && \
2181         lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
2182     fi
2183   done
2184   lt_search_path_spec=`echo $lt_tmp_lt_search_path_spec | awk '
2185 BEGIN {RS=" "; FS="/|\n";} {
2186   lt_foo="";
2187   lt_count=0;
2188   for (lt_i = NF; lt_i > 0; lt_i--) {
2189     if ($lt_i != "" && $lt_i != ".") {
2190       if ($lt_i == "..") {
2191         lt_count++;
2192       } else {
2193         if (lt_count == 0) {
2194           lt_foo="/" $lt_i lt_foo;
2195         } else {
2196           lt_count--;
2197         }
2198       }
2199     }
2200   }
2201   if (lt_foo != "") { lt_freq[[lt_foo]]++; }
2202   if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
2204   sys_lib_search_path_spec=`echo $lt_search_path_spec`
2205 else
2206   sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2207 fi])
2208 need_lib_prefix=unknown
2209 hardcode_into_libs=no
2211 # when you set need_version to no, make sure it does not cause -set_version
2212 # flags to be left without arguments
2213 need_version=unknown
2215 case $host_os in
2216 aix3*)
2217   version_type=linux
2218   library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
2219   shlibpath_var=LIBPATH
2221   # AIX 3 has no versioning support, so we append a major version to the name.
2222   soname_spec='${libname}${release}${shared_ext}$major'
2223   ;;
2225 aix[[4-9]]*)
2226   version_type=linux
2227   need_lib_prefix=no
2228   need_version=no
2229   hardcode_into_libs=yes
2230   if test "$host_cpu" = ia64; then
2231     # AIX 5 supports IA64
2232     library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
2233     shlibpath_var=LD_LIBRARY_PATH
2234   else
2235     # With GCC up to 2.95.x, collect2 would create an import file
2236     # for dependence libraries.  The import file would start with
2237     # the line `#! .'.  This would cause the generated library to
2238     # depend on `.', always an invalid library.  This was fixed in
2239     # development snapshots of GCC prior to 3.0.
2240     case $host_os in
2241       aix4 | aix4.[[01]] | aix4.[[01]].*)
2242       if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
2243            echo ' yes '
2244            echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
2245         :
2246       else
2247         can_build_shared=no
2248       fi
2249       ;;
2250     esac
2251     # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
2252     # soname into executable. Probably we can add versioning support to
2253     # collect2, so additional links can be useful in future.
2254     if test "$aix_use_runtimelinking" = yes; then
2255       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
2256       # instead of lib<name>.a to let people know that these are not
2257       # typical AIX shared libraries.
2258       library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2259     else
2260       # We preserve .a as extension for shared libraries through AIX4.2
2261       # and later when we are not doing run time linking.
2262       library_names_spec='${libname}${release}.a $libname.a'
2263       soname_spec='${libname}${release}${shared_ext}$major'
2264     fi
2265     shlibpath_var=LIBPATH
2266   fi
2267   ;;
2269 amigaos*)
2270   library_names_spec='$libname.ixlibrary $libname.a'
2271   # Create ${libname}_ixlibrary.a entries in /sys/libs.
2272   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'
2273   ;;
2275 beos*)
2276   library_names_spec='${libname}${shared_ext}'
2277   dynamic_linker="$host_os ld.so"
2278   shlibpath_var=LIBRARY_PATH
2279   ;;
2281 bsdi[[45]]*)
2282   version_type=linux
2283   need_version=no
2284   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2285   soname_spec='${libname}${release}${shared_ext}$major'
2286   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
2287   shlibpath_var=LD_LIBRARY_PATH
2288   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
2289   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
2290   # the default ld.so.conf also contains /usr/contrib/lib and
2291   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
2292   # libtool to hard-code these into programs
2293   ;;
2295 cygwin* | mingw* | pw32*)
2296   version_type=windows
2297   shrext_cmds=".dll"
2298   need_version=no
2299   need_lib_prefix=no
2301   case $GCC,$host_os in
2302   yes,cygwin* | yes,mingw* | yes,pw32*)
2303     library_names_spec='$libname.dll.a'
2304     # DLL is installed to $(libdir)/../bin by postinstall_cmds
2305     postinstall_cmds='base_file=`basename \${file}`~
2306       dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
2307       dldir=$destdir/`dirname \$dlpath`~
2308       test -d \$dldir || mkdir -p \$dldir~
2309       $install_prog $dir/$dlname \$dldir/$dlname~
2310       chmod a+x \$dldir/$dlname'
2311     postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
2312       dlpath=$dir/\$dldll~
2313        $rm \$dlpath'
2314     shlibpath_overrides_runpath=yes
2316     case $host_os in
2317     cygwin*)
2318       # Cygwin DLLs use 'cyg' prefix rather than 'lib'
2319       soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2320       sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
2321       ;;
2322     mingw*)
2323       # MinGW DLLs use traditional 'lib' prefix
2324       soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2325       sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
2326       if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
2327         # It is most probably a Windows format PATH printed by
2328         # mingw gcc, but we are running on Cygwin. Gcc prints its search
2329         # path with ; separators, and with drive letters. We can handle the
2330         # drive letters (cygwin fileutils understands them), so leave them,
2331         # especially as we might pass files found there to a mingw objdump,
2332         # which wouldn't understand a cygwinified path. Ahh.
2333         sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
2334       else
2335         sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
2336       fi
2337       ;;
2338     pw32*)
2339       # pw32 DLLs use 'pw' prefix rather than 'lib'
2340       library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2341       ;;
2342     esac
2343     ;;
2345   *)
2346     library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
2347     ;;
2348   esac
2349   dynamic_linker='Win32 ld.exe'
2350   # FIXME: first we should search . and the directory the executable is in
2351   shlibpath_var=PATH
2352   ;;
2354 darwin* | rhapsody*)
2355   dynamic_linker="$host_os dyld"
2356   version_type=darwin
2357   need_lib_prefix=no
2358   need_version=no
2359   library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
2360   soname_spec='${libname}${release}${major}$shared_ext'
2361   shlibpath_overrides_runpath=yes
2362   shlibpath_var=DYLD_LIBRARY_PATH
2363   shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
2364   m4_if([$1], [],[
2365   sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 
2366   sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
2367   ;;
2369 dgux*)
2370   version_type=linux
2371   need_lib_prefix=no
2372   need_version=no
2373   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
2374   soname_spec='${libname}${release}${shared_ext}$major'
2375   shlibpath_var=LD_LIBRARY_PATH
2376   ;;
2378 freebsd1*)
2379   dynamic_linker=no
2380   ;;
2382 freebsd* | dragonfly*)
2383   # DragonFly does not have aout.  When/if they implement a new
2384   # versioning mechanism, adjust this.
2385   if test -x /usr/bin/objformat; then
2386     objformat=`/usr/bin/objformat`
2387   else
2388     case $host_os in
2389     freebsd[[123]]*) objformat=aout ;;
2390     *) objformat=elf ;;
2391     esac
2392   fi
2393   version_type=freebsd-$objformat
2394   case $version_type in
2395     freebsd-elf*)
2396       library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
2397       need_version=no
2398       need_lib_prefix=no
2399       ;;
2400     freebsd-*)
2401       library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
2402       need_version=yes
2403       ;;
2404   esac
2405   shlibpath_var=LD_LIBRARY_PATH
2406   case $host_os in
2407   freebsd2*)
2408     shlibpath_overrides_runpath=yes
2409     ;;
2410   freebsd3.[[01]]* | freebsdelf3.[[01]]*)
2411     shlibpath_overrides_runpath=yes
2412     hardcode_into_libs=yes
2413     ;;
2414   freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
2415   freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
2416     shlibpath_overrides_runpath=no
2417     hardcode_into_libs=yes
2418     ;;
2419   *) # from 4.6 on, and DragonFly
2420     shlibpath_overrides_runpath=yes
2421     hardcode_into_libs=yes
2422     ;;
2423   esac
2424   ;;
2426 gnu*)
2427   version_type=linux
2428   need_lib_prefix=no
2429   need_version=no
2430   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
2431   soname_spec='${libname}${release}${shared_ext}$major'
2432   shlibpath_var=LD_LIBRARY_PATH
2433   hardcode_into_libs=yes
2434   ;;
2436 hpux9* | hpux10* | hpux11*)
2437   # Give a soname corresponding to the major version so that dld.sl refuses to
2438   # link against other versions.
2439   version_type=sunos
2440   need_lib_prefix=no
2441   need_version=no
2442   case $host_cpu in
2443   ia64*)
2444     shrext_cmds='.so'
2445     hardcode_into_libs=yes
2446     dynamic_linker="$host_os dld.so"
2447     shlibpath_var=LD_LIBRARY_PATH
2448     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2449     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2450     soname_spec='${libname}${release}${shared_ext}$major'
2451     if test "X$HPUX_IA64_MODE" = X32; then
2452       sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
2453     else
2454       sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
2455     fi
2456     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2457     ;;
2458    hppa*64*)
2459      shrext_cmds='.sl'
2460      hardcode_into_libs=yes
2461      dynamic_linker="$host_os dld.sl"
2462      shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
2463      shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2464      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2465      soname_spec='${libname}${release}${shared_ext}$major'
2466      sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
2467      sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2468      ;;
2469    *)
2470     shrext_cmds='.sl'
2471     dynamic_linker="$host_os dld.sl"
2472     shlibpath_var=SHLIB_PATH
2473     shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
2474     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2475     soname_spec='${libname}${release}${shared_ext}$major'
2476     ;;
2477   esac
2478   # HP-UX runs *really* slowly unless shared libraries are mode 555.
2479   postinstall_cmds='chmod 555 $lib'
2480   ;;
2482 interix[[3-9]]*)
2483   version_type=linux
2484   need_lib_prefix=no
2485   need_version=no
2486   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2487   soname_spec='${libname}${release}${shared_ext}$major'
2488   dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
2489   shlibpath_var=LD_LIBRARY_PATH
2490   shlibpath_overrides_runpath=no
2491   hardcode_into_libs=yes
2492   ;;
2494 irix5* | irix6* | nonstopux*)
2495   case $host_os in
2496     nonstopux*) version_type=nonstopux ;;
2497     *)
2498         if test "$lt_cv_prog_gnu_ld" = yes; then
2499                 version_type=linux
2500         else
2501                 version_type=irix
2502         fi ;;
2503   esac
2504   need_lib_prefix=no
2505   need_version=no
2506   soname_spec='${libname}${release}${shared_ext}$major'
2507   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
2508   case $host_os in
2509   irix5* | nonstopux*)
2510     libsuff= shlibsuff=
2511     ;;
2512   *)
2513     case $LD in # libtool.m4 will add one of these switches to LD
2514     *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
2515       libsuff= shlibsuff= libmagic=32-bit;;
2516     *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
2517       libsuff=32 shlibsuff=N32 libmagic=N32;;
2518     *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
2519       libsuff=64 shlibsuff=64 libmagic=64-bit;;
2520     *) libsuff= shlibsuff= libmagic=never-match;;
2521     esac
2522     ;;
2523   esac
2524   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
2525   shlibpath_overrides_runpath=no
2526   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
2527   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
2528   hardcode_into_libs=yes
2529   ;;
2531 # No shared lib support for Linux oldld, aout, or coff.
2532 linux*oldld* | linux*aout* | linux*coff*)
2533   dynamic_linker=no
2534   ;;
2536 # This must be Linux ELF.
2537 linux* | k*bsd*-gnu)
2538   version_type=linux
2539   need_lib_prefix=no
2540   need_version=no
2541   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2542   soname_spec='${libname}${release}${shared_ext}$major'
2543   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
2544   shlibpath_var=LD_LIBRARY_PATH
2545   shlibpath_overrides_runpath=no
2546   # This implies no fast_install, which is unacceptable.
2547   # Some rework will be needed to allow for fast_install
2548   # before this can be enabled.
2549   hardcode_into_libs=yes
2551   # Append ld.so.conf contents to the search path
2552   if test -f /etc/ld.so.conf; then
2553     lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[  ]*hwcap[        ]/d;s/[:,       ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
2554     sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
2555   fi
2557   # We used to test for /lib/ld.so.1 and disable shared libraries on
2558   # powerpc, because MkLinux only supported shared libraries with the
2559   # GNU dynamic linker.  Since this was broken with cross compilers,
2560   # most powerpc-linux boxes support dynamic linking these days and
2561   # people can always --disable-shared, the test was removed, and we
2562   # assume the GNU/Linux dynamic linker is in use.
2563   dynamic_linker='GNU/Linux ld.so'
2564   ;;
2566 netbsd*)
2567   version_type=sunos
2568   need_lib_prefix=no
2569   need_version=no
2570   if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
2571     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2572     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2573     dynamic_linker='NetBSD (a.out) ld.so'
2574   else
2575     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2576     soname_spec='${libname}${release}${shared_ext}$major'
2577     dynamic_linker='NetBSD ld.elf_so'
2578   fi
2579   shlibpath_var=LD_LIBRARY_PATH
2580   shlibpath_overrides_runpath=yes
2581   hardcode_into_libs=yes
2582   ;;
2584 newsos6)
2585   version_type=linux
2586   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2587   shlibpath_var=LD_LIBRARY_PATH
2588   shlibpath_overrides_runpath=yes
2589   ;;
2591 nto-qnx*)
2592   version_type=linux
2593   need_lib_prefix=no
2594   need_version=no
2595   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2596   soname_spec='${libname}${release}${shared_ext}$major'
2597   shlibpath_var=LD_LIBRARY_PATH
2598   shlibpath_overrides_runpath=yes
2599   ;;
2601 openbsd*)
2602   version_type=sunos
2603   sys_lib_dlsearch_path_spec="/usr/lib"
2604   need_lib_prefix=no
2605   # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
2606   case $host_os in
2607     openbsd3.3 | openbsd3.3.*) need_version=yes ;;
2608     *)                         need_version=no  ;;
2609   esac
2610   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2611   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2612   shlibpath_var=LD_LIBRARY_PATH
2613   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2614     case $host_os in
2615       openbsd2.[[89]] | openbsd2.[[89]].*)
2616         shlibpath_overrides_runpath=no
2617         ;;
2618       *)
2619         shlibpath_overrides_runpath=yes
2620         ;;
2621       esac
2622   else
2623     shlibpath_overrides_runpath=yes
2624   fi
2625   ;;
2627 os2*)
2628   libname_spec='$name'
2629   shrext_cmds=".dll"
2630   need_lib_prefix=no
2631   library_names_spec='$libname${shared_ext} $libname.a'
2632   dynamic_linker='OS/2 ld.exe'
2633   shlibpath_var=LIBPATH
2634   ;;
2636 osf3* | osf4* | osf5*)
2637   version_type=osf
2638   need_lib_prefix=no
2639   need_version=no
2640   soname_spec='${libname}${release}${shared_ext}$major'
2641   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2642   shlibpath_var=LD_LIBRARY_PATH
2643   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
2644   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
2645   ;;
2647 rdos*)
2648   dynamic_linker=no
2649   ;;
2651 solaris*)
2652   version_type=linux
2653   need_lib_prefix=no
2654   need_version=no
2655   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2656   soname_spec='${libname}${release}${shared_ext}$major'
2657   shlibpath_var=LD_LIBRARY_PATH
2658   shlibpath_overrides_runpath=yes
2659   hardcode_into_libs=yes
2660   # ldd complains unless libraries are executable
2661   postinstall_cmds='chmod +x $lib'
2662   ;;
2664 sunos4*)
2665   version_type=sunos
2666   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2667   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
2668   shlibpath_var=LD_LIBRARY_PATH
2669   shlibpath_overrides_runpath=yes
2670   if test "$with_gnu_ld" = yes; then
2671     need_lib_prefix=no
2672   fi
2673   need_version=yes
2674   ;;
2676 sysv4 | sysv4.3*)
2677   version_type=linux
2678   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2679   soname_spec='${libname}${release}${shared_ext}$major'
2680   shlibpath_var=LD_LIBRARY_PATH
2681   case $host_vendor in
2682     sni)
2683       shlibpath_overrides_runpath=no
2684       need_lib_prefix=no
2685       export_dynamic_flag_spec='${wl}-Blargedynsym'
2686       runpath_var=LD_RUN_PATH
2687       ;;
2688     siemens)
2689       need_lib_prefix=no
2690       ;;
2691     motorola)
2692       need_lib_prefix=no
2693       need_version=no
2694       shlibpath_overrides_runpath=no
2695       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
2696       ;;
2697   esac
2698   ;;
2700 sysv4*MP*)
2701   if test -d /usr/nec ;then
2702     version_type=linux
2703     library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
2704     soname_spec='$libname${shared_ext}.$major'
2705     shlibpath_var=LD_LIBRARY_PATH
2706   fi
2707   ;;
2709 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
2710   version_type=freebsd-elf
2711   need_lib_prefix=no
2712   need_version=no
2713   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
2714   soname_spec='${libname}${release}${shared_ext}$major'
2715   shlibpath_var=LD_LIBRARY_PATH
2716   hardcode_into_libs=yes
2717   if test "$with_gnu_ld" = yes; then
2718     sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
2719     shlibpath_overrides_runpath=no
2720   else
2721     sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
2722     shlibpath_overrides_runpath=yes
2723     case $host_os in
2724       sco3.2v5*)
2725         sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
2726         ;;
2727     esac
2728   fi
2729   sys_lib_dlsearch_path_spec='/usr/lib'
2730   ;;
2732 uts4*)
2733   version_type=linux
2734   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2735   soname_spec='${libname}${release}${shared_ext}$major'
2736   shlibpath_var=LD_LIBRARY_PATH
2737   ;;
2740   dynamic_linker=no
2741   ;;
2742 esac
2743 AC_MSG_RESULT([$dynamic_linker])
2744 test "$dynamic_linker" = no && can_build_shared=no
2746 AC_CACHE_VAL([lt_cv_sys_lib_search_path_spec],
2747 [lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec"])
2748 sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
2749 AC_CACHE_VAL([lt_cv_sys_lib_dlsearch_path_spec],
2750 [lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec"])
2751 sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
2753 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
2754 if test "$GCC" = yes; then
2755   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
2757 ])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
2760 # _LT_AC_TAGCONFIG
2761 # ----------------
2762 AC_DEFUN([_LT_AC_TAGCONFIG],
2763 [AC_REQUIRE([LT_AC_PROG_SED])dnl
2764 AC_ARG_WITH([tags],
2765     [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
2766         [include additional configurations @<:@automatic@:>@])],
2767     [tagnames="$withval"])
2769 if test -f "$ltmain" && test -n "$tagnames"; then
2770   if test ! -f "${ofile}"; then
2771     AC_MSG_WARN([output file `$ofile' does not exist])
2772   fi
2774   if test -z "$LTCC"; then
2775     eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
2776     if test -z "$LTCC"; then
2777       AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
2778     else
2779       AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
2780     fi
2781   fi
2782   if test -z "$LTCFLAGS"; then
2783     eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`"
2784   fi
2786   # Extract list of available tagged configurations in $ofile.
2787   # Note that this assumes the entire list is on one line.
2788   available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
2790   lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2791   for tagname in $tagnames; do
2792     IFS="$lt_save_ifs"
2793     # Check whether tagname contains only valid characters
2794     case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
2795     "") ;;
2796     *)  AC_MSG_ERROR([invalid tag name: $tagname])
2797         ;;
2798     esac
2800     if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
2801     then
2802       AC_MSG_ERROR([tag name \"$tagname\" already exists])
2803     fi
2805     # Update the list of available tags.
2806     if test -n "$tagname"; then
2807       echo appending configuration tag \"$tagname\" to $ofile
2809       case $tagname in
2810       CXX)
2811         if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
2812             ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
2813             (test "X$CXX" != "Xg++"))) ; then
2814           AC_LIBTOOL_LANG_CXX_CONFIG
2815         else
2816           tagname=""
2817         fi
2818         ;;
2820       F77)
2821         if test -n "$F77" && test "X$F77" != "Xno"; then
2822           AC_LIBTOOL_LANG_F77_CONFIG
2823         else
2824           tagname=""
2825         fi
2826         ;;
2828       GCJ)
2829         if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
2830           AC_LIBTOOL_LANG_GCJ_CONFIG
2831         else
2832           tagname=""
2833         fi
2834         ;;
2836       RC)
2837         AC_LIBTOOL_LANG_RC_CONFIG
2838         ;;
2840       *)
2841         AC_MSG_ERROR([Unsupported tag name: $tagname])
2842         ;;
2843       esac
2845       # Append the new tag name to the list of available tags.
2846       if test -n "$tagname" ; then
2847       available_tags="$available_tags $tagname"
2848     fi
2849     fi
2850   done
2851   IFS="$lt_save_ifs"
2853   # Now substitute the updated list of available tags.
2854   if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
2855     mv "${ofile}T" "$ofile"
2856     chmod +x "$ofile"
2857   else
2858     rm -f "${ofile}T"
2859     AC_MSG_ERROR([unable to update list of available tagged configurations.])
2860   fi
2862 ])# _LT_AC_TAGCONFIG
2865 # AC_LIBTOOL_DLOPEN
2866 # -----------------
2867 # enable checks for dlopen support
2868 AC_DEFUN([AC_LIBTOOL_DLOPEN],
2869  [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
2870 ])# AC_LIBTOOL_DLOPEN
2873 # AC_LIBTOOL_WIN32_DLL
2874 # --------------------
2875 # declare package support for building win32 DLLs
2876 AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
2877 [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
2878 ])# AC_LIBTOOL_WIN32_DLL
2881 # AC_ENABLE_SHARED([DEFAULT])
2882 # ---------------------------
2883 # implement the --enable-shared flag
2884 # DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
2885 AC_DEFUN([AC_ENABLE_SHARED],
2886 [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
2887 AC_ARG_ENABLE([shared],
2888     [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
2889         [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
2890     [p=${PACKAGE-default}
2891     case $enableval in
2892     yes) enable_shared=yes ;;
2893     no) enable_shared=no ;;
2894     *)
2895       enable_shared=no
2896       # Look at the argument we got.  We use all the common list separators.
2897       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2898       for pkg in $enableval; do
2899         IFS="$lt_save_ifs"
2900         if test "X$pkg" = "X$p"; then
2901           enable_shared=yes
2902         fi
2903       done
2904       IFS="$lt_save_ifs"
2905       ;;
2906     esac],
2907     [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
2908 ])# AC_ENABLE_SHARED
2911 # AC_DISABLE_SHARED
2912 # -----------------
2913 # set the default shared flag to --disable-shared
2914 AC_DEFUN([AC_DISABLE_SHARED],
2915 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2916 AC_ENABLE_SHARED(no)
2917 ])# AC_DISABLE_SHARED
2920 # AC_ENABLE_STATIC([DEFAULT])
2921 # ---------------------------
2922 # implement the --enable-static flag
2923 # DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
2924 AC_DEFUN([AC_ENABLE_STATIC],
2925 [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
2926 AC_ARG_ENABLE([static],
2927     [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
2928         [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
2929     [p=${PACKAGE-default}
2930     case $enableval in
2931     yes) enable_static=yes ;;
2932     no) enable_static=no ;;
2933     *)
2934      enable_static=no
2935       # Look at the argument we got.  We use all the common list separators.
2936       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2937       for pkg in $enableval; do
2938         IFS="$lt_save_ifs"
2939         if test "X$pkg" = "X$p"; then
2940           enable_static=yes
2941         fi
2942       done
2943       IFS="$lt_save_ifs"
2944       ;;
2945     esac],
2946     [enable_static=]AC_ENABLE_STATIC_DEFAULT)
2947 ])# AC_ENABLE_STATIC
2950 # AC_DISABLE_STATIC
2951 # -----------------
2952 # set the default static flag to --disable-static
2953 AC_DEFUN([AC_DISABLE_STATIC],
2954 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2955 AC_ENABLE_STATIC(no)
2956 ])# AC_DISABLE_STATIC
2959 # AC_ENABLE_FAST_INSTALL([DEFAULT])
2960 # ---------------------------------
2961 # implement the --enable-fast-install flag
2962 # DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
2963 AC_DEFUN([AC_ENABLE_FAST_INSTALL],
2964 [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
2965 AC_ARG_ENABLE([fast-install],
2966     [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
2967     [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
2968     [p=${PACKAGE-default}
2969     case $enableval in
2970     yes) enable_fast_install=yes ;;
2971     no) enable_fast_install=no ;;
2972     *)
2973       enable_fast_install=no
2974       # Look at the argument we got.  We use all the common list separators.
2975       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2976       for pkg in $enableval; do
2977         IFS="$lt_save_ifs"
2978         if test "X$pkg" = "X$p"; then
2979           enable_fast_install=yes
2980         fi
2981       done
2982       IFS="$lt_save_ifs"
2983       ;;
2984     esac],
2985     [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
2986 ])# AC_ENABLE_FAST_INSTALL
2989 # AC_DISABLE_FAST_INSTALL
2990 # -----------------------
2991 # set the default to --disable-fast-install
2992 AC_DEFUN([AC_DISABLE_FAST_INSTALL],
2993 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2994 AC_ENABLE_FAST_INSTALL(no)
2995 ])# AC_DISABLE_FAST_INSTALL
2998 # AC_LIBTOOL_PICMODE([MODE])
2999 # --------------------------
3000 # implement the --with-pic flag
3001 # MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
3002 AC_DEFUN([AC_LIBTOOL_PICMODE],
3003 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3004 pic_mode=ifelse($#,1,$1,default)
3005 ])# AC_LIBTOOL_PICMODE
3008 # AC_PROG_EGREP
3009 # -------------
3010 # This is predefined starting with Autoconf 2.54, so this conditional
3011 # definition can be removed once we require Autoconf 2.54 or later.
3012 m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
3013 [AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
3014    [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3015     then ac_cv_prog_egrep='grep -E'
3016     else ac_cv_prog_egrep='egrep'
3017     fi])
3018  EGREP=$ac_cv_prog_egrep
3019  AC_SUBST([EGREP])
3020 ])])
3023 # AC_PATH_TOOL_PREFIX
3024 # -------------------
3025 # find a file program which can recognize shared library
3026 AC_DEFUN([AC_PATH_TOOL_PREFIX],
3027 [AC_REQUIRE([AC_PROG_EGREP])dnl
3028 AC_MSG_CHECKING([for $1])
3029 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
3030 [case $MAGIC_CMD in
3031 [[\\/*] |  ?:[\\/]*])
3032   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
3033   ;;
3035   lt_save_MAGIC_CMD="$MAGIC_CMD"
3036   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3037 dnl $ac_dummy forces splitting on constant user-supplied paths.
3038 dnl POSIX.2 word splitting is done only on the output of word expansions,
3039 dnl not every word.  This closes a longstanding sh security hole.
3040   ac_dummy="ifelse([$2], , $PATH, [$2])"
3041   for ac_dir in $ac_dummy; do
3042     IFS="$lt_save_ifs"
3043     test -z "$ac_dir" && ac_dir=.
3044     if test -f $ac_dir/$1; then
3045       lt_cv_path_MAGIC_CMD="$ac_dir/$1"
3046       if test -n "$file_magic_test_file"; then
3047         case $deplibs_check_method in
3048         "file_magic "*)
3049           file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
3050           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3051           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
3052             $EGREP "$file_magic_regex" > /dev/null; then
3053             :
3054           else
3055             cat <<EOF 1>&2
3057 *** Warning: the command libtool uses to detect shared libraries,
3058 *** $file_magic_cmd, produces output that libtool cannot recognize.
3059 *** The result is that libtool may fail to recognize shared libraries
3060 *** as such.  This will affect the creation of libtool libraries that
3061 *** depend on shared libraries, but programs linked with such libtool
3062 *** libraries will work regardless of this problem.  Nevertheless, you
3063 *** may want to report the problem to your system manager and/or to
3064 *** bug-libtool@gnu.org
3067           fi ;;
3068         esac
3069       fi
3070       break
3071     fi
3072   done
3073   IFS="$lt_save_ifs"
3074   MAGIC_CMD="$lt_save_MAGIC_CMD"
3075   ;;
3076 esac])
3077 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3078 if test -n "$MAGIC_CMD"; then
3079   AC_MSG_RESULT($MAGIC_CMD)
3080 else
3081   AC_MSG_RESULT(no)
3083 ])# AC_PATH_TOOL_PREFIX
3086 # AC_PATH_MAGIC
3087 # -------------
3088 # find a file program which can recognize a shared library
3089 AC_DEFUN([AC_PATH_MAGIC],
3090 [AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
3091 if test -z "$lt_cv_path_MAGIC_CMD"; then
3092   if test -n "$ac_tool_prefix"; then
3093     AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
3094   else
3095     MAGIC_CMD=:
3096   fi
3098 ])# AC_PATH_MAGIC
3101 # AC_PROG_LD
3102 # ----------
3103 # find the pathname to the GNU or non-GNU linker
3104 AC_DEFUN([AC_PROG_LD],
3105 [AC_ARG_WITH([gnu-ld],
3106     [AC_HELP_STRING([--with-gnu-ld],
3107         [assume the C compiler uses GNU ld @<:@default=no@:>@])],
3108     [test "$withval" = no || with_gnu_ld=yes],
3109     [with_gnu_ld=no])
3110 AC_REQUIRE([LT_AC_PROG_SED])dnl
3111 AC_REQUIRE([AC_PROG_CC])dnl
3112 AC_REQUIRE([AC_CANONICAL_HOST])dnl
3113 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
3114 ac_prog=ld
3115 if test "$GCC" = yes; then
3116   # Check if gcc -print-prog-name=ld gives a path.
3117   AC_MSG_CHECKING([for ld used by $CC])
3118   case $host in
3119   *-*-mingw*)
3120     # gcc leaves a trailing carriage return which upsets mingw
3121     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3122   *)
3123     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3124   esac
3125   case $ac_prog in
3126     # Accept absolute paths.
3127     [[\\/]]* | ?:[[\\/]]*)
3128       re_direlt='/[[^/]][[^/]]*/\.\./'
3129       # Canonicalize the pathname of ld
3130       ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
3131       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3132         ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
3133       done
3134       test -z "$LD" && LD="$ac_prog"
3135       ;;
3136   "")
3137     # If it fails, then pretend we aren't using GCC.
3138     ac_prog=ld
3139     ;;
3140   *)
3141     # If it is relative, then search for the first ld in PATH.
3142     with_gnu_ld=unknown
3143     ;;
3144   esac
3145 elif test "$with_gnu_ld" = yes; then
3146   AC_MSG_CHECKING([for GNU ld])
3147 else
3148   AC_MSG_CHECKING([for non-GNU ld])
3150 AC_CACHE_VAL(lt_cv_path_LD,
3151 [if test -z "$LD"; then
3152   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3153   for ac_dir in $PATH; do
3154     IFS="$lt_save_ifs"
3155     test -z "$ac_dir" && ac_dir=.
3156     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3157       lt_cv_path_LD="$ac_dir/$ac_prog"
3158       # Check to see if the program is GNU ld.  I'd rather use --version,
3159       # but apparently some variants of GNU ld only accept -v.
3160       # Break only if it was the GNU/non-GNU ld that we prefer.
3161       case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
3162       *GNU* | *'with BFD'*)
3163         test "$with_gnu_ld" != no && break
3164         ;;
3165       *)
3166         test "$with_gnu_ld" != yes && break
3167         ;;
3168       esac
3169     fi
3170   done
3171   IFS="$lt_save_ifs"
3172 else
3173   lt_cv_path_LD="$LD" # Let the user override the test with a path.
3174 fi])
3175 LD="$lt_cv_path_LD"
3176 if test -n "$LD"; then
3177   AC_MSG_RESULT($LD)
3178 else
3179   AC_MSG_RESULT(no)
3181 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
3182 AC_PROG_LD_GNU
3183 ])# AC_PROG_LD
3186 # AC_PROG_LD_GNU
3187 # --------------
3188 AC_DEFUN([AC_PROG_LD_GNU],
3189 [AC_REQUIRE([AC_PROG_EGREP])dnl
3190 AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
3191 [# I'd rather use --version here, but apparently some GNU lds only accept -v.
3192 case `$LD -v 2>&1 </dev/null` in
3193 *GNU* | *'with BFD'*)
3194   lt_cv_prog_gnu_ld=yes
3195   ;;
3197   lt_cv_prog_gnu_ld=no
3198   ;;
3199 esac])
3200 with_gnu_ld=$lt_cv_prog_gnu_ld
3201 ])# AC_PROG_LD_GNU
3204 # AC_PROG_LD_RELOAD_FLAG
3205 # ----------------------
3206 # find reload flag for linker
3207 #   -- PORTME Some linkers may need a different reload flag.
3208 AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
3209 [AC_CACHE_CHECK([for $LD option to reload object files],
3210   lt_cv_ld_reload_flag,
3211   [lt_cv_ld_reload_flag='-r'])
3212 reload_flag=$lt_cv_ld_reload_flag
3213 case $reload_flag in
3214 "" | " "*) ;;
3215 *) reload_flag=" $reload_flag" ;;
3216 esac
3217 reload_cmds='$LD$reload_flag -o $output$reload_objs'
3218 case $host_os in
3219   darwin*)
3220     if test "$GCC" = yes; then
3221       reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
3222     else
3223       reload_cmds='$LD$reload_flag -o $output$reload_objs'
3224     fi
3225     ;;
3226 esac
3227 ])# AC_PROG_LD_RELOAD_FLAG
3230 # AC_DEPLIBS_CHECK_METHOD
3231 # -----------------------
3232 # how to check for library dependencies
3233 #  -- PORTME fill in with the dynamic library characteristics
3234 AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
3235 [AC_CACHE_CHECK([how to recognize dependent libraries],
3236 lt_cv_deplibs_check_method,
3237 [lt_cv_file_magic_cmd='$MAGIC_CMD'
3238 lt_cv_file_magic_test_file=
3239 lt_cv_deplibs_check_method='unknown'
3240 # Need to set the preceding variable on all platforms that support
3241 # interlibrary dependencies.
3242 # 'none' -- dependencies not supported.
3243 # `unknown' -- same as none, but documents that we really don't know.
3244 # 'pass_all' -- all dependencies passed with no checks.
3245 # 'test_compile' -- check by making test program.
3246 # 'file_magic [[regex]]' -- check by looking for files in library path
3247 # which responds to the $file_magic_cmd with a given extended regex.
3248 # If you have `file' or equivalent on your system and you're not sure
3249 # whether `pass_all' will *always* work, you probably want this one.
3251 case $host_os in
3252 aix[[4-9]]*)
3253   lt_cv_deplibs_check_method=pass_all
3254   ;;
3256 beos*)
3257   lt_cv_deplibs_check_method=pass_all
3258   ;;
3260 bsdi[[45]]*)
3261   lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
3262   lt_cv_file_magic_cmd='/usr/bin/file -L'
3263   lt_cv_file_magic_test_file=/shlib/libc.so
3264   ;;
3266 cygwin*)
3267   # func_win32_libid is a shell function defined in ltmain.sh
3268   lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3269   lt_cv_file_magic_cmd='func_win32_libid'
3270   ;;
3272 mingw* | pw32*)
3273   # Base MSYS/MinGW do not provide the 'file' command needed by
3274   # func_win32_libid shell function, so use a weaker test based on 'objdump',
3275   # unless we find 'file', for example because we are cross-compiling.
3276   if ( file / ) >/dev/null 2>&1; then
3277     lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3278     lt_cv_file_magic_cmd='func_win32_libid'
3279   else
3280     lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3281     lt_cv_file_magic_cmd='$OBJDUMP -f'
3282   fi
3283   ;;
3285 darwin* | rhapsody*)
3286   lt_cv_deplibs_check_method=pass_all
3287   ;;
3289 freebsd* | dragonfly*)
3290   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3291     case $host_cpu in
3292     i*86 )
3293       # Not sure whether the presence of OpenBSD here was a mistake.
3294       # Let's accept both of them until this is cleared up.
3295       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
3296       lt_cv_file_magic_cmd=/usr/bin/file
3297       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3298       ;;
3299     esac
3300   else
3301     lt_cv_deplibs_check_method=pass_all
3302   fi
3303   ;;
3305 gnu*)
3306   lt_cv_deplibs_check_method=pass_all
3307   ;;
3309 hpux10.20* | hpux11*)
3310   lt_cv_file_magic_cmd=/usr/bin/file
3311   case $host_cpu in
3312   ia64*)
3313     lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
3314     lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
3315     ;;
3316   hppa*64*)
3317     [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]']
3318     lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
3319     ;;
3320   *)
3321     lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
3322     lt_cv_file_magic_test_file=/usr/lib/libc.sl
3323     ;;
3324   esac
3325   ;;
3327 interix[[3-9]]*)
3328   # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
3329   lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
3330   ;;
3332 irix5* | irix6* | nonstopux*)
3333   case $LD in
3334   *-32|*"-32 ") libmagic=32-bit;;
3335   *-n32|*"-n32 ") libmagic=N32;;
3336   *-64|*"-64 ") libmagic=64-bit;;
3337   *) libmagic=never-match;;
3338   esac
3339   lt_cv_deplibs_check_method=pass_all
3340   ;;
3342 # This must be Linux ELF.
3343 linux* | k*bsd*-gnu)
3344   lt_cv_deplibs_check_method=pass_all
3345   ;;
3347 netbsd*)
3348   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3349     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3350   else
3351     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
3352   fi
3353   ;;
3355 newos6*)
3356   lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
3357   lt_cv_file_magic_cmd=/usr/bin/file
3358   lt_cv_file_magic_test_file=/usr/lib/libnls.so
3359   ;;
3361 nto-qnx*)
3362   lt_cv_deplibs_check_method=unknown
3363   ;;
3365 openbsd*)
3366   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3367     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
3368   else
3369     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3370   fi
3371   ;;
3373 osf3* | osf4* | osf5*)
3374   lt_cv_deplibs_check_method=pass_all
3375   ;;
3377 rdos*)
3378   lt_cv_deplibs_check_method=pass_all
3379   ;;
3381 solaris*)
3382   lt_cv_deplibs_check_method=pass_all
3383   ;;
3385 sysv4 | sysv4.3*)
3386   case $host_vendor in
3387   motorola)
3388     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]]'
3389     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3390     ;;
3391   ncr)
3392     lt_cv_deplibs_check_method=pass_all
3393     ;;
3394   sequent)
3395     lt_cv_file_magic_cmd='/bin/file'
3396     lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
3397     ;;
3398   sni)
3399     lt_cv_file_magic_cmd='/bin/file'
3400     lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
3401     lt_cv_file_magic_test_file=/lib/libc.so
3402     ;;
3403   siemens)
3404     lt_cv_deplibs_check_method=pass_all
3405     ;;
3406   pc)
3407     lt_cv_deplibs_check_method=pass_all
3408     ;;
3409   esac
3410   ;;
3412 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3413   lt_cv_deplibs_check_method=pass_all
3414   ;;
3415 esac
3417 file_magic_cmd=$lt_cv_file_magic_cmd
3418 deplibs_check_method=$lt_cv_deplibs_check_method
3419 test -z "$deplibs_check_method" && deplibs_check_method=unknown
3420 ])# AC_DEPLIBS_CHECK_METHOD
3423 # AC_PROG_NM
3424 # ----------
3425 # find the pathname to a BSD-compatible name lister
3426 AC_DEFUN([AC_PROG_NM],
3427 [AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
3428 [if test -n "$NM"; then
3429   # Let the user override the test.
3430   lt_cv_path_NM="$NM"
3431 else
3432   lt_nm_to_check="${ac_tool_prefix}nm"
3433   if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
3434     lt_nm_to_check="$lt_nm_to_check nm"
3435   fi
3436   for lt_tmp_nm in $lt_nm_to_check; do
3437     lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3438     for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
3439       IFS="$lt_save_ifs"
3440       test -z "$ac_dir" && ac_dir=.
3441       tmp_nm="$ac_dir/$lt_tmp_nm"
3442       if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
3443         # Check to see if the nm accepts a BSD-compat flag.
3444         # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3445         #   nm: unknown option "B" ignored
3446         # Tru64's nm complains that /dev/null is an invalid object file
3447         case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
3448         */dev/null* | *'Invalid file or object type'*)
3449           lt_cv_path_NM="$tmp_nm -B"
3450           break
3451           ;;
3452         *)
3453           case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
3454           */dev/null*)
3455             lt_cv_path_NM="$tmp_nm -p"
3456             break
3457             ;;
3458           *)
3459             lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3460             continue # so that we can try to find one that supports BSD flags
3461             ;;
3462           esac
3463           ;;
3464         esac
3465       fi
3466     done
3467     IFS="$lt_save_ifs"
3468   done
3469   test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
3470 fi])
3471 NM="$lt_cv_path_NM"
3472 ])# AC_PROG_NM
3475 # AC_CHECK_LIBM
3476 # -------------
3477 # check for math library
3478 AC_DEFUN([AC_CHECK_LIBM],
3479 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
3480 LIBM=
3481 case $host in
3482 *-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
3483   # These system don't have libm, or don't need it
3484   ;;
3485 *-ncr-sysv4.3*)
3486   AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
3487   AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
3488   ;;
3490   AC_CHECK_LIB(m, cos, LIBM="-lm")
3491   ;;
3492 esac
3493 ])# AC_CHECK_LIBM
3496 # AC_LIBLTDL_CONVENIENCE([DIRECTORY])
3497 # -----------------------------------
3498 # sets LIBLTDL to the link flags for the libltdl convenience library and
3499 # LTDLINCL to the include flags for the libltdl header and adds
3500 # --enable-ltdl-convenience to the configure arguments.  Note that
3501 # AC_CONFIG_SUBDIRS is not called here.  If DIRECTORY is not provided,
3502 # it is assumed to be `libltdl'.  LIBLTDL will be prefixed with
3503 # '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/'
3504 # (note the single quotes!).  If your package is not flat and you're not
3505 # using automake, define top_builddir and top_srcdir appropriately in
3506 # the Makefiles.
3507 AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
3508 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3509   case $enable_ltdl_convenience in
3510   no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
3511   "") enable_ltdl_convenience=yes
3512       ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
3513   esac
3514   LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
3515   LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
3516   # For backwards non-gettext consistent compatibility...
3517   INCLTDL="$LTDLINCL"
3518 ])# AC_LIBLTDL_CONVENIENCE
3521 # AC_LIBLTDL_INSTALLABLE([DIRECTORY])
3522 # -----------------------------------
3523 # sets LIBLTDL to the link flags for the libltdl installable library and
3524 # LTDLINCL to the include flags for the libltdl header and adds
3525 # --enable-ltdl-install to the configure arguments.  Note that
3526 # AC_CONFIG_SUBDIRS is not called here.  If DIRECTORY is not provided,
3527 # and an installed libltdl is not found, it is assumed to be `libltdl'.
3528 # LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with
3529 # '${top_srcdir}/' (note the single quotes!).  If your package is not
3530 # flat and you're not using automake, define top_builddir and top_srcdir
3531 # appropriately in the Makefiles.
3532 # In the future, this macro may have to be called after AC_PROG_LIBTOOL.
3533 AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
3534 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3535   AC_CHECK_LIB(ltdl, lt_dlinit,
3536   [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
3537   [if test x"$enable_ltdl_install" = xno; then
3538      AC_MSG_WARN([libltdl not installed, but installation disabled])
3539    else
3540      enable_ltdl_install=yes
3541    fi
3542   ])
3543   if test x"$enable_ltdl_install" = x"yes"; then
3544     ac_configure_args="$ac_configure_args --enable-ltdl-install"
3545     LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
3546     LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
3547   else
3548     ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
3549     LIBLTDL="-lltdl"
3550     LTDLINCL=
3551   fi
3552   # For backwards non-gettext consistent compatibility...
3553   INCLTDL="$LTDLINCL"
3554 ])# AC_LIBLTDL_INSTALLABLE
3557 # AC_LIBTOOL_CXX
3558 # --------------
3559 # enable support for C++ libraries
3560 AC_DEFUN([AC_LIBTOOL_CXX],
3561 [AC_REQUIRE([_LT_AC_LANG_CXX])
3562 ])# AC_LIBTOOL_CXX
3565 # _LT_AC_LANG_CXX
3566 # ---------------
3567 AC_DEFUN([_LT_AC_LANG_CXX],
3568 [AC_REQUIRE([AC_PROG_CXX])
3569 AC_REQUIRE([_LT_AC_PROG_CXXCPP])
3570 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
3571 ])# _LT_AC_LANG_CXX
3573 # _LT_AC_PROG_CXXCPP
3574 # ------------------
3575 AC_DEFUN([_LT_AC_PROG_CXXCPP],
3577 AC_REQUIRE([AC_PROG_CXX])
3578 if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
3579     ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
3580     (test "X$CXX" != "Xg++"))) ; then
3581   AC_PROG_CXXCPP
3583 ])# _LT_AC_PROG_CXXCPP
3585 # AC_LIBTOOL_F77
3586 # --------------
3587 # enable support for Fortran 77 libraries
3588 AC_DEFUN([AC_LIBTOOL_F77],
3589 [AC_REQUIRE([_LT_AC_LANG_F77])
3590 ])# AC_LIBTOOL_F77
3593 # _LT_AC_LANG_F77
3594 # ---------------
3595 AC_DEFUN([_LT_AC_LANG_F77],
3596 [AC_REQUIRE([AC_PROG_F77])
3597 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
3598 ])# _LT_AC_LANG_F77
3601 # AC_LIBTOOL_GCJ
3602 # --------------
3603 # enable support for GCJ libraries
3604 AC_DEFUN([AC_LIBTOOL_GCJ],
3605 [AC_REQUIRE([_LT_AC_LANG_GCJ])
3606 ])# AC_LIBTOOL_GCJ
3609 # _LT_AC_LANG_GCJ
3610 # ---------------
3611 AC_DEFUN([_LT_AC_LANG_GCJ],
3612 [AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
3613   [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
3614     [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
3615       [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
3616          [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
3617            [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
3618 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
3619 ])# _LT_AC_LANG_GCJ
3622 # AC_LIBTOOL_RC
3623 # -------------
3624 # enable support for Windows resource files
3625 AC_DEFUN([AC_LIBTOOL_RC],
3626 [AC_REQUIRE([LT_AC_PROG_RC])
3627 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
3628 ])# AC_LIBTOOL_RC
3631 # AC_LIBTOOL_LANG_C_CONFIG
3632 # ------------------------
3633 # Ensure that the configuration vars for the C compiler are
3634 # suitably defined.  Those variables are subsequently used by
3635 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3636 AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
3637 AC_DEFUN([_LT_AC_LANG_C_CONFIG],
3638 [lt_save_CC="$CC"
3639 AC_LANG_PUSH(C)
3641 # Source file extension for C test sources.
3642 ac_ext=c
3644 # Object file extension for compiled C test sources.
3645 objext=o
3646 _LT_AC_TAGVAR(objext, $1)=$objext
3648 # Code to be used in simple compile tests
3649 lt_simple_compile_test_code="int some_variable = 0;"
3651 # Code to be used in simple link tests
3652 lt_simple_link_test_code='int main(){return(0);}'
3654 _LT_AC_SYS_COMPILER
3656 # save warnings/boilerplate of simple test code
3657 _LT_COMPILER_BOILERPLATE
3658 _LT_LINKER_BOILERPLATE
3660 AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
3661 AC_LIBTOOL_PROG_COMPILER_PIC($1)
3662 AC_LIBTOOL_PROG_CC_C_O($1)
3663 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
3664 AC_LIBTOOL_PROG_LD_SHLIBS($1)
3665 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
3666 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
3667 AC_LIBTOOL_SYS_LIB_STRIP
3668 AC_LIBTOOL_DLOPEN_SELF
3670 # Report which library types will actually be built
3671 AC_MSG_CHECKING([if libtool supports shared libraries])
3672 AC_MSG_RESULT([$can_build_shared])
3674 AC_MSG_CHECKING([whether to build shared libraries])
3675 test "$can_build_shared" = "no" && enable_shared=no
3677 # On AIX, shared libraries and static libraries use the same namespace, and
3678 # are all built from PIC.
3679 case $host_os in
3680 aix3*)
3681   test "$enable_shared" = yes && enable_static=no
3682   if test -n "$RANLIB"; then
3683     archive_cmds="$archive_cmds~\$RANLIB \$lib"
3684     postinstall_cmds='$RANLIB $lib'
3685   fi
3686   ;;
3688 aix[[4-9]]*)
3689   if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
3690     test "$enable_shared" = yes && enable_static=no
3691   fi
3692     ;;
3693 esac
3694 AC_MSG_RESULT([$enable_shared])
3696 AC_MSG_CHECKING([whether to build static libraries])
3697 # Make sure either enable_shared or enable_static is yes.
3698 test "$enable_shared" = yes || enable_static=yes
3699 AC_MSG_RESULT([$enable_static])
3701 AC_LIBTOOL_CONFIG($1)
3703 AC_LANG_POP
3704 CC="$lt_save_CC"
3705 ])# AC_LIBTOOL_LANG_C_CONFIG
3708 # AC_LIBTOOL_LANG_CXX_CONFIG
3709 # --------------------------
3710 # Ensure that the configuration vars for the C compiler are
3711 # suitably defined.  Those variables are subsequently used by
3712 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3713 AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
3714 AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
3715 [AC_LANG_PUSH(C++)
3716 AC_REQUIRE([AC_PROG_CXX])
3717 AC_REQUIRE([_LT_AC_PROG_CXXCPP])
3719 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3720 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
3721 _LT_AC_TAGVAR(always_export_symbols, $1)=no
3722 _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
3723 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
3724 _LT_AC_TAGVAR(hardcode_direct, $1)=no
3725 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
3726 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
3727 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
3728 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
3729 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
3730 _LT_AC_TAGVAR(hardcode_automatic, $1)=no
3731 _LT_AC_TAGVAR(module_cmds, $1)=
3732 _LT_AC_TAGVAR(module_expsym_cmds, $1)=
3733 _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
3734 _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
3735 _LT_AC_TAGVAR(no_undefined_flag, $1)=
3736 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
3737 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
3739 # Dependencies to place before and after the object being linked:
3740 _LT_AC_TAGVAR(predep_objects, $1)=
3741 _LT_AC_TAGVAR(postdep_objects, $1)=
3742 _LT_AC_TAGVAR(predeps, $1)=
3743 _LT_AC_TAGVAR(postdeps, $1)=
3744 _LT_AC_TAGVAR(compiler_lib_search_path, $1)=
3745 _LT_AC_TAGVAR(compiler_lib_search_dirs, $1)=
3747 # Source file extension for C++ test sources.
3748 ac_ext=cpp
3750 # Object file extension for compiled C++ test sources.
3751 objext=o
3752 _LT_AC_TAGVAR(objext, $1)=$objext
3754 # Code to be used in simple compile tests
3755 lt_simple_compile_test_code="int some_variable = 0;"
3757 # Code to be used in simple link tests
3758 lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
3760 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
3761 _LT_AC_SYS_COMPILER
3763 # save warnings/boilerplate of simple test code
3764 _LT_COMPILER_BOILERPLATE
3765 _LT_LINKER_BOILERPLATE
3767 # Allow CC to be a program name with arguments.
3768 lt_save_CC=$CC
3769 lt_save_LD=$LD
3770 lt_save_GCC=$GCC
3771 GCC=$GXX
3772 lt_save_with_gnu_ld=$with_gnu_ld
3773 lt_save_path_LD=$lt_cv_path_LD
3774 if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
3775   lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
3776 else
3777   $as_unset lt_cv_prog_gnu_ld
3779 if test -n "${lt_cv_path_LDCXX+set}"; then
3780   lt_cv_path_LD=$lt_cv_path_LDCXX
3781 else
3782   $as_unset lt_cv_path_LD
3784 test -z "${LDCXX+set}" || LD=$LDCXX
3785 CC=${CXX-"c++"}
3786 compiler=$CC
3787 _LT_AC_TAGVAR(compiler, $1)=$CC
3788 _LT_CC_BASENAME([$compiler])
3790 # We don't want -fno-exception wen compiling C++ code, so set the
3791 # no_builtin_flag separately
3792 if test "$GXX" = yes; then
3793   _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
3794 else
3795   _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
3798 if test "$GXX" = yes; then
3799   # Set up default GNU C++ configuration
3801   AC_PROG_LD
3803   # Check if GNU C++ uses GNU ld as the underlying linker, since the
3804   # archiving commands below assume that GNU ld is being used.
3805   if test "$with_gnu_ld" = yes; then
3806     _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
3807     _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'
3809     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
3810     _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3812     # If archive_cmds runs LD, not CC, wlarc should be empty
3813     # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
3814     #     investigate it a little bit more. (MM)
3815     wlarc='${wl}'
3817     # ancient GNU ld didn't support --whole-archive et. al.
3818     if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
3819         grep 'no-whole-archive' > /dev/null; then
3820       _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
3821     else
3822       _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
3823     fi
3824   else
3825     with_gnu_ld=no
3826     wlarc=
3828     # A generic and very simple default shared library creation
3829     # command for GNU C++ for the case where it uses the native
3830     # linker, instead of GNU ld.  If possible, this setting should
3831     # overridden to take advantage of the native linker features on
3832     # the platform it is being used on.
3833     _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
3834   fi
3836   # Commands to make compiler produce verbose output that lists
3837   # what "hidden" libraries, object files and flags are used when
3838   # linking a shared library.
3839   output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
3841 else
3842   GXX=no
3843   with_gnu_ld=no
3844   wlarc=
3847 # PORTME: fill in a description of your system's C++ link characteristics
3848 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
3849 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
3850 case $host_os in
3851   aix3*)
3852     # FIXME: insert proper C++ library support
3853     _LT_AC_TAGVAR(ld_shlibs, $1)=no
3854     ;;
3855   aix[[4-9]]*)
3856     if test "$host_cpu" = ia64; then
3857       # On IA64, the linker does run time linking by default, so we don't
3858       # have to do anything special.
3859       aix_use_runtimelinking=no
3860       exp_sym_flag='-Bexport'
3861       no_entry_flag=""
3862     else
3863       aix_use_runtimelinking=no
3865       # Test if we are trying to use run time linking or normal
3866       # AIX style linking. If -brtl is somewhere in LDFLAGS, we
3867       # need to do runtime linking.
3868       case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
3869         for ld_flag in $LDFLAGS; do
3870           case $ld_flag in
3871           *-brtl*)
3872             aix_use_runtimelinking=yes
3873             break
3874             ;;
3875           esac
3876         done
3877         ;;
3878       esac
3880       exp_sym_flag='-bexport'
3881       no_entry_flag='-bnoentry'
3882     fi
3884     # When large executables or shared objects are built, AIX ld can
3885     # have problems creating the table of contents.  If linking a library
3886     # or program results in "error TOC overflow" add -mminimal-toc to
3887     # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
3888     # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
3890     _LT_AC_TAGVAR(archive_cmds, $1)=''
3891     _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3892     _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
3893     _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3895     if test "$GXX" = yes; then
3896       case $host_os in aix4.[[012]]|aix4.[[012]].*)
3897       # We only want to do this on AIX 4.2 and lower, the check
3898       # below for broken collect2 doesn't work under 4.3+
3899         collect2name=`${CC} -print-prog-name=collect2`
3900         if test -f "$collect2name" && \
3901            strings "$collect2name" | grep resolve_lib_name >/dev/null
3902         then
3903           # We have reworked collect2
3904           :
3905         else
3906           # We have old collect2
3907           _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
3908           # It fails to find uninstalled libraries when the uninstalled
3909           # path is not listed in the libpath.  Setting hardcode_minus_L
3910           # to unsupported forces relinking
3911           _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
3912           _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3913           _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
3914         fi
3915         ;;
3916       esac
3917       shared_flag='-shared'
3918       if test "$aix_use_runtimelinking" = yes; then
3919         shared_flag="$shared_flag "'${wl}-G'
3920       fi
3921     else
3922       # not using gcc
3923       if test "$host_cpu" = ia64; then
3924         # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
3925         # chokes on -Wl,-G. The following line is correct:
3926         shared_flag='-G'
3927       else
3928         if test "$aix_use_runtimelinking" = yes; then
3929           shared_flag='${wl}-G'
3930         else
3931           shared_flag='${wl}-bM:SRE'
3932         fi
3933       fi
3934     fi
3936     # It seems that -bexpall does not export symbols beginning with
3937     # underscore (_), so it is better to generate a list of symbols to export.
3938     _LT_AC_TAGVAR(always_export_symbols, $1)=yes
3939     if test "$aix_use_runtimelinking" = yes; then
3940       # Warning - without using the other runtime loading flags (-brtl),
3941       # -berok will link without error, but may produce a broken library.
3942       _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
3943       # Determine the default libpath from the value encoded in an empty executable.
3944       _LT_AC_SYS_LIBPATH_AIX
3945       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
3947       _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
3948      else
3949       if test "$host_cpu" = ia64; then
3950         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
3951         _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
3952         _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
3953       else
3954         # Determine the default libpath from the value encoded in an empty executable.
3955         _LT_AC_SYS_LIBPATH_AIX
3956         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
3957         # Warning - without using the other run time loading flags,
3958         # -berok will link without error, but may produce a broken library.
3959         _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
3960         _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
3961         # Exported symbols can be pulled into shared objects from archives
3962         _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
3963         _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
3964         # This is similar to how AIX traditionally builds its shared libraries.
3965         _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
3966       fi
3967     fi
3968     ;;
3970   beos*)
3971     if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
3972       _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
3973       # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
3974       # support --undefined.  This deserves some investigation.  FIXME
3975       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
3976     else
3977       _LT_AC_TAGVAR(ld_shlibs, $1)=no
3978     fi
3979     ;;
3981   chorus*)
3982     case $cc_basename in
3983       *)
3984         # FIXME: insert proper C++ library support
3985         _LT_AC_TAGVAR(ld_shlibs, $1)=no
3986         ;;
3987     esac
3988     ;;
3990   cygwin* | mingw* | pw32*)
3991     # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
3992     # as there is no search path for DLLs.
3993     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3994     _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
3995     _LT_AC_TAGVAR(always_export_symbols, $1)=no
3996     _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
3998     if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
3999       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
4000       # If the export-symbols file already is a .def file (1st line
4001       # is EXPORTS), use it as is; otherwise, prepend...
4002       _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
4003         cp $export_symbols $output_objdir/$soname.def;
4004       else
4005         echo EXPORTS > $output_objdir/$soname.def;
4006         cat $export_symbols >> $output_objdir/$soname.def;
4007       fi~
4008       $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
4009     else
4010       _LT_AC_TAGVAR(ld_shlibs, $1)=no
4011     fi
4012   ;;
4013       darwin* | rhapsody*)
4014       _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4015       _LT_AC_TAGVAR(hardcode_direct, $1)=no
4016       _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
4017       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
4018       _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
4019       _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4020       _LT_AC_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
4021       if test "$GXX" = yes ; then
4022       output_verbose_link_cmd='echo'
4023       _LT_AC_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
4024       _LT_AC_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
4025       _LT_AC_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
4026       _LT_AC_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
4027       if test "$lt_cv_apple_cc_single_mod" != "yes"; then
4028         _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${_lt_dsymutil}"
4029         _LT_AC_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}"
4030       fi
4031       else
4032       case $cc_basename in
4033         xlc*)
4034          output_verbose_link_cmd='echo'
4035           _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` $xlcverstring'
4036           _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
4037           # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
4038           _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 $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
4039           _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}'
4040           ;;
4041        *)
4042          _LT_AC_TAGVAR(ld_shlibs, $1)=no
4043           ;;
4044       esac
4045       fi
4046         ;;
4048   dgux*)
4049     case $cc_basename in
4050       ec++*)
4051         # FIXME: insert proper C++ library support
4052         _LT_AC_TAGVAR(ld_shlibs, $1)=no
4053         ;;
4054       ghcx*)
4055         # Green Hills C++ Compiler
4056         # FIXME: insert proper C++ library support
4057         _LT_AC_TAGVAR(ld_shlibs, $1)=no
4058         ;;
4059       *)
4060         # FIXME: insert proper C++ library support
4061         _LT_AC_TAGVAR(ld_shlibs, $1)=no
4062         ;;
4063     esac
4064     ;;
4065   freebsd[[12]]*)
4066     # C++ shared libraries reported to be fairly broken before switch to ELF
4067     _LT_AC_TAGVAR(ld_shlibs, $1)=no
4068     ;;
4069   freebsd-elf*)
4070     _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4071     ;;
4072   freebsd* | dragonfly*)
4073     # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
4074     # conventions
4075     _LT_AC_TAGVAR(ld_shlibs, $1)=yes
4076     ;;
4077   gnu*)
4078     ;;
4079   hpux9*)
4080     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
4081     _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4082     _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4083     _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4084     _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
4085                                 # but as the default
4086                                 # location of the library.
4088     case $cc_basename in
4089     CC*)
4090       # FIXME: insert proper C++ library support
4091       _LT_AC_TAGVAR(ld_shlibs, $1)=no
4092       ;;
4093     aCC*)
4094       _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'
4095       # Commands to make compiler produce verbose output that lists
4096       # what "hidden" libraries, object files and flags are used when
4097       # linking a shared library.
4098       #
4099       # There doesn't appear to be a way to prevent this compiler from
4100       # explicitly linking system object files so we need to strip them
4101       # from the output so that they don't get included in the library
4102       # dependencies.
4103       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'
4104       ;;
4105     *)
4106       if test "$GXX" = yes; then
4107         _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'
4108       else
4109         # FIXME: insert proper C++ library support
4110         _LT_AC_TAGVAR(ld_shlibs, $1)=no
4111       fi
4112       ;;
4113     esac
4114     ;;
4115   hpux10*|hpux11*)
4116     if test $with_gnu_ld = no; then
4117       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
4118       _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4120       case $host_cpu in
4121       hppa*64*|ia64*) ;;
4122       *)
4123         _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4124         ;;
4125       esac
4126     fi
4127     case $host_cpu in
4128     hppa*64*|ia64*)
4129       _LT_AC_TAGVAR(hardcode_direct, $1)=no
4130       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4131       ;;
4132     *)
4133       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4134       _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
4135                                               # but as the default
4136                                               # location of the library.
4137       ;;
4138     esac
4140     case $cc_basename in
4141       CC*)
4142         # FIXME: insert proper C++ library support
4143         _LT_AC_TAGVAR(ld_shlibs, $1)=no
4144         ;;
4145       aCC*)
4146         case $host_cpu in
4147         hppa*64*)
4148           _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
4149           ;;
4150         ia64*)
4151           _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
4152           ;;
4153         *)
4154           _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'
4155           ;;
4156         esac
4157         # Commands to make compiler produce verbose output that lists
4158         # what "hidden" libraries, object files and flags are used when
4159         # linking a shared library.
4160         #
4161         # There doesn't appear to be a way to prevent this compiler from
4162         # explicitly linking system object files so we need to strip them
4163         # from the output so that they don't get included in the library
4164         # dependencies.
4165         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'
4166         ;;
4167       *)
4168         if test "$GXX" = yes; then
4169           if test $with_gnu_ld = no; then
4170             case $host_cpu in
4171             hppa*64*)
4172               _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
4173               ;;
4174             ia64*)
4175               _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
4176               ;;
4177             *)
4178               _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'
4179               ;;
4180             esac
4181           fi
4182         else
4183           # FIXME: insert proper C++ library support
4184           _LT_AC_TAGVAR(ld_shlibs, $1)=no
4185         fi
4186         ;;
4187     esac
4188     ;;
4189   interix[[3-9]]*)
4190     _LT_AC_TAGVAR(hardcode_direct, $1)=no
4191     _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4192     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4193     _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4194     # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
4195     # Instead, shared libraries are loaded at an image base (0x10000000 by
4196     # default) and relocated if they conflict, which is a slow very memory
4197     # consuming and fragmenting process.  To avoid this, we pick a random,
4198     # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
4199     # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
4200     _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
4201     _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
4202     ;;
4203   irix5* | irix6*)
4204     case $cc_basename in
4205       CC*)
4206         # SGI C++
4207         _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'
4209         # Archives containing C++ object files must be created using
4210         # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
4211         # necessary to make sure instantiated templates are included
4212         # in the archive.
4213         _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
4214         ;;
4215       *)
4216         if test "$GXX" = yes; then
4217           if test "$with_gnu_ld" = no; then
4218             _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'
4219           else
4220             _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'
4221           fi
4222         fi
4223         _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4224         ;;
4225     esac
4226     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4227     _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4228     ;;
4229   linux* | k*bsd*-gnu)
4230     case $cc_basename in
4231       KCC*)
4232         # Kuck and Associates, Inc. (KAI) C++ Compiler
4234         # KCC will only create a shared library if the output file
4235         # ends with ".so" (or ".sl" for HP-UX), so rename the library
4236         # to its proper name (with version) after linking.
4237         _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'
4238         _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'
4239         # Commands to make compiler produce verbose output that lists
4240         # what "hidden" libraries, object files and flags are used when
4241         # linking a shared library.
4242         #
4243         # There doesn't appear to be a way to prevent this compiler from
4244         # explicitly linking system object files so we need to strip them
4245         # from the output so that they don't get included in the library
4246         # dependencies.
4247         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'
4249         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
4250         _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4252         # Archives containing C++ object files must be created using
4253         # "CC -Bstatic", where "CC" is the KAI C++ compiler.
4254         _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
4255         ;;
4256       icpc*)
4257         # Intel C++
4258         with_gnu_ld=yes
4259         # version 8.0 and above of icpc choke on multiply defined symbols
4260         # if we add $predep_objects and $postdep_objects, however 7.1 and
4261         # earlier do not add the objects themselves.
4262         case `$CC -V 2>&1` in
4263         *"Version 7."*)
4264           _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
4265           _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'
4266           ;;
4267         *)  # Version 8.0 or newer
4268           tmp_idyn=
4269           case $host_cpu in
4270             ia64*) tmp_idyn=' -i_dynamic';;
4271           esac
4272           _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4273           _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'
4274           ;;
4275         esac
4276         _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4277         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4278         _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4279         _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
4280         ;;
4281       pgCC* | pgcpp*)
4282         # Portland Group C++ compiler
4283         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
4284         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
4286         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
4287         _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4288         _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
4289         ;;
4290       cxx*)
4291         # Compaq C++
4292         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
4293         _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'
4295         runpath_var=LD_RUN_PATH
4296         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
4297         _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4299         # Commands to make compiler produce verbose output that lists
4300         # what "hidden" libraries, object files and flags are used when
4301         # linking a shared library.
4302         #
4303         # There doesn't appear to be a way to prevent this compiler from
4304         # explicitly linking system object files so we need to strip them
4305         # from the output so that they don't get included in the library
4306         # dependencies.
4307         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'
4308         ;;
4309       *)
4310         case `$CC -V 2>&1 | sed 5q` in
4311         *Sun\ C*)
4312           # Sun C++ 5.9
4313           _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
4314           _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
4315           _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
4316           _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4317           _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
4319           # Not sure whether something based on
4320           # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
4321           # would be better.
4322           output_verbose_link_cmd='echo'
4324           # Archives containing C++ object files must be created using
4325           # "CC -xar", where "CC" is the Sun C++ compiler.  This is
4326           # necessary to make sure instantiated templates are included
4327           # in the archive.
4328           _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
4329           ;;
4330         esac
4331         ;;
4332     esac
4333     ;;
4334   lynxos*)
4335     # FIXME: insert proper C++ library support
4336     _LT_AC_TAGVAR(ld_shlibs, $1)=no
4337     ;;
4338   m88k*)
4339     # FIXME: insert proper C++ library support
4340     _LT_AC_TAGVAR(ld_shlibs, $1)=no
4341     ;;
4342   mvs*)
4343     case $cc_basename in
4344       cxx*)
4345         # FIXME: insert proper C++ library support
4346         _LT_AC_TAGVAR(ld_shlibs, $1)=no
4347         ;;
4348       *)
4349         # FIXME: insert proper C++ library support
4350         _LT_AC_TAGVAR(ld_shlibs, $1)=no
4351         ;;
4352     esac
4353     ;;
4354   netbsd*)
4355     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
4356       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
4357       wlarc=
4358       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4359       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4360       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4361     fi
4362     # Workaround some broken pre-1.5 toolchains
4363     output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
4364     ;;
4365   openbsd2*)
4366     # C++ shared libraries are fairly broken
4367     _LT_AC_TAGVAR(ld_shlibs, $1)=no
4368     ;;
4369   openbsd*)
4370     if test -f /usr/libexec/ld.so; then
4371       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4372       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4373       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
4374       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4375       if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
4376         _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'
4377         _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4378         _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
4379       fi
4380       output_verbose_link_cmd='echo'
4381     else
4382       _LT_AC_TAGVAR(ld_shlibs, $1)=no
4383     fi
4384     ;;
4385   osf3*)
4386     case $cc_basename in
4387       KCC*)
4388         # Kuck and Associates, Inc. (KAI) C++ Compiler
4390         # KCC will only create a shared library if the output file
4391         # ends with ".so" (or ".sl" for HP-UX), so rename the library
4392         # to its proper name (with version) after linking.
4393         _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'
4395         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4396         _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4398         # Archives containing C++ object files must be created using
4399         # "CC -Bstatic", where "CC" is the KAI C++ compiler.
4400         _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
4402         ;;
4403       RCC*)
4404         # Rational C++ 2.4.1
4405         # FIXME: insert proper C++ library support
4406         _LT_AC_TAGVAR(ld_shlibs, $1)=no
4407         ;;
4408       cxx*)
4409         _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4410         _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'
4412         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4413         _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4415         # Commands to make compiler produce verbose output that lists
4416         # what "hidden" libraries, object files and flags are used when
4417         # linking a shared library.
4418         #
4419         # There doesn't appear to be a way to prevent this compiler from
4420         # explicitly linking system object files so we need to strip them
4421         # from the output so that they don't get included in the library
4422         # dependencies.
4423         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'
4424         ;;
4425       *)
4426         if test "$GXX" = yes && test "$with_gnu_ld" = no; then
4427           _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4428           _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'
4430           _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4431           _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4433           # Commands to make compiler produce verbose output that lists
4434           # what "hidden" libraries, object files and flags are used when
4435           # linking a shared library.
4436           output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
4438         else
4439           # FIXME: insert proper C++ library support
4440           _LT_AC_TAGVAR(ld_shlibs, $1)=no
4441         fi
4442         ;;
4443     esac
4444     ;;
4445   osf4* | osf5*)
4446     case $cc_basename in
4447       KCC*)
4448         # Kuck and Associates, Inc. (KAI) C++ Compiler
4450         # KCC will only create a shared library if the output file
4451         # ends with ".so" (or ".sl" for HP-UX), so rename the library
4452         # to its proper name (with version) after linking.
4453         _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'
4455         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4456         _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4458         # Archives containing C++ object files must be created using
4459         # the KAI C++ compiler.
4460         _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
4461         ;;
4462       RCC*)
4463         # Rational C++ 2.4.1
4464         # FIXME: insert proper C++ library support
4465         _LT_AC_TAGVAR(ld_shlibs, $1)=no
4466         ;;
4467       cxx*)
4468         _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
4469         _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'
4470         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
4471           echo "-hidden">> $lib.exp~
4472           $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~
4473           $rm $lib.exp'
4475         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
4476         _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4478         # Commands to make compiler produce verbose output that lists
4479         # what "hidden" libraries, object files and flags are used when
4480         # linking a shared library.
4481         #
4482         # There doesn't appear to be a way to prevent this compiler from
4483         # explicitly linking system object files so we need to strip them
4484         # from the output so that they don't get included in the library
4485         # dependencies.
4486         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'
4487         ;;
4488       *)
4489         if test "$GXX" = yes && test "$with_gnu_ld" = no; then
4490           _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4491          _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'
4493           _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4494           _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4496           # Commands to make compiler produce verbose output that lists
4497           # what "hidden" libraries, object files and flags are used when
4498           # linking a shared library.
4499           output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
4501         else
4502           # FIXME: insert proper C++ library support
4503           _LT_AC_TAGVAR(ld_shlibs, $1)=no
4504         fi
4505         ;;
4506     esac
4507     ;;
4508   psos*)
4509     # FIXME: insert proper C++ library support
4510     _LT_AC_TAGVAR(ld_shlibs, $1)=no
4511     ;;
4512   sunos4*)
4513     case $cc_basename in
4514       CC*)
4515         # Sun C++ 4.x
4516         # FIXME: insert proper C++ library support
4517         _LT_AC_TAGVAR(ld_shlibs, $1)=no
4518         ;;
4519       lcc*)
4520         # Lucid
4521         # FIXME: insert proper C++ library support
4522         _LT_AC_TAGVAR(ld_shlibs, $1)=no
4523         ;;
4524       *)
4525         # FIXME: insert proper C++ library support
4526         _LT_AC_TAGVAR(ld_shlibs, $1)=no
4527         ;;
4528     esac
4529     ;;
4530   solaris*)
4531     case $cc_basename in
4532       CC*)
4533         # Sun C++ 4.2, 5.x and Centerline C++
4534         _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes
4535         _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
4536         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
4537         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
4538         $CC -G${allow_undefined_flag}  ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
4540         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4541         _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4542         case $host_os in
4543           solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
4544           *)
4545             # The compiler driver will combine and reorder linker options,
4546             # but understands `-z linker_flag'.
4547             # Supported since Solaris 2.6 (maybe 2.5.1?)
4548             _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
4549             ;;
4550         esac
4551         _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4553         output_verbose_link_cmd='echo'
4555         # Archives containing C++ object files must be created using
4556         # "CC -xar", where "CC" is the Sun C++ compiler.  This is
4557         # necessary to make sure instantiated templates are included
4558         # in the archive.
4559         _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
4560         ;;
4561       gcx*)
4562         # Green Hills C++ Compiler
4563         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
4565         # The C++ compiler must be used to create the archive.
4566         _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
4567         ;;
4568       *)
4569         # GNU C++ compiler with Solaris linker
4570         if test "$GXX" = yes && test "$with_gnu_ld" = no; then
4571           _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
4572           if $CC --version | grep -v '^2\.7' > /dev/null; then
4573             _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
4574             _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
4575                 $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
4577             # Commands to make compiler produce verbose output that lists
4578             # what "hidden" libraries, object files and flags are used when
4579             # linking a shared library.
4580             output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
4581           else
4582             # g++ 2.7 appears to require `-G' NOT `-shared' on this
4583             # platform.
4584             _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
4585             _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
4586                 $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
4588             # Commands to make compiler produce verbose output that lists
4589             # what "hidden" libraries, object files and flags are used when
4590             # linking a shared library.
4591             output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
4592           fi
4594           _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
4595           case $host_os in
4596           solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
4597           *)
4598             _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
4599             ;;
4600           esac
4601         fi
4602         ;;
4603     esac
4604     ;;
4605   sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
4606     _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
4607     _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4608     _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4609     runpath_var='LD_RUN_PATH'
4611     case $cc_basename in
4612       CC*)
4613         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
4614         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
4615         ;;
4616       *)
4617         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
4618         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
4619         ;;
4620     esac
4621     ;;
4622   sysv5* | sco3.2v5* | sco5v6*)
4623     # Note: We can NOT use -z defs as we might desire, because we do not
4624     # link with -lc, and that would cause any symbols used from libc to
4625     # always be unresolved, which means just about no library would
4626     # ever link correctly.  If we're not using GNU ld we use -z text
4627     # though, which does catch some bad symbols but isn't as heavy-handed
4628     # as -z defs.
4629     # For security reasons, it is highly recommended that you always
4630     # use absolute paths for naming shared libraries, and exclude the
4631     # DT_RUNPATH tag from executables and libraries.  But doing so
4632     # requires that you compile everything twice, which is a pain.
4633     # So that behaviour is only enabled if SCOABSPATH is set to a
4634     # non-empty value in the environment.  Most likely only useful for
4635     # creating official distributions of packages.
4636     # This is a hack until libtool officially supports absolute path
4637     # names for shared libraries.
4638     _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
4639     _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
4640     _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4641     _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4642     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
4643     _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
4644     _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4645     _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
4646     runpath_var='LD_RUN_PATH'
4648     case $cc_basename in
4649       CC*)
4650         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
4651         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
4652         ;;
4653       *)
4654         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
4655         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
4656         ;;
4657     esac
4658     ;;
4659   tandem*)
4660     case $cc_basename in
4661       NCC*)
4662         # NonStop-UX NCC 3.20
4663         # FIXME: insert proper C++ library support
4664         _LT_AC_TAGVAR(ld_shlibs, $1)=no
4665         ;;
4666       *)
4667         # FIXME: insert proper C++ library support
4668         _LT_AC_TAGVAR(ld_shlibs, $1)=no
4669         ;;
4670     esac
4671     ;;
4672   vxworks*)
4673     # FIXME: insert proper C++ library support
4674     _LT_AC_TAGVAR(ld_shlibs, $1)=no
4675     ;;
4676   *)
4677     # FIXME: insert proper C++ library support
4678     _LT_AC_TAGVAR(ld_shlibs, $1)=no
4679     ;;
4680 esac
4681 AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
4682 test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
4684 _LT_AC_TAGVAR(GCC, $1)="$GXX"
4685 _LT_AC_TAGVAR(LD, $1)="$LD"
4687 AC_LIBTOOL_POSTDEP_PREDEP($1)
4688 AC_LIBTOOL_PROG_COMPILER_PIC($1)
4689 AC_LIBTOOL_PROG_CC_C_O($1)
4690 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
4691 AC_LIBTOOL_PROG_LD_SHLIBS($1)
4692 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
4693 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
4695 AC_LIBTOOL_CONFIG($1)
4697 AC_LANG_POP
4698 CC=$lt_save_CC
4699 LDCXX=$LD
4700 LD=$lt_save_LD
4701 GCC=$lt_save_GCC
4702 with_gnu_ldcxx=$with_gnu_ld
4703 with_gnu_ld=$lt_save_with_gnu_ld
4704 lt_cv_path_LDCXX=$lt_cv_path_LD
4705 lt_cv_path_LD=$lt_save_path_LD
4706 lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
4707 lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
4708 ])# AC_LIBTOOL_LANG_CXX_CONFIG
4710 # AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
4711 # ------------------------------------
4712 # Figure out "hidden" library dependencies from verbose
4713 # compiler output when linking a shared library.
4714 # Parse the compiler output and extract the necessary
4715 # objects, libraries and library flags.
4716 AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],
4717 [AC_REQUIRE([LT_AC_PROG_SED])dnl
4718 dnl we can't use the lt_simple_compile_test_code here,
4719 dnl because it contains code intended for an executable,
4720 dnl not a library.  It's possible we should let each
4721 dnl tag define a new lt_????_link_test_code variable,
4722 dnl but it's only used here...
4723 ifelse([$1],[],[cat > conftest.$ac_ext <<EOF
4724 int a;
4725 void foo (void) { a = 0; }
4727 ],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
4728 class Foo
4730 public:
4731   Foo (void) { a = 0; }
4732 private:
4733   int a;
4736 ],[$1],[F77],[cat > conftest.$ac_ext <<EOF
4737       subroutine foo
4738       implicit none
4739       integer*4 a
4740       a=0
4741       return
4742       end
4744 ],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
4745 public class foo {
4746   private int a;
4747   public void bar (void) {
4748     a = 0;
4749   }
4753 dnl Parse the compiler output and extract the necessary
4754 dnl objects, libraries and library flags.
4755 if AC_TRY_EVAL(ac_compile); then
4756   # Parse the compiler output and extract the necessary
4757   # objects, libraries and library flags.
4759   # Sentinel used to keep track of whether or not we are before
4760   # the conftest object file.
4761   pre_test_object_deps_done=no
4763   # The `*' in the case matches for architectures that use `case' in
4764   # $output_verbose_cmd can trigger glob expansion during the loop
4765   # eval without this substitution.
4766   output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"`
4768   for p in `eval $output_verbose_link_cmd`; do
4769     case $p in
4771     -L* | -R* | -l*)
4772        # Some compilers place space between "-{L,R}" and the path.
4773        # Remove the space.
4774        if test $p = "-L" \
4775           || test $p = "-R"; then
4776          prev=$p
4777          continue
4778        else
4779          prev=
4780        fi
4782        if test "$pre_test_object_deps_done" = no; then
4783          case $p in
4784          -L* | -R*)
4785            # Internal compiler library paths should come after those
4786            # provided the user.  The postdeps already come after the
4787            # user supplied libs so there is no need to process them.
4788            if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
4789              _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
4790            else
4791              _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
4792            fi
4793            ;;
4794          # The "-l" case would never come before the object being
4795          # linked, so don't bother handling this case.
4796          esac
4797        else
4798          if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
4799            _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
4800          else
4801            _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
4802          fi
4803        fi
4804        ;;
4806     *.$objext)
4807        # This assumes that the test object file only shows up
4808        # once in the compiler output.
4809        if test "$p" = "conftest.$objext"; then
4810          pre_test_object_deps_done=yes
4811          continue
4812        fi
4814        if test "$pre_test_object_deps_done" = no; then
4815          if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
4816            _LT_AC_TAGVAR(predep_objects, $1)="$p"
4817          else
4818            _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
4819          fi
4820        else
4821          if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
4822            _LT_AC_TAGVAR(postdep_objects, $1)="$p"
4823          else
4824            _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
4825          fi
4826        fi
4827        ;;
4829     *) ;; # Ignore the rest.
4831     esac
4832   done
4834   # Clean up.
4835   rm -f a.out a.exe
4836 else
4837   echo "libtool.m4: error: problem compiling $1 test program"
4840 $rm -f confest.$objext
4842 _LT_AC_TAGVAR(compiler_lib_search_dirs, $1)=
4843 if test -n "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
4844   _LT_AC_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_AC_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
4847 # PORTME: override above test on systems where it is broken
4848 ifelse([$1],[CXX],
4849 [case $host_os in
4850 interix[[3-9]]*)
4851   # Interix 3.5 installs completely hosed .la files for C++, so rather than
4852   # hack all around it, let's just trust "g++" to DTRT.
4853   _LT_AC_TAGVAR(predep_objects,$1)=
4854   _LT_AC_TAGVAR(postdep_objects,$1)=
4855   _LT_AC_TAGVAR(postdeps,$1)=
4856   ;;
4858 linux*)
4859   case `$CC -V 2>&1 | sed 5q` in
4860   *Sun\ C*)
4861     # Sun C++ 5.9
4862     #
4863     # The more standards-conforming stlport4 library is
4864     # incompatible with the Cstd library. Avoid specifying
4865     # it if it's in CXXFLAGS. Ignore libCrun as
4866     # -library=stlport4 depends on it.
4867     case " $CXX $CXXFLAGS " in
4868     *" -library=stlport4 "*)
4869       solaris_use_stlport4=yes
4870       ;;
4871     esac
4872     if test "$solaris_use_stlport4" != yes; then
4873       _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
4874     fi
4875     ;;
4876   esac
4877   ;;
4879 solaris*)
4880   case $cc_basename in
4881   CC*)
4882     # The more standards-conforming stlport4 library is
4883     # incompatible with the Cstd library. Avoid specifying
4884     # it if it's in CXXFLAGS. Ignore libCrun as
4885     # -library=stlport4 depends on it.
4886     case " $CXX $CXXFLAGS " in
4887     *" -library=stlport4 "*)
4888       solaris_use_stlport4=yes
4889       ;;
4890     esac
4892     # Adding this requires a known-good setup of shared libraries for
4893     # Sun compiler versions before 5.6, else PIC objects from an old
4894     # archive will be linked into the output, leading to subtle bugs.
4895     if test "$solaris_use_stlport4" != yes; then
4896       _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
4897     fi
4898     ;;
4899   esac
4900   ;;
4901 esac
4903 case " $_LT_AC_TAGVAR(postdeps, $1) " in
4904 *" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
4905 esac
4906 ])# AC_LIBTOOL_POSTDEP_PREDEP
4908 # AC_LIBTOOL_LANG_F77_CONFIG
4909 # --------------------------
4910 # Ensure that the configuration vars for the C compiler are
4911 # suitably defined.  Those variables are subsequently used by
4912 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4913 AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
4914 AC_DEFUN([_LT_AC_LANG_F77_CONFIG],
4915 [AC_REQUIRE([AC_PROG_F77])
4916 AC_LANG_PUSH(Fortran 77)
4918 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4919 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
4920 _LT_AC_TAGVAR(always_export_symbols, $1)=no
4921 _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
4922 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
4923 _LT_AC_TAGVAR(hardcode_direct, $1)=no
4924 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
4925 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
4926 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
4927 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
4928 _LT_AC_TAGVAR(hardcode_automatic, $1)=no
4929 _LT_AC_TAGVAR(module_cmds, $1)=
4930 _LT_AC_TAGVAR(module_expsym_cmds, $1)=
4931 _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
4932 _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
4933 _LT_AC_TAGVAR(no_undefined_flag, $1)=
4934 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
4935 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
4937 # Source file extension for f77 test sources.
4938 ac_ext=f
4940 # Object file extension for compiled f77 test sources.
4941 objext=o
4942 _LT_AC_TAGVAR(objext, $1)=$objext
4944 # Code to be used in simple compile tests
4945 lt_simple_compile_test_code="\
4946       subroutine t
4947       return
4948       end
4951 # Code to be used in simple link tests
4952 lt_simple_link_test_code="\
4953       program t
4954       end
4957 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
4958 _LT_AC_SYS_COMPILER
4960 # save warnings/boilerplate of simple test code
4961 _LT_COMPILER_BOILERPLATE
4962 _LT_LINKER_BOILERPLATE
4964 # Allow CC to be a program name with arguments.
4965 lt_save_CC="$CC"
4966 CC=${F77-"f77"}
4967 compiler=$CC
4968 _LT_AC_TAGVAR(compiler, $1)=$CC
4969 _LT_CC_BASENAME([$compiler])
4971 AC_MSG_CHECKING([if libtool supports shared libraries])
4972 AC_MSG_RESULT([$can_build_shared])
4974 AC_MSG_CHECKING([whether to build shared libraries])
4975 test "$can_build_shared" = "no" && enable_shared=no
4977 # On AIX, shared libraries and static libraries use the same namespace, and
4978 # are all built from PIC.
4979 case $host_os in
4980 aix3*)
4981   test "$enable_shared" = yes && enable_static=no
4982   if test -n "$RANLIB"; then
4983     archive_cmds="$archive_cmds~\$RANLIB \$lib"
4984     postinstall_cmds='$RANLIB $lib'
4985   fi
4986   ;;
4987 aix[[4-9]]*)
4988   if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
4989     test "$enable_shared" = yes && enable_static=no
4990   fi
4991   ;;
4992 esac
4993 AC_MSG_RESULT([$enable_shared])
4995 AC_MSG_CHECKING([whether to build static libraries])
4996 # Make sure either enable_shared or enable_static is yes.
4997 test "$enable_shared" = yes || enable_static=yes
4998 AC_MSG_RESULT([$enable_static])
5000 _LT_AC_TAGVAR(GCC, $1)="$G77"
5001 _LT_AC_TAGVAR(LD, $1)="$LD"
5003 AC_LIBTOOL_PROG_COMPILER_PIC($1)
5004 AC_LIBTOOL_PROG_CC_C_O($1)
5005 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
5006 AC_LIBTOOL_PROG_LD_SHLIBS($1)
5007 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
5008 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
5010 AC_LIBTOOL_CONFIG($1)
5012 AC_LANG_POP
5013 CC="$lt_save_CC"
5014 ])# AC_LIBTOOL_LANG_F77_CONFIG
5017 # AC_LIBTOOL_LANG_GCJ_CONFIG
5018 # --------------------------
5019 # Ensure that the configuration vars for the C compiler are
5020 # suitably defined.  Those variables are subsequently used by
5021 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
5022 AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
5023 AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
5024 [AC_LANG_SAVE
5026 # Source file extension for Java test sources.
5027 ac_ext=java
5029 # Object file extension for compiled Java test sources.
5030 objext=o
5031 _LT_AC_TAGVAR(objext, $1)=$objext
5033 # Code to be used in simple compile tests
5034 lt_simple_compile_test_code="class foo {}"
5036 # Code to be used in simple link tests
5037 lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
5039 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
5040 _LT_AC_SYS_COMPILER
5042 # save warnings/boilerplate of simple test code
5043 _LT_COMPILER_BOILERPLATE
5044 _LT_LINKER_BOILERPLATE
5046 # Allow CC to be a program name with arguments.
5047 lt_save_CC="$CC"
5048 CC=${GCJ-"gcj"}
5049 compiler=$CC
5050 _LT_AC_TAGVAR(compiler, $1)=$CC
5051 _LT_CC_BASENAME([$compiler])
5053 # GCJ did not exist at the time GCC didn't implicitly link libc in.
5054 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
5056 _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
5058 AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
5059 AC_LIBTOOL_PROG_COMPILER_PIC($1)
5060 AC_LIBTOOL_PROG_CC_C_O($1)
5061 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
5062 AC_LIBTOOL_PROG_LD_SHLIBS($1)
5063 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
5064 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
5066 AC_LIBTOOL_CONFIG($1)
5068 AC_LANG_RESTORE
5069 CC="$lt_save_CC"
5070 ])# AC_LIBTOOL_LANG_GCJ_CONFIG
5073 # AC_LIBTOOL_LANG_RC_CONFIG
5074 # -------------------------
5075 # Ensure that the configuration vars for the Windows resource compiler are
5076 # suitably defined.  Those variables are subsequently used by
5077 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
5078 AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
5079 AC_DEFUN([_LT_AC_LANG_RC_CONFIG],
5080 [AC_LANG_SAVE
5082 # Source file extension for RC test sources.
5083 ac_ext=rc
5085 # Object file extension for compiled RC test sources.
5086 objext=o
5087 _LT_AC_TAGVAR(objext, $1)=$objext
5089 # Code to be used in simple compile tests
5090 lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
5092 # Code to be used in simple link tests
5093 lt_simple_link_test_code="$lt_simple_compile_test_code"
5095 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
5096 _LT_AC_SYS_COMPILER
5098 # save warnings/boilerplate of simple test code
5099 _LT_COMPILER_BOILERPLATE
5100 _LT_LINKER_BOILERPLATE
5102 # Allow CC to be a program name with arguments.
5103 lt_save_CC="$CC"
5104 CC=${RC-"windres"}
5105 compiler=$CC
5106 _LT_AC_TAGVAR(compiler, $1)=$CC
5107 _LT_CC_BASENAME([$compiler])
5108 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
5110 AC_LIBTOOL_CONFIG($1)
5112 AC_LANG_RESTORE
5113 CC="$lt_save_CC"
5114 ])# AC_LIBTOOL_LANG_RC_CONFIG
5117 # AC_LIBTOOL_CONFIG([TAGNAME])
5118 # ----------------------------
5119 # If TAGNAME is not passed, then create an initial libtool script
5120 # with a default configuration from the untagged config vars.  Otherwise
5121 # add code to config.status for appending the configuration named by
5122 # TAGNAME from the matching tagged config vars.
5123 AC_DEFUN([AC_LIBTOOL_CONFIG],
5124 [# The else clause should only fire when bootstrapping the
5125 # libtool distribution, otherwise you forgot to ship ltmain.sh
5126 # with your package, and you will get complaints that there are
5127 # no rules to generate ltmain.sh.
5128 if test -f "$ltmain"; then
5129   # See if we are running on zsh, and set the options which allow our commands through
5130   # without removal of \ escapes.
5131   if test -n "${ZSH_VERSION+set}" ; then
5132     setopt NO_GLOB_SUBST
5133   fi
5134   # Now quote all the things that may contain metacharacters while being
5135   # careful not to overquote the AC_SUBSTed values.  We take copies of the
5136   # variables and quote the copies for generation of the libtool script.
5137   for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
5138     SED SHELL STRIP \
5139     libname_spec library_names_spec soname_spec extract_expsyms_cmds \
5140     old_striplib striplib file_magic_cmd finish_cmds finish_eval \
5141     deplibs_check_method reload_flag reload_cmds need_locks \
5142     lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
5143     lt_cv_sys_global_symbol_to_c_name_address \
5144     sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
5145     old_postinstall_cmds old_postuninstall_cmds \
5146     _LT_AC_TAGVAR(compiler, $1) \
5147     _LT_AC_TAGVAR(CC, $1) \
5148     _LT_AC_TAGVAR(LD, $1) \
5149     _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
5150     _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
5151     _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
5152     _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
5153     _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
5154     _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
5155     _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
5156     _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
5157     _LT_AC_TAGVAR(old_archive_cmds, $1) \
5158     _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
5159     _LT_AC_TAGVAR(predep_objects, $1) \
5160     _LT_AC_TAGVAR(postdep_objects, $1) \
5161     _LT_AC_TAGVAR(predeps, $1) \
5162     _LT_AC_TAGVAR(postdeps, $1) \
5163     _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
5164     _LT_AC_TAGVAR(compiler_lib_search_dirs, $1) \
5165     _LT_AC_TAGVAR(archive_cmds, $1) \
5166     _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
5167     _LT_AC_TAGVAR(postinstall_cmds, $1) \
5168     _LT_AC_TAGVAR(postuninstall_cmds, $1) \
5169     _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
5170     _LT_AC_TAGVAR(allow_undefined_flag, $1) \
5171     _LT_AC_TAGVAR(no_undefined_flag, $1) \
5172     _LT_AC_TAGVAR(export_symbols_cmds, $1) \
5173     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
5174     _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
5175     _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
5176     _LT_AC_TAGVAR(hardcode_automatic, $1) \
5177     _LT_AC_TAGVAR(module_cmds, $1) \
5178     _LT_AC_TAGVAR(module_expsym_cmds, $1) \
5179     _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
5180     _LT_AC_TAGVAR(fix_srcfile_path, $1) \
5181     _LT_AC_TAGVAR(exclude_expsyms, $1) \
5182     _LT_AC_TAGVAR(include_expsyms, $1); do
5184     case $var in
5185     _LT_AC_TAGVAR(old_archive_cmds, $1) | \
5186     _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
5187     _LT_AC_TAGVAR(archive_cmds, $1) | \
5188     _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
5189     _LT_AC_TAGVAR(module_cmds, $1) | \
5190     _LT_AC_TAGVAR(module_expsym_cmds, $1) | \
5191     _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
5192     _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
5193     extract_expsyms_cmds | reload_cmds | finish_cmds | \
5194     postinstall_cmds | postuninstall_cmds | \
5195     old_postinstall_cmds | old_postuninstall_cmds | \
5196     sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
5197       # Double-quote double-evaled strings.
5198       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
5199       ;;
5200     *)
5201       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
5202       ;;
5203     esac
5204   done
5206   case $lt_echo in
5207   *'\[$]0 --fallback-echo"')
5208     lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
5209     ;;
5210   esac
5212 ifelse([$1], [],
5213   [cfgfile="${ofile}T"
5214   trap "$rm \"$cfgfile\"; exit 1" 1 2 15
5215   $rm -f "$cfgfile"
5216   AC_MSG_NOTICE([creating $ofile])],
5217   [cfgfile="$ofile"])
5219   cat <<__EOF__ >> "$cfgfile"
5220 ifelse([$1], [],
5221 [#! $SHELL
5223 # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
5224 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
5225 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
5227 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
5228 # Free Software Foundation, Inc.
5230 # This file is part of GNU Libtool:
5231 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
5233 # This program is free software; you can redistribute it and/or modify
5234 # it under the terms of the GNU General Public License as published by
5235 # the Free Software Foundation; either version 2 of the License, or
5236 # (at your option) any later version.
5238 # This program is distributed in the hope that it will be useful, but
5239 # WITHOUT ANY WARRANTY; without even the implied warranty of
5240 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
5241 # General Public License for more details.
5243 # You should have received a copy of the GNU General Public License
5244 # along with this program; if not, write to the Free Software
5245 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
5247 # As a special exception to the GNU General Public License, if you
5248 # distribute this file as part of a program that contains a
5249 # configuration script generated by Autoconf, you may include it under
5250 # the same distribution terms that you use for the rest of that program.
5252 # A sed program that does not truncate output.
5253 SED=$lt_SED
5255 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
5256 Xsed="$SED -e 1s/^X//"
5258 # The HP-UX ksh and POSIX shell print the target directory to stdout
5259 # if CDPATH is set.
5260 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
5262 # The names of the tagged configurations supported by this script.
5263 available_tags=
5265 # ### BEGIN LIBTOOL CONFIG],
5266 [# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
5268 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
5270 # Shell to use when invoking shell scripts.
5271 SHELL=$lt_SHELL
5273 # Whether or not to build shared libraries.
5274 build_libtool_libs=$enable_shared
5276 # Whether or not to build static libraries.
5277 build_old_libs=$enable_static
5279 # Whether or not to add -lc for building shared libraries.
5280 build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
5282 # Whether or not to disallow shared libs when runtime libs are static
5283 allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
5285 # Whether or not to optimize for fast installation.
5286 fast_install=$enable_fast_install
5288 # The host system.
5289 host_alias=$host_alias
5290 host=$host
5291 host_os=$host_os
5293 # The build system.
5294 build_alias=$build_alias
5295 build=$build
5296 build_os=$build_os
5298 # An echo program that does not interpret backslashes.
5299 echo=$lt_echo
5301 # The archiver.
5302 AR=$lt_AR
5303 AR_FLAGS=$lt_AR_FLAGS
5305 # A C compiler.
5306 LTCC=$lt_LTCC
5308 # LTCC compiler flags.
5309 LTCFLAGS=$lt_LTCFLAGS
5311 # A language-specific compiler.
5312 CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
5314 # Is the compiler the GNU C compiler?
5315 with_gcc=$_LT_AC_TAGVAR(GCC, $1)
5317 # An ERE matcher.
5318 EGREP=$lt_EGREP
5320 # The linker used to build libraries.
5321 LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
5323 # Whether we need hard or soft links.
5324 LN_S=$lt_LN_S
5326 # A BSD-compatible nm program.
5327 NM=$lt_NM
5329 # A symbol stripping program
5330 STRIP=$lt_STRIP
5332 # Used to examine libraries when file_magic_cmd begins "file"
5333 MAGIC_CMD=$MAGIC_CMD
5335 # Used on cygwin: DLL creation program.
5336 DLLTOOL="$DLLTOOL"
5338 # Used on cygwin: object dumper.
5339 OBJDUMP="$OBJDUMP"
5341 # Used on cygwin: assembler.
5342 AS="$AS"
5344 # The name of the directory that contains temporary libtool files.
5345 objdir=$objdir
5347 # How to create reloadable object files.
5348 reload_flag=$lt_reload_flag
5349 reload_cmds=$lt_reload_cmds
5351 # How to pass a linker flag through the compiler.
5352 wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
5354 # Object file suffix (normally "o").
5355 objext="$ac_objext"
5357 # Old archive suffix (normally "a").
5358 libext="$libext"
5360 # Shared library suffix (normally ".so").
5361 shrext_cmds='$shrext_cmds'
5363 # Executable file suffix (normally "").
5364 exeext="$exeext"
5366 # Additional compiler flags for building library objects.
5367 pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
5368 pic_mode=$pic_mode
5370 # What is the maximum length of a command?
5371 max_cmd_len=$lt_cv_sys_max_cmd_len
5373 # Does compiler simultaneously support -c and -o options?
5374 compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
5376 # Must we lock files when doing compilation?
5377 need_locks=$lt_need_locks
5379 # Do we need the lib prefix for modules?
5380 need_lib_prefix=$need_lib_prefix
5382 # Do we need a version for libraries?
5383 need_version=$need_version
5385 # Whether dlopen is supported.
5386 dlopen_support=$enable_dlopen
5388 # Whether dlopen of programs is supported.
5389 dlopen_self=$enable_dlopen_self
5391 # Whether dlopen of statically linked programs is supported.
5392 dlopen_self_static=$enable_dlopen_self_static
5394 # Compiler flag to prevent dynamic linking.
5395 link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
5397 # Compiler flag to turn off builtin functions.
5398 no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
5400 # Compiler flag to allow reflexive dlopens.
5401 export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
5403 # Compiler flag to generate shared objects directly from archives.
5404 whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
5406 # Compiler flag to generate thread-safe objects.
5407 thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
5409 # Library versioning type.
5410 version_type=$version_type
5412 # Format of library name prefix.
5413 libname_spec=$lt_libname_spec
5415 # List of archive names.  First name is the real one, the rest are links.
5416 # The last name is the one that the linker finds with -lNAME.
5417 library_names_spec=$lt_library_names_spec
5419 # The coded name of the library, if different from the real name.
5420 soname_spec=$lt_soname_spec
5422 # Commands used to build and install an old-style archive.
5423 RANLIB=$lt_RANLIB
5424 old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
5425 old_postinstall_cmds=$lt_old_postinstall_cmds
5426 old_postuninstall_cmds=$lt_old_postuninstall_cmds
5428 # Create an old-style archive from a shared archive.
5429 old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
5431 # Create a temporary old-style archive to link instead of a shared archive.
5432 old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
5434 # Commands used to build and install a shared archive.
5435 archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
5436 archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
5437 postinstall_cmds=$lt_postinstall_cmds
5438 postuninstall_cmds=$lt_postuninstall_cmds
5440 # Commands used to build a loadable module (assumed same as above if empty)
5441 module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
5442 module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
5444 # Commands to strip libraries.
5445 old_striplib=$lt_old_striplib
5446 striplib=$lt_striplib
5448 # Dependencies to place before the objects being linked to create a
5449 # shared library.
5450 predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
5452 # Dependencies to place after the objects being linked to create a
5453 # shared library.
5454 postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
5456 # Dependencies to place before the objects being linked to create a
5457 # shared library.
5458 predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
5460 # Dependencies to place after the objects being linked to create a
5461 # shared library.
5462 postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
5464 # The directories searched by this compiler when creating a shared
5465 # library
5466 compiler_lib_search_dirs=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_dirs, $1)
5468 # The library search path used internally by the compiler when linking
5469 # a shared library.
5470 compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
5472 # Method to check whether dependent libraries are shared objects.
5473 deplibs_check_method=$lt_deplibs_check_method
5475 # Command to use when deplibs_check_method == file_magic.
5476 file_magic_cmd=$lt_file_magic_cmd
5478 # Flag that allows shared libraries with undefined symbols to be built.
5479 allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
5481 # Flag that forces no undefined symbols.
5482 no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
5484 # Commands used to finish a libtool library installation in a directory.
5485 finish_cmds=$lt_finish_cmds
5487 # Same as above, but a single script fragment to be evaled but not shown.
5488 finish_eval=$lt_finish_eval
5490 # Take the output of nm and produce a listing of raw symbols and C names.
5491 global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
5493 # Transform the output of nm in a proper C declaration
5494 global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
5496 # Transform the output of nm in a C name address pair
5497 global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
5499 # This is the shared library runtime path variable.
5500 runpath_var=$runpath_var
5502 # This is the shared library path variable.
5503 shlibpath_var=$shlibpath_var
5505 # Is shlibpath searched before the hard-coded library search path?
5506 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
5508 # How to hardcode a shared library path into an executable.
5509 hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
5511 # Whether we should hardcode library paths into libraries.
5512 hardcode_into_libs=$hardcode_into_libs
5514 # Flag to hardcode \$libdir into a binary during linking.
5515 # This must work even if \$libdir does not exist.
5516 hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
5518 # If ld is used when linking, flag to hardcode \$libdir into
5519 # a binary during linking. This must work even if \$libdir does
5520 # not exist.
5521 hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
5523 # Whether we need a single -rpath flag with a separated argument.
5524 hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
5526 # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
5527 # resulting binary.
5528 hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
5530 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
5531 # resulting binary.
5532 hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
5534 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
5535 # the resulting binary.
5536 hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
5538 # Set to yes if building a shared library automatically hardcodes DIR into the library
5539 # and all subsequent libraries and executables linked against it.
5540 hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)
5542 # Variables whose values should be saved in libtool wrapper scripts and
5543 # restored at relink time.
5544 variables_saved_for_relink="$variables_saved_for_relink"
5546 # Whether libtool must link a program against all its dependency libraries.
5547 link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
5549 # Compile-time system search path for libraries
5550 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
5552 # Run-time system search path for libraries
5553 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
5555 # Fix the shell variable \$srcfile for the compiler.
5556 fix_srcfile_path=$lt_fix_srcfile_path
5558 # Set to yes if exported symbols are required.
5559 always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
5561 # The commands to list exported symbols.
5562 export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
5564 # The commands to extract the exported symbol list from a shared archive.
5565 extract_expsyms_cmds=$lt_extract_expsyms_cmds
5567 # Symbols that should not be listed in the preloaded symbols.
5568 exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
5570 # Symbols that must always be exported.
5571 include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
5573 ifelse([$1],[],
5574 [# ### END LIBTOOL CONFIG],
5575 [# ### END LIBTOOL TAG CONFIG: $tagname])
5577 __EOF__
5579 ifelse([$1],[], [
5580   case $host_os in
5581   aix3*)
5582     cat <<\EOF >> "$cfgfile"
5584 # AIX sometimes has problems with the GCC collect2 program.  For some
5585 # reason, if we set the COLLECT_NAMES environment variable, the problems
5586 # vanish in a puff of smoke.
5587 if test "X${COLLECT_NAMES+set}" != Xset; then
5588   COLLECT_NAMES=
5589   export COLLECT_NAMES
5592     ;;
5593   esac
5595   # We use sed instead of cat because bash on DJGPP gets confused if
5596   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
5597   # text mode, it properly converts lines to CR/LF.  This bash problem
5598   # is reportedly fixed, but why not run on old versions too?
5599   sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
5601   mv -f "$cfgfile" "$ofile" || \
5602     (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
5603   chmod +x "$ofile"
5605 else
5606   # If there is no Makefile yet, we rely on a make rule to execute
5607   # `config.status --recheck' to rerun these tests and create the
5608   # libtool script then.
5609   ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
5610   if test -f "$ltmain_in"; then
5611     test -f Makefile && make "$ltmain"
5612   fi
5614 ])# AC_LIBTOOL_CONFIG
5617 # AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
5618 # -------------------------------------------
5619 AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
5620 [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
5622 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
5624 if test "$GCC" = yes; then
5625   _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
5627   AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
5628     lt_cv_prog_compiler_rtti_exceptions,
5629     [-fno-rtti -fno-exceptions], [],
5630     [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
5632 ])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
5635 # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
5636 # ---------------------------------
5637 AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
5638 [AC_REQUIRE([AC_CANONICAL_HOST])
5639 AC_REQUIRE([LT_AC_PROG_SED])
5640 AC_REQUIRE([AC_PROG_NM])
5641 AC_REQUIRE([AC_OBJEXT])
5642 # Check for command to grab the raw symbol name followed by C symbol from nm.
5643 AC_MSG_CHECKING([command to parse $NM output from $compiler object])
5644 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
5646 # These are sane defaults that work on at least a few old systems.
5647 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
5649 # Character class describing NM global symbol codes.
5650 symcode='[[BCDEGRST]]'
5652 # Regexp to match symbols that can be accessed directly from C.
5653 sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
5655 # Transform an extracted symbol line into a proper C declaration
5656 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
5658 # Transform an extracted symbol line into symbol name and symbol address
5659 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'"
5661 # Define system-specific variables.
5662 case $host_os in
5663 aix*)
5664   symcode='[[BCDT]]'
5665   ;;
5666 cygwin* | mingw* | pw32*)
5667   symcode='[[ABCDGISTW]]'
5668   ;;
5669 hpux*) # Its linker distinguishes data from code symbols
5670   if test "$host_cpu" = ia64; then
5671     symcode='[[ABCDEGRST]]'
5672   fi
5673   lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
5674   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'"
5675   ;;
5676 linux* | k*bsd*-gnu)
5677   if test "$host_cpu" = ia64; then
5678     symcode='[[ABCDGIRSTW]]'
5679     lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
5680     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'"
5681   fi
5682   ;;
5683 irix* | nonstopux*)
5684   symcode='[[BCDEGRST]]'
5685   ;;
5686 osf*)
5687   symcode='[[BCDEGQRST]]'
5688   ;;
5689 solaris*)
5690   symcode='[[BDRT]]'
5691   ;;
5692 sco3.2v5*)
5693   symcode='[[DT]]'
5694   ;;
5695 sysv4.2uw2*)
5696   symcode='[[DT]]'
5697   ;;
5698 sysv5* | sco5v6* | unixware* | OpenUNIX*)
5699   symcode='[[ABDT]]'
5700   ;;
5701 sysv4)
5702   symcode='[[DFNSTU]]'
5703   ;;
5704 esac
5706 # Handle CRLF in mingw tool chain
5707 opt_cr=
5708 case $build_os in
5709 mingw*)
5710   opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
5711   ;;
5712 esac
5714 # If we're using GNU nm, then use its standard symbol codes.
5715 case `$NM -V 2>&1` in
5716 *GNU* | *'with BFD'*)
5717   symcode='[[ABCDGIRSTW]]' ;;
5718 esac
5720 # Try without a prefix undercore, then with it.
5721 for ac_symprfx in "" "_"; do
5723   # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
5724   symxfrm="\\1 $ac_symprfx\\2 \\2"
5726   # Write the raw and C identifiers.
5727   lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[      ]]\($symcode$symcode*\)[[       ]][[    ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
5729   # Check to see that the pipe works correctly.
5730   pipe_works=no
5732   rm -f conftest*
5733   cat > conftest.$ac_ext <<EOF
5734 #ifdef __cplusplus
5735 extern "C" {
5736 #endif
5737 char nm_test_var;
5738 void nm_test_func(){}
5739 #ifdef __cplusplus
5741 #endif
5742 int main(){nm_test_var='a';nm_test_func();return(0);}
5745   if AC_TRY_EVAL(ac_compile); then
5746     # Now try to grab the symbols.
5747     nlist=conftest.nm
5748     if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
5749       # Try sorting and uniquifying the output.
5750       if sort "$nlist" | uniq > "$nlist"T; then
5751         mv -f "$nlist"T "$nlist"
5752       else
5753         rm -f "$nlist"T
5754       fi
5756       # Make sure that we snagged all the symbols we need.
5757       if grep ' nm_test_var$' "$nlist" >/dev/null; then
5758         if grep ' nm_test_func$' "$nlist" >/dev/null; then
5759           cat <<EOF > conftest.$ac_ext
5760 #ifdef __cplusplus
5761 extern "C" {
5762 #endif
5765           # Now generate the symbol file.
5766           eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
5768           cat <<EOF >> conftest.$ac_ext
5769 #if defined (__STDC__) && __STDC__
5770 # define lt_ptr_t void *
5771 #else
5772 # define lt_ptr_t char *
5773 # define const
5774 #endif
5776 /* The mapping between symbol names and symbols. */
5777 const struct {
5778   const char *name;
5779   lt_ptr_t address;
5781 lt_preloaded_symbols[[]] =
5784           $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
5785           cat <<\EOF >> conftest.$ac_ext
5786   {0, (lt_ptr_t) 0}
5789 #ifdef __cplusplus
5791 #endif
5793           # Now try linking the two files.
5794           mv conftest.$ac_objext conftstm.$ac_objext
5795           lt_save_LIBS="$LIBS"
5796           lt_save_CFLAGS="$CFLAGS"
5797           LIBS="conftstm.$ac_objext"
5798           CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
5799           if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
5800             pipe_works=yes
5801           fi
5802           LIBS="$lt_save_LIBS"
5803           CFLAGS="$lt_save_CFLAGS"
5804         else
5805           echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
5806         fi
5807       else
5808         echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
5809       fi
5810     else
5811       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
5812     fi
5813   else
5814     echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
5815     cat conftest.$ac_ext >&5
5816   fi
5817   rm -rf conftest* conftst*
5819   # Do not use the global_symbol_pipe unless it works.
5820   if test "$pipe_works" = yes; then
5821     break
5822   else
5823     lt_cv_sys_global_symbol_pipe=
5824   fi
5825 done
5827 if test -z "$lt_cv_sys_global_symbol_pipe"; then
5828   lt_cv_sys_global_symbol_to_cdecl=
5830 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
5831   AC_MSG_RESULT(failed)
5832 else
5833   AC_MSG_RESULT(ok)
5835 ]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
5838 # AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
5839 # ---------------------------------------
5840 AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
5841 [_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
5842 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5843 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
5845 AC_MSG_CHECKING([for $compiler option to produce PIC])
5846  ifelse([$1],[CXX],[
5847   # C++ specific cases for pic, static, wl, etc.
5848   if test "$GXX" = yes; then
5849     _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5850     _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5852     case $host_os in
5853     aix*)
5854       # All AIX code is PIC.
5855       if test "$host_cpu" = ia64; then
5856         # AIX 5 now supports IA64 processor
5857         _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5858       fi
5859       ;;
5860     amigaos*)
5861       # FIXME: we need at least 68020 code to build shared libraries, but
5862       # adding the `-m68020' flag to GCC prevents building anything better,
5863       # like `-m68040'.
5864       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
5865       ;;
5866     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5867       # PIC is the default for these OSes.
5868       ;;
5869     mingw* | cygwin* | os2* | pw32*)
5870       # This hack is so that the source file can tell whether it is being
5871       # built for inclusion in a dll (and should export symbols for example).
5872       # Although the cygwin gcc ignores -fPIC, still need this for old-style
5873       # (--disable-auto-import) libraries
5874       m4_if([$1], [GCJ], [],
5875         [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
5876       ;;
5877     darwin* | rhapsody*)
5878       # PIC is the default on this platform
5879       # Common symbols not allowed in MH_DYLIB files
5880       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5881       ;;
5882     *djgpp*)
5883       # DJGPP does not support shared libraries at all
5884       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5885       ;;
5886     interix[[3-9]]*)
5887       # Interix 3.x gcc -fpic/-fPIC options generate broken code.
5888       # Instead, we relocate shared libraries at runtime.
5889       ;;
5890     sysv4*MP*)
5891       if test -d /usr/nec; then
5892         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
5893       fi
5894       ;;
5895     hpux*)
5896       # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5897       # not for PA HP-UX.
5898       case $host_cpu in
5899       hppa*64*|ia64*)
5900         ;;
5901       *)
5902         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5903         ;;
5904       esac
5905       ;;
5906     *)
5907       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5908       ;;
5909     esac
5910   else
5911     case $host_os in
5912       aix[[4-9]]*)
5913         # All AIX code is PIC.
5914         if test "$host_cpu" = ia64; then
5915           # AIX 5 now supports IA64 processor
5916           _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5917         else
5918           _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5919         fi
5920         ;;
5921       chorus*)
5922         case $cc_basename in
5923         cxch68*)
5924           # Green Hills C++ Compiler
5925           # _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"
5926           ;;
5927         esac
5928         ;;
5929        darwin*)
5930          # PIC is the default on this platform
5931          # Common symbols not allowed in MH_DYLIB files
5932          case $cc_basename in
5933            xlc*)
5934            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
5935            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5936            ;;
5937          esac
5938        ;;
5939       dgux*)
5940         case $cc_basename in
5941           ec++*)
5942             _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5943             ;;
5944           ghcx*)
5945             # Green Hills C++ Compiler
5946             _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5947             ;;
5948           *)
5949             ;;
5950         esac
5951         ;;
5952       freebsd* | dragonfly*)
5953         # FreeBSD uses GNU C++
5954         ;;
5955       hpux9* | hpux10* | hpux11*)
5956         case $cc_basename in
5957           CC*)
5958             _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5959             _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5960             if test "$host_cpu" != ia64; then
5961               _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5962             fi
5963             ;;
5964           aCC*)
5965             _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5966             _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5967             case $host_cpu in
5968             hppa*64*|ia64*)
5969               # +Z the default
5970               ;;
5971             *)
5972               _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5973               ;;
5974             esac
5975             ;;
5976           *)
5977             ;;
5978         esac
5979         ;;
5980       interix*)
5981         # This is c89, which is MS Visual C++ (no shared libs)
5982         # Anyone wants to do a port?
5983         ;;
5984       irix5* | irix6* | nonstopux*)
5985         case $cc_basename in
5986           CC*)
5987             _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5988             _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5989             # CC pic flag -KPIC is the default.
5990             ;;
5991           *)
5992             ;;
5993         esac
5994         ;;
5995       linux* | k*bsd*-gnu)
5996         case $cc_basename in
5997           KCC*)
5998             # KAI C++ Compiler
5999             _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
6000             _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6001             ;;
6002           icpc* | ecpc*)
6003             # Intel C++
6004             _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6005             _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6006             _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
6007             ;;
6008           pgCC* | pgcpp*)
6009             # Portland Group C++ compiler.
6010             _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6011             _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
6012             _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6013             ;;
6014           cxx*)
6015             # Compaq C++
6016             # Make sure the PIC flag is empty.  It appears that all Alpha
6017             # Linux and Compaq Tru64 Unix objects are PIC.
6018             _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
6019             _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6020             ;;
6021           *)
6022             case `$CC -V 2>&1 | sed 5q` in
6023             *Sun\ C*)
6024               # Sun C++ 5.9
6025               _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6026               _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6027               _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
6028               ;;
6029             esac
6030             ;;
6031         esac
6032         ;;
6033       lynxos*)
6034         ;;
6035       m88k*)
6036         ;;
6037       mvs*)
6038         case $cc_basename in
6039           cxx*)
6040             _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
6041             ;;
6042           *)
6043             ;;
6044         esac
6045         ;;
6046       netbsd*)
6047         ;;
6048       osf3* | osf4* | osf5*)
6049         case $cc_basename in
6050           KCC*)
6051             _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
6052             ;;
6053           RCC*)
6054             # Rational C++ 2.4.1
6055             _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6056             ;;
6057           cxx*)
6058             # Digital/Compaq C++
6059             _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6060             # Make sure the PIC flag is empty.  It appears that all Alpha
6061             # Linux and Compaq Tru64 Unix objects are PIC.
6062             _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
6063             _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6064             ;;
6065           *)
6066             ;;
6067         esac
6068         ;;
6069       psos*)
6070         ;;
6071       solaris*)
6072         case $cc_basename in
6073           CC*)
6074             # Sun C++ 4.2, 5.x and Centerline C++
6075             _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6076             _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6077             _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
6078             ;;
6079           gcx*)
6080             # Green Hills C++ Compiler
6081             _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
6082             ;;
6083           *)
6084             ;;
6085         esac
6086         ;;
6087       sunos4*)
6088         case $cc_basename in
6089           CC*)
6090             # Sun C++ 4.x
6091             _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6092             _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6093             ;;
6094           lcc*)
6095             # Lucid
6096             _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6097             ;;
6098           *)
6099             ;;
6100         esac
6101         ;;
6102       tandem*)
6103         case $cc_basename in
6104           NCC*)
6105             # NonStop-UX NCC 3.20
6106             _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6107             ;;
6108           *)
6109             ;;
6110         esac
6111         ;;
6112       sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
6113         case $cc_basename in
6114           CC*)
6115             _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6116             _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6117             _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6118             ;;
6119         esac
6120         ;;
6121       vxworks*)
6122         ;;
6123       *)
6124         _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
6125         ;;
6126     esac
6127   fi
6130   if test "$GCC" = yes; then
6131     _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6132     _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
6134     case $host_os in
6135       aix*)
6136       # All AIX code is PIC.
6137       if test "$host_cpu" = ia64; then
6138         # AIX 5 now supports IA64 processor
6139         _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6140       fi
6141       ;;
6143     amigaos*)
6144       # FIXME: we need at least 68020 code to build shared libraries, but
6145       # adding the `-m68020' flag to GCC prevents building anything better,
6146       # like `-m68040'.
6147       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
6148       ;;
6150     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
6151       # PIC is the default for these OSes.
6152       ;;
6154     mingw* | cygwin* | pw32* | os2*)
6155       # This hack is so that the source file can tell whether it is being
6156       # built for inclusion in a dll (and should export symbols for example).
6157       # Although the cygwin gcc ignores -fPIC, still need this for old-style
6158       # (--disable-auto-import) libraries
6159       m4_if([$1], [GCJ], [],
6160         [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
6161       ;;
6163     darwin* | rhapsody*)
6164       # PIC is the default on this platform
6165       # Common symbols not allowed in MH_DYLIB files
6166       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
6167       ;;
6169     interix[[3-9]]*)
6170       # Interix 3.x gcc -fpic/-fPIC options generate broken code.
6171       # Instead, we relocate shared libraries at runtime.
6172       ;;
6174     msdosdjgpp*)
6175       # Just because we use GCC doesn't mean we suddenly get shared libraries
6176       # on systems that don't support them.
6177       _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
6178       enable_shared=no
6179       ;;
6181     sysv4*MP*)
6182       if test -d /usr/nec; then
6183         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
6184       fi
6185       ;;
6187     hpux*)
6188       # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
6189       # not for PA HP-UX.
6190       case $host_cpu in
6191       hppa*64*|ia64*)
6192         # +Z the default
6193         ;;
6194       *)
6195         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6196         ;;
6197       esac
6198       ;;
6200     *)
6201       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6202       ;;
6203     esac
6204   else
6205     # PORTME Check for flag to pass linker flags through the system compiler.
6206     case $host_os in
6207     aix*)
6208       _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6209       if test "$host_cpu" = ia64; then
6210         # AIX 5 now supports IA64 processor
6211         _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6212       else
6213         _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
6214       fi
6215       ;;
6216       darwin*)
6217         # PIC is the default on this platform
6218         # Common symbols not allowed in MH_DYLIB files
6219        case $cc_basename in
6220          xlc*)
6221          _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
6222          _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6223          ;;
6224        esac
6225        ;;
6227     mingw* | cygwin* | pw32* | os2*)
6228       # This hack is so that the source file can tell whether it is being
6229       # built for inclusion in a dll (and should export symbols for example).
6230       m4_if([$1], [GCJ], [],
6231         [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
6232       ;;
6234     hpux9* | hpux10* | hpux11*)
6235       _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6236       # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
6237       # not for PA HP-UX.
6238       case $host_cpu in
6239       hppa*64*|ia64*)
6240         # +Z the default
6241         ;;
6242       *)
6243         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
6244         ;;
6245       esac
6246       # Is there a better lt_prog_compiler_static that works with the bundled CC?
6247       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
6248       ;;
6250     irix5* | irix6* | nonstopux*)
6251       _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6252       # PIC (with -KPIC) is the default.
6253       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6254       ;;
6256     newsos6)
6257       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6258       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6259       ;;
6261     linux* | k*bsd*-gnu)
6262       case $cc_basename in
6263       icc* | ecc*)
6264         _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6265         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6266         _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
6267         ;;
6268       pgcc* | pgf77* | pgf90* | pgf95*)
6269         # Portland Group compilers (*not* the Pentium gcc compiler,
6270         # which looks to be a dead project)
6271         _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6272         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
6273         _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6274         ;;
6275       ccc*)
6276         _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6277         # All Alpha code is PIC.
6278         _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6279         ;;
6280       *)
6281         case `$CC -V 2>&1 | sed 5q` in
6282         *Sun\ C*)
6283           # Sun C 5.9
6284           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6285           _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6286           _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6287           ;;
6288         *Sun\ F*)
6289           # Sun Fortran 8.3 passes all unrecognized flags to the linker
6290           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6291           _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6292           _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=''
6293           ;;
6294         esac
6295         ;;
6296       esac
6297       ;;
6299     osf3* | osf4* | osf5*)
6300       _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6301       # All OSF/1 code is PIC.
6302       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6303       ;;
6305     rdos*)
6306       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6307       ;;
6309     solaris*)
6310       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6311       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6312       case $cc_basename in
6313       f77* | f90* | f95*)
6314         _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
6315       *)
6316         _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
6317       esac
6318       ;;
6320     sunos4*)
6321       _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
6322       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
6323       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6324       ;;
6326     sysv4 | sysv4.2uw2* | sysv4.3*)
6327       _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6328       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6329       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6330       ;;
6332     sysv4*MP*)
6333       if test -d /usr/nec ;then
6334         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
6335         _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6336       fi
6337       ;;
6339     sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
6340       _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6341       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6342       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6343       ;;
6345     unicos*)
6346       _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6347       _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
6348       ;;
6350     uts4*)
6351       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6352       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6353       ;;
6355     *)
6356       _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
6357       ;;
6358     esac
6359   fi
6361 AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
6364 # Check to make sure the PIC flag actually works.
6366 if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
6367   AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
6368     _LT_AC_TAGVAR(lt_cv_prog_compiler_pic_works, $1),
6369     [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
6370     [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
6371      "" | " "*) ;;
6372      *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
6373      esac],
6374     [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
6375      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
6377 case $host_os in
6378   # For platforms which do not support PIC, -DPIC is meaningless:
6379   *djgpp*)
6380     _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
6381     ;;
6382   *)
6383     _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
6384     ;;
6385 esac
6388 # Check to make sure the static flag actually works.
6390 wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\"
6391 AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
6392   _LT_AC_TAGVAR(lt_cv_prog_compiler_static_works, $1),
6393   $lt_tmp_static_flag,
6394   [],
6395   [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
6399 # AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
6400 # ------------------------------------
6401 # See if the linker supports building shared libraries.
6402 AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
6403 [AC_REQUIRE([LT_AC_PROG_SED])dnl
6404 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
6405 ifelse([$1],[CXX],[
6406   _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
6407   case $host_os in
6408   aix[[4-9]]*)
6409     # If we're using GNU nm, then we don't want the "-C" option.
6410     # -C means demangle to AIX nm, but means don't demangle with GNU nm
6411     if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
6412       _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'
6413     else
6414       _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'
6415     fi
6416     ;;
6417   pw32*)
6418     _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
6419   ;;
6420   cygwin* | mingw*)
6421     _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'
6422   ;;
6423   *)
6424     _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
6425   ;;
6426   esac
6427   _LT_AC_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
6429   runpath_var=
6430   _LT_AC_TAGVAR(allow_undefined_flag, $1)=
6431   _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
6432   _LT_AC_TAGVAR(archive_cmds, $1)=
6433   _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
6434   _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
6435   _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
6436   _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
6437   _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
6438   _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
6439   _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
6440   _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
6441   _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
6442   _LT_AC_TAGVAR(hardcode_direct, $1)=no
6443   _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
6444   _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
6445   _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
6446   _LT_AC_TAGVAR(hardcode_automatic, $1)=no
6447   _LT_AC_TAGVAR(module_cmds, $1)=
6448   _LT_AC_TAGVAR(module_expsym_cmds, $1)=
6449   _LT_AC_TAGVAR(always_export_symbols, $1)=no
6450   _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
6451   # include_expsyms should be a list of space-separated symbols to be *always*
6452   # included in the symbol list
6453   _LT_AC_TAGVAR(include_expsyms, $1)=
6454   # exclude_expsyms can be an extended regexp of symbols to exclude
6455   # it will be wrapped by ` (' and `)$', so one must not match beginning or
6456   # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
6457   # as well as any symbol that contains `d'.
6458   _LT_AC_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
6459   # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
6460   # platforms (ab)use it in PIC code, but their linkers get confused if
6461   # the symbol is explicitly referenced.  Since portable code cannot
6462   # rely on this symbol name, it's probably fine to never include it in
6463   # preloaded symbol tables.
6464   # Exclude shared library initialization/finalization symbols.
6465 dnl Note also adjust exclude_expsyms for C++ above.
6466   extract_expsyms_cmds=
6467   # Just being paranoid about ensuring that cc_basename is set.
6468   _LT_CC_BASENAME([$compiler])
6469   case $host_os in
6470   cygwin* | mingw* | pw32*)
6471     # FIXME: the MSVC++ port hasn't been tested in a loooong time
6472     # When not using gcc, we currently assume that we are using
6473     # Microsoft Visual C++.
6474     if test "$GCC" != yes; then
6475       with_gnu_ld=no
6476     fi
6477     ;;
6478   interix*)
6479     # we just hope/assume this is gcc and not c89 (= MSVC++)
6480     with_gnu_ld=yes
6481     ;;
6482   openbsd*)
6483     with_gnu_ld=no
6484     ;;
6485   esac
6487   _LT_AC_TAGVAR(ld_shlibs, $1)=yes
6488   if test "$with_gnu_ld" = yes; then
6489     # If archive_cmds runs LD, not CC, wlarc should be empty
6490     wlarc='${wl}'
6492     # Set some defaults for GNU ld with shared library support. These
6493     # are reset later if shared libraries are not supported. Putting them
6494     # here allows them to be overridden if necessary.
6495     runpath_var=LD_RUN_PATH
6496     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
6497     _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6498     # ancient GNU ld didn't support --whole-archive et. al.
6499     if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
6500         _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
6501       else
6502         _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
6503     fi
6504     supports_anon_versioning=no
6505     case `$LD -v 2>/dev/null` in
6506       *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
6507       *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
6508       *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
6509       *\ 2.11.*) ;; # other 2.11 versions
6510       *) supports_anon_versioning=yes ;;
6511     esac
6513     # See if GNU ld supports shared libraries.
6514     case $host_os in
6515     aix[[3-9]]*)
6516       # On AIX/PPC, the GNU linker is very broken
6517       if test "$host_cpu" != ia64; then
6518         _LT_AC_TAGVAR(ld_shlibs, $1)=no
6519         cat <<EOF 1>&2
6521 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
6522 *** to be unable to reliably create shared libraries on AIX.
6523 *** Therefore, libtool is disabling shared libraries support.  If you
6524 *** really care for shared libraries, you may want to modify your PATH
6525 *** so that a non-GNU linker is found, and then restart.
6528       fi
6529       ;;
6531     amigaos*)
6532       _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)'
6533       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6534       _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6536       # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
6537       # that the semantics of dynamic libraries on AmigaOS, at least up
6538       # to version 4, is to share data among multiple programs linked
6539       # with the same dynamic library.  Since this doesn't match the
6540       # behavior of shared libraries on other platforms, we can't use
6541       # them.
6542       _LT_AC_TAGVAR(ld_shlibs, $1)=no
6543       ;;
6545     beos*)
6546       if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
6547         _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6548         # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
6549         # support --undefined.  This deserves some investigation.  FIXME
6550         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6551       else
6552         _LT_AC_TAGVAR(ld_shlibs, $1)=no
6553       fi
6554       ;;
6556     cygwin* | mingw* | pw32*)
6557       # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
6558       # as there is no search path for DLLs.
6559       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6560       _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6561       _LT_AC_TAGVAR(always_export_symbols, $1)=no
6562       _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6563       _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
6565       if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
6566         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
6567         # If the export-symbols file already is a .def file (1st line
6568         # is EXPORTS), use it as is; otherwise, prepend...
6569         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6570           cp $export_symbols $output_objdir/$soname.def;
6571         else
6572           echo EXPORTS > $output_objdir/$soname.def;
6573           cat $export_symbols >> $output_objdir/$soname.def;
6574         fi~
6575         $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
6576       else
6577         _LT_AC_TAGVAR(ld_shlibs, $1)=no
6578       fi
6579       ;;
6581     interix[[3-9]]*)
6582       _LT_AC_TAGVAR(hardcode_direct, $1)=no
6583       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6584       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6585       _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6586       # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
6587       # Instead, shared libraries are loaded at an image base (0x10000000 by
6588       # default) and relocated if they conflict, which is a slow very memory
6589       # consuming and fragmenting process.  To avoid this, we pick a random,
6590       # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
6591       # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
6592       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
6593       _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
6594       ;;
6596     gnu* | linux* | k*bsd*-gnu)
6597       if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
6598         tmp_addflag=
6599         case $cc_basename,$host_cpu in
6600         pgcc*)                          # Portland Group C compiler
6601           _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
6602           tmp_addflag=' $pic_flag'
6603           ;;
6604         pgf77* | pgf90* | pgf95*)       # Portland Group f77 and f90 compilers
6605           _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
6606           tmp_addflag=' $pic_flag -Mnomain' ;;
6607         ecc*,ia64* | icc*,ia64*)                # Intel C compiler on ia64
6608           tmp_addflag=' -i_dynamic' ;;
6609         efc*,ia64* | ifort*,ia64*)      # Intel Fortran compiler on ia64
6610           tmp_addflag=' -i_dynamic -nofor_main' ;;
6611         ifc* | ifort*)                  # Intel Fortran compiler
6612           tmp_addflag=' -nofor_main' ;;
6613         esac
6614         case `$CC -V 2>&1 | sed 5q` in
6615         *Sun\ C*)                       # Sun C 5.9
6616           _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
6617           tmp_sharedflag='-G' ;;
6618         *Sun\ F*)                       # Sun Fortran 8.3
6619           tmp_sharedflag='-G' ;;
6620         *)
6621           tmp_sharedflag='-shared' ;;
6622         esac
6623         _LT_AC_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6625         if test $supports_anon_versioning = yes; then
6626           _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~
6627   cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
6628   $echo "local: *; };" >> $output_objdir/$libname.ver~
6629           $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
6630         fi
6631       else
6632         _LT_AC_TAGVAR(ld_shlibs, $1)=no
6633       fi
6634       ;;
6636     netbsd*)
6637       if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6638         _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
6639         wlarc=
6640       else
6641         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6642         _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'
6643       fi
6644       ;;
6646     solaris*)
6647       if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
6648         _LT_AC_TAGVAR(ld_shlibs, $1)=no
6649         cat <<EOF 1>&2
6651 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
6652 *** create shared libraries on Solaris systems.  Therefore, libtool
6653 *** is disabling shared libraries support.  We urge you to upgrade GNU
6654 *** binutils to release 2.9.1 or newer.  Another option is to modify
6655 *** your PATH or compiler configuration so that the native linker is
6656 *** used, and then restart.
6659       elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
6660         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6661         _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'
6662       else
6663         _LT_AC_TAGVAR(ld_shlibs, $1)=no
6664       fi
6665       ;;
6667     sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
6668       case `$LD -v 2>&1` in
6669         *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
6670         _LT_AC_TAGVAR(ld_shlibs, $1)=no
6671         cat <<_LT_EOF 1>&2
6673 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
6674 *** reliably create shared libraries on SCO systems.  Therefore, libtool
6675 *** is disabling shared libraries support.  We urge you to upgrade GNU
6676 *** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
6677 *** your PATH or compiler configuration so that the native linker is
6678 *** used, and then restart.
6680 _LT_EOF
6681         ;;
6682         *)
6683           if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
6684             _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
6685             _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib'
6686             _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib'
6687           else
6688             _LT_AC_TAGVAR(ld_shlibs, $1)=no
6689           fi
6690         ;;
6691       esac
6692       ;;
6694     sunos4*)
6695       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6696       wlarc=
6697       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6698       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6699       ;;
6701     *)
6702       if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
6703         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6704         _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'
6705       else
6706         _LT_AC_TAGVAR(ld_shlibs, $1)=no
6707       fi
6708       ;;
6709     esac
6711     if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then
6712       runpath_var=
6713       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
6714       _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
6715       _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
6716     fi
6717   else
6718     # PORTME fill in a description of your system's linker (not GNU ld)
6719     case $host_os in
6720     aix3*)
6721       _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6722       _LT_AC_TAGVAR(always_export_symbols, $1)=yes
6723       _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'
6724       # Note: this linker hardcodes the directories in LIBPATH if there
6725       # are no directories specified by -L.
6726       _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6727       if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
6728         # Neither direct hardcoding nor static linking is supported with a
6729         # broken collect2.
6730         _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
6731       fi
6732       ;;
6734     aix[[4-9]]*)
6735       if test "$host_cpu" = ia64; then
6736         # On IA64, the linker does run time linking by default, so we don't
6737         # have to do anything special.
6738         aix_use_runtimelinking=no
6739         exp_sym_flag='-Bexport'
6740         no_entry_flag=""
6741       else
6742         # If we're using GNU nm, then we don't want the "-C" option.
6743         # -C means demangle to AIX nm, but means don't demangle with GNU nm
6744         if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
6745           _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'
6746         else
6747           _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'
6748         fi
6749         aix_use_runtimelinking=no
6751         # Test if we are trying to use run time linking or normal
6752         # AIX style linking. If -brtl is somewhere in LDFLAGS, we
6753         # need to do runtime linking.
6754         case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
6755           for ld_flag in $LDFLAGS; do
6756           if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
6757             aix_use_runtimelinking=yes
6758             break
6759           fi
6760           done
6761           ;;
6762         esac
6764         exp_sym_flag='-bexport'
6765         no_entry_flag='-bnoentry'
6766       fi
6768       # When large executables or shared objects are built, AIX ld can
6769       # have problems creating the table of contents.  If linking a library
6770       # or program results in "error TOC overflow" add -mminimal-toc to
6771       # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
6772       # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
6774       _LT_AC_TAGVAR(archive_cmds, $1)=''
6775       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6776       _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
6777       _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6779       if test "$GCC" = yes; then
6780         case $host_os in aix4.[[012]]|aix4.[[012]].*)
6781         # We only want to do this on AIX 4.2 and lower, the check
6782         # below for broken collect2 doesn't work under 4.3+
6783           collect2name=`${CC} -print-prog-name=collect2`
6784           if test -f "$collect2name" && \
6785            strings "$collect2name" | grep resolve_lib_name >/dev/null
6786           then
6787           # We have reworked collect2
6788           :
6789           else
6790           # We have old collect2
6791           _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
6792           # It fails to find uninstalled libraries when the uninstalled
6793           # path is not listed in the libpath.  Setting hardcode_minus_L
6794           # to unsupported forces relinking
6795           _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6796           _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6797           _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
6798           fi
6799           ;;
6800         esac
6801         shared_flag='-shared'
6802         if test "$aix_use_runtimelinking" = yes; then
6803           shared_flag="$shared_flag "'${wl}-G'
6804         fi
6805       else
6806         # not using gcc
6807         if test "$host_cpu" = ia64; then
6808         # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
6809         # chokes on -Wl,-G. The following line is correct:
6810           shared_flag='-G'
6811         else
6812           if test "$aix_use_runtimelinking" = yes; then
6813             shared_flag='${wl}-G'
6814           else
6815             shared_flag='${wl}-bM:SRE'
6816           fi
6817         fi
6818       fi
6820       # It seems that -bexpall does not export symbols beginning with
6821       # underscore (_), so it is better to generate a list of symbols to export.
6822       _LT_AC_TAGVAR(always_export_symbols, $1)=yes
6823       if test "$aix_use_runtimelinking" = yes; then
6824         # Warning - without using the other runtime loading flags (-brtl),
6825         # -berok will link without error, but may produce a broken library.
6826         _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
6827        # Determine the default libpath from the value encoded in an empty executable.
6828        _LT_AC_SYS_LIBPATH_AIX
6829        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6830         _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
6831        else
6832         if test "$host_cpu" = ia64; then
6833           _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
6834           _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
6835           _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
6836         else
6837          # Determine the default libpath from the value encoded in an empty executable.
6838          _LT_AC_SYS_LIBPATH_AIX
6839          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6840           # Warning - without using the other run time loading flags,
6841           # -berok will link without error, but may produce a broken library.
6842           _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
6843           _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
6844           # Exported symbols can be pulled into shared objects from archives
6845           _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
6846           _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
6847           # This is similar to how AIX traditionally builds its shared libraries.
6848           _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
6849         fi
6850       fi
6851       ;;
6853     amigaos*)
6854       _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)'
6855       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6856       _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6857       # see comment about different semantics on the GNU ld section
6858       _LT_AC_TAGVAR(ld_shlibs, $1)=no
6859       ;;
6861     bsdi[[45]]*)
6862       _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
6863       ;;
6865     cygwin* | mingw* | pw32*)
6866       # When not using gcc, we currently assume that we are using
6867       # Microsoft Visual C++.
6868       # hardcode_libdir_flag_spec is actually meaningless, as there is
6869       # no search path for DLLs.
6870       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
6871       _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6872       # Tell ltmain to make .lib files, not .a files.
6873       libext=lib
6874       # Tell ltmain to make .dll files, not .so files.
6875       shrext_cmds=".dll"
6876       # FIXME: Setting linknames here is a bad hack.
6877       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
6878       # The linker will automatically build a .lib file if we build a DLL.
6879       _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
6880       # FIXME: Should let the user specify the lib program.
6881       _LT_AC_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
6882       _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
6883       _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6884       ;;
6886     darwin* | rhapsody*)
6887       case $host_os in
6888         rhapsody* | darwin1.[[012]])
6889          _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
6890          ;;
6891        *) # Darwin 1.3 on
6892          if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
6893            _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
6894          else
6895            case ${MACOSX_DEPLOYMENT_TARGET} in
6896              10.[[012]])
6897                _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
6898                ;;
6899              10.*)
6900                _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
6901                ;;
6902            esac
6903          fi
6904          ;;
6905       esac
6906       _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6907       _LT_AC_TAGVAR(hardcode_direct, $1)=no
6908       _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
6909       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
6910       _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
6911       _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6912     if test "$GCC" = yes ; then
6913         output_verbose_link_cmd='echo'
6914         _LT_AC_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
6915         _LT_AC_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
6916         _LT_AC_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
6917         _LT_AC_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
6918     else
6919       case $cc_basename in
6920         xlc*)
6921          output_verbose_link_cmd='echo'
6922          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring'
6923          _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
6924           # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
6925          _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 $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
6926           _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}'
6927           ;;
6928        *)
6929          _LT_AC_TAGVAR(ld_shlibs, $1)=no
6930           ;;
6931       esac
6932     fi
6933       ;;
6935     dgux*)
6936       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6937       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6938       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6939       ;;
6941     freebsd1*)
6942       _LT_AC_TAGVAR(ld_shlibs, $1)=no
6943       ;;
6945     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
6946     # support.  Future versions do this automatically, but an explicit c++rt0.o
6947     # does not break anything, and helps significantly (at the cost of a little
6948     # extra space).
6949     freebsd2.2*)
6950       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
6951       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6952       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6953       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6954       ;;
6956     # Unfortunately, older versions of FreeBSD 2 do not have this feature.
6957     freebsd2*)
6958       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6959       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6960       _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6961       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6962       ;;
6964     # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
6965     freebsd* | dragonfly*)
6966       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
6967       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6968       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6969       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6970       ;;
6972     hpux9*)
6973       if test "$GCC" = yes; then
6974         _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'
6975       else
6976         _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'
6977       fi
6978       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6979       _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6980       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6982       # hardcode_minus_L: Not really in the search PATH,
6983       # but as the default location of the library.
6984       _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6985       _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6986       ;;
6988     hpux10*)
6989       if test "$GCC" = yes -a "$with_gnu_ld" = no; then
6990         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6991       else
6992         _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
6993       fi
6994       if test "$with_gnu_ld" = no; then
6995         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6996         _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6998         _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6999         _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7001         # hardcode_minus_L: Not really in the search PATH,
7002         # but as the default location of the library.
7003         _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
7004       fi
7005       ;;
7007     hpux11*)
7008       if test "$GCC" = yes -a "$with_gnu_ld" = no; then
7009         case $host_cpu in
7010         hppa*64*)
7011           _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
7012           ;;
7013         ia64*)
7014           _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
7015           ;;
7016         *)
7017           _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
7018           ;;
7019         esac
7020       else
7021         case $host_cpu in
7022         hppa*64*)
7023           _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
7024           ;;
7025         ia64*)
7026           _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
7027           ;;
7028         *)
7029           _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
7030           ;;
7031         esac
7032       fi
7033       if test "$with_gnu_ld" = no; then
7034         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
7035         _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
7037         case $host_cpu in
7038         hppa*64*|ia64*)
7039           _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
7040           _LT_AC_TAGVAR(hardcode_direct, $1)=no
7041           _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7042           ;;
7043         *)
7044           _LT_AC_TAGVAR(hardcode_direct, $1)=yes
7045           _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7047           # hardcode_minus_L: Not really in the search PATH,
7048           # but as the default location of the library.
7049           _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
7050           ;;
7051         esac
7052       fi
7053       ;;
7055     irix5* | irix6* | nonstopux*)
7056       if test "$GCC" = yes; then
7057         _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'
7058       else
7059         _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'
7060         _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
7061       fi
7062       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7063       _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
7064       _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
7065       ;;
7067     netbsd*)
7068       if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
7069         _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
7070       else
7071         _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
7072       fi
7073       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7074       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
7075       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7076       ;;
7078     newsos6)
7079       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7080       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
7081       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7082       _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
7083       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7084       ;;
7086     openbsd*)
7087       if test -f /usr/libexec/ld.so; then
7088         _LT_AC_TAGVAR(hardcode_direct, $1)=yes
7089         _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7090         if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
7091           _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
7092           _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
7093           _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7094           _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7095         else
7096           case $host_os in
7097            openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
7098              _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
7099              _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7100              ;;
7101            *)
7102              _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
7103              _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7104              ;;
7105           esac
7106         fi
7107       else
7108         _LT_AC_TAGVAR(ld_shlibs, $1)=no
7109       fi
7110       ;;
7112     os2*)
7113       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7114       _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
7115       _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
7116       _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'
7117       _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
7118       ;;
7120     osf3*)
7121       if test "$GCC" = yes; then
7122         _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
7123         _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'
7124       else
7125         _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
7126         _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'
7127       fi
7128       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7129       _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
7130       ;;
7132     osf4* | osf5*)      # as osf3* with the addition of -msym flag
7133       if test "$GCC" = yes; then
7134         _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
7135         _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'
7136         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7137       else
7138         _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
7139         _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'
7140         _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~
7141         $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'
7143         # Both c and cxx compiler support -rpath directly
7144         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
7145       fi
7146       _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
7147       ;;
7149     solaris*)
7150       _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
7151       if test "$GCC" = yes; then
7152         wlarc='${wl}'
7153         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
7154         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
7155           $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
7156       else
7157         wlarc=''
7158         _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
7159         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
7160         $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
7161       fi
7162       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7163       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7164       case $host_os in
7165       solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
7166       *)
7167         # The compiler driver will combine and reorder linker options,
7168         # but understands `-z linker_flag'.  GCC discards it without `$wl',
7169         # but is careful enough not to reorder.
7170         # Supported since Solaris 2.6 (maybe 2.5.1?)
7171         if test "$GCC" = yes; then
7172           _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
7173         else
7174           _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
7175         fi
7176         ;;
7177       esac
7178       _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
7179       ;;
7181     sunos4*)
7182       if test "x$host_vendor" = xsequent; then
7183         # Use $CC to link under sequent, because it throws in some extra .o
7184         # files that make .init and .fini sections work.
7185         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
7186       else
7187         _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
7188       fi
7189       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7190       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
7191       _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
7192       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7193       ;;
7195     sysv4)
7196       case $host_vendor in
7197         sni)
7198           _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7199           _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
7200         ;;
7201         siemens)
7202           ## LD is ld it makes a PLAMLIB
7203           ## CC just makes a GrossModule.
7204           _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
7205           _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
7206           _LT_AC_TAGVAR(hardcode_direct, $1)=no
7207         ;;
7208         motorola)
7209           _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7210           _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
7211         ;;
7212       esac
7213       runpath_var='LD_RUN_PATH'
7214       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7215       ;;
7217     sysv4.3*)
7218       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7219       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7220       _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
7221       ;;
7223     sysv4*MP*)
7224       if test -d /usr/nec; then
7225         _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7226         _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7227         runpath_var=LD_RUN_PATH
7228         hardcode_runpath_var=yes
7229         _LT_AC_TAGVAR(ld_shlibs, $1)=yes
7230       fi
7231       ;;
7233     sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
7234       _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
7235       _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
7236       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7237       runpath_var='LD_RUN_PATH'
7239       if test "$GCC" = yes; then
7240         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7241         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7242       else
7243         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7244         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7245       fi
7246       ;;
7248     sysv5* | sco3.2v5* | sco5v6*)
7249       # Note: We can NOT use -z defs as we might desire, because we do not
7250       # link with -lc, and that would cause any symbols used from libc to
7251       # always be unresolved, which means just about no library would
7252       # ever link correctly.  If we're not using GNU ld we use -z text
7253       # though, which does catch some bad symbols but isn't as heavy-handed
7254       # as -z defs.
7255       _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
7256       _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
7257       _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
7258       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7259       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
7260       _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
7261       _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
7262       _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
7263       runpath_var='LD_RUN_PATH'
7265       if test "$GCC" = yes; then
7266         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
7267         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
7268       else
7269         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
7270         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
7271       fi
7272       ;;
7274     uts4*)
7275       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7276       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7277       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7278       ;;
7280     *)
7281       _LT_AC_TAGVAR(ld_shlibs, $1)=no
7282       ;;
7283     esac
7284   fi
7286 AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
7287 test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
7290 # Do we need to explicitly link libc?
7292 case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
7293 x|xyes)
7294   # Assume -lc should be added
7295   _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
7297   if test "$enable_shared" = yes && test "$GCC" = yes; then
7298     case $_LT_AC_TAGVAR(archive_cmds, $1) in
7299     *'~'*)
7300       # FIXME: we may have to deal with multi-command sequences.
7301       ;;
7302     '$CC '*)
7303       # Test whether the compiler implicitly links with -lc since on some
7304       # systems, -lgcc has to come before -lc. If gcc already passes -lc
7305       # to ld, don't add -lc before -lgcc.
7306       AC_MSG_CHECKING([whether -lc should be explicitly linked in])
7307       $rm conftest*
7308       echo "$lt_simple_compile_test_code" > conftest.$ac_ext
7310       if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
7311         soname=conftest
7312         lib=conftest
7313         libobjs=conftest.$ac_objext
7314         deplibs=
7315         wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
7316         pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
7317         compiler_flags=-v
7318         linker_flags=-v
7319         verstring=
7320         output_objdir=.
7321         libname=conftest
7322         lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
7323         _LT_AC_TAGVAR(allow_undefined_flag, $1)=
7324         if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
7325         then
7326           _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
7327         else
7328           _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
7329         fi
7330         _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
7331       else
7332         cat conftest.err 1>&5
7333       fi
7334       $rm conftest*
7335       AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
7336       ;;
7337     esac
7338   fi
7339   ;;
7340 esac
7341 ])# AC_LIBTOOL_PROG_LD_SHLIBS
7344 # _LT_AC_FILE_LTDLL_C
7345 # -------------------
7346 # Be careful that the start marker always follows a newline.
7347 AC_DEFUN([_LT_AC_FILE_LTDLL_C], [
7348 # /* ltdll.c starts here */
7349 # #define WIN32_LEAN_AND_MEAN
7350 # #include <windows.h>
7351 # #undef WIN32_LEAN_AND_MEAN
7352 # #include <stdio.h>
7354 # #ifndef __CYGWIN__
7355 # #  ifdef __CYGWIN32__
7356 # #    define __CYGWIN__ __CYGWIN32__
7357 # #  endif
7358 # #endif
7360 # #ifdef __cplusplus
7361 # extern "C" {
7362 # #endif
7363 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
7364 # #ifdef __cplusplus
7365 # }
7366 # #endif
7368 # #ifdef __CYGWIN__
7369 # #include <cygwin/cygwin_dll.h>
7370 # DECLARE_CYGWIN_DLL( DllMain );
7371 # #endif
7372 # HINSTANCE __hDllInstance_base;
7374 # BOOL APIENTRY
7375 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
7376 # {
7377 #   __hDllInstance_base = hInst;
7378 #   return TRUE;
7379 # }
7380 # /* ltdll.c ends here */
7381 ])# _LT_AC_FILE_LTDLL_C
7384 # _LT_AC_TAGVAR(VARNAME, [TAGNAME])
7385 # ---------------------------------
7386 AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
7389 # old names
7390 AC_DEFUN([AM_PROG_LIBTOOL],   [AC_PROG_LIBTOOL])
7391 AC_DEFUN([AM_ENABLE_SHARED],  [AC_ENABLE_SHARED($@)])
7392 AC_DEFUN([AM_ENABLE_STATIC],  [AC_ENABLE_STATIC($@)])
7393 AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
7394 AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
7395 AC_DEFUN([AM_PROG_LD],        [AC_PROG_LD])
7396 AC_DEFUN([AM_PROG_NM],        [AC_PROG_NM])
7398 # This is just to silence aclocal about the macro not being used
7399 ifelse([AC_DISABLE_FAST_INSTALL])
7401 AC_DEFUN([LT_AC_PROG_GCJ],
7402 [AC_CHECK_TOOL(GCJ, gcj, no)
7403   test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
7404   AC_SUBST(GCJFLAGS)
7407 AC_DEFUN([LT_AC_PROG_RC],
7408 [AC_CHECK_TOOL(RC, windres, no)
7412 # Cheap backport of AS_EXECUTABLE_P and required macros
7413 # from Autoconf 2.59; we should not use $as_executable_p directly.
7415 # _AS_TEST_PREPARE
7416 # ----------------
7417 m4_ifndef([_AS_TEST_PREPARE],
7418 [m4_defun([_AS_TEST_PREPARE],
7419 [if test -x / >/dev/null 2>&1; then
7420   as_executable_p='test -x'
7421 else
7422   as_executable_p='test -f'
7424 ])])# _AS_TEST_PREPARE
7426 # AS_EXECUTABLE_P
7427 # ---------------
7428 # Check whether a file is executable.
7429 m4_ifndef([AS_EXECUTABLE_P],
7430 [m4_defun([AS_EXECUTABLE_P],
7431 [AS_REQUIRE([_AS_TEST_PREPARE])dnl
7432 $as_executable_p $1[]dnl
7433 ])])# AS_EXECUTABLE_P
7435 # NOTE: This macro has been submitted for inclusion into   #
7436 #  GNU Autoconf as AC_PROG_SED.  When it is available in   #
7437 #  a released version of Autoconf we should remove this    #
7438 #  macro and use it instead.                               #
7439 # LT_AC_PROG_SED
7440 # --------------
7441 # Check for a fully-functional sed program, that truncates
7442 # as few characters as possible.  Prefer GNU sed if found.
7443 AC_DEFUN([LT_AC_PROG_SED],
7444 [AC_MSG_CHECKING([for a sed that does not truncate output])
7445 AC_CACHE_VAL(lt_cv_path_SED,
7446 [# Loop through the user's path and test for sed and gsed.
7447 # Then use that list of sed's as ones to test for truncation.
7448 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7449 for as_dir in $PATH
7451   IFS=$as_save_IFS
7452   test -z "$as_dir" && as_dir=.
7453   for lt_ac_prog in sed gsed; do
7454     for ac_exec_ext in '' $ac_executable_extensions; do
7455       if AS_EXECUTABLE_P(["$as_dir/$lt_ac_prog$ac_exec_ext"]); then
7456         lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
7457       fi
7458     done
7459   done
7460 done
7461 IFS=$as_save_IFS
7462 lt_ac_max=0
7463 lt_ac_count=0
7464 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
7465 # along with /bin/sed that truncates output.
7466 for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
7467   test ! -f $lt_ac_sed && continue
7468   cat /dev/null > conftest.in
7469   lt_ac_count=0
7470   echo $ECHO_N "0123456789$ECHO_C" >conftest.in
7471   # Check for GNU sed and select it if it is found.
7472   if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
7473     lt_cv_path_SED=$lt_ac_sed
7474     break
7475   fi
7476   while true; do
7477     cat conftest.in conftest.in >conftest.tmp
7478     mv conftest.tmp conftest.in
7479     cp conftest.in conftest.nl
7480     echo >>conftest.nl
7481     $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
7482     cmp -s conftest.out conftest.nl || break
7483     # 10000 chars as input seems more than enough
7484     test $lt_ac_count -gt 10 && break
7485     lt_ac_count=`expr $lt_ac_count + 1`
7486     if test $lt_ac_count -gt $lt_ac_max; then
7487       lt_ac_max=$lt_ac_count
7488       lt_cv_path_SED=$lt_ac_sed
7489     fi
7490   done
7491 done
7493 SED=$lt_cv_path_SED
7494 AC_SUBST([SED])
7495 AC_MSG_RESULT([$SED])
7499 dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
7500 # serial 40 IT_PROG_INTLTOOL
7501 AC_DEFUN([IT_PROG_INTLTOOL], [
7502 AC_PREREQ([2.50])dnl
7503 AC_REQUIRE([AM_NLS])dnl
7505 case "$am__api_version" in
7506     1.[01234])
7507         AC_MSG_ERROR([Automake 1.5 or newer is required to use intltool])
7508     ;;
7509     *)
7510     ;;
7511 esac
7513 if test -n "$1"; then
7514     AC_MSG_CHECKING([for intltool >= $1])
7516     INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
7517     INTLTOOL_APPLIED_VERSION=`intltool-update --version | head -1 | cut -d" " -f3`
7518     [INTLTOOL_APPLIED_VERSION_AS_INT=`echo $INTLTOOL_APPLIED_VERSION | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
7519     ]
7520     AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found])
7521     test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
7522         AC_MSG_ERROR([Your intltool is too old.  You need intltool $1 or later.])
7525 AC_PATH_PROG(INTLTOOL_UPDATE, [intltool-update])
7526 AC_PATH_PROG(INTLTOOL_MERGE, [intltool-merge])
7527 AC_PATH_PROG(INTLTOOL_EXTRACT, [intltool-extract])
7528 if test -z "$INTLTOOL_UPDATE" -o -z "$INTLTOOL_MERGE" -o -z "$INTLTOOL_EXTRACT"; then
7529     AC_MSG_ERROR([The intltool scripts were not found. Please install intltool.])
7532   INTLTOOL_DESKTOP_RULE='%.desktop:   %.desktop.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
7533 INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
7534      INTLTOOL_KEYS_RULE='%.keys:      %.keys.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
7535      INTLTOOL_PROP_RULE='%.prop:      %.prop.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
7536       INTLTOOL_OAF_RULE='%.oaf:       %.oaf.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -p $(top_srcdir)/po $< [$]@'
7537      INTLTOOL_PONG_RULE='%.pong:      %.pong.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
7538    INTLTOOL_SERVER_RULE='%.server:    %.server.in    $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
7539     INTLTOOL_SHEET_RULE='%.sheet:     %.sheet.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
7540 INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
7541        INTLTOOL_UI_RULE='%.ui:        %.ui.in        $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
7542       INTLTOOL_XML_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
7543       INTLTOOL_XML_NOMERGE_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u /tmp $< [$]@' 
7544       INTLTOOL_XAM_RULE='%.xam:       %.xml.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
7545       INTLTOOL_KBD_RULE='%.kbd:       %.kbd.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
7546     INTLTOOL_CAVES_RULE='%.caves:     %.caves.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
7547   INTLTOOL_SCHEMAS_RULE='%.schemas:   %.schemas.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
7548     INTLTOOL_THEME_RULE='%.theme:     %.theme.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
7549     INTLTOOL_SERVICE_RULE='%.service: %.service.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
7550    INTLTOOL_POLICY_RULE='%.policy:    %.policy.in    $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
7552 AC_SUBST(INTLTOOL_DESKTOP_RULE)
7553 AC_SUBST(INTLTOOL_DIRECTORY_RULE)
7554 AC_SUBST(INTLTOOL_KEYS_RULE)
7555 AC_SUBST(INTLTOOL_PROP_RULE)
7556 AC_SUBST(INTLTOOL_OAF_RULE)
7557 AC_SUBST(INTLTOOL_PONG_RULE)
7558 AC_SUBST(INTLTOOL_SERVER_RULE)
7559 AC_SUBST(INTLTOOL_SHEET_RULE)
7560 AC_SUBST(INTLTOOL_SOUNDLIST_RULE)
7561 AC_SUBST(INTLTOOL_UI_RULE)
7562 AC_SUBST(INTLTOOL_XAM_RULE)
7563 AC_SUBST(INTLTOOL_KBD_RULE)
7564 AC_SUBST(INTLTOOL_XML_RULE)
7565 AC_SUBST(INTLTOOL_XML_NOMERGE_RULE)
7566 AC_SUBST(INTLTOOL_CAVES_RULE)
7567 AC_SUBST(INTLTOOL_SCHEMAS_RULE)
7568 AC_SUBST(INTLTOOL_THEME_RULE)
7569 AC_SUBST(INTLTOOL_SERVICE_RULE)
7570 AC_SUBST(INTLTOOL_POLICY_RULE)
7572 # Check the gettext tools to make sure they are GNU
7573 AC_PATH_PROG(XGETTEXT, xgettext)
7574 AC_PATH_PROG(MSGMERGE, msgmerge)
7575 AC_PATH_PROG(MSGFMT, msgfmt)
7576 AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
7577 if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then
7578     AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
7580 xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`"
7581 mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`"
7582 mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`"
7583 if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then
7584     AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
7587 AC_PATH_PROG(INTLTOOL_PERL, [perl])
7588 if test -z "$INTLTOOL_PERL"; then
7589    AC_MSG_ERROR([perl not found; required for intltool])
7591 if test -z "`$INTLTOOL_PERL -v | fgrep '5.' 2> /dev/null`"; then
7592    AC_MSG_ERROR([perl 5.x required for intltool])
7594 if test "x$2" != "xno-xml"; then
7595    AC_MSG_CHECKING([for XML::Parser])
7596    if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then
7597        AC_MSG_RESULT([ok])
7598    else
7599        AC_MSG_ERROR([XML::Parser perl module is required for intltool])
7600    fi
7603 # Substitute ALL_LINGUAS so we can use it in po/Makefile
7604 AC_SUBST(ALL_LINGUAS)
7606 # Set DATADIRNAME correctly if it is not set yet
7607 # (copied from glib-gettext.m4)
7608 if test -z "$DATADIRNAME"; then
7609   AC_LINK_IFELSE(
7610     [AC_LANG_PROGRAM([[]],
7611                      [[extern int _nl_msg_cat_cntr;
7612                        return _nl_msg_cat_cntr]])],
7613     [DATADIRNAME=share],
7614     [case $host in
7615     *-*-solaris*)
7616     dnl On Solaris, if bind_textdomain_codeset is in libc,
7617     dnl GNU format message catalog is always supported,
7618     dnl since both are added to the libc all together.
7619     dnl Hence, we'd like to go with DATADIRNAME=share
7620     dnl in this case.
7621     AC_CHECK_FUNC(bind_textdomain_codeset,
7622       [DATADIRNAME=share], [DATADIRNAME=lib])
7623     ;;
7624     *)
7625     [DATADIRNAME=lib]
7626     ;;
7627     esac])
7629 AC_SUBST(DATADIRNAME)
7631 IT_PO_SUBDIR([po])
7636 # IT_PO_SUBDIR(DIRNAME)
7637 # ---------------------
7638 # All po subdirs have to be declared with this macro; the subdir "po" is
7639 # declared by IT_PROG_INTLTOOL.
7641 AC_DEFUN([IT_PO_SUBDIR],
7642 [AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS.
7644 dnl The following CONFIG_COMMANDS should be exetuted at the very end
7645 dnl of config.status.
7646 AC_CONFIG_COMMANDS_PRE([
7647   AC_CONFIG_COMMANDS([$1/stamp-it], [
7648     if [ ! grep "^# INTLTOOL_MAKEFILE$" "$1/Makefile.in" ]; then
7649        AC_MSG_ERROR([$1/Makefile.in.in was not created by intltoolize.])
7650     fi
7651     rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp"
7652     >"$1/stamp-it.tmp"
7653     [sed '/^#/d
7654          s/^[[].*] *//
7655          /^[    ]*$/d
7656         '"s|^|  $ac_top_srcdir/|" \
7657       "$srcdir/$1/POTFILES.in" | sed '$!s/$/ \\/' >"$1/POTFILES"
7658     ]
7659     [sed '/^POTFILES =/,/[^\\]$/ {
7660                 /^POTFILES =/!d
7661                 r $1/POTFILES
7662           }
7663          ' "$1/Makefile.in" >"$1/Makefile"]
7664     rm -f "$1/Makefile.tmp"
7665     mv "$1/stamp-it.tmp" "$1/stamp-it"
7666   ])
7667 ])dnl
7670 # deprecated macros
7671 AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL])
7672 # A hint is needed for aclocal from Automake <= 1.9.4:
7673 # AC_DEFUN([AC_PROG_INTLTOOL], ...)
7676 # nls.m4 serial 3 (gettext-0.15)
7677 dnl Copyright (C) 1995-2003, 2005-2006 Free Software Foundation, Inc.
7678 dnl This file is free software; the Free Software Foundation
7679 dnl gives unlimited permission to copy and/or distribute it,
7680 dnl with or without modifications, as long as this notice is preserved.
7682 dnl This file can can be used in projects which are not available under
7683 dnl the GNU General Public License or the GNU Library General Public
7684 dnl License but which still want to provide support for the GNU gettext
7685 dnl functionality.
7686 dnl Please note that the actual code of the GNU gettext library is covered
7687 dnl by the GNU Library General Public License, and the rest of the GNU
7688 dnl gettext package package is covered by the GNU General Public License.
7689 dnl They are *not* in the public domain.
7691 dnl Authors:
7692 dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
7693 dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2003.
7695 AC_PREREQ(2.50)
7697 AC_DEFUN([AM_NLS],
7699   AC_MSG_CHECKING([whether NLS is requested])
7700   dnl Default is enabled NLS
7701   AC_ARG_ENABLE(nls,
7702     [  --disable-nls           do not use Native Language Support],
7703     USE_NLS=$enableval, USE_NLS=yes)
7704   AC_MSG_RESULT($USE_NLS)
7705   AC_SUBST(USE_NLS)
7708 # pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
7710 # Copyright Â© 2004 Scott James Remnant <scott@netsplit.com>.
7712 # This program is free software; you can redistribute it and/or modify
7713 # it under the terms of the GNU General Public License as published by
7714 # the Free Software Foundation; either version 2 of the License, or
7715 # (at your option) any later version.
7717 # This program is distributed in the hope that it will be useful, but
7718 # WITHOUT ANY WARRANTY; without even the implied warranty of
7719 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
7720 # General Public License for more details.
7722 # You should have received a copy of the GNU General Public License
7723 # along with this program; if not, write to the Free Software
7724 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7726 # As a special exception to the GNU General Public License, if you
7727 # distribute this file as part of a program that contains a
7728 # configuration script generated by Autoconf, you may include it under
7729 # the same distribution terms that you use for the rest of that program.
7731 # PKG_PROG_PKG_CONFIG([MIN-VERSION])
7732 # ----------------------------------
7733 AC_DEFUN([PKG_PROG_PKG_CONFIG],
7734 [m4_pattern_forbid([^_?PKG_[A-Z_]+$])
7735 m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
7736 AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
7737 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
7738         AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
7740 if test -n "$PKG_CONFIG"; then
7741         _pkg_min_version=m4_default([$1], [0.9.0])
7742         AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
7743         if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
7744                 AC_MSG_RESULT([yes])
7745         else
7746                 AC_MSG_RESULT([no])
7747                 PKG_CONFIG=""
7748         fi
7749                 
7750 fi[]dnl
7751 ])# PKG_PROG_PKG_CONFIG
7753 # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
7755 # Check to see whether a particular set of modules exists.  Similar
7756 # to PKG_CHECK_MODULES(), but does not set variables or print errors.
7759 # Similar to PKG_CHECK_MODULES, make sure that the first instance of
7760 # this or PKG_CHECK_MODULES is called, or make sure to call
7761 # PKG_CHECK_EXISTS manually
7762 # --------------------------------------------------------------
7763 AC_DEFUN([PKG_CHECK_EXISTS],
7764 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
7765 if test -n "$PKG_CONFIG" && \
7766     AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
7767   m4_ifval([$2], [$2], [:])
7768 m4_ifvaln([$3], [else
7769   $3])dnl
7770 fi])
7773 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
7774 # ---------------------------------------------
7775 m4_define([_PKG_CONFIG],
7776 [if test -n "$PKG_CONFIG"; then
7777     if test -n "$$1"; then
7778         pkg_cv_[]$1="$$1"
7779     else
7780         PKG_CHECK_EXISTS([$3],
7781                          [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
7782                          [pkg_failed=yes])
7783     fi
7784 else
7785         pkg_failed=untried
7786 fi[]dnl
7787 ])# _PKG_CONFIG
7789 # _PKG_SHORT_ERRORS_SUPPORTED
7790 # -----------------------------
7791 AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
7792 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])
7793 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
7794         _pkg_short_errors_supported=yes
7795 else
7796         _pkg_short_errors_supported=no
7797 fi[]dnl
7798 ])# _PKG_SHORT_ERRORS_SUPPORTED
7801 # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
7802 # [ACTION-IF-NOT-FOUND])
7805 # Note that if there is a possibility the first call to
7806 # PKG_CHECK_MODULES might not happen, you should be sure to include an
7807 # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
7810 # --------------------------------------------------------------
7811 AC_DEFUN([PKG_CHECK_MODULES],
7812 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
7813 AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
7814 AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
7816 pkg_failed=no
7817 AC_MSG_CHECKING([for $1])
7819 _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
7820 _PKG_CONFIG([$1][_LIBS], [libs], [$2])
7822 m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
7823 and $1[]_LIBS to avoid the need to call pkg-config.
7824 See the pkg-config man page for more details.])
7826 if test $pkg_failed = yes; then
7827         _PKG_SHORT_ERRORS_SUPPORTED
7828         if test $_pkg_short_errors_supported = yes; then
7829                 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"`
7830         else 
7831                 $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
7832         fi
7833         # Put the nasty error message in config.log where it belongs
7834         echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
7836         ifelse([$4], , [AC_MSG_ERROR(dnl
7837 [Package requirements ($2) were not met:
7839 $$1_PKG_ERRORS
7841 Consider adjusting the PKG_CONFIG_PATH environment variable if you
7842 installed software in a non-standard prefix.
7844 _PKG_TEXT
7845 ])],
7846                 [AC_MSG_RESULT([no])
7847                 $4])
7848 elif test $pkg_failed = untried; then
7849         ifelse([$4], , [AC_MSG_FAILURE(dnl
7850 [The pkg-config script could not be found or is too old.  Make sure it
7851 is in your PATH or set the PKG_CONFIG environment variable to the full
7852 path to pkg-config.
7854 _PKG_TEXT
7856 To get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
7857                 [$4])
7858 else
7859         $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
7860         $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
7861         AC_MSG_RESULT([yes])
7862         ifelse([$3], , :, [$3])
7863 fi[]dnl
7864 ])# PKG_CHECK_MODULES
7866 # Copyright (C) 1995-2002 Free Software Foundation, Inc.
7867 # Copyright (C) 2001-2003,2004 Red Hat, Inc.
7869 # This file is free software, distributed under the terms of the GNU
7870 # General Public License.  As a special exception to the GNU General
7871 # Public License, this file may be distributed as part of a program
7872 # that contains a configuration script generated by Autoconf, under
7873 # the same distribution terms as the rest of that program.
7875 # This file can be copied and used freely without restrictions.  It can
7876 # be used in projects which are not available under the GNU Public License
7877 # but which still want to provide support for the GNU gettext functionality.
7879 # Macro to add for using GNU gettext.
7880 # Ulrich Drepper <drepper@cygnus.com>, 1995, 1996
7882 # Modified to never use included libintl. 
7883 # Owen Taylor <otaylor@redhat.com>, 12/15/1998
7885 # Major rework to remove unused code
7886 # Owen Taylor <otaylor@redhat.com>, 12/11/2002
7888 # Added better handling of ALL_LINGUAS from GNU gettext version 
7889 # written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002
7891 # Modified to require ngettext
7892 # Matthias Clasen <mclasen@redhat.com> 08/06/2004
7894 # We need this here as well, since someone might use autoconf-2.5x
7895 # to configure GLib then an older version to configure a package
7896 # using AM_GLIB_GNU_GETTEXT
7897 AC_PREREQ(2.53)
7900 dnl We go to great lengths to make sure that aclocal won't 
7901 dnl try to pull in the installed version of these macros
7902 dnl when running aclocal in the glib directory.
7904 m4_copy([AC_DEFUN],[glib_DEFUN])
7905 m4_copy([AC_REQUIRE],[glib_REQUIRE])
7907 dnl At the end, if we're not within glib, we'll define the public
7908 dnl definitions in terms of our private definitions.
7911 # GLIB_LC_MESSAGES
7912 #--------------------
7913 glib_DEFUN([GLIB_LC_MESSAGES],
7914   [AC_CHECK_HEADERS([locale.h])
7915     if test $ac_cv_header_locale_h = yes; then
7916     AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
7917       [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
7918        am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
7919     if test $am_cv_val_LC_MESSAGES = yes; then
7920       AC_DEFINE(HAVE_LC_MESSAGES, 1,
7921         [Define if your <locale.h> file defines LC_MESSAGES.])
7922     fi
7923   fi])
7925 # GLIB_PATH_PROG_WITH_TEST
7926 #----------------------------
7927 dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
7928 dnl   TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
7929 glib_DEFUN([GLIB_PATH_PROG_WITH_TEST],
7930 [# Extract the first word of "$2", so it can be a program name with args.
7931 set dummy $2; ac_word=[$]2
7932 AC_MSG_CHECKING([for $ac_word])
7933 AC_CACHE_VAL(ac_cv_path_$1,
7934 [case "[$]$1" in
7935   /*)
7936   ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
7937   ;;
7938   *)
7939   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
7940   for ac_dir in ifelse([$5], , $PATH, [$5]); do
7941     test -z "$ac_dir" && ac_dir=.
7942     if test -f $ac_dir/$ac_word; then
7943       if [$3]; then
7944         ac_cv_path_$1="$ac_dir/$ac_word"
7945         break
7946       fi
7947     fi
7948   done
7949   IFS="$ac_save_ifs"
7950 dnl If no 4th arg is given, leave the cache variable unset,
7951 dnl so AC_PATH_PROGS will keep looking.
7952 ifelse([$4], , , [  test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
7953 ])dnl
7954   ;;
7955 esac])dnl
7956 $1="$ac_cv_path_$1"
7957 if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
7958   AC_MSG_RESULT([$]$1)
7959 else
7960   AC_MSG_RESULT(no)
7962 AC_SUBST($1)dnl
7965 # GLIB_WITH_NLS
7966 #-----------------
7967 glib_DEFUN([GLIB_WITH_NLS],
7968   dnl NLS is obligatory
7969   [USE_NLS=yes
7970     AC_SUBST(USE_NLS)
7972     gt_cv_have_gettext=no
7974     CATOBJEXT=NONE
7975     XGETTEXT=:
7976     INTLLIBS=
7978     AC_CHECK_HEADER(libintl.h,
7979      [gt_cv_func_dgettext_libintl="no"
7980       libintl_extra_libs=""
7982       #
7983       # First check in libc
7984       #
7985       AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc,
7986         [AC_TRY_LINK([
7987 #include <libintl.h>
7989          [return !ngettext ("","", 1)],
7990           gt_cv_func_ngettext_libc=yes,
7991           gt_cv_func_ngettext_libc=no)
7992         ])
7993   
7994       if test "$gt_cv_func_ngettext_libc" = "yes" ; then
7995               AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
7996                 [AC_TRY_LINK([
7997 #include <libintl.h>
7999                   [return !dgettext ("","")],
8000                   gt_cv_func_dgettext_libc=yes,
8001                   gt_cv_func_dgettext_libc=no)
8002                 ])
8003       fi
8004   
8005       if test "$gt_cv_func_ngettext_libc" = "yes" ; then
8006         AC_CHECK_FUNCS(bind_textdomain_codeset)
8007       fi
8009       #
8010       # If we don't have everything we want, check in libintl
8011       #
8012       if test "$gt_cv_func_dgettext_libc" != "yes" \
8013          || test "$gt_cv_func_ngettext_libc" != "yes" \
8014          || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
8015         
8016         AC_CHECK_LIB(intl, bindtextdomain,
8017             [AC_CHECK_LIB(intl, ngettext,
8018                     [AC_CHECK_LIB(intl, dgettext,
8019                                   gt_cv_func_dgettext_libintl=yes)])])
8021         if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
8022           AC_MSG_CHECKING([if -liconv is needed to use gettext])
8023           AC_MSG_RESULT([])
8024           AC_CHECK_LIB(intl, ngettext,
8025                 [AC_CHECK_LIB(intl, dcgettext,
8026                        [gt_cv_func_dgettext_libintl=yes
8027                         libintl_extra_libs=-liconv],
8028                         :,-liconv)],
8029                 :,-liconv)
8030         fi
8032         #
8033         # If we found libintl, then check in it for bind_textdomain_codeset();
8034         # we'll prefer libc if neither have bind_textdomain_codeset(),
8035         # and both have dgettext and ngettext
8036         #
8037         if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
8038           glib_save_LIBS="$LIBS"
8039           LIBS="$LIBS -lintl $libintl_extra_libs"
8040           unset ac_cv_func_bind_textdomain_codeset
8041           AC_CHECK_FUNCS(bind_textdomain_codeset)
8042           LIBS="$glib_save_LIBS"
8044           if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
8045             gt_cv_func_dgettext_libc=no
8046           else
8047             if test "$gt_cv_func_dgettext_libc" = "yes" \
8048                 && test "$gt_cv_func_ngettext_libc" = "yes"; then
8049               gt_cv_func_dgettext_libintl=no
8050             fi
8051           fi
8052         fi
8053       fi
8055       if test "$gt_cv_func_dgettext_libc" = "yes" \
8056         || test "$gt_cv_func_dgettext_libintl" = "yes"; then
8057         gt_cv_have_gettext=yes
8058       fi
8059   
8060       if test "$gt_cv_func_dgettext_libintl" = "yes"; then
8061         INTLLIBS="-lintl $libintl_extra_libs"
8062       fi
8063   
8064       if test "$gt_cv_have_gettext" = "yes"; then
8065         AC_DEFINE(HAVE_GETTEXT,1,
8066           [Define if the GNU gettext() function is already present or preinstalled.])
8067         GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
8068           [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
8069         if test "$MSGFMT" != "no"; then
8070           glib_save_LIBS="$LIBS"
8071           LIBS="$LIBS $INTLLIBS"
8072           AC_CHECK_FUNCS(dcgettext)
8073           MSGFMT_OPTS=
8074           AC_MSG_CHECKING([if msgfmt accepts -c])
8075           GLIB_RUN_PROG([$MSGFMT -c -o /dev/null],[
8076 msgid ""
8077 msgstr ""
8078 "Content-Type: text/plain; charset=UTF-8\n"
8079 "Project-Id-Version: test 1.0\n"
8080 "PO-Revision-Date: 2007-02-15 12:01+0100\n"
8081 "Last-Translator: test <foo@bar.xx>\n"
8082 "Language-Team: C <LL@li.org>\n"
8083 "MIME-Version: 1.0\n"
8084 "Content-Transfer-Encoding: 8bit\n"
8085 ], [MSGFMT_OPTS=-c; AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])])
8086           AC_SUBST(MSGFMT_OPTS)
8087           AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
8088           GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
8089             [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
8090           AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
8091                          return _nl_msg_cat_cntr],
8092             [CATOBJEXT=.gmo 
8093              DATADIRNAME=share],
8094             [case $host in
8095             *-*-solaris*)
8096             dnl On Solaris, if bind_textdomain_codeset is in libc,
8097             dnl GNU format message catalog is always supported,
8098             dnl since both are added to the libc all together.
8099             dnl Hence, we'd like to go with DATADIRNAME=share and
8100             dnl and CATOBJEXT=.gmo in this case.
8101             AC_CHECK_FUNC(bind_textdomain_codeset,
8102               [CATOBJEXT=.gmo 
8103                DATADIRNAME=share],
8104               [CATOBJEXT=.mo
8105                DATADIRNAME=lib])
8106             ;;
8107             *)
8108             CATOBJEXT=.mo
8109             DATADIRNAME=lib
8110             ;;
8111             esac])
8112           LIBS="$glib_save_LIBS"
8113           INSTOBJEXT=.mo
8114         else
8115           gt_cv_have_gettext=no
8116         fi
8117       fi
8118     ])
8120     if test "$gt_cv_have_gettext" = "yes" ; then
8121       AC_DEFINE(ENABLE_NLS, 1,
8122         [always defined to indicate that i18n is enabled])
8123     fi
8125     dnl Test whether we really found GNU xgettext.
8126     if test "$XGETTEXT" != ":"; then
8127       dnl If it is not GNU xgettext we define it as : so that the
8128       dnl Makefiles still can work.
8129       if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
8130         : ;
8131       else
8132         AC_MSG_RESULT(
8133           [found xgettext program is not GNU xgettext; ignore it])
8134         XGETTEXT=":"
8135       fi
8136     fi
8138     # We need to process the po/ directory.
8139     POSUB=po
8141     AC_OUTPUT_COMMANDS(
8142       [case "$CONFIG_FILES" in *po/Makefile.in*)
8143         sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
8144       esac])
8146     dnl These rules are solely for the distribution goal.  While doing this
8147     dnl we only have to keep exactly one list of the available catalogs
8148     dnl in configure.in.
8149     for lang in $ALL_LINGUAS; do
8150       GMOFILES="$GMOFILES $lang.gmo"
8151       POFILES="$POFILES $lang.po"
8152     done
8154     dnl Make all variables we use known to autoconf.
8155     AC_SUBST(CATALOGS)
8156     AC_SUBST(CATOBJEXT)
8157     AC_SUBST(DATADIRNAME)
8158     AC_SUBST(GMOFILES)
8159     AC_SUBST(INSTOBJEXT)
8160     AC_SUBST(INTLLIBS)
8161     AC_SUBST(PO_IN_DATADIR_TRUE)
8162     AC_SUBST(PO_IN_DATADIR_FALSE)
8163     AC_SUBST(POFILES)
8164     AC_SUBST(POSUB)
8165   ])
8167 # AM_GLIB_GNU_GETTEXT
8168 # -------------------
8169 # Do checks necessary for use of gettext. If a suitable implementation 
8170 # of gettext is found in either in libintl or in the C library,
8171 # it will set INTLLIBS to the libraries needed for use of gettext
8172 # and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable
8173 # gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST()
8174 # on various variables needed by the Makefile.in.in installed by 
8175 # glib-gettextize.
8177 glib_DEFUN([GLIB_GNU_GETTEXT],
8178   [AC_REQUIRE([AC_PROG_CC])dnl
8179    AC_REQUIRE([AC_HEADER_STDC])dnl
8180    
8181    GLIB_LC_MESSAGES
8182    GLIB_WITH_NLS
8184    if test "$gt_cv_have_gettext" = "yes"; then
8185      if test "x$ALL_LINGUAS" = "x"; then
8186        LINGUAS=
8187      else
8188        AC_MSG_CHECKING(for catalogs to be installed)
8189        NEW_LINGUAS=
8190        for presentlang in $ALL_LINGUAS; do
8191          useit=no
8192          if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
8193            desiredlanguages="$LINGUAS"
8194          else
8195            desiredlanguages="$ALL_LINGUAS"
8196          fi
8197          for desiredlang in $desiredlanguages; do
8198            # Use the presentlang catalog if desiredlang is
8199            #   a. equal to presentlang, or
8200            #   b. a variant of presentlang (because in this case,
8201            #      presentlang can be used as a fallback for messages
8202            #      which are not translated in the desiredlang catalog).
8203            case "$desiredlang" in
8204              "$presentlang"*) useit=yes;;
8205            esac
8206          done
8207          if test $useit = yes; then
8208            NEW_LINGUAS="$NEW_LINGUAS $presentlang"
8209          fi
8210        done
8211        LINGUAS=$NEW_LINGUAS
8212        AC_MSG_RESULT($LINGUAS)
8213      fi
8215      dnl Construct list of names of catalog files to be constructed.
8216      if test -n "$LINGUAS"; then
8217        for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
8218      fi
8219    fi
8221    dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
8222    dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
8223    dnl Try to locate is.
8224    MKINSTALLDIRS=
8225    if test -n "$ac_aux_dir"; then
8226      MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
8227    fi
8228    if test -z "$MKINSTALLDIRS"; then
8229      MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
8230    fi
8231    AC_SUBST(MKINSTALLDIRS)
8233    dnl Generate list of files to be processed by xgettext which will
8234    dnl be included in po/Makefile.
8235    test -d po || mkdir po
8236    if test "x$srcdir" != "x."; then
8237      if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
8238        posrcprefix="$srcdir/"
8239      else
8240        posrcprefix="../$srcdir/"
8241      fi
8242    else
8243      posrcprefix="../"
8244    fi
8245    rm -f po/POTFILES
8246    sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
8247         < $srcdir/po/POTFILES.in > po/POTFILES
8248   ])
8250 # AM_GLIB_DEFINE_LOCALEDIR(VARIABLE)
8251 # -------------------------------
8252 # Define VARIABLE to the location where catalog files will
8253 # be installed by po/Makefile.
8254 glib_DEFUN([GLIB_DEFINE_LOCALEDIR],
8255 [glib_REQUIRE([GLIB_GNU_GETTEXT])dnl
8256 glib_save_prefix="$prefix"
8257 glib_save_exec_prefix="$exec_prefix"
8258 glib_save_datarootdir="$datarootdir"
8259 test "x$prefix" = xNONE && prefix=$ac_default_prefix
8260 test "x$exec_prefix" = xNONE && exec_prefix=$prefix
8261 datarootdir=`eval echo "${datarootdir}"`
8262 if test "x$CATOBJEXT" = "x.mo" ; then
8263   localedir=`eval echo "${libdir}/locale"`
8264 else
8265   localedir=`eval echo "${datadir}/locale"`
8267 prefix="$glib_save_prefix"
8268 exec_prefix="$glib_save_exec_prefix"
8269 datarootdir="$glib_save_datarootdir"
8270 AC_DEFINE_UNQUOTED($1, "$localedir",
8271   [Define the location where the catalogs will be installed])
8275 dnl Now the definitions that aclocal will find
8277 ifdef(glib_configure_in,[],[
8278 AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)])
8279 AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)])
8280 ])dnl
8282 # GLIB_RUN_PROG(PROGRAM, TEST-FILE, [ACTION-IF-PASS], [ACTION-IF-FAIL])
8284 # Create a temporary file with TEST-FILE as its contents and pass the
8285 # file name to PROGRAM.  Perform ACTION-IF-PASS if PROGRAM exits with
8286 # 0 and perform ACTION-IF-FAIL for any other exit status.
8287 AC_DEFUN([GLIB_RUN_PROG],
8288 [cat >conftest.foo <<_ACEOF
8290 _ACEOF
8291 if AC_RUN_LOG([$1 conftest.foo]); then
8292   m4_ifval([$3], [$3], [:])
8293 m4_ifvaln([$4], [else $4])dnl
8294 echo "$as_me: failed input was:" >&AS_MESSAGE_LOG_FD
8295 sed 's/^/| /' conftest.foo >&AS_MESSAGE_LOG_FD
8296 fi])