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