Maemopad+ 0.35 "Long Time No See" released
[maemopadplus.git] / aclocal.m4
blobfa867ca4d2b18f839d5576e6b427e663368106d9
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 47 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
953 AC_LIBTOOL_SYS_MAX_CMD_LEN
954 AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
955 AC_LIBTOOL_OBJDIR
957 AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
958 _LT_AC_PROG_ECHO_BACKSLASH
960 case $host_os in
961 aix3*)
962   # AIX sometimes has problems with the GCC collect2 program.  For some
963   # reason, if we set the COLLECT_NAMES environment variable, the problems
964   # vanish in a puff of smoke.
965   if test "X${COLLECT_NAMES+set}" != Xset; then
966     COLLECT_NAMES=
967     export COLLECT_NAMES
968   fi
969   ;;
970 esac
972 # Sed substitution that helps us do robust quoting.  It backslashifies
973 # metacharacters that are still active within double-quoted strings.
974 Xsed='sed -e 1s/^X//'
975 [sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
977 # Same as above, but do not quote variable references.
978 [double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
980 # Sed substitution to delay expansion of an escaped shell variable in a
981 # double_quote_subst'ed string.
982 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
984 # Sed substitution to avoid accidental globbing in evaled expressions
985 no_glob_subst='s/\*/\\\*/g'
987 # Constants:
988 rm="rm -f"
990 # Global variables:
991 default_ofile=libtool
992 can_build_shared=yes
994 # All known linkers require a `.a' archive for static linking (except MSVC,
995 # which needs '.lib').
996 libext=a
997 ltmain="$ac_aux_dir/ltmain.sh"
998 ofile="$default_ofile"
999 with_gnu_ld="$lt_cv_prog_gnu_ld"
1001 AC_CHECK_TOOL(AR, ar, false)
1002 AC_CHECK_TOOL(RANLIB, ranlib, :)
1003 AC_CHECK_TOOL(STRIP, strip, :)
1005 old_CC="$CC"
1006 old_CFLAGS="$CFLAGS"
1008 # Set sane defaults for various variables
1009 test -z "$AR" && AR=ar
1010 test -z "$AR_FLAGS" && AR_FLAGS=cru
1011 test -z "$AS" && AS=as
1012 test -z "$CC" && CC=cc
1013 test -z "$LTCC" && LTCC=$CC
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$old_deplibs'
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="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
1034     ;;
1035   *)
1036     old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
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 AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
1054 AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
1055 enable_win32_dll=yes, enable_win32_dll=no)
1057 AC_ARG_ENABLE([libtool-lock],
1058     [AC_HELP_STRING([--disable-libtool-lock],
1059         [avoid locking (might break parallel builds)])])
1060 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
1062 AC_ARG_WITH([pic],
1063     [AC_HELP_STRING([--with-pic],
1064         [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
1065     [pic_mode="$withval"],
1066     [pic_mode=default])
1067 test -z "$pic_mode" && pic_mode=default
1069 # Use C for the default configuration in the libtool script
1070 tagname=
1071 AC_LIBTOOL_LANG_C_CONFIG
1072 _LT_AC_TAGCONFIG
1073 ])# AC_LIBTOOL_SETUP
1076 # _LT_AC_SYS_COMPILER
1077 # -------------------
1078 AC_DEFUN([_LT_AC_SYS_COMPILER],
1079 [AC_REQUIRE([AC_PROG_CC])dnl
1081 # If no C compiler was specified, use CC.
1082 LTCC=${LTCC-"$CC"}
1084 # Allow CC to be a program name with arguments.
1085 compiler=$CC
1086 ])# _LT_AC_SYS_COMPILER
1089 # _LT_CC_BASENAME(CC)
1090 # -------------------
1091 # Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
1092 AC_DEFUN([_LT_CC_BASENAME],
1093 [for cc_temp in $1""; do
1094   case $cc_temp in
1095     compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
1096     distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
1097     \-*) ;;
1098     *) break;;
1099   esac
1100 done
1101 cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
1105 # _LT_COMPILER_BOILERPLATE
1106 # ------------------------
1107 # Check for compiler boilerplate output or warnings with
1108 # the simple compiler test code.
1109 AC_DEFUN([_LT_COMPILER_BOILERPLATE],
1110 [ac_outfile=conftest.$ac_objext
1111 printf "$lt_simple_compile_test_code" >conftest.$ac_ext
1112 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err
1113 _lt_compiler_boilerplate=`cat conftest.err`
1114 $rm conftest*
1115 ])# _LT_COMPILER_BOILERPLATE
1118 # _LT_LINKER_BOILERPLATE
1119 # ----------------------
1120 # Check for linker boilerplate output or warnings with
1121 # the simple link test code.
1122 AC_DEFUN([_LT_LINKER_BOILERPLATE],
1123 [ac_outfile=conftest.$ac_objext
1124 printf "$lt_simple_link_test_code" >conftest.$ac_ext
1125 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err
1126 _lt_linker_boilerplate=`cat conftest.err`
1127 $rm conftest*
1128 ])# _LT_LINKER_BOILERPLATE
1131 # _LT_AC_SYS_LIBPATH_AIX
1132 # ----------------------
1133 # Links a minimal program and checks the executable
1134 # for the system default hardcoded library path. In most cases,
1135 # this is /usr/lib:/lib, but when the MPI compilers are used
1136 # the location of the communication and MPI libs are included too.
1137 # If we don't find anything, use the default library path according
1138 # to the aix ld manual.
1139 AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
1140 [AC_LINK_IFELSE(AC_LANG_PROGRAM,[
1141 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
1143 # Check for a 64-bit object if we didn't find anything.
1144 if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
1145 }'`; fi],[])
1146 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
1147 ])# _LT_AC_SYS_LIBPATH_AIX
1150 # _LT_AC_SHELL_INIT(ARG)
1151 # ----------------------
1152 AC_DEFUN([_LT_AC_SHELL_INIT],
1153 [ifdef([AC_DIVERSION_NOTICE],
1154              [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
1155          [AC_DIVERT_PUSH(NOTICE)])
1157 AC_DIVERT_POP
1158 ])# _LT_AC_SHELL_INIT
1161 # _LT_AC_PROG_ECHO_BACKSLASH
1162 # --------------------------
1163 # Add some code to the start of the generated configure script which
1164 # will find an echo command which doesn't interpret backslashes.
1165 AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
1166 [_LT_AC_SHELL_INIT([
1167 # Check that we are running under the correct shell.
1168 SHELL=${CONFIG_SHELL-/bin/sh}
1170 case X$ECHO in
1171 X*--fallback-echo)
1172   # Remove one level of quotation (which was required for Make).
1173   ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
1174   ;;
1175 esac
1177 echo=${ECHO-echo}
1178 if test "X[$]1" = X--no-reexec; then
1179   # Discard the --no-reexec flag, and continue.
1180   shift
1181 elif test "X[$]1" = X--fallback-echo; then
1182   # Avoid inline document here, it may be left over
1183   :
1184 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
1185   # Yippee, $echo works!
1186   :
1187 else
1188   # Restart under the correct shell.
1189   exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
1192 if test "X[$]1" = X--fallback-echo; then
1193   # used as fallback echo
1194   shift
1195   cat <<EOF
1196 [$]*
1198   exit 0
1201 # The HP-UX ksh and POSIX shell print the target directory to stdout
1202 # if CDPATH is set.
1203 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
1205 if test -z "$ECHO"; then
1206 if test "X${echo_test_string+set}" != Xset; then
1207 # find a string as large as possible, as long as the shell can cope with it
1208   for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
1209     # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
1210     if (echo_test_string=`eval $cmd`) 2>/dev/null &&
1211        echo_test_string=`eval $cmd` &&
1212        (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
1213     then
1214       break
1215     fi
1216   done
1219 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
1220    echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
1221    test "X$echo_testing_string" = "X$echo_test_string"; then
1222   :
1223 else
1224   # The Solaris, AIX, and Digital Unix default echo programs unquote
1225   # backslashes.  This makes it impossible to quote backslashes using
1226   #   echo "$something" | sed 's/\\/\\\\/g'
1227   #
1228   # So, first we look for a working echo in the user's PATH.
1230   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
1231   for dir in $PATH /usr/ucb; do
1232     IFS="$lt_save_ifs"
1233     if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
1234        test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
1235        echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
1236        test "X$echo_testing_string" = "X$echo_test_string"; then
1237       echo="$dir/echo"
1238       break
1239     fi
1240   done
1241   IFS="$lt_save_ifs"
1243   if test "X$echo" = Xecho; then
1244     # We didn't find a better echo, so look for alternatives.
1245     if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
1246        echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
1247        test "X$echo_testing_string" = "X$echo_test_string"; then
1248       # This shell has a builtin print -r that does the trick.
1249       echo='print -r'
1250     elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
1251          test "X$CONFIG_SHELL" != X/bin/ksh; then
1252       # If we have ksh, try running configure again with it.
1253       ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
1254       export ORIGINAL_CONFIG_SHELL
1255       CONFIG_SHELL=/bin/ksh
1256       export CONFIG_SHELL
1257       exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
1258     else
1259       # Try using printf.
1260       echo='printf %s\n'
1261       if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
1262          echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
1263          test "X$echo_testing_string" = "X$echo_test_string"; then
1264         # Cool, printf works
1265         :
1266       elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1267            test "X$echo_testing_string" = 'X\t' &&
1268            echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1269            test "X$echo_testing_string" = "X$echo_test_string"; then
1270         CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
1271         export CONFIG_SHELL
1272         SHELL="$CONFIG_SHELL"
1273         export SHELL
1274         echo="$CONFIG_SHELL [$]0 --fallback-echo"
1275       elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1276            test "X$echo_testing_string" = 'X\t' &&
1277            echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1278            test "X$echo_testing_string" = "X$echo_test_string"; then
1279         echo="$CONFIG_SHELL [$]0 --fallback-echo"
1280       else
1281         # maybe with a smaller string...
1282         prev=:
1284         for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
1285           if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
1286           then
1287             break
1288           fi
1289           prev="$cmd"
1290         done
1292         if test "$prev" != 'sed 50q "[$]0"'; then
1293           echo_test_string=`eval $prev`
1294           export echo_test_string
1295           exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
1296         else
1297           # Oops.  We lost completely, so just stick with echo.
1298           echo=echo
1299         fi
1300       fi
1301     fi
1302   fi
1306 # Copy echo and quote the copy suitably for passing to libtool from
1307 # the Makefile, instead of quoting the original, which is used later.
1308 ECHO=$echo
1309 if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
1310    ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
1313 AC_SUBST(ECHO)
1314 ])])# _LT_AC_PROG_ECHO_BACKSLASH
1317 # _LT_AC_LOCK
1318 # -----------
1319 AC_DEFUN([_LT_AC_LOCK],
1320 [AC_ARG_ENABLE([libtool-lock],
1321     [AC_HELP_STRING([--disable-libtool-lock],
1322         [avoid locking (might break parallel builds)])])
1323 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
1325 # Some flags need to be propagated to the compiler or linker for good
1326 # libtool support.
1327 case $host in
1328 ia64-*-hpux*)
1329   # Find out which ABI we are using.
1330   echo 'int i;' > conftest.$ac_ext
1331   if AC_TRY_EVAL(ac_compile); then
1332     case `/usr/bin/file conftest.$ac_objext` in
1333     *ELF-32*)
1334       HPUX_IA64_MODE="32"
1335       ;;
1336     *ELF-64*)
1337       HPUX_IA64_MODE="64"
1338       ;;
1339     esac
1340   fi
1341   rm -rf conftest*
1342   ;;
1343 *-*-irix6*)
1344   # Find out which ABI we are using.
1345   echo '[#]line __oline__ "configure"' > conftest.$ac_ext
1346   if AC_TRY_EVAL(ac_compile); then
1347    if test "$lt_cv_prog_gnu_ld" = yes; then
1348     case `/usr/bin/file conftest.$ac_objext` in
1349     *32-bit*)
1350       LD="${LD-ld} -melf32bsmip"
1351       ;;
1352     *N32*)
1353       LD="${LD-ld} -melf32bmipn32"
1354       ;;
1355     *64-bit*)
1356       LD="${LD-ld} -melf64bmip"
1357       ;;
1358     esac
1359    else
1360     case `/usr/bin/file conftest.$ac_objext` in
1361     *32-bit*)
1362       LD="${LD-ld} -32"
1363       ;;
1364     *N32*)
1365       LD="${LD-ld} -n32"
1366       ;;
1367     *64-bit*)
1368       LD="${LD-ld} -64"
1369       ;;
1370     esac
1371    fi
1372   fi
1373   rm -rf conftest*
1374   ;;
1376 x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
1377   # Find out which ABI we are using.
1378   echo 'int i;' > conftest.$ac_ext
1379   if AC_TRY_EVAL(ac_compile); then
1380     case `/usr/bin/file conftest.o` in
1381     *32-bit*)
1382       case $host in
1383         x86_64-*linux*)
1384           LD="${LD-ld} -m elf_i386"
1385           ;;
1386         ppc64-*linux*|powerpc64-*linux*)
1387           LD="${LD-ld} -m elf32ppclinux"
1388           ;;
1389         s390x-*linux*)
1390           LD="${LD-ld} -m elf_s390"
1391           ;;
1392         sparc64-*linux*)
1393           LD="${LD-ld} -m elf32_sparc"
1394           ;;
1395       esac
1396       ;;
1397     *64-bit*)
1398       case $host in
1399         x86_64-*linux*)
1400           LD="${LD-ld} -m elf_x86_64"
1401           ;;
1402         ppc*-*linux*|powerpc*-*linux*)
1403           LD="${LD-ld} -m elf64ppc"
1404           ;;
1405         s390*-*linux*)
1406           LD="${LD-ld} -m elf64_s390"
1407           ;;
1408         sparc*-*linux*)
1409           LD="${LD-ld} -m elf64_sparc"
1410           ;;
1411       esac
1412       ;;
1413     esac
1414   fi
1415   rm -rf conftest*
1416   ;;
1418 *-*-sco3.2v5*)
1419   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1420   SAVE_CFLAGS="$CFLAGS"
1421   CFLAGS="$CFLAGS -belf"
1422   AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
1423     [AC_LANG_PUSH(C)
1424      AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
1425      AC_LANG_POP])
1426   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
1427     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1428     CFLAGS="$SAVE_CFLAGS"
1429   fi
1430   ;;
1431 AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
1432 [*-*-cygwin* | *-*-mingw* | *-*-pw32*)
1433   AC_CHECK_TOOL(DLLTOOL, dlltool, false)
1434   AC_CHECK_TOOL(AS, as, false)
1435   AC_CHECK_TOOL(OBJDUMP, objdump, false)
1436   ;;
1437   ])
1438 esac
1440 need_locks="$enable_libtool_lock"
1442 ])# _LT_AC_LOCK
1445 # AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1446 #               [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
1447 # ----------------------------------------------------------------
1448 # Check whether the given compiler option works
1449 AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
1450 [AC_REQUIRE([LT_AC_PROG_SED])
1451 AC_CACHE_CHECK([$1], [$2],
1452   [$2=no
1453   ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
1454    printf "$lt_simple_compile_test_code" > conftest.$ac_ext
1455    lt_compiler_flag="$3"
1456    # Insert the option either (1) after the last *FLAGS variable, or
1457    # (2) before a word containing "conftest.", or (3) at the end.
1458    # Note that $ac_compile itself does not contain backslashes and begins
1459    # with a dollar sign (not a hyphen), so the echo should work correctly.
1460    # The option is referenced via a variable to avoid confusing sed.
1461    lt_compile=`echo "$ac_compile" | $SED \
1462    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1463    -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1464    -e 's:$: $lt_compiler_flag:'`
1465    (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1466    (eval "$lt_compile" 2>conftest.err)
1467    ac_status=$?
1468    cat conftest.err >&AS_MESSAGE_LOG_FD
1469    echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1470    if (exit $ac_status) && test -s "$ac_outfile"; then
1471      # The compiler can only warn and ignore the option if not recognized
1472      # So say no if there are warnings other than the usual output.
1473      $echo "X$_lt_compiler_boilerplate" | $Xsed >conftest.exp
1474      $SED '/^$/d' conftest.err >conftest.er2
1475      if test ! -s conftest.err || diff conftest.exp conftest.er2 >/dev/null; then
1476        $2=yes
1477      fi
1478    fi
1479    $rm conftest*
1482 if test x"[$]$2" = xyes; then
1483     ifelse([$5], , :, [$5])
1484 else
1485     ifelse([$6], , :, [$6])
1487 ])# AC_LIBTOOL_COMPILER_OPTION
1490 # AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1491 #                          [ACTION-SUCCESS], [ACTION-FAILURE])
1492 # ------------------------------------------------------------
1493 # Check whether the given compiler option works
1494 AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
1495 [AC_CACHE_CHECK([$1], [$2],
1496   [$2=no
1497    save_LDFLAGS="$LDFLAGS"
1498    LDFLAGS="$LDFLAGS $3"
1499    printf "$lt_simple_link_test_code" > conftest.$ac_ext
1500    if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
1501      # The linker can only warn and ignore the option if not recognized
1502      # So say no if there are warnings
1503      if test -s conftest.err; then
1504        # Append any errors to the config.log.
1505        cat conftest.err 1>&AS_MESSAGE_LOG_FD
1506        $echo "X$_lt_linker_boilerplate" | $Xsed > conftest.exp
1507        $SED '/^$/d' conftest.err >conftest.er2
1508        if diff conftest.exp conftest.er2 >/dev/null; then
1509          $2=yes
1510        fi
1511      else
1512        $2=yes
1513      fi
1514    fi
1515    $rm conftest*
1516    LDFLAGS="$save_LDFLAGS"
1519 if test x"[$]$2" = xyes; then
1520     ifelse([$4], , :, [$4])
1521 else
1522     ifelse([$5], , :, [$5])
1524 ])# AC_LIBTOOL_LINKER_OPTION
1527 # AC_LIBTOOL_SYS_MAX_CMD_LEN
1528 # --------------------------
1529 AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
1530 [# find the maximum length of command line arguments
1531 AC_MSG_CHECKING([the maximum length of command line arguments])
1532 AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
1533   i=0
1534   teststring="ABCD"
1536   case $build_os in
1537   msdosdjgpp*)
1538     # On DJGPP, this test can blow up pretty badly due to problems in libc
1539     # (any single argument exceeding 2000 bytes causes a buffer overrun
1540     # during glob expansion).  Even if it were fixed, the result of this
1541     # check would be larger than it should be.
1542     lt_cv_sys_max_cmd_len=12288;    # 12K is about right
1543     ;;
1545   gnu*)
1546     # Under GNU Hurd, this test is not required because there is
1547     # no limit to the length of command line arguments.
1548     # Libtool will interpret -1 as no limit whatsoever
1549     lt_cv_sys_max_cmd_len=-1;
1550     ;;
1552   cygwin* | mingw*)
1553     # On Win9x/ME, this test blows up -- it succeeds, but takes
1554     # about 5 minutes as the teststring grows exponentially.
1555     # Worse, since 9x/ME are not pre-emptively multitasking,
1556     # you end up with a "frozen" computer, even though with patience
1557     # the test eventually succeeds (with a max line length of 256k).
1558     # Instead, let's just punt: use the minimum linelength reported by
1559     # all of the supported platforms: 8192 (on NT/2K/XP).
1560     lt_cv_sys_max_cmd_len=8192;
1561     ;;
1563   amigaos*)
1564     # On AmigaOS with pdksh, this test takes hours, literally.
1565     # So we just punt and use a minimum line length of 8192.
1566     lt_cv_sys_max_cmd_len=8192;
1567     ;;
1569   netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
1570     # This has been around since 386BSD, at least.  Likely further.
1571     if test -x /sbin/sysctl; then
1572       lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
1573     elif test -x /usr/sbin/sysctl; then
1574       lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
1575     else
1576       lt_cv_sys_max_cmd_len=65536       # usable default for all BSDs
1577     fi
1578     # And add a safety zone
1579     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1580     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
1581     ;;
1582   osf*)
1583     # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
1584     # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
1585     # nice to cause kernel panics so lets avoid the loop below.
1586     # First set a reasonable default.
1587     lt_cv_sys_max_cmd_len=16384
1588     #
1589     if test -x /sbin/sysconfig; then
1590       case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
1591         *1*) lt_cv_sys_max_cmd_len=-1 ;;
1592       esac
1593     fi
1594     ;;
1595   *)
1596     # If test is not a shell built-in, we'll probably end up computing a
1597     # maximum length that is only half of the actual maximum length, but
1598     # we can't tell.
1599     SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
1600     while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
1601                = "XX$teststring") >/dev/null 2>&1 &&
1602             new_result=`expr "X$teststring" : ".*" 2>&1` &&
1603             lt_cv_sys_max_cmd_len=$new_result &&
1604             test $i != 17 # 1/2 MB should be enough
1605     do
1606       i=`expr $i + 1`
1607       teststring=$teststring$teststring
1608     done
1609     teststring=
1610     # Add a significant safety factor because C++ compilers can tack on massive
1611     # amounts of additional arguments before passing them to the linker.
1612     # It appears as though 1/2 is a usable value.
1613     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
1614     ;;
1615   esac
1617 if test -n $lt_cv_sys_max_cmd_len ; then
1618   AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
1619 else
1620   AC_MSG_RESULT(none)
1622 ])# AC_LIBTOOL_SYS_MAX_CMD_LEN
1625 # _LT_AC_CHECK_DLFCN
1626 # --------------------
1627 AC_DEFUN([_LT_AC_CHECK_DLFCN],
1628 [AC_CHECK_HEADERS(dlfcn.h)dnl
1629 ])# _LT_AC_CHECK_DLFCN
1632 # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
1633 #                           ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
1634 # ------------------------------------------------------------------
1635 AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
1636 [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
1637 if test "$cross_compiling" = yes; then :
1638   [$4]
1639 else
1640   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1641   lt_status=$lt_dlunknown
1642   cat > conftest.$ac_ext <<EOF
1643 [#line __oline__ "configure"
1644 #include "confdefs.h"
1646 #if HAVE_DLFCN_H
1647 #include <dlfcn.h>
1648 #endif
1650 #include <stdio.h>
1652 #ifdef RTLD_GLOBAL
1653 #  define LT_DLGLOBAL           RTLD_GLOBAL
1654 #else
1655 #  ifdef DL_GLOBAL
1656 #    define LT_DLGLOBAL         DL_GLOBAL
1657 #  else
1658 #    define LT_DLGLOBAL         0
1659 #  endif
1660 #endif
1662 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
1663    find out it does not work in some platform. */
1664 #ifndef LT_DLLAZY_OR_NOW
1665 #  ifdef RTLD_LAZY
1666 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
1667 #  else
1668 #    ifdef DL_LAZY
1669 #      define LT_DLLAZY_OR_NOW          DL_LAZY
1670 #    else
1671 #      ifdef RTLD_NOW
1672 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
1673 #      else
1674 #        ifdef DL_NOW
1675 #          define LT_DLLAZY_OR_NOW      DL_NOW
1676 #        else
1677 #          define LT_DLLAZY_OR_NOW      0
1678 #        endif
1679 #      endif
1680 #    endif
1681 #  endif
1682 #endif
1684 #ifdef __cplusplus
1685 extern "C" void exit (int);
1686 #endif
1688 void fnord() { int i=42;}
1689 int main ()
1691   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
1692   int status = $lt_dlunknown;
1694   if (self)
1695     {
1696       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
1697       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
1698       /* dlclose (self); */
1699     }
1701     exit (status);
1704   if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
1705     (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
1706     lt_status=$?
1707     case x$lt_status in
1708       x$lt_dlno_uscore) $1 ;;
1709       x$lt_dlneed_uscore) $2 ;;
1710       x$lt_unknown|x*) $3 ;;
1711     esac
1712   else :
1713     # compilation failed
1714     $3
1715   fi
1717 rm -fr conftest*
1718 ])# _LT_AC_TRY_DLOPEN_SELF
1721 # AC_LIBTOOL_DLOPEN_SELF
1722 # -------------------
1723 AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
1724 [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
1725 if test "x$enable_dlopen" != xyes; then
1726   enable_dlopen=unknown
1727   enable_dlopen_self=unknown
1728   enable_dlopen_self_static=unknown
1729 else
1730   lt_cv_dlopen=no
1731   lt_cv_dlopen_libs=
1733   case $host_os in
1734   beos*)
1735     lt_cv_dlopen="load_add_on"
1736     lt_cv_dlopen_libs=
1737     lt_cv_dlopen_self=yes
1738     ;;
1740   mingw* | pw32*)
1741     lt_cv_dlopen="LoadLibrary"
1742     lt_cv_dlopen_libs=
1743    ;;
1745   cygwin*)
1746     lt_cv_dlopen="dlopen"
1747     lt_cv_dlopen_libs=
1748    ;;
1750   darwin*)
1751   # if libdl is installed we need to link against it
1752     AC_CHECK_LIB([dl], [dlopen],
1753                 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
1754     lt_cv_dlopen="dyld"
1755     lt_cv_dlopen_libs=
1756     lt_cv_dlopen_self=yes
1757     ])
1758    ;;
1760   *)
1761     AC_CHECK_FUNC([shl_load],
1762           [lt_cv_dlopen="shl_load"],
1763       [AC_CHECK_LIB([dld], [shl_load],
1764             [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
1765         [AC_CHECK_FUNC([dlopen],
1766               [lt_cv_dlopen="dlopen"],
1767           [AC_CHECK_LIB([dl], [dlopen],
1768                 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
1769             [AC_CHECK_LIB([svld], [dlopen],
1770                   [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
1771               [AC_CHECK_LIB([dld], [dld_link],
1772                     [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
1773               ])
1774             ])
1775           ])
1776         ])
1777       ])
1778     ;;
1779   esac
1781   if test "x$lt_cv_dlopen" != xno; then
1782     enable_dlopen=yes
1783   else
1784     enable_dlopen=no
1785   fi
1787   case $lt_cv_dlopen in
1788   dlopen)
1789     save_CPPFLAGS="$CPPFLAGS"
1790     test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
1792     save_LDFLAGS="$LDFLAGS"
1793     eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
1795     save_LIBS="$LIBS"
1796     LIBS="$lt_cv_dlopen_libs $LIBS"
1798     AC_CACHE_CHECK([whether a program can dlopen itself],
1799           lt_cv_dlopen_self, [dnl
1800           _LT_AC_TRY_DLOPEN_SELF(
1801             lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
1802             lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
1803     ])
1805     if test "x$lt_cv_dlopen_self" = xyes; then
1806       LDFLAGS="$LDFLAGS $link_static_flag"
1807       AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
1808           lt_cv_dlopen_self_static, [dnl
1809           _LT_AC_TRY_DLOPEN_SELF(
1810             lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
1811             lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
1812       ])
1813     fi
1815     CPPFLAGS="$save_CPPFLAGS"
1816     LDFLAGS="$save_LDFLAGS"
1817     LIBS="$save_LIBS"
1818     ;;
1819   esac
1821   case $lt_cv_dlopen_self in
1822   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
1823   *) enable_dlopen_self=unknown ;;
1824   esac
1826   case $lt_cv_dlopen_self_static in
1827   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
1828   *) enable_dlopen_self_static=unknown ;;
1829   esac
1831 ])# AC_LIBTOOL_DLOPEN_SELF
1834 # AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
1835 # ---------------------------------
1836 # Check to see if options -c and -o are simultaneously supported by compiler
1837 AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
1838 [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
1839 AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
1840   [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
1841   [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
1842    $rm -r conftest 2>/dev/null
1843    mkdir conftest
1844    cd conftest
1845    mkdir out
1846    printf "$lt_simple_compile_test_code" > conftest.$ac_ext
1848    lt_compiler_flag="-o out/conftest2.$ac_objext"
1849    # Insert the option either (1) after the last *FLAGS variable, or
1850    # (2) before a word containing "conftest.", or (3) at the end.
1851    # Note that $ac_compile itself does not contain backslashes and begins
1852    # with a dollar sign (not a hyphen), so the echo should work correctly.
1853    lt_compile=`echo "$ac_compile" | $SED \
1854    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1855    -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1856    -e 's:$: $lt_compiler_flag:'`
1857    (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1858    (eval "$lt_compile" 2>out/conftest.err)
1859    ac_status=$?
1860    cat out/conftest.err >&AS_MESSAGE_LOG_FD
1861    echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1862    if (exit $ac_status) && test -s out/conftest2.$ac_objext
1863    then
1864      # The compiler can only warn and ignore the option if not recognized
1865      # So say no if there are warnings
1866      $echo "X$_lt_compiler_boilerplate" | $Xsed > out/conftest.exp
1867      $SED '/^$/d' out/conftest.err >out/conftest.er2
1868      if test ! -s out/conftest.err || diff out/conftest.exp out/conftest.er2 >/dev/null; then
1869        _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
1870      fi
1871    fi
1872    chmod u+w . 2>&AS_MESSAGE_LOG_FD
1873    $rm conftest*
1874    # SGI C++ compiler will create directory out/ii_files/ for
1875    # template instantiation
1876    test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
1877    $rm out/* && rmdir out
1878    cd ..
1879    rmdir conftest
1880    $rm conftest*
1882 ])# AC_LIBTOOL_PROG_CC_C_O
1885 # AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
1886 # -----------------------------------------
1887 # Check to see if we can do hard links to lock some files if needed
1888 AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
1889 [AC_REQUIRE([_LT_AC_LOCK])dnl
1891 hard_links="nottested"
1892 if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
1893   # do not overwrite the value of need_locks provided by the user
1894   AC_MSG_CHECKING([if we can lock with hard links])
1895   hard_links=yes
1896   $rm conftest*
1897   ln conftest.a conftest.b 2>/dev/null && hard_links=no
1898   touch conftest.a
1899   ln conftest.a conftest.b 2>&5 || hard_links=no
1900   ln conftest.a conftest.b 2>/dev/null && hard_links=no
1901   AC_MSG_RESULT([$hard_links])
1902   if test "$hard_links" = no; then
1903     AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
1904     need_locks=warn
1905   fi
1906 else
1907   need_locks=no
1909 ])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
1912 # AC_LIBTOOL_OBJDIR
1913 # -----------------
1914 AC_DEFUN([AC_LIBTOOL_OBJDIR],
1915 [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
1916 [rm -f .libs 2>/dev/null
1917 mkdir .libs 2>/dev/null
1918 if test -d .libs; then
1919   lt_cv_objdir=.libs
1920 else
1921   # MS-DOS does not allow filenames that begin with a dot.
1922   lt_cv_objdir=_libs
1924 rmdir .libs 2>/dev/null])
1925 objdir=$lt_cv_objdir
1926 ])# AC_LIBTOOL_OBJDIR
1929 # AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
1930 # ----------------------------------------------
1931 # Check hardcoding attributes.
1932 AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
1933 [AC_MSG_CHECKING([how to hardcode library paths into programs])
1934 _LT_AC_TAGVAR(hardcode_action, $1)=
1935 if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
1936    test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \
1937    test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
1939   # We can hardcode non-existant directories.
1940   if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
1941      # If the only mechanism to avoid hardcoding is shlibpath_var, we
1942      # have to relink, otherwise we might link with an installed library
1943      # when we should be linking with a yet-to-be-installed one
1944      ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
1945      test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
1946     # Linking always hardcodes the temporary library directory.
1947     _LT_AC_TAGVAR(hardcode_action, $1)=relink
1948   else
1949     # We can link without hardcoding, and we can hardcode nonexisting dirs.
1950     _LT_AC_TAGVAR(hardcode_action, $1)=immediate
1951   fi
1952 else
1953   # We cannot hardcode anything, or else we can only hardcode existing
1954   # directories.
1955   _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
1957 AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
1959 if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
1960   # Fast installation is not supported
1961   enable_fast_install=no
1962 elif test "$shlibpath_overrides_runpath" = yes ||
1963      test "$enable_shared" = no; then
1964   # Fast installation is not necessary
1965   enable_fast_install=needless
1967 ])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
1970 # AC_LIBTOOL_SYS_LIB_STRIP
1971 # ------------------------
1972 AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
1973 [striplib=
1974 old_striplib=
1975 AC_MSG_CHECKING([whether stripping libraries is possible])
1976 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
1977   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
1978   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
1979   AC_MSG_RESULT([yes])
1980 else
1981 # FIXME - insert some real tests, host_os isn't really good enough
1982   case $host_os in
1983    darwin*)
1984        if test -n "$STRIP" ; then
1985          striplib="$STRIP -x"
1986          AC_MSG_RESULT([yes])
1987        else
1988   AC_MSG_RESULT([no])
1990        ;;
1991    *)
1992   AC_MSG_RESULT([no])
1993     ;;
1994   esac
1996 ])# AC_LIBTOOL_SYS_LIB_STRIP
1999 # AC_LIBTOOL_SYS_DYNAMIC_LINKER
2000 # -----------------------------
2001 # PORTME Fill in your ld.so characteristics
2002 AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
2003 [AC_MSG_CHECKING([dynamic linker characteristics])
2004 library_names_spec=
2005 libname_spec='lib$name'
2006 soname_spec=
2007 shrext_cmds=".so"
2008 postinstall_cmds=
2009 postuninstall_cmds=
2010 finish_cmds=
2011 finish_eval=
2012 shlibpath_var=
2013 shlibpath_overrides_runpath=unknown
2014 version_type=none
2015 dynamic_linker="$host_os ld.so"
2016 sys_lib_dlsearch_path_spec="/lib /usr/lib"
2017 if test "$GCC" = yes; then
2018   sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
2019   if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
2020     # if the path contains ";" then we assume it to be the separator
2021     # otherwise default to the standard path separator (i.e. ":") - it is
2022     # assumed that no part of a normal pathname contains ";" but that should
2023     # okay in the real world where ";" in dirpaths is itself problematic.
2024     sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
2025   else
2026     sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
2027   fi
2028 else
2029   sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2031 need_lib_prefix=unknown
2032 hardcode_into_libs=no
2034 # when you set need_version to no, make sure it does not cause -set_version
2035 # flags to be left without arguments
2036 need_version=unknown
2038 case $host_os in
2039 aix3*)
2040   version_type=linux
2041   library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
2042   shlibpath_var=LIBPATH
2044   # AIX 3 has no versioning support, so we append a major version to the name.
2045   soname_spec='${libname}${release}${shared_ext}$major'
2046   ;;
2048 aix4* | aix5*)
2049   version_type=linux
2050   need_lib_prefix=no
2051   need_version=no
2052   hardcode_into_libs=yes
2053   if test "$host_cpu" = ia64; then
2054     # AIX 5 supports IA64
2055     library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
2056     shlibpath_var=LD_LIBRARY_PATH
2057   else
2058     # With GCC up to 2.95.x, collect2 would create an import file
2059     # for dependence libraries.  The import file would start with
2060     # the line `#! .'.  This would cause the generated library to
2061     # depend on `.', always an invalid library.  This was fixed in
2062     # development snapshots of GCC prior to 3.0.
2063     case $host_os in
2064       aix4 | aix4.[[01]] | aix4.[[01]].*)
2065       if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
2066            echo ' yes '
2067            echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
2068         :
2069       else
2070         can_build_shared=no
2071       fi
2072       ;;
2073     esac
2074     # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
2075     # soname into executable. Probably we can add versioning support to
2076     # collect2, so additional links can be useful in future.
2077     if test "$aix_use_runtimelinking" = yes; then
2078       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
2079       # instead of lib<name>.a to let people know that these are not
2080       # typical AIX shared libraries.
2081       library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2082     else
2083       # We preserve .a as extension for shared libraries through AIX4.2
2084       # and later when we are not doing run time linking.
2085       library_names_spec='${libname}${release}.a $libname.a'
2086       soname_spec='${libname}${release}${shared_ext}$major'
2087     fi
2088     shlibpath_var=LIBPATH
2089   fi
2090   ;;
2092 amigaos*)
2093   library_names_spec='$libname.ixlibrary $libname.a'
2094   # Create ${libname}_ixlibrary.a entries in /sys/libs.
2095   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'
2096   ;;
2098 beos*)
2099   library_names_spec='${libname}${shared_ext}'
2100   dynamic_linker="$host_os ld.so"
2101   shlibpath_var=LIBRARY_PATH
2102   ;;
2104 bsdi[[45]]*)
2105   version_type=linux
2106   need_version=no
2107   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2108   soname_spec='${libname}${release}${shared_ext}$major'
2109   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
2110   shlibpath_var=LD_LIBRARY_PATH
2111   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
2112   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
2113   # the default ld.so.conf also contains /usr/contrib/lib and
2114   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
2115   # libtool to hard-code these into programs
2116   ;;
2118 cygwin* | mingw* | pw32*)
2119   version_type=windows
2120   shrext_cmds=".dll"
2121   need_version=no
2122   need_lib_prefix=no
2124   case $GCC,$host_os in
2125   yes,cygwin* | yes,mingw* | yes,pw32*)
2126     library_names_spec='$libname.dll.a'
2127     # DLL is installed to $(libdir)/../bin by postinstall_cmds
2128     postinstall_cmds='base_file=`basename \${file}`~
2129       dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
2130       dldir=$destdir/`dirname \$dlpath`~
2131       test -d \$dldir || mkdir -p \$dldir~
2132       $install_prog $dir/$dlname \$dldir/$dlname~
2133       chmod a+x \$dldir/$dlname'
2134     postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
2135       dlpath=$dir/\$dldll~
2136        $rm \$dlpath'
2137     shlibpath_overrides_runpath=yes
2139     case $host_os in
2140     cygwin*)
2141       # Cygwin DLLs use 'cyg' prefix rather than 'lib'
2142       soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2143       sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
2144       ;;
2145     mingw*)
2146       # MinGW DLLs use traditional 'lib' prefix
2147       soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2148       sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
2149       if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
2150         # It is most probably a Windows format PATH printed by
2151         # mingw gcc, but we are running on Cygwin. Gcc prints its search
2152         # path with ; separators, and with drive letters. We can handle the
2153         # drive letters (cygwin fileutils understands them), so leave them,
2154         # especially as we might pass files found there to a mingw objdump,
2155         # which wouldn't understand a cygwinified path. Ahh.
2156         sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
2157       else
2158         sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
2159       fi
2160       ;;
2161     pw32*)
2162       # pw32 DLLs use 'pw' prefix rather than 'lib'
2163       library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2164       ;;
2165     esac
2166     ;;
2168   *)
2169     library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
2170     ;;
2171   esac
2172   dynamic_linker='Win32 ld.exe'
2173   # FIXME: first we should search . and the directory the executable is in
2174   shlibpath_var=PATH
2175   ;;
2177 darwin* | rhapsody*)
2178   dynamic_linker="$host_os dyld"
2179   version_type=darwin
2180   need_lib_prefix=no
2181   need_version=no
2182   library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
2183   soname_spec='${libname}${release}${major}$shared_ext'
2184   shlibpath_overrides_runpath=yes
2185   shlibpath_var=DYLD_LIBRARY_PATH
2186   shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
2187   # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
2188   if test "$GCC" = yes; then
2189     sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
2190   else
2191     sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
2192   fi
2193   sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
2194   ;;
2196 dgux*)
2197   version_type=linux
2198   need_lib_prefix=no
2199   need_version=no
2200   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
2201   soname_spec='${libname}${release}${shared_ext}$major'
2202   shlibpath_var=LD_LIBRARY_PATH
2203   ;;
2205 freebsd1*)
2206   dynamic_linker=no
2207   ;;
2209 kfreebsd*-gnu)
2210   version_type=linux
2211   need_lib_prefix=no
2212   need_version=no
2213   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2214   soname_spec='${libname}${release}${shared_ext}$major'
2215   shlibpath_var=LD_LIBRARY_PATH
2216   shlibpath_overrides_runpath=no
2217   hardcode_into_libs=yes
2218   dynamic_linker='GNU ld.so'
2219   ;;
2221 freebsd* | dragonfly*)
2222   # DragonFly does not have aout.  When/if they implement a new
2223   # versioning mechanism, adjust this.
2224   if test -x /usr/bin/objformat; then
2225     objformat=`/usr/bin/objformat`
2226   else
2227     case $host_os in
2228     freebsd[[123]]*) objformat=aout ;;
2229     *) objformat=elf ;;
2230     esac
2231   fi
2232   version_type=freebsd-$objformat
2233   case $version_type in
2234     freebsd-elf*)
2235       library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
2236       need_version=no
2237       need_lib_prefix=no
2238       ;;
2239     freebsd-*)
2240       library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
2241       need_version=yes
2242       ;;
2243   esac
2244   shlibpath_var=LD_LIBRARY_PATH
2245   case $host_os in
2246   freebsd2*)
2247     shlibpath_overrides_runpath=yes
2248     ;;
2249   freebsd3.[[01]]* | freebsdelf3.[[01]]*)
2250     shlibpath_overrides_runpath=yes
2251     hardcode_into_libs=yes
2252     ;;
2253   *) # from 3.2 on
2254     shlibpath_overrides_runpath=no
2255     hardcode_into_libs=yes
2256     ;;
2257   esac
2258   ;;
2260 gnu*)
2261   version_type=linux
2262   need_lib_prefix=no
2263   need_version=no
2264   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
2265   soname_spec='${libname}${release}${shared_ext}$major'
2266   shlibpath_var=LD_LIBRARY_PATH
2267   hardcode_into_libs=yes
2268   ;;
2270 hpux9* | hpux10* | hpux11*)
2271   # Give a soname corresponding to the major version so that dld.sl refuses to
2272   # link against other versions.
2273   version_type=sunos
2274   need_lib_prefix=no
2275   need_version=no
2276   case $host_cpu in
2277   ia64*)
2278     shrext_cmds='.so'
2279     hardcode_into_libs=yes
2280     dynamic_linker="$host_os dld.so"
2281     shlibpath_var=LD_LIBRARY_PATH
2282     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2283     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2284     soname_spec='${libname}${release}${shared_ext}$major'
2285     if test "X$HPUX_IA64_MODE" = X32; then
2286       sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
2287     else
2288       sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
2289     fi
2290     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2291     ;;
2292    hppa*64*)
2293      shrext_cmds='.sl'
2294      hardcode_into_libs=yes
2295      dynamic_linker="$host_os dld.sl"
2296      shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
2297      shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2298      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2299      soname_spec='${libname}${release}${shared_ext}$major'
2300      sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
2301      sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2302      ;;
2303    *)
2304     shrext_cmds='.sl'
2305     dynamic_linker="$host_os dld.sl"
2306     shlibpath_var=SHLIB_PATH
2307     shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
2308     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2309     soname_spec='${libname}${release}${shared_ext}$major'
2310     ;;
2311   esac
2312   # HP-UX runs *really* slowly unless shared libraries are mode 555.
2313   postinstall_cmds='chmod 555 $lib'
2314   ;;
2316 irix5* | irix6* | nonstopux*)
2317   case $host_os in
2318     nonstopux*) version_type=nonstopux ;;
2319     *)
2320         if test "$lt_cv_prog_gnu_ld" = yes; then
2321                 version_type=linux
2322         else
2323                 version_type=irix
2324         fi ;;
2325   esac
2326   need_lib_prefix=no
2327   need_version=no
2328   soname_spec='${libname}${release}${shared_ext}$major'
2329   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
2330   case $host_os in
2331   irix5* | nonstopux*)
2332     libsuff= shlibsuff=
2333     ;;
2334   *)
2335     case $LD in # libtool.m4 will add one of these switches to LD
2336     *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
2337       libsuff= shlibsuff= libmagic=32-bit;;
2338     *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
2339       libsuff=32 shlibsuff=N32 libmagic=N32;;
2340     *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
2341       libsuff=64 shlibsuff=64 libmagic=64-bit;;
2342     *) libsuff= shlibsuff= libmagic=never-match;;
2343     esac
2344     ;;
2345   esac
2346   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
2347   shlibpath_overrides_runpath=no
2348   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
2349   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
2350   hardcode_into_libs=yes
2351   ;;
2353 # No shared lib support for Linux oldld, aout, or coff.
2354 linux*oldld* | linux*aout* | linux*coff*)
2355   dynamic_linker=no
2356   ;;
2358 # This must be Linux ELF.
2359 linux*)
2360   version_type=linux
2361   need_lib_prefix=no
2362   need_version=no
2363   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2364   soname_spec='${libname}${release}${shared_ext}$major'
2365   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
2366   shlibpath_var=LD_LIBRARY_PATH
2367   shlibpath_overrides_runpath=no
2368   # This implies no fast_install, which is unacceptable.
2369   # Some rework will be needed to allow for fast_install
2370   # before this can be enabled.
2371   hardcode_into_libs=yes
2373   # Append ld.so.conf contents to the search path
2374   if test -f /etc/ld.so.conf; then
2375     lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:,    ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
2376     sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
2377   fi
2379   # We used to test for /lib/ld.so.1 and disable shared libraries on
2380   # powerpc, because MkLinux only supported shared libraries with the
2381   # GNU dynamic linker.  Since this was broken with cross compilers,
2382   # most powerpc-linux boxes support dynamic linking these days and
2383   # people can always --disable-shared, the test was removed, and we
2384   # assume the GNU/Linux dynamic linker is in use.
2385   dynamic_linker='GNU/Linux ld.so'
2386   ;;
2388 knetbsd*-gnu)
2389   version_type=linux
2390   need_lib_prefix=no
2391   need_version=no
2392   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2393   soname_spec='${libname}${release}${shared_ext}$major'
2394   shlibpath_var=LD_LIBRARY_PATH
2395   shlibpath_overrides_runpath=no
2396   hardcode_into_libs=yes
2397   dynamic_linker='GNU ld.so'
2398   ;;
2400 netbsd*)
2401   version_type=sunos
2402   need_lib_prefix=no
2403   need_version=no
2404   if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
2405     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2406     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2407     dynamic_linker='NetBSD (a.out) ld.so'
2408   else
2409     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2410     soname_spec='${libname}${release}${shared_ext}$major'
2411     dynamic_linker='NetBSD ld.elf_so'
2412   fi
2413   shlibpath_var=LD_LIBRARY_PATH
2414   shlibpath_overrides_runpath=yes
2415   hardcode_into_libs=yes
2416   ;;
2418 newsos6)
2419   version_type=linux
2420   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2421   shlibpath_var=LD_LIBRARY_PATH
2422   shlibpath_overrides_runpath=yes
2423   ;;
2425 nto-qnx*)
2426   version_type=linux
2427   need_lib_prefix=no
2428   need_version=no
2429   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2430   soname_spec='${libname}${release}${shared_ext}$major'
2431   shlibpath_var=LD_LIBRARY_PATH
2432   shlibpath_overrides_runpath=yes
2433   ;;
2435 openbsd*)
2436   version_type=sunos
2437   need_lib_prefix=no
2438   # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
2439   case $host_os in
2440     openbsd3.3 | openbsd3.3.*) need_version=yes ;;
2441     *)                         need_version=no  ;;
2442   esac
2443   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2444   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2445   shlibpath_var=LD_LIBRARY_PATH
2446   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2447     case $host_os in
2448       openbsd2.[[89]] | openbsd2.[[89]].*)
2449         shlibpath_overrides_runpath=no
2450         ;;
2451       *)
2452         shlibpath_overrides_runpath=yes
2453         ;;
2454       esac
2455   else
2456     shlibpath_overrides_runpath=yes
2457   fi
2458   ;;
2460 os2*)
2461   libname_spec='$name'
2462   shrext_cmds=".dll"
2463   need_lib_prefix=no
2464   library_names_spec='$libname${shared_ext} $libname.a'
2465   dynamic_linker='OS/2 ld.exe'
2466   shlibpath_var=LIBPATH
2467   ;;
2469 osf3* | osf4* | osf5*)
2470   version_type=osf
2471   need_lib_prefix=no
2472   need_version=no
2473   soname_spec='${libname}${release}${shared_ext}$major'
2474   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2475   shlibpath_var=LD_LIBRARY_PATH
2476   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
2477   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
2478   ;;
2480 sco3.2v5*)
2481   version_type=osf
2482   soname_spec='${libname}${release}${shared_ext}$major'
2483   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2484   shlibpath_var=LD_LIBRARY_PATH
2485   ;;
2487 solaris*)
2488   version_type=linux
2489   need_lib_prefix=no
2490   need_version=no
2491   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2492   soname_spec='${libname}${release}${shared_ext}$major'
2493   shlibpath_var=LD_LIBRARY_PATH
2494   shlibpath_overrides_runpath=yes
2495   hardcode_into_libs=yes
2496   # ldd complains unless libraries are executable
2497   postinstall_cmds='chmod +x $lib'
2498   ;;
2500 sunos4*)
2501   version_type=sunos
2502   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2503   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
2504   shlibpath_var=LD_LIBRARY_PATH
2505   shlibpath_overrides_runpath=yes
2506   if test "$with_gnu_ld" = yes; then
2507     need_lib_prefix=no
2508   fi
2509   need_version=yes
2510   ;;
2512 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
2513   version_type=linux
2514   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2515   soname_spec='${libname}${release}${shared_ext}$major'
2516   shlibpath_var=LD_LIBRARY_PATH
2517   case $host_vendor in
2518     sni)
2519       shlibpath_overrides_runpath=no
2520       need_lib_prefix=no
2521       export_dynamic_flag_spec='${wl}-Blargedynsym'
2522       runpath_var=LD_RUN_PATH
2523       ;;
2524     siemens)
2525       need_lib_prefix=no
2526       ;;
2527     motorola)
2528       need_lib_prefix=no
2529       need_version=no
2530       shlibpath_overrides_runpath=no
2531       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
2532       ;;
2533   esac
2534   ;;
2536 sysv4*MP*)
2537   if test -d /usr/nec ;then
2538     version_type=linux
2539     library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
2540     soname_spec='$libname${shared_ext}.$major'
2541     shlibpath_var=LD_LIBRARY_PATH
2542   fi
2543   ;;
2545 uts4*)
2546   version_type=linux
2547   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2548   soname_spec='${libname}${release}${shared_ext}$major'
2549   shlibpath_var=LD_LIBRARY_PATH
2550   ;;
2553   dynamic_linker=no
2554   ;;
2555 esac
2556 AC_MSG_RESULT([$dynamic_linker])
2557 test "$dynamic_linker" = no && can_build_shared=no
2558 ])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
2561 # _LT_AC_TAGCONFIG
2562 # ----------------
2563 AC_DEFUN([_LT_AC_TAGCONFIG],
2564 [AC_ARG_WITH([tags],
2565     [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
2566         [include additional configurations @<:@automatic@:>@])],
2567     [tagnames="$withval"])
2569 if test -f "$ltmain" && test -n "$tagnames"; then
2570   if test ! -f "${ofile}"; then
2571     AC_MSG_WARN([output file `$ofile' does not exist])
2572   fi
2574   if test -z "$LTCC"; then
2575     eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
2576     if test -z "$LTCC"; then
2577       AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
2578     else
2579       AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
2580     fi
2581   fi
2583   # Extract list of available tagged configurations in $ofile.
2584   # Note that this assumes the entire list is on one line.
2585   available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
2587   lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2588   for tagname in $tagnames; do
2589     IFS="$lt_save_ifs"
2590     # Check whether tagname contains only valid characters
2591     case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
2592     "") ;;
2593     *)  AC_MSG_ERROR([invalid tag name: $tagname])
2594         ;;
2595     esac
2597     if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
2598     then
2599       AC_MSG_ERROR([tag name \"$tagname\" already exists])
2600     fi
2602     # Update the list of available tags.
2603     if test -n "$tagname"; then
2604       echo appending configuration tag \"$tagname\" to $ofile
2606       case $tagname in
2607       CXX)
2608         if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
2609             ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
2610             (test "X$CXX" != "Xg++"))) ; then
2611           AC_LIBTOOL_LANG_CXX_CONFIG
2612         else
2613           tagname=""
2614         fi
2615         ;;
2617       F77)
2618         if test -n "$F77" && test "X$F77" != "Xno"; then
2619           AC_LIBTOOL_LANG_F77_CONFIG
2620         else
2621           tagname=""
2622         fi
2623         ;;
2625       GCJ)
2626         if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
2627           AC_LIBTOOL_LANG_GCJ_CONFIG
2628         else
2629           tagname=""
2630         fi
2631         ;;
2633       RC)
2634         AC_LIBTOOL_LANG_RC_CONFIG
2635         ;;
2637       *)
2638         AC_MSG_ERROR([Unsupported tag name: $tagname])
2639         ;;
2640       esac
2642       # Append the new tag name to the list of available tags.
2643       if test -n "$tagname" ; then
2644       available_tags="$available_tags $tagname"
2645     fi
2646     fi
2647   done
2648   IFS="$lt_save_ifs"
2650   # Now substitute the updated list of available tags.
2651   if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
2652     mv "${ofile}T" "$ofile"
2653     chmod +x "$ofile"
2654   else
2655     rm -f "${ofile}T"
2656     AC_MSG_ERROR([unable to update list of available tagged configurations.])
2657   fi
2659 ])# _LT_AC_TAGCONFIG
2662 # AC_LIBTOOL_DLOPEN
2663 # -----------------
2664 # enable checks for dlopen support
2665 AC_DEFUN([AC_LIBTOOL_DLOPEN],
2666  [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
2667 ])# AC_LIBTOOL_DLOPEN
2670 # AC_LIBTOOL_WIN32_DLL
2671 # --------------------
2672 # declare package support for building win32 DLLs
2673 AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
2674 [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
2675 ])# AC_LIBTOOL_WIN32_DLL
2678 # AC_ENABLE_SHARED([DEFAULT])
2679 # ---------------------------
2680 # implement the --enable-shared flag
2681 # DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
2682 AC_DEFUN([AC_ENABLE_SHARED],
2683 [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
2684 AC_ARG_ENABLE([shared],
2685     [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
2686         [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
2687     [p=${PACKAGE-default}
2688     case $enableval in
2689     yes) enable_shared=yes ;;
2690     no) enable_shared=no ;;
2691     *)
2692       enable_shared=no
2693       # Look at the argument we got.  We use all the common list separators.
2694       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2695       for pkg in $enableval; do
2696         IFS="$lt_save_ifs"
2697         if test "X$pkg" = "X$p"; then
2698           enable_shared=yes
2699         fi
2700       done
2701       IFS="$lt_save_ifs"
2702       ;;
2703     esac],
2704     [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
2705 ])# AC_ENABLE_SHARED
2708 # AC_DISABLE_SHARED
2709 # -----------------
2710 #- set the default shared flag to --disable-shared
2711 AC_DEFUN([AC_DISABLE_SHARED],
2712 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2713 AC_ENABLE_SHARED(no)
2714 ])# AC_DISABLE_SHARED
2717 # AC_ENABLE_STATIC([DEFAULT])
2718 # ---------------------------
2719 # implement the --enable-static flag
2720 # DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
2721 AC_DEFUN([AC_ENABLE_STATIC],
2722 [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
2723 AC_ARG_ENABLE([static],
2724     [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
2725         [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
2726     [p=${PACKAGE-default}
2727     case $enableval in
2728     yes) enable_static=yes ;;
2729     no) enable_static=no ;;
2730     *)
2731      enable_static=no
2732       # Look at the argument we got.  We use all the common list separators.
2733       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2734       for pkg in $enableval; do
2735         IFS="$lt_save_ifs"
2736         if test "X$pkg" = "X$p"; then
2737           enable_static=yes
2738         fi
2739       done
2740       IFS="$lt_save_ifs"
2741       ;;
2742     esac],
2743     [enable_static=]AC_ENABLE_STATIC_DEFAULT)
2744 ])# AC_ENABLE_STATIC
2747 # AC_DISABLE_STATIC
2748 # -----------------
2749 # set the default static flag to --disable-static
2750 AC_DEFUN([AC_DISABLE_STATIC],
2751 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2752 AC_ENABLE_STATIC(no)
2753 ])# AC_DISABLE_STATIC
2756 # AC_ENABLE_FAST_INSTALL([DEFAULT])
2757 # ---------------------------------
2758 # implement the --enable-fast-install flag
2759 # DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
2760 AC_DEFUN([AC_ENABLE_FAST_INSTALL],
2761 [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
2762 AC_ARG_ENABLE([fast-install],
2763     [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
2764     [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
2765     [p=${PACKAGE-default}
2766     case $enableval in
2767     yes) enable_fast_install=yes ;;
2768     no) enable_fast_install=no ;;
2769     *)
2770       enable_fast_install=no
2771       # Look at the argument we got.  We use all the common list separators.
2772       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2773       for pkg in $enableval; do
2774         IFS="$lt_save_ifs"
2775         if test "X$pkg" = "X$p"; then
2776           enable_fast_install=yes
2777         fi
2778       done
2779       IFS="$lt_save_ifs"
2780       ;;
2781     esac],
2782     [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
2783 ])# AC_ENABLE_FAST_INSTALL
2786 # AC_DISABLE_FAST_INSTALL
2787 # -----------------------
2788 # set the default to --disable-fast-install
2789 AC_DEFUN([AC_DISABLE_FAST_INSTALL],
2790 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2791 AC_ENABLE_FAST_INSTALL(no)
2792 ])# AC_DISABLE_FAST_INSTALL
2795 # AC_LIBTOOL_PICMODE([MODE])
2796 # --------------------------
2797 # implement the --with-pic flag
2798 # MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
2799 AC_DEFUN([AC_LIBTOOL_PICMODE],
2800 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2801 pic_mode=ifelse($#,1,$1,default)
2802 ])# AC_LIBTOOL_PICMODE
2805 # AC_PROG_EGREP
2806 # -------------
2807 # This is predefined starting with Autoconf 2.54, so this conditional
2808 # definition can be removed once we require Autoconf 2.54 or later.
2809 m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
2810 [AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
2811    [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
2812     then ac_cv_prog_egrep='grep -E'
2813     else ac_cv_prog_egrep='egrep'
2814     fi])
2815  EGREP=$ac_cv_prog_egrep
2816  AC_SUBST([EGREP])
2817 ])])
2820 # AC_PATH_TOOL_PREFIX
2821 # -------------------
2822 # find a file program which can recognise shared library
2823 AC_DEFUN([AC_PATH_TOOL_PREFIX],
2824 [AC_REQUIRE([AC_PROG_EGREP])dnl
2825 AC_MSG_CHECKING([for $1])
2826 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
2827 [case $MAGIC_CMD in
2828 [[\\/*] |  ?:[\\/]*])
2829   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
2830   ;;
2832   lt_save_MAGIC_CMD="$MAGIC_CMD"
2833   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2834 dnl $ac_dummy forces splitting on constant user-supplied paths.
2835 dnl POSIX.2 word splitting is done only on the output of word expansions,
2836 dnl not every word.  This closes a longstanding sh security hole.
2837   ac_dummy="ifelse([$2], , $PATH, [$2])"
2838   for ac_dir in $ac_dummy; do
2839     IFS="$lt_save_ifs"
2840     test -z "$ac_dir" && ac_dir=.
2841     if test -f $ac_dir/$1; then
2842       lt_cv_path_MAGIC_CMD="$ac_dir/$1"
2843       if test -n "$file_magic_test_file"; then
2844         case $deplibs_check_method in
2845         "file_magic "*)
2846           file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
2847           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2848           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
2849             $EGREP "$file_magic_regex" > /dev/null; then
2850             :
2851           else
2852             cat <<EOF 1>&2
2854 *** Warning: the command libtool uses to detect shared libraries,
2855 *** $file_magic_cmd, produces output that libtool cannot recognize.
2856 *** The result is that libtool may fail to recognize shared libraries
2857 *** as such.  This will affect the creation of libtool libraries that
2858 *** depend on shared libraries, but programs linked with such libtool
2859 *** libraries will work regardless of this problem.  Nevertheless, you
2860 *** may want to report the problem to your system manager and/or to
2861 *** bug-libtool@gnu.org
2864           fi ;;
2865         esac
2866       fi
2867       break
2868     fi
2869   done
2870   IFS="$lt_save_ifs"
2871   MAGIC_CMD="$lt_save_MAGIC_CMD"
2872   ;;
2873 esac])
2874 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2875 if test -n "$MAGIC_CMD"; then
2876   AC_MSG_RESULT($MAGIC_CMD)
2877 else
2878   AC_MSG_RESULT(no)
2880 ])# AC_PATH_TOOL_PREFIX
2883 # AC_PATH_MAGIC
2884 # -------------
2885 # find a file program which can recognise a shared library
2886 AC_DEFUN([AC_PATH_MAGIC],
2887 [AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
2888 if test -z "$lt_cv_path_MAGIC_CMD"; then
2889   if test -n "$ac_tool_prefix"; then
2890     AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
2891   else
2892     MAGIC_CMD=:
2893   fi
2895 ])# AC_PATH_MAGIC
2898 # AC_PROG_LD
2899 # ----------
2900 # find the pathname to the GNU or non-GNU linker
2901 AC_DEFUN([AC_PROG_LD],
2902 [AC_ARG_WITH([gnu-ld],
2903     [AC_HELP_STRING([--with-gnu-ld],
2904         [assume the C compiler uses GNU ld @<:@default=no@:>@])],
2905     [test "$withval" = no || with_gnu_ld=yes],
2906     [with_gnu_ld=no])
2907 AC_REQUIRE([LT_AC_PROG_SED])dnl
2908 AC_REQUIRE([AC_PROG_CC])dnl
2909 AC_REQUIRE([AC_CANONICAL_HOST])dnl
2910 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
2911 ac_prog=ld
2912 if test "$GCC" = yes; then
2913   # Check if gcc -print-prog-name=ld gives a path.
2914   AC_MSG_CHECKING([for ld used by $CC])
2915   case $host in
2916   *-*-mingw*)
2917     # gcc leaves a trailing carriage return which upsets mingw
2918     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
2919   *)
2920     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
2921   esac
2922   case $ac_prog in
2923     # Accept absolute paths.
2924     [[\\/]]* | ?:[[\\/]]*)
2925       re_direlt='/[[^/]][[^/]]*/\.\./'
2926       # Canonicalize the pathname of ld
2927       ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
2928       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
2929         ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
2930       done
2931       test -z "$LD" && LD="$ac_prog"
2932       ;;
2933   "")
2934     # If it fails, then pretend we aren't using GCC.
2935     ac_prog=ld
2936     ;;
2937   *)
2938     # If it is relative, then search for the first ld in PATH.
2939     with_gnu_ld=unknown
2940     ;;
2941   esac
2942 elif test "$with_gnu_ld" = yes; then
2943   AC_MSG_CHECKING([for GNU ld])
2944 else
2945   AC_MSG_CHECKING([for non-GNU ld])
2947 AC_CACHE_VAL(lt_cv_path_LD,
2948 [if test -z "$LD"; then
2949   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2950   for ac_dir in $PATH; do
2951     IFS="$lt_save_ifs"
2952     test -z "$ac_dir" && ac_dir=.
2953     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2954       lt_cv_path_LD="$ac_dir/$ac_prog"
2955       # Check to see if the program is GNU ld.  I'd rather use --version,
2956       # but apparently some variants of GNU ld only accept -v.
2957       # Break only if it was the GNU/non-GNU ld that we prefer.
2958       case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
2959       *GNU* | *'with BFD'*)
2960         test "$with_gnu_ld" != no && break
2961         ;;
2962       *)
2963         test "$with_gnu_ld" != yes && break
2964         ;;
2965       esac
2966     fi
2967   done
2968   IFS="$lt_save_ifs"
2969 else
2970   lt_cv_path_LD="$LD" # Let the user override the test with a path.
2971 fi])
2972 LD="$lt_cv_path_LD"
2973 if test -n "$LD"; then
2974   AC_MSG_RESULT($LD)
2975 else
2976   AC_MSG_RESULT(no)
2978 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
2979 AC_PROG_LD_GNU
2980 ])# AC_PROG_LD
2983 # AC_PROG_LD_GNU
2984 # --------------
2985 AC_DEFUN([AC_PROG_LD_GNU],
2986 [AC_REQUIRE([AC_PROG_EGREP])dnl
2987 AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
2988 [# I'd rather use --version here, but apparently some GNU lds only accept -v.
2989 case `$LD -v 2>&1 </dev/null` in
2990 *GNU* | *'with BFD'*)
2991   lt_cv_prog_gnu_ld=yes
2992   ;;
2994   lt_cv_prog_gnu_ld=no
2995   ;;
2996 esac])
2997 with_gnu_ld=$lt_cv_prog_gnu_ld
2998 ])# AC_PROG_LD_GNU
3001 # AC_PROG_LD_RELOAD_FLAG
3002 # ----------------------
3003 # find reload flag for linker
3004 #   -- PORTME Some linkers may need a different reload flag.
3005 AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
3006 [AC_CACHE_CHECK([for $LD option to reload object files],
3007   lt_cv_ld_reload_flag,
3008   [lt_cv_ld_reload_flag='-r'])
3009 reload_flag=$lt_cv_ld_reload_flag
3010 case $reload_flag in
3011 "" | " "*) ;;
3012 *) reload_flag=" $reload_flag" ;;
3013 esac
3014 reload_cmds='$LD$reload_flag -o $output$reload_objs'
3015 case $host_os in
3016   darwin*)
3017     if test "$GCC" = yes; then
3018       reload_cmds='$CC -nostdlib ${wl}-r -o $output$reload_objs'
3019     else
3020       reload_cmds='$LD$reload_flag -o $output$reload_objs'
3021     fi
3022     ;;
3023 esac
3024 ])# AC_PROG_LD_RELOAD_FLAG
3027 # AC_DEPLIBS_CHECK_METHOD
3028 # -----------------------
3029 # how to check for library dependencies
3030 #  -- PORTME fill in with the dynamic library characteristics
3031 AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
3032 [AC_CACHE_CHECK([how to recognise dependent libraries],
3033 lt_cv_deplibs_check_method,
3034 [lt_cv_file_magic_cmd='$MAGIC_CMD'
3035 lt_cv_file_magic_test_file=
3036 lt_cv_deplibs_check_method='unknown'
3037 # Need to set the preceding variable on all platforms that support
3038 # interlibrary dependencies.
3039 # 'none' -- dependencies not supported.
3040 # `unknown' -- same as none, but documents that we really don't know.
3041 # 'pass_all' -- all dependencies passed with no checks.
3042 # 'test_compile' -- check by making test program.
3043 # 'file_magic [[regex]]' -- check by looking for files in library path
3044 # which responds to the $file_magic_cmd with a given extended regex.
3045 # If you have `file' or equivalent on your system and you're not sure
3046 # whether `pass_all' will *always* work, you probably want this one.
3048 case $host_os in
3049 aix4* | aix5*)
3050   lt_cv_deplibs_check_method=pass_all
3051   ;;
3053 beos*)
3054   lt_cv_deplibs_check_method=pass_all
3055   ;;
3057 bsdi[[45]]*)
3058   lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
3059   lt_cv_file_magic_cmd='/usr/bin/file -L'
3060   lt_cv_file_magic_test_file=/shlib/libc.so
3061   ;;
3063 cygwin*)
3064   # func_win32_libid is a shell function defined in ltmain.sh
3065   lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3066   lt_cv_file_magic_cmd='func_win32_libid'
3067   ;;
3069 mingw* | pw32*)
3070   # Base MSYS/MinGW do not provide the 'file' command needed by
3071   # func_win32_libid shell function, so use a weaker test based on 'objdump'.
3072   lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3073   lt_cv_file_magic_cmd='$OBJDUMP -f'
3074   ;;
3076 darwin* | rhapsody*)
3077   lt_cv_deplibs_check_method=pass_all
3078   ;;
3080 freebsd* | kfreebsd*-gnu | dragonfly*)
3081   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3082     case $host_cpu in
3083     i*86 )
3084       # Not sure whether the presence of OpenBSD here was a mistake.
3085       # Let's accept both of them until this is cleared up.
3086       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
3087       lt_cv_file_magic_cmd=/usr/bin/file
3088       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3089       ;;
3090     esac
3091   else
3092     lt_cv_deplibs_check_method=pass_all
3093   fi
3094   ;;
3096 gnu*)
3097   lt_cv_deplibs_check_method=pass_all
3098   ;;
3100 hpux10.20* | hpux11*)
3101   lt_cv_file_magic_cmd=/usr/bin/file
3102   case $host_cpu in
3103   ia64*)
3104     lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
3105     lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
3106     ;;
3107   hppa*64*)
3108     [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]']
3109     lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
3110     ;;
3111   *)
3112     lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
3113     lt_cv_file_magic_test_file=/usr/lib/libc.sl
3114     ;;
3115   esac
3116   ;;
3118 irix5* | irix6* | nonstopux*)
3119   case $LD in
3120   *-32|*"-32 ") libmagic=32-bit;;
3121   *-n32|*"-n32 ") libmagic=N32;;
3122   *-64|*"-64 ") libmagic=64-bit;;
3123   *) libmagic=never-match;;
3124   esac
3125   lt_cv_deplibs_check_method=pass_all
3126   ;;
3128 # This must be Linux ELF.
3129 linux*)
3130   lt_cv_deplibs_check_method=pass_all
3131   ;;
3133 netbsd*)
3134   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3135     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3136   else
3137     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
3138   fi
3139   ;;
3141 newos6*)
3142   lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
3143   lt_cv_file_magic_cmd=/usr/bin/file
3144   lt_cv_file_magic_test_file=/usr/lib/libnls.so
3145   ;;
3147 nto-qnx*)
3148   lt_cv_deplibs_check_method=unknown
3149   ;;
3151 openbsd*)
3152   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3153     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
3154   else
3155     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3156   fi
3157   ;;
3159 osf3* | osf4* | osf5*)
3160   lt_cv_deplibs_check_method=pass_all
3161   ;;
3163 sco3.2v5*)
3164   lt_cv_deplibs_check_method=pass_all
3165   ;;
3167 solaris*)
3168   lt_cv_deplibs_check_method=pass_all
3169   ;;
3171 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
3172   case $host_vendor in
3173   motorola)
3174     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]]'
3175     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3176     ;;
3177   ncr)
3178     lt_cv_deplibs_check_method=pass_all
3179     ;;
3180   sequent)
3181     lt_cv_file_magic_cmd='/bin/file'
3182     lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
3183     ;;
3184   sni)
3185     lt_cv_file_magic_cmd='/bin/file'
3186     lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
3187     lt_cv_file_magic_test_file=/lib/libc.so
3188     ;;
3189   siemens)
3190     lt_cv_deplibs_check_method=pass_all
3191     ;;
3192   esac
3193   ;;
3195 sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7* | sysv4*uw2*)
3196   lt_cv_deplibs_check_method=pass_all
3197   ;;
3198 esac
3200 file_magic_cmd=$lt_cv_file_magic_cmd
3201 deplibs_check_method=$lt_cv_deplibs_check_method
3202 test -z "$deplibs_check_method" && deplibs_check_method=unknown
3203 ])# AC_DEPLIBS_CHECK_METHOD
3206 # AC_PROG_NM
3207 # ----------
3208 # find the pathname to a BSD-compatible name lister
3209 AC_DEFUN([AC_PROG_NM],
3210 [AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
3211 [if test -n "$NM"; then
3212   # Let the user override the test.
3213   lt_cv_path_NM="$NM"
3214 else
3215   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3216   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
3217     IFS="$lt_save_ifs"
3218     test -z "$ac_dir" && ac_dir=.
3219     tmp_nm="$ac_dir/${ac_tool_prefix}nm"
3220     if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
3221       # Check to see if the nm accepts a BSD-compat flag.
3222       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3223       #   nm: unknown option "B" ignored
3224       # Tru64's nm complains that /dev/null is an invalid object file
3225       case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
3226       */dev/null* | *'Invalid file or object type'*)
3227         lt_cv_path_NM="$tmp_nm -B"
3228         break
3229         ;;
3230       *)
3231         case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
3232         */dev/null*)
3233           lt_cv_path_NM="$tmp_nm -p"
3234           break
3235           ;;
3236         *)
3237           lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3238           continue # so that we can try to find one that supports BSD flags
3239           ;;
3240         esac
3241       esac
3242     fi
3243   done
3244   IFS="$lt_save_ifs"
3245   test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
3246 fi])
3247 NM="$lt_cv_path_NM"
3248 ])# AC_PROG_NM
3251 # AC_CHECK_LIBM
3252 # -------------
3253 # check for math library
3254 AC_DEFUN([AC_CHECK_LIBM],
3255 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
3256 LIBM=
3257 case $host in
3258 *-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
3259   # These system don't have libm, or don't need it
3260   ;;
3261 *-ncr-sysv4.3*)
3262   AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
3263   AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
3264   ;;
3266   AC_CHECK_LIB(m, cos, LIBM="-lm")
3267   ;;
3268 esac
3269 ])# AC_CHECK_LIBM
3272 # AC_LIBLTDL_CONVENIENCE([DIRECTORY])
3273 # -----------------------------------
3274 # sets LIBLTDL to the link flags for the libltdl convenience library and
3275 # LTDLINCL to the include flags for the libltdl header and adds
3276 # --enable-ltdl-convenience to the configure arguments.  Note that
3277 # AC_CONFIG_SUBDIRS is not called here.  If DIRECTORY is not provided,
3278 # it is assumed to be `libltdl'.  LIBLTDL will be prefixed with
3279 # '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/'
3280 # (note the single quotes!).  If your package is not flat and you're not
3281 # using automake, define top_builddir and top_srcdir appropriately in
3282 # the Makefiles.
3283 AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
3284 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3285   case $enable_ltdl_convenience in
3286   no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
3287   "") enable_ltdl_convenience=yes
3288       ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
3289   esac
3290   LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
3291   LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
3292   # For backwards non-gettext consistent compatibility...
3293   INCLTDL="$LTDLINCL"
3294 ])# AC_LIBLTDL_CONVENIENCE
3297 # AC_LIBLTDL_INSTALLABLE([DIRECTORY])
3298 # -----------------------------------
3299 # sets LIBLTDL to the link flags for the libltdl installable library and
3300 # LTDLINCL to the include flags for the libltdl header and adds
3301 # --enable-ltdl-install to the configure arguments.  Note that
3302 # AC_CONFIG_SUBDIRS is not called here.  If DIRECTORY is not provided,
3303 # and an installed libltdl is not found, it is assumed to be `libltdl'.
3304 # LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with
3305 # '${top_srcdir}/' (note the single quotes!).  If your package is not
3306 # flat and you're not using automake, define top_builddir and top_srcdir
3307 # appropriately in the Makefiles.
3308 # In the future, this macro may have to be called after AC_PROG_LIBTOOL.
3309 AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
3310 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3311   AC_CHECK_LIB(ltdl, lt_dlinit,
3312   [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
3313   [if test x"$enable_ltdl_install" = xno; then
3314      AC_MSG_WARN([libltdl not installed, but installation disabled])
3315    else
3316      enable_ltdl_install=yes
3317    fi
3318   ])
3319   if test x"$enable_ltdl_install" = x"yes"; then
3320     ac_configure_args="$ac_configure_args --enable-ltdl-install"
3321     LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
3322     LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
3323   else
3324     ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
3325     LIBLTDL="-lltdl"
3326     LTDLINCL=
3327   fi
3328   # For backwards non-gettext consistent compatibility...
3329   INCLTDL="$LTDLINCL"
3330 ])# AC_LIBLTDL_INSTALLABLE
3333 # AC_LIBTOOL_CXX
3334 # --------------
3335 # enable support for C++ libraries
3336 AC_DEFUN([AC_LIBTOOL_CXX],
3337 [AC_REQUIRE([_LT_AC_LANG_CXX])
3338 ])# AC_LIBTOOL_CXX
3341 # _LT_AC_LANG_CXX
3342 # ---------------
3343 AC_DEFUN([_LT_AC_LANG_CXX],
3344 [AC_REQUIRE([AC_PROG_CXX])
3345 AC_REQUIRE([_LT_AC_PROG_CXXCPP])
3346 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
3347 ])# _LT_AC_LANG_CXX
3349 # _LT_AC_PROG_CXXCPP
3350 # ---------------
3351 AC_DEFUN([_LT_AC_PROG_CXXCPP],
3353 AC_REQUIRE([AC_PROG_CXX])
3354 if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
3355     ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
3356     (test "X$CXX" != "Xg++"))) ; then
3357   AC_PROG_CXXCPP
3359 ])# _LT_AC_PROG_CXXCPP
3361 # AC_LIBTOOL_F77
3362 # --------------
3363 # enable support for Fortran 77 libraries
3364 AC_DEFUN([AC_LIBTOOL_F77],
3365 [AC_REQUIRE([_LT_AC_LANG_F77])
3366 ])# AC_LIBTOOL_F77
3369 # _LT_AC_LANG_F77
3370 # ---------------
3371 AC_DEFUN([_LT_AC_LANG_F77],
3372 [AC_REQUIRE([AC_PROG_F77])
3373 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
3374 ])# _LT_AC_LANG_F77
3377 # AC_LIBTOOL_GCJ
3378 # --------------
3379 # enable support for GCJ libraries
3380 AC_DEFUN([AC_LIBTOOL_GCJ],
3381 [AC_REQUIRE([_LT_AC_LANG_GCJ])
3382 ])# AC_LIBTOOL_GCJ
3385 # _LT_AC_LANG_GCJ
3386 # ---------------
3387 AC_DEFUN([_LT_AC_LANG_GCJ],
3388 [AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
3389   [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
3390     [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
3391       [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
3392          [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
3393            [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
3394 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
3395 ])# _LT_AC_LANG_GCJ
3398 # AC_LIBTOOL_RC
3399 # --------------
3400 # enable support for Windows resource files
3401 AC_DEFUN([AC_LIBTOOL_RC],
3402 [AC_REQUIRE([LT_AC_PROG_RC])
3403 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
3404 ])# AC_LIBTOOL_RC
3407 # AC_LIBTOOL_LANG_C_CONFIG
3408 # ------------------------
3409 # Ensure that the configuration vars for the C compiler are
3410 # suitably defined.  Those variables are subsequently used by
3411 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3412 AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
3413 AC_DEFUN([_LT_AC_LANG_C_CONFIG],
3414 [lt_save_CC="$CC"
3415 AC_LANG_PUSH(C)
3417 # Source file extension for C test sources.
3418 ac_ext=c
3420 # Object file extension for compiled C test sources.
3421 objext=o
3422 _LT_AC_TAGVAR(objext, $1)=$objext
3424 # Code to be used in simple compile tests
3425 lt_simple_compile_test_code="int some_variable = 0;\n"
3427 # Code to be used in simple link tests
3428 lt_simple_link_test_code='int main(){return(0);}\n'
3430 _LT_AC_SYS_COMPILER
3432 # save warnings/boilerplate of simple test code
3433 _LT_COMPILER_BOILERPLATE
3434 _LT_LINKER_BOILERPLATE
3437 # Check for any special shared library compilation flags.
3439 _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)=
3440 if test "$GCC" = no; then
3441   case $host_os in
3442   sco3.2v5*)
3443     _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)='-belf'
3444     ;;
3445   esac
3447 if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then
3448   AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries])
3449   if echo "$old_CC $old_CFLAGS " | grep "[[     ]]$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[        ]]" >/dev/null; then :
3450   else
3451     AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure])
3452     _LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no
3453   fi
3458 # Check to make sure the static flag actually works.
3460 AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works],
3461   _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
3462   $_LT_AC_TAGVAR(lt_prog_compiler_static, $1),
3463   [],
3464   [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
3467 AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
3468 AC_LIBTOOL_PROG_COMPILER_PIC($1)
3469 AC_LIBTOOL_PROG_CC_C_O($1)
3470 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
3471 AC_LIBTOOL_PROG_LD_SHLIBS($1)
3472 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
3473 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
3474 AC_LIBTOOL_SYS_LIB_STRIP
3475 AC_LIBTOOL_DLOPEN_SELF($1)
3477 # Report which librarie types wil actually be built
3478 AC_MSG_CHECKING([if libtool supports shared libraries])
3479 AC_MSG_RESULT([$can_build_shared])
3481 AC_MSG_CHECKING([whether to build shared libraries])
3482 test "$can_build_shared" = "no" && enable_shared=no
3484 # On AIX, shared libraries and static libraries use the same namespace, and
3485 # are all built from PIC.
3486 case $host_os in
3487 aix3*)
3488   test "$enable_shared" = yes && enable_static=no
3489   if test -n "$RANLIB"; then
3490     archive_cmds="$archive_cmds~\$RANLIB \$lib"
3491     postinstall_cmds='$RANLIB $lib'
3492   fi
3493   ;;
3495 aix4* | aix5*)
3496   if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
3497     test "$enable_shared" = yes && enable_static=no
3498   fi
3499     ;;
3500 esac
3501 AC_MSG_RESULT([$enable_shared])
3503 AC_MSG_CHECKING([whether to build static libraries])
3504 # Make sure either enable_shared or enable_static is yes.
3505 test "$enable_shared" = yes || enable_static=yes
3506 AC_MSG_RESULT([$enable_static])
3508 AC_LIBTOOL_CONFIG($1)
3510 AC_LANG_POP
3511 CC="$lt_save_CC"
3512 ])# AC_LIBTOOL_LANG_C_CONFIG
3515 # AC_LIBTOOL_LANG_CXX_CONFIG
3516 # --------------------------
3517 # Ensure that the configuration vars for the C compiler are
3518 # suitably defined.  Those variables are subsequently used by
3519 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3520 AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
3521 AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
3522 [AC_LANG_PUSH(C++)
3523 AC_REQUIRE([AC_PROG_CXX])
3524 AC_REQUIRE([_LT_AC_PROG_CXXCPP])
3526 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3527 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
3528 _LT_AC_TAGVAR(always_export_symbols, $1)=no
3529 _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
3530 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
3531 _LT_AC_TAGVAR(hardcode_direct, $1)=no
3532 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
3533 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
3534 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
3535 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
3536 _LT_AC_TAGVAR(hardcode_automatic, $1)=no
3537 _LT_AC_TAGVAR(module_cmds, $1)=
3538 _LT_AC_TAGVAR(module_expsym_cmds, $1)=
3539 _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
3540 _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
3541 _LT_AC_TAGVAR(no_undefined_flag, $1)=
3542 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
3543 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
3545 # Dependencies to place before and after the object being linked:
3546 _LT_AC_TAGVAR(predep_objects, $1)=
3547 _LT_AC_TAGVAR(postdep_objects, $1)=
3548 _LT_AC_TAGVAR(predeps, $1)=
3549 _LT_AC_TAGVAR(postdeps, $1)=
3550 _LT_AC_TAGVAR(compiler_lib_search_path, $1)=
3552 # Source file extension for C++ test sources.
3553 ac_ext=cpp
3555 # Object file extension for compiled C++ test sources.
3556 objext=o
3557 _LT_AC_TAGVAR(objext, $1)=$objext
3559 # Code to be used in simple compile tests
3560 lt_simple_compile_test_code="int some_variable = 0;\n"
3562 # Code to be used in simple link tests
3563 lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n'
3565 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
3566 _LT_AC_SYS_COMPILER
3568 # save warnings/boilerplate of simple test code
3569 _LT_COMPILER_BOILERPLATE
3570 _LT_LINKER_BOILERPLATE
3572 # Allow CC to be a program name with arguments.
3573 lt_save_CC=$CC
3574 lt_save_LD=$LD
3575 lt_save_GCC=$GCC
3576 GCC=$GXX
3577 lt_save_with_gnu_ld=$with_gnu_ld
3578 lt_save_path_LD=$lt_cv_path_LD
3579 if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
3580   lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
3581 else
3582   unset lt_cv_prog_gnu_ld
3584 if test -n "${lt_cv_path_LDCXX+set}"; then
3585   lt_cv_path_LD=$lt_cv_path_LDCXX
3586 else
3587   unset lt_cv_path_LD
3589 test -z "${LDCXX+set}" || LD=$LDCXX
3590 CC=${CXX-"c++"}
3591 compiler=$CC
3592 _LT_AC_TAGVAR(compiler, $1)=$CC
3593 _LT_CC_BASENAME([$compiler])
3595 # We don't want -fno-exception wen compiling C++ code, so set the
3596 # no_builtin_flag separately
3597 if test "$GXX" = yes; then
3598   _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
3599 else
3600   _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
3603 if test "$GXX" = yes; then
3604   # Set up default GNU C++ configuration
3606   AC_PROG_LD
3608   # Check if GNU C++ uses GNU ld as the underlying linker, since the
3609   # archiving commands below assume that GNU ld is being used.
3610   if test "$with_gnu_ld" = yes; then
3611     _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
3612     _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'
3614     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
3615     _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3617     # If archive_cmds runs LD, not CC, wlarc should be empty
3618     # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
3619     #     investigate it a little bit more. (MM)
3620     wlarc='${wl}'
3622     # ancient GNU ld didn't support --whole-archive et. al.
3623     if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
3624         grep 'no-whole-archive' > /dev/null; then
3625       _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
3626     else
3627       _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
3628     fi
3629   else
3630     with_gnu_ld=no
3631     wlarc=
3633     # A generic and very simple default shared library creation
3634     # command for GNU C++ for the case where it uses the native
3635     # linker, instead of GNU ld.  If possible, this setting should
3636     # overridden to take advantage of the native linker features on
3637     # the platform it is being used on.
3638     _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
3639   fi
3641   # Commands to make compiler produce verbose output that lists
3642   # what "hidden" libraries, object files and flags are used when
3643   # linking a shared library.
3644   output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
3646 else
3647   GXX=no
3648   with_gnu_ld=no
3649   wlarc=
3652 # PORTME: fill in a description of your system's C++ link characteristics
3653 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
3654 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
3655 case $host_os in
3656   aix3*)
3657     # FIXME: insert proper C++ library support
3658     _LT_AC_TAGVAR(ld_shlibs, $1)=no
3659     ;;
3660   aix4* | aix5*)
3661     if test "$host_cpu" = ia64; then
3662       # On IA64, the linker does run time linking by default, so we don't
3663       # have to do anything special.
3664       aix_use_runtimelinking=no
3665       exp_sym_flag='-Bexport'
3666       no_entry_flag=""
3667     else
3668       aix_use_runtimelinking=no
3670       # Test if we are trying to use run time linking or normal
3671       # AIX style linking. If -brtl is somewhere in LDFLAGS, we
3672       # need to do runtime linking.
3673       case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
3674         for ld_flag in $LDFLAGS; do
3675           case $ld_flag in
3676           *-brtl*)
3677             aix_use_runtimelinking=yes
3678             break
3679             ;;
3680           esac
3681         done
3682       esac
3684       exp_sym_flag='-bexport'
3685       no_entry_flag='-bnoentry'
3686     fi
3688     # When large executables or shared objects are built, AIX ld can
3689     # have problems creating the table of contents.  If linking a library
3690     # or program results in "error TOC overflow" add -mminimal-toc to
3691     # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
3692     # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
3694     _LT_AC_TAGVAR(archive_cmds, $1)=''
3695     _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3696     _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
3697     _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3699     if test "$GXX" = yes; then
3700       case $host_os in aix4.[[012]]|aix4.[[012]].*)
3701       # We only want to do this on AIX 4.2 and lower, the check
3702       # below for broken collect2 doesn't work under 4.3+
3703         collect2name=`${CC} -print-prog-name=collect2`
3704         if test -f "$collect2name" && \
3705            strings "$collect2name" | grep resolve_lib_name >/dev/null
3706         then
3707           # We have reworked collect2
3708           _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3709         else
3710           # We have old collect2
3711           _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
3712           # It fails to find uninstalled libraries when the uninstalled
3713           # path is not listed in the libpath.  Setting hardcode_minus_L
3714           # to unsupported forces relinking
3715           _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
3716           _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3717           _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
3718         fi
3719       esac
3720       shared_flag='-shared'
3721       if test "$aix_use_runtimelinking" = yes; then
3722         shared_flag="$shared_flag "'${wl}-G'
3723       fi
3724     else
3725       # not using gcc
3726       if test "$host_cpu" = ia64; then
3727         # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
3728         # chokes on -Wl,-G. The following line is correct:
3729         shared_flag='-G'
3730       else
3731         if test "$aix_use_runtimelinking" = yes; then
3732           shared_flag='${wl}-G'
3733         else
3734           shared_flag='${wl}-bM:SRE'
3735         fi
3736       fi
3737     fi
3739     # It seems that -bexpall does not export symbols beginning with
3740     # underscore (_), so it is better to generate a list of symbols to export.
3741     _LT_AC_TAGVAR(always_export_symbols, $1)=yes
3742     if test "$aix_use_runtimelinking" = yes; then
3743       # Warning - without using the other runtime loading flags (-brtl),
3744       # -berok will link without error, but may produce a broken library.
3745       _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
3746       # Determine the default libpath from the value encoded in an empty executable.
3747       _LT_AC_SYS_LIBPATH_AIX
3748       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
3750       _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
3751      else
3752       if test "$host_cpu" = ia64; then
3753         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
3754         _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
3755         _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
3756       else
3757         # Determine the default libpath from the value encoded in an empty executable.
3758         _LT_AC_SYS_LIBPATH_AIX
3759         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
3760         # Warning - without using the other run time loading flags,
3761         # -berok will link without error, but may produce a broken library.
3762         _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
3763         _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
3764         # -bexpall does not export symbols beginning with underscore (_)
3765         _LT_AC_TAGVAR(always_export_symbols, $1)=yes
3766         # Exported symbols can be pulled into shared objects from archives
3767         _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
3768         _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
3769         # This is similar to how AIX traditionally builds its shared libraries.
3770         _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
3771       fi
3772     fi
3773     ;;
3774   chorus*)
3775     case $cc_basename in
3776       *)
3777         # FIXME: insert proper C++ library support
3778         _LT_AC_TAGVAR(ld_shlibs, $1)=no
3779         ;;
3780     esac
3781     ;;
3784   cygwin* | mingw* | pw32*)
3785     # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
3786     # as there is no search path for DLLs.
3787     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3788     _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
3789     _LT_AC_TAGVAR(always_export_symbols, $1)=no
3790     _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
3792     if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
3793       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
3794       # If the export-symbols file already is a .def file (1st line
3795       # is EXPORTS), use it as is; otherwise, prepend...
3796       _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
3797         cp $export_symbols $output_objdir/$soname.def;
3798       else
3799         echo EXPORTS > $output_objdir/$soname.def;
3800         cat $export_symbols >> $output_objdir/$soname.def;
3801       fi~
3802       $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
3803     else
3804       _LT_AC_TAGVAR(ld_shlibs, $1)=no
3805     fi
3806   ;;
3807       darwin* | rhapsody*)
3808         case $host_os in
3809         rhapsody* | darwin1.[[012]])
3810          _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
3811          ;;
3812        *) # Darwin 1.3 on
3813          if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
3814            _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
3815          else
3816            case ${MACOSX_DEPLOYMENT_TARGET} in
3817              10.[[012]])
3818                _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
3819                ;;
3820              10.*)
3821                _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
3822                ;;
3823            esac
3824          fi
3825          ;;
3826         esac
3827       _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3828       _LT_AC_TAGVAR(hardcode_direct, $1)=no
3829       _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
3830       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
3831       _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
3832       _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3834     if test "$GXX" = yes ; then
3835       lt_int_apple_cc_single_mod=no
3836       output_verbose_link_cmd='echo'
3837       if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then
3838        lt_int_apple_cc_single_mod=yes
3839       fi
3840       if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
3841        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
3842       else
3843           _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'
3844         fi
3845         _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
3846         # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
3847           if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
3848             _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
3849           else
3850             _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
3851           fi
3852             _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}'
3853       else
3854       case $cc_basename in
3855         xlc*)
3856          output_verbose_link_cmd='echo'
3857           _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
3858           _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
3859           # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
3860           _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
3861           _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}'
3862           ;;
3863        *)
3864          _LT_AC_TAGVAR(ld_shlibs, $1)=no
3865           ;;
3866       esac
3867       fi
3868         ;;
3870   dgux*)
3871     case $cc_basename in
3872       ec++*)
3873         # FIXME: insert proper C++ library support
3874         _LT_AC_TAGVAR(ld_shlibs, $1)=no
3875         ;;
3876       ghcx*)
3877         # Green Hills C++ Compiler
3878         # FIXME: insert proper C++ library support
3879         _LT_AC_TAGVAR(ld_shlibs, $1)=no
3880         ;;
3881       *)
3882         # FIXME: insert proper C++ library support
3883         _LT_AC_TAGVAR(ld_shlibs, $1)=no
3884         ;;
3885     esac
3886     ;;
3887   freebsd[[12]]*)
3888     # C++ shared libraries reported to be fairly broken before switch to ELF
3889     _LT_AC_TAGVAR(ld_shlibs, $1)=no
3890     ;;
3891   freebsd-elf*)
3892     _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3893     ;;
3894   freebsd* | kfreebsd*-gnu | dragonfly*)
3895     # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
3896     # conventions
3897     _LT_AC_TAGVAR(ld_shlibs, $1)=yes
3898     ;;
3899   gnu*)
3900     ;;
3901   hpux9*)
3902     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3903     _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3904     _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3905     _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3906     _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
3907                                 # but as the default
3908                                 # location of the library.
3910     case $cc_basename in
3911     CC*)
3912       # FIXME: insert proper C++ library support
3913       _LT_AC_TAGVAR(ld_shlibs, $1)=no
3914       ;;
3915     aCC*)
3916       _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'
3917       # Commands to make compiler produce verbose output that lists
3918       # what "hidden" libraries, object files and flags are used when
3919       # linking a shared library.
3920       #
3921       # There doesn't appear to be a way to prevent this compiler from
3922       # explicitly linking system object files so we need to strip them
3923       # from the output so that they don't get included in the library
3924       # dependencies.
3925       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'
3926       ;;
3927     *)
3928       if test "$GXX" = yes; then
3929         _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'
3930       else
3931         # FIXME: insert proper C++ library support
3932         _LT_AC_TAGVAR(ld_shlibs, $1)=no
3933       fi
3934       ;;
3935     esac
3936     ;;
3937   hpux10*|hpux11*)
3938     if test $with_gnu_ld = no; then
3939       case $host_cpu in
3940       hppa*64*)
3941         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3942         _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
3943         _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3944         ;;
3945       ia64*)
3946         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3947         ;;
3948       *)
3949         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3950         _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3951         _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3952         ;;
3953       esac
3954     fi
3955     case $host_cpu in
3956     hppa*64*)
3957       _LT_AC_TAGVAR(hardcode_direct, $1)=no
3958       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3959       ;;
3960     ia64*)
3961       _LT_AC_TAGVAR(hardcode_direct, $1)=no
3962       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3963       _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
3964                                               # but as the default
3965                                               # location of the library.
3966       ;;
3967     *)
3968       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3969       _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
3970                                               # but as the default
3971                                               # location of the library.
3972       ;;
3973     esac
3975     case $cc_basename in
3976       CC*)
3977         # FIXME: insert proper C++ library support
3978         _LT_AC_TAGVAR(ld_shlibs, $1)=no
3979         ;;
3980       aCC*)
3981         case $host_cpu in
3982         hppa*64*|ia64*)
3983           _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
3984           ;;
3985         *)
3986           _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3987           ;;
3988         esac
3989         # Commands to make compiler produce verbose output that lists
3990         # what "hidden" libraries, object files and flags are used when
3991         # linking a shared library.
3992         #
3993         # There doesn't appear to be a way to prevent this compiler from
3994         # explicitly linking system object files so we need to strip them
3995         # from the output so that they don't get included in the library
3996         # dependencies.
3997         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'
3998         ;;
3999       *)
4000         if test "$GXX" = yes; then
4001           if test $with_gnu_ld = no; then
4002             case $host_cpu in
4003             ia64*|hppa*64*)
4004               _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
4005               ;;
4006             *)
4007               _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'
4008               ;;
4009             esac
4010           fi
4011         else
4012           # FIXME: insert proper C++ library support
4013           _LT_AC_TAGVAR(ld_shlibs, $1)=no
4014         fi
4015         ;;
4016     esac
4017     ;;
4018   irix5* | irix6*)
4019     case $cc_basename in
4020       CC*)
4021         # SGI C++
4022         _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'
4024         # Archives containing C++ object files must be created using
4025         # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
4026         # necessary to make sure instantiated templates are included
4027         # in the archive.
4028         _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
4029         ;;
4030       *)
4031         if test "$GXX" = yes; then
4032           if test "$with_gnu_ld" = no; then
4033             _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'
4034           else
4035             _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'
4036           fi
4037         fi
4038         _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4039         ;;
4040     esac
4041     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4042     _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4043     ;;
4044   linux*)
4045     case $cc_basename in
4046       KCC*)
4047         # Kuck and Associates, Inc. (KAI) C++ Compiler
4049         # KCC will only create a shared library if the output file
4050         # ends with ".so" (or ".sl" for HP-UX), so rename the library
4051         # to its proper name (with version) after linking.
4052         _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'
4053         _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'
4054         # Commands to make compiler produce verbose output that lists
4055         # what "hidden" libraries, object files and flags are used when
4056         # linking a shared library.
4057         #
4058         # There doesn't appear to be a way to prevent this compiler from
4059         # explicitly linking system object files so we need to strip them
4060         # from the output so that they don't get included in the library
4061         # dependencies.
4062         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'
4064         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
4065         _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4067         # Archives containing C++ object files must be created using
4068         # "CC -Bstatic", where "CC" is the KAI C++ compiler.
4069         _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
4070         ;;
4071       icpc*)
4072         # Intel C++
4073         with_gnu_ld=yes
4074         # version 8.0 and above of icpc choke on multiply defined symbols
4075         # if we add $predep_objects and $postdep_objects, however 7.1 and
4076         # earlier do not add the objects themselves.
4077         case `$CC -V 2>&1` in
4078         *"Version 7."*)
4079           _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
4080           _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'
4081           ;;
4082         *)  # Version 8.0 or newer
4083           tmp_idyn=
4084           case $host_cpu in
4085             ia64*) tmp_idyn=' -i_dynamic';;
4086           esac
4087           _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4088           _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'
4089           ;;
4090         esac
4091         _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4092         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4093         _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4094         _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
4095         ;;
4096       pgCC*)
4097         # Portland Group C++ compiler
4098         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
4099         _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'
4101         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
4102         _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4103         _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'
4104         ;;
4105       cxx*)
4106         # Compaq C++
4107         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
4108         _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'
4110         runpath_var=LD_RUN_PATH
4111         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
4112         _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4114         # Commands to make compiler produce verbose output that lists
4115         # what "hidden" libraries, object files and flags are used when
4116         # linking a shared library.
4117         #
4118         # There doesn't appear to be a way to prevent this compiler from
4119         # explicitly linking system object files so we need to strip them
4120         # from the output so that they don't get included in the library
4121         # dependencies.
4122         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'
4123         ;;
4124     esac
4125     ;;
4126   lynxos*)
4127     # FIXME: insert proper C++ library support
4128     _LT_AC_TAGVAR(ld_shlibs, $1)=no
4129     ;;
4130   m88k*)
4131     # FIXME: insert proper C++ library support
4132     _LT_AC_TAGVAR(ld_shlibs, $1)=no
4133     ;;
4134   mvs*)
4135     case $cc_basename in
4136       cxx*)
4137         # FIXME: insert proper C++ library support
4138         _LT_AC_TAGVAR(ld_shlibs, $1)=no
4139         ;;
4140       *)
4141         # FIXME: insert proper C++ library support
4142         _LT_AC_TAGVAR(ld_shlibs, $1)=no
4143         ;;
4144     esac
4145     ;;
4146   netbsd*)
4147     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
4148       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
4149       wlarc=
4150       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4151       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4152       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4153     fi
4154     # Workaround some broken pre-1.5 toolchains
4155     output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
4156     ;;
4157   openbsd2*)
4158     # C++ shared libraries are fairly broken
4159     _LT_AC_TAGVAR(ld_shlibs, $1)=no
4160     ;;
4161   openbsd*)
4162     _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4163     _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4164     _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
4165     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4166     if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
4167       _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'
4168       _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4169       _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
4170     fi
4171     output_verbose_link_cmd='echo'
4172     ;;
4173   osf3*)
4174     case $cc_basename in
4175       KCC*)
4176         # Kuck and Associates, Inc. (KAI) C++ Compiler
4178         # KCC will only create a shared library if the output file
4179         # ends with ".so" (or ".sl" for HP-UX), so rename the library
4180         # to its proper name (with version) after linking.
4181         _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'
4183         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4184         _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4186         # Archives containing C++ object files must be created using
4187         # "CC -Bstatic", where "CC" is the KAI C++ compiler.
4188         _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
4190         ;;
4191       RCC*)
4192         # Rational C++ 2.4.1
4193         # FIXME: insert proper C++ library support
4194         _LT_AC_TAGVAR(ld_shlibs, $1)=no
4195         ;;
4196       cxx*)
4197         _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4198         _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'
4200         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4201         _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4203         # Commands to make compiler produce verbose output that lists
4204         # what "hidden" libraries, object files and flags are used when
4205         # linking a shared library.
4206         #
4207         # There doesn't appear to be a way to prevent this compiler from
4208         # explicitly linking system object files so we need to strip them
4209         # from the output so that they don't get included in the library
4210         # dependencies.
4211         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'
4212         ;;
4213       *)
4214         if test "$GXX" = yes && test "$with_gnu_ld" = no; then
4215           _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4216           _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'
4218           _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4219           _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4221           # Commands to make compiler produce verbose output that lists
4222           # what "hidden" libraries, object files and flags are used when
4223           # linking a shared library.
4224           output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
4226         else
4227           # FIXME: insert proper C++ library support
4228           _LT_AC_TAGVAR(ld_shlibs, $1)=no
4229         fi
4230         ;;
4231     esac
4232     ;;
4233   osf4* | osf5*)
4234     case $cc_basename in
4235       KCC*)
4236         # Kuck and Associates, Inc. (KAI) C++ Compiler
4238         # KCC will only create a shared library if the output file
4239         # ends with ".so" (or ".sl" for HP-UX), so rename the library
4240         # to its proper name (with version) after linking.
4241         _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'
4243         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4244         _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4246         # Archives containing C++ object files must be created using
4247         # the KAI C++ compiler.
4248         _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
4249         ;;
4250       RCC*)
4251         # Rational C++ 2.4.1
4252         # FIXME: insert proper C++ library support
4253         _LT_AC_TAGVAR(ld_shlibs, $1)=no
4254         ;;
4255       cxx*)
4256         _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
4257         _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'
4258         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
4259           echo "-hidden">> $lib.exp~
4260           $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~
4261           $rm $lib.exp'
4263         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
4264         _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4266         # Commands to make compiler produce verbose output that lists
4267         # what "hidden" libraries, object files and flags are used when
4268         # linking a shared library.
4269         #
4270         # There doesn't appear to be a way to prevent this compiler from
4271         # explicitly linking system object files so we need to strip them
4272         # from the output so that they don't get included in the library
4273         # dependencies.
4274         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'
4275         ;;
4276       *)
4277         if test "$GXX" = yes && test "$with_gnu_ld" = no; then
4278           _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4279          _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'
4281           _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4282           _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4284           # Commands to make compiler produce verbose output that lists
4285           # what "hidden" libraries, object files and flags are used when
4286           # linking a shared library.
4287           output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
4289         else
4290           # FIXME: insert proper C++ library support
4291           _LT_AC_TAGVAR(ld_shlibs, $1)=no
4292         fi
4293         ;;
4294     esac
4295     ;;
4296   psos*)
4297     # FIXME: insert proper C++ library support
4298     _LT_AC_TAGVAR(ld_shlibs, $1)=no
4299     ;;
4300   sco*)
4301     _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4302     case $cc_basename in
4303       CC*)
4304         # FIXME: insert proper C++ library support
4305         _LT_AC_TAGVAR(ld_shlibs, $1)=no
4306         ;;
4307       *)
4308         # FIXME: insert proper C++ library support
4309         _LT_AC_TAGVAR(ld_shlibs, $1)=no
4310         ;;
4311     esac
4312     ;;
4313   sunos4*)
4314     case $cc_basename in
4315       CC*)
4316         # Sun C++ 4.x
4317         # FIXME: insert proper C++ library support
4318         _LT_AC_TAGVAR(ld_shlibs, $1)=no
4319         ;;
4320       lcc*)
4321         # Lucid
4322         # FIXME: insert proper C++ library support
4323         _LT_AC_TAGVAR(ld_shlibs, $1)=no
4324         ;;
4325       *)
4326         # FIXME: insert proper C++ library support
4327         _LT_AC_TAGVAR(ld_shlibs, $1)=no
4328         ;;
4329     esac
4330     ;;
4331   solaris*)
4332     case $cc_basename in
4333       CC*)
4334         # Sun C++ 4.2, 5.x and Centerline C++
4335         _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes
4336         _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
4337         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
4338         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
4339         $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'
4341         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4342         _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4343         case $host_os in
4344           solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
4345           *)
4346             # The C++ compiler is used as linker so we must use $wl
4347             # flag to pass the commands to the underlying system
4348             # linker. We must also pass each convience library through
4349             # to the system linker between allextract/defaultextract.
4350             # The C++ compiler will combine linker options so we
4351             # cannot just pass the convience library names through
4352             # without $wl.
4353             # Supported since Solaris 2.6 (maybe 2.5.1?)
4354             _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract'
4355             ;;
4356         esac
4357         _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4359         output_verbose_link_cmd='echo'
4361         # Archives containing C++ object files must be created using
4362         # "CC -xar", where "CC" is the Sun C++ compiler.  This is
4363         # necessary to make sure instantiated templates are included
4364         # in the archive.
4365         _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
4366         ;;
4367       gcx*)
4368         # Green Hills C++ Compiler
4369         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
4371         # The C++ compiler must be used to create the archive.
4372         _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
4373         ;;
4374       *)
4375         # GNU C++ compiler with Solaris linker
4376         if test "$GXX" = yes && test "$with_gnu_ld" = no; then
4377           _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
4378           if $CC --version | grep -v '^2\.7' > /dev/null; then
4379             _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
4380             _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
4381                 $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
4383             # Commands to make compiler produce verbose output that lists
4384             # what "hidden" libraries, object files and flags are used when
4385             # linking a shared library.
4386             output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
4387           else
4388             # g++ 2.7 appears to require `-G' NOT `-shared' on this
4389             # platform.
4390             _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
4391             _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
4392                 $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
4394             # Commands to make compiler produce verbose output that lists
4395             # what "hidden" libraries, object files and flags are used when
4396             # linking a shared library.
4397             output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
4398           fi
4400           _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
4401         fi
4402         ;;
4403     esac
4404     ;;
4405   sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
4406     _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4407     ;;
4408   tandem*)
4409     case $cc_basename in
4410       NCC*)
4411         # NonStop-UX NCC 3.20
4412         # FIXME: insert proper C++ library support
4413         _LT_AC_TAGVAR(ld_shlibs, $1)=no
4414         ;;
4415       *)
4416         # FIXME: insert proper C++ library support
4417         _LT_AC_TAGVAR(ld_shlibs, $1)=no
4418         ;;
4419     esac
4420     ;;
4421   vxworks*)
4422     # FIXME: insert proper C++ library support
4423     _LT_AC_TAGVAR(ld_shlibs, $1)=no
4424     ;;
4425   *)
4426     # FIXME: insert proper C++ library support
4427     _LT_AC_TAGVAR(ld_shlibs, $1)=no
4428     ;;
4429 esac
4430 AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
4431 test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
4433 _LT_AC_TAGVAR(GCC, $1)="$GXX"
4434 _LT_AC_TAGVAR(LD, $1)="$LD"
4436 AC_LIBTOOL_POSTDEP_PREDEP($1)
4437 AC_LIBTOOL_PROG_COMPILER_PIC($1)
4438 AC_LIBTOOL_PROG_CC_C_O($1)
4439 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
4440 AC_LIBTOOL_PROG_LD_SHLIBS($1)
4441 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
4442 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
4443 AC_LIBTOOL_SYS_LIB_STRIP
4444 AC_LIBTOOL_DLOPEN_SELF($1)
4446 AC_LIBTOOL_CONFIG($1)
4448 AC_LANG_POP
4449 CC=$lt_save_CC
4450 LDCXX=$LD
4451 LD=$lt_save_LD
4452 GCC=$lt_save_GCC
4453 with_gnu_ldcxx=$with_gnu_ld
4454 with_gnu_ld=$lt_save_with_gnu_ld
4455 lt_cv_path_LDCXX=$lt_cv_path_LD
4456 lt_cv_path_LD=$lt_save_path_LD
4457 lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
4458 lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
4459 ])# AC_LIBTOOL_LANG_CXX_CONFIG
4461 # AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
4462 # ------------------------
4463 # Figure out "hidden" library dependencies from verbose
4464 # compiler output when linking a shared library.
4465 # Parse the compiler output and extract the necessary
4466 # objects, libraries and library flags.
4467 AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[
4468 dnl we can't use the lt_simple_compile_test_code here,
4469 dnl because it contains code intended for an executable,
4470 dnl not a library.  It's possible we should let each
4471 dnl tag define a new lt_????_link_test_code variable,
4472 dnl but it's only used here...
4473 ifelse([$1],[],[cat > conftest.$ac_ext <<EOF
4474 int a;
4475 void foo (void) { a = 0; }
4477 ],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
4478 class Foo
4480 public:
4481   Foo (void) { a = 0; }
4482 private:
4483   int a;
4486 ],[$1],[F77],[cat > conftest.$ac_ext <<EOF
4487       subroutine foo
4488       implicit none
4489       integer*4 a
4490       a=0
4491       return
4492       end
4494 ],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
4495 public class foo {
4496   private int a;
4497   public void bar (void) {
4498     a = 0;
4499   }
4503 dnl Parse the compiler output and extract the necessary
4504 dnl objects, libraries and library flags.
4505 if AC_TRY_EVAL(ac_compile); then
4506   # Parse the compiler output and extract the necessary
4507   # objects, libraries and library flags.
4509   # Sentinel used to keep track of whether or not we are before
4510   # the conftest object file.
4511   pre_test_object_deps_done=no
4513   # The `*' in the case matches for architectures that use `case' in
4514   # $output_verbose_cmd can trigger glob expansion during the loop
4515   # eval without this substitution.
4516   output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"`
4518   for p in `eval $output_verbose_link_cmd`; do
4519     case $p in
4521     -L* | -R* | -l*)
4522        # Some compilers place space between "-{L,R}" and the path.
4523        # Remove the space.
4524        if test $p = "-L" \
4525           || test $p = "-R"; then
4526          prev=$p
4527          continue
4528        else
4529          prev=
4530        fi
4532        if test "$pre_test_object_deps_done" = no; then
4533          case $p in
4534          -L* | -R*)
4535            # Internal compiler library paths should come after those
4536            # provided the user.  The postdeps already come after the
4537            # user supplied libs so there is no need to process them.
4538            if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
4539              _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
4540            else
4541              _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
4542            fi
4543            ;;
4544          # The "-l" case would never come before the object being
4545          # linked, so don't bother handling this case.
4546          esac
4547        else
4548          if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
4549            _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
4550          else
4551            _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
4552          fi
4553        fi
4554        ;;
4556     *.$objext)
4557        # This assumes that the test object file only shows up
4558        # once in the compiler output.
4559        if test "$p" = "conftest.$objext"; then
4560          pre_test_object_deps_done=yes
4561          continue
4562        fi
4564        if test "$pre_test_object_deps_done" = no; then
4565          if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
4566            _LT_AC_TAGVAR(predep_objects, $1)="$p"
4567          else
4568            _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
4569          fi
4570        else
4571          if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
4572            _LT_AC_TAGVAR(postdep_objects, $1)="$p"
4573          else
4574            _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
4575          fi
4576        fi
4577        ;;
4579     *) ;; # Ignore the rest.
4581     esac
4582   done
4584   # Clean up.
4585   rm -f a.out a.exe
4586 else
4587   echo "libtool.m4: error: problem compiling $1 test program"
4590 $rm -f confest.$objext
4592 # PORTME: override above test on systems where it is broken
4593 ifelse([$1],[CXX],
4594 [case $host_os in
4595 solaris*)
4596   case $cc_basename in
4597   CC*)
4598     # Adding this requires a known-good setup of shared libraries for
4599     # Sun compiler versions before 5.6, else PIC objects from an old
4600     # archive will be linked into the output, leading to subtle bugs.
4601     _LT_AC_TAGVAR(postdeps,$1)='-lCstd -lCrun'
4602     ;;
4603   esac
4604 esac
4607 case " $_LT_AC_TAGVAR(postdeps, $1) " in
4608 *" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
4609 esac
4610 ])# AC_LIBTOOL_POSTDEP_PREDEP
4612 # AC_LIBTOOL_LANG_F77_CONFIG
4613 # ------------------------
4614 # Ensure that the configuration vars for the C compiler are
4615 # suitably defined.  Those variables are subsequently used by
4616 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4617 AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
4618 AC_DEFUN([_LT_AC_LANG_F77_CONFIG],
4619 [AC_REQUIRE([AC_PROG_F77])
4620 AC_LANG_PUSH(Fortran 77)
4622 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4623 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
4624 _LT_AC_TAGVAR(always_export_symbols, $1)=no
4625 _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
4626 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
4627 _LT_AC_TAGVAR(hardcode_direct, $1)=no
4628 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
4629 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
4630 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
4631 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
4632 _LT_AC_TAGVAR(hardcode_automatic, $1)=no
4633 _LT_AC_TAGVAR(module_cmds, $1)=
4634 _LT_AC_TAGVAR(module_expsym_cmds, $1)=
4635 _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
4636 _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
4637 _LT_AC_TAGVAR(no_undefined_flag, $1)=
4638 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
4639 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
4641 # Source file extension for f77 test sources.
4642 ac_ext=f
4644 # Object file extension for compiled f77 test sources.
4645 objext=o
4646 _LT_AC_TAGVAR(objext, $1)=$objext
4648 # Code to be used in simple compile tests
4649 lt_simple_compile_test_code="      subroutine t\n      return\n      end\n"
4651 # Code to be used in simple link tests
4652 lt_simple_link_test_code="      program t\n      end\n"
4654 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
4655 _LT_AC_SYS_COMPILER
4657 # save warnings/boilerplate of simple test code
4658 _LT_COMPILER_BOILERPLATE
4659 _LT_LINKER_BOILERPLATE
4661 # Allow CC to be a program name with arguments.
4662 lt_save_CC="$CC"
4663 CC=${F77-"f77"}
4664 compiler=$CC
4665 _LT_AC_TAGVAR(compiler, $1)=$CC
4666 _LT_CC_BASENAME([$compiler])
4668 AC_MSG_CHECKING([if libtool supports shared libraries])
4669 AC_MSG_RESULT([$can_build_shared])
4671 AC_MSG_CHECKING([whether to build shared libraries])
4672 test "$can_build_shared" = "no" && enable_shared=no
4674 # On AIX, shared libraries and static libraries use the same namespace, and
4675 # are all built from PIC.
4676 case $host_os in
4677 aix3*)
4678   test "$enable_shared" = yes && enable_static=no
4679   if test -n "$RANLIB"; then
4680     archive_cmds="$archive_cmds~\$RANLIB \$lib"
4681     postinstall_cmds='$RANLIB $lib'
4682   fi
4683   ;;
4684 aix4* | aix5*)
4685   if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
4686     test "$enable_shared" = yes && enable_static=no
4687   fi
4688   ;;
4689 esac
4690 AC_MSG_RESULT([$enable_shared])
4692 AC_MSG_CHECKING([whether to build static libraries])
4693 # Make sure either enable_shared or enable_static is yes.
4694 test "$enable_shared" = yes || enable_static=yes
4695 AC_MSG_RESULT([$enable_static])
4697 test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
4699 _LT_AC_TAGVAR(GCC, $1)="$G77"
4700 _LT_AC_TAGVAR(LD, $1)="$LD"
4702 AC_LIBTOOL_PROG_COMPILER_PIC($1)
4703 AC_LIBTOOL_PROG_CC_C_O($1)
4704 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
4705 AC_LIBTOOL_PROG_LD_SHLIBS($1)
4706 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
4707 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
4708 AC_LIBTOOL_SYS_LIB_STRIP
4711 AC_LIBTOOL_CONFIG($1)
4713 AC_LANG_POP
4714 CC="$lt_save_CC"
4715 ])# AC_LIBTOOL_LANG_F77_CONFIG
4718 # AC_LIBTOOL_LANG_GCJ_CONFIG
4719 # --------------------------
4720 # Ensure that the configuration vars for the C compiler are
4721 # suitably defined.  Those variables are subsequently used by
4722 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4723 AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
4724 AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
4725 [AC_LANG_SAVE
4727 # Source file extension for Java test sources.
4728 ac_ext=java
4730 # Object file extension for compiled Java test sources.
4731 objext=o
4732 _LT_AC_TAGVAR(objext, $1)=$objext
4734 # Code to be used in simple compile tests
4735 lt_simple_compile_test_code="class foo {}\n"
4737 # Code to be used in simple link tests
4738 lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }\n'
4740 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
4741 _LT_AC_SYS_COMPILER
4743 # save warnings/boilerplate of simple test code
4744 _LT_COMPILER_BOILERPLATE
4745 _LT_LINKER_BOILERPLATE
4747 # Allow CC to be a program name with arguments.
4748 lt_save_CC="$CC"
4749 CC=${GCJ-"gcj"}
4750 compiler=$CC
4751 _LT_AC_TAGVAR(compiler, $1)=$CC
4752 _LT_CC_BASENAME([$compiler])
4754 # GCJ did not exist at the time GCC didn't implicitly link libc in.
4755 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4757 _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
4759 AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
4760 AC_LIBTOOL_PROG_COMPILER_PIC($1)
4761 AC_LIBTOOL_PROG_CC_C_O($1)
4762 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
4763 AC_LIBTOOL_PROG_LD_SHLIBS($1)
4764 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
4765 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
4766 AC_LIBTOOL_SYS_LIB_STRIP
4767 AC_LIBTOOL_DLOPEN_SELF($1)
4769 AC_LIBTOOL_CONFIG($1)
4771 AC_LANG_RESTORE
4772 CC="$lt_save_CC"
4773 ])# AC_LIBTOOL_LANG_GCJ_CONFIG
4776 # AC_LIBTOOL_LANG_RC_CONFIG
4777 # --------------------------
4778 # Ensure that the configuration vars for the Windows resource compiler are
4779 # suitably defined.  Those variables are subsequently used by
4780 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4781 AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
4782 AC_DEFUN([_LT_AC_LANG_RC_CONFIG],
4783 [AC_LANG_SAVE
4785 # Source file extension for RC test sources.
4786 ac_ext=rc
4788 # Object file extension for compiled RC test sources.
4789 objext=o
4790 _LT_AC_TAGVAR(objext, $1)=$objext
4792 # Code to be used in simple compile tests
4793 lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
4795 # Code to be used in simple link tests
4796 lt_simple_link_test_code="$lt_simple_compile_test_code"
4798 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
4799 _LT_AC_SYS_COMPILER
4801 # save warnings/boilerplate of simple test code
4802 _LT_COMPILER_BOILERPLATE
4803 _LT_LINKER_BOILERPLATE
4805 # Allow CC to be a program name with arguments.
4806 lt_save_CC="$CC"
4807 CC=${RC-"windres"}
4808 compiler=$CC
4809 _LT_AC_TAGVAR(compiler, $1)=$CC
4810 _LT_CC_BASENAME([$compiler])
4811 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
4813 AC_LIBTOOL_CONFIG($1)
4815 AC_LANG_RESTORE
4816 CC="$lt_save_CC"
4817 ])# AC_LIBTOOL_LANG_RC_CONFIG
4820 # AC_LIBTOOL_CONFIG([TAGNAME])
4821 # ----------------------------
4822 # If TAGNAME is not passed, then create an initial libtool script
4823 # with a default configuration from the untagged config vars.  Otherwise
4824 # add code to config.status for appending the configuration named by
4825 # TAGNAME from the matching tagged config vars.
4826 AC_DEFUN([AC_LIBTOOL_CONFIG],
4827 [# The else clause should only fire when bootstrapping the
4828 # libtool distribution, otherwise you forgot to ship ltmain.sh
4829 # with your package, and you will get complaints that there are
4830 # no rules to generate ltmain.sh.
4831 if test -f "$ltmain"; then
4832   # See if we are running on zsh, and set the options which allow our commands through
4833   # without removal of \ escapes.
4834   if test -n "${ZSH_VERSION+set}" ; then
4835     setopt NO_GLOB_SUBST
4836   fi
4837   # Now quote all the things that may contain metacharacters while being
4838   # careful not to overquote the AC_SUBSTed values.  We take copies of the
4839   # variables and quote the copies for generation of the libtool script.
4840   for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \
4841     SED SHELL STRIP \
4842     libname_spec library_names_spec soname_spec extract_expsyms_cmds \
4843     old_striplib striplib file_magic_cmd finish_cmds finish_eval \
4844     deplibs_check_method reload_flag reload_cmds need_locks \
4845     lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
4846     lt_cv_sys_global_symbol_to_c_name_address \
4847     sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
4848     old_postinstall_cmds old_postuninstall_cmds \
4849     _LT_AC_TAGVAR(compiler, $1) \
4850     _LT_AC_TAGVAR(CC, $1) \
4851     _LT_AC_TAGVAR(LD, $1) \
4852     _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
4853     _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
4854     _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
4855     _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
4856     _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
4857     _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
4858     _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
4859     _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
4860     _LT_AC_TAGVAR(old_archive_cmds, $1) \
4861     _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
4862     _LT_AC_TAGVAR(predep_objects, $1) \
4863     _LT_AC_TAGVAR(postdep_objects, $1) \
4864     _LT_AC_TAGVAR(predeps, $1) \
4865     _LT_AC_TAGVAR(postdeps, $1) \
4866     _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
4867     _LT_AC_TAGVAR(archive_cmds, $1) \
4868     _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
4869     _LT_AC_TAGVAR(postinstall_cmds, $1) \
4870     _LT_AC_TAGVAR(postuninstall_cmds, $1) \
4871     _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
4872     _LT_AC_TAGVAR(allow_undefined_flag, $1) \
4873     _LT_AC_TAGVAR(no_undefined_flag, $1) \
4874     _LT_AC_TAGVAR(export_symbols_cmds, $1) \
4875     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
4876     _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
4877     _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
4878     _LT_AC_TAGVAR(hardcode_automatic, $1) \
4879     _LT_AC_TAGVAR(module_cmds, $1) \
4880     _LT_AC_TAGVAR(module_expsym_cmds, $1) \
4881     _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
4882     _LT_AC_TAGVAR(exclude_expsyms, $1) \
4883     _LT_AC_TAGVAR(include_expsyms, $1); do
4885     case $var in
4886     _LT_AC_TAGVAR(old_archive_cmds, $1) | \
4887     _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
4888     _LT_AC_TAGVAR(archive_cmds, $1) | \
4889     _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
4890     _LT_AC_TAGVAR(module_cmds, $1) | \
4891     _LT_AC_TAGVAR(module_expsym_cmds, $1) | \
4892     _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
4893     _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
4894     extract_expsyms_cmds | reload_cmds | finish_cmds | \
4895     postinstall_cmds | postuninstall_cmds | \
4896     old_postinstall_cmds | old_postuninstall_cmds | \
4897     sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
4898       # Double-quote double-evaled strings.
4899       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
4900       ;;
4901     *)
4902       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
4903       ;;
4904     esac
4905   done
4907   case $lt_echo in
4908   *'\[$]0 --fallback-echo"')
4909     lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
4910     ;;
4911   esac
4913 ifelse([$1], [],
4914   [cfgfile="${ofile}T"
4915   trap "$rm \"$cfgfile\"; exit 1" 1 2 15
4916   $rm -f "$cfgfile"
4917   AC_MSG_NOTICE([creating $ofile])],
4918   [cfgfile="$ofile"])
4920   cat <<__EOF__ >> "$cfgfile"
4921 ifelse([$1], [],
4922 [#! $SHELL
4924 # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
4925 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
4926 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
4928 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
4929 # Free Software Foundation, Inc.
4931 # This file is part of GNU Libtool:
4932 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
4934 # This program is free software; you can redistribute it and/or modify
4935 # it under the terms of the GNU General Public License as published by
4936 # the Free Software Foundation; either version 2 of the License, or
4937 # (at your option) any later version.
4939 # This program is distributed in the hope that it will be useful, but
4940 # WITHOUT ANY WARRANTY; without even the implied warranty of
4941 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
4942 # General Public License for more details.
4944 # You should have received a copy of the GNU General Public License
4945 # along with this program; if not, write to the Free Software
4946 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
4948 # As a special exception to the GNU General Public License, if you
4949 # distribute this file as part of a program that contains a
4950 # configuration script generated by Autoconf, you may include it under
4951 # the same distribution terms that you use for the rest of that program.
4953 # A sed program that does not truncate output.
4954 SED=$lt_SED
4956 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
4957 Xsed="$SED -e 1s/^X//"
4959 # The HP-UX ksh and POSIX shell print the target directory to stdout
4960 # if CDPATH is set.
4961 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
4963 # The names of the tagged configurations supported by this script.
4964 available_tags=
4966 # ### BEGIN LIBTOOL CONFIG],
4967 [# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
4969 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
4971 # Shell to use when invoking shell scripts.
4972 SHELL=$lt_SHELL
4974 # Whether or not to build shared libraries.
4975 build_libtool_libs=$enable_shared
4977 # Whether or not to build static libraries.
4978 build_old_libs=$enable_static
4980 # Whether or not to add -lc for building shared libraries.
4981 build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
4983 # Whether or not to disallow shared libs when runtime libs are static
4984 allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
4986 # Whether or not to optimize for fast installation.
4987 fast_install=$enable_fast_install
4989 # The host system.
4990 host_alias=$host_alias
4991 host=$host
4992 host_os=$host_os
4994 # The build system.
4995 build_alias=$build_alias
4996 build=$build
4997 build_os=$build_os
4999 # An echo program that does not interpret backslashes.
5000 echo=$lt_echo
5002 # The archiver.
5003 AR=$lt_AR
5004 AR_FLAGS=$lt_AR_FLAGS
5006 # A C compiler.
5007 LTCC=$lt_LTCC
5009 # A language-specific compiler.
5010 CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
5012 # Is the compiler the GNU C compiler?
5013 with_gcc=$_LT_AC_TAGVAR(GCC, $1)
5015 # An ERE matcher.
5016 EGREP=$lt_EGREP
5018 # The linker used to build libraries.
5019 LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
5021 # Whether we need hard or soft links.
5022 LN_S=$lt_LN_S
5024 # A BSD-compatible nm program.
5025 NM=$lt_NM
5027 # A symbol stripping program
5028 STRIP=$lt_STRIP
5030 # Used to examine libraries when file_magic_cmd begins "file"
5031 MAGIC_CMD=$MAGIC_CMD
5033 # Used on cygwin: DLL creation program.
5034 DLLTOOL="$DLLTOOL"
5036 # Used on cygwin: object dumper.
5037 OBJDUMP="$OBJDUMP"
5039 # Used on cygwin: assembler.
5040 AS="$AS"
5042 # The name of the directory that contains temporary libtool files.
5043 objdir=$objdir
5045 # How to create reloadable object files.
5046 reload_flag=$lt_reload_flag
5047 reload_cmds=$lt_reload_cmds
5049 # How to pass a linker flag through the compiler.
5050 wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
5052 # Object file suffix (normally "o").
5053 objext="$ac_objext"
5055 # Old archive suffix (normally "a").
5056 libext="$libext"
5058 # Shared library suffix (normally ".so").
5059 shrext_cmds='$shrext_cmds'
5061 # Executable file suffix (normally "").
5062 exeext="$exeext"
5064 # Additional compiler flags for building library objects.
5065 pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
5066 pic_mode=$pic_mode
5068 # What is the maximum length of a command?
5069 max_cmd_len=$lt_cv_sys_max_cmd_len
5071 # Does compiler simultaneously support -c and -o options?
5072 compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
5074 # Must we lock files when doing compilation?
5075 need_locks=$lt_need_locks
5077 # Do we need the lib prefix for modules?
5078 need_lib_prefix=$need_lib_prefix
5080 # Do we need a version for libraries?
5081 need_version=$need_version
5083 # Whether dlopen is supported.
5084 dlopen_support=$enable_dlopen
5086 # Whether dlopen of programs is supported.
5087 dlopen_self=$enable_dlopen_self
5089 # Whether dlopen of statically linked programs is supported.
5090 dlopen_self_static=$enable_dlopen_self_static
5092 # Compiler flag to prevent dynamic linking.
5093 link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
5095 # Compiler flag to turn off builtin functions.
5096 no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
5098 # Compiler flag to allow reflexive dlopens.
5099 export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
5101 # Compiler flag to generate shared objects directly from archives.
5102 whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
5104 # Compiler flag to generate thread-safe objects.
5105 thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
5107 # Library versioning type.
5108 version_type=$version_type
5110 # Format of library name prefix.
5111 libname_spec=$lt_libname_spec
5113 # List of archive names.  First name is the real one, the rest are links.
5114 # The last name is the one that the linker finds with -lNAME.
5115 library_names_spec=$lt_library_names_spec
5117 # The coded name of the library, if different from the real name.
5118 soname_spec=$lt_soname_spec
5120 # Commands used to build and install an old-style archive.
5121 RANLIB=$lt_RANLIB
5122 old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
5123 old_postinstall_cmds=$lt_old_postinstall_cmds
5124 old_postuninstall_cmds=$lt_old_postuninstall_cmds
5126 # Create an old-style archive from a shared archive.
5127 old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
5129 # Create a temporary old-style archive to link instead of a shared archive.
5130 old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
5132 # Commands used to build and install a shared archive.
5133 archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
5134 archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
5135 postinstall_cmds=$lt_postinstall_cmds
5136 postuninstall_cmds=$lt_postuninstall_cmds
5138 # Commands used to build a loadable module (assumed same as above if empty)
5139 module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
5140 module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
5142 # Commands to strip libraries.
5143 old_striplib=$lt_old_striplib
5144 striplib=$lt_striplib
5146 # Dependencies to place before the objects being linked to create a
5147 # shared library.
5148 predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
5150 # Dependencies to place after the objects being linked to create a
5151 # shared library.
5152 postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
5154 # Dependencies to place before the objects being linked to create a
5155 # shared library.
5156 predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
5158 # Dependencies to place after the objects being linked to create a
5159 # shared library.
5160 postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
5162 # The library search path used internally by the compiler when linking
5163 # a shared library.
5164 compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
5166 # Method to check whether dependent libraries are shared objects.
5167 deplibs_check_method=$lt_deplibs_check_method
5169 # Command to use when deplibs_check_method == file_magic.
5170 file_magic_cmd=$lt_file_magic_cmd
5172 # Flag that allows shared libraries with undefined symbols to be built.
5173 allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
5175 # Flag that forces no undefined symbols.
5176 no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
5178 # Commands used to finish a libtool library installation in a directory.
5179 finish_cmds=$lt_finish_cmds
5181 # Same as above, but a single script fragment to be evaled but not shown.
5182 finish_eval=$lt_finish_eval
5184 # Take the output of nm and produce a listing of raw symbols and C names.
5185 global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
5187 # Transform the output of nm in a proper C declaration
5188 global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
5190 # Transform the output of nm in a C name address pair
5191 global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
5193 # This is the shared library runtime path variable.
5194 runpath_var=$runpath_var
5196 # This is the shared library path variable.
5197 shlibpath_var=$shlibpath_var
5199 # Is shlibpath searched before the hard-coded library search path?
5200 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
5202 # How to hardcode a shared library path into an executable.
5203 hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
5205 # Whether we should hardcode library paths into libraries.
5206 hardcode_into_libs=$hardcode_into_libs
5208 # Flag to hardcode \$libdir into a binary during linking.
5209 # This must work even if \$libdir does not exist.
5210 hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
5212 # If ld is used when linking, flag to hardcode \$libdir into
5213 # a binary during linking. This must work even if \$libdir does
5214 # not exist.
5215 hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
5217 # Whether we need a single -rpath flag with a separated argument.
5218 hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
5220 # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
5221 # resulting binary.
5222 hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
5224 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
5225 # resulting binary.
5226 hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
5228 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
5229 # the resulting binary.
5230 hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
5232 # Set to yes if building a shared library automatically hardcodes DIR into the library
5233 # and all subsequent libraries and executables linked against it.
5234 hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)
5236 # Variables whose values should be saved in libtool wrapper scripts and
5237 # restored at relink time.
5238 variables_saved_for_relink="$variables_saved_for_relink"
5240 # Whether libtool must link a program against all its dependency libraries.
5241 link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
5243 # Compile-time system search path for libraries
5244 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
5246 # Run-time system search path for libraries
5247 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
5249 # Fix the shell variable \$srcfile for the compiler.
5250 fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)"
5252 # Set to yes if exported symbols are required.
5253 always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
5255 # The commands to list exported symbols.
5256 export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
5258 # The commands to extract the exported symbol list from a shared archive.
5259 extract_expsyms_cmds=$lt_extract_expsyms_cmds
5261 # Symbols that should not be listed in the preloaded symbols.
5262 exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
5264 # Symbols that must always be exported.
5265 include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
5267 ifelse([$1],[],
5268 [# ### END LIBTOOL CONFIG],
5269 [# ### END LIBTOOL TAG CONFIG: $tagname])
5271 __EOF__
5273 ifelse([$1],[], [
5274   case $host_os in
5275   aix3*)
5276     cat <<\EOF >> "$cfgfile"
5278 # AIX sometimes has problems with the GCC collect2 program.  For some
5279 # reason, if we set the COLLECT_NAMES environment variable, the problems
5280 # vanish in a puff of smoke.
5281 if test "X${COLLECT_NAMES+set}" != Xset; then
5282   COLLECT_NAMES=
5283   export COLLECT_NAMES
5286     ;;
5287   esac
5289   # We use sed instead of cat because bash on DJGPP gets confused if
5290   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
5291   # text mode, it properly converts lines to CR/LF.  This bash problem
5292   # is reportedly fixed, but why not run on old versions too?
5293   sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
5295   mv -f "$cfgfile" "$ofile" || \
5296     (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
5297   chmod +x "$ofile"
5299 else
5300   # If there is no Makefile yet, we rely on a make rule to execute
5301   # `config.status --recheck' to rerun these tests and create the
5302   # libtool script then.
5303   ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
5304   if test -f "$ltmain_in"; then
5305     test -f Makefile && make "$ltmain"
5306   fi
5308 ])# AC_LIBTOOL_CONFIG
5311 # AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
5312 # -------------------------------------------
5313 AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
5314 [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
5316 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
5318 if test "$GCC" = yes; then
5319   _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
5321   AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
5322     lt_cv_prog_compiler_rtti_exceptions,
5323     [-fno-rtti -fno-exceptions], [],
5324     [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
5326 ])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
5329 # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
5330 # ---------------------------------
5331 AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
5332 [AC_REQUIRE([AC_CANONICAL_HOST])
5333 AC_REQUIRE([AC_PROG_NM])
5334 AC_REQUIRE([AC_OBJEXT])
5335 # Check for command to grab the raw symbol name followed by C symbol from nm.
5336 AC_MSG_CHECKING([command to parse $NM output from $compiler object])
5337 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
5339 # These are sane defaults that work on at least a few old systems.
5340 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
5342 # Character class describing NM global symbol codes.
5343 symcode='[[BCDEGRST]]'
5345 # Regexp to match symbols that can be accessed directly from C.
5346 sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
5348 # Transform an extracted symbol line into a proper C declaration
5349 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
5351 # Transform an extracted symbol line into symbol name and symbol address
5352 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'"
5354 # Define system-specific variables.
5355 case $host_os in
5356 aix*)
5357   symcode='[[BCDT]]'
5358   ;;
5359 cygwin* | mingw* | pw32*)
5360   symcode='[[ABCDGISTW]]'
5361   ;;
5362 hpux*) # Its linker distinguishes data from code symbols
5363   if test "$host_cpu" = ia64; then
5364     symcode='[[ABCDEGRST]]'
5365   fi
5366   lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
5367   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'"
5368   ;;
5369 linux*)
5370   if test "$host_cpu" = ia64; then
5371     symcode='[[ABCDGIRSTW]]'
5372     lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
5373     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'"
5374   fi
5375   ;;
5376 irix* | nonstopux*)
5377   symcode='[[BCDEGRST]]'
5378   ;;
5379 osf*)
5380   symcode='[[BCDEGQRST]]'
5381   ;;
5382 solaris* | sysv5*)
5383   symcode='[[BDRT]]'
5384   ;;
5385 sysv4)
5386   symcode='[[DFNSTU]]'
5387   ;;
5388 esac
5390 # Handle CRLF in mingw tool chain
5391 opt_cr=
5392 case $build_os in
5393 mingw*)
5394   opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
5395   ;;
5396 esac
5398 # If we're using GNU nm, then use its standard symbol codes.
5399 case `$NM -V 2>&1` in
5400 *GNU* | *'with BFD'*)
5401   symcode='[[ABCDGIRSTW]]' ;;
5402 esac
5404 # Try without a prefix undercore, then with it.
5405 for ac_symprfx in "" "_"; do
5407   # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
5408   symxfrm="\\1 $ac_symprfx\\2 \\2"
5410   # Write the raw and C identifiers.
5411   lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[      ]]\($symcode$symcode*\)[[       ]][[    ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
5413   # Check to see that the pipe works correctly.
5414   pipe_works=no
5416   rm -f conftest*
5417   cat > conftest.$ac_ext <<EOF
5418 #ifdef __cplusplus
5419 extern "C" {
5420 #endif
5421 char nm_test_var;
5422 void nm_test_func(){}
5423 #ifdef __cplusplus
5425 #endif
5426 int main(){nm_test_var='a';nm_test_func();return(0);}
5429   if AC_TRY_EVAL(ac_compile); then
5430     # Now try to grab the symbols.
5431     nlist=conftest.nm
5432     if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
5433       # Try sorting and uniquifying the output.
5434       if sort "$nlist" | uniq > "$nlist"T; then
5435         mv -f "$nlist"T "$nlist"
5436       else
5437         rm -f "$nlist"T
5438       fi
5440       # Make sure that we snagged all the symbols we need.
5441       if grep ' nm_test_var$' "$nlist" >/dev/null; then
5442         if grep ' nm_test_func$' "$nlist" >/dev/null; then
5443           cat <<EOF > conftest.$ac_ext
5444 #ifdef __cplusplus
5445 extern "C" {
5446 #endif
5449           # Now generate the symbol file.
5450           eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
5452           cat <<EOF >> conftest.$ac_ext
5453 #if defined (__STDC__) && __STDC__
5454 # define lt_ptr_t void *
5455 #else
5456 # define lt_ptr_t char *
5457 # define const
5458 #endif
5460 /* The mapping between symbol names and symbols. */
5461 const struct {
5462   const char *name;
5463   lt_ptr_t address;
5465 lt_preloaded_symbols[[]] =
5468           $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
5469           cat <<\EOF >> conftest.$ac_ext
5470   {0, (lt_ptr_t) 0}
5473 #ifdef __cplusplus
5475 #endif
5477           # Now try linking the two files.
5478           mv conftest.$ac_objext conftstm.$ac_objext
5479           lt_save_LIBS="$LIBS"
5480           lt_save_CFLAGS="$CFLAGS"
5481           LIBS="conftstm.$ac_objext"
5482           CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
5483           if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
5484             pipe_works=yes
5485           fi
5486           LIBS="$lt_save_LIBS"
5487           CFLAGS="$lt_save_CFLAGS"
5488         else
5489           echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
5490         fi
5491       else
5492         echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
5493       fi
5494     else
5495       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
5496     fi
5497   else
5498     echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
5499     cat conftest.$ac_ext >&5
5500   fi
5501   rm -f conftest* conftst*
5503   # Do not use the global_symbol_pipe unless it works.
5504   if test "$pipe_works" = yes; then
5505     break
5506   else
5507     lt_cv_sys_global_symbol_pipe=
5508   fi
5509 done
5511 if test -z "$lt_cv_sys_global_symbol_pipe"; then
5512   lt_cv_sys_global_symbol_to_cdecl=
5514 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
5515   AC_MSG_RESULT(failed)
5516 else
5517   AC_MSG_RESULT(ok)
5519 ]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
5522 # AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
5523 # ---------------------------------------
5524 AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
5525 [_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
5526 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5527 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
5529 AC_MSG_CHECKING([for $compiler option to produce PIC])
5530  ifelse([$1],[CXX],[
5531   # C++ specific cases for pic, static, wl, etc.
5532   if test "$GXX" = yes; then
5533     _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5534     _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5536     case $host_os in
5537     aix*)
5538       # All AIX code is PIC.
5539       if test "$host_cpu" = ia64; then
5540         # AIX 5 now supports IA64 processor
5541         _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5542       fi
5543       ;;
5544     amigaos*)
5545       # FIXME: we need at least 68020 code to build shared libraries, but
5546       # adding the `-m68020' flag to GCC prevents building anything better,
5547       # like `-m68040'.
5548       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
5549       ;;
5550     beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5551       # PIC is the default for these OSes.
5552       ;;
5553     mingw* | os2* | pw32*)
5554       # This hack is so that the source file can tell whether it is being
5555       # built for inclusion in a dll (and should export symbols for example).
5556       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
5557       ;;
5558     darwin* | rhapsody*)
5559       # PIC is the default on this platform
5560       # Common symbols not allowed in MH_DYLIB files
5561       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5562       ;;
5563     *djgpp*)
5564       # DJGPP does not support shared libraries at all
5565       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5566       ;;
5567     sysv4*MP*)
5568       if test -d /usr/nec; then
5569         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
5570       fi
5571       ;;
5572     hpux*)
5573       # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5574       # not for PA HP-UX.
5575       case $host_cpu in
5576       hppa*64*|ia64*)
5577         ;;
5578       *)
5579         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5580         ;;
5581       esac
5582       ;;
5583     *)
5584       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5585       ;;
5586     esac
5587   else
5588     case $host_os in
5589       aix4* | aix5*)
5590         # All AIX code is PIC.
5591         if test "$host_cpu" = ia64; then
5592           # AIX 5 now supports IA64 processor
5593           _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5594         else
5595           _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5596         fi
5597         ;;
5598       chorus*)
5599         case $cc_basename in
5600         cxch68*)
5601           # Green Hills C++ Compiler
5602           # _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"
5603           ;;
5604         esac
5605         ;;
5606        darwin*)
5607          # PIC is the default on this platform
5608          # Common symbols not allowed in MH_DYLIB files
5609          case $cc_basename in
5610            xlc*)
5611            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
5612            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5613            ;;
5614          esac
5615        ;;
5616       dgux*)
5617         case $cc_basename in
5618           ec++*)
5619             _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5620             ;;
5621           ghcx*)
5622             # Green Hills C++ Compiler
5623             _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5624             ;;
5625           *)
5626             ;;
5627         esac
5628         ;;
5629       freebsd* | kfreebsd*-gnu | dragonfly*)
5630         # FreeBSD uses GNU C++
5631         ;;
5632       hpux9* | hpux10* | hpux11*)
5633         case $cc_basename in
5634           CC*)
5635             _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5636             _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
5637             if test "$host_cpu" != ia64; then
5638               _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5639             fi
5640             ;;
5641           aCC*)
5642             _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5643             _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
5644             case $host_cpu in
5645             hppa*64*|ia64*)
5646               # +Z the default
5647               ;;
5648             *)
5649               _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5650               ;;
5651             esac
5652             ;;
5653           *)
5654             ;;
5655         esac
5656         ;;
5657       irix5* | irix6* | nonstopux*)
5658         case $cc_basename in
5659           CC*)
5660             _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5661             _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5662             # CC pic flag -KPIC is the default.
5663             ;;
5664           *)
5665             ;;
5666         esac
5667         ;;
5668       linux*)
5669         case $cc_basename in
5670           KCC*)
5671             # KAI C++ Compiler
5672             _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
5673             _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5674             ;;
5675           icpc* | ecpc*)
5676             # Intel C++
5677             _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5678             _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5679             _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5680             ;;
5681           pgCC*)
5682             # Portland Group C++ compiler.
5683             _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5684             _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5685             _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5686             ;;
5687           cxx*)
5688             # Compaq C++
5689             # Make sure the PIC flag is empty.  It appears that all Alpha
5690             # Linux and Compaq Tru64 Unix objects are PIC.
5691             _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5692             _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5693             ;;
5694           *)
5695             ;;
5696         esac
5697         ;;
5698       lynxos*)
5699         ;;
5700       m88k*)
5701         ;;
5702       mvs*)
5703         case $cc_basename in
5704           cxx*)
5705             _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
5706             ;;
5707           *)
5708             ;;
5709         esac
5710         ;;
5711       netbsd*)
5712         ;;
5713       osf3* | osf4* | osf5*)
5714         case $cc_basename in
5715           KCC*)
5716             _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
5717             ;;
5718           RCC*)
5719             # Rational C++ 2.4.1
5720             _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5721             ;;
5722           cxx*)
5723             # Digital/Compaq C++
5724             _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5725             # Make sure the PIC flag is empty.  It appears that all Alpha
5726             # Linux and Compaq Tru64 Unix objects are PIC.
5727             _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5728             _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5729             ;;
5730           *)
5731             ;;
5732         esac
5733         ;;
5734       psos*)
5735         ;;
5736       sco*)
5737         case $cc_basename in
5738           CC*)
5739             _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5740             ;;
5741           *)
5742             ;;
5743         esac
5744         ;;
5745       solaris*)
5746         case $cc_basename in
5747           CC*)
5748             # Sun C++ 4.2, 5.x and Centerline C++
5749             _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5750             _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5751             _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5752             ;;
5753           gcx*)
5754             # Green Hills C++ Compiler
5755             _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5756             ;;
5757           *)
5758             ;;
5759         esac
5760         ;;
5761       sunos4*)
5762         case $cc_basename in
5763           CC*)
5764             # Sun C++ 4.x
5765             _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5766             _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5767             ;;
5768           lcc*)
5769             # Lucid
5770             _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5771             ;;
5772           *)
5773             ;;
5774         esac
5775         ;;
5776       tandem*)
5777         case $cc_basename in
5778           NCC*)
5779             # NonStop-UX NCC 3.20
5780             _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5781             ;;
5782           *)
5783             ;;
5784         esac
5785         ;;
5786       unixware*)
5787         ;;
5788       vxworks*)
5789         ;;
5790       *)
5791         _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5792         ;;
5793     esac
5794   fi
5797   if test "$GCC" = yes; then
5798     _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5799     _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5801     case $host_os in
5802       aix*)
5803       # All AIX code is PIC.
5804       if test "$host_cpu" = ia64; then
5805         # AIX 5 now supports IA64 processor
5806         _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5807       fi
5808       ;;
5810     amigaos*)
5811       # FIXME: we need at least 68020 code to build shared libraries, but
5812       # adding the `-m68020' flag to GCC prevents building anything better,
5813       # like `-m68040'.
5814       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
5815       ;;
5817     beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5818       # PIC is the default for these OSes.
5819       ;;
5821     mingw* | pw32* | os2*)
5822       # This hack is so that the source file can tell whether it is being
5823       # built for inclusion in a dll (and should export symbols for example).
5824       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
5825       ;;
5827     darwin* | rhapsody*)
5828       # PIC is the default on this platform
5829       # Common symbols not allowed in MH_DYLIB files
5830       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5831       ;;
5833     msdosdjgpp*)
5834       # Just because we use GCC doesn't mean we suddenly get shared libraries
5835       # on systems that don't support them.
5836       _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5837       enable_shared=no
5838       ;;
5840     sysv4*MP*)
5841       if test -d /usr/nec; then
5842         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
5843       fi
5844       ;;
5846     hpux*)
5847       # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5848       # not for PA HP-UX.
5849       case $host_cpu in
5850       hppa*64*|ia64*)
5851         # +Z the default
5852         ;;
5853       *)
5854         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5855         ;;
5856       esac
5857       ;;
5859     *)
5860       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5861       ;;
5862     esac
5863   else
5864     # PORTME Check for flag to pass linker flags through the system compiler.
5865     case $host_os in
5866     aix*)
5867       _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5868       if test "$host_cpu" = ia64; then
5869         # AIX 5 now supports IA64 processor
5870         _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5871       else
5872         _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5873       fi
5874       ;;
5875       darwin*)
5876         # PIC is the default on this platform
5877         # Common symbols not allowed in MH_DYLIB files
5878        case $cc_basename in
5879          xlc*)
5880          _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
5881          _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5882          ;;
5883        esac
5884        ;;
5886     mingw* | pw32* | os2*)
5887       # This hack is so that the source file can tell whether it is being
5888       # built for inclusion in a dll (and should export symbols for example).
5889       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
5890       ;;
5892     hpux9* | hpux10* | hpux11*)
5893       _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5894       # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5895       # not for PA HP-UX.
5896       case $host_cpu in
5897       hppa*64*|ia64*)
5898         # +Z the default
5899         ;;
5900       *)
5901         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5902         ;;
5903       esac
5904       # Is there a better lt_prog_compiler_static that works with the bundled CC?
5905       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5906       ;;
5908     irix5* | irix6* | nonstopux*)
5909       _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5910       # PIC (with -KPIC) is the default.
5911       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5912       ;;
5914     newsos6)
5915       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5916       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5917       ;;
5919     linux*)
5920       case $cc_basename in
5921       icc* | ecc*)
5922         _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5923         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5924         _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5925         ;;
5926       pgcc* | pgf77* | pgf90* | pgf95*)
5927         # Portland Group compilers (*not* the Pentium gcc compiler,
5928         # which looks to be a dead project)
5929         _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5930         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5931         _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5932         ;;
5933       ccc*)
5934         _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5935         # All Alpha code is PIC.
5936         _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5937         ;;
5938       esac
5939       ;;
5941     osf3* | osf4* | osf5*)
5942       _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5943       # All OSF/1 code is PIC.
5944       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5945       ;;
5947     sco3.2v5*)
5948       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kpic'
5949       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-dn'
5950       ;;
5952     solaris*)
5953       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5954       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5955       case $cc_basename in
5956       f77* | f90* | f95*)
5957         _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
5958       *)
5959         _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
5960       esac
5961       ;;
5963     sunos4*)
5964       _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5965       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5966       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5967       ;;
5969     sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5970       _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5971       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5972       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5973       ;;
5975     sysv4*MP*)
5976       if test -d /usr/nec ;then
5977         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
5978         _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5979       fi
5980       ;;
5982     unicos*)
5983       _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5984       _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5985       ;;
5987     uts4*)
5988       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5989       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5990       ;;
5992     *)
5993       _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5994       ;;
5995     esac
5996   fi
5998 AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
6001 # Check to make sure the PIC flag actually works.
6003 if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
6004   AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
6005     _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
6006     [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
6007     [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
6008      "" | " "*) ;;
6009      *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
6010      esac],
6011     [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
6012      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
6014 case $host_os in
6015   # For platforms which do not support PIC, -DPIC is meaningless:
6016   *djgpp*)
6017     _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
6018     ;;
6019   *)
6020     _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
6021     ;;
6022 esac
6026 # AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
6027 # ------------------------------------
6028 # See if the linker supports building shared libraries.
6029 AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
6030 [AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
6031 ifelse([$1],[CXX],[
6032   _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
6033   case $host_os in
6034   aix4* | aix5*)
6035     # If we're using GNU nm, then we don't want the "-C" option.
6036     # -C means demangle to AIX nm, but means don't demangle with GNU nm
6037     if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
6038       _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'
6039     else
6040       _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'
6041     fi
6042     ;;
6043   pw32*)
6044     _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
6045   ;;
6046   cygwin* | mingw*)
6047     _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'
6048   ;;
6049   *)
6050     _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
6051   ;;
6052   esac
6054   runpath_var=
6055   _LT_AC_TAGVAR(allow_undefined_flag, $1)=
6056   _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
6057   _LT_AC_TAGVAR(archive_cmds, $1)=
6058   _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
6059   _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
6060   _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
6061   _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
6062   _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
6063   _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
6064   _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
6065   _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
6066   _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
6067   _LT_AC_TAGVAR(hardcode_direct, $1)=no
6068   _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
6069   _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
6070   _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
6071   _LT_AC_TAGVAR(hardcode_automatic, $1)=no
6072   _LT_AC_TAGVAR(module_cmds, $1)=
6073   _LT_AC_TAGVAR(module_expsym_cmds, $1)=
6074   _LT_AC_TAGVAR(always_export_symbols, $1)=no
6075   _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
6076   # include_expsyms should be a list of space-separated symbols to be *always*
6077   # included in the symbol list
6078   _LT_AC_TAGVAR(include_expsyms, $1)=
6079   # exclude_expsyms can be an extended regexp of symbols to exclude
6080   # it will be wrapped by ` (' and `)$', so one must not match beginning or
6081   # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
6082   # as well as any symbol that contains `d'.
6083   _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
6084   # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
6085   # platforms (ab)use it in PIC code, but their linkers get confused if
6086   # the symbol is explicitly referenced.  Since portable code cannot
6087   # rely on this symbol name, it's probably fine to never include it in
6088   # preloaded symbol tables.
6089   extract_expsyms_cmds=
6090   # Just being paranoid about ensuring that cc_basename is set.
6091   _LT_CC_BASENAME([$compiler])
6092   case $host_os in
6093   cygwin* | mingw* | pw32*)
6094     # FIXME: the MSVC++ port hasn't been tested in a loooong time
6095     # When not using gcc, we currently assume that we are using
6096     # Microsoft Visual C++.
6097     if test "$GCC" != yes; then
6098       with_gnu_ld=no
6099     fi
6100     ;;
6101   openbsd*)
6102     with_gnu_ld=no
6103     ;;
6104   esac
6106   _LT_AC_TAGVAR(ld_shlibs, $1)=yes
6107   if test "$with_gnu_ld" = yes; then
6108     # If archive_cmds runs LD, not CC, wlarc should be empty
6109     wlarc='${wl}'
6111     # Set some defaults for GNU ld with shared library support. These
6112     # are reset later if shared libraries are not supported. Putting them
6113     # here allows them to be overridden if necessary.
6114     runpath_var=LD_RUN_PATH
6115     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
6116     _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6117     # ancient GNU ld didn't support --whole-archive et. al.
6118     if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
6119         _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
6120       else
6121         _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
6122     fi
6123     supports_anon_versioning=no
6124     case `$LD -v 2>/dev/null` in
6125       *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
6126       *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
6127       *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
6128       *\ 2.11.*) ;; # other 2.11 versions
6129       *) supports_anon_versioning=yes ;;
6130     esac
6132     # See if GNU ld supports shared libraries.
6133     case $host_os in
6134     aix3* | aix4* | aix5*)
6135       # On AIX/PPC, the GNU linker is very broken
6136       if test "$host_cpu" != ia64; then
6137         _LT_AC_TAGVAR(ld_shlibs, $1)=no
6138         cat <<EOF 1>&2
6140 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
6141 *** to be unable to reliably create shared libraries on AIX.
6142 *** Therefore, libtool is disabling shared libraries support.  If you
6143 *** really care for shared libraries, you may want to modify your PATH
6144 *** so that a non-GNU linker is found, and then restart.
6147       fi
6148       ;;
6150     amigaos*)
6151       _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)'
6152       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6153       _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6155       # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
6156       # that the semantics of dynamic libraries on AmigaOS, at least up
6157       # to version 4, is to share data among multiple programs linked
6158       # with the same dynamic library.  Since this doesn't match the
6159       # behavior of shared libraries on other platforms, we can't use
6160       # them.
6161       _LT_AC_TAGVAR(ld_shlibs, $1)=no
6162       ;;
6164     beos*)
6165       if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
6166         _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6167         # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
6168         # support --undefined.  This deserves some investigation.  FIXME
6169         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6170       else
6171         _LT_AC_TAGVAR(ld_shlibs, $1)=no
6172       fi
6173       ;;
6175     cygwin* | mingw* | pw32*)
6176       # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
6177       # as there is no search path for DLLs.
6178       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6179       _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6180       _LT_AC_TAGVAR(always_export_symbols, $1)=no
6181       _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6182       _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
6184       if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
6185         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
6186         # If the export-symbols file already is a .def file (1st line
6187         # is EXPORTS), use it as is; otherwise, prepend...
6188         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6189           cp $export_symbols $output_objdir/$soname.def;
6190         else
6191           echo EXPORTS > $output_objdir/$soname.def;
6192           cat $export_symbols >> $output_objdir/$soname.def;
6193         fi~
6194         $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000  ${wl}--out-implib,$lib'
6195       else
6196         _LT_AC_TAGVAR(ld_shlibs, $1)=no
6197       fi
6198       ;;
6200     linux*)
6201       if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
6202         tmp_addflag=
6203         case $cc_basename,$host_cpu in
6204         pgcc*)                          # Portland Group C compiler
6205           _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'
6206           tmp_addflag=' $pic_flag'
6207           ;;
6208         pgf77* | pgf90* | pgf95*)       # Portland Group f77 and f90 compilers
6209           _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'
6210           tmp_addflag=' $pic_flag -Mnomain' ;;
6211         ecc*,ia64* | icc*,ia64*)                # Intel C compiler on ia64
6212           tmp_addflag=' -i_dynamic' ;;
6213         efc*,ia64* | ifort*,ia64*)      # Intel Fortran compiler on ia64
6214           tmp_addflag=' -i_dynamic -nofor_main' ;;
6215         ifc* | ifort*)                  # Intel Fortran compiler
6216           tmp_addflag=' -nofor_main' ;;
6217         esac
6218         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6220         if test $supports_anon_versioning = yes; then
6221           _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~
6222   cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
6223   $echo "local: *; };" >> $output_objdir/$libname.ver~
6224           $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
6225         fi
6226       else
6227         _LT_AC_TAGVAR(ld_shlibs, $1)=no
6228       fi
6229       ;;
6231     netbsd*)
6232       if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6233         _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
6234         wlarc=
6235       else
6236         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6237         _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'
6238       fi
6239       ;;
6241     solaris* | sysv5*)
6242       if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
6243         _LT_AC_TAGVAR(ld_shlibs, $1)=no
6244         cat <<EOF 1>&2
6246 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
6247 *** create shared libraries on Solaris systems.  Therefore, libtool
6248 *** is disabling shared libraries support.  We urge you to upgrade GNU
6249 *** binutils to release 2.9.1 or newer.  Another option is to modify
6250 *** your PATH or compiler configuration so that the native linker is
6251 *** used, and then restart.
6254       elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
6255         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6256         _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'
6257       else
6258         _LT_AC_TAGVAR(ld_shlibs, $1)=no
6259       fi
6260       ;;
6262     sunos4*)
6263       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6264       wlarc=
6265       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6266       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6267       ;;
6269     *)
6270       if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
6271         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6272         _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'
6273       else
6274         _LT_AC_TAGVAR(ld_shlibs, $1)=no
6275       fi
6276       ;;
6277     esac
6279     if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then
6280       runpath_var=
6281       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
6282       _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
6283       _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
6284     fi
6285   else
6286     # PORTME fill in a description of your system's linker (not GNU ld)
6287     case $host_os in
6288     aix3*)
6289       _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6290       _LT_AC_TAGVAR(always_export_symbols, $1)=yes
6291       _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'
6292       # Note: this linker hardcodes the directories in LIBPATH if there
6293       # are no directories specified by -L.
6294       _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6295       if test "$GCC" = yes && test -z "$link_static_flag"; then
6296         # Neither direct hardcoding nor static linking is supported with a
6297         # broken collect2.
6298         _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
6299       fi
6300       ;;
6302     aix4* | aix5*)
6303       if test "$host_cpu" = ia64; then
6304         # On IA64, the linker does run time linking by default, so we don't
6305         # have to do anything special.
6306         aix_use_runtimelinking=no
6307         exp_sym_flag='-Bexport'
6308         no_entry_flag=""
6309       else
6310         # If we're using GNU nm, then we don't want the "-C" option.
6311         # -C means demangle to AIX nm, but means don't demangle with GNU nm
6312         if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
6313           _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'
6314         else
6315           _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'
6316         fi
6317         aix_use_runtimelinking=no
6319         # Test if we are trying to use run time linking or normal
6320         # AIX style linking. If -brtl is somewhere in LDFLAGS, we
6321         # need to do runtime linking.
6322         case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
6323           for ld_flag in $LDFLAGS; do
6324           if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
6325             aix_use_runtimelinking=yes
6326             break
6327           fi
6328           done
6329         esac
6331         exp_sym_flag='-bexport'
6332         no_entry_flag='-bnoentry'
6333       fi
6335       # When large executables or shared objects are built, AIX ld can
6336       # have problems creating the table of contents.  If linking a library
6337       # or program results in "error TOC overflow" add -mminimal-toc to
6338       # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
6339       # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
6341       _LT_AC_TAGVAR(archive_cmds, $1)=''
6342       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6343       _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
6344       _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6346       if test "$GCC" = yes; then
6347         case $host_os in aix4.[[012]]|aix4.[[012]].*)
6348         # We only want to do this on AIX 4.2 and lower, the check
6349         # below for broken collect2 doesn't work under 4.3+
6350           collect2name=`${CC} -print-prog-name=collect2`
6351           if test -f "$collect2name" && \
6352            strings "$collect2name" | grep resolve_lib_name >/dev/null
6353           then
6354           # We have reworked collect2
6355           _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6356           else
6357           # We have old collect2
6358           _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
6359           # It fails to find uninstalled libraries when the uninstalled
6360           # path is not listed in the libpath.  Setting hardcode_minus_L
6361           # to unsupported forces relinking
6362           _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6363           _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6364           _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
6365           fi
6366         esac
6367         shared_flag='-shared'
6368         if test "$aix_use_runtimelinking" = yes; then
6369           shared_flag="$shared_flag "'${wl}-G'
6370         fi
6371       else
6372         # not using gcc
6373         if test "$host_cpu" = ia64; then
6374         # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
6375         # chokes on -Wl,-G. The following line is correct:
6376           shared_flag='-G'
6377         else
6378         if test "$aix_use_runtimelinking" = yes; then
6379             shared_flag='${wl}-G'
6380           else
6381             shared_flag='${wl}-bM:SRE'
6382         fi
6383         fi
6384       fi
6386       # It seems that -bexpall does not export symbols beginning with
6387       # underscore (_), so it is better to generate a list of symbols to export.
6388       _LT_AC_TAGVAR(always_export_symbols, $1)=yes
6389       if test "$aix_use_runtimelinking" = yes; then
6390         # Warning - without using the other runtime loading flags (-brtl),
6391         # -berok will link without error, but may produce a broken library.
6392         _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
6393        # Determine the default libpath from the value encoded in an empty executable.
6394        _LT_AC_SYS_LIBPATH_AIX
6395        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6396         _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
6397        else
6398         if test "$host_cpu" = ia64; then
6399           _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
6400           _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
6401           _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
6402         else
6403          # Determine the default libpath from the value encoded in an empty executable.
6404          _LT_AC_SYS_LIBPATH_AIX
6405          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6406           # Warning - without using the other run time loading flags,
6407           # -berok will link without error, but may produce a broken library.
6408           _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
6409           _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
6410           # -bexpall does not export symbols beginning with underscore (_)
6411           _LT_AC_TAGVAR(always_export_symbols, $1)=yes
6412           # Exported symbols can be pulled into shared objects from archives
6413           _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
6414           _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
6415           # This is similar to how AIX traditionally builds its shared libraries.
6416           _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
6417         fi
6418       fi
6419       ;;
6421     amigaos*)
6422       _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)'
6423       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6424       _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6425       # see comment about different semantics on the GNU ld section
6426       _LT_AC_TAGVAR(ld_shlibs, $1)=no
6427       ;;
6429     bsdi[[45]]*)
6430       _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
6431       ;;
6433     cygwin* | mingw* | pw32*)
6434       # When not using gcc, we currently assume that we are using
6435       # Microsoft Visual C++.
6436       # hardcode_libdir_flag_spec is actually meaningless, as there is
6437       # no search path for DLLs.
6438       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
6439       _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6440       # Tell ltmain to make .lib files, not .a files.
6441       libext=lib
6442       # Tell ltmain to make .dll files, not .so files.
6443       shrext_cmds=".dll"
6444       # FIXME: Setting linknames here is a bad hack.
6445       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
6446       # The linker will automatically build a .lib file if we build a DLL.
6447       _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
6448       # FIXME: Should let the user specify the lib program.
6449       _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
6450       _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
6451       _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6452       ;;
6454     darwin* | rhapsody*)
6455       case $host_os in
6456         rhapsody* | darwin1.[[012]])
6457          _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
6458          ;;
6459        *) # Darwin 1.3 on
6460          if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
6461            _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
6462          else
6463            case ${MACOSX_DEPLOYMENT_TARGET} in
6464              10.[[012]])
6465                _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
6466                ;;
6467              10.*)
6468                _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
6469                ;;
6470            esac
6471          fi
6472          ;;
6473       esac
6474       _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6475       _LT_AC_TAGVAR(hardcode_direct, $1)=no
6476       _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
6477       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
6478       _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
6479       _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6480     if test "$GCC" = yes ; then
6481         output_verbose_link_cmd='echo'
6482         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
6483       _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
6484       # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
6485       _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
6486       _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}'
6487     else
6488       case $cc_basename in
6489         xlc*)
6490          output_verbose_link_cmd='echo'
6491          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
6492          _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
6493           # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
6494          _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
6495           _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}'
6496           ;;
6497        *)
6498          _LT_AC_TAGVAR(ld_shlibs, $1)=no
6499           ;;
6500       esac
6501     fi
6502       ;;
6504     dgux*)
6505       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6506       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6507       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6508       ;;
6510     freebsd1*)
6511       _LT_AC_TAGVAR(ld_shlibs, $1)=no
6512       ;;
6514     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
6515     # support.  Future versions do this automatically, but an explicit c++rt0.o
6516     # does not break anything, and helps significantly (at the cost of a little
6517     # extra space).
6518     freebsd2.2*)
6519       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
6520       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6521       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6522       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6523       ;;
6525     # Unfortunately, older versions of FreeBSD 2 do not have this feature.
6526     freebsd2*)
6527       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6528       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6529       _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6530       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6531       ;;
6533     # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
6534     freebsd* | kfreebsd*-gnu | dragonfly*)
6535       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
6536       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6537       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6538       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6539       ;;
6541     hpux9*)
6542       if test "$GCC" = yes; then
6543         _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'
6544       else
6545         _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'
6546       fi
6547       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6548       _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6549       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6551       # hardcode_minus_L: Not really in the search PATH,
6552       # but as the default location of the library.
6553       _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6554       _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6555       ;;
6557     hpux10* | hpux11*)
6558       if test "$GCC" = yes -a "$with_gnu_ld" = no; then
6559         case $host_cpu in
6560         hppa*64*|ia64*)
6561           _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6562           ;;
6563         *)
6564           _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6565           ;;
6566         esac
6567       else
6568         case $host_cpu in
6569         hppa*64*|ia64*)
6570           _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
6571           ;;
6572         *)
6573           _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
6574           ;;
6575         esac
6576       fi
6577       if test "$with_gnu_ld" = no; then
6578         case $host_cpu in
6579         hppa*64*)
6580           _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6581           _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
6582           _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6583           _LT_AC_TAGVAR(hardcode_direct, $1)=no
6584           _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6585           ;;
6586         ia64*)
6587           _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6588           _LT_AC_TAGVAR(hardcode_direct, $1)=no
6589           _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6591           # hardcode_minus_L: Not really in the search PATH,
6592           # but as the default location of the library.
6593           _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6594           ;;
6595         *)
6596           _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6597           _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6598           _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6599           _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6601           # hardcode_minus_L: Not really in the search PATH,
6602           # but as the default location of the library.
6603           _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6604           ;;
6605         esac
6606       fi
6607       ;;
6609     irix5* | irix6* | nonstopux*)
6610       if test "$GCC" = yes; then
6611         _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'
6612       else
6613         _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'
6614         _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
6615       fi
6616       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6617       _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6618       _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6619       ;;
6621     netbsd*)
6622       if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6623         _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
6624       else
6625         _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
6626       fi
6627       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6628       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6629       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6630       ;;
6632     newsos6)
6633       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6634       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6635       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6636       _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6637       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6638       ;;
6640     openbsd*)
6641       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6642       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6643       if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6644         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6645         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
6646         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6647         _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6648       else
6649        case $host_os in
6650          openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
6651            _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6652            _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6653            ;;
6654          *)
6655            _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6656            _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6657            ;;
6658        esac
6659       fi
6660       ;;
6662     os2*)
6663       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6664       _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6665       _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6666       _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'
6667       _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
6668       ;;
6670     osf3*)
6671       if test "$GCC" = yes; then
6672         _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6673         _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'
6674       else
6675         _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6676         _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'
6677       fi
6678       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6679       _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6680       ;;
6682     osf4* | osf5*)      # as osf3* with the addition of -msym flag
6683       if test "$GCC" = yes; then
6684         _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6685         _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'
6686         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6687       else
6688         _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6689         _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'
6690         _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~
6691         $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'
6693         # Both c and cxx compiler support -rpath directly
6694         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6695       fi
6696       _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6697       ;;
6699     sco3.2v5*)
6700       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6701       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6702       _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
6703       runpath_var=LD_RUN_PATH
6704       hardcode_runpath_var=yes
6705       ;;
6707     solaris*)
6708       _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
6709       if test "$GCC" = yes; then
6710         wlarc='${wl}'
6711         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6712         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6713           $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
6714       else
6715         wlarc=''
6716         _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6717         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6718         $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6719       fi
6720       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6721       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6722       case $host_os in
6723       solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6724       *)
6725         # The compiler driver will combine linker options so we
6726         # cannot just pass the convience library names through
6727         # without $wl, iff we do not link with $LD.
6728         # Luckily, gcc supports the same syntax we need for Sun Studio.
6729         # Supported since Solaris 2.6 (maybe 2.5.1?)
6730         case $wlarc in
6731         '')
6732           _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
6733         *)
6734           _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;;
6735         esac ;;
6736       esac
6737       _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6738       ;;
6740     sunos4*)
6741       if test "x$host_vendor" = xsequent; then
6742         # Use $CC to link under sequent, because it throws in some extra .o
6743         # files that make .init and .fini sections work.
6744         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
6745       else
6746         _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
6747       fi
6748       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6749       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6750       _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6751       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6752       ;;
6754     sysv4)
6755       case $host_vendor in
6756         sni)
6757           _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6758           _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
6759         ;;
6760         siemens)
6761           ## LD is ld it makes a PLAMLIB
6762           ## CC just makes a GrossModule.
6763           _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6764           _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
6765           _LT_AC_TAGVAR(hardcode_direct, $1)=no
6766         ;;
6767         motorola)
6768           _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6769           _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
6770         ;;
6771       esac
6772       runpath_var='LD_RUN_PATH'
6773       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6774       ;;
6776     sysv4.3*)
6777       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6778       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6779       _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
6780       ;;
6782     sysv4*MP*)
6783       if test -d /usr/nec; then
6784         _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6785         _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6786         runpath_var=LD_RUN_PATH
6787         hardcode_runpath_var=yes
6788         _LT_AC_TAGVAR(ld_shlibs, $1)=yes
6789       fi
6790       ;;
6792     sysv4.2uw2*)
6793       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6794       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6795       _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
6796       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6797       hardcode_runpath_var=yes
6798       runpath_var=LD_RUN_PATH
6799       ;;
6801    sysv5OpenUNIX8* | sysv5UnixWare7* |  sysv5uw[[78]]* | unixware7*)
6802       _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text'
6803       if test "$GCC" = yes; then
6804         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6805       else
6806         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6807       fi
6808       runpath_var='LD_RUN_PATH'
6809       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6810       ;;
6812     sysv5*)
6813       _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
6814       # $CC -shared without GNU ld will not create a library from C++
6815       # object files and a static libstdc++, better avoid it by now
6816       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6817       _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6818                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6819       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
6820       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6821       runpath_var='LD_RUN_PATH'
6822       ;;
6824     uts4*)
6825       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6826       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6827       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6828       ;;
6830     *)
6831       _LT_AC_TAGVAR(ld_shlibs, $1)=no
6832       ;;
6833     esac
6834   fi
6836 AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
6837 test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
6839 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
6840 if test "$GCC" = yes; then
6841   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
6845 # Do we need to explicitly link libc?
6847 case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
6848 x|xyes)
6849   # Assume -lc should be added
6850   _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
6852   if test "$enable_shared" = yes && test "$GCC" = yes; then
6853     case $_LT_AC_TAGVAR(archive_cmds, $1) in
6854     *'~'*)
6855       # FIXME: we may have to deal with multi-command sequences.
6856       ;;
6857     '$CC '*)
6858       # Test whether the compiler implicitly links with -lc since on some
6859       # systems, -lgcc has to come before -lc. If gcc already passes -lc
6860       # to ld, don't add -lc before -lgcc.
6861       AC_MSG_CHECKING([whether -lc should be explicitly linked in])
6862       $rm conftest*
6863       printf "$lt_simple_compile_test_code" > conftest.$ac_ext
6865       if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
6866         soname=conftest
6867         lib=conftest
6868         libobjs=conftest.$ac_objext
6869         deplibs=
6870         wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
6871         compiler_flags=-v
6872         linker_flags=-v
6873         verstring=
6874         output_objdir=.
6875         libname=conftest
6876         lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
6877         _LT_AC_TAGVAR(allow_undefined_flag, $1)=
6878         if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
6879         then
6880           _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6881         else
6882           _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
6883         fi
6884         _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
6885       else
6886         cat conftest.err 1>&5
6887       fi
6888       $rm conftest*
6889       AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
6890       ;;
6891     esac
6892   fi
6893   ;;
6894 esac
6895 ])# AC_LIBTOOL_PROG_LD_SHLIBS
6898 # _LT_AC_FILE_LTDLL_C
6899 # -------------------
6900 # Be careful that the start marker always follows a newline.
6901 AC_DEFUN([_LT_AC_FILE_LTDLL_C], [
6902 # /* ltdll.c starts here */
6903 # #define WIN32_LEAN_AND_MEAN
6904 # #include <windows.h>
6905 # #undef WIN32_LEAN_AND_MEAN
6906 # #include <stdio.h>
6908 # #ifndef __CYGWIN__
6909 # #  ifdef __CYGWIN32__
6910 # #    define __CYGWIN__ __CYGWIN32__
6911 # #  endif
6912 # #endif
6914 # #ifdef __cplusplus
6915 # extern "C" {
6916 # #endif
6917 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
6918 # #ifdef __cplusplus
6919 # }
6920 # #endif
6922 # #ifdef __CYGWIN__
6923 # #include <cygwin/cygwin_dll.h>
6924 # DECLARE_CYGWIN_DLL( DllMain );
6925 # #endif
6926 # HINSTANCE __hDllInstance_base;
6928 # BOOL APIENTRY
6929 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
6930 # {
6931 #   __hDllInstance_base = hInst;
6932 #   return TRUE;
6933 # }
6934 # /* ltdll.c ends here */
6935 ])# _LT_AC_FILE_LTDLL_C
6938 # _LT_AC_TAGVAR(VARNAME, [TAGNAME])
6939 # ---------------------------------
6940 AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
6943 # old names
6944 AC_DEFUN([AM_PROG_LIBTOOL],   [AC_PROG_LIBTOOL])
6945 AC_DEFUN([AM_ENABLE_SHARED],  [AC_ENABLE_SHARED($@)])
6946 AC_DEFUN([AM_ENABLE_STATIC],  [AC_ENABLE_STATIC($@)])
6947 AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
6948 AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
6949 AC_DEFUN([AM_PROG_LD],        [AC_PROG_LD])
6950 AC_DEFUN([AM_PROG_NM],        [AC_PROG_NM])
6952 # This is just to silence aclocal about the macro not being used
6953 ifelse([AC_DISABLE_FAST_INSTALL])
6955 AC_DEFUN([LT_AC_PROG_GCJ],
6956 [AC_CHECK_TOOL(GCJ, gcj, no)
6957   test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
6958   AC_SUBST(GCJFLAGS)
6961 AC_DEFUN([LT_AC_PROG_RC],
6962 [AC_CHECK_TOOL(RC, windres, no)
6965 # NOTE: This macro has been submitted for inclusion into   #
6966 #  GNU Autoconf as AC_PROG_SED.  When it is available in   #
6967 #  a released version of Autoconf we should remove this    #
6968 #  macro and use it instead.                               #
6969 # LT_AC_PROG_SED
6970 # --------------
6971 # Check for a fully-functional sed program, that truncates
6972 # as few characters as possible.  Prefer GNU sed if found.
6973 AC_DEFUN([LT_AC_PROG_SED],
6974 [AC_MSG_CHECKING([for a sed that does not truncate output])
6975 AC_CACHE_VAL(lt_cv_path_SED,
6976 [# Loop through the user's path and test for sed and gsed.
6977 # Then use that list of sed's as ones to test for truncation.
6978 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6979 for as_dir in $PATH
6981   IFS=$as_save_IFS
6982   test -z "$as_dir" && as_dir=.
6983   for lt_ac_prog in sed gsed; do
6984     for ac_exec_ext in '' $ac_executable_extensions; do
6985       if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
6986         lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
6987       fi
6988     done
6989   done
6990 done
6991 lt_ac_max=0
6992 lt_ac_count=0
6993 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
6994 # along with /bin/sed that truncates output.
6995 for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
6996   test ! -f $lt_ac_sed && continue
6997   cat /dev/null > conftest.in
6998   lt_ac_count=0
6999   echo $ECHO_N "0123456789$ECHO_C" >conftest.in
7000   # Check for GNU sed and select it if it is found.
7001   if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
7002     lt_cv_path_SED=$lt_ac_sed
7003     break
7004   fi
7005   while true; do
7006     cat conftest.in conftest.in >conftest.tmp
7007     mv conftest.tmp conftest.in
7008     cp conftest.in conftest.nl
7009     echo >>conftest.nl
7010     $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
7011     cmp -s conftest.out conftest.nl || break
7012     # 10000 chars as input seems more than enough
7013     test $lt_ac_count -gt 10 && break
7014     lt_ac_count=`expr $lt_ac_count + 1`
7015     if test $lt_ac_count -gt $lt_ac_max; then
7016       lt_ac_max=$lt_ac_count
7017       lt_cv_path_SED=$lt_ac_sed
7018     fi
7019   done
7020 done
7022 SED=$lt_cv_path_SED
7023 AC_MSG_RESULT([$SED])
7027 dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
7028 # serial 40 IT_PROG_INTLTOOL
7029 AC_DEFUN([IT_PROG_INTLTOOL], [
7030 AC_PREREQ([2.50])dnl
7031 AC_REQUIRE([AM_NLS])dnl
7033 case "$am__api_version" in
7034     1.[01234])
7035         AC_MSG_ERROR([Automake 1.5 or newer is required to use intltool])
7036     ;;
7037     *)
7038     ;;
7039 esac
7041 if test -n "$1"; then
7042     AC_MSG_CHECKING([for intltool >= $1])
7044     INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
7045     INTLTOOL_APPLIED_VERSION=`intltool-update --version | head -1 | cut -d" " -f3`
7046     [INTLTOOL_APPLIED_VERSION_AS_INT=`echo $INTLTOOL_APPLIED_VERSION | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
7047     ]
7048     AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found])
7049     test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
7050         AC_MSG_ERROR([Your intltool is too old.  You need intltool $1 or later.])
7053 AC_PATH_PROG(INTLTOOL_UPDATE, [intltool-update])
7054 AC_PATH_PROG(INTLTOOL_MERGE, [intltool-merge])
7055 AC_PATH_PROG(INTLTOOL_EXTRACT, [intltool-extract])
7056 if test -z "$INTLTOOL_UPDATE" -o -z "$INTLTOOL_MERGE" -o -z "$INTLTOOL_EXTRACT"; then
7057     AC_MSG_ERROR([The intltool scripts were not found. Please install intltool.])
7060   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 $< [$]@' 
7061 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 $< [$]@' 
7062      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 $< [$]@' 
7063      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 $< [$]@' 
7064       INTLTOOL_OAF_RULE='%.oaf:       %.oaf.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -p $(top_srcdir)/po $< [$]@'
7065      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 $< [$]@' 
7066    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 $< [$]@' 
7067     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 $< [$]@' 
7068 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 $< [$]@' 
7069        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 $< [$]@' 
7070       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 $< [$]@' 
7071       INTLTOOL_XML_NOMERGE_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u /tmp $< [$]@' 
7072       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 $< [$]@' 
7073       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 $< [$]@' 
7074     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 $< [$]@' 
7075   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 $< [$]@' 
7076     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 $< [$]@' 
7077     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 $< [$]@'
7078    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 $< [$]@'
7080 AC_SUBST(INTLTOOL_DESKTOP_RULE)
7081 AC_SUBST(INTLTOOL_DIRECTORY_RULE)
7082 AC_SUBST(INTLTOOL_KEYS_RULE)
7083 AC_SUBST(INTLTOOL_PROP_RULE)
7084 AC_SUBST(INTLTOOL_OAF_RULE)
7085 AC_SUBST(INTLTOOL_PONG_RULE)
7086 AC_SUBST(INTLTOOL_SERVER_RULE)
7087 AC_SUBST(INTLTOOL_SHEET_RULE)
7088 AC_SUBST(INTLTOOL_SOUNDLIST_RULE)
7089 AC_SUBST(INTLTOOL_UI_RULE)
7090 AC_SUBST(INTLTOOL_XAM_RULE)
7091 AC_SUBST(INTLTOOL_KBD_RULE)
7092 AC_SUBST(INTLTOOL_XML_RULE)
7093 AC_SUBST(INTLTOOL_XML_NOMERGE_RULE)
7094 AC_SUBST(INTLTOOL_CAVES_RULE)
7095 AC_SUBST(INTLTOOL_SCHEMAS_RULE)
7096 AC_SUBST(INTLTOOL_THEME_RULE)
7097 AC_SUBST(INTLTOOL_SERVICE_RULE)
7098 AC_SUBST(INTLTOOL_POLICY_RULE)
7100 # Check the gettext tools to make sure they are GNU
7101 AC_PATH_PROG(XGETTEXT, xgettext)
7102 AC_PATH_PROG(MSGMERGE, msgmerge)
7103 AC_PATH_PROG(MSGFMT, msgfmt)
7104 AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
7105 if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then
7106     AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
7108 xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`"
7109 mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`"
7110 mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`"
7111 if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then
7112     AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
7115 AC_PATH_PROG(INTLTOOL_PERL, [perl])
7116 if test -z "$INTLTOOL_PERL"; then
7117    AC_MSG_ERROR([perl not found; required for intltool])
7119 if test -z "`$INTLTOOL_PERL -v | fgrep '5.' 2> /dev/null`"; then
7120    AC_MSG_ERROR([perl 5.x required for intltool])
7122 if test "x$2" != "xno-xml"; then
7123    AC_MSG_CHECKING([for XML::Parser])
7124    if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then
7125        AC_MSG_RESULT([ok])
7126    else
7127        AC_MSG_ERROR([XML::Parser perl module is required for intltool])
7128    fi
7131 # Substitute ALL_LINGUAS so we can use it in po/Makefile
7132 AC_SUBST(ALL_LINGUAS)
7134 # Set DATADIRNAME correctly if it is not set yet
7135 # (copied from glib-gettext.m4)
7136 if test -z "$DATADIRNAME"; then
7137   AC_LINK_IFELSE(
7138     [AC_LANG_PROGRAM([[]],
7139                      [[extern int _nl_msg_cat_cntr;
7140                        return _nl_msg_cat_cntr]])],
7141     [DATADIRNAME=share],
7142     [case $host in
7143     *-*-solaris*)
7144     dnl On Solaris, if bind_textdomain_codeset is in libc,
7145     dnl GNU format message catalog is always supported,
7146     dnl since both are added to the libc all together.
7147     dnl Hence, we'd like to go with DATADIRNAME=share
7148     dnl in this case.
7149     AC_CHECK_FUNC(bind_textdomain_codeset,
7150       [DATADIRNAME=share], [DATADIRNAME=lib])
7151     ;;
7152     *)
7153     [DATADIRNAME=lib]
7154     ;;
7155     esac])
7157 AC_SUBST(DATADIRNAME)
7159 IT_PO_SUBDIR([po])
7164 # IT_PO_SUBDIR(DIRNAME)
7165 # ---------------------
7166 # All po subdirs have to be declared with this macro; the subdir "po" is
7167 # declared by IT_PROG_INTLTOOL.
7169 AC_DEFUN([IT_PO_SUBDIR],
7170 [AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS.
7172 dnl The following CONFIG_COMMANDS should be exetuted at the very end
7173 dnl of config.status.
7174 AC_CONFIG_COMMANDS_PRE([
7175   AC_CONFIG_COMMANDS([$1/stamp-it], [
7176     if [ ! grep "^# INTLTOOL_MAKEFILE$" "$1/Makefile.in" ]; then
7177        AC_MSG_ERROR([$1/Makefile.in.in was not created by intltoolize.])
7178     fi
7179     rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp"
7180     >"$1/stamp-it.tmp"
7181     [sed '/^#/d
7182          s/^[[].*] *//
7183          /^[    ]*$/d
7184         '"s|^|  $ac_top_srcdir/|" \
7185       "$srcdir/$1/POTFILES.in" | sed '$!s/$/ \\/' >"$1/POTFILES"
7186     ]
7187     [sed '/^POTFILES =/,/[^\\]$/ {
7188                 /^POTFILES =/!d
7189                 r $1/POTFILES
7190           }
7191          ' "$1/Makefile.in" >"$1/Makefile"]
7192     rm -f "$1/Makefile.tmp"
7193     mv "$1/stamp-it.tmp" "$1/stamp-it"
7194   ])
7195 ])dnl
7198 # deprecated macros
7199 AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL])
7200 # A hint is needed for aclocal from Automake <= 1.9.4:
7201 # AC_DEFUN([AC_PROG_INTLTOOL], ...)
7204 # nls.m4 serial 3 (gettext-0.15)
7205 dnl Copyright (C) 1995-2003, 2005-2006 Free Software Foundation, Inc.
7206 dnl This file is free software; the Free Software Foundation
7207 dnl gives unlimited permission to copy and/or distribute it,
7208 dnl with or without modifications, as long as this notice is preserved.
7210 dnl This file can can be used in projects which are not available under
7211 dnl the GNU General Public License or the GNU Library General Public
7212 dnl License but which still want to provide support for the GNU gettext
7213 dnl functionality.
7214 dnl Please note that the actual code of the GNU gettext library is covered
7215 dnl by the GNU Library General Public License, and the rest of the GNU
7216 dnl gettext package package is covered by the GNU General Public License.
7217 dnl They are *not* in the public domain.
7219 dnl Authors:
7220 dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
7221 dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2003.
7223 AC_PREREQ(2.50)
7225 AC_DEFUN([AM_NLS],
7227   AC_MSG_CHECKING([whether NLS is requested])
7228   dnl Default is enabled NLS
7229   AC_ARG_ENABLE(nls,
7230     [  --disable-nls           do not use Native Language Support],
7231     USE_NLS=$enableval, USE_NLS=yes)
7232   AC_MSG_RESULT($USE_NLS)
7233   AC_SUBST(USE_NLS)
7236 # pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
7238 # Copyright Â© 2004 Scott James Remnant <scott@netsplit.com>.
7240 # This program is free software; you can redistribute it and/or modify
7241 # it under the terms of the GNU General Public License as published by
7242 # the Free Software Foundation; either version 2 of the License, or
7243 # (at your option) any later version.
7245 # This program is distributed in the hope that it will be useful, but
7246 # WITHOUT ANY WARRANTY; without even the implied warranty of
7247 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
7248 # General Public License for more details.
7250 # You should have received a copy of the GNU General Public License
7251 # along with this program; if not, write to the Free Software
7252 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7254 # As a special exception to the GNU General Public License, if you
7255 # distribute this file as part of a program that contains a
7256 # configuration script generated by Autoconf, you may include it under
7257 # the same distribution terms that you use for the rest of that program.
7259 # PKG_PROG_PKG_CONFIG([MIN-VERSION])
7260 # ----------------------------------
7261 AC_DEFUN([PKG_PROG_PKG_CONFIG],
7262 [m4_pattern_forbid([^_?PKG_[A-Z_]+$])
7263 m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
7264 AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
7265 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
7266         AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
7268 if test -n "$PKG_CONFIG"; then
7269         _pkg_min_version=m4_default([$1], [0.9.0])
7270         AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
7271         if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
7272                 AC_MSG_RESULT([yes])
7273         else
7274                 AC_MSG_RESULT([no])
7275                 PKG_CONFIG=""
7276         fi
7277                 
7278 fi[]dnl
7279 ])# PKG_PROG_PKG_CONFIG
7281 # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
7283 # Check to see whether a particular set of modules exists.  Similar
7284 # to PKG_CHECK_MODULES(), but does not set variables or print errors.
7287 # Similar to PKG_CHECK_MODULES, make sure that the first instance of
7288 # this or PKG_CHECK_MODULES is called, or make sure to call
7289 # PKG_CHECK_EXISTS manually
7290 # --------------------------------------------------------------
7291 AC_DEFUN([PKG_CHECK_EXISTS],
7292 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
7293 if test -n "$PKG_CONFIG" && \
7294     AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
7295   m4_ifval([$2], [$2], [:])
7296 m4_ifvaln([$3], [else
7297   $3])dnl
7298 fi])
7301 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
7302 # ---------------------------------------------
7303 m4_define([_PKG_CONFIG],
7304 [if test -n "$PKG_CONFIG"; then
7305     if test -n "$$1"; then
7306         pkg_cv_[]$1="$$1"
7307     else
7308         PKG_CHECK_EXISTS([$3],
7309                          [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
7310                          [pkg_failed=yes])
7311     fi
7312 else
7313         pkg_failed=untried
7314 fi[]dnl
7315 ])# _PKG_CONFIG
7317 # _PKG_SHORT_ERRORS_SUPPORTED
7318 # -----------------------------
7319 AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
7320 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])
7321 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
7322         _pkg_short_errors_supported=yes
7323 else
7324         _pkg_short_errors_supported=no
7325 fi[]dnl
7326 ])# _PKG_SHORT_ERRORS_SUPPORTED
7329 # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
7330 # [ACTION-IF-NOT-FOUND])
7333 # Note that if there is a possibility the first call to
7334 # PKG_CHECK_MODULES might not happen, you should be sure to include an
7335 # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
7338 # --------------------------------------------------------------
7339 AC_DEFUN([PKG_CHECK_MODULES],
7340 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
7341 AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
7342 AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
7344 pkg_failed=no
7345 AC_MSG_CHECKING([for $1])
7347 _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
7348 _PKG_CONFIG([$1][_LIBS], [libs], [$2])
7350 m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
7351 and $1[]_LIBS to avoid the need to call pkg-config.
7352 See the pkg-config man page for more details.])
7354 if test $pkg_failed = yes; then
7355         _PKG_SHORT_ERRORS_SUPPORTED
7356         if test $_pkg_short_errors_supported = yes; then
7357                 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"`
7358         else 
7359                 $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
7360         fi
7361         # Put the nasty error message in config.log where it belongs
7362         echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
7364         ifelse([$4], , [AC_MSG_ERROR(dnl
7365 [Package requirements ($2) were not met:
7367 $$1_PKG_ERRORS
7369 Consider adjusting the PKG_CONFIG_PATH environment variable if you
7370 installed software in a non-standard prefix.
7372 _PKG_TEXT
7373 ])],
7374                 [AC_MSG_RESULT([no])
7375                 $4])
7376 elif test $pkg_failed = untried; then
7377         ifelse([$4], , [AC_MSG_FAILURE(dnl
7378 [The pkg-config script could not be found or is too old.  Make sure it
7379 is in your PATH or set the PKG_CONFIG environment variable to the full
7380 path to pkg-config.
7382 _PKG_TEXT
7384 To get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
7385                 [$4])
7386 else
7387         $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
7388         $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
7389         AC_MSG_RESULT([yes])
7390         ifelse([$3], , :, [$3])
7391 fi[]dnl
7392 ])# PKG_CHECK_MODULES
7394 # Copyright (C) 1995-2002 Free Software Foundation, Inc.
7395 # Copyright (C) 2001-2003,2004 Red Hat, Inc.
7397 # This file is free software, distributed under the terms of the GNU
7398 # General Public License.  As a special exception to the GNU General
7399 # Public License, this file may be distributed as part of a program
7400 # that contains a configuration script generated by Autoconf, under
7401 # the same distribution terms as the rest of that program.
7403 # This file can be copied and used freely without restrictions.  It can
7404 # be used in projects which are not available under the GNU Public License
7405 # but which still want to provide support for the GNU gettext functionality.
7407 # Macro to add for using GNU gettext.
7408 # Ulrich Drepper <drepper@cygnus.com>, 1995, 1996
7410 # Modified to never use included libintl. 
7411 # Owen Taylor <otaylor@redhat.com>, 12/15/1998
7413 # Major rework to remove unused code
7414 # Owen Taylor <otaylor@redhat.com>, 12/11/2002
7416 # Added better handling of ALL_LINGUAS from GNU gettext version 
7417 # written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002
7419 # Modified to require ngettext
7420 # Matthias Clasen <mclasen@redhat.com> 08/06/2004
7422 # We need this here as well, since someone might use autoconf-2.5x
7423 # to configure GLib then an older version to configure a package
7424 # using AM_GLIB_GNU_GETTEXT
7425 AC_PREREQ(2.53)
7428 dnl We go to great lengths to make sure that aclocal won't 
7429 dnl try to pull in the installed version of these macros
7430 dnl when running aclocal in the glib directory.
7432 m4_copy([AC_DEFUN],[glib_DEFUN])
7433 m4_copy([AC_REQUIRE],[glib_REQUIRE])
7435 dnl At the end, if we're not within glib, we'll define the public
7436 dnl definitions in terms of our private definitions.
7439 # GLIB_LC_MESSAGES
7440 #--------------------
7441 glib_DEFUN([GLIB_LC_MESSAGES],
7442   [AC_CHECK_HEADERS([locale.h])
7443     if test $ac_cv_header_locale_h = yes; then
7444     AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
7445       [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
7446        am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
7447     if test $am_cv_val_LC_MESSAGES = yes; then
7448       AC_DEFINE(HAVE_LC_MESSAGES, 1,
7449         [Define if your <locale.h> file defines LC_MESSAGES.])
7450     fi
7451   fi])
7453 # GLIB_PATH_PROG_WITH_TEST
7454 #----------------------------
7455 dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
7456 dnl   TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
7457 glib_DEFUN([GLIB_PATH_PROG_WITH_TEST],
7458 [# Extract the first word of "$2", so it can be a program name with args.
7459 set dummy $2; ac_word=[$]2
7460 AC_MSG_CHECKING([for $ac_word])
7461 AC_CACHE_VAL(ac_cv_path_$1,
7462 [case "[$]$1" in
7463   /*)
7464   ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
7465   ;;
7466   *)
7467   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
7468   for ac_dir in ifelse([$5], , $PATH, [$5]); do
7469     test -z "$ac_dir" && ac_dir=.
7470     if test -f $ac_dir/$ac_word; then
7471       if [$3]; then
7472         ac_cv_path_$1="$ac_dir/$ac_word"
7473         break
7474       fi
7475     fi
7476   done
7477   IFS="$ac_save_ifs"
7478 dnl If no 4th arg is given, leave the cache variable unset,
7479 dnl so AC_PATH_PROGS will keep looking.
7480 ifelse([$4], , , [  test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
7481 ])dnl
7482   ;;
7483 esac])dnl
7484 $1="$ac_cv_path_$1"
7485 if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
7486   AC_MSG_RESULT([$]$1)
7487 else
7488   AC_MSG_RESULT(no)
7490 AC_SUBST($1)dnl
7493 # GLIB_WITH_NLS
7494 #-----------------
7495 glib_DEFUN([GLIB_WITH_NLS],
7496   dnl NLS is obligatory
7497   [AC_REQUIRE([AC_CANONICAL_HOST])dnl
7498     USE_NLS=yes
7499     AC_SUBST(USE_NLS)
7501     gt_cv_have_gettext=no
7503     CATOBJEXT=NONE
7504     XGETTEXT=:
7505     INTLLIBS=
7507     AC_CHECK_HEADER(libintl.h,
7508      [gt_cv_func_dgettext_libintl="no"
7509       libintl_extra_libs=""
7511       #
7512       # First check in libc
7513       #
7514       AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc,
7515         [AC_TRY_LINK([
7516 #include <libintl.h>
7518          [return !ngettext ("","", 1)],
7519           gt_cv_func_ngettext_libc=yes,
7520           gt_cv_func_ngettext_libc=no)
7521         ])
7522   
7523       if test "$gt_cv_func_ngettext_libc" = "yes" ; then
7524               AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
7525                 [AC_TRY_LINK([
7526 #include <libintl.h>
7528                   [return !dgettext ("","")],
7529                   gt_cv_func_dgettext_libc=yes,
7530                   gt_cv_func_dgettext_libc=no)
7531                 ])
7532       fi
7533   
7534       if test "$gt_cv_func_ngettext_libc" = "yes" ; then
7535         AC_CHECK_FUNCS(bind_textdomain_codeset)
7536       fi
7538       #
7539       # If we don't have everything we want, check in libintl
7540       #
7541       if test "$gt_cv_func_dgettext_libc" != "yes" \
7542          || test "$gt_cv_func_ngettext_libc" != "yes" \
7543          || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
7544         
7545         AC_CHECK_LIB(intl, bindtextdomain,
7546             [AC_CHECK_LIB(intl, ngettext,
7547                     [AC_CHECK_LIB(intl, dgettext,
7548                                   gt_cv_func_dgettext_libintl=yes)])])
7550         if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
7551           AC_MSG_CHECKING([if -liconv is needed to use gettext])
7552           AC_MSG_RESULT([])
7553           AC_CHECK_LIB(intl, ngettext,
7554                 [AC_CHECK_LIB(intl, dcgettext,
7555                        [gt_cv_func_dgettext_libintl=yes
7556                         libintl_extra_libs=-liconv],
7557                         :,-liconv)],
7558                 :,-liconv)
7559         fi
7561         #
7562         # If we found libintl, then check in it for bind_textdomain_codeset();
7563         # we'll prefer libc if neither have bind_textdomain_codeset(),
7564         # and both have dgettext and ngettext
7565         #
7566         if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
7567           glib_save_LIBS="$LIBS"
7568           LIBS="$LIBS -lintl $libintl_extra_libs"
7569           unset ac_cv_func_bind_textdomain_codeset
7570           AC_CHECK_FUNCS(bind_textdomain_codeset)
7571           LIBS="$glib_save_LIBS"
7573           if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
7574             gt_cv_func_dgettext_libc=no
7575           else
7576             if test "$gt_cv_func_dgettext_libc" = "yes" \
7577                 && test "$gt_cv_func_ngettext_libc" = "yes"; then
7578               gt_cv_func_dgettext_libintl=no
7579             fi
7580           fi
7581         fi
7582       fi
7584       if test "$gt_cv_func_dgettext_libc" = "yes" \
7585         || test "$gt_cv_func_dgettext_libintl" = "yes"; then
7586         gt_cv_have_gettext=yes
7587       fi
7588   
7589       if test "$gt_cv_func_dgettext_libintl" = "yes"; then
7590         INTLLIBS="-lintl $libintl_extra_libs"
7591       fi
7592   
7593       if test "$gt_cv_have_gettext" = "yes"; then
7594         AC_DEFINE(HAVE_GETTEXT,1,
7595           [Define if the GNU gettext() function is already present or preinstalled.])
7596         GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
7597           [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
7598         if test "$MSGFMT" != "no"; then
7599           glib_save_LIBS="$LIBS"
7600           LIBS="$LIBS $INTLLIBS"
7601           AC_CHECK_FUNCS(dcgettext)
7602           MSGFMT_OPTS=
7603           AC_MSG_CHECKING([if msgfmt accepts -c])
7604           GLIB_RUN_PROG([msgfmt -c -o /dev/null],[
7605 msgid ""
7606 msgstr ""
7607 "Content-Type: text/plain; charset=UTF-8\n"
7608 "Project-Id-Version: test 1.0\n"
7609 "PO-Revision-Date: 2007-02-15 12:01+0100\n"
7610 "Last-Translator: test <foo@bar.xx>\n"
7611 "Language-Team: C <LL@li.org>\n"
7612 "MIME-Version: 1.0\n"
7613 "Content-Transfer-Encoding: 8bit\n"
7614 ], [MSGFMT_OPTS=-c; AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])])
7615           AC_SUBST(MSGFMT_OPTS)
7616           AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
7617           GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
7618             [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
7619           AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
7620                          return _nl_msg_cat_cntr],
7621             [CATOBJEXT=.gmo 
7622              DATADIRNAME=share],
7623             [case $host in
7624             *-*-solaris*)
7625             dnl On Solaris, if bind_textdomain_codeset is in libc,
7626             dnl GNU format message catalog is always supported,
7627             dnl since both are added to the libc all together.
7628             dnl Hence, we'd like to go with DATADIRNAME=share and
7629             dnl and CATOBJEXT=.gmo in this case.
7630             AC_CHECK_FUNC(bind_textdomain_codeset,
7631               [CATOBJEXT=.gmo 
7632                DATADIRNAME=share],
7633               [CATOBJEXT=.mo
7634                DATADIRNAME=lib])
7635             ;;
7636             *)
7637             CATOBJEXT=.mo
7638             DATADIRNAME=lib
7639             ;;
7640             esac])
7641           LIBS="$glib_save_LIBS"
7642           INSTOBJEXT=.mo
7643         else
7644           gt_cv_have_gettext=no
7645         fi
7646       fi
7647     ])
7649     if test "$gt_cv_have_gettext" = "yes" ; then
7650       AC_DEFINE(ENABLE_NLS, 1,
7651         [always defined to indicate that i18n is enabled])
7652     fi
7654     dnl Test whether we really found GNU xgettext.
7655     if test "$XGETTEXT" != ":"; then
7656       dnl If it is not GNU xgettext we define it as : so that the
7657       dnl Makefiles still can work.
7658       if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
7659         : ;
7660       else
7661         AC_MSG_RESULT(
7662           [found xgettext program is not GNU xgettext; ignore it])
7663         XGETTEXT=":"
7664       fi
7665     fi
7667     # We need to process the po/ directory.
7668     POSUB=po
7670     AC_OUTPUT_COMMANDS(
7671       [case "$CONFIG_FILES" in *po/Makefile.in*)
7672         sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
7673       esac])
7675     dnl These rules are solely for the distribution goal.  While doing this
7676     dnl we only have to keep exactly one list of the available catalogs
7677     dnl in configure.in.
7678     for lang in $ALL_LINGUAS; do
7679       GMOFILES="$GMOFILES $lang.gmo"
7680       POFILES="$POFILES $lang.po"
7681     done
7683     dnl Make all variables we use known to autoconf.
7684     AC_SUBST(CATALOGS)
7685     AC_SUBST(CATOBJEXT)
7686     AC_SUBST(DATADIRNAME)
7687     AC_SUBST(GMOFILES)
7688     AC_SUBST(INSTOBJEXT)
7689     AC_SUBST(INTLLIBS)
7690     AC_SUBST(PO_IN_DATADIR_TRUE)
7691     AC_SUBST(PO_IN_DATADIR_FALSE)
7692     AC_SUBST(POFILES)
7693     AC_SUBST(POSUB)
7694   ])
7696 # AM_GLIB_GNU_GETTEXT
7697 # -------------------
7698 # Do checks necessary for use of gettext. If a suitable implementation 
7699 # of gettext is found in either in libintl or in the C library,
7700 # it will set INTLLIBS to the libraries needed for use of gettext
7701 # and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable
7702 # gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST()
7703 # on various variables needed by the Makefile.in.in installed by 
7704 # glib-gettextize.
7706 glib_DEFUN([GLIB_GNU_GETTEXT],
7707   [AC_REQUIRE([AC_PROG_CC])dnl
7708    AC_REQUIRE([AC_HEADER_STDC])dnl
7709    
7710    GLIB_LC_MESSAGES
7711    GLIB_WITH_NLS
7713    if test "$gt_cv_have_gettext" = "yes"; then
7714      if test "x$ALL_LINGUAS" = "x"; then
7715        LINGUAS=
7716      else
7717        AC_MSG_CHECKING(for catalogs to be installed)
7718        NEW_LINGUAS=
7719        for presentlang in $ALL_LINGUAS; do
7720          useit=no
7721          if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
7722            desiredlanguages="$LINGUAS"
7723          else
7724            desiredlanguages="$ALL_LINGUAS"
7725          fi
7726          for desiredlang in $desiredlanguages; do
7727            # Use the presentlang catalog if desiredlang is
7728            #   a. equal to presentlang, or
7729            #   b. a variant of presentlang (because in this case,
7730            #      presentlang can be used as a fallback for messages
7731            #      which are not translated in the desiredlang catalog).
7732            case "$desiredlang" in
7733              "$presentlang"*) useit=yes;;
7734            esac
7735          done
7736          if test $useit = yes; then
7737            NEW_LINGUAS="$NEW_LINGUAS $presentlang"
7738          fi
7739        done
7740        LINGUAS=$NEW_LINGUAS
7741        AC_MSG_RESULT($LINGUAS)
7742      fi
7744      dnl Construct list of names of catalog files to be constructed.
7745      if test -n "$LINGUAS"; then
7746        for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
7747      fi
7748    fi
7750    dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
7751    dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
7752    dnl Try to locate is.
7753    MKINSTALLDIRS=
7754    if test -n "$ac_aux_dir"; then
7755      MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
7756    fi
7757    if test -z "$MKINSTALLDIRS"; then
7758      MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
7759    fi
7760    AC_SUBST(MKINSTALLDIRS)
7762    dnl Generate list of files to be processed by xgettext which will
7763    dnl be included in po/Makefile.
7764    test -d po || mkdir po
7765    if test "x$srcdir" != "x."; then
7766      if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
7767        posrcprefix="$srcdir/"
7768      else
7769        posrcprefix="../$srcdir/"
7770      fi
7771    else
7772      posrcprefix="../"
7773    fi
7774    rm -f po/POTFILES
7775    sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
7776         < $srcdir/po/POTFILES.in > po/POTFILES
7777   ])
7779 # AM_GLIB_DEFINE_LOCALEDIR(VARIABLE)
7780 # -------------------------------
7781 # Define VARIABLE to the location where catalog files will
7782 # be installed by po/Makefile.
7783 glib_DEFUN([GLIB_DEFINE_LOCALEDIR],
7784 [glib_REQUIRE([GLIB_GNU_GETTEXT])dnl
7785 glib_save_prefix="$prefix"
7786 glib_save_exec_prefix="$exec_prefix"
7787 glib_save_datarootdir="$datarootdir"
7788 test "x$prefix" = xNONE && prefix=$ac_default_prefix
7789 test "x$exec_prefix" = xNONE && exec_prefix=$prefix
7790 datarootdir=`eval echo "${datarootdir}"`
7791 if test "x$CATOBJEXT" = "x.mo" ; then
7792   localedir=`eval echo "${libdir}/locale"`
7793 else
7794   localedir=`eval echo "${datadir}/locale"`
7796 prefix="$glib_save_prefix"
7797 exec_prefix="$glib_save_exec_prefix"
7798 datarootdir="$glib_save_datarootdir"
7799 AC_DEFINE_UNQUOTED($1, "$localedir",
7800   [Define the location where the catalogs will be installed])
7804 dnl Now the definitions that aclocal will find
7806 ifdef(glib_configure_in,[],[
7807 AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)])
7808 AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)])
7809 ])dnl
7811 # GLIB_RUN_PROG(PROGRAM, TEST-FILE, [ACTION-IF-PASS], [ACTION-IF-FAIL])
7813 # Create a temporary file with TEST-FILE as its contents and pass the
7814 # file name to PROGRAM.  Perform ACTION-IF-PASS if PROGRAM exits with
7815 # 0 and perform ACTION-IF-FAIL for any other exit status.
7816 AC_DEFUN([GLIB_RUN_PROG],
7817 [cat >conftest.foo <<_ACEOF
7819 _ACEOF
7820 if AC_RUN_LOG([$1 conftest.foo]); then
7821   m4_ifval([$3], [$3], [:])
7822 m4_ifvaln([$4], [else $4])dnl
7823 echo "$as_me: failed input was:" >&AS_MESSAGE_LOG_FD
7824 sed 's/^/| /' conftest.foo >&AS_MESSAGE_LOG_FD
7825 fi])