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